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
rewrite this! pan + zoom function
function initPanZoom() { var panZoom = map.paper.panzoom(); panZoom.enable() setInterval(function() { $('h1').html(panZoom.currZoom +' x:'+panZoom.currPos.x.toFixed(0)+' y:'+panZoom.currPos.y.toFixed(0)); }, 50); var css = '<style type="text/css">.grabbing { cursor: url(data:image/x-icon;base64,AAAC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zoom(){\n\t//NOT YET\n\t/*var rect = canvas.getBoundingClientRect();\n var mx = panX + (panX - rect.left) / zooms;\n var my = panY + (panY - rect.top) / zooms;\n zooms = document.getElementById(\"za\");\n panX = mx - ((panX - rect.left) / zooms);\n panY = my - ((panY - rect.top) / zooms);\n...
[ "0.7314129", "0.7143018", "0.7032239", "0.7011948", "0.69826597", "0.6962996", "0.6936321", "0.6837072", "0.6791536", "0.676691", "0.6753278", "0.67343026", "0.67177033", "0.67031777", "0.66930425", "0.66316444", "0.66298586", "0.66282594", "0.6600352", "0.6590201", "0.658278...
0.6526144
28
begin timeline at the right time
function klapp_timeline_startpoint() { $('.timecapsule').each(function() { if( $('ol', this).children().length != 0 && $('ol', this).children().is(':visible') ) { var container_margin = $(this).position(); $('.maintain').animate({ 'margin-top': '-' + container_margin.top + 'px' }, 500); return fal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start(){\n timeline.play();\n }", "function start_timeline(time) {\n line_count = setInterval(timer, 33);\n function timer() {\n time += 1;\n time_line.style.width = time + \"px\";\n if (time > 479) {\n clearInterval(line_count);\n }\n }\n}", "function begin() {\n points = 0;\n pa...
[ "0.6834218", "0.6737481", "0.6436609", "0.6418372", "0.6414582", "0.64077926", "0.6360009", "0.63226986", "0.6284321", "0.6269062", "0.6234801", "0.6206289", "0.61557275", "0.6131043", "0.61040974", "0.6079186", "0.6052311", "0.6033709", "0.60205156", "0.6000109", "0.59807914...
0.664933
2
expand events that have a definite ending onload
function klapp_expand_events_onload() { $('.timeline ol').each(function() { $('li', this).each(function() { var event_finish = $(this).attr('data-event-finish'); if( event_finish != undefined && event_finish != false ) { $('a', this).append('<div class="stretch onload"></div>'); var capsul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPreExpandStarted(){}", "onloadend() {}", "onChildrenLoadEnd() {\n if (this._childrenLoadEnd) {\n this._childrenLoadEnd.raise();\n }\n }", "function completeOnTransitionEnd(ev) {\n if (ev.target !== this) return;\n transitionComplete...
[ "0.6560426", "0.63730705", "0.61586577", "0.60685474", "0.60685474", "0.6028648", "0.59488493", "0.58742374", "0.5852475", "0.5846617", "0.5831434", "0.58073586", "0.58062196", "0.576401", "0.5733575", "0.57334316", "0.56999993", "0.5698674", "0.5698674", "0.56640816", "0.565...
0.6265674
2
A method that loops through the array of letters and creates a new instance of Letter for each one
assignLetters() { for (let letter in this.wordArray) { let letterObj = new Letter(this.wordArray[letter]); // Push the new Letter object into the array this.array.push(letterObj); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Word(wordtoGuess) {\n this.lettersArray = wordtoGuess.split(\"\").map(function(char){\n return new Letter(char);\n });\n\n}", "function Word(wordtoGuess) {\n this.lettersArray = wordtoGuess.split(\"\").map(function(char){\n return new Letter(char);\n });\n\n}", "function createAlphabet(){\...
[ "0.67379665", "0.67379665", "0.6594558", "0.6523145", "0.6453985", "0.6391814", "0.631034", "0.6306251", "0.62300676", "0.618791", "0.6148416", "0.609464", "0.60147965", "0.60133266", "0.60072047", "0.5962573", "0.59476125", "0.59463865", "0.59428006", "0.5938534", "0.591436"...
0.77935785
0
This method creates the word that is displayed to the user in the terminal, filled with _ or correctly guessed letters
toString() { let string = ""; // Loop through each letter object in the word array and cocatenate it with the empty string for (let i in this.array) { let LetterObj = this.array[i]; // LetterObj will return an _ if the letter has not been guessed yet string += `${LetterObj} `; } //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateDispWord(){\n dispWord = \"\"; // Reset the displayed string so it can be rebuilt\n for(var i = 0; i < guessWord.length; i++){ //Loop through the current random word\n if(correctGuesses.indexOf(guessWord[i]) > -1){ // If a letter in the random word has been guessed correctly, reveal i...
[ "0.75527847", "0.74378157", "0.7324609", "0.7289476", "0.7242434", "0.7172494", "0.71288604", "0.7101971", "0.7100153", "0.7096851", "0.70688385", "0.70687854", "0.70282364", "0.7003736", "0.6982391", "0.6969807", "0.696273", "0.6940054", "0.6931251", "0.6897483", "0.68843263...
0.0
-1
When the user guesses a letter check every letter object to see if the guess matches one of them
guessCharacter(x) { // A count is used to check if any letter was changed from guessed=false to guessed=true let count = 0; for (let i in this.array) { let LetterObj = this.array[i]; // Calle the guessLetter function of the current letter we are looking at LetterObj.guessLetter(x); /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGuessedLetters() {\n //This is checking that if users guess is in alailableLetters\n if(availableLetters.indexOf(this.event.key) > -1) {\n //Looping through guessed letters for the length of word\n for(var i = 0; i < word.length; i++) {\n //If the users guess has alread...
[ "0.7899323", "0.7839297", "0.77726775", "0.7767463", "0.7766113", "0.77641034", "0.7746255", "0.77344704", "0.7715875", "0.7710845", "0.7689169", "0.7672926", "0.765627", "0.7629062", "0.7622974", "0.7579444", "0.7562825", "0.75552756", "0.75468504", "0.7537755", "0.7527801",...
0.7475369
22
This method checks to see if any letter is still hidden or not, used to check if the user has guessed the word
checkLettersForGuessed() { // Initialize a count let count = 0; for (let i in this.array) { let LetterObj = this.array[i]; // If the letter hasn't been guessed yet increase count if (!LetterObj.guessed) { count++; } } // If there are still unguessed letters, return tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkForWin() {\n let unsolvedLetters = 0;\n\n for (let i = 0; i < phraseLetters.length; i++) {\n phraseLetters[i].className == `hide letter ${ phraseLetters[i].textContent }` ? \n unsolvedLetters++ : unsolvedLetters = unsolvedLetters;\n }\n\n return unsolvedLe...
[ "0.75704396", "0.75040966", "0.75040174", "0.74393064", "0.73941904", "0.7210228", "0.719771", "0.71723175", "0.71718353", "0.7153414", "0.71518844", "0.7142824", "0.7094757", "0.6987208", "0.69158083", "0.6899759", "0.6856858", "0.6853797", "0.6850085", "0.6830862", "0.68274...
0.0
-1
Tells us, on a nested basis, if objects are the same, or differ at some level
function objectsAreDifferent(dominantObject: Object, slaveObject: Object) : boolean { for (const key:string in dominantObject) { if (!dominantObject.hasOwnProperty(key)) { continue; } const dominantKeyValue: any = dominantObject[key]; const slaveKeyValue: any = slaveObject[key]; if (!slave...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deepEqual(obj1, obj2) {\n // Your code here\n for(var prop in obj1) {\n if(typeof obj1[prop] == 'object' && typeof obj2[prop] == 'object') {\n deepEqual(obj1[prop], obj2[prop]);\n }\n else if(obj1[prop] != obj2[prop]) {\n return false;\n }\n }\n return true;\n}", "function isEq...
[ "0.6709001", "0.66702783", "0.6577204", "0.6553737", "0.6525595", "0.6490196", "0.64470214", "0.6367979", "0.6355462", "0.63320917", "0.6313347", "0.63088304", "0.6297473", "0.62272745", "0.6227252", "0.6194476", "0.61818415", "0.6175378", "0.61301684", "0.610225", "0.6099117...
0.60279703
23
compares arrays in a nested basis
function arraysAreDifferent(dominantArray: Array<any>, slaveArray: Array<any>) : boolean { // if array has been `push`ed to, it is different if (slaveArray.length !== dominantArray.length) { return true; } const responseValues = dominantArray.map((dominantIndexValue, index) => { const slaveIndexValue: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equalArrays(array1, array2) {\n // if the other array is a falsy value, return\n if (!array1 || !array2)\n return false;\n\n // compare lengths - can save a lot of time\n if (array1.length != array2.length)\n return false;\n\n for (var i = 0, l=array1.length; i < l; i++) {\n // Check i...
[ "0.6682006", "0.6682006", "0.6515023", "0.6448402", "0.6402522", "0.6397374", "0.63972235", "0.6390517", "0.63271725", "0.62853885", "0.6281192", "0.6278067", "0.6275068", "0.6248614", "0.6209656", "0.6209656", "0.6206717", "0.6199717", "0.6187762", "0.6187762", "0.61607146",...
0.6831281
0
display default pause button through change in CSS
function displayPauseButton() { toggle_btn.style.borderStyle = "double"; toggle_btn.style.borderWidth = "0vmin 0vmin 0vmin 7vmin"; toggle_btn.style.borderColor = "transparent transparent transparent rgba(183, 0, 0, 1)"; toggle_btn.style.backgroundColor = "transparent"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doPause() {\n PLAY_STATUS = PlayStatus.PAUSED\n pausePlay.innerHTML = 'Resume'\n d3.select(\"#pauseplay\").attr(\"class\", \"btn menu-button\")\n CODE_MIRROR_BOX.setOption(\"theme\", DISABLED_CODE_THEME)\n}", "function startPause() {\r\n let text = this.getAttribute('data-current');\r\n if (te...
[ "0.7353066", "0.7321258", "0.7289142", "0.7280639", "0.72663635", "0.7177744", "0.71488523", "0.7143652", "0.7137813", "0.70337135", "0.70299", "0.6998044", "0.69532764", "0.6929814", "0.6925953", "0.69000095", "0.6887238", "0.68854296", "0.68815404", "0.68787086", "0.6876344...
0.714253
8
display default play button through change in CSS
function displayPlayButton() { toggle_btn.style.borderStyle = "solid"; toggle_btn.style.borderWidth = "7vmin 0vmin 7vmin 14vmin"; toggle_btn.style.borderColor = "transparent transparent transparent rgba(183, 0, 0, 1)"; toggle_btn.style.backgroundColor = "transparent"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onPlayButtonClick() {\n\t\tif ( this.target ) this.target.play();\n\t\tthis.trigger( 'play' );\n\t}", "function onClick () {\n\n play =! play;\n\tif(play){\n\t\tbutton.setFrames(0,0,1);\n\t}else{\n\t\tbutton.setFrames(1,1,0);\n\t}\n}", "function togglePlay() {\n if (elements.video.paused) {\n elements.v...
[ "0.7222774", "0.7209913", "0.71686345", "0.7140184", "0.7135463", "0.71346927", "0.7110338", "0.70711184", "0.7062931", "0.70524645", "0.69814503", "0.6981387", "0.69701654", "0.69685584", "0.6964077", "0.6943242", "0.69379896", "0.6930504", "0.6915746", "0.69070154", "0.6904...
0.6664932
51
Make request in parallel
function task2() { clearTable(); console.clear(); const stop = Math.floor(Math.random() * 10) + 1; getData(1, stop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getMultiRequest(url, reqArr) {\n const reqParams = []\n reqArr.forEach(item => {\n reqParams.push({\n url,\n param: item,\n method: 'get'\n })\n })\n try {\n const response = await multiRequestWithPromise(reqParams)\n return response\n } catch (err) {\n console.log...
[ "0.72077537", "0.702576", "0.6929929", "0.6904526", "0.6887757", "0.68349904", "0.68101156", "0.6736233", "0.63650185", "0.63639337", "0.6354599", "0.6243562", "0.61289096", "0.60994124", "0.60459554", "0.6026916", "0.60204387", "0.6018343", "0.5992659", "0.59869015", "0.5951...
0.0
-1
Show loading funcion before executing process
showLoading() { var includedTypes = [0, 1, 5, 6]; if (this.showProgress && this.config && includedTypes.includes(this.config.TypeId)) { this.progressBar = Lobibox.progress({ title: flexygo.localization.translate('process.executing'), closeO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayLoading() {\n console.log(\"Loading...\");\n }", "displayLoading(){\n $.showLoading({\n name: \"line-scale\"\n });\n }", "function loading() {\n}", "function load(){\n\n //Display an optional loading bar\n // g.loadingBar();\n}", "function startLoading() {\...
[ "0.7965677", "0.7477142", "0.7317707", "0.7127413", "0.71128505", "0.702877", "0.69664025", "0.6965194", "0.69629693", "0.6924848", "0.68984205", "0.6857669", "0.6856633", "0.68309104", "0.6818206", "0.67443156", "0.67401177", "0.6736307", "0.6687508", "0.66864556", "0.667340...
0.7089288
5
Move loading funcion during process execution
moveLoading() { if (this.progressBar) { let actVal = this.progressBar.getProgress(); actVal = ((actVal + 1 >= 100) ? 0 : actVal + 1); this.progressBar.setProgress(actVal); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preLoad() {\n // load something and continue on only when finished\n}", "function loading() {\n}", "function forceLoad() {}", "_loading() {\n }", "async load () {}", "function startLoading() {\n //TODO\n}", "load() {}", "load() {}", "function run() {\r\n\t// Initialize the loader befo...
[ "0.72658396", "0.67664504", "0.6687831", "0.66287416", "0.66158247", "0.6588706", "0.65778196", "0.65778196", "0.6528857", "0.6461724", "0.64147377", "0.6412977", "0.63838995", "0.635878", "0.63469696", "0.63302493", "0.63095295", "0.62852144", "0.62801003", "0.6274061", "0.6...
0.0
-1
Close loading funcion after executing process
closeLoading() { if (this.progressBar) { clearInterval(this.progressTimer); this.progressTimer = null; this.progressBar.destroy(); this.progressBar = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endProcess()\n{\n\tprocess.exit()\n}", "function closeLoading() {\n setTimeout(function () {\n layer.closeAll('loading');\n }, 100);\n }", "Unload() {}", "end() {\n\t\tif (this.process)\n\t\t\tthis.process.kill()\n\t}", "_dispose() {\n\n delete window.FlowUI['_lo...
[ "0.6348805", "0.6326224", "0.62342507", "0.6222254", "0.6200246", "0.619346", "0.6188804", "0.61431783", "0.60977817", "0.60717237", "0.60084176", "0.5984164", "0.59779596", "0.5975232", "0.5966157", "0.5966157", "0.5964247", "0.59476763", "0.5930602", "0.59293115", "0.592931...
0.6652615
0
Trigger actions with buttons
function startsim1() { //canvas_sim1 = document.getElementById("simulation1"); disableBtn("startsim1"); enableBtn("stopsim1"); let ctx_sim1 = canvas_sim1.getContext("2d"); ctx_sim1.fillStyle = 'rgba(255, 255, 255, .4)'; ctx_sim1.fillRect(0, 0, canvas_sim1.width, canvas_sim1.height); sim1.update(); sim1_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buttonActions() {\n\t\t$(\".button\").on(\"click\", function() {\n\t\t\tvar routeGiven = $(this).attr(\"id\");\n\t\t\tif ($(this).hasClass(\"clicked\")) {\n\t\t\t\t$(this).removeClass(\"clicked\");\n\t\t\t\troutes[routeGiven][\"vRefresh\"] = false;\n\t\t\t\t$(\".route_\" + routeGiven + \",\" + \".path_\" ...
[ "0.6924182", "0.69096863", "0.66520566", "0.6600927", "0.65185404", "0.64350504", "0.6425251", "0.64069057", "0.638229", "0.63747144", "0.6369747", "0.63506067", "0.63238335", "0.6302309", "0.62645614", "0.6259694", "0.62532675", "0.6225584", "0.6220046", "0.6206496", "0.6177...
0.0
-1
make the tetris blocks function
function tetris(){ if(frameCount % 60 === 0) { var tetris = createSprite(200,1,50,50); tetris.x = mario.x tetris.scale = 0.3 tetris.velocityY = tetris.velocityY + 2 var rand = Math.round(random(1,7)); switch(rand) { case 1: tetris.addImage(t1img); break; case 2: tetris.ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBlocks(){\n\tfor(let j=1; j < 17; j++){\n\t\tif(j%2==0){\n\t\t\tfor(let i=1; i < 25; i++){\n\t\t\t\tif(i%2==0){\n\t\t\t\t\tblockArray.push(new Block((i-1)*50,(j-1)*50,50,50));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function Block(grid, typeOfBlock, squareSize) {\n // public properties\n this.squa...
[ "0.7070012", "0.69896775", "0.6888118", "0.6872745", "0.6872267", "0.6835983", "0.6797661", "0.6775655", "0.6736805", "0.6715255", "0.6683792", "0.66574556", "0.6583374", "0.65765184", "0.65594935", "0.654928", "0.650711", "0.6506277", "0.64943504", "0.6468478", "0.64493924",...
0.6354987
27
LA FONCTION dessinerMonstre LA FONCTION PREND DEUX PARAMETRES: x et y
function dessinerMonstre (x,y) { // LE CORPS fill(0); ellipse(x,y,30,30); // LES YEUX fill(255); ellipse(x-8,y-5,10,10); ellipse(x+8,y-5,10,10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mursVdessin(tab, nx, pas){\r\n\tfor(i = 0; i < tab.length; ++i){\r\n\t\tcoord = mursVtoCoord(tab[i], nx);\r\n\t\t\r\n\t\tpu(); rt(90); fd(coord.x*pas);\r\n\t\trt(90); fd(coord.y*pas);\r\n\t\tpd(); fd(pas); pu();\r\n\t\tbk(pas); bk(coord.y*pas);\r\n\t\tlt(90); bk(coord.x*pas); lt(90);\r\n\t\tpd();\r\n\t}\r...
[ "0.6515955", "0.61121005", "0.59558", "0.5853352", "0.57912505", "0.5749791", "0.56766474", "0.5664324", "0.5614045", "0.5611793", "0.5610217", "0.5551266", "0.5542541", "0.5510456", "0.5489727", "0.5483785", "0.5483785", "0.5482162", "0.5475941", "0.54691815", "0.54536736", ...
0.55861187
11
CODE A EXECUTER LORSQUE LA FENETRE EST REDIMENSIONNEE
function windowResized() { resizeCanvas(windowWidth, windowHeight); draw(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onresizeAnimaciones() {\n var sec=getUrlVars()['sec'];\n if(sec!=\"gestionProyecto\") { normalSectionElements(); ajustaHeight(); }\n normalAbreNP();\n normalAbrePE();\n}", "function resizedw(){\n\t\n}", "function SizeDependWidth() {\n wImageCur = va.wSlide;\n hImageCu...
[ "0.58799905", "0.5874289", "0.58718127", "0.58690083", "0.58026284", "0.580028", "0.5657156", "0.5630124", "0.5622383", "0.5614363", "0.55978733", "0.5592979", "0.55886674", "0.55863434", "0.55797786", "0.5572748", "0.5571445", "0.5562874", "0.55586463", "0.5545539", "0.55346...
0.0
-1
get the selected base color and color the first div background
function setBaseColor(){ //set the default color to be the picked value let defaultColor = colorPicker.value; console.log(defaultColor); //for testing //style the first div in picked color baseColor.style.backgroundColor = defaultColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorSelCurrent() {\r\n if(nOrU(document.getElementById(ICON_ID + currentDiv))) return;\r\n document.getElementById(ICON_ID + currentDiv).style.backgroundColor = BMDIV_BG_SEL;\r\n document.getElementById(TITLE_ID + currentDiv).style.backgroundColor = BMDIV_BG_SEL;\r\n document.getElementById(URL_ID + ...
[ "0.68651825", "0.6468404", "0.6437869", "0.64103955", "0.63976157", "0.63712305", "0.63007134", "0.628789", "0.62636477", "0.6208685", "0.6199307", "0.6167975", "0.61314017", "0.61178833", "0.6116648", "0.6115207", "0.6112702", "0.6102904", "0.6099102", "0.6094357", "0.609156...
0.70195574
0
create Harmony color style by changing the harmony button
function createHarmony(event){ let color1 = event.target.value; if (color1){ colorOne.style.backgroundColor = "green"; colorTwo.style.backgroundColor = "red"; colorThree.style.backgroundColor = "black"; colorFour.style.backgroundColor = "pink"; console.log("working"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeColorScheme() {\n\n}", "function setDark(button) {\n button.style.background=\"rgb(94, 131, 186)\";\n button.style.color=\"rgb(194, 210, 233)\";\n}", "function changeColor(e){\n if (colorScheme == \"BLACK\"){\n e.target.style.backgroundColor = \"BLACK\";\n e.target.style.opacity =...
[ "0.70218265", "0.69491595", "0.6933238", "0.6742239", "0.6656326", "0.6597753", "0.65559864", "0.6526904", "0.6526904", "0.6488959", "0.6443221", "0.64218557", "0.6407189", "0.637831", "0.637658", "0.6328086", "0.63208467", "0.6315124", "0.6311696", "0.6304723", "0.6300955", ...
0.7001339
1
TODO: We should use the portfolio socket event instead once it's implemented
async watchCurrencies() { if (!this.stopWatchingCurrencies) { this.stopWatchingCurrencies = await fireEvery(async () => { const {price: kmdPriceInUsd} = this.coinPrices.find(x => x.symbol === 'KMD'); let {portfolio: currencies} = await this.api.portfolio(); // TODO(sindresorhus): Move the returned `mm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "socket_customEventFromServer(_, payload) {\n console.log(\"customEventFromServer\", payload);\n }", "static listenSocketEvents() {\n Socket.shared.on(\"wallet:updated\", (data) => {\n let logger = Logger.create(\"wallet:updated\");\n logger.info(\"enter\", data);\n\n ...
[ "0.58833224", "0.5867788", "0.5721929", "0.5710225", "0.56489605", "0.5592588", "0.5587047", "0.5574208", "0.5541309", "0.55411273", "0.5540741", "0.55172706", "0.5493239", "0.54896414", "0.54725903", "0.5457013", "0.54412794", "0.544021", "0.54390174", "0.54366565", "0.54355...
0.0
-1
Funzione per creazione oggetto di info addizionali nel array additional info
get_add_infos(movie, five_actors){ let new_id = movie.id; let new_genres = this.get_genres(movie.genre_ids); let new_actors = five_actors let add_info_obj ={ id: new_id, genres: new_genres, main_actors: new_actors...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInfo (typeOfContent, title, header, content){\n var id = ((app.info.length) + 1) *4;\n var item ={};\n item.id = id;\n item.title = title;\n item.header = header;\n item.content = content;\n item.typeOfContent = typeOfContent;\n console.log(item, \"new itmeeeee\");\n app.info.push(item);\n ...
[ "0.6497563", "0.62351894", "0.618422", "0.59359396", "0.5831174", "0.5767636", "0.57488537", "0.5730857", "0.5701731", "0.56975406", "0.569095", "0.569095", "0.56055975", "0.55616647", "0.55604917", "0.5535216", "0.55251753", "0.5507636", "0.550194", "0.54817355", "0.5478715"...
0.57898384
5
Funzione per recupero dei generi del film in formato stringa
get_genres(genre_ids){ // Esempio di genre_ids = [ 100 , 45 ] let genres = []; genre_ids.forEach(genre_id => { this.all_genres.forEach((genre, index) => { // Confronta ogni id del film con l array del genere if(genre_id ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildString(movie){\n\tvar results = \"Key Value Pairs - You have \";\n\tif (movie.hasWatched){\n\t\t\tresults += \"watched \\\"\";\n\t\t} else {\n\t\t\tresults += \"not seen \\\"\";\n\t\t};\n\tresults += movie.title\n\tresults += \"\\\" \" + movie.rating + \" stars\"\t\n\treturn results;\n\t}", "functi...
[ "0.61028415", "0.6101329", "0.60713917", "0.60530627", "0.6033109", "0.5989063", "0.5981828", "0.59581035", "0.5859815", "0.57870305", "0.57549006", "0.5647446", "0.56299955", "0.5571663", "0.555399", "0.5549661", "0.55399853", "0.5494202", "0.5488845", "0.547462", "0.547462"...
0.50753057
61
Funzione per la stampa a video dell array dei generi
print_genres_string(id){ let genres_string = ""; for (var i = 0; i < this.additional_infos.length; i++) { if(id == this.additional_infos[i].id){ genres_string = this.additional_infos[i].genres.join(" / "); }; }; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playVideo() {\n playVideoSegments(transcripts)\n}", "function arrVideo(name, emotions, times) {\n this.name = name;\n this.emotions = emotions;\n this.times = times;\n}", "function arrVideo(name, emotions, times) {\n this.name = name;\n this.emotions = emotions;\n this.times = tim...
[ "0.6238002", "0.61796933", "0.61796933", "0.6152342", "0.5983068", "0.59442747", "0.5937449", "0.5928376", "0.59096265", "0.5900606", "0.5887462", "0.58520234", "0.5756241", "0.5737774", "0.57361275", "0.57350826", "0.5717736", "0.5714275", "0.57121336", "0.57121336", "0.5707...
0.0
-1
Stampa a video della stringa di attori
print_actors_string(id){ let actors_string = ""; for (var i = 0; i < this.additional_infos.length; i++) { if(id == this.additional_infos[i].id){ actors_string = this.additional_infos[i].main_actors.join(", "); }; }; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function video(source){\n return '<div style=\"margin-top : 10px;\"><p style=\"font-weight : bold\">Video explicativo</p></div><video width=\"500\" height=\"500\" controls>' + \n '<source src=\"' + source + '\" type=\"video/webm\"> Tu navegador no soporta video' +\n '</video>';\n }", "function playV...
[ "0.6566566", "0.6302902", "0.6218157", "0.6053233", "0.6029902", "0.5943593", "0.5885158", "0.58656824", "0.5847874", "0.5843263", "0.5823236", "0.5821692", "0.57712317", "0.5728013", "0.5727365", "0.57139486", "0.56872654", "0.56702375", "0.5642739", "0.5642739", "0.5626808"...
0.0
-1
Convert numbers to strings of floats so GLSL doesn't barf on "1" instead of "1.0"
function glslifyNumber (n) { return n === (n | 0) ? n + '.0' : n + ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flow_ecma_string_of_float(num) {\n return caml_new_string(caml_js_from_float(num).toString());\n}", "function float32String(v) {\n return Math.abs(v) > 1e-37 ? v : 0;\n } // Create matrix array for looping", "function float32String(v) {\n return Math.abs(v) > 1e-37 ? v : 0\n}", "function float...
[ "0.67264694", "0.66337025", "0.6623568", "0.6609518", "0.65403897", "0.6378591", "0.6234288", "0.6197407", "0.6197407", "0.61373985", "0.6011263", "0.59416556", "0.5934193", "0.5902741", "0.5873191", "0.58708847", "0.57795316", "0.5747997", "0.5725125", "0.57215285", "0.56994...
0.5983309
11
local node digest function
async function digest (algo, data) { const hash = crypto.createHash(algo) hash.update(data) return new Uint8Array(hash.digest()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function digest() {\n // Pad\n write(0x80);\n if (offset > 14 || (offset === 14 && shift < 24)) {\n processBlock();\n }\n offset = 14;\n shift = 24;\n\n // 64-bit length big-endian\n write(0x00); // numbers this big aren't accurate in javascript anyway\n write(0x00); // ..So just ha...
[ "0.6882936", "0.6882936", "0.6882936", "0.67158175", "0.67158175", "0.67158175", "0.6524656", "0.6487698", "0.6487698", "0.6470773", "0.63964", "0.63439596", "0.6320234", "0.6297155", "0.6297155", "0.6261069", "0.6199223", "0.6140325", "0.60956365", "0.6031878", "0.59764165",...
0.5728765
35
handle an incomming cgi request, making a similar interface to node's http server
async function handleCGI (handler) { const url = new URL(process.env.REQUEST_URI || `${process.env.SCRIPT_NAME}?${process.env.QUERY_STRING}`, `http://${process.env.HTTP_HOST || process.env.SERVER_NAME}/`) url.protocol = process.env.HTTPS ? 'https' : 'http' const request = { method: process.env.REQUEST_METHOD,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handle_incoming_request(req, res) {\r\n // get the path of the file to served\r\n var path = url.parse(req.url).pathname;\r\n // get a query (true makes sure the query string is parsed into an object)\r\n var queryObj = url.parse(req.url,\"true\").query;\r\n if (req.method.toLowerCase() == ...
[ "0.7065143", "0.6951491", "0.6950262", "0.68950486", "0.686603", "0.6852835", "0.6806736", "0.675156", "0.67448664", "0.6742888", "0.66691893", "0.66454566", "0.662783", "0.66045475", "0.6594396", "0.65798134", "0.65416116", "0.65365773", "0.6531683", "0.6531616", "0.6518163"...
0.64108855
38
run the cgibin script
async function handleRequest (request, respond) { const document = new HTMLDocument({ ...signSearchConfig, disable: { javascript: true, analytics: true } }) try { // initialise search engine const engine = new SearchEngine({ vectorLibraryPath: arp.resolve('datasets/cc-en-300-8bit'), s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n doCbaam()\n doEcb()\n updateGraphFile()\n}", "function runBrython(cb) {\n exec(BRYTHON_CLI_CMD, {cwd: DIR_APP}, cb)\n}", "function run() {}", "function startRun()\n{\n initCompSyntaxTools();\n initMemVars();\n cleanShell();\n initializeAgain();\n initCanvas();\n cleanCan...
[ "0.6283401", "0.5752504", "0.5603618", "0.55797863", "0.5578637", "0.55252385", "0.55128413", "0.5501874", "0.5476007", "0.5413574", "0.5400769", "0.5263207", "0.5253439", "0.52494496", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269", "0.5249269",...
0.0
-1
Set up connection with signaling server
function connect(failureCB) { failureCB = ((typeof failureCB === 'function') && failureCB) || doNothing; if(typeof(WebSocket) === "undefined") { console.log("您的浏览器不支持WebSocket"); }else { console.log("您的浏览器支持WebSocket"); socket = new WebSocket("ws://"+locati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connect() {\n this.hub = signalhub(this.channel, [ CONSTANTS.SIGNAL_SERVER ]);\n this.sw = swarm(this.hub, this.options);\n }", "constructor() {\n this.url = serverLocation + \"/signalr\";\n this.connection = $.hubConnection(this.url, {\n useDefaultPath: false\n });\n ...
[ "0.8081422", "0.6714845", "0.6668794", "0.6519293", "0.64199823", "0.63882166", "0.6302238", "0.6300816", "0.6300783", "0.6300783", "0.6296815", "0.62775517", "0.6276423", "0.624778", "0.62200797", "0.6213121", "0.61652726", "0.6159301", "0.6159301", "0.61510557", "0.6150417"...
0.0
-1
Schedule incoming messages for asynchronous handling.
function handleMessage(msg) { // process message asynchronously setTimeout(function () { messageHandler(msg); }, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_scheduleSendResponseMessage() {\n\n }", "async triggerOutgoingHandlers() {\n let buffer;\n do {\n if (this.executingOutgoingHandlers >= this.concurrency) {\n return;\n }\n buffer = this.outgoing.shift();\n if (buffer) {\n t...
[ "0.58753175", "0.58669794", "0.58669794", "0.5831426", "0.5799583", "0.5703491", "0.56666535", "0.56146896", "0.56095016", "0.55863136", "0.55809706", "0.5518698", "0.55060315", "0.54944295", "0.546897", "0.5463283", "0.5459955", "0.5459955", "0.5444643", "0.54382133", "0.539...
0.55399084
11
Send a message to the other browser on the signaling channel
function send(msg) { socket.send(JSON.stringify(msg)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendSignalingMessage(message) {\n\t\tdrone.publish({\n\t\t\troom: roomName,\n\t\t\tmessage\n\t\t});\n\t}", "send(message) {\n if (port) {\n port.postMessage(message);\n }\n }", "function send(message)\n{\n //concatenate remote peer username to message\n ...
[ "0.75175416", "0.71476376", "0.7058649", "0.6920187", "0.6827232", "0.67804927", "0.67685634", "0.67452407", "0.6715178", "0.6682236", "0.666454", "0.6664247", "0.6611396", "0.65913737", "0.65722126", "0.65451574", "0.6520098", "0.6508609", "0.6505627", "0.6503864", "0.647770...
0.0
-1
Returns information about the link
static getLinkInfo(link) { let cleanedLink = null; // check if link is wopi frame link if (LinkUtil.isWopiFrameLink(link)) { // extract source link from wopi frame link cleanedLink = LinkUtil._extractWopiFrameSourceLink(link); } else { cleanedLink = LinkUtil._removeQueryParams(link); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getLinkInfo(link) {\n let cleanedLink = null;\n // check if link is wopi frame link\n if (LinkUtil.isWopiFrameLink(link)) {\n // extract source link from wopi frame link\n cleanedLink = LinkUtil._extractWopiFrameSourceLink(link);\n } else {\n cleanedLink = LinkUtil._removeQueryPar...
[ "0.7164002", "0.7112374", "0.6892977", "0.67506206", "0.6632081", "0.63378525", "0.63157517", "0.60890627", "0.60579675", "0.60444605", "0.6029982", "0.5952582", "0.59300244", "0.5912", "0.58945805", "0.5888886", "0.58490974", "0.58082294", "0.58074784", "0.58055025", "0.5796...
0.7087711
2
Checks if the given link is relevant for the extension
static isLinkRelevant(link) { // exclude file protocol links -> they are not working with the office URI protocols if (link.startsWith('file://')) { return false; } if (LinkUtil.isWopiFrameLink(link)) { // check if the file ending is relevant let linkInfo = LinkUtil.getLinkInfo(link);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static isLinkRelevant(link) {\n // exclude file protocol links -> they are not working with the office URI protocols\n if (link.startsWith('file://')) {\n return false;\n }\n\n if (LinkUtil.isWopiFrameLink(link)) {\n return true;\n }\n // only consider segment after last slash\n cons...
[ "0.77332306", "0.693763", "0.6699203", "0.6681272", "0.6667972", "0.6581005", "0.6490158", "0.6436702", "0.63746285", "0.637371", "0.62824374", "0.621289", "0.61907035", "0.615818", "0.60663325", "0.6042344", "0.5918723", "0.5915121", "0.5910403", "0.5879281", "0.5871354", ...
0.77588123
0
Removes all url query parameters from the given link
static _removeQueryParams(link) { const regexResult = link.match(/(.*\.[a-zA-Z]{3,4})($|\?|#)+/); if (regexResult !== null && regexResult.length > 1) { let matchWithLink = regexResult[1]; if (/[\\?#&]+/.test(matchWithLink)) { throw Error('Link does not match'); } else { return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeAllURLQueryString() {\n delete this.urlObj.search;\n }", "function removeQS(url, parameter) {\n //prefer to use l.search if you have a location/link object\n var urlparts = url.split('?'); \n if (urlparts.length >= 2) {\n\n var prefix = encodeURIComponent(parameter)+'=';\n var ...
[ "0.75693554", "0.71417236", "0.7094664", "0.7046632", "0.701989", "0.69929963", "0.6969232", "0.69487154", "0.6945759", "0.6942361", "0.6942361", "0.6907091", "0.68087864", "0.6751832", "0.6737145", "0.67225957", "0.6665413", "0.6604238", "0.6602128", "0.6519905", "0.65150905...
0.74867326
2
Functions handeling requests about identified encounters to API server
async function addIdentifiedEncounter(identifiedEncounter) { if (identifiedEncounter) { return HttpService.post( `/api/addIdentifiedEncounter`, identifiedEncounter ).then((res) => res.data.newIdentifiedEncounter); } else { return "no identifiedEncounter data"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(environment, state) {\n /**\n * @category Utility\n */\n this.units = lib_1.units;\n\n const _state = typeof state == \"string\" ? {\n serverUrl: state\n } : state; // Valid serverUrl is required!\n\n\n (0, lib_1.assert)(_state.serverUrl && _state.serverUrl.match(/https?:\\/...
[ "0.5743216", "0.57232094", "0.57105756", "0.5656899", "0.5627413", "0.56088775", "0.56013936", "0.5593822", "0.5537244", "0.54276264", "0.5409418", "0.53995305", "0.5397861", "0.5373579", "0.5351065", "0.53099394", "0.52977055", "0.52706844", "0.5263961", "0.52608764", "0.525...
0.0
-1
Multiple column bar chart
function multiColumnBarPlotter(e) { // We need to handle all the series simultaneously. if (e.seriesIndex !== 0) return; var g = e.dygraph; var ctx = e.drawingContext; var sets = e.allSeriesPoints; var y_bottom = e.dygraph.toDomYCoord(0); // Find the minimum separation between x-values. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multiColumnBarPlotter(e) {\n function darkenColor(colorStr) {\n // Defined in dygraph-utils.js\n var color = Dygraph.toRGB_(colorStr);\n color.r = Math.floor((255 + color.r) / 2);\n color.g = Mat...
[ "0.7506336", "0.6938817", "0.69080716", "0.68560195", "0.67892677", "0.6706148", "0.66786253", "0.66590834", "0.66461813", "0.65991473", "0.6576051", "0.6533897", "0.65147394", "0.65141284", "0.6512622", "0.64491487", "0.6420126", "0.64126086", "0.64040923", "0.6402658", "0.6...
0.76160324
0
Express = 2 things: 1. Router 2. Middleware that comprises a webframework Req (comes in) MIDDLEWARE > Res(goes out) Middleware function is ANY function that has access to the req,res, next object Req MIDDLEWARE > Res 1. Request comes in: MIDDLEWARE FUNCTIONS 2. We need to validate the user, sometimes. 3. We need to sto...
function validateUser(req, res, next) { // get info out of the req object // do some stuff with the DB //locals is property that is prebuilt into express and is attached to response. // every piece of middleware will have access to locals becuase every piece of middleware has access to the response object r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function middleware(request, response, next) {}", "function authenticationMiddleware(req, res, next) {\n //1.check if user sent a token in the headers | body | query \n var token = req.body.token || req.query.token || req.get('Authorization');\n Logger_1.Logger.d(TAG, '=============== Authentication ...
[ "0.76121956", "0.73320854", "0.68383336", "0.6821624", "0.6764039", "0.6735488", "0.6709929", "0.6699704", "0.6683545", "0.667735", "0.66609704", "0.66347325", "0.66323453", "0.6616796", "0.6606897", "0.6598984", "0.6598807", "0.65867764", "0.6585335", "0.65533483", "0.655180...
0.7230972
2
abrir o marker e infowindow corretos de acordo com o evento
openMarker(e) { this.props.markers.forEach(marker => { if (e.target.value === marker.name) { this.props.infoWindows.forEach(infoWindow => { if (marker.name === infoWindow.name) { infoWindow.open(this.props.map, marker); if (marker.getAnimation() !== null) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function klikInfoWindow(id, marker)\n{\n google.maps.event.addListener(marker, \"click\", function(){\n detailmes_infow(id);\n\n });\n\n}", "function clickEventer(event){\n\t\t// get the coordinate of the clicked postion\n\t \tvar coord = getCoordinate(event); \n\t \tif(checkInfoWindow()){ // ch...
[ "0.73777", "0.7315891", "0.7271314", "0.70850956", "0.7066441", "0.705208", "0.69949704", "0.69716126", "0.69589114", "0.6953759", "0.69136107", "0.68817043", "0.6862094", "0.6845678", "0.6803509", "0.67933434", "0.6793215", "0.67822677", "0.67618585", "0.675975", "0.67540044...
0.6589154
41
bonus show circles when loading
function bonus() { let radius = 1; setInterval(function () { // validate the current radius let validation = circle.validateRadius(radius, canvasHTML.height, canvasHTML.width); // if valid - drow circle if (validation === true) { drawer.d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadingCircle() {\n const loading = document.querySelector(\"#loading-circle\");\n loading.classList.add(\"display\");\n setTimeout(() => {\n loading.classList.remove(\"display\");\n }, 15000);\n}", "function showLoading() {\n $B.removeClass(\"js-loaded loaded-reveal\").addClass(\"show-loading...
[ "0.68288267", "0.6773165", "0.67679703", "0.67341626", "0.65690327", "0.6504819", "0.6493884", "0.64534014", "0.6392278", "0.63875353", "0.637661", "0.6375635", "0.6326262", "0.6315794", "0.63055265", "0.62956375", "0.62952054", "0.6270665", "0.626664", "0.6258702", "0.625658...
0.0
-1
not part of the exercise
function getRandomColor() { let r = 0; let b = 255; let g = 0; //Math.round(Math.random()*255); return "rgb(" + r + "," + g + "," + b + ")"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "static private internal function m121() {}", "private public function m246() {}", "function exercise07() {}", "function exercise11() {}", "function solution(s) {\n\n}", "protected internal function m252() {}", "function exercise06() {}", "transient protected i...
[ "0.61473906", "0.60381895", "0.598922", "0.5901573", "0.5889553", "0.5886507", "0.5739726", "0.57042366", "0.55252826", "0.5421095", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", "0.5411926", ...
0.0
-1
return null if not exist
getDataFromEntry(entry){ let _item = this.getFromEntry(entry); if(this._isNullItem(_item)) return null; ON_LOG && console.log('getDataFromEntry' , entry, _item); return _item.data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "returnIfExists(obj, objName){\n if(obj === undefined) throw new ResourceNotFoundError;\n else return obj;\n }", "existingTransaction(public_key) {\n //if not found it will return undefined\n return this.transactions.find(t => t.input.address === public_key);\n }", "exist(item, queue) {\n const...
[ "0.64312327", "0.60549015", "0.5884978", "0.5881601", "0.58322734", "0.58243716", "0.57100135", "0.56679565", "0.56560344", "0.5649606", "0.5585518", "0.558171", "0.5577484", "0.55733746", "0.5554513", "0.55503833", "0.55462927", "0.55455405", "0.55378", "0.5533017", "0.55273...
0.0
-1
componentDidMount(): send request to get employees
async componentDidMount() { await this.getEmployeeJobData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount(){\n this.fetchEmployees();\n }", "componentDidMount() {\n this.fetchEmployeeData();\n }", "componentDidMount() {\n this.props.fetchEmployees();\n }", "componentDidMount() {\n this.getEmployees();\n }", "componentDidMount(){\n this.getEmployees();\...
[ "0.83849853", "0.8193695", "0.8080642", "0.80745906", "0.8037596", "0.7969767", "0.7950717", "0.79181176", "0.7917118", "0.78887147", "0.78495103", "0.78040934", "0.7787226", "0.7764372", "0.77525", "0.77096456", "0.7670477", "0.7670477", "0.7669678", "0.7650656", "0.7638295"...
0.7068158
41
getEmployees(): retrieve employee data from server by ID
getEmployeeData(employeeID) { axios({ method: 'get', url: 'http://157.230.172.148:3000/api/User/' + employeeID }) .then((response) => { console.log(response.data); var joined = this.state.employeeData.concat(response.data); this.setState({ employeeData: joined }); }) .c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEmployees(req, res, next) {\n var id = parseInt(req.params.id);\n db.query(\"SELECT * FROM users WHERE id_entreprise = ?\", id, function (error, results, fields) {\n if (error)\n res.status(500)\n .json({\n status: \"ko\",\n d...
[ "0.7647195", "0.7308158", "0.7272167", "0.7231006", "0.7220285", "0.72154903", "0.7209296", "0.7154747", "0.7139743", "0.7137463", "0.71090627", "0.7105582", "0.7092697", "0.706308", "0.70229095", "0.70127225", "0.70068526", "0.6992959", "0.69889885", "0.6962722", "0.69527036...
0.0
-1
getEmployeeJobData(): retrieve employee job data from server
getEmployeeJobData() { axios({ method: 'get', url: 'http://157.230.172.148:3000/api/queries/findJobs?managerID=resource%3Aorg.pow.app.User%23' + uuidv3(store.getState().email, uuidv3.URL) }) .then((response) => { console.log(response); this.populateEmployeeData(response.data); })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestJobData(event, callback) {\n\t\n var options = { \n\t method: 'GET',\n url: 'https://api.servicem8.com/api_1.0/job/' + event.eventArgs.jobUUID + '.json',\n auth: {\n bearer: event.auth.accessToken\n }\n };\n\n //Make Request to ServiceM8 API\n request(options, function (e...
[ "0.6471585", "0.63663083", "0.6310343", "0.6196553", "0.61338365", "0.6101689", "0.6099259", "0.60925925", "0.60368615", "0.5956124", "0.5873185", "0.58530164", "0.58358085", "0.5818223", "0.5758793", "0.5676728", "0.56721145", "0.56592", "0.56446093", "0.5621554", "0.5617158...
0.66167104
0
populateEmployeeData(): populate employee data variables from job and user list
async populateEmployeeData(data) { let jobs = []; for (let i = 0; i < data.length; i++){ if (data[i].employee !== 'resource:org.pow.app.User#' + uuidv3(store.getState().email, uuidv3.URL) && typeof(data[i].endDate) === 'undefined') { await this.getEmployeeData(data[i].employee.split('#...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillEmployeeList(){\n var divList, division, divName, empList, employee, empName, tempList;\n tempList = [];\n divList = company[0].divisions;\n for(var i = 0, dCount = divList.length; i < dCount; i++) {\n division = divList[i];\n divName = division.divisionName;\n empList...
[ "0.63280034", "0.626249", "0.62357914", "0.6178332", "0.61088705", "0.61025083", "0.6067165", "0.59434354", "0.5899673", "0.5896165", "0.58639866", "0.5827233", "0.58237845", "0.5816457", "0.58132493", "0.58091855", "0.5774632", "0.574736", "0.5734261", "0.5682039", "0.567614...
0.72014844
0
renderEmployees(): render employee data
renderEmployees() { let employees = [] for (let i = 0; i < this.state.employeeJobs.length; i++){ let job = this.state.employeeJobs[i] employees.push( <div key={job.startDate} as="li"> <Card style={{ width: '18rem' }}> <Card.Body> <Card.Title>{job.jobTitle}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderEmployeesData () {\n fetch(\"http://localhost:3000/api/employees/getEmployee\").then(res => {\n return res.json()\n }).then(data => {\n data.map(i => {\n const html = `\n <td>${i.id}</td>\n <td>${i.name}</td>\n <td>${i.mail}...
[ "0.76517296", "0.7400849", "0.7249863", "0.7070262", "0.7009761", "0.69917333", "0.6991701", "0.6823743", "0.67636746", "0.6644696", "0.66193485", "0.6584044", "0.6582145", "0.65719664", "0.65155816", "0.65073514", "0.64905083", "0.644651", "0.64399576", "0.6414418", "0.64013...
0.0
-1
initialize instance by generate all operations from operations passed in parameter
constructor(someGeneratorMusaicPcsOperation) { this.operations = Group.buildOperationsGroupByCaylayTable(someGeneratorMusaicPcsOperation) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateOperations() {\n if (this._Operations) {\n return;\n }\n\n this._signHeadersList = this._signHeadersList || this.signHeadersList; // backward support\n this._serviceName = this._serviceName || this.serviceName;\n this._serviceVersion = this._serviceVersion || this.serviceVersion;\n\n ...
[ "0.69607323", "0.64687884", "0.64146584", "0.6363052", "0.63026553", "0.6224885", "0.6146677", "0.6074444", "0.60694635", "0.604268", "0.604268", "0.601469", "0.5948372", "0.5782247", "0.578042", "0.5755436", "0.571319", "0.57022375", "0.5697326", "0.5697326", "0.5693193", ...
0.6537328
1
Tipo de dato funcion
function suma(a, b){ return a+b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dataType(){\n\n}", "function tipoDado(dado){\n return typeof dado;\n}", "function whatIsIt(data) { //create the function with a data argument\n return typeof(data) //return the data type\n}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion ...
[ "0.69516695", "0.611898", "0.6067513", "0.5975124", "0.5975124", "0.5975124", "0.5915588", "0.58746064", "0.58746064", "0.58135784", "0.5745509", "0.5688592", "0.5688592", "0.5688592", "0.56532484", "0.56131643", "0.559309", "0.5587066", "0.55825645", "0.55825645", "0.5582564...
0.0
-1
chdir to local module root
function changeDir() { return resolvePackageRoot('package.json').then(root => { /* istanbul ignore if: Situation very hard to reproduce */ if (!root.packageJson) { throw new Error( 'package.json not found!\n' + 'Please run me from within a node module.\n' + 'My ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cwd () {\n return cwd;\n }", "function fakeCWD() {\n return cwd() + fake;\n }", "static _getSpaceRoot(){\n return process.cwd(); //path.dirname(module.parent.paths[0])\n }", "function cleanCacheAndChageCwd(dir) {\n delete require.cache[require.resolve('../src/config')];\n delete requi...
[ "0.5836116", "0.575188", "0.5669876", "0.56378925", "0.5604876", "0.55973935", "0.55815053", "0.5512329", "0.54543644", "0.54135144", "0.53214824", "0.5320765", "0.5257048", "0.5249179", "0.52454823", "0.5198909", "0.51855797", "0.5165069", "0.514514", "0.51229924", "0.510361...
0.70959586
0
This function requires the password to already exist and be cached.
retrieveCachedPassword() { if (!this.cachedPassword) { // Obviously some functionality requires the password, but we // don't have it yet. // The best we can do is spawn reading and caching asynchronously, // this will cause the password to be available once the user // retries the cur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setCachedPassword(pwd){\n cachedPassword = pwd;\n }", "static fromPassword(password) {\n return { generatePassword: false, password };\n }", "checkPassword(pass) {\n // Hash the password and then check against the hash for extra security :^), I, however, ain't doing that here.\n const SECRE...
[ "0.7953601", "0.6386987", "0.62744534", "0.62062234", "0.6166208", "0.6088015", "0.60634387", "0.5940785", "0.5926195", "0.59059215", "0.5888946", "0.5871109", "0.58689463", "0.586162", "0.58497155", "0.58441293", "0.582854", "0.58265686", "0.5818371", "0.58177406", "0.580746...
0.71472275
1
This function may trigger password creation, if necessary
async retrieveOpenPGPPassword() { EnigmailLog.DEBUG("masterpass.jsm: retrieveMasterPassword()\n"); await this.ensurePasswordIsCached(); return this.cachedPassword; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_password() {\n base.emit(\"generate-password\", {\n url: document.location.toString(),\n username: find_username(),\n });\n }", "function generatePassword() {\n var pw = mainForm.master.value,\n sh = mainForm.siteHost.value;\n\n // Don't...
[ "0.75292623", "0.7340143", "0.72899485", "0.72534627", "0.7158986", "0.7050893", "0.70213467", "0.6991188", "0.6944373", "0.6922057", "0.6906582", "0.6896474", "0.6896009", "0.6879186", "0.6855292", "0.685135", "0.6849732", "0.6837781", "0.6837404", "0.6835037", "0.6827837", ...
0.0
-1
triggered on various doc ready events
function onReady( event ) { // bail if already triggered or IE8 document is not ready just yet var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete'; if ( docReady.isReady || isIE8NotReady ) { return; } trigger(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() functi...
[ "0.7519627", "0.74466544", "0.74466544", "0.7433517", "0.7413093", "0.7402056", "0.73957306", "0.73957306", "0.7317836", "0.72398555", "0.721288", "0.7160247", "0.7140437", "0.71345466", "0.71240044", "0.7050046", "0.7004576", "0.6997813", "0.6997813", "0.6997813", "0.6997813...
0.6641917
60
Class for managing events. Can be extended to provide event functionality in other classes.
function EventEmitter() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventClass() {}", "function Event() {\n let events = {};\n let last = undefined;\n this.on = function(evt, handler) {\n (events[evt] || (events[evt] = [])).push(handler);\n } \n this.emit = function(evt, ...arg) {\n last = evt;\n for(let item of events[evt])\n item(...
[ "0.74709177", "0.72577137", "0.7088683", "0.6984273", "0.6984273", "0.6937129", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", "0.69335496", ...
0.0
-1
helpers // get a number from a string, not a percentage
function getStyleSize( value ) { var num = parseFloat( value ); // not a percent like '100%', and a number var isValid = value.indexOf('%') === -1 && !isNaN( num ); return isValid && num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function measureToNumber(str){\n\tvar parts = str.split(\"p\");\n\tvar val = parts[0];\n\tval = Number(val);\n\treturn val;\n}", "function stringToNumber(string) {\r\n // parseXXX interpretiert einen Punkt immer als Dezimaltrennzeichen\r\n var returnValue = \"\";\r\n var percent = false;\r\n // Buchs...
[ "0.7677354", "0.7292998", "0.7140811", "0.7128982", "0.69619435", "0.6959351", "0.69154835", "0.6903902", "0.67870355", "0.67828125", "0.6771369", "0.67198145", "0.67067134", "0.6705655", "0.66444874", "0.6621286", "0.66016775", "0.6593742", "0.6553171", "0.6553171", "0.65531...
0.0
-1
setup vars and functions do it on initial getSize(), rather than on script load For Firefox bug
function setup() { // setup once if ( isSetup ) { return; } isSetup = true; var getComputedStyle = window.getComputedStyle; getStyle = ( function() { var getStyleFn = getComputedStyle ? function( elem ) { return getComputedStyle( elem, null ); } : function( elem ) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initSize(){\n\t\t$this.css({\n\t\t\twidth\t: params.width,\n\t\t\theight\t: params.height\n\t\t});\n\t\t\n\t\t$('body').css({\n\t\t\twidth\t: params.width,\n\t\t\theight\t: params.height\n\t\t});\n\n\t\t$this.find('.lsd-box').each(function(){\n\t\t\t$(this).css({\n\t\t\t\twidth\t: params.width,\n\t\t\t\th...
[ "0.7191545", "0.6806995", "0.6755936", "0.67360145", "0.6707767", "0.6694855", "0.6687263", "0.6654907", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", "0.6627398", ...
0.675789
7
IE8 returns percent values, not pixels taken from jQuery's curCSS
function mungeNonPixel( elem, value ) { // IE8 and has percent value if ( window.getComputedStyle || value.indexOf('%') === -1 ) { return value; } var style = elem.style; // Remember the original values var left = style.left; var rs = elem.runtimeStyle; var rsLeft = rs && rs.left; // Put in the n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curCSS(elem, prop) {\n var value,\n pixel,\n unit,\n rvpos = /^top|bottom/,\n outerProp = [\"paddingTop\", \"paddingBottom\", \"borderTop\", \"borderBottom\"],\n innerHeight,\n parent,\n i = 4; // outerProp.length\n \n if (getComputedStyle) {\n ...
[ "0.7013315", "0.5806784", "0.5796477", "0.5784483", "0.57773995", "0.57736987", "0.5760651", "0.5753687", "0.5753687", "0.5753687", "0.5753687", "0.57495964", "0.5720688", "0.5694006", "0.56810033", "0.56525624", "0.56374526", "0.5634937", "0.5634937", "0.5634937", "0.5634937...
0.5765661
12
query // fall back to using QSA
function query( elem, selector ) { // append to fragment if no parent checkParent( elem ); // match elem with all selected elems of parent var elems = elem.parentNode.querySelectorAll( selector ); for ( var i=0, len = elems.length; i < len; i++ ) { // return true if match if ( elems[i] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "query() { }", "function LQuery() {}", "function LQuery() {}", "function LQuery() {}", "function TQuery() {}", "function TQuery() {}", "function TQuery() {}", "async query(query) {\n\n }", "function ______MA_Query() {}", "function query()\n{\n return query_start(0, -1)\n}", "function LQuery() ...
[ "0.7057861", "0.68653244", "0.68653244", "0.68653244", "0.68376017", "0.68376017", "0.68376017", "0.67666537", "0.67477953", "0.6725346", "0.6719836", "0.6719836", "0.6651606", "0.66207224", "0.6576635", "0.6576635", "0.6576635", "0.65610373", "0.65610373", "0.6498335", "0.64...
0.0
-1
helpers // extend objects
function extend( a, b ) { for ( var prop in b ) { a[ prop ] = b[ prop ]; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend() {}", "extend() {}", "function extend(a,b){for(var prop in b){a[prop]=b[prop];}return a;}", "function ExtraMethods() {}", "function _extend(){\n\t \n\t\tvar out = {};\n\t\t\n\t\t//Itterate over all objects and copy each property\n\t\t// shallow copy only \n\t\tvar len = arguments.length;\n\t\tfo...
[ "0.65491366", "0.65491366", "0.6241516", "0.6193384", "0.6184945", "0.6184535", "0.6170308", "0.61424136", "0.61262864", "0.61262864", "0.61262864", "0.61212605", "0.60223323", "0.5989742", "0.59867513", "0.59867513", "0.59615767", "0.5882699", "0.5867043", "0.58626276", "0.5...
0.0
-1
turn element or nodeList into an array
function makeArray( obj ) { var ary = []; if ( isArray( obj ) ) { // use object if already an array ary = obj; } else if ( obj && typeof obj.length === 'number' ) { // convert nodeList to array for ( var i=0, len = obj.length; i < len; i++ ) { ary.push( obj[i] ); } } else { // arra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToArray(nodes){\n var array = null;\n try {\n array = Array.prototype.slice.call(nodes, 0); //non-IE and IE9+\n } catch (ex) {\n array = new Array();\n for (var i=0, len=nodes.length; i < len; i++){\n array.push(nodes[i]);\n }\n }\n return array...
[ "0.7361989", "0.7308388", "0.7308388", "0.729898", "0.7279939", "0.7265269", "0.72267294", "0.7116159", "0.7040728", "0.7029587", "0.69996554", "0.6957603", "0.6861447", "0.68188804", "0.66965497", "0.6689172", "0.6598793", "0.65931666", "0.6518876", "0.647441", "0.6451992", ...
0.0
-1
masonryDefinition // used for AMD definition and requires
function masonryDefinition( Outlayer, getSize ) { // create an Outlayer layout class var Masonry = Outlayer.create('masonry'); Masonry.prototype._resetLayout = function() { this.getSize(); this._getMeasurement( 'columnWidth', 'outerWidth' ); this._getMeasurement( 'gutter', 'outerWidth' ); this.me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMasonry() {\n window.myMasonry = new Masonry(document.querySelector(`.${CLASSES.MASONRY}`))\n }", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _g...
[ "0.69669485", "0.6723414", "0.6723414", "0.6723414", "0.6723414", "0.6723414", "0.6715945", "0.66956985", "0.64908195", "0.6481541", "0.6476408", "0.6460429", "0.63886654", "0.63648146", "0.6330003", "0.62155026", "0.6128444", "0.607041", "0.60456526", "0.5989751", "0.5908396...
0.6330003
21
helpers // extend objects
function extend( a, b ) { for ( var prop in b ) { a[ prop ] = b[ prop ]; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend() {}", "extend() {}", "function extend(a,b){for(var prop in b){a[prop]=b[prop];}return a;}", "function ExtraMethods() {}", "function _extend(){\n\t \n\t\tvar out = {};\n\t\t\n\t\t//Itterate over all objects and copy each property\n\t\t// shallow copy only \n\t\tvar len = arguments.length;\n\t\tfo...
[ "0.65491366", "0.65491366", "0.6241516", "0.6193384", "0.6184945", "0.6184535", "0.6170308", "0.61424136", "0.61262864", "0.61262864", "0.61262864", "0.61212605", "0.60223323", "0.5989742", "0.59867513", "0.59867513", "0.59615767", "0.5882699", "0.5867043", "0.58626276", "0.5...
0.0
-1
masonryDefinition // used for AMD definition and requires
function masonryDefinition( LayoutMode, Masonry ) { // create an Outlayer layout class var MasonryMode = LayoutMode.create('masonry'); // save on to these methods var _getElementOffset = MasonryMode.prototype._getElementOffset; var layout = MasonryMode.prototype.layout; var _getMeasurement = MasonryMode.pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMasonry() {\n window.myMasonry = new Masonry(document.querySelector(`.${CLASSES.MASONRY}`))\n }", "function masonryDefinition( LayoutMode, Masonry ) {\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n // save on to these methods\n var _g...
[ "0.6967798", "0.6717626", "0.66983855", "0.64926636", "0.64823717", "0.6478784", "0.6462467", "0.63906384", "0.63662136", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.63321126", "0.62169874", "0.61305934", "0.60737664", ...
0.6724973
5
helpers // extend objects
function extend( a, b ) { for ( var prop in b ) { a[ prop ] = b[ prop ]; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend() {}", "extend() {}", "function extend(a,b){for(var prop in b){a[prop]=b[prop];}return a;}", "function ExtraMethods() {}", "function _extend(){\n\t \n\t\tvar out = {};\n\t\t\n\t\t//Itterate over all objects and copy each property\n\t\t// shallow copy only \n\t\tvar len = arguments.length;\n\t\tfo...
[ "0.65491366", "0.65491366", "0.6241516", "0.6193384", "0.6184945", "0.6184535", "0.6170308", "0.61424136", "0.61262864", "0.61262864", "0.61262864", "0.61212605", "0.60223323", "0.5989742", "0.59867513", "0.59867513", "0.59615767", "0.5882699", "0.5867043", "0.58626276", "0.5...
0.0
-1
turn element or nodeList into an array
function makeArray( obj ) { var ary = []; if ( isArray( obj ) ) { // use object if already an array ary = obj; } else if ( obj && typeof obj.length === 'number' ) { // convert nodeList to array for ( var i=0, len = obj.length; i < len; i++ ) { ary.push( obj[i] ); } } else { // arra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToArray(nodes){\n var array = null;\n try {\n array = Array.prototype.slice.call(nodes, 0); //non-IE and IE9+\n } catch (ex) {\n array = new Array();\n for (var i=0, len=nodes.length; i < len; i++){\n array.push(nodes[i]);\n }\n }\n return array...
[ "0.7361989", "0.7308388", "0.7308388", "0.729898", "0.7279939", "0.7265269", "0.72267294", "0.7116159", "0.7040728", "0.7029587", "0.69996554", "0.6957603", "0.6861447", "0.68188804", "0.66965497", "0.6689172", "0.6598793", "0.65931666", "0.6518876", "0.647441", "0.6451992", ...
0.0
-1
isotopeDefinition // used for AMD definition and requires
function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) { // create an Outlayer layout class var Isotope = Outlayer.create( 'isotope', { layoutMode: "masonry", isJQueryFiltering: true, sortAscending: true }); Isotope.Item = Item; Isotope.LayoutMode = LayoutMode; Isot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: \"masonry\",\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = Lay...
[ "0.66426724", "0.65913916", "0.6232765", "0.6061513", "0.580566", "0.57968706", "0.57762825", "0.57542247", "0.571722", "0.56825715", "0.5622882", "0.5607108", "0.56070954", "0.55565923", "0.5520914", "0.54793626", "0.54765755", "0.5461874", "0.5448353", "0.5448353", "0.54483...
0.66426724
4
add a magic layer to sorters for convienent shorthands `.foobar` will use the text of .foobar querySelector `[foobar]` will use attribute you can also add parser `.foobar parseInt` will parse that as a number
function mungeSorter( sorter ) { // if not a string, return function or whatever it is if ( typeof sorter !== 'string' ) { return sorter; } // parse the sorter string var args = trim( sorter ).split(' '); var query = args[0]; // check if query looks like [an-attribute] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter !== 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [a...
[ "0.60570204", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.60109055", "0.58911276", "0.58325964", "0.58073056", "0.57278776", "0.57263935", "0.55910444", "0.55197436", "0.55063754", "0.54884624", "0.5462685", "0.5450497", ...
0.59969026
13
get an attribute getter, or get text of the querySelector
function getValueGetter( attr, query ) { var getValue; // if query looks like [foo-bar], get attribute if ( attr ) { getValue = function( elem ) { return elem.getAttribute( attr ); }; } else { // otherwise, assume its a querySelector, and get its text ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueGetter( attr, query ) {\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n return function getAttribute( elem ) {\n return elem.getAttribute( attr );\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return fu...
[ "0.7468154", "0.7468154", "0.7468154", "0.7468154", "0.7468154", "0.7468154", "0.742081", "0.73804647", "0.7353638", "0.7309144", "0.6794398", "0.66687435", "0.65556467", "0.64710164", "0.6337211", "0.63250375", "0.6238788", "0.622035", "0.62196165", "0.62012124", "0.6175201"...
0.74727523
6
returns a function used for sorting
function getItemSorter( sortBys, sortAsc ) { return function sorter( itemA, itemB ) { // cycle through all sortKeys for ( var i = 0, len = sortBys.length; i < len; i++ ) { var sortBy = sortBys[i]; var a = itemA.sortData[ sortBy ]; var b = itemB.sortData[ sortBy ]; if ( a ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function GetSortOrder(prop) { \n ...
[ "0.7409723", "0.7409723", "0.7409723", "0.7409723", "0.7340594", "0.72998416", "0.72825414", "0.7168141", "0.7015041", "0.7015041", "0.6978145", "0.6969056", "0.69666415", "0.695595", "0.6939071", "0.69379956", "0.69276094", "0.68985426", "0.6839244", "0.6794043", "0.67714655...
0.0
-1
Set the proper sizes on the containers and animate the content in.
function _showContent(){ $('.pp_loaderIcon').hide(); // Calculate the opened top position of the pic holder projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2)); if(projectedTop < 0) projectedTop = 0; $ppt.fadeTo(settings.animation_speed,1); // Resize t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateContainers() {\n\n\t\tvar width = editor.duration * scale;\n\n\t\telements.setWidth( width + 'px' );\n\t\t// curves.setWidth( width + 'px' );\n\n\t}", "function update_containersize() {\n $container.css(\"width\", $('.showcase-container').width() + \"px\");\n $contain...
[ "0.7067571", "0.6767865", "0.63932145", "0.63348746", "0.6330082", "0.6145131", "0.6112355", "0.6102201", "0.60916644", "0.6046078", "0.60222137", "0.5977769", "0.5964004", "0.59455013", "0.5906499", "0.5906409", "0.58991355", "0.5882533", "0.5869694", "0.5866514", "0.5862041...
0.0
-1
jquery.mb.components file: jquery.mb.CSSAnimate.min.js Copyright (c) 20012014. Matteo Bicocchi (Pupunzi); Open lab srl, Firenze Italy
function uncamel(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cssAnimate() {\n if (!$html.hasClass('mobile') && !$html.hasClass('tablet') && $deviceWidth > 991){\n $('.css-animate .animated').each(function(){\n var that = $(this);\n if (that.data('time') != undefined){\n var delay...
[ "0.60487944", "0.6037184", "0.59176666", "0.59040475", "0.5879557", "0.5792923", "0.57873374", "0.57873374", "0.57844585", "0.5718775", "0.5712681", "0.57014394", "0.5682254", "0.5651477", "0.5640681", "0.5638695", "0.5625145", "0.5622495", "0.56218684", "0.56032646", "0.5596...
0.0
-1
Get the path of the calling function
function callerPath () { return callsites()[2].getFileName() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCallSite() {\n var _callsite = require('callsite');\n var stack = _callsite();\n return stack[2].getFileName();\n}", "_getCallerFilePath() {\n // we are going to temporarily override this method. Keep for restore\n const originalPrepareStackTrace = Error.prepareStackTrace;\n let cal...
[ "0.74142987", "0.7273654", "0.6920318", "0.67531073", "0.64724183", "0.6460719", "0.6456305", "0.63621545", "0.63621545", "0.63621545", "0.63621545", "0.63621545", "0.63055223", "0.6286492", "0.62777734", "0.6235695", "0.61994344", "0.61994344", "0.61994344", "0.61994344", "0...
0.8576753
0
ISMonkey is an extension manager that sets up the required MutationObservers and serv socket to be used throughout.
constructor() { this.socketEventList = []; this.asyncExtensionList = []; this.extensions = {}; this.setupSocket(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createObservers() {\n // NOTE: We need to wait for Google to bring Proxy to V8\n // if (this.targetElement.__scripts__) {\n // this.scriptsObserver = new MutationObserver((changes) => { this.scriptsObserver(changes) });\n // this.scriptsObserver.observe(this.targetElement.__scripts__, {\n // ...
[ "0.58892566", "0.56777346", "0.5651061", "0.5648696", "0.55705243", "0.55581474", "0.5512674", "0.5470776", "0.54489964", "0.54282284", "0.5424709", "0.53782004", "0.5361406", "0.5340631", "0.5337724", "0.53351724", "0.53039384", "0.5295105", "0.5269418", "0.52634704", "0.526...
0.63114315
0
Wait for socket to initialize and attach to this class
setupSocket() { var self = this; self.sockets = []; const nativeWebSocket = window.WebSocket; window.WebSocket = function(...args){ const socket = new nativeWebSocket(...args); self.sockets.push(socket); return socket; }; let setupThisSocket = setInterval( ()=> { if( self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n // Setup event handlers for the socket\n this._setListeners(() => {\n // Check that connection limit is not exceeded\n if (this._server.options.maxClients && this._server.connections.size > this._server.options.maxClients) {\n return this.send(421, this...
[ "0.68476427", "0.651948", "0.647879", "0.64008003", "0.639745", "0.6349572", "0.62837666", "0.62748325", "0.6223804", "0.6188059", "0.61699563", "0.61507505", "0.61489654", "0.6145473", "0.60656625", "0.6057952", "0.6020551", "0.6012586", "0.60074705", "0.60071814", "0.598991...
0.6243299
8
Message handler for sockets
messageHandler(self, e) { let msg = ( (e.data).match(/^[0-9]+(\[.+)$/) || [] )[1]; if( msg != null ) { let msg_parsed = JSON.parse(msg); let [r, data] = msg_parsed; self.socketEventList.forEach(e=>e.run(self, msg_parsed)) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function on_socket_get(message){}", "messageHandler(socket) \n\t{\n \t\tsocket.on('message', message => {\n \t\tconst data = JSON.parse(message);\n \t\t\tswitch(data.type) \n\t\t\t{\n\t\t\t\t//when another user has a more updated chain.\t\n \t\t\tcase MESSAGE_TYPES.chain:\n \t\t\t\tt...
[ "0.7745768", "0.74620575", "0.7308119", "0.72853595", "0.7258418", "0.7257197", "0.72418344", "0.7159801", "0.71552956", "0.70685583", "0.7066578", "0.70626765", "0.6992909", "0.6958702", "0.6953015", "0.68796885", "0.6863429", "0.68510634", "0.68408895", "0.68231964", "0.678...
0.73357785
2
Process the mito genome data for the species
function processGenomeData(data) { // Grab the json object and point to it species = data; // Go through each species and make a link within each gene to the species that have that same gene species.forEach(function(s,i,species){ s.className = s.name.toLowerCase(); s.children = []; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process(data, index) {\n\tvar genusnames = [];\n\tvar genusdata = [];\n\tvar scinames = [];\n\tvar commonnames = [];\n\tvar familynamesorder = [];\n\n\tdata.forEach(function(d, i) {\n\t\tvar genusname = d.Genus;\n\t\tvar speciesname = d.Species;\n\t\tscinames.push(genusname+\" \"+speciesname);\n\t\tcommon...
[ "0.60182375", "0.53649324", "0.51267236", "0.5099687", "0.5051486", "0.5050544", "0.50472206", "0.49357596", "0.4868669", "0.48440567", "0.48330766", "0.4827659", "0.47482184", "0.47293627", "0.46967876", "0.46754628", "0.4672893", "0.46518546", "0.4643247", "0.46176526", "0....
0.6727379
0
Singletons reduce the need for global variables which is particularly important in JavaScript because it limits namespace pollution and associated risk of name collisions. used to limit the instances of an object
function Process (state) { this.state = state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getInstances() {}", "function getGlobalSingleton(name, creator, obj) {\n\t const gbl = (obj || GLOBAL_OBJ) ;\n\t const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n\t const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n\t return singleton;\n\t}", "function Singleton4(){\n var ...
[ "0.7317474", "0.67109156", "0.67099917", "0.6657178", "0.66014254", "0.6596127", "0.65407056", "0.65263945", "0.65045744", "0.6471072", "0.6416741", "0.641034", "0.63688946", "0.62925243", "0.6249524", "0.6154226", "0.61505175", "0.61474687", "0.61303204", "0.6113948", "0.611...
0.0
-1
alert("This is utilities."); Create, using random number generation, an objectID that has twenty alpha characters. Each five tuple is separated with a hyphen.
function getObjectID() { var objectID = ""; for ( var i=1; i<21; i++ ) { objectID += String.fromCharCode(Math.floor(Math.random()*26) + 97); if ( i<20 && (i % 5) == 0 ) objectID += "-"; } return objectID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeid()\r\n{\r\n var text = \"\";\r\n var possibleChar = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n var possibleDigit = \"0123456789\";\r\n\r\n getChar = function(list) {\r\n return list.charAt(Math.floor(Math.random() * list.length));\r\n }\r\n\r\n for( var i=0; i < 3; i++ ) {\r\n t...
[ "0.7247468", "0.7102937", "0.70985705", "0.7086636", "0.70742923", "0.70557064", "0.7053491", "0.705127", "0.7048619", "0.7031226", "0.7028278", "0.70241296", "0.702244", "0.69722724", "0.69617957", "0.6957385", "0.6953451", "0.6920514", "0.68363804", "0.68216544", "0.678737"...
0.76057535
0
Remove apostrophe's from string data. Put &pos; in for each apostrophe
function scrub(targetStr) { var pieces = targetStr.split("'"); return pieces.join("$pos;"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decodeApos(input)\n{\n var decoded= input.replace(/&apos/g, \"'\");\n return decoded;\n}", "function encodeApos (input)\n{\n\n var encoded = input.replace(/'/g, \"&apos\");\n return encoded;\n}", "function cleanUpString(strSpecials) \n{\n strSpecials = stripString(strSpecials, \"%20\", \" \");\...
[ "0.673267", "0.64428586", "0.6187874", "0.6163192", "0.6098955", "0.60353136", "0.6021125", "0.59356993", "0.5935117", "0.5911188", "0.5852808", "0.58519936", "0.5844899", "0.5796042", "0.57919323", "0.5764593", "0.57337195", "0.5731774", "0.57267904", "0.56957114", "0.568411...
0.5829306
13
Remove &pos; and put an apostrophe in it's place.
function deScrub(targetStr) { var pieces = targetStr.split("$pos;"); return pieces.join("'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodeApos (input)\n{\n\n var encoded = input.replace(/'/g, \"&apos\");\n return encoded;\n}", "function nombreApostrophe(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \"\\'\");\n\n }// Fin fonction nombreApostrophe", "function decodeApos(input)\n{\n var decoded= input....
[ "0.6993814", "0.6514727", "0.64364284", "0.6206697", "0.6002778", "0.59864473", "0.5856786", "0.584421", "0.5826095", "0.5823395", "0.5762392", "0.57186097", "0.5704725", "0.56562454", "0.56387025", "0.56272286", "0.559855", "0.55844283", "0.5533374", "0.55012864", "0.5488313...
0.53425676
39
Look at the named contents of an object.
function viewer(obj) { var names = ""; for ( var name in obj ) names += name + " : " + obj[name]+"\n"; alert(names); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getObjectFromName(person){\n return person.name == nameFilter;\n}", "function accessObject(obj, propsearch,){\n\n return obj[propsearch]\n }", "function getObjectByName(objName) {\n var objFound;\n var runTime = _pGlob !== undefined;\n objFound = runTime ? _pGlob.objCache[objName] : null...
[ "0.60982627", "0.60008705", "0.5816609", "0.58067375", "0.5801168", "0.5764591", "0.57578754", "0.572141", "0.5691657", "0.5662396", "0.5662396", "0.55170155", "0.547605", "0.5464212", "0.545325", "0.5446512", "0.5431314", "0.5430741", "0.5405769", "0.5397522", "0.5395788", ...
0.5653257
11
From Flanagan, Javascript: The Definitive Guide. Creates closures. Will be used for current goal protection.
function makeProperty( obj, name, predicate ) { var value; // this is the property value, current goal in this application. obj["get" + name] = function() { return value; }; obj["set" + name] = function(v) { if ( predicate && !predicate(v)) throw "set" + name + ": invalid value " + v; else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Closure() {\r\n}", "function makeClosure(names, body, env) {\n return {\n \"names\": names,\n\t\"body\": body,\n\t\"type\": 'closure',\n\t\"*parent\": env\n };\n }", "function closureMaker() {\n var outerVar = 5;\n return function() {\n return outerVar * 2; // V...
[ "0.7527612", "0.71964943", "0.6963913", "0.69183064", "0.68499804", "0.6813076", "0.6786975", "0.67500824", "0.6679287", "0.66312546", "0.65363795", "0.6506293", "0.6467322", "0.64574903", "0.64126235", "0.63645554", "0.63632935", "0.6355544", "0.6337054", "0.6320832", "0.628...
0.0
-1
Remove blanks from either end of a string
function trim( str ) { var len = str.length; var begin = 0; var end = len; while ( str.charAt(begin) == " " ) begin++; while ( str.charAt(end-1) == " " ) end--; return str.slice(begin, end); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeBlanksTwo(str){\n if(typeof str !== \"string\"){\n return 0;\n }\n var arr = [];\n for(var idx = 0; idx < str.length; idx++){\n if(str[idx] != \" \"){\n arr.push(str[idx]);\n }\n }\n return arr.join(\"\");\n}", "function removeLastBlank (str) {\n if (str.substring(str.length-1...
[ "0.7171458", "0.7011805", "0.6888704", "0.68765384", "0.6875653", "0.686164", "0.68577707", "0.6852554", "0.6843471", "0.67992944", "0.6777462", "0.67665887", "0.67292273", "0.6699136", "0.6664825", "0.6654225", "0.66280085", "0.6607912", "0.66030747", "0.658341", "0.6569457"...
0.0
-1
ensures it loops if this sound is the last one
function playNext(i) { if ((currentSound + 1) == soundsCount) { soundManager.play('0'); } else { soundManager.play((currentSound + 1).toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextIntermittentSound() {\n\t\tthat.intermittentSound.play();\n\t}", "function novel_audioLoop()\n{\n novel.audio.currentTime = 0;\n novel.audio.play();\n}", "function playNextShuffled() {\n\n\t\tif (plsShuffledIndex < (plsShuffled.length - 1)) {\n\t\t\tplsShuffledIndex += 1;\n\t\t\tplay(plsShuf...
[ "0.70659846", "0.68028736", "0.6775667", "0.67327964", "0.66567105", "0.6581599", "0.6578006", "0.6558062", "0.64853835", "0.64729416", "0.64686304", "0.6423607", "0.6420766", "0.64138293", "0.63899547", "0.6377827", "0.63648427", "0.6358252", "0.63535523", "0.6276109", "0.62...
0.66651857
4
check() loop through stack and see if it is in decending order
function check(stack){ for(let i = 0; i<stack.length; i++){ if(stack[i.length]>stack[i.length-1]){ } return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isBalanced()\n\t{\n\t\tvar tempStack = [];\n\t\tfor (var i = 0; i < postFixTokens.length; i++)\n\t\t{\n\t\t\tvar type = postFixTokens[i].tokenType;\n\t\t\tif (type === tree.Token.numberType || type === tree.Token.variableType)\n\t\t\t{\n\t\t\t\ttempStack.push(1);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if...
[ "0.63197976", "0.62675774", "0.61428976", "0.6068549", "0.6058617", "0.60350573", "0.59751385", "0.59582645", "0.5871965", "0.5864983", "0.5814298", "0.58098114", "0.58072037", "0.58052045", "0.5791436", "0.57875055", "0.5768824", "0.57061416", "0.57001835", "0.5685482", "0.5...
0.7330473
0
Watch a directory with chokidar.
function watch$(directory, opts) { return Observable.create(observer => { chokidar.watch(directory, opts) .on('all', (event, path) => observer.next({ event, path })) .on('error', error => observer.error(error)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "watch (path, delay) {\n console.log('Start watching');\n this.watcher = chokidar.watch(path + '/*.csv', {\n followSymlinks: false,\n usePolling: true,\n interval: delay,\n binaryInterval: delay\n });\n this.watcher.on('change', file => this.emit('dirwatcher:changed', fs.realpathSync...
[ "0.72226524", "0.66849107", "0.66472787", "0.6535657", "0.65207285", "0.64339656", "0.6433908", "0.6400857", "0.63197666", "0.6242888", "0.6195221", "0.6151391", "0.6048706", "0.6011174", "0.59751934", "0.5971008", "0.59279495", "0.58923984", "0.5878654", "0.5869194", "0.5862...
0.7454526
0
Your Own Tests (OPTIONAL)
function assert(test, message, test_number) { if (!test) { console.log(test_number + "false"); throw "ERROR: " + message; } console.log(test_number + "true"); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AssertTests() {\n}", "function runTests() {\n\ttestBeepBoop();\n\ttestGetDigits();\n}", "function testRun()\r\n{\r\n}", "function startAllTests(){ \n testGetObjectFromArrays();\n testNormalizeHeader();\n testFillInTemplateFromObject();\n testIsCellEmpty();\n testIsAlnum();\n testIsDigit();\n}"...
[ "0.7311142", "0.7215576", "0.7158614", "0.71497166", "0.71375585", "0.71282643", "0.70235884", "0.6965342", "0.6860747", "0.6740041", "0.66761136", "0.667204", "0.6596801", "0.6586652", "0.6574469", "0.6573143", "0.64901686", "0.64839154", "0.64821684", "0.6464145", "0.645558...
0.0
-1
List all the topics for the currentuser
loadTopics({commit}){ HTTP.get('v1/api/topic', { handlerEnabled: true } ). then(response => response.data). then(topics => { commit('SET_TOPICS', topics) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTopics(callback){\n\t$.ajax({\n\t\turl : \"/CampusTalk/rest/CampusTalkAPI/getTopics\",\n\t\tdatatype:'json',\n\t\ttype: \"post\",\n\t\tcontentType: \"application/json\",\n\t\tdata: JSON.stringify({}),\n\t}).done(function(data){\n\t\tcallback(data);\n\t});\n}", "get topicsInput() {\n return thi...
[ "0.61803305", "0.61785436", "0.61066526", "0.60641915", "0.6008511", "0.60060567", "0.5911542", "0.580387", "0.57592046", "0.57490987", "0.57178676", "0.5697992", "0.5683923", "0.56367725", "0.5634582", "0.5561254", "0.5525573", "0.55104434", "0.54635334", "0.5453716", "0.542...
0.5138801
59
Load Topic based on id
loadTopicById({commit}, topic_id){ HTTP.get('v1/api/topicdetail/' + topic_id + '/', { handlerEnabled: true } ). then(response => response.data) .then(topic => { commit('SET_TOPIC', topic) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTopicById(id, callback, errorCallback) {\n CommonUtil.requestAxios(\n baseServerAxios().get(\n UrlConstant.api.topic.GET_TOPIC_BY_ID.replace('{id}', id)\n ),\n callback,\n errorCallback\n );\n }", "function findTopicById(id) {\n\n $.ajax({\n type: \"GET\",\n ...
[ "0.731427", "0.7195262", "0.6999266", "0.6855958", "0.6639076", "0.6422187", "0.60510576", "0.603818", "0.60175925", "0.59948015", "0.59935004", "0.59297246", "0.5847106", "0.584337", "0.58289504", "0.5776899", "0.57743555", "0.57743555", "0.57743555", "0.57743555", "0.577435...
0.7124647
2
Load Sub Topics by IS
loadSubTopicId ({commit}, sub_topic_id){ HTTP.get('v1/api/subsection/' + sub_topic_id + '/', { handlerEnabled: true } ). then(response => response.data). then(sub_topic => { commit('SET_SUBTOPICS', sub_topic) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadTopicSubTopicTemplate(event, data) {\n var templateID = 'faq-topics-subtopic-content';\n compiledTemplates[templateID] || loadTemplate(templateID);\n var $target = $(event.target);\n var $faqSubTopics=$target.next().next('.catSubtopic');\n\n $targ...
[ "0.6476352", "0.6294281", "0.6278117", "0.6185661", "0.61538047", "0.6110893", "0.58276254", "0.58084935", "0.5701241", "0.5615093", "0.55994296", "0.5522265", "0.5520467", "0.551357", "0.5460598", "0.54537094", "0.543081", "0.53915656", "0.5388251", "0.538819", "0.5387373", ...
0.7039846
0
Method to retrieve state from Stores
function getState( id ) { return { data: PostsStore.getPost( id ) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getState() {\n return JSON.parse(device.localStorage.getItem(stateKey));\n}", "function getStateFromStores() {\n return {\n // usercontext: UserContextStore.getContext()\n\t\t// data: DeploymentOptionsStore.getData()\n }\n}", "getStores() {\n Service.get(this).getStores(state.get(this).para...
[ "0.7293229", "0.71309334", "0.7038652", "0.70127845", "0.70116407", "0.70116407", "0.6975344", "0.6927295", "0.68934685", "0.6889814", "0.68128955", "0.6798313", "0.6789322", "0.67840683", "0.67840683", "0.6767093", "0.6742998", "0.67277837", "0.6704687", "0.6565206", "0.6564...
0.0
-1
Returns OAuth2 client Arguments: config: hash containing: client, hash containing: base_url: The base URL of the OAuth2 client. Ex: process_login_url: the URL where to the OAuth2 server must redirect the user when authenticated. login_url: the URL where the user must go to be redirected to OAuth2 server for authenticat...
function createClient(conf, options) { conf.default_redirection_url = conf.default_redirection_url || '/'; options = options || {}; return new OAuth2Client(conf, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function client(config){\n \n var base = this;\n\n //Save the options\n base.config = config;\n \n //Save the oauth client\n base.oa = undefined;\n \n //If we need to take care of refresh tokens\n\t// NO SUPPORT for OAUTH 1.0\n\n\tswitch(base.config.version) {\n\n\t\t//UNTESTED!!\n\t\tca...
[ "0.7330012", "0.66052794", "0.6376369", "0.62960327", "0.62603974", "0.58576924", "0.5753702", "0.5748534", "0.5732481", "0.572979", "0.57250476", "0.57075244", "0.563945", "0.5622259", "0.56221", "0.5609895", "0.5603333", "0.5575321", "0.55725604", "0.5553623", "0.5543349", ...
0.66037315
2
3714 4963 5398 431
function cardNameValidator( id, value ) { cardNamePass = true; cardNameLength = value.length; // Get address line 1 full length if( cardNameLength === 0 ) { // Address line 1 must be present validationFeedback(id,'fail','The name on the card is required'); } if( cardNamePass === true ) { specialCharacterC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function XujWkuOtln(){return 23;/* ZmKsOtS5QoXX lb0mWOp1WF tzmhzECNSsB qvwMOaAT3w 1mLwgX9NX1bK NizTqOptq7c CGhyOP5eVff bLNG5ThH4qcd ezBAl0su8q LavV15CBaCAq IQJaG4JEgL3 bSzagyBcGVWE bCCTwHpxFnQj yPUnNOdpTe2 5tkfhofMpVj fZdI5HFCrYt Kj43mwvd1G1 46uoGhY6DHl Qfu4CFDA5e3 uQ6JljxeeIx ZZZ3BZMAn7T Lju5Vjdj8Rw wjIjRQUUVS IV...
[ "0.631982", "0.62972486", "0.6271759", "0.6257278", "0.6234962", "0.6213121", "0.6213121", "0.6213121", "0.6213121", "0.62082916", "0.61920124", "0.61620265", "0.61458206", "0.61417973", "0.6121508", "0.6118399", "0.60940874", "0.6083118", "0.6062382", "0.6060217", "0.6042763...
0.0
-1
Secondary Sales Header Report
function fnShowProductDetails() { debugger; $.ajax({ type: 'POST', url: '../HiDoctor_Reports/Reports/GetSaleProductsSS', data: 'A', success: function (response) { jsData = eval('(' + response + ')'); $('option', $("#ddlProductName")).remove(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ReportHeader(){}", "function createSalesTableHeader() {\n // Create the first header column\n var trEl = document.createElement('tr'); //create the row\n var thEl = document.createElement('th'); //create the first column cell\n thEl.textContent = 'Location';\n trEl.appendChild(thEl);\n\n // Create...
[ "0.65623784", "0.633425", "0.63253224", "0.6310888", "0.6145618", "0.6137754", "0.59976786", "0.5890791", "0.5888834", "0.5834854", "0.58341676", "0.58234566", "0.5807537", "0.5787972", "0.5787904", "0.578185", "0.57749116", "0.57097954", "0.5703845", "0.5687598", "0.56778944...
0.0
-1
StockistWise UnderOver Stock SS
function fnStockistWiseUnderOverStock() { var startMonth = fngetMonthNumber($('#txtFromDate').val().split('-')[0]); var endMonth = fngetMonthNumber($('#txtToDate').val().split('-')[0]); var startYear = $('#txtFromDate').val().split('-')[1]; var endYear = $('#txtToDate').val().split('-')[1]; if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStock() {\n\t\t\t\t\t\tupdatedStock = selectedProductDetails.stock_quantity - answer.quantity;\n\t\t\t\t\t}", "valueOfStock()\n {\n return this.numberofshare*this.shareprice\n }", "stockValue()\n {\n return this.numOfShares*this.sharePrice;\n }", "'SELL_STOCK' (state...
[ "0.6275521", "0.6199914", "0.6106506", "0.6090026", "0.6038022", "0.60004884", "0.59265095", "0.588524", "0.5851688", "0.57751787", "0.57673883", "0.5728191", "0.5684483", "0.56737494", "0.5670162", "0.5646045", "0.564056", "0.5631596", "0.56203485", "0.560422", "0.56026167",...
0.0
-1
StockistWise UnderOver Stock SS Product Multi Selection
function fnStockistWiseUnderOverStockReport() { var startMonth = fngetMonthNumber($('#txtFromDate').val().split('-')[0]); var endMonth = fngetMonthNumber($('#txtToDate').val().split('-')[0]); var startYear = $('#txtFromDate').val().split('-')[1]; var endYear = $('#txtToDate').val().split('-')[1]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStock() {\n\t\t\t\t\t\tupdatedStock = selectedProductDetails.stock_quantity - answer.quantity;\n\t\t\t\t\t}", "function addStock() {\n // USE querySelectorAll()\n var selected = getSelectedRowBoxes();\n \n for (var i = 0; i < selected.length; i++) {\n var status = selected[i].paren...
[ "0.6156648", "0.59130824", "0.58810306", "0.58352894", "0.5791139", "0.57092667", "0.569306", "0.567611", "0.5468476", "0.5462791", "0.5445787", "0.5444624", "0.5438683", "0.5436604", "0.5427043", "0.54136425", "0.54094", "0.5404308", "0.53978354", "0.538168", "0.5357939", ...
0.0
-1
Stargaze Button Click: Open thing, call API (eventually)
function getSGReport(lat, lng){ //https://stargazr-5l7reasoza-uc.a.run.app/?lat_selected=37.75&lng_selected=-122.45 var lat = coords.lat var lng = coords.lng console.log("report at ", lat,lng) sidebar.open('data'); const callEndpoint = async () => { console.log("hey", lat, lng) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openSidecar() {\n\tdocument.getElementsByClassName('gitter-open-chat-button')[0].click();\n}", "function clickHappy() {\n window.open(\"serotonine.html\", \"_self\");\n}", "function quickSearchButton_click() {\n //Begin Search Animation\n var $quickSearchResultsListWrapper = $(\"#QuickS...
[ "0.6252752", "0.62203145", "0.62004375", "0.61823237", "0.6119333", "0.6116048", "0.611182", "0.6056714", "0.60427785", "0.60306084", "0.60246575", "0.6019932", "0.6011468", "0.59940505", "0.5964392", "0.5926589", "0.5915833", "0.59109527", "0.5881289", "0.5881289", "0.587773...
0.0
-1
Funzioni per generare numeri random e inserirli in un Array
function rndNumGen(minNum, maxNum) { var rndNum = parseInt((Math.random() * maxNum) + minNum) return rndNum }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateLottoValues() {\n for (var i=0; i<randomArray.length; i++) {\n randomArray[i] = array[Math.floor(Math.random() * array.length)]; \n }\n}", "function creaNumeroRandom(array){\n var numero = Math.round(Math.random()*(array.length-1));\n return numero;\n }", "function ran...
[ "0.76776683", "0.765673", "0.76102173", "0.74387664", "0.7307626", "0.72218585", "0.7201954", "0.71847117", "0.7146856", "0.71466297", "0.71260846", "0.70743406", "0.7071478", "0.7066091", "0.70407516", "0.70262", "0.7025843", "0.70238453", "0.7006551", "0.7006138", "0.696755...
0.0
-1
Funzione per mpstrare l'alert
function showNum() { alert("Memorizza questi numeri, hai " + (timeout / 1000) + " secondi: " + rndNumArray.join(" ,")) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "alert(title, message, positiveText){\n alert(title, message, positiveText, () =>{console.log('Possitive Pressed')}, true); \n }", "function __alert($msg) {\r\n __message({type:1, message:$msg, autoclose:3});\r\n}", "alert(title, message, positiveText, positiveOnPress, cancelableFlag){\n A...
[ "0.7618101", "0.761467", "0.74540824", "0.74189574", "0.7416071", "0.73532", "0.7340212", "0.7285451", "0.72660005", "0.72528607", "0.7215831", "0.721515", "0.7211929", "0.71961856", "0.71933305", "0.71932834", "0.71454805", "0.7128469", "0.71102375", "0.71069205", "0.7102604...
0.0
-1