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
Turn duration of the movies from hours to minutes
function turnHoursToMinutes(array){ var returnArray = array.map(function(movie){ if (movie.duration.length === 8){ var newtime = parseFloat(movie.duration[0])*60 + parseFloat(movie.duration.slice(3,5)); } else if (movie.duration.length === 2){ var newtime = parseFloat(mo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function turnHoursToMinutes (movie){\n for (var i=0; i<movie.length;i++){\n var horas=parseInt(movie[i].duration.split(\" \")[0].toString().replace('h',''));\n var minutos=parseInt(movie[i].duration.split(\" \")[1].toString().replace('min',''));\n var tiempo=(horas*60)+minutos\n movie[i].dur...
[ "0.84961903", "0.82664114", "0.8173887", "0.8079166", "0.8079166", "0.80395204", "0.7977214", "0.7935403", "0.7922746", "0.79219615", "0.7912124", "0.7902459", "0.7893197", "0.7846424", "0.78362334", "0.7817627", "0.78041893", "0.78034425", "0.77897567", "0.77418447", "0.7737...
0.72430986
53
Get the average of all rates with 2 decimals
function ratesAverage(array){ var num = array.reduce(function(sum, current){ return sum += parseFloat(current.rate); }, 0); var average = parseFloat((num / array.length).toFixed(2)); return average; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ratesAverage(arr) {\n var allRates = arr.reduce(function(acc, elem) {\n return (acc += Number(elem.rate));\n }, 0);\n return parseFloat((allRates / arr.length).toFixed(2));\n}", "function ratesAverage(arr) {\n let temp = arr.reduce(function(cont, obj) {\n return cont + Number(obj.rate);\n ...
[ "0.8237239", "0.8171193", "0.8121964", "0.808314", "0.8074433", "0.80263376", "0.7989369", "0.79890764", "0.79739684", "0.79558325", "0.79234594", "0.7858765", "0.7849655", "0.7844679", "0.7839358", "0.783836", "0.7837011", "0.7808338", "0.77768123", "0.7775673", "0.7752375",...
0.77656823
20
Get the average of Drama Movies
function dramaMoviesRate(array){ var dramaArray = array.filter(function(movie){ return (movie.genre.indexOf("Drama") !== -1 || movie.genre === "Drama"); }); counter = 0; for (var i = 0; i < length.dramaArray; i++){ if(dramaArray.rate === ''){ dramaArray.rate = 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dramaMoviesRate(movies) {\n let drama = movies.filter(function(elem){\n return elem.genre.includes('drama')\n })\n\n let avg = drama.reduce(function(sum, elem){\n return sum + elem.rate;\n }, 0) \n \n / drama.length;\n}", "function calculateMovieAverage() {\n\tfor (let i ...
[ "0.8144289", "0.80291814", "0.80137557", "0.79884934", "0.7988115", "0.79778236", "0.7970365", "0.7959536", "0.7936437", "0.7870751", "0.7855798", "0.7810692", "0.7741643", "0.7741236", "0.77384114", "0.77114034", "0.7699041", "0.7685685", "0.7682241", "0.76698714", "0.766248...
0.0
-1
Order by time duration, in growing order
function orderByDuration(array){ var newArray = turnHoursToMinutes(array); newArray.sort(function(a, b){ if (a.duration === b.duration){ return a.title.toLowerCase() - b.title.toLowerCase() } return a.duration - b.duration; }); console.log(newArray) return newArra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderByDuration(e){\n var arr = turnHoursToMinutes(e);\n arr.sort((a, b) => a.duration - b.duration)\n return arr;\n}", "function orderByDuration(arr) {\n let newSortedArray = arr.sort(arr.item.duration)\n}", "function orderByDuration(arr) {\n let result = arr.sort(function(ini, value) {\n ...
[ "0.73566896", "0.7167422", "0.7129152", "0.70352834", "0.6955612", "0.692619", "0.6849059", "0.68176603", "0.6772102", "0.67486435", "0.6718666", "0.66884017", "0.6687038", "0.6676", "0.661311", "0.66104275", "0.65731496", "0.65640575", "0.654546", "0.65430313", "0.64962924",...
0.6522646
20
How many movies did STEVEN SPIELBERG
function howManyMovies(array){ if (array.length === 0){ return undefined; } counter = 0; for (var i = 0; i < array.length; i++){ if ((array[i].director === 'Steven Spielberg') /* && (movie.genre.indexOf("Drama") !== -1 *//* || movie.genre === "Drama") */){ counter +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howManyMovies(movies) {\n const stevenDrama = movies.filter(elm => elm.director === \"Steven Spielberg\" && elm.genre.includes(\"Drama\"))\n return stevenDrama.length\n}", "function howManyMovies(movies) {\n const stevenDrama = movies.filter(function (e, i) {\n return (e.director === 'St...
[ "0.79405683", "0.7857502", "0.78541905", "0.78438264", "0.7839519", "0.7831731", "0.78142804", "0.78068256", "0.78002715", "0.7772511", "0.7762048", "0.7735246", "0.77203184", "0.7709904", "0.770658", "0.77039325", "0.7669333", "0.76460356", "0.7641513", "0.76412654", "0.7628...
0.70983046
81
Order by title and print the first 20 titles
function orderAlphabetically(array){ var newArray = array.sort(function(a, b){ return a.title.toLowerCase() - b.title.toLowerCase(); }); return newArray.splice(0, 20); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderAlphabetically(movies) {\nvar arrayTitleMovies = movies.sort(function(movie){\n return movie.title.sort();\n});\nvar i = 0; \nwhile (i<arrayTitleMovies.length) {\n if (i == 20) {\n break;\n }\n i += 1;\n}\n}", "function orderAlphabetically(someArray){\n someArray.sort((a, b) =...
[ "0.7696068", "0.76881725", "0.76134306", "0.75518084", "0.7500655", "0.746018", "0.7345931", "0.7329208", "0.7314394", "0.73100376", "0.7298118", "0.7294328", "0.72921807", "0.728188", "0.7265923", "0.7262245", "0.7261572", "0.72233826", "0.72122973", "0.71922135", "0.7183405...
0.0
-1
Return the existing macro or null if it doesn't exists
static getMacro(name) { return this.macros[name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getExpansion(name: string): ?MacroExpansion {\n const definition = this.macros.get(name);\n if (definition == null) { // mainly checking for undefined here\n return definition;\n }\n const expansion =\n typeof definition === \"function\" ? definition(this) : defin...
[ "0.6372361", "0.59714735", "0.5615434", "0.5559684", "0.5494884", "0.5322907", "0.52374166", "0.51861507", "0.51702887", "0.5019183", "0.50173974", "0.501043", "0.49923798", "0.49866417", "0.49754006", "0.4940996", "0.49404988", "0.49013528", "0.4857458", "0.4857458", "0.4847...
0.69248676
0
Returns a boolean telling if a macro exists
static hasMacro(name) { return !!this.getMacro(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isDefined(name: string): boolean {\n return this.macros.has(name) ||\n functions.hasOwnProperty(name) ||\n symbols.math.hasOwnProperty(name) ||\n symbols.text.hasOwnProperty(name) ||\n implicitCommands.hasOwnProperty(name);\n }", "function IsMacro()\n{\n retu...
[ "0.67250603", "0.60946983", "0.58342063", "0.5830002", "0.57976115", "0.57477254", "0.57067275", "0.5706484", "0.5665631", "0.5661091", "0.5648274", "0.5641781", "0.5603476", "0.55899054", "0.5574634", "0.5569993", "0.5556526", "0.5515058", "0.54939944", "0.5483664", "0.54771...
0.81377167
0
Return the existing getter or null if it doesn't exists
static getGetter(name) { return this.getters[name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get _getter() {\n return descriptorForDecorator(this)._getter;\n }", "get(name) {\n return getters[name]();\n }", "get() {\n // no arrow functions here, need `this` to change to instance\n // noinspection JSPotentiallyInvalidUsageOfClassThis\n return this.ge...
[ "0.6963752", "0.65117055", "0.64192504", "0.63397276", "0.63397276", "0.63397276", "0.6312035", "0.6203318", "0.61029726", "0.6095378", "0.60936344", "0.60893536", "0.6064106", "0.6007305", "0.59671825", "0.5933807", "0.59267545", "0.58998054", "0.5888876", "0.5876425", "0.58...
0.6545341
1
Returns a boolean telling if a getter exists
static hasGetter(name) { return !!this.getGetter(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasGetterOrSetter (def)\n{\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\n}", "function isGetter(toTest) {\n\t return (toTest instanceof Getter)\n\t}", "static isGetAccessor(structure) {\r\n return structure.kind === StructureKind_1.S...
[ "0.73724806", "0.70417434", "0.6736598", "0.64589065", "0.6396938", "0.63018185", "0.61826897", "0.60481244", "0.60481244", "0.60481244", "0.6042385", "0.60387367", "0.6034734", "0.5972268", "0.59637666", "0.59508383", "0.59127265", "0.5900829", "0.5895162", "0.5879552", "0.5...
0.81191236
0
Cleanup getters and macros from the class
static hydrate() { Object.keys(this.macros).forEach((key) => Reflect.deleteProperty(this.prototype, key)); Object.keys(this.getters).forEach((key) => Reflect.deleteProperty(this.prototype, key)); this.macros = {}; this.getters = {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function classCleanup() {\n\n\t}", "function ObjectCleanerMangler() {\n\t}", "fieldCleanup() {\n }", "cleanup() {\n this.lastRead = {};\n this.defaults = {};\n this.overrides = {};\n }", "static _ensureClassProperties() {\n // ensure private storage for property declar...
[ "0.61222726", "0.6113046", "0.59059626", "0.58741957", "0.56518203", "0.56472194", "0.56472194", "0.56472194", "0.56124395", "0.5604141", "0.559522", "0.5448358", "0.5347408", "0.52608454", "0.52608454", "0.52305764", "0.52305764", "0.5204407", "0.5204407", "0.5204407", "0.51...
0.68778676
0
Removes the loading spinner and resets the button.
function resolved() { scope.spinning = false; // enable the button element.prop('disabled', false); // reevaluate ng-disabled handleNgDisabled(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideLoadingView() {\n $(\"#spinner\").toggleClass('d-none');\n $(\"button\").empty().removeAttr(\"disabled\");\n $(\"button\").text('Reset!');\n}", "reset() {\n this.isActive = false;\n this.isLoading = false;\n this.$button.show();\n }", "function resetLoadingBtn(element){\...
[ "0.7930767", "0.7891738", "0.76400363", "0.7626507", "0.7530066", "0.7530066", "0.74793136", "0.745922", "0.7303594", "0.71979904", "0.7192609", "0.7155924", "0.7121594", "0.6997528", "0.6989637", "0.691004", "0.6807237", "0.68069565", "0.6790097", "0.6787137", "0.67794734", ...
0.0
-1
Functions Generate random RGBA color
function randomRgbaColor() { var o = Math.round, r = Math.random, s = 255; return ( 'rgba(' + o(r() * s) + ', ' + o(r() * s) + ', ' + o(r() * s) + ', ' + r().toFixed(1) + ')' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomColorRGBA() {\n return 'rgba(' + calcRndGen(255, true).toString() + \",\" + calcRndGen(255, true).toString() + \",\" + calcRndGen(255, true).toString() + \",\" + Math.random().toString() + ')';\n }", "static random_color () {\n let r = rand_in_range(0, 256)\n let ...
[ "0.8727454", "0.837898", "0.8372389", "0.8323881", "0.8286971", "0.82710207", "0.820646", "0.817975", "0.8163024", "0.81594944", "0.81561565", "0.81422377", "0.8134346", "0.81290776", "0.8112249", "0.81097096", "0.8102264", "0.80986565", "0.80897737", "0.8080915", "0.80769926...
0.8096488
18
This function creates the html element for the given record (tweet).
function createTweetElement(objTweet){ // Create the basic tweet object from db record. let $tweet = $('<article></article>').addClass('tweet') .append(`<header><h2>${escape(objTweet.user.name)}</h2> <h3>${escape(objTweet.user.handle)}</h3></header>`) .append(`<img class = \'profile-pic\' src=\'${escape(objTwe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTweetElement(tweet) {\n let $tweet = $('<article>').addClass(\"tweet\").attr({\"id\": tweet._id});\n let header = $('<header>');\n let content = $('<p>').addClass(\"tweetContent\").text(tweet.content.text);\n let footer = $('<footer>');\n let icons = $('<div>').addClass(\"icons\");\n header.ap...
[ "0.7504033", "0.74767464", "0.7434743", "0.743472", "0.7308583", "0.72724295", "0.7270822", "0.7235029", "0.7220965", "0.7190963", "0.71846545", "0.71769917", "0.7139395", "0.7116598", "0.7078938", "0.70336205", "0.70255816", "0.702114", "0.6917391", "0.6914781", "0.6868309",...
0.7257401
7
This function takes an array of tweet objects and appends each one into the tweetscontainer.
function renderTweets(arrTweets){ let sorted = arrTweets.sort(function (a, b) { if (a.created_at > b.created_at) { return -1; } if (a.created_at < b.created_at) { return 1; } return 0; }); let str = ''; $.each(sorted, function(index, value) { let eleTweet = createTweetElem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderTweets(arrayOfTweets) {\n $('#tweets-container').empty();\n for (let i = 0; i < arrayOfTweets.length; ++i) {\n let $tweet = createTweetElement(arrayOfTweets[i]);\n $('#tweets-container').prepend($tweet); //append is costly, change later when have time\n }\n}", "function renderTweets(tweet...
[ "0.7455529", "0.7366447", "0.7360667", "0.72928786", "0.72607696", "0.7138824", "0.71375704", "0.71165854", "0.7105376", "0.7104344", "0.7085065", "0.7069105", "0.6962255", "0.69599307", "0.6915806", "0.6913581", "0.6660935", "0.65771306", "0.65499485", "0.6544924", "0.651073...
0.64433795
23
This function removes all tweets on screen (i.e. before reloading after a new tweet).
function removeTweets(){ $('#tweets-container .tweet').remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeTweets(){\n $section.html('');\n }", "function clearScreen(){\n\t$('.oldTweet, .newTweet').remove();\n\t$('#jumboTweet').html('');\n\t$('#jumboUser').html('');\n\t\n\tlastID = 0;\n}", "function cleanTweets(){\n\tallTweets = [];\n}", "function renderTweets(tweets) {\n $('#tweets-containe...
[ "0.80142677", "0.79455966", "0.78406566", "0.70500463", "0.69700795", "0.6934162", "0.6773321", "0.6763508", "0.6744382", "0.6696735", "0.6689524", "0.65707576", "0.65207565", "0.64867735", "0.64633644", "0.6425726", "0.6422454", "0.6399534", "0.6391125", "0.63816434", "0.637...
0.79048336
2
This function sanitizes user input to prevent XSS.
function escape (strInput){ let div = document.createElement('div'); div.appendChild(document.createTextNode(strInput)); return div.innerHTML; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unsanitize(input) {\n input = input.replace(/&amp;/g, \"&\");\n input = input.replace(/&lt;/g, \"<\");\n input = input.replace(/&gt;/g, \">\");\n input = input.replace(/&quot;/g, '\"');\n input = input.replace(/&#x27;/g, \"'\");\n input = input.replace(/&#x2F;/g, \"/\");\n return inpu...
[ "0.7534765", "0.74135554", "0.7204276", "0.71642405", "0.7139642", "0.7105399", "0.7100719", "0.70936215", "0.70158577", "0.7014995", "0.70066786", "0.7004021", "0.68951005", "0.6881222", "0.68636125", "0.6804379", "0.67934144", "0.6696257", "0.6688781", "0.66785115", "0.6596...
0.0
-1
This function takes a create date and returns a message (string) displaying how old the tweet is.
function dateDiff(dateInput){ // Get the date difference as a nice looking message from moment.js. let strDateDiff = moment(dateInput).fromNow(); // The fromNow() function only displays in seconds or longer so this while() loop was added // for when a new tweet is entered and displayed in less than one second...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howOld(createdOn) {\n // Time constants\n const created = createdOn;\n const min = 60 * 1000;\n const hour = min * 60;\n const day = hour * 24;\n const week = day * 7;\n const week2 = week * 2;\n const week3 = week * 3;\n const week4 = week * ...
[ "0.74070084", "0.68127775", "0.652176", "0.65046394", "0.6412339", "0.6340992", "0.63203585", "0.61954075", "0.6165749", "0.61611164", "0.61175627", "0.6059325", "0.6039244", "0.60266256", "0.60185945", "0.597624", "0.595407", "0.5916391", "0.586837", "0.5835054", "0.5810426"...
0.65835124
2
This function clears out the textarea and resets the character counter after a new tweet.
function resetTweetForm(){ $('.new-tweet textarea').val(''); $('.new-tweet .counter').text('140'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n textarea.value = \"\";\n display.innerHTML = \"Character Count: <strong>0</strong>\" + \"<br>\" + \"Word Count: <strong>0</strong>\";\n}", "function resetTweet() {\n tweet1.value = '';\n tweet1Count.textContent = '0';\n}", "function clearText() {\n textarea.value = \"\";\n}", ...
[ "0.7184192", "0.7084929", "0.67371196", "0.6481325", "0.6462267", "0.64122283", "0.63532", "0.6337019", "0.63296074", "0.62512976", "0.62460834", "0.6229764", "0.61835235", "0.6164028", "0.61224234", "0.6106578", "0.6032501", "0.60215855", "0.6016351", "0.59914845", "0.596511...
0.78942055
0
Added function here from the exercises (w3d3) to essentially refresh the tweets.
function loadTweets(){ $.ajax({ method: 'GET', url: '/tweets', dataType: 'json', success: function(results){ removeTweets(); renderTweets(results); } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshTweets() {\n loadTweets()\n .then(renderTweets)\n .catch((err) => console.error(err));\n}", "function reload(){\n\tsetTimeout(function(){\n\t\t\tgetTweets();\n\t\t}, reloadInterval*1000);\n}", "function pollMentionTweets() {\n\tsetTimeout(updateMentionTweets, TWITTER_POLL_INTERVAL);\n}",...
[ "0.82145333", "0.8003728", "0.7688763", "0.762495", "0.7516428", "0.7468371", "0.7401453", "0.72454756", "0.7244149", "0.7223921", "0.7213446", "0.71816885", "0.71456814", "0.71191955", "0.71136457", "0.7087761", "0.70790833", "0.7066967", "0.7007207", "0.69992566", "0.695443...
0.6817378
29
[...] The module code
function myService1() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Module(){}", "function Module(){}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {}", "function Module() {\r\n}", "function _____SHARED_functions_____(){}", "GetModule() {\n\n }", "functi...
[ "0.70845985", "0.70845985", "0.6879212", "0.6879212", "0.6879212", "0.6879212", "0.6879212", "0.6879212", "0.6859662", "0.6722055", "0.6538291", "0.6393158", "0.63676924", "0.62786674", "0.6260534", "0.6236465", "0.60932875", "0.60239655", "0.6018482", "0.6018482", "0.6008623...
0.0
-1
Conver format price to price
function convertPrice(formatPrice){ str = formatPrice.substring(0,formatPrice.length - 4); str1 = str.replace('.',''); str2 = str1.replace('.',''); str3 = str2.replace('.',''); return str3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertPrice(price){\n return new Intl.NumberFormat('ru-RU').format(Math.round(price));\n}", "function ypFmtPrice(price) {\n var decimals = price.substring(price.indexOf(\",\") + 1);\n // Price n,n\n if (decimals.length == 1) {\n return price + \"0\";\n }\n // Price n\n if (decimals.length =...
[ "0.7347517", "0.71456087", "0.71455187", "0.7104875", "0.6983118", "0.6952542", "0.68681353", "0.68174773", "0.67862785", "0.6747301", "0.6726031", "0.67202157", "0.66096854", "0.66096854", "0.65352815", "0.64993864", "0.6458341", "0.6453765", "0.6453296", "0.6411556", "0.638...
0.7676214
0
loading popup with jQuery magic!
function loadPopup(){ //loads popup only if it is disabled if(popupStatus==0){ $("#backgroundPopup").css({ "opacity": "0.7" }); $("#backgroundPopup").fadeIn("slow"); $("#popupContact").fadeIn("slow"); popupStatus = 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startloading(){\n\t//$('#ajaxloading').show();\n\t$('.sl-popup:visible .overlay').show();\n}", "function addLoad(){\n $('#loadingPopup').css('display', 'block');\n }", "function loadPopupBox()\n{\n $('#popup_box').fadeIn(\"slow\");\n}", "function loadSchedulePopup(){\n\tif(popupStatus==...
[ "0.7806335", "0.7544083", "0.74608505", "0.7174958", "0.7136019", "0.7121278", "0.71177834", "0.7063178", "0.70483017", "0.7032952", "0.70035607", "0.6974832", "0.6974832", "0.6971756", "0.69339156", "0.69175726", "0.6909202", "0.68752795", "0.6873801", "0.68512315", "0.68152...
0.6729854
25
disabling popup with jQuery magic!
function disablePopup(){ //disables popup only if it is enabled if(popupStatus==1){ $("#backgroundPopup").fadeOut("slow"); $("#popupContact").fadeOut("slow"); popupStatus = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disablePopup() {\n //disables popup only if it is enabled\n if (popupStatus == 1) {\n popupStatus = 0;\n }\n}", "function disablePopup(){\r\n\tjQuery(function($){\r\n\t//disables popup only if it is enabled\r\n\tif(popupStatus==1){\r\n\t\t$(\"#backgroundPopup\").fadeOut(\"slow\");\r\n\t\...
[ "0.7725151", "0.76883507", "0.7643007", "0.7610349", "0.75334084", "0.75334084", "0.75334084", "0.75199485", "0.74890673", "0.7488208", "0.7426042", "0.73348457", "0.7321267", "0.72867095", "0.72843033", "0.7278439", "0.7259692", "0.725164", "0.72213805", "0.7212156", "0.7204...
0.73250777
12
Sort and Reduce order books
sortAndReduceOrderBook() { const asks = ptoHelper.sortOrders(this.asks, 'ascending'); const bids = ptoHelper.sortOrders(this.bids, 'descending'); this.asks = ptoHelper.reduceOrders(asks); this.bids = ptoHelper.reduceOrders(bids); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortingBooks(arr){\n if(arr.length <= 1){\n return arr; \n }\n\n let middle = Math.floor(arr.length/2); \n let leftArr = arr.slice(0, middle); \n let rightArr = arr.slice(middle,arr.length); \n leftArr = sortingBooks(leftArr); \n rightArr = sortingBooks(rightArr); \n\n return mergeBooks(leftArr...
[ "0.68119425", "0.67595303", "0.64113414", "0.64075875", "0.61318916", "0.6112191", "0.5992241", "0.5920006", "0.5902326", "0.5859505", "0.58239615", "0.5734228", "0.5728956", "0.572635", "0.56789404", "0.5616335", "0.55643296", "0.55396694", "0.5527887", "0.5504788", "0.55026...
0.79688907
0
Apply highlight to order books Breaks out of loop if element in array does not have arbitrage opportunity
applyHighlight() { let z = false; for (let x = 0; x < this.asks.length; x++) { if (z) { break; } for (let y = 0; y < this.bids.length; y++) { if (this.asks[x].rate <= this.bids[y].rate) { this.asks[x].arbitrage = true; this.bids[y].arbitrage = true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightWords(array) {\n var colors = [];\n for(let i=1; i < array.length; i = i+2) {\n if(arrayCompare(array[i-1], array[i]) == false) {\n colors.push(\"red\");\n colors.push(\"red\");\n console.log(\"false\");\n } else {\n colors.push(\"green\");\n col...
[ "0.59615886", "0.5810983", "0.5703037", "0.5685261", "0.55654263", "0.5556429", "0.55418706", "0.5495942", "0.54665196", "0.5452331", "0.54335564", "0.542125", "0.54009384", "0.5369733", "0.53542465", "0.5342238", "0.5340014", "0.533415", "0.5317466", "0.52921075", "0.5282734...
0.70723075
0
armazenando os dados no local storage do browser. get e pegar e ser e arrumar/guardar. precisamos transformar um array para uma string pois sempre o localStorage guarda string.
get() { //aqui vamos desfazer oque fizemos no set, ou seja, transformar a string em array como era antes. //quem faz isso acontecer é o "parse", e "||" = "OU", caso nao tenha a chave retornar um array vazio. return JSON.parse(localStorage.getItem("dev.finances:transactions")) || []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guardarDatosLocalStorage(){\n //toma el valor de un arreglo con datos de LS o vacio\n localStorage.setItem('respuestasM', JSON.stringify(respuestaMotorcycle)); // todas las motos quedan almacenadas en local storage// todas las motos quedan almacenadas en local storage\n}", "function guardarDatosLo...
[ "0.7696893", "0.7614634", "0.7582017", "0.7576082", "0.7512743", "0.74590445", "0.74159104", "0.7358626", "0.7349481", "0.7325401", "0.7322008", "0.730779", "0.7303646", "0.7294526", "0.7292386", "0.72914577", "0.7278287", "0.7263247", "0.72550005", "0.7246474", "0.7239468", ...
0.0
-1
faz o tbody do index voltar a ser vazio.
clearTransactions() { DOM.transactionsContainer.innerHTML = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < ufoData.length; i++) {\n var index = ufoData[i];\n console.log(index)\n var fields = Object.keys(index);\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j];\n var $c...
[ "0.6592487", "0.63948995", "0.6161717", "0.61009467", "0.6064641", "0.605805", "0.59848595", "0.59315753", "0.58987254", "0.5878574", "0.5871391", "0.5866404", "0.58587205", "0.5834164", "0.58142626", "0.5808378", "0.5796561", "0.5785045", "0.5767422", "0.5752866", "0.573318"...
0.0
-1
pegando so os valores e guardando nessa funcao.
getValues() { return { description: Form.description.value, amount: Form.amount.value, date: Form.date.value } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function limpiarCampos(opcion) { \r\n \r\nswitch (opcion.data.parametro){\r\n \r\n //Aereo\r\n case \"aereo\":\r\n $(\"#cantidadPersonasAereo\").val(\"\");\r\n $(\"#pasajeroAereo\").val(\"\");\r\n $(\"#etiquetaReserva...
[ "0.5694438", "0.55599576", "0.54515177", "0.54410344", "0.54336846", "0.54277927", "0.540342", "0.5401485", "0.53972393", "0.53827035", "0.53762007", "0.53718704", "0.53431904", "0.53293055", "0.5326564", "0.5326564", "0.5326564", "0.5241197", "0.5238813", "0.5236988", "0.523...
0.0
-1
verificacao de senhas e redigitar senhas
function verificarSenhas() { if (documento.form.password.value === document.forms.passwordConfirm.value) { alert("As duas senhas conferem"); } else { alert("As duas senhas não conferem") } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verifica_campos_senha() {\n if ($('#userPassword').val() !== \"\" || $('#confirmar_nova_senha').val() !== \"\") {\n if ($('#userPassword').val() === $('#confirmar_senha').val()) {\n $('#userPassword').addClass('ok').removeClass('error');\n $('#confirmar_senha').addClass('ok...
[ "0.59407806", "0.56195617", "0.55852216", "0.55099237", "0.53357977", "0.5324582", "0.5299664", "0.52982116", "0.52937835", "0.52117395", "0.5200108", "0.51738626", "0.51136154", "0.5112024", "0.50294715", "0.5009564", "0.4996109", "0.4992658", "0.4978404", "0.4977915", "0.49...
0.5360396
4
1.1 Figure out a way to push the same number as many times as needed for their multiplication to be equal to the predivision number 2. Method 2 run method 1 on division result 3. Method 3 loop the function with changing variable to have it run the next divided result with each iteration until it reaches prime numbers l...
function primeFactorization() { number = document.getElementById("userNumber3").value; console.log(number); divider = []; for (i = 2; i < 100000; i++) { divider.push(i); } var check = [] var factors = [] var count = 0; var findFactors = function(number) { check = [] for (i = 0; i < divider[i]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRemAndPrime(num) {\n if (num !== 1) { /*If Number Is One Thats A End Point Of Recursive*/\n let i = 1;\n while (++i) {\n if (isPrime(i)) {/*Check Prime*/\n let res = num / i;\n if (!isFloat(res)) {/*Result Should Be Whole number*/\n ...
[ "0.7135228", "0.70815295", "0.6968157", "0.68883914", "0.68198824", "0.6724871", "0.6695613", "0.6676559", "0.66569173", "0.6610172", "0.6597644", "0.6536848", "0.6499747", "0.6473513", "0.6463981", "0.64489746", "0.6435807", "0.64106005", "0.6400031", "0.6396219", "0.638905"...
0.6479137
13
callback for when the model is loaded
function gotModel(){ console.log("MobileNet Loaded!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modelLoaded() {\r\n console.log(\"Model loaded\");\r\n}", "function modelLoaded() {\n console.log('Model Loaded!');\n }", "function modelLoaded() {\n console.log('model loaded!');\n}", "function modelLoaded() {\r\n console.log(\"Model loaded successfully!\")\r\n}", "function mo...
[ "0.811952", "0.7900298", "0.7897237", "0.7887253", "0.7846734", "0.7823275", "0.7753004", "0.77306044", "0.77306044", "0.77306044", "0.76796716", "0.7119801", "0.7089166", "0.698795", "0.6932764", "0.6917705", "0.6894293", "0.6887576", "0.679795", "0.67844", "0.67741996", "...
0.6256784
43
Splits the sheet up into (numColsnumRows) images and pastes them as separate layers in a new document.
function splitSheet() { var originalDoc = activeDocument; // Calculate number of sub-images and their dimensions var numLayers = numCols * numRows; var spriteWidth = originalDoc.width / numCols; var spriteHeight = originalDoc.height / numRows; var currentRow = 0; var currentCol = 0; // Crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveImages() {\n var doc = app.activeDocument;\n var imgLocation = doc.path+'/img';\n var imgFolder = new Folder(imgLocation);\n imgFolder.create();\n var expOptions = new ExportOptionsPNG24();\n\n for(var i=0; i<doc.layers.length; i++) doc.layers[i].visible = false;\n\n for(var i=0; i<doc.layers.l...
[ "0.606707", "0.59467477", "0.5719392", "0.56927305", "0.5523215", "0.53584886", "0.53521645", "0.5325415", "0.53226894", "0.5312535", "0.52758867", "0.5242527", "0.5217826", "0.519163", "0.5168853", "0.5166932", "0.5123187", "0.5122569", "0.5109062", "0.5094213", "0.5092718",...
0.7636418
0
Shows/validates the UI dialog box.
function showDialog() { // Create a new dialog box with a single panel var dialog = new Window("dialog", "Sprite Sheet Splitter"); var sizePanel = dialog.add("panel", [0,0,215,180], "Sprite Sheet Size"); // Number of columns var numColsLabel = sizePanel.add("statictext", [25,25,150,35], "Number of columns:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alertUI(title, msg) {\n\t$('#dialog-error-msg').html(msg);\n\t$('#dialog-error').dialog(\n\t\t\t'option', \n\t\t\t'buttons',\n\t\t\t{\n\t\t\t\t\"Accept\": function() { \n\t\t\t\t\t$('#dialog-error').dialog(\"close\"); \n\t\t\t\t}\n\t\t\t}\n\t);\n\t\n\t$('#dialog-error').dialog('option', 'title', title);\n...
[ "0.62892383", "0.61858404", "0.6075093", "0.60479975", "0.6044006", "0.60313", "0.60308325", "0.6008106", "0.6001265", "0.5967212", "0.5964125", "0.5936956", "0.5924765", "0.5913124", "0.5901093", "0.58778214", "0.58748716", "0.58697504", "0.5864517", "0.58375037", "0.5827766...
0.58447397
19
generic function sending messages
function sendMessage(recipientId, message) { requestModule({ url: 'https://graph.facebook.com/v2.6/me/messages', qs: {access_token: PAGE_ACCESS_TOKEN}, method: 'POST', json: { recipient: {id: recipientId}, message: message, } }, function(error, response, body) { if (error) { console.log('Error se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendMessage(){}", "sending () {\n }", "function sendMessages() {\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\targs.forEach(items => {\n\t\t\tif (Array.isArray(items)) {\n\t\t\t\titems.forEach(item => {\n\t\t\t\t\tsendMessage(item);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tsendMessage(it...
[ "0.78996545", "0.723564", "0.7219313", "0.7201873", "0.7152701", "0.7083861", "0.70611143", "0.70611143", "0.70611143", "0.70611143", "0.70506203", "0.70506203", "0.70506203", "0.70506203", "0.70506203", "0.70506203", "0.6948067", "0.6946074", "0.6868756", "0.6839608", "0.677...
0.0
-1
If a button is pushed
buttonClick(ev) { // Get the button using the index var btn = this.props.buttons[ev.currentTarget.dataset.index]; // If there's a callback if(typeof btn.callback == 'function') { btn.callback(btn); } else { this.props.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buttonPressed(button)\n{\n\treturn this.keys[button].isPressed;\n}", "isButtonPressed(button)\n {\n //console.log(this.current[button]);\n return this.current[button];\n }", "function whenButtonPressed(){\n\tconsole.log(\"you pushed button!\");\n}", "function buttonIsPressed(button) ...
[ "0.71665245", "0.71555686", "0.7031462", "0.6975502", "0.6975502", "0.690594", "0.6896714", "0.6657267", "0.6614714", "0.6513615", "0.6499422", "0.64935005", "0.64876556", "0.64562154", "0.6445255", "0.6409039", "0.6365589", "0.635154", "0.6351413", "0.6340708", "0.63364506",...
0.0
-1
Traps ESC key clicks so we can close the Modal window
trapEscape(ev) { if(ev.keyCode === 27) { this.props.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "escCloseModal(event) {\n if (event.keyCode === 27 && this.props.modalActive) {\n this.modalClose();\n }\n }", "_onKey( e ) {\n if ( e.keyCode == 27 ) {\n this.closeModal( e );\n }\n }", "function ESCclose(evt) {\n if (evt.keyCode === 27) {\n const openModalWindow = document.querySel...
[ "0.84290254", "0.8427077", "0.8425417", "0.8265231", "0.82580394", "0.81723785", "0.81053233", "0.80510646", "0.78889537", "0.7866553", "0.77353317", "0.77353317", "0.77347255", "0.7703051", "0.7666658", "0.7587034", "0.757551", "0.75609773", "0.75377864", "0.74618393", "0.74...
0.7717222
13
initiate functions that listen and handle chat event
function initiateChatListenerAndHandler() { // handle client connection event agent_chat.clientConnectionEventHandler({ connectedClient: handleConnectedClient, disconnectedClient: handleDisconnectedClient, handledClient: handleHandledClient // client handled by other ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addChatListeners () {\n this.webSocket.onopen = () => console.log('open channel')\n this.webSocket.addEventListener('open', this.handleSocketConnection)\n this.webSocket.onmessage = (e) => this.handleMessage(JSON.parse(e.data))\n this.form.addEventListener('submit', this.handleSubmit)\n this.emojiIc...
[ "0.7206883", "0.71509326", "0.71299314", "0.7112383", "0.69300866", "0.6897024", "0.6890191", "0.6871033", "0.6825744", "0.67772466", "0.6765803", "0.67648786", "0.6745761", "0.670028", "0.6696484", "0.66655284", "0.6648539", "0.66357833", "0.6622993", "0.66162616", "0.659487...
0.75242937
0
add connected client to chat list
function handleConnectedClient(clients) { let client; if (!is_page_in_view && clients.length > 0) { // play message notification sound sound.play(); } // iterate through the list for (let i = 0; i < clients.length; i++) { client = clients[i];...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushDataToClient() {\n twitchSocket.emit('update client', twitchData);\n }", "addClient(id, nickname){\n\n\t\tlet oldSize = this.clients.size;\n\n\t\tthis.clients.set(id, oldSize);\n\n\t\tthis.clientsNickname.set(id, nickname);\n\n\n\t\tthis.ioSendMessage(\"SERVER\", nickname + \" connected.\");...
[ "0.70585793", "0.69427425", "0.68130034", "0.6732535", "0.671416", "0.6641272", "0.6634294", "0.6607822", "0.65831256", "0.65599227", "0.65399706", "0.647169", "0.6450935", "0.6421501", "0.63740784", "0.6357907", "0.6351571", "0.634786", "0.63358945", "0.6309653", "0.62771803...
0.6937767
2
remove client chatting with another agent from the chat list
function handleHandledClient(clients) { let client; // iterate through the list for (let i = 0; i < clients.length; i++) { client = clients[i]; // client if client exist if (connected_client_list.has(client.chat_id)) { // remove client ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chat_disconnect_client(email_client) {\n obj_client = get_ids_fron_email_given(email_client, \"_\");\n if (obj_client != false && typeof obj_client !== 'undefined') {\n //GET IDS\n console.log((agents_ids_assoc_clients[obj_client.ak]));\n client_id = (agents_ids_assoc_clients[ob...
[ "0.6682779", "0.6645647", "0.65962297", "0.6436293", "0.6436293", "0.64050424", "0.63478976", "0.6335083", "0.63326263", "0.6313565", "0.6269641", "0.62643605", "0.6243073", "0.6222199", "0.62171423", "0.6212551", "0.6193153", "0.6169958", "0.6159335", "0.6101219", "0.6073966...
0.6029832
21
handle tranfered chat request from agent
function handleChatTransferedRequest(requests) { let request; // iterate through the list for (let i = 0; i < requests.length; i++) { request = requests[i]; // set client connection state client_connection_status.set(request.chat_id, ONLINE); //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async handle(text, senderId, chatId) {}", "onSend(messages = []) {\n this.setState(previousState => ({\n messages: GiftedChat.append(previousState.messages, messages)\n }));\n\n let messageText = messages[0].text;\n let messageObj = ChatMessage.createChatMessageFromData(messages[0]);\n this.s...
[ "0.6337304", "0.5908767", "0.59079665", "0.58368427", "0.58338547", "0.57784665", "0.57619584", "0.57508165", "0.57251537", "0.5665279", "0.56586087", "0.56560653", "0.5649537", "0.5638489", "0.563113", "0.56212974", "0.5610458", "0.55941606", "0.5592494", "0.5559661", "0.555...
0.57962686
5
utility function to create new client chat list item
function createClientChatListPanel(client) { let client_picture; // check if client profile picture is set if (client.client.picture == null || /^[ ]*$/.test(client.client.picture)) { client_picture = ""; // set to fall back image } else { client_picture = client...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTransferedChatListPanel(request) {\n let client_picture;\n\n // check if client profile picture is set\n if (request.client.picture == null || /^[ ]*$/.test(request.client.picture)) {\n client_picture = \"\"; // set to fall back image\n } else {\n cl...
[ "0.7221568", "0.6393093", "0.6382925", "0.63565785", "0.63483435", "0.62926435", "0.6285734", "0.6279851", "0.62549275", "0.62132305", "0.6134134", "0.61298114", "0.6121308", "0.6113582", "0.6089573", "0.607363", "0.6068913", "0.60519534", "0.6044511", "0.6039539", "0.6038776...
0.7656533
0
utility function to create new transfered chat list item
function createTransferedChatListPanel(request) { let client_picture; // check if client profile picture is set if (request.client.picture == null || /^[ ]*$/.test(request.client.picture)) { client_picture = ""; // set to fall back image } else { client_picture =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createList(e) {\n for (var i = 0; i < data.messages.length; i++) {\n chattyContent += `<li><button class=\"delete\">Delete</button>\n ${data.messages[i].name}: ${data.messages[i].message}<br></li>`\n document.getElementById(\"putHtmlHere\").innerHTML = chattyContent;\n }\n}", ...
[ "0.6337136", "0.6335558", "0.63214266", "0.6287571", "0.6281499", "0.6268865", "0.6245226", "0.6238032", "0.6234548", "0.6212779", "0.6211635", "0.6171879", "0.613865", "0.6052932", "0.605021", "0.6047518", "0.60377526", "0.6031027", "0.59980327", "0.5994001", "0.5988678", ...
0.7162895
0
remove closed chat transfer request from the list
function handleChatClosedTransferedRequest(requests) { let request; // iterate through the list for (let i = 0; i < requests.length; i++) { request = requests[i]; // remove request connection state client_connection_status.delete(request.chat_id); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n this.sender.remove();\n this.receiver.remove();\n this.session.remove();\n }", "remove(){\n if(this.requests.length <= 1) {\n this.requests = [];\n }\n else {\n this.requests.splice(1);\n }\n }", "function removeFromSende...
[ "0.62743956", "0.6237789", "0.6155312", "0.6042168", "0.5927358", "0.59151787", "0.58392346", "0.5824613", "0.5823446", "0.5819198", "0.5804086", "0.5793804", "0.57417923", "0.5710369", "0.5699748", "0.56760985", "0.5642917", "0.5629392", "0.56187254", "0.5607922", "0.5561451...
0.750931
0
utility function to check if page is currently in view
function pageInView() { let idle_timer; is_page_in_view = true; // listen for mouse focus on page window.addEventListener("focus", (e) => { is_page_in_view = true; }, false); // listen on page blur event window.addEventListener("blur", (e) => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "inView() {\n let page = $(\"#NutritionPage\")[0];\n let offset = $(\"#LandingPage\")[0].getBoundingClientRect().height;\n const top = page.getBoundingClientRect().top;\n return (top + offset) >= 0 && (top - offset) <= window.innerHeight;\n }", "function inMTurkHITPage() {\n try {\n return window...
[ "0.72971797", "0.6672986", "0.6628223", "0.66013974", "0.6565057", "0.6529354", "0.65175307", "0.65015703", "0.6492686", "0.64789957", "0.6473671", "0.6443593", "0.63976365", "0.63975734", "0.6397323", "0.634989", "0.6309666", "0.62278306", "0.6192347", "0.6176427", "0.617362...
0.6565587
4
enable the chat GUI
function enableChatGUI() { // enable chat window let elem = document.querySelector('.chat-window-cont .header-menu-bar .left-menu-section'); elem.setAttribute("class", "left-menu-section"); elem = document.querySelector('.chat-window-cont .chat-text-area-cont .text-area'); elem.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendChatBtn() {\n\t\t\t\tsendLine();\n\t\t\t\tsetVisitorTyping(false);\n\t\t\t}", "function show() {\n Onyx.set(ONYXKEYS.IS_CHAT_SWITCHER_ACTIVE, true);\n}", "function showChat() {\n\tmenuHideAll();\n\t$('#chat').show();\n\tmenuResetColors();\n\tmenuSetColor('chatBox');\n}", "showChat() {\n if...
[ "0.72813255", "0.7189172", "0.70224893", "0.6883856", "0.6583066", "0.6544078", "0.64848584", "0.64495707", "0.6338323", "0.62949294", "0.62884957", "0.62643254", "0.6243932", "0.621555", "0.61666685", "0.6116816", "0.6044255", "0.60300344", "0.60162306", "0.60133946", "0.599...
0.80592024
0
handle and process received message
function processReceivedMessages(messages) { let message_list = chat_messages.get(initiated_chat_id); let message_type = chat_messages_type.get(initiated_chat_id); if (!is_page_in_view && messages.length > 0) { // play message notification sound sound.play(); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleMessage(event) {\r\n\t\t//console.log('Received message: ' + event.data);\r\n\t\tvar data = JSON.parse(event.data);\r\n\t\thandleReceiveData(data);\r\n\t}", "function receivedMessage(event) {\n messageHandler.handleMessage(event);\n }", "function handleMessage(msg) { // process message asy...
[ "0.7464253", "0.7322781", "0.71767265", "0.71762437", "0.71564674", "0.70080507", "0.6958401", "0.693246", "0.6929526", "0.6924037", "0.6879714", "0.6847408", "0.6815456", "0.6812884", "0.68104875", "0.67871195", "0.678651", "0.6779917", "0.67402637", "0.6728125", "0.67056596...
0.0
-1
create client header message box
function createClientHeaderMessageBox(message) { let client_picture; // check if client profile picture is set if (message.sender_profile.picture == null || /^[ ]*$/.test(message.sender_profile.picture)) { client_picture = ""; // set to fall back image } else { c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAgentHeaderMessageBox(message) {\n let agent_picture;\n\n // check if client profile picture is set\n if (message.sender_profile.picture == null || /^[ ]*$/.test(message.sender_profile.picture)) {\n agent_picture = \"\"; // set to fall back image\n } else {\n ...
[ "0.73811364", "0.6495837", "0.64716923", "0.64712524", "0.6370268", "0.62784725", "0.62773746", "0.6260571", "0.6257739", "0.6232541", "0.6208512", "0.6185312", "0.61362916", "0.61337554", "0.6119599", "0.6111458", "0.6099543", "0.6094128", "0.6093257", "0.6082577", "0.607857...
0.7860309
0
create client tail message box
function createClientTailMessageBox(message) { // create message panel let elem = document.createElement("div"); elem.setAttribute("class", "client-tail-msg-cont"); elem.innerHTML = ` <div class="space"></div> <div class="msg-cont"> <p class="msg">...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAgentTailMessageBox(message) {\n // create message panel\n let elem = document.createElement(\"div\");\n elem.setAttribute(\"class\", \"agent-tail-msg-cont\");\n elem.innerHTML = `\n <div class=\"msg-cont\">\n <p class=\"msg\">${message.message}<...
[ "0.6534953", "0.64503413", "0.63258564", "0.6323241", "0.6029443", "0.6011819", "0.5996779", "0.59724396", "0.5969034", "0.5964002", "0.5962749", "0.59219116", "0.5921702", "0.58882284", "0.58654445", "0.58640873", "0.58512515", "0.5801591", "0.5787486", "0.57578695", "0.5751...
0.73679066
0
create agent header message box
function createAgentHeaderMessageBox(message) { let agent_picture; // check if client profile picture is set if (message.sender_profile.picture == null || /^[ ]*$/.test(message.sender_profile.picture)) { agent_picture = ""; // set to fall back image } else { agen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createClientHeaderMessageBox(message) {\n let client_picture;\n\n // check if client profile picture is set\n if (message.sender_profile.picture == null || /^[ ]*$/.test(message.sender_profile.picture)) {\n client_picture = \"\"; // set to fall back image\n } else {\...
[ "0.6735376", "0.6406344", "0.6324865", "0.6240491", "0.62325495", "0.6223821", "0.62130916", "0.6213056", "0.6111245", "0.6058906", "0.5995824", "0.59902203", "0.59793526", "0.59648293", "0.59531343", "0.59492326", "0.5854447", "0.5846747", "0.5844826", "0.5832267", "0.582710...
0.78760517
0
create agent tail message box
function createAgentTailMessageBox(message) { // create message panel let elem = document.createElement("div"); elem.setAttribute("class", "agent-tail-msg-cont"); elem.innerHTML = ` <div class="msg-cont"> <p class="msg">${message.message}</p> </div...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createClientTailMessageBox(message) {\n // create message panel\n let elem = document.createElement(\"div\");\n elem.setAttribute(\"class\", \"client-tail-msg-cont\");\n elem.innerHTML = `\n <div class=\"space\"></div>\n <div class=\"msg-cont\">\n ...
[ "0.6643066", "0.6159655", "0.60072184", "0.5973365", "0.5783945", "0.5741962", "0.5712237", "0.5707628", "0.5703556", "0.56945956", "0.56898075", "0.568362", "0.56830204", "0.56773114", "0.5648143", "0.56426007", "0.55867547", "0.5583355", "0.5578409", "0.55623126", "0.555465...
0.7257687
0
adapt page content container to window size
function adaptPagePanels() { adaptChatListPanel(); adaptChatMsgPanel(); adaptUserInfoPanel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSizeForPages(){\n var screen_height=$(window).height();\n $(\".fullPage\").css({\n \"position\":\"relative\",\n \"height\":screen_height+\"px\",\n \"width\":\"100%\",\n });\n $(\".fullPage-Container\").css({\n \"width\":\"100%\",\n \"position\":\"r...
[ "0.71469945", "0.69893384", "0.6796134", "0.66606236", "0.66337097", "0.66005707", "0.65883136", "0.658362", "0.6569168", "0.6541964", "0.65319675", "0.65319675", "0.65319675", "0.65319675", "0.65319675", "0.6525467", "0.65226734", "0.6522383", "0.6505931", "0.64850193", "0.6...
0.0
-1
adapt chat list container to screen
function adaptChatListPanel() { let list_panel = document.querySelector('.chat-list-scroll-cont'); let panel_offset = window.getElementOffset(list_panel); // set panel height list_panel.setAttribute("style", "height: " + (window.innerHeight - panel_offset.top) + "px;"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Displaychat(name,dnt,usr_msg) {\n var user_name = $('<div class=\"username\">').text(name);\n var date_time = $('<div class=\"timestamp\">').text(dnt);\n var user_msg = $('<div class=\"usermessage\">').text(usr_msg);\n \n $('#messages')\n .append($('<li>')\n .append(user_name)\n .append(date...
[ "0.6734757", "0.6641846", "0.6628097", "0.6617689", "0.66156256", "0.6598428", "0.6590081", "0.6585375", "0.65584236", "0.6557408", "0.6488942", "0.6425515", "0.63850677", "0.63377225", "0.6314879", "0.6314879", "0.6309619", "0.6293428", "0.62841", "0.6232195", "0.6181039", ...
0.6899634
0
adapt the chat messages panel to occupy as much space available
function adaptChatMsgPanel() { let chat_msg_panel = document.querySelector('.chat-window-cont .chat-msg-cont'); let send_msg_panel = document.querySelector('.chat-window-cont .send-msg-cont'); let chat_msg_panel_offset = window.getElementOffset(chat_msg_panel); let send_msg_panel_height ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizeChatConversation() {\n // FIXME: this function can all be done with CSS. If Chat is ever rewritten,\n // do not copy over this logic.\n const msgareaHeight = $('#usermsg').outerHeight();\n const chatspace = $(`#${CHAT_CONTAINER_ID}`);\n const width = chatspace.width();\n const chat...
[ "0.7321264", "0.71779794", "0.7030461", "0.69520825", "0.676121", "0.66134876", "0.66064787", "0.6571262", "0.6449396", "0.6443185", "0.633267", "0.6317571", "0.6308388", "0.6283827", "0.62576234", "0.6241609", "0.62376434", "0.6206215", "0.6198711", "0.61931837", "0.61883944...
0.7760362
0
adapt the user's information panel to screen
function adaptUserInfoPanel() { let user_info_panel = document.querySelector('.chat-user-info-cont .user-info-scroll-wrapper'); let panel_offset = window.getElementOffset(user_info_panel); // set panel height user_info_panel.setAttribute("style", "height: " + (window.innerHeight - panel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showUserInformation(user){\n setSideBar(user)\n setLists(user)\n}", "function showInfo() {\n $('#user-name').text(curUser.first_name + ' ' + curUser.last_name);\n $('#first-name').text(curUser.first_name);\n $('#last-name').text(curUser.last_name);\n $('#email').text(cu...
[ "0.7066512", "0.70359296", "0.6795004", "0.6780254", "0.66289043", "0.6613052", "0.6571274", "0.64886457", "0.6481991", "0.64682484", "0.64651763", "0.6441294", "0.6425161", "0.6358329", "0.63476235", "0.6288208", "0.6285598", "0.6280395", "0.6273199", "0.6231764", "0.6225861...
0.62605196
19
show and hide text area placeholder
function textAreaPlaceholder(e) { let code = e.keyCode || e.which; if (placeholder_toggle && /^.$/.test(e.key)) { placeholder_toggle = false; chat_text_area_placeholder.setAttribute("style", "display: none;"); } else if (!placeholder_toggle && (code == 8 || e.key == "Ba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_showHidePlaceholder() {\n\t\tshowHide(this._exported.placeholder, !this._value);\n\t}", "function placeholder(inputDom, inputLabel) {\n inputDom.on('input', function () {\n if (inputDom.val() === '') {\n inputLabel.css( 'visibility', 'visible' );\n } else {\n inputLabel.cs...
[ "0.7848248", "0.7241106", "0.7210506", "0.7147825", "0.7135576", "0.6975123", "0.6975123", "0.6975123", "0.68567866", "0.68336153", "0.68062073", "0.67503", "0.6726296", "0.6726296", "0.6717586", "0.6717586", "0.67050874", "0.66763157", "0.655909", "0.6550939", "0.6514054", ...
0.7318503
1
show message on enter key press
function sendMessageOnEnterKeyPress(e) { let code = e.keyCode || e.which; // check if use press only enter key if (!e.shiftKey && (code == 13 || e.key == "Enter")) { e.preventDefault(); // pass to function that will run the process if (chat_text_area.innerTe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ifEnterKey () {\n\tif (event.which === 13) {\n\t\tconsole.log(\">User Hit ENTER\");\n\t\tvalidateInput();\n\t}\n}", "function buttonEnter() {\n\t\tdocument.onkeydown = function (e) {\n\t\t\te = e || window.event;\n\t\t\tif (e.keyCode === 13)\n\t\t\t\talert(\"you press enter!\")\n\t\t};\n\t}", "functio...
[ "0.7799543", "0.77592874", "0.77562755", "0.77368295", "0.77154857", "0.76947033", "0.76565033", "0.76146406", "0.76022726", "0.7600308", "0.7599426", "0.75357604", "0.7504332", "0.74830836", "0.74511", "0.7448481", "0.7444278", "0.74227977", "0.73905957", "0.7356967", "0.735...
0.68778783
79
send message to client
function processSendMessage() { // check to send message if (client_connection_status.get(current_chat_id) != CONNECTED) { return; } let current_time = (new Date()).getTime() / 1000; // time in seconds since epoch time client_curr_sent_msg_time = current_time; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendMessage(msg){\n this.socket.emit(\"client\", msg);\n }", "send_message(message) {\n this.socket.send(message)\n }", "function sendMessage(client, str) {\n client.send(str);\n}", "function sendMessage(message){\n\t\tconsole.log('Client sending vr_message: ', message);\n\t\tsocket.emit...
[ "0.788258", "0.78739315", "0.77028096", "0.76380473", "0.7579702", "0.7554782", "0.74854594", "0.7436122", "0.74331343", "0.742365", "0.742365", "0.74204797", "0.7397996", "0.7364623", "0.73541844", "0.735055", "0.73238903", "0.7316244", "0.7316244", "0.7314488", "0.73033863"...
0.0
-1
load user's chat session and information
function loadClientChatSessionAndInfo(chat_id) { let client_info = connected_client_list.get(chat_id); // get client info let connection_status = client_connection_status.get(chat_id); // update client connection status let elem = document.getElementById("indicator-" + chat_id); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initChatRoom() {\n // get chat room object from sessionStorage\n var chatRoomObj = JSON.parse(window.sessionStorage.getItem(\"chatRoom\"));\n\n for (let user of chatRoomObj.usersList) {\n // append new user diaglog block to chat room\n $(\"#chat-room-users\").append(Mustache.render(chatRoomUsersT...
[ "0.6913237", "0.6504275", "0.6477468", "0.64109564", "0.6392808", "0.6289701", "0.6245653", "0.62202805", "0.610726", "0.6098737", "0.60866016", "0.60625494", "0.6040591", "0.6024978", "0.6008803", "0.6005834", "0.59356594", "0.5926761", "0.5922767", "0.59219635", "0.5904309"...
0.7747516
0
show drop down menu
function showDropDownMenu(menu_id) { // check if menu has been close already if (closed_active_drop_menu[menu_id]) { closed_active_drop_menu[menu_id] = false; return; } let menu = document.querySelector('#' + menu_id); // check if there is active drop do...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function desplegar() {\n document.getElementById(\"dropdown\").style.display = \"block\";\n}", "function showOptions() {\n\tmenuHideAll();\n\t$('#options').show();\n\tmenuResetColors();\n\tmenuSetColor('optionsBox');\n}", "function firstLevel() {\n $(\"#drop1\").show()\n //document.getElementById(\"dr...
[ "0.7324513", "0.70414484", "0.6998864", "0.6984031", "0.6924162", "0.69005775", "0.6870229", "0.68367594", "0.681102", "0.67591107", "0.67466414", "0.67392814", "0.6735341", "0.6724608", "0.66874284", "0.6641901", "0.66358775", "0.66315347", "0.6627102", "0.6585136", "0.65643...
0.6295421
58
close active drop down menu
function closeDropDownMenu(e) { if (active_drop_menu != null) { let bounding_rect = active_drop_menu.getBoundingClientRect(); let click_x = e.clientX; let click_y = e.clientY; let input_x = bounding_rect.left; let input_y = bounding_rect.top; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_closeDropDown () {\n this._mainDropDownActive = false\n this._sizeDropDownActive = false\n this._containerHeader.querySelector('.dropdown-sub1-content').style.display = 'none'\n this._containerHeader.querySelector('.dropdown-content').style.display = 'none'\n }", "function closemenu() {\n mc...
[ "0.76909995", "0.7503064", "0.74416953", "0.7368907", "0.72520214", "0.7236697", "0.720884", "0.7151274", "0.7127608", "0.7122984", "0.7111057", "0.7090899", "0.70903516", "0.7065211", "0.7055123", "0.7045643", "0.7029703", "0.70183307", "0.70076585", "0.69985706", "0.6964958...
0.6794209
29
retrieves access token from page hash for use after user is redirected after logging in
function getAccessToken(){ var url = window.location.hash; // get full page url var access_token = url.substring(url.indexOf("#")+14, url.indexOf("&")); // get access token from hash console.log("access_token: " + access_token); return(access_token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAccessToken() {\n if (this.accessToken) {\n localStorage.setItem('access_token', this.accessToken);\n return this.accessToken;\n } else if (window.location.href.match(/access_token=([^&]*)/)) {\n // If no authorization token already saved, this function tries to obtain token from URL.\n ...
[ "0.6939256", "0.6936996", "0.68250775", "0.67741007", "0.6690779", "0.6685678", "0.6668134", "0.66184515", "0.6608659", "0.6588499", "0.6540562", "0.6495096", "0.6426253", "0.6404877", "0.6385445", "0.629782", "0.62207216", "0.6167297", "0.61338323", "0.6114541", "0.6054694",...
0.80424213
0
generic load image function returns deferred promise once image is loaded
function loadImg(src){ var deferred = $.Deferred(); var img = new Image(); img.onload = function(){ deferred.resolve(); }; img.crossOrigin = "anonymous"; img.src = src; coverImgs.push(img); return deferred.promise(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_image(src) {\n var $img = $(new Image()),\n dfd = $.Deferred();\n\n // hide image while loading\n $img.css(\"opacity\", 0)\n .addClass(\"hidden-image\");\n\n // load event\n $img.on(\"load\", function(e) {\n dfd.resolve($img);\n e.preventDefault();\n...
[ "0.74275136", "0.74111146", "0.73059505", "0.7232333", "0.7085883", "0.70168877", "0.7013185", "0.70014167", "0.68954325", "0.6835995", "0.6818856", "0.67848283", "0.67809874", "0.67729074", "0.67700243", "0.67623913", "0.6745608", "0.6730033", "0.6670537", "0.662459", "0.659...
0.7173327
4
draws images to canvas calls loadImg to load images
function drawToCanvas(coverURLs){ var myCanvas = document.createElement('canvas'); myCanvas.width = 1920; myCanvas.height = 1080; var ctx = myCanvas.getContext('2d'); var loaders = []; //loads first 510 cover images //loads all of them if less than 510 total for (i=0;i<Math.min(510, coverURLs.length);i+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawCanvas() {\n if( drawio.loadedIMG != ''){\n drawio.ctx.drawImage(drawio.loadedIMG, 0, 0);\n }\n for( var i = 0; i < drawio.shapes.length; i++) {\n drawio.shapes[i].render();\n }\n if(drawio.selectedElement) {\n drawio.selectedElement....
[ "0.70117146", "0.6958363", "0.6941396", "0.692658", "0.6826974", "0.672059", "0.6719769", "0.6609865", "0.6600691", "0.6501281", "0.6489905", "0.6484573", "0.64827", "0.64778566", "0.64765656", "0.64719564", "0.64719564", "0.6466044", "0.6453502", "0.6407435", "0.63795996", ...
0.6463883
18
URL parsing URL hash pattern [zoom]/[lat]/[lng]
function getValuesFromUrl() { var url_hash = window.location.hash.slice(1, window.location.hash.length).split('/'); if (url_hash.length < 3 || parseFloat(url_hash[0]) === 'number') { url_hash = false; } return url_hash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseUrl() {\n var hash = window.location.hash.substr(1),\n rez = hash.split(\"-\"),\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\n gallery = rez.join(\"-\");\n\n return {\n hash: hash,\n ...
[ "0.682552", "0.6820726", "0.6820726", "0.6793653", "0.6793653", "0.6793653", "0.67825246", "0.67556787", "0.67456484", "0.67456484", "0.67456484", "0.67456484", "0.66136044", "0.63652796", "0.6281998", "0.6261318", "0.60243106", "0.5928545", "0.58794725", "0.5849245", "0.5799...
0.5802721
20
You can extend webpack config here
extend(/* config, ctx */) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend (config, { isDev, isClient }) {\n // if (isDev && isClient) {\n // config.module.rules.push({\n // enforce: 'pre',\n // test: /\\.(js|vue)$/,\n // loader: 'eslint-loader',\n // exclude: /(node_modules)/\n // })\n // }\n if (process.server && p...
[ "0.75780183", "0.7486256", "0.74535376", "0.7388344", "0.73616195", "0.72877634", "0.7282417", "0.7211369", "0.71547335", "0.7107632", "0.70970905", "0.7090317", "0.7045734", "0.7035934", "0.70036227", "0.699704", "0.69930667", "0.6985959", "0.69833404", "0.6973784", "0.69592...
0.0
-1
Gets the current cursor position.
getCursorPosition() { const _pos = this.editor.selection.active; return new mte_kernel_1.Point(_pos.line, _pos.character); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCursorPosition() {\n return this.cursorPosition;\n }", "GetCursorStartPos()\n {\n let win = this.getCurrentWindowRead();\n return Vec2.Subtract(win.DC.CursorStartPos, win.Pos);\n }", "GetCursorPos()\n {\n let win = this.getCurrentWindowRead();\n return new Vec2...
[ "0.7782795", "0.77324986", "0.76918656", "0.7582445", "0.74533445", "0.7434824", "0.73665804", "0.73436993", "0.7231691", "0.72142184", "0.7199327", "0.71180475", "0.70108056", "0.6988987", "0.6946305", "0.6917664", "0.6895028", "0.68269145", "0.67557615", "0.67494535", "0.67...
0.7783623
0
Sets the cursor position to a specified one.
setCursorPosition(pos) { const _pos = new vscode.Position(pos.row, pos.column); // look for better implementation setTimeout(() => { this.editor.selection = new vscode.Selection(_pos, _pos); }, 1, 'setCursorPosition'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set_cursor_pos(x,y) {\n\t\tif (!(check_digit(x,this.max) && check_digit(y,this.max)))\n\t\t\treturn\n\t\tthis.cursor_pos[0] = x;\n\t\tthis.cursor_pos[1] = y;\n\t\tthis.updateCursorPos();\n\t}", "function setCursor(x, y, select){\n cursor.x = x\n cursor.y = y\n cursor.selected = select\n display.setCu...
[ "0.74518514", "0.71187377", "0.7090185", "0.703587", "0.6874696", "0.68644595", "0.6787958", "0.67652774", "0.66554046", "0.6636559", "0.6614682", "0.6614682", "0.6576627", "0.657229", "0.6536809", "0.6534371", "0.6528913", "0.65233773", "0.64874285", "0.64799356", "0.6466136...
0.73708534
1
Sets the selection range. This method also expects the cursor position to be moved as the end of the selection range.
setSelectionRange(range) { this.editor.selection = new vscode.Selection(range.start.row, range.start.column, range.end.row, range.end.column); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSelectionRange( rangeStart, rangeEnd )\n {\n // Check which way we need to define the text range.\n if( this.createTextRange )\n {\n var range = this.createTextRange();\n range.collapse( true );\n range.moveStart( 'character',\trangeStart );\n ...
[ "0.7366626", "0.73291516", "0.73291516", "0.72617143", "0.7233063", "0.6923028", "0.68932843", "0.68932843", "0.68932843", "0.6778366", "0.66871446", "0.66164964", "0.649941", "0.6487668", "0.64463764", "0.6432936", "0.6419544", "0.64082223", "0.6392068", "0.6330683", "0.6307...
0.7328749
3
Gets the last row index of the text editor.
getLastRow() { const lastRow = this.editor.document.lineCount - 1; return lastRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getLastEndPosition() {\n\t\t\tconst {overrides} = this.impl;\n\t\t\tif (overrides !== undefined) {\n\t\t\t\treturn overrides.getLastEndPosition(this);\n\t\t\t}\n\n\t\t\treturn this.getPositionFromIndex(this.prevToken.end);\n\t\t}", "Last() {\n if (this.CanLast()) {\n this.Position = this.fRows....
[ "0.67103547", "0.6670137", "0.65987957", "0.65035945", "0.64823365", "0.64304775", "0.63728553", "0.6283852", "0.6160331", "0.61196864", "0.6100011", "0.6024829", "0.59399563", "0.5933942", "0.59295833", "0.5887898", "0.5887898", "0.58520067", "0.5835179", "0.58306", "0.58299...
0.8176667
0
Checks if the editor accepts a table at a row to be editted. It should return false if, for example, the row is in a code block (not Markdown).
acceptsTableEdit(row) { const lastRow = this.getLastRow(); if (row > lastRow) { return false; } const line = this.editor.document.lineAt(row).text.trimLeft(); if (line.startsWith('|')) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IsInTable() {\n var editor = GetCurrentEditor();\n try {\n var flags = editor.flags;\n return (\n IsHTMLEditor() &&\n !(flags & Ci.nsIEditor.eEditorReadonlyMask) &&\n IsEditingRenderedHTML() &&\n null != editor.getElementOrParentByTagName(\"table\", null)\n );\n } catch (e)...
[ "0.73438984", "0.6819034", "0.6548569", "0.6531256", "0.6259026", "0.6007555", "0.59843504", "0.5928904", "0.58985007", "0.5888171", "0.586043", "0.5798022", "0.5792709", "0.5771244", "0.56972736", "0.5695539", "0.5689012", "0.5673649", "0.5665336", "0.56590605", "0.56587875"...
0.82909584
0
Sets the selection range. This method also expects the cursor position to be moved as the end of the selection range.
getLine(row) { const lastRow = this.getLastRow(); if (row > lastRow) { return ""; } return this.editor.document.lineAt(row).text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSelectionRange( rangeStart, rangeEnd )\n {\n // Check which way we need to define the text range.\n if( this.createTextRange )\n {\n var range = this.createTextRange();\n range.collapse( true );\n range.moveStart( 'character',\trangeStart );\n ...
[ "0.73677146", "0.7330043", "0.732973", "0.732973", "0.7262375", "0.72337914", "0.6923693", "0.68938214", "0.68938214", "0.68938214", "0.67789996", "0.668847", "0.6616921", "0.6499567", "0.64886683", "0.64452153", "0.64315116", "0.64197326", "0.6408911", "0.639301", "0.6331831...
0.0
-1
Inserts a line at a specified row.
insertLine(row, line) { if (!this.transaction || !this.editBuilder) { return; } const lastRow = this.getLastRow(); if (/^([|]\s+)+[|]$/.test(line)) { // enter a new row const _pos = this.editor.selection.active; if (this.acceptsTableEdit(ro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertRow(table, line, lineNb, statement)\n{\n var row = table.insertRow(table.rows.length);\n\n // Statement\n cell = row.insertCell(0);\n cell.className = \"cellitem\";\n stat = document.createTextNode(line[1] + \" \" + line[2] + \" \" + line[3]);\n cell.appendChild(stat);\n\n // Actions\n cell ...
[ "0.692648", "0.6804297", "0.66730106", "0.6570549", "0.6399763", "0.6345344", "0.6261979", "0.62022287", "0.60719746", "0.59785575", "0.5966915", "0.59033465", "0.58948207", "0.5846897", "0.58305293", "0.57878107", "0.5779046", "0.5758822", "0.56666636", "0.5652549", "0.56333...
0.7968157
0
Deletes a line at a specified row.
deleteLine(row) { if (!this.transaction || !this.editBuilder) { return; } const lastRow = this.getLastRow(); if (row > lastRow) { return; } const line = this.editor.document.lineAt(row); const _range = line.range; this.editBuilder.d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DeleteLine(arg) {\n var row = $(arg.target).closest(\"tr\");\n row.remove();\n _this.RefreshSummary();\n }", "function removeRow(table, rowNum) {\n table.deleteRow(rowNum);\n}", "function deleteLine() {\n dataBoard.forEach(function(y, index){\n\n // If all of cells...
[ "0.7462648", "0.67661726", "0.6761213", "0.67494136", "0.6746865", "0.6739515", "0.67189854", "0.6587308", "0.6502371", "0.64792126", "0.6466887", "0.6465208", "0.6462409", "0.6449003", "0.640506", "0.63864964", "0.6369849", "0.6341094", "0.6340612", "0.6328937", "0.6300693",...
0.82705563
0
Replace lines in a specified range.
replaceLines(startRow, endRow, lines) { if (!this.transaction || !this.editBuilder) { return; } const _range = new vscode.Range(new vscode.Position(startRow, 0), new vscode.Position(endRow, 0)); const trimedLines = lines.map(line => line.trimRight()); this.editBuilder...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replaceRange(value, start, end) {\n\t\t\tvar byteAnchor = context.byteAnchor,\n\t\t\t\tbytePos = context.bytePos;\n\n\t\t\tcontext.anchor = start;\n\t\t\tcontext.pos = end;\n\t\t\t\n\t\t\tif (value == \"\\t\") {\n\t\t\t\tcommandInsertTab();\n\t\t\t} else {\n\t\t\t\tcontext.selection = value;\n\t\t\t}\n\n\...
[ "0.65757656", "0.6528678", "0.62237304", "0.5976223", "0.5976223", "0.5963371", "0.5963371", "0.5963371", "0.5963371", "0.5937634", "0.5937634", "0.5937634", "0.59033877", "0.58761644", "0.5871285", "0.5816484", "0.58028406", "0.57931256", "0.5727122", "0.56639737", "0.561613...
0.70132095
0
Returns true if d has values for any of the keys in metricIds, false otherwise. Used in filter to keep only dates that have a selected metric.
function hasMetricValues(d, metricIds) { for (let i = 0; i < metricIds.length; i++) { if (d[metricIds[i]]) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasCertainKey(arr, key) {\n return arr.every(function(val) {\n return key in val;\n })\n}", "function isFiltered(qnodeId) {\n let filtered = false;\n if (filterKeys[qnodeId]) {\n // goes through the filterkeys until it finds one that is false\n filtered = Object.keys(filterK...
[ "0.51323915", "0.5128913", "0.5075755", "0.50025326", "0.49848762", "0.498365", "0.49822178", "0.49807113", "0.49436954", "0.49259582", "0.48882103", "0.4883576", "0.48355618", "0.48218057", "0.4754896", "0.47537008", "0.47340634", "0.47008866", "0.46844643", "0.46844643", "0...
0.8604244
0
Custom hook to get the previous value
function usePrevious(value) { const ref = useRef(); useEffect(() => { ref.current = value; }); return ref.current; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prev() {\n setValue(()=>{\n return checkValue(value-1)\n })\n }", "static usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n }", "prevValue() {\n let value = this.get...
[ "0.78823817", "0.7183721", "0.71394336", "0.7047467", "0.6843123", "0.6833979", "0.68145114", "0.67686456", "0.6750945", "0.6740668", "0.670177", "0.670177", "0.66926724", "0.6682209", "0.6545085", "0.6513693", "0.6513693", "0.64201033", "0.6329809", "0.6324492", "0.6257023",...
0.6787312
9
divClicked(id) is called when a naviagtion bar item is clicked
function divClicked(id) { // Set all divs to off document.getElementById("navBarItem1").style.backgroundColor = "transparent"; document.getElementById("arrow1").style.visibility = "hidden"; document.getElementById("navBarItem2").style.backgroundColor = "transparent"; document.getElementById("arrow2").style.visib...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NavBar_Item_Click(event)\n{\n\t//get html\n\tvar html = Browser_GetEventSourceElement(event);\n\t//this a sub component?\n\tif (html.Style_Parent)\n\t{\n\t\t//use the parent\n\t\thtml = html.Style_Parent;\n\t}\n\t//valid?\n\tif (html && html.Action_Parent && !html.IsSelected || __DESIGNER_CONTROLLER)\n\t{...
[ "0.6659069", "0.65906954", "0.65906954", "0.64950913", "0.64025754", "0.6288841", "0.6254617", "0.61867565", "0.61539656", "0.61098844", "0.608917", "0.6087756", "0.60676575", "0.6054455", "0.6023738", "0.6007278", "0.59961355", "0.59903824", "0.5966711", "0.5952576", "0.5951...
0.73246515
0
changeSettingsPane(id) is called when a settings page will be changed
function changeSettingsPane(id) { // Turn all divs off document.getElementById("generalSettingsDiv").style.display = "none"; document.getElementById("wordsSettingsDiv").style.display = "none"; document.getElementById("pagesSettingsDiv").style.display = "none"; // Turn selected div on document.getElementById(id)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSettingsPageUpdated(tabId, changeInfo, tab) {\n if (changeInfo.title !== 'Pywalfox Settings') {\n setSettingsPageClosed();\n }\n}", "function showSettingsPane() {\n //only show the settings pane\n $('#loginPane').hide();\n // hide the main screen\n $('#mainScreen').css('displa...
[ "0.6582425", "0.6348752", "0.61971426", "0.61276793", "0.6125437", "0.60923666", "0.6081174", "0.60250676", "0.59490025", "0.5919484", "0.5913735", "0.5897512", "0.58871585", "0.58819073", "0.5879969", "0.5878036", "0.5813758", "0.5769677", "0.57450193", "0.57405883", "0.5707...
0.8170412
0
reloadWordsAndPages() refreshes the words list
function reloadWordsAndPages() { // Clear all words var wordListDivChildren = document.getElementById("wordListingDiv").children document.getElementById("wordListingDiv").innerHTML = "" // Clear all pages var pageListDivChildren = document.getElementById("pageListingDiv").children document.getElementById("pageL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadWords() {\n clearWordsContainerFirst();\n var randomWords = shuffle(basicEnglishWords);\n generateWordsInsideContainer(randomWords);\n reloadCurrentLetter();\n setupWordsParentHeight(visibleLines);\n}", "function loadingWords() {\n $.ajax({\n type: \"GET\",\n dataTy...
[ "0.6829918", "0.63626665", "0.62756836", "0.61690515", "0.5948929", "0.5938953", "0.59372187", "0.5918245", "0.5899894", "0.5876463", "0.5834406", "0.5832594", "0.5815628", "0.5808693", "0.58029306", "0.5798158", "0.57744926", "0.57584333", "0.57299966", "0.56838584", "0.5671...
0.8015534
0
createContentCell(content, parentDiv) creates a cell for either to word or page divs
function createContentCell(content, parentDiv) { // Create main cell body var mainDiv = document.createElement("DIV"); mainDiv.style.width = "90%"; mainDiv.style.padding = "10px"; mainDiv.style.marginRight = "auto"; mainDiv.style.marginLeft = "auto"; mainDiv.style.marginTop = "20px"; mainDiv.styl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPageCell(word) {\n\n\tcreateContentCell(word, \"pageListingDiv\");\n\n}", "function render ( cellType, content, rowToAddChildTo ) {\n var cell = document.createElement( cellType );\n cell.innerText = content;\n\trowToAddChildTo.appendChild( cell );\n}", "function createWordCell(word) {\n\n...
[ "0.6880685", "0.67643374", "0.65729666", "0.65548205", "0.6443898", "0.6110865", "0.6078738", "0.60385334", "0.59978896", "0.59935904", "0.5969427", "0.5964048", "0.57991654", "0.5742391", "0.571587", "0.56392187", "0.5606564", "0.5602084", "0.56011856", "0.5511097", "0.54471...
0.83069867
0
createWordCell(word) will create a cell for the word div
function createWordCell(word) { createContentCell(word, "wordListingDiv"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPageCell(word) {\n\n\tcreateContentCell(word, \"pageListingDiv\");\n\n}", "function createCell(cell, text, style) {\n var div = document.createElement('div'), // create DIV element\n txt = document.createTextNode(text); // create text node\n div.appendChild(txt); //...
[ "0.787656", "0.6908053", "0.68700933", "0.6795628", "0.6719547", "0.6658559", "0.65325385", "0.63404083", "0.6337404", "0.6327101", "0.6325779", "0.6319257", "0.6283124", "0.627111", "0.6247027", "0.62335026", "0.6213106", "0.6207351", "0.6187332", "0.61347824", "0.6134662", ...
0.91375256
0
createPageCell(word) will create a cell for the page div
function createPageCell(word) { createContentCell(word, "pageListingDiv"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWordCell(word) {\n\n\tcreateContentCell(word, \"wordListingDiv\");\n\n}", "function createCell(cell, text, style) {\n var div = document.createElement('div'), // create DIV element\n txt = document.createTextNode(text); // create text node\n div.appendChild(txt); //...
[ "0.829273", "0.6512003", "0.64000374", "0.6286204", "0.62389857", "0.61393183", "0.6099054", "0.59784126", "0.59681916", "0.59582543", "0.5930868", "0.5916171", "0.58677024", "0.575908", "0.57380134", "0.572353", "0.5697805", "0.56885564", "0.5687868", "0.56852245", "0.567829...
0.909843
0
initialise() is called to initialise the page
function initialise() { chrome.storage.local.get({ words: [], pages: [], defaultWord: false, customWords: true, imageSensoring: true }, function(items) { // Set local variables to the stored values wordArray = items.words; pagesArray = items.pages; // Loop thorugh all words for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initPage()\n\t{\n\t\tinitGlobalVars();\n\t\tinitDOM();\n\t\tinitEvents();\n\t}", "function initialise() {\n mainMenu();\n\n initialisePage();\n}", "function initialisePage(){\n\t\t\tcurrent_tab = \"about\";\n\t\t\tgenerateNav(register_navevents);\n\t\t\tgenerateFramework(current_tab, generatePag...
[ "0.8193542", "0.80585754", "0.7945139", "0.79176146", "0.7628818", "0.7624509", "0.7555198", "0.7551974", "0.74891317", "0.7485037", "0.7417229", "0.74026126", "0.7336549", "0.73084813", "0.7304944", "0.72797275", "0.727792", "0.7251841", "0.72485733", "0.7217017", "0.7215913...
0.0
-1
saveSettings() is called when items have been changed and need saving to local storage
function saveSettings() { chrome.storage.local.set({ words: wordArray, pages: pagesArray }, function() { //********************************** // OPTIONS SAVED INTO LOCAL STORAGE //********************************** }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static save(settings) { window.localStorage.setItem('settings', JSON.stringify(settings)); }", "function commitSettings() {\n console.log(\"Save settings: \"+JSON.stringify(settings));\n localStorage.settings = JSON.stringify(settings);\n}", "function saveToStorage(){\n\tchrome.storage.sync.set(settings);\n}...
[ "0.8068073", "0.8017266", "0.77671826", "0.76726633", "0.76652336", "0.7646224", "0.7634177", "0.7633394", "0.76142275", "0.7611486", "0.7511426", "0.74773467", "0.7462773", "0.7395305", "0.7386269", "0.73835295", "0.73372304", "0.7330093", "0.73293287", "0.7323995", "0.73080...
0.7187214
28
wordAdd() is called when a new word needs to be added
function wordAdd() { // Prompt user for word var word = prompt("What word would you like to add?"); // Check word length while (word.trim().length < 1) { // Remprompt user for word word = prompt("What word would you like to add?"); } // Ensure word does not exist if (wordArray.indexOf(word) >= 0) {} els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addWords(words) {}", "'word.add'(val) {\n Vocabruary.insert(val);\n }", "add(name) {\n name = WordList.formatWord(name); // Format the word prior to any handling\n if (!this.list.has(name) && name != \"\") {\n // Generate button HTML\n let id = WordList.createId(name);\n ...
[ "0.8012812", "0.79224664", "0.77170557", "0.7459887", "0.74554527", "0.74430454", "0.74168354", "0.72963846", "0.7269155", "0.7237069", "0.72296447", "0.7125175", "0.7104045", "0.7032034", "0.7028621", "0.7006066", "0.69987994", "0.6973807", "0.6922732", "0.68578434", "0.6835...
0.7299066
7
enableOrDisableDefaultWords() is called when the default words switch is toggled
function enableOrDisableDefaultWords() { // Check the state of the switch if (document.getElementById('generalSettings1').checked) { //************** // SWITCH IS ON //************** // Apply default words wordArray.push.apply(wordArray, defaultWords); } else { //*************** // SWITCH IS OFF...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchDefaultSet(){\n if(this.checked){\n settingsDisables.forEach(function(element){\n element.disabled = true;\n });\n }\n else{\n settingsDisables.forEach(function(element){\n element.disabled = false;\n });\n }\n}", "toggleDefinition() {\...
[ "0.60045785", "0.5967043", "0.59072447", "0.57933646", "0.5672463", "0.5605584", "0.5582998", "0.5582611", "0.55592936", "0.5483727", "0.5474617", "0.5469455", "0.54544854", "0.5414408", "0.53974557", "0.53965884", "0.53572845", "0.5352105", "0.53357375", "0.53168666", "0.531...
0.85477346
0
switchChanged() is called when a switch changes state
function switchChanged() { // Access switch var defaultWord = document.getElementById("generalSettings1").checked var imageSensoring = document.getElementById("generalSettings2").checked // Store state of switch chrome.storage.local.set({ defaultWord: defaultWord, imageSensoring: imageSensoring }, f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onSwitch() {}", "onSwitch() {}", "onSwitch() {}", "function handleSwitch() {\n setswitchst(prev=>!prev);\n }", "function switchOn() {\n setSwitchToggled(!switchToggled);\n }", "switch(state) {\n switch(state) {\n case LightButton.ON:\n case LightButton.OFF:\n // same state w...
[ "0.7610818", "0.7610818", "0.7610818", "0.7575771", "0.71279746", "0.7080074", "0.7049854", "0.68249416", "0.6763529", "0.6553799", "0.65517414", "0.6533307", "0.649042", "0.6456006", "0.6448016", "0.6442637", "0.64171195", "0.6414003", "0.63957036", "0.6381695", "0.6347425",...
0.70646936
6
Logic Challenge Konversi Menit|
function konversiMenit(menit) { var minute = menit % 60 var hour = (menit - minute) / 60 strMinute = '' + minute if (strMinute.length === 1){ return hour+':0'+minute } else { return hour+':'+minute } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verifierMot()\n{\n var lemot = \"\";\n for(let i=0; i<choisi.length; i++)\n {\n lemot += choisi[i].textContent;\n }\n if(lemot == mots[niveau])\n {\n nextlevel();\n }\n else{\n initialiseNiveau(niveau);\n }\n}", "function main() {\n const m_temp = readLin...
[ "0.5705663", "0.5664999", "0.56467015", "0.56428427", "0.56303316", "0.56285864", "0.5609703", "0.5609703", "0.55915034", "0.55845064", "0.55786884", "0.5552044", "0.55428684", "0.5531868", "0.551458", "0.5508959", "0.54962355", "0.5488682", "0.5487973", "0.54682344", "0.5460...
0.0
-1
Yetii Yet (E)Another Tab Interface Implementation,version 1.6, Copyright (c) Grzegorz Wojcik,Code licensed under the BSD License:
function Yetii(){this.defaults={id:null,active:1,interval:null,wait:null,persist:null,tabclass:'tab',activeclass:'active',callback:null,leavecallback:null};this.activebackup=null;for(var n in arguments[0]){this.defaults[n]=arguments[0][n]};this.getTabs=function(){var a=[];var b=document.getElementById(this.defaults.id)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function semTab() {\r\n\tchecatab = false;\r\n}", "function OuterTab(display_text,url,image)\n{\n\n this.Tabs = [];\n this.DisplayText = display_text;\n this.Url = url;\n this.AddTab = add_tab;\n this.LastTabIndex = '';\n this.Image = image;\n this.line_number = 1;\n\n}", "loadOneTab() { }...
[ "0.64754045", "0.64461994", "0.63185596", "0.6298007", "0.62786555", "0.6245244", "0.6192233", "0.6153604", "0.6107638", "0.6069464", "0.6065018", "0.6048901", "0.60446215", "0.6040463", "0.60046804", "0.6000523", "0.599032", "0.59671247", "0.5966066", "0.5949983", "0.5943832...
0.6299686
3
globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.option...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}", "extend(config, ctx) {\n // if (process.server && process.browser) {\n if (...
[ "0.5847233", "0.5728436", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", "0.57236", ...
0.0
-1
Translates the list format produced by cssloader into something easier to manipulate.
function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: medi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listToStyles(parentId, list) {\n var styles = [];\n var newStyles = {};\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = item[0];\n var css = item[1];\n var media = item[2];\n var sourceMap = item[3];\n ...
[ "0.63083893", "0.630304" ]
0.0
-1
Login component uses localStorage to set isLoggedIn boolean and jwtToken
function Login(props) { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [errors, setErrors] = useState(''); // logs in user then redirects to user's profile const loginUser = userInfo => { axios .post('/api/login', userInfo) .then(res => { l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "login() {\r\n this.authenticated = true;\r\n localStorage.setItem(\"islogedin\", true);\r\n }", "login(state, obj) {\n localStorage.setItem(\"JWT\", obj.token); // set the localStorage to have JWT token\n localStorage.setItem(\"expiryTime\", obj.exp); // set the localStorage to have ex...
[ "0.7944853", "0.7788218", "0.761802", "0.7359647", "0.7290461", "0.72789687", "0.7193859", "0.71695596", "0.7149013", "0.7068984", "0.70586", "0.6996188", "0.69525826", "0.69327784", "0.68796086", "0.68387914", "0.68338966", "0.68308973", "0.67955273", "0.6788717", "0.6788508...
0.0
-1
userCtrl is use to retrieve user list from services
function userCtrl(zmUserService) { var vm = this; vm.user = { id:'' }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UserCtrl($scope, userService) {\n\n $scope.search = {\n value: ''\n };\n $scope.users = [];\n $scope.yasebusco = false;\n userService.getList().then(function(rpta) {\n //console.log(rpta.data.users);\n $scope.users = rpta.data.users;\n ...
[ "0.72526675", "0.7250395", "0.71681243", "0.71338063", "0.69819355", "0.69132173", "0.6838831", "0.682294", "0.67565554", "0.6733246", "0.67234135", "0.67107046", "0.667796", "0.66684276", "0.65754956", "0.6571062", "0.6561878", "0.6557266", "0.6550314", "0.6535187", "0.65348...
0.6548035
19
Add a marker to the map and push to the array.
function addMarker(location) { var marker = new google.maps.Marker({position: location,map: map}); var contentString = "<input type=\"text\" id=\"wayname2\" required placeholder=\"Enter Waypoint Name Here\" />"; var infowindow = new google.maps.InfoWindow({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMarker(location,array) {\n var marker = new google.maps.Marker({\n position: location,\n map: map\n });\n array.push(marker);\n }", "function addMarker(location) {\n var marker = new google.maps.Marker({\n position: location,\n map: map\n ...
[ "0.77154255", "0.7550293", "0.75085753", "0.7502557", "0.73547107", "0.7328168", "0.72462434", "0.71087205", "0.7103856", "0.7058107", "0.7037875", "0.70191664", "0.7016448", "0.7005477", "0.7004641", "0.6994776", "0.6987638", "0.69802535", "0.69557685", "0.6946024", "0.69430...
0.0
-1
Sets the map on all markers in the array.
function setAllMap(map) { for (var i = 0; i < markers.length; i++) { markers[i].setMap(map); } poly.setMap(map); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMapOnAll(map) {\n for (var i = 0; i < markersArray.length; i++) {\n markersArray[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n }", "function setMapOnAll(map){\n ...
[ "0.86419475", "0.8592096", "0.85918146", "0.8581791", "0.8581473", "0.85735416", "0.85723966", "0.857033", "0.857033", "0.85633993", "0.85626596", "0.8554875", "0.8554875", "0.8554875", "0.8554875", "0.85501784", "0.85501784", "0.8547008", "0.85301447", "0.8528565", "0.852266...
0.81860304
97
Removes the overlays from the map, but keeps them in the array.
function clearOverlays() { setAllMap(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearOverlays(array) {\n if (array) {\n for (i in array) {\n array[i].setMap(null);\n }\n }\n}", "function deleteOverlays(array) {\n if (array) {\n for (i in array) {\n array[i].setMap(null);\n }\n array.length = 0;\n }\n}", "functio...
[ "0.8331263", "0.82912934", "0.8255692", "0.8082491", "0.8075135", "0.80492127", "0.80288184", "0.80258507", "0.79854256", "0.79854256", "0.79854256", "0.79854256", "0.7974116", "0.7923356", "0.7923356", "0.79219955", "0.7916416", "0.786833", "0.7855974", "0.78521115", "0.7826...
0.7738915
25
Shows any overlays currently in the array.
function showOverlays() { setAllMap(map); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showOverlays() {\n setAllMap(map);\n }", "function showOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(map);\n }\n }\n}", "function showOverlays() {\n if (markersArray) {\n for (i in markersArray) {\n markersArray[i].setMap(map);\...
[ "0.73998404", "0.73754525", "0.73754525", "0.7124124", "0.70179635", "0.7011618", "0.7000431", "0.6863563", "0.6813363", "0.67905265", "0.6617982", "0.6513077", "0.629704", "0.6272058", "0.6219296", "0.62051034", "0.6110299", "0.61027765", "0.6067345", "0.6042016", "0.5977215...
0.6736487
10
Deletes all markers in the array by removing references to them.
function deleteOverlays() { clearOverlays(); markers = []; poly = new google.maps.Polyline(polyOptions); poly.setMap(map); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteMarkers() {\n clearMarkers();\n markers = [];\n // remove bounds values from boundsArray\n boundsArray = [];\n}", "function deleteMarkers() {\n clearMarkers()\n markerArr = []\n}", "function deleteAllMarkers() {\r\n if (_markersArray) {\r\n for (i in _markersArray) {\r\n ...
[ "0.7978893", "0.79223007", "0.78784186", "0.77764267", "0.77290326", "0.77201647", "0.77135307", "0.76658124", "0.7661866", "0.7661866", "0.7661866", "0.76574963", "0.76574296", "0.7647149", "0.7647149", "0.7647149", "0.7647149", "0.7647149", "0.7647149", "0.7647149", "0.7647...
0.0
-1
take in itemID AND take in status
componentDidMount() { if (this.props.currentUser) { this.setState({ thisUser: this.props.currentUser.id, }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeStatus(params) {\n var index = this.list.map(i => i.id).indexOf(params.id);\n this.list[index].open = params.status;\n ls.updateItem({id : params.id}, {open : params.status});\n this.filterByStatus(this.stats);\n }", "async function updateStatus($items, status){\n\t\t//TODO: Error handling in...
[ "0.6257409", "0.61751086", "0.60653174", "0.60542345", "0.5984596", "0.5968474", "0.5937262", "0.5820377", "0.5806524", "0.57892215", "0.57870543", "0.5779113", "0.5736785", "0.5713061", "0.5692431", "0.56579494", "0.56465226", "0.56399405", "0.5606667", "0.5601861", "0.56014...
0.0
-1