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
7. write a function that takes a string as a parameter and a character as the second parameter and return the number of the second parameter(second char) in it.
function countChar(x, y){ var count = 0; for(let i = 0; i < x.length; i++){ if(x[i] === y) count++; } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countChar(string, theChar) {\r\n\tvar total = 0;\r\n\r\n\tfor (var i = 0; i < string.length; ++i) {\r\n\t\tif (string.charAt(i) === theChar) {\r\n\t\t\t++total;\r\n\t\t}\r\n\t}\r\n\r\n\treturn total;\r\n}", "function char_count(str, letter){\n\nvar character=letter;\nvar count=0;\nfor(var i=0;i<str.leng...
[ "0.79027635", "0.78851587", "0.78325886", "0.7782855", "0.77825683", "0.77481806", "0.7707379", "0.7654131", "0.7648705", "0.76482767", "0.7626131", "0.760934", "0.7583946", "0.75670713", "0.75380343", "0.7494162", "0.7438066", "0.74342", "0.74342", "0.7411072", "0.7411072", ...
0.7072088
44
8. rewrite countBs function to use countChar
function newCountBs(x){ return countChar(x, "B"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countBs_rewritten(s) {\r\n return countChar(s, \"B\");\r\n}", "function countBs(input){\r\n return countChar(input, \"B\");\r\n}", "function countBs(str) {\r\n return countChar(str, 'B');\r\n }", "function countBs(string) {\n return countChar(string, \"B\");\n}", "function countBs(word) {...
[ "0.84888244", "0.8396961", "0.81078416", "0.7993058", "0.7712256", "0.7520757", "0.7483575", "0.745198", "0.7442707", "0.7353742", "0.7338485", "0.7331183", "0.7256194", "0.7227204", "0.71699035", "0.7071973", "0.6932896", "0.6932896", "0.6932896", "0.6932896", "0.6929417", ...
0.8163899
2
10. write a function to reverse a given array in a new array
function reverseArray(x){ var y = []; for( i = 0; i < x.length; i++){ y.unshift(x[i]); } return y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reverseArrayInPlace(array) {\n for (i = 0; i <= Math.floor(array.length / 2); i++) {\n a = array[i];\n b = array[array.length - 1 - i];\n array[i] = b;\n array[array.length - 1 - i] = a;\n }\n return array;\n}", "function reverse(arr){\n //code\n}", "function reverseArray (array) {\n...
[ "0.8054624", "0.7929552", "0.7927953", "0.7922336", "0.7871231", "0.7868167", "0.7867504", "0.7865247", "0.7858145", "0.78460693", "0.78459775", "0.7844212", "0.78422314", "0.7823686", "0.7820575", "0.78035104", "0.7795041", "0.7778691", "0.7778494", "0.7774475", "0.7756401",...
0.74527824
78
11. write a function to reverse a given array in the same array
function reverseArrayInPlace(x){ var size = x; x = []; for( i = 0; i < size.length; i++){ x.unshift(size[i]); } return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reverse(arr){\n //code\n}", "function reverseArr(arr) {\n // code here\n}", "function reverseArrayInPlace(array) {\n for (i = 0; i <= Math.floor(array.length / 2); i++) {\n a = array[i];\n b = array[array.length - 1 - i];\n array[i] = b;\n array[array.length - 1 - i] = a;\n }\n retu...
[ "0.82387", "0.8157557", "0.80756354", "0.80721414", "0.80291003", "0.8025577", "0.8022113", "0.8001504", "0.7997153", "0.79709345", "0.79663384", "0.7951714", "0.79104644", "0.78835785", "0.786901", "0.78485066", "0.78463495", "0.78427714", "0.7838527", "0.78349775", "0.78309...
0.72801965
96
Because this component can keep getting run each time a filter is added you need to remove the handlers otherwise they will keep stacking up
unbindEvents() { this.$wrapper.off('submit', '#js-apply-filter-form'); this.$wrapper.off('click', '.js-radio-button'); this.$wrapper.off('click', EditSingleLineTextFieldFilterForm._selectors.backToListButton); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onFiltersCleared() {\n }", "function filterHandler(event) {\n // User changes are recorded and saved as key/value format\n props.setFilterAndSearchState({\n ...props.filterAndSearchState,\n [event.target.name]:\n event.target.value.length > 0\n ? event.target.value\n : !...
[ "0.7358965", "0.72729427", "0.705219", "0.6948511", "0.69456476", "0.6914987", "0.6831749", "0.68296945", "0.6824596", "0.6695071", "0.667743", "0.667074", "0.66690475", "0.66217405", "0.66060793", "0.6601679", "0.65984166", "0.6591708", "0.65610045", "0.65430117", "0.6543011...
0.0
-1
under service callback initAuthorityandRegulationColumns()
function initAuthorityREgulationColumns() { var regulatoryAuthorityDropdown = { dropDownArray: lookups.regulatoryauthorityLookup, dropDownId: 'RegulatoryAuthorityId', dropDownLabel: 'Name' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initRegulatoryFrequencyTechnologyColumns() {\n var frequencyTechnologyDropdown = {\n dropDownArray: lookups.freqTechLookup,\n dropDownId: 'FrequencyTechId',\n dropDownLabel: 'FrequencyTechName'\n ...
[ "0.6445046", "0.5977222", "0.5676865", "0.5568368", "0.5522147", "0.5487091", "0.54665136", "0.54648775", "0.5426518", "0.541043", "0.5401437", "0.53829503", "0.53672916", "0.5362168", "0.53576106", "0.5349445", "0.53491616", "0.5341021", "0.5330621", "0.532565", "0.53237796"...
0.79360664
0
under service callback initFrequencyandTechnologyColumns()
function initRegulatoryFrequencyTechnologyColumns() { var frequencyTechnologyDropdown = { dropDownArray: lookups.freqTechLookup, dropDownId: 'FrequencyTechId', dropDownLabel: 'FrequencyTechName' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initScopeStandardsColumns() {\n var productTypeDropdown = {\n dropDownArray: lookups.productTypeLookup,\n dropDownId: 'ProductTypeId',\n dropDownLabel: 'ProductName'\n }\n\n ...
[ "0.61852103", "0.59936404", "0.56128734", "0.55458015", "0.5515557", "0.5514293", "0.54792887", "0.54688984", "0.54418236", "0.5358816", "0.5348654", "0.5329281", "0.5323067", "0.52743715", "0.5257025", "0.5251742", "0.52459455", "0.52381635", "0.5221942", "0.5216984", "0.520...
0.80558974
0
under service callback initFrequencyandTechnologyColumns()
function initScopeStandardsColumns() { var productTypeDropdown = { dropDownArray: lookups.productTypeLookup, dropDownId: 'ProductTypeId', dropDownLabel: 'ProductName' } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initRegulatoryFrequencyTechnologyColumns() {\n var frequencyTechnologyDropdown = {\n dropDownArray: lookups.freqTechLookup,\n dropDownId: 'FrequencyTechId',\n dropDownLabel: 'FrequencyTechName'\n ...
[ "0.80558974", "0.59936404", "0.56128734", "0.55458015", "0.5515557", "0.5514293", "0.54792887", "0.54688984", "0.54418236", "0.5358816", "0.5348654", "0.5329281", "0.5323067", "0.52743715", "0.5257025", "0.5251742", "0.52459455", "0.52381635", "0.5221942", "0.5216984", "0.520...
0.61852103
1
simple replacement of jQuery.extend
function extend(a, b){ for (let key in b) { if (b.hasOwnProperty(key)) { a[key] = b[key]; } } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jQueryExtend() {\n var options, name, src, copy, copyIsArray, clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false;\n\n // Handle a deep copy situation\n if ( typeof target ==...
[ "0.7712763", "0.7536028", "0.7217569", "0.7217569", "0.7217569", "0.7163756", "0.71558607", "0.7139311", "0.7130165", "0.7130165", "0.7130165", "0.7130165", "0.7130165", "0.7130165", "0.71035975", "0.70988494", "0.70982933", "0.70982933", "0.7073247", "0.7070713", "0.7045947"...
0.0
-1
function to generate computer number between 19 and 120
function randomCompNumber(min, max) { min = Math.ceil(19); max = Math.floor(121); return Math.floor(Math.random() * (max - min)) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateNum() {\n goalNumber = Math.floor((Math.random() * 120) + 19);\n }", "function randomNumberGenerator() {\n return Math.floor(Math.random() * 102) + 19;\n}", "function genNum() {\n // 198 = 99 - (-99)\n return Math.floor((Math.random() * 198) - 99);\n}", "function createRandom...
[ "0.7442075", "0.73127383", "0.7309687", "0.72747314", "0.7208966", "0.7125296", "0.6876448", "0.6865053", "0.68616885", "0.68474644", "0.68452114", "0.6832575", "0.6798168", "0.67974424", "0.67809963", "0.6774086", "0.6737671", "0.6728777", "0.6719003", "0.6712034", "0.670802...
0.7073596
6
function to set game start state
function reset() { score = 0; //set score to 0 $("#user-score").text(score); //set text of score area to 0 compNumber = randomCompNumber(); //generate random computer number $("#matching-number").text(compNumber); //set text of number to match area randomGemNumb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() { this.gameState = 'started'; }", "startGame() {\n //@todo: have this number set to the difficulty, easy = 3, normal = 6, hard = 9\n StateActions.onStart(5, 5, this.state.difficulty);\n StateStore.setGameState(1);\n this.gameState();\n }", "start(){\n if (this.scen...
[ "0.81562316", "0.7928502", "0.78887355", "0.7788817", "0.7729889", "0.7708078", "0.7536723", "0.74649334", "0.7464849", "0.74387187", "0.7420187", "0.7413196", "0.73613834", "0.7344164", "0.732606", "0.7324777", "0.7307313", "0.73032844", "0.7278281", "0.72616583", "0.7237609...
0.0
-1
Set up the game, pick a new word
function resetGame() { guessesRemaining = guessesAllowed; currentWordIndex = Math.floor(Math.random() * (wordList.length)); usedLetters = []; currentWord = []; for (var i = 0; i < wordList[currentWordIndex].length; i++) { currentWord.push("_"); } // document.getElementById("pres...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() {\n select = Math.floor(Math.random() * wordList.length);\n chosenWord = wordList[select];\n gameWord = new Word(chosenWord);\n gameWord.createWord();\n if (select > -1) {\n wordList.splice(select, 1);\n }\n console.log(\n \"You get 8 letter guesses to correctly find the type of f...
[ "0.8008308", "0.78557336", "0.7617957", "0.7607673", "0.7537212", "0.7528639", "0.74290794", "0.7421723", "0.73344016", "0.7264796", "0.7263171", "0.7254736", "0.72125506", "0.7198622", "0.71573037", "0.7152643", "0.715006", "0.714478", "0.71411204", "0.7138523", "0.7117092",...
0.0
-1
Check if a guessed letter is in the word
function evaluateGuess(letter) { var positions = []; for (var i = 0; i < wordList[currentWordIndex].length; i++) { if(wordList[currentWordIndex][i] === letter) { positions.push(i); } } if (positions.length <= 0) { guessesRemaining--; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function existInWord(letter){\n var result = false;\n if(toGuess.indexOf(letter)> -1){\n result = true;\n for (var i = 0; i < toGuess.length; i++) {\n if (toGuess.charAt(i) === letter) {\n answer[i]=letter.toUpperCase();\n alreadyGuessed++;\n...
[ "0.84930485", "0.8260832", "0.8177946", "0.80090624", "0.7988045", "0.7953116", "0.7928266", "0.78842044", "0.78543675", "0.78430253", "0.78063893", "0.778971", "0.778104", "0.77554053", "0.774941", "0.7741774", "0.77413297", "0.7734714", "0.7730608", "0.77277875", "0.7720235...
0.0
-1
See if player has won
function checkWin() { if(currentWord.indexOf("_") === -1) { document.getElementById("you-win").style.cssText = "display: block"; document.getElementById("family").style.cssText= "display: none"; totalWins++; winSound.play(); gameOver = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __playerWon(player) {\n var playerScores = [], winningPlayer, lostPlayers = [];\n\n for (var i = 0; i < __players.length; i++) {\n var p = __players[i],\n playerScore = p.getScore();\n\n if (p === player) {\n playerScore++;\n }\n\n playerScores.pus...
[ "0.81328434", "0.77845937", "0.771528", "0.768166", "0.7633473", "0.7617784", "0.7591002", "0.75556916", "0.7523808", "0.7501416", "0.7482066", "0.7469611", "0.7461323", "0.74318814", "0.74305344", "0.7422401", "0.74185526", "0.7392345", "0.739214", "0.7367336", "0.7361091", ...
0.0
-1
See if player has lost
function checkLoss() { if(guessesRemaining <= 0) { loseSound.play(); document.getElementById("you-lose").style.cssText = "display: block"; document.getElementById("family").style.cssText = "display:none"; totalLosses++; gameOver = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lost(){\n pause();\n playing = false;\n lose = true;\n setHighscore();\n html('rows','Game Over')\n }", "function hasLost(){\n if (total_score > targetNumber){\n loss++;\n $(\".loss\").text(loss);\n $(\".reset_game\").show();\n ...
[ "0.75915676", "0.73191816", "0.71963847", "0.71087533", "0.70593816", "0.69971526", "0.6952843", "0.6952843", "0.6940059", "0.6913251", "0.6905883", "0.68785524", "0.68494874", "0.6843516", "0.6816327", "0.6806095", "0.6755312", "0.6729943", "0.6699785", "0.6693018", "0.66727...
0.66491383
21
DEFINE FUNCTIONS eelcb annual Landsat collection plan.
function imgColPlan(year){ var col = lcb.sr.gather(year) .map(lcb.sr.maskCFmask) .map(lcb.sr.addBandNBR) .map(lcb.sr.addBandNDVI) .map(lcb.sr.addBandTC); return lcb.sr.mosaicMedian(col); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLandsat(){\r\n \r\n var defaultArgs = {\r\n 'studyArea':null,\r\n 'startDate':null,\r\n 'endDate':null,\r\n 'startJulian':null,\r\n 'endJulian':null,\r\n 'toaOrSR':'SR',\r\n 'includeSLCOffL7':false,\r\n 'defringeL5':false,\r\n 'addPixelQA':false,\r\n 'resampleMethod':'ne...
[ "0.6089529", "0.5661651", "0.5534932", "0.54735225", "0.546972", "0.54525113", "0.5412043", "0.540934", "0.5305645", "0.52825797", "0.52664596", "0.52019924", "0.5179618", "0.51791763", "0.51696956", "0.51454794", "0.51408106", "0.5123934", "0.51074934", "0.5092076", "0.50849...
0.0
-1
Clears image cards from the image card panel.
function clearImgs() { imgCardPanel.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCards () {\n /*Close imgs*/\n for(let i = 0; i < countCards; i++) {\n cardsField.children[i].style.backgroundImage = 'none';\n cardsField.children[i].className = \"\";\n }\n selectedCards = [];\n pause = false;\n ...
[ "0.7513892", "0.725256", "0.7220146", "0.7091576", "0.70340157", "0.6991445", "0.69874835", "0.6946577", "0.6920138", "0.69068384", "0.6892706", "0.6869294", "0.6859217", "0.6816874", "0.6796029", "0.67890954", "0.67661285", "0.67547286", "0.6749402", "0.6739249", "0.67352027...
0.9068593
0
Displays image cards to the card panel.
function displayBrowseImg(col, aoiBox, aoiCircle) { clearImgs(); waitMsgImgPanel.style().set('shown', true); imgCardPanel.add(waitMsgImgPanel); var visParams = RGB_PARAMS[rgbSelect.getValue()]; var dates = col.aggregate_array('composite_year'); dates.evaluate(function(dates) { waitMsgImgPanel.sty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showCardset(){\n for(let m=0;m<30;m++) {\n if ( this.cards[m].getTurned()==false) {\n let img = this.cards[m].getImage();\n this.images[m].innerHTML = \"<img id='img\" + (m + 1) + \"' src='./images/\" + img + \"'/>\";\n }\n else{\n ...
[ "0.71030235", "0.7078082", "0.70045406", "0.6934248", "0.690599", "0.6852746", "0.6844016", "0.67834973", "0.67572486", "0.66985166", "0.66850144", "0.6645711", "0.6626163", "0.658861", "0.6580077", "0.6578397", "0.6545835", "0.65387696", "0.6528602", "0.6506008", "0.649344",...
0.0
-1
Generates chart and adds image cards to the image panel.
function renderGraphics(coords) { // Get the selected RGB combo vis params. var visParams = RGB_PARAMS[rgbSelect.getValue()]; // Get the clicked point and buffer it. var point = ee.Geometry.Point(coords); var aoiCircle = point.buffer(45); var aoiBox = point.buffer(regionWidthSlider.getValue()*1000/2); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateAndDrawImage()\n { \n // generate image data from DICOM\n view.generateImageData(imageData); \n // set the image data of the layer\n imageLayer.setImageData(imageData);\n // draw the image\n imageLayer.draw();\n }", "function buildC...
[ "0.6595132", "0.64784884", "0.6116567", "0.6070797", "0.60312766", "0.6025448", "0.5972213", "0.59423727", "0.5937973", "0.5922068", "0.5913713", "0.58900434", "0.5882952", "0.5840696", "0.58111966", "0.5779752", "0.57791626", "0.57759035", "0.57694215", "0.5759518", "0.57586...
0.0
-1
Handles submit button click.
function handleSubmitClick() { renderGraphics(COORDS); submitButton.style().set('shown', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "submit() {\r\n\r\n this.inputsCheck();\r\n this.submitBtn.click(() => {\r\n this.pushToLocal();\r\n this.clearForm();\r\n\r\n })\r\n }", "function submitPressed() {\n \n}", "@api\n handleSubmit() {\n this.template.querySelector(\"lightning-record-edit-for...
[ "0.7573744", "0.7357788", "0.7154548", "0.7123081", "0.7118305", "0.7096677", "0.7061796", "0.70514035", "0.7044828", "0.69904876", "0.6983351", "0.69656444", "0.6934528", "0.6902451", "0.6844284", "0.681354", "0.6783686", "0.6744713", "0.673397", "0.6726973", "0.6723164", ...
0.6844862
14
Show/hide the submit button.
function showSubmitButton() { if(CLICKED) { submitButton.style().set('shown', true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enableSubmitButton() {\n show(\"validate\");\n hide(\"formIsUnvalide\");\n}", "function toggleSubmitAs(bShow)\n{\n if (bShow)\n { \n _SubmitAs.enabled();\n }\n else\n {\n _SubmitAs.append(\" \");\n _SubmitAs.disable();\n }\n}", "function enableSubmit(){\n submitSection.show()\n ...
[ "0.73729664", "0.70739573", "0.6955887", "0.676915", "0.6742268", "0.6670479", "0.659258", "0.6481829", "0.6459118", "0.6454054", "0.64400786", "0.64336", "0.6421072", "0.6392612", "0.6370668", "0.63418835", "0.63382936", "0.6336624", "0.633347", "0.63171524", "0.62837285", ...
0.7888526
0
Populate the unit html select with a line per unit
function populateUnitSelect() { var options = '<option value=""></option>'; Object.keys(units).sort().forEach(function(value, index) { options += '<option value="'+ value + '">' + value + '</option>'; }); $("#unitsSelect").html(options); $("#unitsSelect").change(onUnitChange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillUnits()\n{\n\tvar unitType = $(\"#unitType\").val();\n\tvar value = Object.keys(units[unitType]);\n\n\t$(\"#fromUnit\").empty();\n\t$(\"#toUnit\").empty();\n\n\tfor (var i = 0; i < value.length; i++)\n\t{\n\t\t$(\"#fromUnit\").append(\"<option>\"+value[i]+\"</option>\");\n\t}\n\n\tvar options = $(\"#f...
[ "0.65382695", "0.6503922", "0.64261943", "0.6417887", "0.63946897", "0.6351482", "0.6339966", "0.62674874", "0.60633326", "0.5970406", "0.5957975", "0.5926883", "0.59207004", "0.5868507", "0.5850727", "0.5823354", "0.5819563", "0.5816071", "0.5810685", "0.57160676", "0.569229...
0.66844064
0
Chargement de la variable xhr
function getXMLHttpRequest(){ var xhr = null; if(window.XMLHttpRequest) // Firefox et autres xhr = new XMLHttpRequest(); else if(window.ActiveXObject){ // Internet Explorer try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor () {\n this.xhr = new XMLHttpRequest(); //(AJAX ISLEMINI BASLATMAK ICIN XHR xhr objemizi olusturduk\n }", "_loadXhr() {\n // // if unset, determine the value\n // if (typeof this.xhrType !== 'string') {\n // this.xhrType = this._determineXhrType();\n // }\n ...
[ "0.76109976", "0.7401869", "0.7227463", "0.7153357", "0.7153357", "0.7153357", "0.7153357", "0.7153357", "0.71470284", "0.7088411", "0.7037113", "0.70103973", "0.693677", "0.6853665", "0.6729792", "0.6718825", "0.67068774", "0.6674377", "0.66564965", "0.6621531", "0.65531605"...
0.64511484
29
Fonction permettant de modifier le contenu d'un DIV selon son identifiant
function getHTMLCodeRequest(id_div,servlet,send,id_formulaire,id){ //id_div : Chaine permettant d'identifier la balise div //servlet: URL pattern de la servlet en question //send: valeurs à envoyées au serveur, null si aucunes valeurs à retourner //id_formulaire: correspond au formulaire que l'on veut ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decorateDiv(div) {}", "function esconderDivCadastro(obj){\r\n document.getElementById('conteudo').style.display=\"hidden\";\r\n switch(obj.id){\r\n case 'div':\r\n document.getElementById('conteudo').style.display=\"block\";\r\n document.getEleme...
[ "0.64489156", "0.61575174", "0.59937036", "0.5942738", "0.5942738", "0.5892895", "0.58775645", "0.5837088", "0.57866365", "0.5754367", "0.5731618", "0.57053316", "0.5678665", "0.5646982", "0.56393474", "0.5616333", "0.56082195", "0.5602848", "0.560039", "0.560039", "0.5584802...
0.0
-1
variable to store the powerball number Functions Function for Florida Lottery
function flLotteryNumGen(max , min){ var flLotto = []; for (var i = 0; i < 7; i++ ) { //Generates the numbers for the Florida Lottery flLotto[i] = Math.random(flLotto[i]) * (max - min) + min; //Round up lotto numbers flLotto[i] = Math.round(flLotto[i]); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function floridaLotto(max, min, num){\n for (var i = 0; i < num; i++){\n floridaQP[i] = Math.random() * (max - min) + min; //math object to select a random number\n floridaQP[i] = Math.round(floridaQP[i]); //math object to round number to nearest whole number\n }\n\n console....
[ "0.61354595", "0.6049333", "0.60119414", "0.5977352", "0.58944076", "0.5834169", "0.5824224", "0.58149654", "0.57662135", "0.5758988", "0.57513446", "0.57380694", "0.5730156", "0.5717819", "0.57055265", "0.5698873", "0.569833", "0.5665509", "0.5625747", "0.5621229", "0.561258...
0.6099967
1
Open when someone clicks on the span element
function openNav() { document.getElementById("myNav").style.width = "100%"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spanClick(div) {\n\t\tvar modal = document.getElementById(div);\n\t \tmodal.style.display = \"none\";\n\t}", "function spanClick(div) {\n\t\tvar modal = document.getElementById(div);\n\t \tmodal.style.display = \"none\";\n\t}", "'click #tokens-open'(event, instance) {\n Session.set(\"area\", ...
[ "0.6646812", "0.6646812", "0.63436633", "0.63436633", "0.6302182", "0.62496305", "0.61304283", "0.61161166", "0.6082419", "0.60144335", "0.5998361", "0.59939873", "0.59562993", "0.594434", "0.5881817", "0.5873154", "0.5872516", "0.5865183", "0.58481604", "0.5819441", "0.58132...
0.0
-1
Close when someone clicks on the "x" symbol inside the overlay
function closeNav() { document.getElementById("myNav").style.width = "0%"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close(){Overlay.overlayStack.closeOverlay(this.overlayElement);}", "close() {\n this.overlayManager.close(this.overlayName);\n }", "function onBackdropClick() {\n close();\n }", "function overlayClick() {\n\toverlay.onclick = function() {\n\t\tcloseOverlay();\n\t}\n}", "function closeOv...
[ "0.73381025", "0.700274", "0.68053573", "0.67820466", "0.67521745", "0.67230016", "0.6630703", "0.6580472", "0.65753084", "0.65749174", "0.65380573", "0.64967674", "0.6468673", "0.6422859", "0.6419836", "0.6409173", "0.6408367", "0.63673264", "0.6357037", "0.63539785", "0.634...
0.0
-1
for performance: reduce hidden class
function TplWrap(name, runtime, root, scope, buffer, originalName, fn, parent) { this.name = name; this.originalName = originalName || name; this.runtime = runtime; this.root = root; // line counter this.pos = { line: 1 }; this.scope = scope; this.buffer = buffer; this.fn = fn; this.parent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get hiddenClass() {\n return 'hidden';\n }", "function _hidden() {}", "function removeHiddenClassForAll() {\n let hiddenElements = document.querySelectorAll('.hidden');\n hiddenElements.forEach((elem) => {\n elem.classList.remove('hidden');\n });\n}", "_make_hidden(...html_elements) {\n f...
[ "0.6704853", "0.6334051", "0.6092818", "0.6039513", "0.58362424", "0.58091694", "0.58091694", "0.58091694", "0.58091694", "0.58091694", "0.58091575", "0.5728977", "0.56608254", "0.56191415", "0.56191415", "0.5566676", "0.5563154", "0.55233985", "0.55233985", "0.55233985", "0....
0.0
-1
depth: ../x.y() => 1
function callFn(tpl, scope, option, buffer, parts, depth) { let caller; let fn; let command1; if (!depth) { command1 = findCommand(tpl.runtime.commands, tpl.root.config.commands, parts); } if (command1) { return command1.call(tpl, scope, option, buffer); } else if (command1 !== false) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get depth() {}", "depth() {\n return 0;\n }", "get Depth() {}", "set depth(value) {}", "node(depth) {\n return this.path[this.resolveDepth(depth) * 3];\n }", "getDepth(obj, path) {\n return path.split('.').reduce((value, tag) => {\n return value[tag];\n }, obj);\n }", "index(depth) ...
[ "0.7515256", "0.7051561", "0.69971937", "0.69373024", "0.6664576", "0.66635525", "0.6622401", "0.65243983", "0.6433659", "0.6433659", "0.64182085", "0.63432443", "0.6263335", "0.62437594", "0.6232878", "0.62043", "0.61377656", "0.6081729", "0.60721517", "0.59574014", "0.58696...
0.0
-1
remove command by name
removeCommand(commandName) { const config = this.config; if (config.commands) { delete config.commands[commandName]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeScript(name) {\n delete this.scripts[name];\n }", "function remove(name, cb){\n\tvar options = {\n\t\tpath: '/devops/invoke'\n\t};\n\tvar body = {\n\t\t\t\t\tchaincodeSpec: {\n\t\t\t\t\t\ttype: \"GOLANG\",\n\t\t\t\t\t\tchaincodeID: {\n\t\t\t\t\t\t\tname: chaincode.details.deployed_name,\n\t\t\t\t...
[ "0.65106374", "0.63498306", "0.6315208", "0.6298312", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", "0.62959766", ...
0.79955304
0
get result by merge data with template
render(data, option_, callback_) { let option = option_; let callback = callback_; let html = ''; const fn = this.fn; const config = this.config; if (typeof option === 'function') { callback = option; option = null; } option = option || {}; if (!callback) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function merge(tpl, data) {\n return tpl.replace(\"{{img}}\", data.img)\n .replace(\"{{name}}\", data.name)\n .replace(\"{{description}}\", data.description)\n .replace(\"{{main_content}}\", data.main_content);\n \n}", "function merge(tpl, data) {\n return tpl.repl...
[ "0.69872737", "0.682742", "0.6674109", "0.6235447", "0.602001", "0.5723955", "0.5689403", "0.5656177", "0.5647348", "0.56355256", "0.56122005", "0.5546403", "0.55393195", "0.5425194", "0.5424803", "0.542175", "0.5395049", "0.5388559", "0.5371637", "0.5366548", "0.5356231", ...
0.0
-1
scope resolution for xtemplate like function in javascript but keep original data unmodified
function Scope(data, affix, parent) { if (data !== undefined) { this.data = data; } else { this.data = {}; } if (parent) { this.parent = parent; this.root = parent.root; } else { this.parent = undefined; this.root = this; } this.affix = affix || {}; this.ready = fal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "bind(data) {\n this.template = this.template.replace(/\\@{[^{}]+}/g, function(w) {\n w = w.slice(2, -1).trim();\n return data[w] ? data[w] : \"\";\n });\n }", "function Template(fn, parameters){\n fn.parameters = parameters;\n return fn;\n}", "function snippet_substitut...
[ "0.58087534", "0.57565486", "0.5732552", "0.57134795", "0.57027984", "0.5681963", "0.56501627", "0.55066156", "0.5495989", "0.54277635", "0.542064", "0.5399176", "0.53935474", "0.5393074", "0.5392572", "0.5384354", "0.5384289", "0.53828126", "0.5377048", "0.5368426", "0.53516...
0.0
-1
keep original data unmodified
set(name, value) { this.affix[name] = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveOldData() {\n oldData = newData;\n newData = null\n} // saveOldData", "_revertToOriginal() {\n this._storage = {}\n this._length = 0\n this._head = 0\n }", "static filter(data) {\n const copy = { ...data };\n copy.a = copy.newA;\n delete copy['newA'];\n ...
[ "0.7381995", "0.6805405", "0.67960286", "0.6787968", "0.67722046", "0.66336155", "0.6584836", "0.6488335", "0.64656454", "0.6429482", "0.63475686", "0.6341476", "0.6339007", "0.6317668", "0.630135", "0.6287603", "0.6203992", "0.61933357", "0.61584044", "0.6088671", "0.6057491...
0.0
-1
get feedbacks from server
getFeedbacks() { getFeedback().then((feedback) => { this.setState({ feedbacks: feedback }) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMessages(){\n serverRequest(getParams(\"none\"), true); \n}", "function storeFeedback() {\n let url = URL + \"feedback\";\n let params = new FormData(id(\"feedback\"));\n fetch(url, { method : \"POST\", body : params })\n .then(checkStatus)\n .then(response => response.text())\...
[ "0.638593", "0.6298243", "0.5995799", "0.5977119", "0.59325063", "0.5914286", "0.5901557", "0.58807635", "0.58073455", "0.5766443", "0.5766443", "0.5746327", "0.574607", "0.57061225", "0.56565636", "0.5602708", "0.5581009", "0.55646616", "0.5559509", "0.5554135", "0.55540866"...
0.58624524
8
Output: [5, 6, 7, 1, 2, 3, 4]
function rotateArray2(nums, k) { k = k % nums.length; // Handle k greater than the array length if (k === 0) return; // No rotation needed const cutIndex = nums.length - k; const cutElements = nums.splice(cutIndex); // Cut elements from cutIndex to the end nums.unshift(...cutElements); // Move cut ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function opgave7(start, end){\n var arrayen = [];\n while(start<end){\n arrayen.push(start);\n start++;\n }\n arrayen.push(start);\n return arrayen;\n \n}", "function ex_9_I(x)\n{\n var rt = [];\n var j = 0;\n for(var i = x.length -1; i >= 0; i--)\n {\n rt[j] = ...
[ "0.64013314", "0.6102783", "0.60880727", "0.6079463", "0.60772425", "0.60745496", "0.6072358", "0.6066974", "0.60646933", "0.60400283", "0.60174066", "0.5991554", "0.5989582", "0.598165", "0.59560245", "0.5949527", "0.5939378", "0.5923149", "0.59095186", "0.59058005", "0.5903...
0.0
-1
Utils Copyright (c) 2018 Uber Technologies, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, d...
function getLayerGroupsFromStyle(style) { return _defaultSettings.DEFAULT_LAYER_GROUPS.filter(function (lg) { return style.layers.filter(lg.filter).length; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Utils() {}", "function Utils() {}", "function Utils() {\n}", "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n...
[ "0.6188834", "0.6188834", "0.60083276", "0.6002633", "0.59799504", "0.5824412", "0.55880624", "0.55722517", "0.5522041", "0.53595823", "0.5296937", "0.5296937", "0.52549654", "0.52275205", "0.52219313", "0.5194561", "0.5182043", "0.5177953", "0.5177626", "0.51613945", "0.5156...
0.0
-1
Constraints: array of functions that take a section, return a number in the range [0,1]. 0 means will not take. Any other number will involve rankings.
function fitSchedule(course_codes, constraints) { constraints = constraints || []; var choices = course_codes.reduce((acc, course_code) => { var sections = getSectionsOfCourse(course_code); var sections_by_type = Object.keys(SECTION_TYPES).map((t) => sections.filter((section) => section.type == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstIndexFunction(value, index, array) {\n return value >18;\n}", "function fn(arr, seq) {\n // Write your algo\n}", "function firstValueFunction(value, index, array) {\n return value >18;\n}", "function identityFunction(anArray, num, numOfConstraints){\n for(let i = 1 ; i <= numOfConstr...
[ "0.5302923", "0.52862686", "0.5224122", "0.514074", "0.5120291", "0.5091091", "0.5032279", "0.5014639", "0.4976361", "0.4939915", "0.48955715", "0.48852473", "0.48712254", "0.4869786", "0.48358247", "0.48285982", "0.4826478", "0.48208198", "0.47870082", "0.47762796", "0.47707...
0.47135535
32
Write the info to the file Collect all layers visible and invisible reference 1: reference 2:
function collectLayers() { var layers = [], visibleLayers = [], layerCount = 0, ref = null, desc = null; const idOrdn = charIDToTypeID("Ordn"); // Get layer count reported by the active Document object - it never includes the background. ref = new ActionReferenc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exportLayers(){\n\n\t// Loop through layers\n\tfor(var e = 0; e< doc.layers.length; e++){\n\n\t\t// Set selected layer on\n\t\tdoc.layers[e].visible = true;\n\n\t\t// Store layerName\n\t\tvar layerName = doc.layers[e].name;\n\n\t\t// Function returns a new file name\n\t\ttargetFile = getNewName(layerName)...
[ "0.6561229", "0.6286571", "0.61974883", "0.5724707", "0.56453156", "0.55964154", "0.5595777", "0.5578447", "0.53285515", "0.53267384", "0.52787685", "0.5179269", "0.513332", "0.51308465", "0.512651", "0.5100609", "0.50987554", "0.50973", "0.5086878", "0.50850976", "0.5056592"...
0.52435076
11
Action recorded through scriptlistener plugin
function raterizeLayerStyle(){ var idrasterizeLayer = stringIDToTypeID( "rasterizeLayer" ); var desc5 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref4 = new ActionReference(); var idLyr = charIDToTypeID( "Lyr " ); var idOrdn = charIDToTypeID( "Ordn" ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "action(type, px, py, evt) { console.log('Action callback'); }", "function onFireAction(){\n \n}", "function ACTION() {}", "function scriptRunnable(){\n menu.addEventListener('click', clickHandler);\n player1_form.addEventListener('submit', submitHandler);\n // Round\n}", "updateAction() {}", ...
[ "0.6499559", "0.63681215", "0.63590807", "0.6321234", "0.6147894", "0.61472356", "0.61010045", "0.59367704", "0.59227914", "0.5898545", "0.5764076", "0.5755387", "0.5740815", "0.57213444", "0.57092255", "0.5692581", "0.56878334", "0.5676165", "0.5661074", "0.56456494", "0.564...
0.0
-1
input: odd integer n larger than 5 output: a star pattern logged to the screen (8 edges) rules: n rows center row has n stars all other rows have three stars pattern of stars and spaces: row 0: 0 spaces, star, (n3)/2 spaces, star, (n3)/2 spaces, star, 0 spaces row 1: 1 space, star, (n5)/2 spaces, star, (n5)/2 space, st...
function star(n) { if (n % 2 !== 1 || n < 7) return undefined; var arr = Array((n - 1) / 2).fill(''); for (let i = 0; i < (n - 1) / 2; i += 1) { arr[i] = ' '.repeat(i) + '*' + ' '.repeat((n - 2 * i - 2) / 2) + '*' + ' '.repeat((n - 2 * i - 2) / 2) + '*'; } arr.concat('*'.repeat(n)) .co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function star(n) {\n var middlePoint = (n - 1) / 2;\n var upperPart = [];\n var star = '*';\n var space = ' ';\n var result, grid, spaneSpace, middlePart, lowerPart;\n\n for (var i = 0; i < middlePoint; i++) {\n spaneSpace = space.repeat(middlePoint - 1 - i);\n grid = space.repeat(i) + star + spaneSpac...
[ "0.76717466", "0.75833446", "0.7548069", "0.74735546", "0.74311936", "0.73245263", "0.7030233", "0.7029292", "0.70263255", "0.70197225", "0.6976465", "0.6938163", "0.6882108", "0.6875384", "0.68345606", "0.6764238", "0.6741467", "0.6724429", "0.67209506", "0.6688663", "0.6685...
0.7862945
0
Label wrap function from "Wrapping Long Labels" Mike Bostock
function wrap_nut_facts(text, width) { text.each(function() { var text = d3.select(this), words = text.text().split(/\s+/).reverse(), word, line = [], lineNumber = 0, lineHeight = 17, //em y = text.attr("y"), x = text.attr("x"), dx = parseFloat(text.attr("dx")), dy = par...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function label(label) {\n return function(s) {\n var delta = s.length - label.length;\n return strRepeat (' ', Math.floor (delta / 2)) + label +\n strRepeat (' ', Math.ceil (delta / 2));\n };\n }", "function _labelIsWrapping(){\n\n\t\tif (this.getWrapping && !this.isPropertyInitial(\...
[ "0.71263623", "0.6552895", "0.62975204", "0.6263899", "0.6219522", "0.6219522", "0.6211929", "0.6115963", "0.6076735", "0.6069229", "0.6017909", "0.6004915", "0.5991212", "0.5823639", "0.57260156", "0.57260156", "0.5638491", "0.56264997", "0.56103456", "0.5605308", "0.5582737...
0.0
-1
Funcion que crea un boton de color rojo con el texto Quitar y el icono (X) en la columna modificar de la fila que corresponda al id pasado como parametro
function addBtnQuitar(id){ //Al boton con el identificador igual al parametro id, le machacamos lo que tenga dentro poniendole un span con el icono más y el texto Quitar $("#btn-"+id).html("<span id=\""+id+"\" ></span> Quitar"); $("#"+id).addClass("glyphicon glyphicon-remove"); //Si antes el boton tenia la cla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function probar_conexion_red(){\n /*--- primero probamos la conexion a la red \n se crea un campo donde se carga una imagen, si esta carga hay conexion ---*/\n var tabla = $('#dataTable').attr(\"id\");\n addRow(tabla);\n}", "function probar_conexion_red(){\n /*--- primero probamos la conexion a la red \n s...
[ "0.6214217", "0.6214217", "0.60503006", "0.60399336", "0.5882402", "0.58337873", "0.57833725", "0.5743346", "0.5742537", "0.57220536", "0.5715517", "0.57149", "0.56554544", "0.5654896", "0.56218183", "0.55813336", "0.55740964", "0.55717367", "0.5564182", "0.55583864", "0.5518...
0.6279422
0
Funcion que hace una peticion a un servicio web que devuelve los permisos del usuario y tabla que esten seleccionados
function obtenerPermisosUsuario(){ var user = $('select#usuario').val(); var table = $('select#tabla').val(); $.ajax({ data: { user: usuario, pass: pasword, agencia: agencia, usuario: user, tabla: table}, url: 'http://apirest/permisos/tabla/', type: 'POST', success: func...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillUsuarios() {\n $scope.dataLoading = true;\n apiService.get('api/user/' + 'GetAll', null, getAllUsuariosCompleted, apiServiceFailed);\n }", "function informacionUsuarios(){\n $.ajax({\n url: \"https://localhost:3000/volvo/api/GU/GU_GESTION_USUARIOS\",\n h...
[ "0.6865899", "0.68267095", "0.6723266", "0.65865654", "0.6564679", "0.6543743", "0.65287524", "0.6517645", "0.64957935", "0.6424223", "0.6413244", "0.63867295", "0.6386658", "0.63772076", "0.63545954", "0.63407224", "0.63288265", "0.6326722", "0.63234127", "0.6319193", "0.630...
0.741811
0
Funcion que recoge los datos devueltos por el servicio web y dibuja los iconos y botones que correspondan
function mostrarPermisos(data){ if(data.add == 1){ addIcoPermOk("add-est"); addBtnQuitar("add"); }else{ addIcoPermNOk("add-est"); addBtnAdd("add"); } if(data.upd == 1){ addIcoPermOk("upd-est"); addBtnQuitar("upd"); }else{ addIcoPermNOk("upd-est"); addBtnAdd("upd"); } if(data.del =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargarIconos(){\n // iconos para mostrar puntos\n estilosMarcadores[\"carga\"] = styles.marcadorCarga();\n estilosMarcadores[\"traslado\"] = styles.marcadorTraslado();\n }", "function cargarIconos(){\n // iconos para mostrar puntos\n estilosA...
[ "0.6278976", "0.6276252", "0.61631966", "0.60400885", "0.5970226", "0.5968721", "0.5966192", "0.5963347", "0.5897342", "0.58856356", "0.5878267", "0.5827288", "0.58255535", "0.5824927", "0.5823363", "0.5813349", "0.57925713", "0.577785", "0.57626194", "0.5760757", "0.5756457"...
0.0
-1
Funcion que hace una peticion a un servicio web para poner o quitar permisos a un usuario determinado
function addDelPermisosUsuario(accion,permiso,boton){ var user = $('select#usuario').val(); //alert("Usuario "+usuario+" Pass "+ pasword +" Agencia "+agencia+" User "+user+" Accion "+accion+" Permiso "+permiso); $.ajax({ data: { user: usuario, pass: pasword, agencia: agencia, usuario: user,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async stopSwitchUser() {\n await axios.get(`${this._host}/j_spring_security_exit_user`, {withCredentials: true});\n }", "function _logOutUser () {\n \tserverRequestService.serverRequest(PROJET_HEADER_CTRL_API_OBJECT.logout, 'GET');\n }", "delete(requisicao, resposta, next){\n try{\n ...
[ "0.6058682", "0.58809143", "0.5837215", "0.58027804", "0.5776914", "0.5767729", "0.5764698", "0.5700047", "0.5671275", "0.5653309", "0.5650468", "0.56076264", "0.56044334", "0.5582391", "0.5562791", "0.5540596", "0.55268276", "0.55259", "0.5521787", "0.5510037", "0.5504404", ...
0.58897924
1
Bind the cancel button to go button's back event
function bindCancelBtn() { $(".btn-cancel").on("click", onCancelClick); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onBackClicked_() {\n this.fire('cancel');\n }", "function cancel() {\n history.goBack();\n }", "function cancel() {\n window.history.back();\n}", "cancel () {\n this.$window.history.back();\n }", "function onCancelClick(e) {\n e.preventDefault();\n if (window.history.length...
[ "0.80569637", "0.7959513", "0.77247936", "0.75865644", "0.75758505", "0.7302866", "0.72882926", "0.72459143", "0.72459143", "0.72351193", "0.72351193", "0.71940017", "0.71865493", "0.7159024", "0.71579576", "0.71447337", "0.7131375", "0.7131022", "0.71190804", "0.7078486", "0...
0.0
-1
Gets url param from querystring and populate continue button with value
function populateContinueHref() { $(".btn-continue").attr("href", getQueryParam("url")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RenderContinueButton() {\n\tvar value = retrieveDataValue(\"adl.nav.request_valid.continue\");\n\treturn value;\n}", "function querystring () {\n setFormFields();\n setBookmarkURL();\n form.bookmark.on(\"click focus mouseenter\", setBookmarkURL);\n}", "function parseParameters() {\n var pageURL = ...
[ "0.6634305", "0.5912799", "0.5844767", "0.580176", "0.57675225", "0.57503706", "0.57078224", "0.5656119", "0.5620107", "0.5619623", "0.5613972", "0.559927", "0.5535776", "0.5514289", "0.547172", "0.54652965", "0.5444775", "0.54439586", "0.541768", "0.5405339", "0.53853106", ...
0.7686006
0
Gets a querystring parameter by name, ported from lexus.com/outlink
function getQueryParam(name) { var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.href); if (results === null) { return "http://www.lexus.com/"; } else { return results[1].replace("%3f", "?...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getURLParameter(name) {\r\n\t\treturn decodeURI((new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, ''])[1]);\r\n\t}", "function getURLParameter(name) {\n return decodeURI(\n (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]\n );\n }", "fu...
[ "0.80100733", "0.79592395", "0.79334944", "0.7915787", "0.7915787", "0.7825131", "0.7791378", "0.77892756", "0.7784476", "0.7777909", "0.7761444", "0.77576125", "0.77576125", "0.7756595", "0.7756595", "0.7737379", "0.77153224", "0.7704656", "0.77030945", "0.76925886", "0.7678...
0.7567552
29
Executed when the cancel button is clicked
function onCancelClick(e) { e.preventDefault(); if (window.history.length === 1) { window.close(); } window.history.back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleCancelButton() {\n\t\tconsole.log(\"Now cancelling action..\");\n\t\tCounterStart = 0; \t// reset counter\t\t\t\t\n\t\tcloseCancelPopup();\n\t\trevertChanges(command);\n\t\tconsole.log(\"Reverting changes..\");\t\n\t}", "cancel(e) { }", "function onCancelClick() {\n logger.info('cancel_button...
[ "0.8205779", "0.81917226", "0.7923225", "0.78765446", "0.78597677", "0.77527624", "0.77427423", "0.7742385", "0.77373886", "0.770597", "0.76931816", "0.7638102", "0.7607201", "0.7607027", "0.7600308", "0.7600308", "0.75822186", "0.75822186", "0.75822186", "0.75822186", "0.758...
0.7227923
53
retrieves single payment by id
getPayment(id) { const path = `/payments?${id}`; const method = 'GET'; const options = buildOptions(this.token, this.endPoint, path, method, null); return goCardlessRequest(options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findOnepayments(paymentId) {\n const foundPayment = this.payments.filter(payment => payment.loanId === parseInt(paymentId));\n return foundPayment;\n }", "getPayment(payment_id) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.request(\"get_payments\", {\n ...
[ "0.69401747", "0.68700856", "0.6398003", "0.6344177", "0.6313842", "0.6204751", "0.6174664", "0.61586577", "0.6093466", "0.60646224", "0.6004904", "0.59805673", "0.5979068", "0.5971481", "0.59458756", "0.59370434", "0.5932889", "0.5913184", "0.5891839", "0.5877779", "0.586668...
0.78605056
0
Updates a payment Object, accepts only metadata
updatePayment(id, metadata) { const path = `/payments?${id}`; const method = 'PUT'; const options = buildOptions(this.token, this.endPoint, path, method, metadata); return goCardlessRequest(options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePayment() {\n\n var updatedPayment = {\n \"id\": $scope.currentPayment.id,\n \"paymentDate\": $filter('date')($scope.currentPayment.paymentDate, \"dd-MM-yyyy\"),\n \"amount\": parseFloat($scope.currentPayment.amount),\n \"bankAccount\": $scope.curre...
[ "0.60319966", "0.5905022", "0.58978605", "0.58688205", "0.58096355", "0.57699984", "0.5718063", "0.5712529", "0.56986547", "0.5619", "0.55435705", "0.5515872", "0.5506904", "0.5505576", "0.5483609", "0.54572976", "0.5405335", "0.53856987", "0.5332731", "0.5322701", "0.5312288...
0.7793025
0
Cancels a single payment if not already submitted to the banks, accepts only metadata
cancelPayment(id, metadata) { const path = `/payments?${id}/actions/cancel`; const method = 'POST'; const options = buildOptions(this.token, this.endPoint, path, method, metadata); return goCardlessRequest(options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancelPayment() {\n paymentSectionSelector.hide();\n hidePaymentSection = true;\n paymentCompletedCheckboxSelector.prop('checked', false);\n $('#error-text-payment').addClass('is-invisible');\n }", "function cancel_payments() {\n if (payment_update_timer) {\n clearI...
[ "0.6326584", "0.59486276", "0.589428", "0.5775986", "0.5738189", "0.56567025", "0.5653669", "0.56467575", "0.55919087", "0.5551002", "0.55275065", "0.5519132", "0.54919857", "0.5487328", "0.5436725", "0.5435944", "0.5416343", "0.5394511", "0.5369533", "0.5359913", "0.5359913"...
0.6617112
0
retries a failed payment. you will receive a webhook.
retryPayment(id, metadata) { const path = `/payments?${id}/actions/retry`; const method = 'POST'; const options = buildOptions(this.token, this.endPoint, path, method, metadata); return goCardlessRequest(options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retry() {\n if (a.withRetry && a.retries > 0) {\n console.log(\"REST: Retrying ! %d more times with delay %s \", a.retries, a.retryInterval);\n a.retries--;\n setTimeout(rest.bind(null, type, apiCall, data, isBinary, extraHeaders, a), a.retryInterval...
[ "0.6328052", "0.58819383", "0.58173656", "0.58173656", "0.58173656", "0.56569535", "0.5630741", "0.55953914", "0.55612296", "0.55612296", "0.55499583", "0.5510893", "0.54858714", "0.546007", "0.5457847", "0.54472214", "0.5443135", "0.5433342", "0.5419863", "0.54192847", "0.54...
0.6946773
0
retrieves single mandate by id
getMandate(id) { const path = `/mandates/${id}`; const method = 'GET'; const options = buildOptions(this.token, this.endPoint, path, method, null); return goCardlessRequest(options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getById(id)\n {\n return this.getModel()\n .find(id)\n .first();\n }", "async showBillById(req, res) {\r\n console.log(req.params.id);\r\n const bill = await Bill.findById(req.params.id);\r\n return res.json(bill);\r\n }", "getOne(req, res) {\n ...
[ "0.6360366", "0.63297355", "0.6144648", "0.6128884", "0.6086369", "0.60707706", "0.60270464", "0.600844", "0.60084033", "0.60075295", "0.59515566", "0.5944903", "0.5935789", "0.5907507", "0.5886911", "0.58645356", "0.5864319", "0.58134216", "0.58061725", "0.5796489", "0.57837...
0.6862066
0
Sends a request for subscription creation
createSubscription(subscriptionData) { var path = '/subscriptions'; var method = 'POST'; var options = buildOptions(this.token, this.endPoint, path, method, subscriptionData); return goCardlessRequest(options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async createWebhookSubscription({\n $, data, ...additionalConfig\n }) {\n return this.makeRequest({\n $,\n method: \"post\",\n path: \"/webhook_subscriptions\",\n data,\n ...additionalConfig,\n });\n }", "create(req, res, next) {\n var newSubscriptio...
[ "0.70800555", "0.6742516", "0.63470393", "0.63287395", "0.62463135", "0.6235066", "0.619531", "0.61735386", "0.6169152", "0.61646813", "0.6124632", "0.61048555", "0.61001706", "0.6096444", "0.60741764", "0.6023419", "0.6000758", "0.5979921", "0.59716016", "0.59306705", "0.590...
0.7424311
0
import Map from './components/Map.js';
function App() { return ( <React.Fragment> <BrowserRouter> <div className="App"> <Route exact path='/'> <LandingPage /> </Route> <Route exact path='/studentSignIn'> <StudentSignIn /> </Route> <Route exact path='/facultySignIn'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n return (\n <MapGeo/>\n );\n }", "function Map() {\n return <div id=\"map\">Map</div>;\n}", "function Map() {\n\t\n}", "function Map() {\n\t\n}", "componentDidMount() {\n this.loadMap();\n }", "getComponent (nextState, cb) {\n /* Webpack - use 'require.ens...
[ "0.6429667", "0.62892115", "0.62483907", "0.62483907", "0.6243009", "0.6227966", "0.618279", "0.61783266", "0.6176197", "0.6007727", "0.59872806", "0.5985748", "0.5945606", "0.5939247", "0.59015614", "0.5883559", "0.5878523", "0.5874208", "0.5868905", "0.585577", "0.58457106"...
0.0
-1
main loop, calls canvas functions and train function if currently training
function update() { if (training) { train(); } ctx.clearRect(0,0,c.width,c.height); drawNetwork(); drawBias(); drawCostSum(); drawPrecision(); drawTraining(); drawSetSize(); drawActiveMelody(); window.requestAnimationFrame(update); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadDrawing(){\n submitCanvas(this.sendToNeuralNet);\n }", "function demo_loop(){\n \tdraw_mainScreen();\n \tdraw_presentsScreen();\n \tdraw_backDrop();\n \tdraw_coppers();\n \tdraw_sprites();\n \tdraw_backGradient();\n \tdraw_starfield();\n \tdraw_...
[ "0.6869619", "0.6493177", "0.6476802", "0.64185596", "0.6417271", "0.63795197", "0.6374018", "0.63514745", "0.6339676", "0.63380647", "0.63297313", "0.6288768", "0.6275846", "0.6272982", "0.62473613", "0.6238188", "0.62172234", "0.6212309", "0.6209012", "0.62084293", "0.62059...
0.67192966
1
start the training process
function startTraining() { log("Starting training..."); if (network == null) { log("Error: No network loaded."); return; } if (data == null) { log("Error: No data loaded."); return; } training = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "train() {\n if(!this.running && ! this.recording)\n {\n this.disableButtons(true);\n this.trainingData().then((t)=> {\n this.updateRows();\n if(this.USE_WORKER)\n {\n this.myWorker.postMessage({action:\"train\",data:t});\n }\n else\n {\n t...
[ "0.7605602", "0.76000434", "0.7355897", "0.73010963", "0.7165323", "0.70989984", "0.7051748", "0.68833345", "0.6822753", "0.68214715", "0.67986584", "0.6787132", "0.6706345", "0.66964644", "0.6647952", "0.6473443", "0.6428529", "0.63837945", "0.63624907", "0.63437176", "0.633...
0.79044837
0
stop the training process
function stopTraining() { training = false; log("Stopped training."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stop() {\n this.running = false;\n }", "stop() {\n this.running = false;\n }", "function stop() {\n\t\trunning = false;\n\t}", "stop () {\n this.continue = false\n if (this.abortController) {\n this.abortController.abort()\n }\n }", "stop() {\r\n this._reco...
[ "0.70066315", "0.6936109", "0.6849857", "0.67673486", "0.6750795", "0.6747733", "0.670775", "0.6699282", "0.66878635", "0.66447806", "0.66346556", "0.6628481", "0.6612201", "0.6597582", "0.65498334", "0.65498334", "0.6546551", "0.6541578", "0.64895743", "0.64883006", "0.64739...
0.8631737
0
start the generating process
function startGenerating() { log("Starting generating..."); if (network == null) { log("Error: No network loaded."); return; } const melodyLength = (function() { return 128; })(); generate(network, melodyLength); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genStart() {\n if (!generate) {\n setGenerate(true)\n } else {\n setGenerate(false)\n }\n }", "async start() {\n\t\tawait this.#preprocessor.execQueue();\n\t\tawait this.#pageGen.generatePages();\n\n\t\tthis.#emitter.emit('end');\n\t}", "function start() {...
[ "0.78334314", "0.7187741", "0.6723295", "0.64410454", "0.6420635", "0.6303304", "0.626725", "0.6220895", "0.6185272", "0.61572677", "0.60874236", "0.6069112", "0.606177", "0.6010568", "0.6010568", "0.6010568", "0.6010568", "0.6010568", "0.6010568", "0.5989551", "0.5980232", ...
0.7337012
1
let the network generate melodies
function generate(network, length) { let init = getInitialNotes(); network.resetState(); network.calculateState(init); let melody = []; for (let i=0; i<length; i++) { melody[i] = network.getOutput().matrix; network.calculateState(new Matrix(melody[i])); } for (let i=0; i<melody.length; i++) { melody[i] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGenerating() {\n\tlog(\"Starting generating...\");\n\t\n\tif (network == null) {\n\t\tlog(\"Error: No network loaded.\");\n\t\treturn;\n\t}\n\t\n\tconst melodyLength = (function() {\n\t\treturn 128;\n\t})();\n\tgenerate(network, melodyLength);\n}", "generate() {\n // Refill the population with c...
[ "0.6037065", "0.5960533", "0.5701977", "0.5609602", "0.56060946", "0.55502427", "0.5542496", "0.5530458", "0.5450243", "0.54265934", "0.5423151", "0.5388795", "0.53791624", "0.53627", "0.53517795", "0.5325782", "0.5316237", "0.53155726", "0.5304449", "0.52895176", "0.5288089"...
0.54746264
8
gets first notes for the generating process
function getInitialNotes() { let vector = new Matrix(1,NOTE_RANGE); return vector.withFunction(x => Math.floor(2*Math.random())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OneNoteGenerator(note){\n\tthis.note = note\n}", "function getNote () {\n\n var note = {\n owner: \"auk2@njit.edu\",\n title: \"todo\",\n items: [ \"laundry\", \"apply jobs\", \"gym\" ],\n createDate: \"1/1/2016\",\n l...
[ "0.6345118", "0.60741884", "0.60593504", "0.5956362", "0.5889847", "0.5858294", "0.58407396", "0.5814358", "0.5779064", "0.5760596", "0.57601017", "0.5739595", "0.57250106", "0.5720521", "0.571713", "0.5700438", "0.5694323", "0.56909806", "0.5662989", "0.5654289", "0.56516427...
0.6088485
1
initializes a new network
function initNetwork() { log("Initialized new network."); network = new NeuralNet(NET_STATE_SIZE, NOTE_RANGE, NOTE_RANGE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initNetwork() {\n\n // Cached variable for this object\n var self = this;\n\n // initialize your network!\n this.network = new vis.Network(this.container, this.data, this.options);\n\n this.network.on('selectNode', function(e) {\n self.OnSelectNode(e);\n });\n\n...
[ "0.6995032", "0.69074446", "0.67742276", "0.6701841", "0.6701841", "0.6701841", "0.6701841", "0.6701841", "0.66257614", "0.6518415", "0.639584", "0.634535", "0.631981", "0.6283723", "0.62817013", "0.6228945", "0.6177256", "0.6134608", "0.60828024", "0.60345066", "0.60043657",...
0.8287321
0
Lifecycle method used to notify Banner implementations when they've been shown.
onShow() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onShowing() {\r\n // Stub\r\n }", "show() {\n const height = this._$banner.outerHeight();\n\n RB.scrollManager.markForUpdate(this.$el);\n\n this.$el\n .prop('hidden', false)\n .removeClass('hidden')\n .css({\n height: height,\n ...
[ "0.66654694", "0.6595989", "0.65205866", "0.6391179", "0.6380903", "0.63749295", "0.6352328", "0.6167698", "0.6158356", "0.6044971", "0.60249895", "0.5968475", "0.5903392", "0.5790937", "0.5780154", "0.57721585", "0.57627106", "0.5746163", "0.57274884", "0.57259446", "0.57066...
0.5759267
20
Add message to chat function call on form submit
function enterChat(source) { var message = $('.message').val(); if (/\S/.test(message)) { var html = '<div class="chat-content">' + '<p>' + message + '</p>' + '</div>'; $('.chat:last-child .chat-body').append(html); $('.message').val(''); $('.user-chats').scrollTop($('.user-chats > .chats').he...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitfunction() {\n var message = {};\n text = $('#m').val();\n if (text != '') {\n message.text = text;\n message.sender = myUser.id;\n message.receiver = myFriend.id;\n message.senderName = myUser.name;\n message.receiverName = myFriend.name;\n\n $('#messages').append('<div class=\...
[ "0.7796234", "0.74956286", "0.7463046", "0.7445845", "0.7381273", "0.73615855", "0.7346208", "0.7291747", "0.7286047", "0.7283001", "0.72692907", "0.7219947", "0.7181414", "0.71676826", "0.7092921", "0.70791876", "0.70758295", "0.7060453", "0.70547956", "0.7019411", "0.701941...
0.0
-1
Load the user's preferences and display them
function LoadSettings() { storage.getMany(keys.map(obj => obj.key), (err, data) => { if(err) console.log(err); keys.forEach(key => { try { let val = data[key.key]; if(Object.keys(val).length !== 0) { $(key.contentID).text(val); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadUserPreferences(){\n\t\toptions = getUserPreferences();\n\t}", "function retrieveAndSetPreference(){\n if(typeof(Storage) !== \"undefined\") { //Check if the browser supports local storage\n if(localStorage.guddi_ca_xkcd_user_preference){\n var userPrefer...
[ "0.8094483", "0.7053326", "0.6955042", "0.69221884", "0.6859498", "0.6851374", "0.6826549", "0.6801421", "0.6721565", "0.6698397", "0.6629295", "0.657265", "0.65631413", "0.65433127", "0.64800465", "0.64434195", "0.6426858", "0.64224", "0.63770056", "0.6289217", "0.6288756", ...
0.0
-1
Normalize a port into a number, string, or false.
function normalizePort(val) { var port = parseInt(val, 10); if (isNaN(port)) { // named pipe return val; } if (port >= 0) { // port number return port; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "normalizePort(val){\n /**\n * Normalize a port into a number, string, or false.\n */\n var port = parseInt(val, 10);\n if (isNaN(port)) {\n // named pipe\n return val;\n }\n if (port >= 0) {\n // port number\n return port...
[ "0.844777", "0.84337467", "0.8424202", "0.8402083", "0.83947915", "0.8393728", "0.83874613", "0.8383658", "0.8378447", "0.8378447", "0.83705056", "0.83705056", "0.83705056", "0.83705056", "0.83705056", "0.83705056", "0.83700824", "0.8367369", "0.83595544", "0.83580923", "0.83...
0.0
-1
Event listener for HTTP server "error" event.
function onError(error) { if (error.syscall !== "listen") { throw error; } var bind = typeof port === "string" ? "Pipe " + port : "Port " + port; // handle specific listen errors with friendly messages switch (error.code) { case "EACCES": console.error(bind + " requires elevated privileges"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function httpOnError(error) {\n if (error.syscall !== 'listen') {\n throw error;\n }\n\n var bind = typeof port === 'string'\n ? 'Pipe ' + port\n : 'Port ' + port;\n\n // handle specific listen errors with friendly messages\n switch (error.code) {\n case 'EACCES':\n console.error(bind + '...
[ "0.7118962", "0.70567393", "0.70339364", "0.70246124", "0.6965733", "0.6882446", "0.68554044", "0.68311316", "0.6821094", "0.68109226", "0.6788116", "0.6782291", "0.6781704", "0.67701316", "0.6766919", "0.6750681", "0.6706457", "0.67013055", "0.66602784", "0.66561115", "0.664...
0.0
-1
Event listener for HTTP server "listening" event.
function onListening() { var addr = server.address(); var bind = typeof addr === "string" ? "pipe " + addr : "port " + addr.port; debug("Listening on " + bind); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onListeningHTTP () {\n var addr = server.address()\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port\n debug('HTTP - Listening on ' + bind)\n}", "function onListening() {\n var addr = server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' +...
[ "0.78544015", "0.7739864", "0.7633661", "0.7536681", "0.75315416", "0.73415786", "0.7334293", "0.7303103", "0.7302585", "0.7283272", "0.7272347", "0.72310024", "0.7227042", "0.7161825", "0.7126399", "0.7120529", "0.7105088", "0.7097603", "0.70819986", "0.7073328", "0.70719254...
0.69612044
48
For an output parameter, we want to return the address rather than the value
read_output_address(mode) { let value = this.readProgramCounter(); switch (mode) { case 1: throw "Immediate mode not valid for addresses" case 2: // Add the relative base. // console.debug("Base, value, sum:", this.relativeBase, value, this.relativeBase + value) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function outputInstruction(p1Address) {\n return function() {\n outputs.push(memory.at(p1Address));\n };\n}", "function amReturnParam(map_id, param) {\n\tAmmap.publish('amreturnparam', map_id, param);\n}", "getOutputNode() { return this.fOutputNode; }", "function dOut_dNet(out){\n\treturn out*(1-out);\n...
[ "0.6043187", "0.5858045", "0.5838564", "0.58199924", "0.58194524", "0.5813777", "0.5650421", "0.55821323", "0.55424523", "0.55385256", "0.54421306", "0.5421082", "0.54184854", "0.54159695", "0.5400984", "0.5377477", "0.53760207", "0.5320999", "0.526875", "0.5258689", "0.52244...
0.56751966
6
listed below. Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the compiled file. JavaScript code in this ...
function addToCart(pizzaId){ var key = 'pizza_' + pizzaId; var amount = parseInt(window.localStorage.getItem(key)) || 0; amount ++; window.localStorage.setItem(key, amount); updateOrdersButton(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function js(cb){\n src([jquery,bootstrap_js]).pipe(dest(jsDest));\n cb();\n}", "function js() {\n return gulp.src( 'src/assets/js/*' )\n .pipe( gulp.dest( './build/assets/js/' ) );\n}", "function javascript() {\n return gulp.src('src/assets/js/*.js')\n //.pipe($.sourcemaps.ini...
[ "0.60751045", "0.59816825", "0.5847576", "0.5548351", "0.5508676", "0.54789597", "0.53762573", "0.53580606", "0.5352523", "0.5350525", "0.53465885", "0.530918", "0.53012794", "0.5301067", "0.52961797", "0.52907753", "0.5281497", "0.5281175", "0.52800846", "0.52779853", "0.526...
0.0
-1
Creates a WebGL texture from an Image object
function handleTextureLoaded(data, image, texture) { var gl = data.context; gl.bindTexture(gl.TEXTURE_2D, texture); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texParameteri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTexture(gl, sourceImage) {\n const texture = gl.createTexture()\n gl.bindTexture(gl.TEXTURE_2D, texture)\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE)\n gl.texParameteri(gl.TEXTURE_2D, gl.T...
[ "0.76043695", "0.7596184", "0.7596184", "0.7520066", "0.74786675", "0.7435796", "0.72916096", "0.7266443", "0.7215679", "0.71975327", "0.71884704", "0.7158097", "0.71496266", "0.7148942", "0.7136148", "0.70959777", "0.7082583", "0.7048714", "0.7026619", "0.70221853", "0.70031...
0.61893106
79
Initializes the shader program
function initShaders(data) { var gl = data.context; data.pShader = gl.createProgram(); data.vShader = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(data.vShader, getVertexShader()); gl.compileShader(data.vShader); gl.attachShader(data.pShader, data.vShader)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initProgram() {\n const vertexShader = getShader('vertex-shader');\n const fragmentShader = getShader('fragment-shader');\n\n // Create a program\n program = gl.createProgram();\n // Attach the shaders to this program\n gl.attachShader(program, vertexShader);\n gl.attachShader(program...
[ "0.8300214", "0.8042037", "0.7998855", "0.7991263", "0.7933024", "0.7914416", "0.7905674", "0.7905267", "0.78921634", "0.78086096", "0.77895683", "0.7760446", "0.7728752", "0.76885104", "0.7673218", "0.76204276", "0.7613176", "0.75917923", "0.75914216", "0.7484918", "0.748054...
0.757672
19
Creates model of a cube
function createModel(data) { // Define the vertices for the cube. // Each line represents one vertex // (x, y, z, u, v) var vertices = new Float32Array([ -1.0, -1.0, 1.0, 0.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, -1.0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateCube() {\n var geometry = new THREE.CubeGeometry(100, 100, 100);\n\n this.addGeometry(geometry);\n _camera.position.z = 500;\n\n return this;\n }", "function createCube() {\n var destObj = new Entity(null, [getRnd(-10, 10), getRnd(10,15), -getRnd(5, 25)], [1,1,1], 1);\n destOb...
[ "0.7376326", "0.7198963", "0.6917537", "0.68907887", "0.6822326", "0.67580676", "0.66704667", "0.6615796", "0.66087264", "0.6512935", "0.6506163", "0.6483736", "0.64639384", "0.64575666", "0.64455295", "0.6395807", "0.6389654", "0.63827616", "0.63728917", "0.63728917", "0.636...
0.7820172
0
Class of homogeneous transformation matrices
function Aff3d() { this.values = new Float32Array(16); this.setToZero = function() { var i; for(i=0; i<16; ++i) this.values[i] = 0; } this.setToIdentity = function() { var i; for(i=0; i<16; ++i) this.values[i] = 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "transform(matrix) {\n var t = new M.XY(this.x*matrix.a+this.y*matrix.c+matrix.tx, this.x*matrix.b+this.y*matrix.d+matrix.ty);\n this.x = t.x; this.y = t.y; return this;\n }", "function Transform() {\n this.position = new Vector3();\n this.orientation = new Quaternion();\n this.scale = 1;\n ...
[ "0.6518001", "0.647259", "0.64051247", "0.62738824", "0.6270903", "0.6259295", "0.62519777", "0.62432975", "0.624323", "0.61930835", "0.61753315", "0.61550254", "0.6153443", "0.61498356", "0.6144807", "0.61365205", "0.60880846", "0.6086684", "0.6033292", "0.60296875", "0.6021...
0.0
-1
Class of 3D vectors
function Vec3( x, y, z ) { this.x = x; this.y = y; this.z = z; this.add = function(vec) { return new Vec3(x + vec.x, y + vec.y, z + vec.z); } this.sub = function(vec) { return new Vec3(x - vec.x, y - vec.y, z - vec.z); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Vector3d(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n}", "function Vec3 (x, y, z) {\n this.x = x\n this.y = y\n this.z = z\n}", "function Vector(x, y, z) {\n\t this.elements = [x, y, z];\n\t }", "function v(x,y,z){\n return new THREE.Vector3(x,y,z); \n ...
[ "0.711206", "0.7034561", "0.69814783", "0.68947077", "0.68769616", "0.68602103", "0.68137294", "0.67181075", "0.6685531", "0.6681318", "0.6642232", "0.6609599", "0.6586999", "0.6579744", "0.65348417", "0.652591", "0.6514085", "0.6510617", "0.6483892", "0.64827013", "0.6433474...
0.67498106
7
Calculates the cotangent of a value
function cot(value) { return 1.0 / Math.tan(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tan(value) {\n return round(Math.tan(RADIANS * value), 10);\n}", "getTangent( t, optionalTarget ) {\n\n\t\tconst delta = 0.0001;\n\t\tlet t1 = t - delta;\n\t\tlet t2 = t + delta;\n\n\t\t// Capping in case of danger\n\n\t\tif ( t1 < 0 ) t1 = 0;\n\t\tif ( t2 > 1 ) t2 = 1;\n\n\t\tconst pt1 = this.getPoi...
[ "0.6182872", "0.6104572", "0.6104572", "0.607952", "0.60553", "0.59173006", "0.5762067", "0.5712567", "0.56941974", "0.56941974", "0.56941974", "0.56941974", "0.56941974", "0.565977", "0.5642217", "0.5606081", "0.560506", "0.5588485", "0.55771005", "0.5570499", "0.5526623", ...
0.7735909
0
Helper method for defining associations. This method is not a part of Sequelize lifecycle. The `models/index` file will call this method automatically.
static associate (models) { // define association here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n // define association here\n // This is how Sequelize knows to create \"magic methods\"\n // These are functions that can automatically pull\n // related data.\n // For example: If I have a User object\n // I can call `await user.getContacts()` to get an\n...
[ "0.76417476", "0.7508577", "0.7314015", "0.7295544", "0.72851086", "0.72788215", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", "0.72598094", ...
0.7307412
4
1. Example of a function:
function add(num1, num2) { // function keyword, function name, (parameters) return num1 + num2; // code block }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exampleFunction1() {\n /* SOME CODE */\n }", "function exampleFunctionToRun(){\n\n }", "function fuction() {\n\n}", "function miFuncion (){}", "function example(fruit) {\r\n // function name\r\n // params (a.k.a. \"function signature\" -- this is where you name your params\r\n} // fun...
[ "0.71079767", "0.7067942", "0.7038618", "0.69956595", "0.6957552", "0.6890209", "0.6890209", "0.6890209", "0.6746263", "0.66545725", "0.6646009", "0.6625228", "0.65932846", "0.65840405", "0.65578413", "0.6540431", "0.6498737", "0.6498737", "0.6498737", "0.6477354", "0.647652"...
0.0
-1
=> 21 3. Example of return
function addMore(param1, param2) { return param1 + param2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnVal(num) {\n return num * 3;\n}", "function addThree(num) {\n return num + 3;\n }", "function ex2(){\n let first = 12\n return first // return \n }", "function plusThree(num) {\n return num + 3;\n}", "function plusThree(num) {\n return num + 3;\n}", "function a(n) { //n=3\...
[ "0.7359724", "0.68662983", "0.67966616", "0.67652005", "0.67652005", "0.6726052", "0.6721264", "0.6633721", "0.6609048", "0.65798944", "0.6528206", "0.6488992", "0.6478816", "0.64631337", "0.6452686", "0.64225245", "0.6417318", "0.64139783", "0.6400095", "0.63854593", "0.6328...
0.0
-1
=> 8: the value resulting from the function's code was returned out of the function, so it was available to be added to 1. On the other hand... 4. Example without return:
function addAgain(parameter1, parameter2) { parameter1 + parameter2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function return4 () {\n return 4;\n}", "function bar() { //1\n return 3;\n }", "function return5(){\n\treturn 5;\n}", "function returnFunction() {\r\n // return 1+1; // will return undefined.\r\n return 1+1;\r\n}", "function onePlusOne(){\n return 2;\n}", "function foo() {\n return 2...
[ "0.76152134", "0.72133505", "0.7181956", "0.7160464", "0.7145672", "0.70886856", "0.70816135", "0.704024", "0.704024", "0.7039797", "0.7005924", "0.69965553", "0.69752926", "0.69752926", "0.6923223", "0.69199497", "0.69186103", "0.69118685", "0.6907981", "0.6903324", "0.68980...
0.0
-1
=> NaN: since the resultant value wasn't returned out of the function, the computer doesn't know what the value of the function call is, so it can't be added to 1. 5. Another example without return:
function addSomeMore(n1, n2) { console.log(n1 + n2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnFunction() {\r\n // return 1+1; // will return undefined.\r\n return 1+1;\r\n}", "function myFunction(a, b) {\n if (a != b) {\n return (a + b);\n } else { return (a + b) * 5; }\n\n}", "function ex1(){\n return 12+20\n }", "function returnsNonSmi(){ return 0.25; }", "funct...
[ "0.7103799", "0.67050797", "0.6593524", "0.65666366", "0.65056586", "0.642409", "0.6418591", "0.6398269", "0.6398269", "0.6391813", "0.63742054", "0.62590617", "0.6253041", "0.624772", "0.62064016", "0.6202368", "0.61958396", "0.61905825", "0.6178931", "0.61755806", "0.615063...
0.0
-1
=> Prints 7 and NaN. The function prints 7 again because of the code telling it to print to the console, but it's not actually creating a value or returning it. Therefore, console.log(addSomeMore(4, 3) + 1); can't be calculated because the function never produced a value to add to 1. 6. Example of closure:
function makeHometown (cityName, stateName) { var hometownIntro = "My hometown is "; function makeCityState () { // has access to outer function's var and parameters return hometownIntro + cityName + "," + " " + stateName + "."; } return makeCityState (); // return the inner function }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAddByFunction(firstNumber) {\n const someThing = 'something';\n return function(secondNumber) {\n console.log(someThing);\n return firstNumber + secondNumber;\n }\n}", "function getAdd() {\n let baz = 0;\n return function () {\n baz += 1;\n return baz;\n };\n}", "function add(n...
[ "0.6750436", "0.661321", "0.6489082", "0.640673", "0.640524", "0.6372628", "0.63275397", "0.62832904", "0.62361586", "0.6228286", "0.61858344", "0.61289185", "0.6117376", "0.6110603", "0.61000174", "0.609541", "0.6032842", "0.6018889", "0.60063165", "0.60030687", "0.59999776"...
0.0
-1
Objects and arrays must be memoized to prevent unnecessary recalculations of data
function useMemoizedObject(obj) { const objStr = JSON.stringify(obj) return React.useMemo(() => { return obj // eslint-disable-next-line react-hooks/exhaustive-deps }, [objStr]) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_updateMemo(validTeam) {\n for (let pairIdx = 0; pairIdx < validTeam.length; ++pairIdx) {\n let p1Idx = this.players.indexOf(validTeam[pairIdx].value[0]);\n let p2Idx = this.players.indexOf(validTeam[pairIdx].value[1]);\n this.memo[p1Idx][p2Idx] = 1;\n this.memo[p2Idx][p1Idx] = 1;\n }\n ...
[ "0.5723638", "0.5688008", "0.56522965", "0.56257975", "0.5586987", "0.5586987", "0.5569553", "0.5554094", "0.5509498", "0.5470654", "0.5461866", "0.5460214", "0.54567987", "0.54370993", "0.5435887", "0.54107577", "0.53976357", "0.5382315", "0.53763825", "0.53496504", "0.53346...
0.6268684
0
Get class names for a cell theme. Padding is set on the inner wrapper to prevent the inner wrapper (with overflow hidden) from clipping borders, box shadows, etc.
function getCellTheme(style) { if (!style) { return {} } if (style.padding != null) { const { padding, ...cellStyle } = style return { className: css(cellStyle), innerClassName: css({ padding }) } } return { className: css(style) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnClass(el) //adds styles to cells with a given value. el is the Data element. Num is an identifier\n\t{\n\n\t\tidx++;\n\t\tif (el.innerHTML == \"l\") {\n\t\t\treturn 'dark';\n\t\t}\n\t\t\n\t\tif (idx % 2 == 0)\n\t\t\treturn \"blank1\";\n\t\telse\n\t\t\treturn \"blank2\";\n\n\n}", "cellClass(){\n ...
[ "0.61580867", "0.613401", "0.6088573", "0.58897793", "0.58645797", "0.5791523", "0.5770283", "0.5724908", "0.56952924", "0.5670726", "0.5532801", "0.5481848", "0.54360723", "0.54099554", "0.5394396", "0.537632", "0.53446764", "0.53398585", "0.53112066", "0.52799344", "0.52640...
0.649771
0
get command call structure (for logging purposes)
function commandCallStructure(commandName, args) { const callArgs = args.map((arg) => { if (typeof arg === 'string' && (arg.startsWith('!function(') || arg.startsWith('return (function'))) { arg = '<fn>'; } else if (typeof arg === 'string' && /** * the is...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getArgs() {return this.msg, this.command;}", "_parseMessage(cmd, tab) {\r\n console.info(\"cmd=\" + cmd)\r\n console.info(tab)\r\n switch(cmd) {\r\n case \"getFullState\":\r\n return tab.toString()\r\n default:\r\n tab[cmd]()\r\n }\r...
[ "0.632185", "0.5979784", "0.59719676", "0.59212756", "0.58466476", "0.58425653", "0.58005273", "0.5654855", "0.5634186", "0.56106776", "0.55712986", "0.55664635", "0.5560497", "0.55290365", "0.5495085", "0.54725295", "0.5465273", "0.5462684", "0.5457532", "0.54103076", "0.540...
0.6372929
0
get type of command argument
function getArgumentType(arg) { return arg === null ? 'null' : typeof arg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function argType(arg) {\n return typeof arg;\n}", "get type() { return this.args.type }", "function typeofArg(x) {\n return typeof arguments[0];\n}", "function typeArgument(argument){\n return typeof(argument);\n}", "function getType(arg) {\n return typeof arg;\n}", "function getDataType(args...
[ "0.75567305", "0.7513967", "0.7444699", "0.74253935", "0.728985", "0.7066363", "0.6961633", "0.69097906", "0.68896556", "0.6727041", "0.6639264", "0.6594727", "0.652785", "0.61233944", "0.60828984", "0.6065311", "0.5993659", "0.59899807", "0.59623057", "0.5938325", "0.5919629...
0.73294556
4
filter out arguments passed to specFn & hookFn, don't allow callbacks as there is no need for user to call e.g. `done()`
function filterSpecArgs(args) { return args.filter((arg) => typeof arg !== 'function'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_failIfArgumentsAreNotAllChecked(\n f,\n context,\n args,\n description\n ) {\n const argChecker = new ArgumentChecker(args, description);\n const result = currentArgumentChecker.withValue(\n ...
[ "0.56700563", "0.5656009", "0.54840803", "0.545324", "0.5422134", "0.5416009", "0.533567", "0.5330206", "0.5288181", "0.5280571", "0.5245013", "0.52444714", "0.5197504", "0.51924163", "0.5170703", "0.51515806", "0.5133953", "0.5133953", "0.51277053", "0.51187265", "0.50803417...
0.735954
0
After each answer is submitted this function is called. Here you can take additional steps in response to the user's answers. From updating a 'correct answers' counter to exiting out of an onboarding flow if the user is is restricted (age, geofencing) from your app.
onAnswerSubmitted(answer) { this.setState({ answersSoFar: JSON.stringify(this.surveyRef.getAnswers(), 2) }); switch (answer.questionId) { case 'favoriteColor': { // do something break; } default: break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_answer_submission(){\n answer = given_answer();\n correct = is_correct_answer(answer,question_on_screen);\n update_question_result(correct);\n counter++;\n}", "function _submitAnswer() {\n // checks if answer is correct\n if (vm.answerSelected == vm.questionSelected.Cor...
[ "0.7996281", "0.74661416", "0.7365701", "0.7330164", "0.72949505", "0.7287693", "0.72489107", "0.72401196", "0.7196714", "0.71795654", "0.71471065", "0.7037968", "0.70265204", "0.699335", "0.69535595", "0.6940256", "0.6939754", "0.6917645", "0.69107985", "0.6886161", "0.68541...
0.0
-1
Crea una aplicacion express
CrearApp() { this.app = express(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createApp() {\n const app = new Koa();\n const router = new Router();\n /* \n Middlewares\n */\n\tapp.use(helmet());\n\tapp.use( async (ctx, next) => {\n\t\tconst reqOrigin = ctx.header.origin;\n\t\tregisterName.forEach(origin => {\n\t\t\tif (origin === reqOrigin) ctx.set(\"Access-Control-A...
[ "0.702429", "0.6709028", "0.656379", "0.6562376", "0.64239013", "0.6306241", "0.6299383", "0.6210955", "0.61760205", "0.60774684", "0.6046357", "0.6029909", "0.60245174", "0.602105", "0.6016047", "0.5957514", "0.59244096", "0.5917462", "0.5893118", "0.58823156", "0.5872227", ...
0.69937694
1
Se crean las configuraciones respectivas del servidor
Configuracion() { this.port = process.env.PORT || Server.PORT; this.app.use(express.static(path.join(__dirname, "/../build"))); // Agregar la ruta de los static // JSON Parser this.app.use(bodyParser.json()); // Parser de las consultas tipo String this.app.use(bodyParser....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadConfig() {\n lumServer.config = require('../etc/config.json').lumServer || {};\n lumServer.config.serverName = lumServer.config.serverName || \"lum-server\";\n lumServer.config.port = (!isNaN(process.env.APPPORT) && Number(process.env.APPPORT))\n ...
[ "0.6995616", "0.6988842", "0.68198955", "0.6509685", "0.6327962", "0.62640536", "0.6238723", "0.62047154", "0.61415243", "0.6140785", "0.60614014", "0.5969452", "0.59608555", "0.59213597", "0.5888922", "0.5882474", "0.5819814", "0.58036417", "0.58004844", "0.57154304", "0.570...
0.71760774
0
Metodo para crear el servidor Http
CrearServidorHttp() { this.server = http.createServer(this.app); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createServer(){\n if ( this._server === null ){\n // Create a new HTTP server.\n this._server = net.createServer(this._options);\n // Bind event handlers.\n this._bindEventHandlers();\n }\n }", "function createHttpServer() {\n\t\tutil.log('Starting ht...
[ "0.67595565", "0.6592815", "0.65317124", "0.6530474", "0.6465969", "0.6378711", "0.6372521", "0.63608533", "0.6306592", "0.6288683", "0.6288683", "0.6238205", "0.62325656", "0.62259626", "0.62178737", "0.6199703", "0.6163472", "0.6163472", "0.6163472", "0.6163472", "0.6163472...
0.790541
0
Metodo para crear los sockets del pasajero y el conductor
Sockets() { this.io = socketIo(this.server); let sockets = new Socket_1.Socket(this.io); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initSockets() {\n this.relay.on('requests satisfied', (data) => {\n const sockets = this.channel('relay');\n\n if (!sockets)\n return;\n\n this.to('relay', 'relay requests satisfied', data);\n });\n }", "setupSocket() {\n this.socket = io('/gameroom');\n this.socket.on('connect...
[ "0.6881956", "0.68804663", "0.66970295", "0.6636301", "0.6549792", "0.6515178", "0.65021783", "0.6452831", "0.6413911", "0.63811773", "0.6362487", "0.63281363", "0.62925583", "0.6278322", "0.62576526", "0.62566847", "0.62522554", "0.62487596", "0.6229297", "0.6198676", "0.618...
0.7236873
0
Devuelve una instancia de la aplicacion
static Instance() { return new Server(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CrearApp() {\n this.app = express();\n }", "function get_app() {\n return app;\n}", "function init() {\n return new Application();\n}", "function App() {\n return null;\n }", "function App() {\n return null;\n }", "function auxinApp(uiaId)\n{\n log.debug(\"auxinApp App co...
[ "0.63017076", "0.62839866", "0.62708616", "0.6267642", "0.6267642", "0.6243398", "0.6235056", "0.6230817", "0.62178373", "0.6214227", "0.6197025", "0.61672825", "0.6139818", "0.6101706", "0.6088113", "0.60788363", "0.60564506", "0.6050842", "0.60462946", "0.602574", "0.600753...
0.55548245
93
Se crean las rutas para las paginas en html
Routes() { let router; router = express.Router(); IndexRoute_1.IndexRoute.Home(router); this.app.use(router); // Usa el middleware del Router de express }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pageGenerator() {\n var route = routing();\n\n var body = \n `<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js\"></script>` +\n `<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLk...
[ "0.5962599", "0.5952639", "0.58727264", "0.58704036", "0.58092725", "0.58014387", "0.5773775", "0.57254565", "0.56856", "0.5668578", "0.5665098", "0.5649268", "0.5633961", "0.56211483", "0.5598192", "0.55849266", "0.5580511", "0.5570483", "0.5557729", "0.55509186", "0.5547544...
0.0
-1
Metodo donde escucha el servidor en el puerto definido
Listen() { this.server.listen(this.port, () => { console.log(` ---> Servidor corriendo en ${Constants_1.HOST}${this.port}`); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrancaServidor(requiere, respuesta) {\n console.log(\"Alguien se ah conectado\");\n respuesta.writeHead(200,{\"Content-Type\":\"text/html\"}); // le digo que le enviare informacion de tipo html al servidor\n respuesta.write(\"<h1>El servidor funciona correctamente en el puerto 8888</h1>\");\n ...
[ "0.6972179", "0.6867554", "0.6571616", "0.65033704", "0.64289176", "0.63135934", "0.61129653", "0.6099381", "0.6035023", "0.5905219", "0.587243", "0.5838728", "0.5828345", "0.58097476", "0.57529116", "0.57490987", "0.5743144", "0.5731531", "0.5683196", "0.568062", "0.566997",...
0.59297675
9
! The buffer module from node.js, for the browser.
function e(A,t){if(A===t)return 0;for(var s=A.length,B=t.length,e=0,i=Math.min(s,B);e<i;++e)if(A[e]!==t[e]){s=A[e],B=t[e];break}return s<B?-1:B<s?1:0}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function createBuffer() {\n var ptr = exports.hb_buffer_create();\n return {\n ptr: ptr,\n /**\n ...
[ "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7242275", "0.72009933", "0.71086955", "0.7015804", "0.68968946", "0.68760246", "0.6799534", "0.67715156", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67...
0.0
-1
Make magic happen repull the Cart, clear out the screen and redraw it
function renderCart() { loadCart(); clearCart(); showCart(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n \n}", "function renderCart() {\r\n loadCart();\r\n clearCart();\r\n showCart();\r\n}", "function renderCart() {\n\n loadCart();\n clearCart();\n showCart();\n updateCounter();\n}", "function renderCart() {\n loadCart();\n clearCar...
[ "0.7304993", "0.7201094", "0.71857864", "0.7084169", "0.68010366", "0.6783789", "0.6782984", "0.6718321", "0.6718321", "0.6718321", "0.66432977", "0.65320075", "0.65320075", "0.65265423", "0.6525382", "0.65016794", "0.6469047", "0.64600706", "0.6454932", "0.6423515", "0.64100...
0.72768056
15
TODO: Remove all of the rows (tr) in the cart table (tbody)
function clearCart() { tBody.innerHTML = ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearCart() {\n let tableRows = document.querySelectorAll('#cart tbody tr');\n for(let i = 0; i < tableRows.length; i++){\n if(tableRows[i]){\n tableRows[i].remove();\n }\n}\n}", "function clearCart() {\n var tableRows = document.querySelectorAll('#cart tbody tr');\n\n for (var i = 0; i <...
[ "0.85055447", "0.8451158", "0.83708954", "0.82006097", "0.814274", "0.81226635", "0.8114432", "0.8024729", "0.7881731", "0.77456546", "0.7602138", "0.7582093", "0.74852633", "0.7425525", "0.7423476", "0.7354028", "0.7279", "0.7251687", "0.7234815", "0.7122093", "0.7078509", ...
0.0
-1
Display the cards on the page shuffle the list of cards using the provided "shuffle" method below loop through each card and create its HTML add each card's HTML to the page Game start function
function init() { 'use strict'; // turn on Strict Mode cards = shuffle(cards); for(let i = 0; i < cards.length; i++){ deck.innerHTML = ''; [].forEach.call(cards, function(element){ deck.appendChild(element); }); cards[i].classList.remove("show", "open", "match", "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newGame() {\n let deck = document.querySelector('.deck');\n //shuffle the list of cards using the provided \"shuffle\" method\n let cardGrid = shuffle(allCards).map(function(card) {\n //loop through each card and create its HTML\n return makeCard(card);\n });\n //add each card...
[ "0.7983895", "0.77980125", "0.7769577", "0.76671547", "0.7646096", "0.76174486", "0.76072115", "0.7605512", "0.7589892", "0.75841796", "0.75734466", "0.75698614", "0.75689995", "0.75433177", "0.75307614", "0.75218135", "0.7515073", "0.75043535", "0.7426653", "0.7420972", "0.7...
0.69565946
70