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
onMousUp(event) Handles mouse up events, i.e., releases camera drag.
function onMouseUp(event) { onMouseMove(event); // just reusing the above code dragging = false; // adding one line here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onUp(event) {\n moveFilter(msgMoveMotion.Up);\n}", "function mouseUp(e) {\n removeMoveListener();\n removeUpListener();\n _callbacks.end.forEach(function(callback) {\n callback.call();\n });\n }", "function MouseUpEvent() {}", "onMouseUp (e) {\n if (this.isMouse...
[ "0.75221175", "0.7388734", "0.7198851", "0.7145797", "0.70438766", "0.6998307", "0.69524914", "0.6928595", "0.68784785", "0.68320256", "0.68115574", "0.67875415", "0.6763165", "0.6763165", "0.67508566", "0.6730537", "0.67199385", "0.6698816", "0.6694003", "0.6693345", "0.6693...
0.61109346
95
onMouseUpWindow(event) Handles mouse up events, i.e., releases camera drag even outside renderer.
function onMouseUpWindow(event) { dragging = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onMouseUpWindow(event) {\n if (!insideElmt) {\n onMouseUp(event);\n }\n\n releaseMouse();\n }", "function onMouseUpWindow( tracker, event, noRelease ) {\n if ( ! THIS[ tracker.hash ].insideElement ) {\n onMouseUp( tracker, event );...
[ "0.76512325", "0.70862526", "0.69801", "0.69757074", "0.6781109", "0.6676201", "0.6657995", "0.66514367", "0.66188383", "0.6505151", "0.6492523", "0.6467307", "0.64007163", "0.63959825", "0.6383822", "0.63837826", "0.6367998", "0.6367376", "0.6367376", "0.6367376", "0.6365617...
0.69072604
4
function for verifying tokens
function verifyToken(req) { return new Promise(function (resolve, reject) { console.log(req.signedCookies) let result = { decoded: '', success: true } // if (req.url.includes('/users/auth/')) { // id = req.url.slice(12, req.url.length) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validarTk(token){\n return jwt.verify(token, config.jwtSecret);\n \n \n}", "function tokenIsVaild(ctx) {\n bearerHeader = ctx.header['authorization'];\n token = bearerHeader.split(' ')[1];\n console.log(token);\n try {\n Jwt.verify(token, appsecret);\n } catch {\n ...
[ "0.70130175", "0.69430465", "0.6849204", "0.67440474", "0.6573651", "0.6557658", "0.65332264", "0.65310794", "0.65250826", "0.64333427", "0.6385251", "0.63636816", "0.63547266", "0.63527834", "0.63366926", "0.63153553", "0.6304242", "0.6296103", "0.6282919", "0.62778306", "0....
0.0
-1
Creates our snake array
createSnake(snakeLength) { for (let i=snakeLength-1;i>=0;i--) { this.snakeArr.push({ x:20*i, y:0 }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSnake() {\n var length = 1;\n snake = [];\n\n for(var i = length - 1; i >= 0; i--) {\n snake.push({ x: i, y: 0 })\n }\n}", "function initSnake() {\n // This function creates a snake array of length 5\n // Note that the \"head\" of the snake is the beginning of the array, and the \"tai...
[ "0.7942977", "0.78968394", "0.78634495", "0.7777656", "0.76802903", "0.76054925", "0.72483826", "0.67446476", "0.6639845", "0.6605926", "0.6546681", "0.65089136", "0.6494935", "0.6494845", "0.6482658", "0.6461407", "0.6458484", "0.6447244", "0.6446133", "0.6366129", "0.629559...
0.72208095
7
Draws a snake based on the current snakeArr
draw() { //Set up the canvas const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); //Clearing the canvas ctx.clearRect(0,0,500,500); for (let i=0;i<this.snakeArr.length;i++) { ctx.fillRect(this.snakeArr[i].x, this.snakeArr[i]....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSnake() {\n // Draw each part\n snake.forEach(drawSnakePart)\n }", "function drawSnake() {\n\t// loop through the snake parts drawing each part on the canvas\n\tsnake.forEach(drawSnakePart);\n}", "function drawSnake() {\n // Loops through the snake parts drawing each part on the ca...
[ "0.8310497", "0.820316", "0.8162561", "0.8153362", "0.8116167", "0.8113642", "0.8113018", "0.8102626", "0.80768", "0.8062277", "0.80459666", "0.8031999", "0.8013698", "0.79925984", "0.79925984", "0.78356117", "0.7772498", "0.7634077", "0.761644", "0.7598063", "0.7592532", "...
0.7489285
25
Setup the properties for the given widget that is being generated
function setupProps(scope, elem, attrs, props) { /* * For each property we are going to do the following: * * 1. See if there is an initial value * 2. Evaluate it against the scope via scope.$eval() so we have a resolved value * 3. $observe() for any changes in the property * 4. $watc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "after_init_control(){\n\n if(!this.properties.visible)\n this.hide();\n\n if(!this.properties.enabled)\n this.disable();\n\n if(this.properties.style)\n this.jquery().attr('style', this.properties.style);\n\n if(this.properties.field_style)\n ...
[ "0.61667264", "0.60426533", "0.5984093", "0.59363806", "0.59315914", "0.59315914", "0.5859264", "0.5796507", "0.57576925", "0.57486993", "0.5728189", "0.57104695", "0.5651942", "0.56233233", "0.56099266", "0.5598202", "0.55782723", "0.5561548", "0.5549122", "0.554463", "0.554...
0.0
-1
Generate a server so we can run better tests
function createTestServer(){ bot.createServer(process.env.TestUser, "us-east", function(error,server) { if (error){ failure("Test Server Generation"); exit(); throw error; } testServer=server; testTextChannel=server.defaultChannel; //This should return error first for async callback but it only retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createServer() {\n const script = getScriptPath()\n const cp = require(\"child_process\")\n\n if(!isPackaged())\n server = cp.spawn('python', [script, PORT])\n else\n server = cp.execFile(script, [PORT])\n\n server.stderr.on('error', err => {\n console.log('Server threw...
[ "0.6725513", "0.67220855", "0.6693537", "0.6686902", "0.66794765", "0.66655535", "0.66498023", "0.6644256", "0.6585301", "0.6568285", "0.65646535", "0.65643144", "0.65623724", "0.6463226", "0.6445843", "0.6440524", "0.6440518", "0.64113164", "0.6377527", "0.6358657", "0.63550...
0.6497047
13
Specific Player movement keys
function keyPressed() { //Player1 keycode and movement if (!game.gameOver) { if (keyCode === 38 && player1.y >= 25) { player1.moveUp(); } else if (keyCode === 40 && player1.y - 27.5 <= 500) { player1.moveDown(); } else if (keyCode === 37 && player1.x >= 25) { player1.moveLeft(); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "keyMove(direction, player) {\n let newPos = player.pos;\n if (direction == 'l')\n newPos = [newPos[0]-1, newPos[1]];\n else if (direction == 'r') \n newPos = [newPos[0]+1, newPos[1]];\n else if (direction == 'd')\n newPos = [newPos[0], newPos[1]-1];\n ...
[ "0.7822001", "0.7692071", "0.7669712", "0.7610947", "0.7524009", "0.7467505", "0.7464945", "0.74101365", "0.7380416", "0.73530895", "0.7333907", "0.7315014", "0.7298943", "0.7279538", "0.7256593", "0.7256593", "0.7255789", "0.724634", "0.72074413", "0.72046715", "0.7190538", ...
0.75013095
5
import momentBusinessDiff from './momentjsbusiness'; momentBusinessDiff(moment);
function getPreviousMonday() { return moment().startOf('isoWeek'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(moment) {\n this.moment = moment;\n }", "viewDateMoment () {\n const m = moment(this.props.viewDate)\n return function () {\n return m.clone()\n }\n }", "moment(date) {\n return moment(date);\n }", "function diffDayTime(a,b){return moment.duration({days:a.clone().stripT...
[ "0.66292703", "0.607608", "0.60375226", "0.57610387", "0.57214385", "0.5696295", "0.5652342", "0.5560556", "0.54821724", "0.54619163", "0.5452775", "0.5452775", "0.5452775", "0.5452775", "0.5452775", "0.5452775", "0.5452775", "0.5452775", "0.5452775", "0.5452775", "0.5452775"...
0.0
-1
funcion que activa el boton
function activateBtn() { $btn.prop('disabled', false); $btn.removeClass('offBtn'); $btn.addClass('onBtn'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function activate() {\n\n\n }", "function activate() {\n\n }", "function activate(){\n\n\t\t}", "function activarBotones() {\r\n botones.forEach((valor, index) => {\r\n document.querySelector(\".\" + botones[index]).onclick = function() {\r\n clickBoton(index);\r\n };\r\n });\r\n}", ...
[ "0.68363863", "0.66713774", "0.6655968", "0.6589678", "0.65605724", "0.6429379", "0.6421837", "0.6321229", "0.6280617", "0.6252674", "0.6252632", "0.6239354", "0.6218179", "0.61908036", "0.6172277", "0.61444056", "0.607877", "0.607701", "0.60669184", "0.6022913", "0.6001895",...
0.605853
19
funcion que desactiva el boton
function desactiveBtn() { $btn.attr('disabled', 'disabled'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deactivate(){}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactiv...
[ "0.771829", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", "0.75154376", ...
0.0
-1
ON GIVEN DATE, FUNCTIONS TO FIND WEEK OF MONTH WHERE FIRST WEEK WILL START FROM FIRST MONDAY OTHERWISE DATE WILL LIE IN LAST WEEK OF PREVIOUS MONTH START
function getWeekByDate(date) { var d = new Date(date), month = d.getMonth(), year=d.getFullYear(), mondays = []; d.setDate(1); // Get the first Monday in the month while (d.getDay() !== 1) { d.setDate(d.getDate() + 1); } // Get all the other Mondays in the month ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getWeeksOfMonth(date) {\n const weeks = [];\n const firstDay = this.getFirstDayOfMonth(date);\n let week = new MondayBasedWeek(firstDay);\n\n do {\n weeks.push(week);\n week = week.next();\n } while (this.isSameYearMonth(date, week.start));\n\n return weeks;\n }", "weekDaysBef...
[ "0.7026242", "0.694844", "0.6773186", "0.67381823", "0.6698464", "0.6695673", "0.66893417", "0.66162443", "0.6559187", "0.65489256", "0.654395", "0.6483976", "0.6465275", "0.64385426", "0.6402742", "0.63969356", "0.63675004", "0.6361923", "0.63608193", "0.63231975", "0.631659...
0.6954046
1
ON GIVEN DATE, FUNCTIONS TO FIND WEEK OF MONTH WHERE FIRST WEEK WILL START FROM FIRST MONDAY OTHERWISE DATE WILL LIE IN LAST WEEK OF PREVIOUS MONTH END FUNCTION TO CHECK LEAVE APPLYING DATE IS VALID FOR LEAVE OR NOT START
function checkDateForWeeklyOff(WEEK,DAY,HALF,REPPERIODID,ABSTYPEID,YEAR,DATE){ //debugger; var jsonUrlweek = '/user/dateValidator'; $.ajax({ type: 'GET', url: jsonUrlweek, dataSrc: '', data: { "week": WEEK, "day": DAY, "rep":REPPERIODID, "half":HALF, "abstype": ABSTYPEID, "year": YE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__validateWeek(){\n if(this.since instanceof moment && this.until instanceof moment){\n //Primero se define el numero de la semna\n this.week = this.since.isoWeek();\n //Ahora se define el inicio y el fin de la semana\n this.since = this.since.startOf('week');\n this.until = this.until....
[ "0.64290327", "0.63697475", "0.63017845", "0.62431496", "0.62222797", "0.61794955", "0.6090264", "0.6047933", "0.6021183", "0.5978319", "0.5944915", "0.5916931", "0.59155476", "0.58959466", "0.5878629", "0.58772385", "0.5869134", "0.58665466", "0.5851848", "0.5808702", "0.578...
0.63527286
2
FUNCTION TO CHECK LEAVE APPLYING DATE IS VALID FOR LEAVE OR NOT END
function calculateDays(){ var LEAVES=[]; var START_DATE=$('#ABS_START_DATE').val(); var END_DATE=$('#ABS_END_DATE').val(); var start = new Date(START_DATE); var end = new Date(END_DATE); var newend = end.setDate(end.getDate()+1); end = new Date(newend); while(start < end){ //console.log(start.toISOString(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateValidation(startDate,endDate,date,date1,duramt,durunit)\n{\n console.log(startDate+\" \"+endDate+\" \"+date+\" \"+date1+\" \"+duramt+\" \"+durunit);\n if(startDate)\n var st=new Date(startDate.split(\" \")[0]);\n if(endDate)\n var ed=new Date(endDate.split(\" \")[0]);\n if(date)\n var d=new Dat...
[ "0.6217126", "0.6142231", "0.6132809", "0.6115012", "0.6101483", "0.60783476", "0.601547", "0.6010572", "0.5973101", "0.5963669", "0.59629315", "0.5941735", "0.5899995", "0.58807445", "0.5846645", "0.58458793", "0.5833938", "0.58293164", "0.58007294", "0.57979435", "0.5789619...
0.0
-1
FUNCTION TO SEND DATE LIST FOR CALCULATION AND RETURN TOTAL CALCULATED LEAVES START
function calculateLeaves(LEAVES){ //debugger; var jsonUrlcalc = '/user/leaveCalculator'; $.ajax({ type: 'POST', url: jsonUrlcalc, data: JSON.stringify(LEAVES), dataType: 'json', success: function(data){ var message=data.description; //alert(message); $("#AB_DURATION").text(message); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateDays(){\n\tvar LEAVES=[];\n\t\n\tvar START_DATE=$('#ABS_START_DATE').val();\n\tvar END_DATE=$('#ABS_END_DATE').val();\n\tvar start = new Date(START_DATE);\n\tvar end = new Date(END_DATE);\n\tvar newend = end.setDate(end.getDate()+1);\n\tend = new Date(newend);\n\twhile(start < end){\n\t //conso...
[ "0.5982789", "0.58848137", "0.58676356", "0.5867298", "0.5793553", "0.5784075", "0.5769401", "0.57686424", "0.57336944", "0.57041645", "0.5698321", "0.5661618", "0.56594425", "0.5619975", "0.5556799", "0.5499724", "0.54782104", "0.54451233", "0.5433481", "0.54281616", "0.5423...
0.0
-1
truncate input string and insert spaces
function formatMoney(numStr) { // remove all spaces numStr = numStr.replace(/\s/g, ""); var minus; if(numStr.length && numStr[0]==='-') { minus = numStr[0]; numStr = numStr.substr(1, numStr.length); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function strTruncate(string, width) {\n\tstring = string.replace(/[\\s\\r\\n]+/, ' ');\n\tif (string.length >= width) {\n var result = string[width - 1] === ' ' ? string.substr(0, width - 1) : string.substr(0, string.substr(0, width).lastIndexOf(' '));\n if (result.length === 0)\n result = string.substr...
[ "0.7258959", "0.7024621", "0.6962676", "0.6929362", "0.68359625", "0.6773209", "0.6713864", "0.6697528", "0.6661453", "0.6635951", "0.65978914", "0.65961075", "0.6551096", "0.6545634", "0.6541734", "0.6537203", "0.6532873", "0.6532873", "0.65106815", "0.6509058", "0.65023136"...
0.0
-1
trunsform number to non exponent view. For exmaple: "1.23456789e10" > "0.000000000123456789"
function noExponents(num) { var numStr = num.toString(); var numParts = numStr.split(/[eE]/); if(numParts.length === 1) { return numParts[0]; } var left = numParts[0]; var right = numParts[1]; var minus; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function de_exponentize(number) {\n\treturn number * 10000000;\n}", "function numberToString(value) {\n // TODO handle Infinity and -Infinity\n if (_utils_Type__WEBPACK_IMPORTED_MODULE_3__[\"isNaN\"](value)) {\n return \"NaN\";\n }\n if (value === Infinity) {\n return \"Infinity\";\n ...
[ "0.7106022", "0.68925375", "0.6803145", "0.67563254", "0.67140275", "0.65824634", "0.6581109", "0.6565933", "0.64788365", "0.6428445", "0.6421334", "0.64114624", "0.64114624", "0.64114624", "0.64114624", "0.64073014", "0.6404526", "0.6400429", "0.63723624", "0.63720185", "0.6...
0.75724286
0
Load the hierarchy and learner data for each direct report
_loadHierarchyLearningData() { let {webservice} = this.props.config, currentUser = AppStore.getState().currentuser, audience = AppStore.getState().audiencemembers; getLearningForManagerHierarchy(webservice, currentUser.id, audience ,this._onLoadingProgress.bind(this)).fork(console.error, res => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadData() {\n // STAND\n loadStandData();\n // PIT\n loadPitData();\n // IMAGES\n loadImageData();\n // NOTES\n loadNotesData();\n // PRESCOUTING\n loadPrescouting(\"./resources/prescout.csv\");\n\n}", "function loadReport(details, done) {\n var base_path = details.base_path,\n inspecto...
[ "0.58020335", "0.573121", "0.55422825", "0.55391675", "0.5531645", "0.5449419", "0.543224", "0.5402241", "0.5388489", "0.5375096", "0.5278208", "0.5267308", "0.525028", "0.5201794", "0.5194998", "0.5165465", "0.5164614", "0.51541376", "0.51436865", "0.5135189", "0.5129356", ...
0.566626
2
load allego statements for everyone
_loadAllego() { let {webservice} = this.props.config; if (webservice.allegolrs) { requestUsersLRS({lrs: webservice.allegolrs}, getAllEmployeesInHierarchyTree().map(o => o.email)) .fork(err => { console.warn('!!! Could not load Allego statements !!!', err); this._allDataLoaded(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function asiCallOnload(){\n var SDM_noasci = ['meinauto'];\n var asi_p = 'IpZElE,Rdkg7V,NkqpjZ,acWaVx,RmJKxA,BnG7vD,oeu2b6,foY3mB'; //Produktion\n var asiPqTag = false; //Initialisierung, Antwort setzt auf true\n try {\n if ((sdm_vers >= 1) && !SDM_head.isinarray(SDM_noasci, SDM_resource)) {\n fXm_Head...
[ "0.5251766", "0.5223786", "0.51984835", "0.51663756", "0.5142457", "0.5142457", "0.51250696", "0.51249117", "0.5070592", "0.505327", "0.504114", "0.5017868", "0.49817792", "0.4964694", "0.49559718", "0.49514198", "0.4943321", "0.4938176", "0.4937106", "0.49312812", "0.4906249...
0.56469554
0
Instance of the element is created/upgraded. Use: initializing state, set up event listeners, create shadow dom.
constructor() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n // override init to make sure createEl is not triggered\n }", "ready() {\n super.ready();\n const that = this;\n\n that._createElement();\n }", "setupUselessElement() {\n this.uselessElement = this.document.createElement('div');\n }", "setupUselessElement() {\n t...
[ "0.6551576", "0.6409181", "0.63825965", "0.63825965", "0.63825965", "0.63527596", "0.6111384", "0.6063018", "0.6046229", "0.60349965", "0.6033839", "0.5984546", "0.597416", "0.5959151", "0.5937906", "0.59257185", "0.58933425", "0.58754593", "0.5828205", "0.5812903", "0.581238...
0.0
-1
Use for onetime configuration of your component after local DOM is initialized.
ready() { super.ready(); this.$.metaservice.value = this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initConfig() {\n\tupdateDOM();\t\n}", "async initialize(config) { \n \n this.url = config.url;\n \n this.appendWidgetScript();\n }", "init() {\n // override init to make sure createEl is not triggered\n }", "configure () {\n // this can be extended in children classes to avoid ...
[ "0.73340744", "0.6551382", "0.64886", "0.64818347", "0.6467341", "0.6461588", "0.63994527", "0.6369641", "0.6353641", "0.63209134", "0.63209134", "0.6313993", "0.6300532", "0.62049705", "0.6193603", "0.6164183", "0.6148913", "0.6144071", "0.6118672", "0.6093816", "0.60251904"...
0.0
-1
_ESAbstract.SpeciesConstructor / global Get, Type, IsConstructor 7.3.20 SpeciesConstructor(O, defaultConstructor)
function SpeciesConstructor (O, defaultConstructor) { // eslint-disable-line no-unused-vars // 7.3.20.1 Assert: Type(O) is Object. // 7.3.20.2 Let C be ? Get(O, "constructor"). var C = Get(O, "constructor"); // 7.3.20.3 If C is undefined, return defaultConstructor. if (C === undefined) { return defaultConstructo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SpeciesConstructor(O, defaultConstructor) { // eslint-disable-line no-unused-vars\n\t\t// 7.3.20.1 Assert: Type(O) is Object.\n\t\t// 7.3.20.2 Let C be ? Get(O, \"constructor\").\n\t\tvar C = Get(O, \"constructor\");\n\t\t// 7.3.20.3 If C is undefined, return defaultConstructor.\n\t\tif (C === undefined) ...
[ "0.78303975", "0.71727526", "0.6485227", "0.59780145", "0.59418374", "0.59213376", "0.5888831", "0.5884001", "0.5865717", "0.5851486", "0.5851486", "0.5851486", "0.58377594", "0.5658362", "0.56229514", "0.5562871", "0.5526284", "0.5508481", "0.5493554", "0.5491479", "0.549070...
0.79995483
0
split by multiple keywords in a sentence
function split(sentence) { var keys = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; var keysArray = keys; if (!(keysArray instanceof Array)) { keysArray = [keysArray]; } var result = []; var tmp = []; var words = sentence.split(' '); words.forEach(function (word) { if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _translateSearchTextToKeywords(searchText) {\n return searchText.split(' ');\n }", "function getSentences(tag) {\n for (i = 0; i < tag.length; i++) {\n var text = tag[i].textContent\n if (text.indexOf(\" \") !== 1) {\n if (text !== \"\") {\n ...
[ "0.6440097", "0.6265204", "0.62522197", "0.62243205", "0.6176658", "0.6149355", "0.60947865", "0.60176396", "0.6009225", "0.5952591", "0.595217", "0.59263057", "0.5868971", "0.5848701", "0.5847005", "0.5846648", "0.58186936", "0.5753449", "0.5748086", "0.5732177", "0.5707457"...
0.7396847
0
public, does the camera has the mouse focus ?
function isDragStarted() { return dndT != 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isFocusOnCanvas() {\n if( !document.activeElement || \n !document.activeElement.attributes ||\n !document.activeElement.attributes['class'] ||\n document.activeElement.attributes['class'].value.substr(0,8) !== \"vtt game\" \n ) \n { \n return false;\n }\n else \n { \n ...
[ "0.69974023", "0.6858308", "0.6705493", "0.6635906", "0.66074675", "0.6560649", "0.6544272", "0.65410215", "0.64390063", "0.6407131", "0.6309706", "0.62716645", "0.62716645", "0.62716645", "0.6258988", "0.6254713", "0.6249272", "0.6167569", "0.6163451", "0.6159902", "0.615789...
0.0
-1
public, scroll to (x, y)
function scroll(_tgtX, _tgtY) { tgtX = _tgtX; tgtY = _tgtY; applyXYBounds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scrollToTarget(x,y) {\n\t\t\twindow.scrollTo(x,y);\n\t\t}", "function scrollIntoView(cm, x1, y1, x2, y2) {\n\t\t var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n\t\t if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n\t\t if (scrollPos.scrollLeft != null) setScrol...
[ "0.7699363", "0.74536306", "0.7346016", "0.7346016", "0.7346016", "0.73084474", "0.728371", "0.7258964", "0.72536075", "0.7236557", "0.7236557", "0.7236557", "0.7236557", "0.7236557", "0.7236557", "0.7236557", "0.720785", "0.7202412", "0.716605", "0.709158", "0.70720094", "...
0.0
-1
public, zoom and scroll to (x, y, z)
function zoom(_tgtZ) { tgtZ = _tgtZ; tgtZ = tgtZ < minZ ? minZ : tgtZ; tgtZ = tgtZ > maxZ ? maxZ : tgtZ; initXYBounds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zoom(){\n\t//NOT YET\n\t/*var rect = canvas.getBoundingClientRect();\n var mx = panX + (panX - rect.left) / zooms;\n var my = panY + (panY - rect.top) / zooms;\n zooms = document.getElementById(\"za\");\n panX = mx - ((panX - rect.left) / zooms);\n panY = my - ((panY - rect.top) / zooms);\n...
[ "0.68098634", "0.6732943", "0.6690576", "0.6662679", "0.66135734", "0.66110605", "0.6573288", "0.65607476", "0.648248", "0.64746857", "0.6468618", "0.6468489", "0.64605623", "0.6450049", "0.63773793", "0.6357154", "0.63478637", "0.63025224", "0.6212312", "0.6181474", "0.61780...
0.0
-1
_delta: amount of time since the last update
function update(_delta) { if (bounded) { do { posX += (tgtX - posX) / smoothness; posY += (tgtY - posY) / smoothness; posZ += (tgtZ - posZ) / smoothness; var upperLeft = toWorld(0, 0); minima...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(delta) {}", "update(time, delta) {\n }", "getDelta() {\n\t\tlet diff = 0;\n\t\tif ( this.autoStart && ! this.running ) {\n\t\t\tthis.start();\n\t\t\treturn 0;\n\t\t}\n\t\tif ( this.running ) {\n\t\t\tconst newTime = ( typeof performance === 'undefined' ? Date : performance ).now();\n\t\t\tdiff = ( newT...
[ "0.75846416", "0.6979685", "0.69227755", "0.68559134", "0.6760549", "0.66050476", "0.66050476", "0.65846944", "0.65449727", "0.6517388", "0.64863783", "0.6473753", "0.6447673", "0.64277893", "0.63353074", "0.6302518", "0.6290714", "0.6279219", "0.6278123", "0.6218088", "0.620...
0.0
-1
Apply the camera to the context
function apply(_layer, _ctx) { if(bounded) { if(_layer.distance == 0) { _layer.position.x = engine.width / 2; _layer.position.y = engine.height / 2; _layer.position.z = 1; } else if(_layer.distance == 1) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "draw(ctx, camera) {\r\n ctx.drawImage(this.image, this.x - camera.x, this.y - camera.y);\r\n }", "display(context, program_state) {\n const desired_camera = this.cameras[this.selection];\n if (!desired_camera || !this.enabled) return;\n const dt = program_state.animation_delta_time;\n progr...
[ "0.65967935", "0.6490025", "0.6483925", "0.6421364", "0.6381006", "0.63439804", "0.62898254", "0.6238502", "0.6185817", "0.6167109", "0.614274", "0.60312206", "0.5999467", "0.59938025", "0.5935481", "0.5927637", "0.59236664", "0.5900961", "0.58956623", "0.58931667", "0.588411...
0.0
-1
Obtain the visible rectangle
function visibleRect(_posX, _posY, _width, _height, _size) { if(bounded) { var upperLeft = toWorld(0, 0); var lowerRight = toWorld(screenSizeX, screenSizeY); var xMin = upperLeft.x - _posX; var yMin = upperLeft.y - _posY; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getVisibleSelectionRect(global){var selection=global.getSelection();if(!selection.rangeCount){return null;}var range=selection.getRangeAt(0);var boundingRect=getRangeBoundingClientRect(range);var top=boundingRect.top;var right=boundingRect.right;var bottom=boundingRect.bottom;var left=boundingRect.left;//...
[ "0.73543304", "0.7028635", "0.7028635", "0.7028635", "0.6978943", "0.6978943", "0.6978943", "0.6978943", "0.6978943", "0.6978943", "0.69652945", "0.6866715", "0.68323827", "0.68271625", "0.6812434", "0.6806722", "0.68006134", "0.67894775", "0.67501086", "0.67295176", "0.67181...
0.74127346
0
Queue the next rendering stage
function goToStage(_stageName) { var nextStage = engine.stages[_stageName]; if(nextStage) { nextStages.push(nextStage); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render(){\n fc++;\n requestAnimationFrame(render);\n var currentconfig = {\n scale: {_x: stage.scale._x, _y:stage.scale._y},\n position: {_x: stage.position._x, _y:stage.position._y},\n canvasWidth: renderer.view.width,\n canvasHeight: renderer.view.height\n }\n ...
[ "0.6702599", "0.65501374", "0.65439737", "0.65264106", "0.65264106", "0.6516225", "0.6512382", "0.6511963", "0.64813524", "0.64813524", "0.6475509", "0.6464644", "0.64629096", "0.6458296", "0.6454551", "0.64433444", "0.64038366", "0.63833594", "0.6359732", "0.635226", "0.6340...
0.0
-1
codes the hardware buttons Turns on phone screen
function power(){ if(screenOn === false){ screenOn = true; $("#lockscreen").attr("style", "display: block;"); /*shows lockscreen wallpaper*/ console.log(screenOn, "Screen is on"); }else{ //turns off phone screen home(); screenOn = false; screenLocked = true; $("#screen").attr("style", "backg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set Joystick7Button11(value) {}", "get Joystick7Button11() {}", "set JoystickButton11(value) {}", "get JoystickButton11() {}", "set Joystick4Button11(value) {}", "get Joystick4Button11() {}", "set Joystick8Button11(value) {}", "set Joystick6Button11(value) {}", "get Joystick6Button11() {}", "get ...
[ "0.69631934", "0.69295955", "0.68459785", "0.6844661", "0.6843142", "0.68233186", "0.68063164", "0.68017983", "0.6780101", "0.67647225", "0.67553854", "0.6726683", "0.6723135", "0.67187697", "0.6713159", "0.67110074", "0.6709834", "0.67065793", "0.66975135", "0.6694948", "0.6...
0.0
-1
Buttons on bottom of phone
function back(){ if(appMenuOpen){ appMenuOpen = false; $("#app-menu").attr("style", "display: none;"); } if(recentAppsOpen){ recentAppsOpen = false; //un-Hides menu bar on bottom of screen $("#bottom-menu-bar").attr("style","display: block;"); $("#recent-apps-screen").attr("style", "display:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bottomButton(x, y, w, h, options) {\n var r = (options && options.r) || 0;\n return selectiveRoundedRect(x - 1, y - 1, w, h, 0, 0, r, r);\n }", "function bottomButton(x, y, w, h, options) {\n var r = (options && options.r) || 0;\n return selectiveRoundedRect(x - 1, y -...
[ "0.6881312", "0.6826646", "0.6339917", "0.63013387", "0.6248764", "0.62115204", "0.6090628", "0.6089214", "0.60794103", "0.60623723", "0.6036982", "0.60248256", "0.6023236", "0.59783", "0.5965834", "0.59651583", "0.5949212", "0.59367996", "0.593315", "0.59129745", "0.59072053...
0.0
-1
Turns on screen or goes back to home page
function home(){ if(screenOn === false){ power(); }else{ //If the menu is open appMenuOpen = false; $("#app-menu").attr("style", "display: none;"); $("#bottom-menu-bar").attr("style","display: block;"); recentAppsOpen = false; $("#recent-apps-screen").attr("style", "display: none;"); /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goHome() {\n WinJS.log && WinJS.log(\"You are home.\", \"sample\", \"status\");\n }", "function gotoHome(){\n\t\t$('#session').hide();\n\t\t$('#container').show();\n\t\t//stop listening to accelerometer\n\t\tnavigator.accelerometer.clearWatch(watchID);\n\t}", "function onClicked() {\r\n\t\tt...
[ "0.6833914", "0.683256", "0.67020947", "0.6658148", "0.6523814", "0.6457109", "0.6444133", "0.6440903", "0.64302665", "0.64268595", "0.63973844", "0.6388684", "0.63875276", "0.6376228", "0.63761705", "0.63754475", "0.636311", "0.6350648", "0.63451153", "0.633997", "0.62946457...
0.73359954
0
value cannot be an object.
function _getAndRemoveAll_BeforeOrAfter_First(value, beforeOrAfter, array) { var index = array_get_indexes_1.getFirstIndexOf(value, array); return _getAndRemoveAll_BeforeOrAfter_Index_1._getAndRemoveAll_BeforeOrAfter_Index(index, beforeOrAfter, array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__is_object(value) {\n return value && typeof value === 'object' && value.constructor === Object;\n }", "function isObject(value) { return typeof value === \"object\" && value !== null; }", "function isObject(value) {\n\n\t if (typeof value === 'object' && value !== null &&\n\t ...
[ "0.72503686", "0.72082746", "0.71943974", "0.71708894", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.7105779", "0.70592564", "0.6936536", "0.6936536", "0.69342417", "0.6924938...
0.0
-1
unrealized P/L: shares held (last trade price price on buy in)
function calculateUnrealizedPL(position, meanOpenPrice, lastTradePrice) { if (lastTradePrice.eq(ZERO)) return ZERO; return position.times(new BigNumber(lastTradePrice, 10).minus(meanOpenPrice)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stockValue()\n {\n return this.numOfShares*this.sharePrice;\n }", "async updateRate() {\n let avgPriceSrv = await this.client.avgPrice({symbol: this.pair});\n avgPriceSrv = Number(avgPriceSrv.price);\n let res = await this.client.trades({symbol: this.pair});\n let totalPrice = 0;\n re...
[ "0.64710784", "0.6366704", "0.6316491", "0.61390996", "0.6118032", "0.5987497", "0.5983125", "0.59755", "0.5924274", "0.5864495", "0.5842823", "0.58258754", "0.5825794", "0.5822372", "0.5814732", "0.5804409", "0.57830507", "0.574652", "0.57464296", "0.5713492", "0.5711372", ...
0.5620184
27
When a connection is made, autoauthorizes new peers to write to local database
onConnection(peer) { const self = this; if (!peer.remoteUserData) { debug(`Error: Missing remote peer user data`); return; } let remoteUserData; try { remoteUserData = JSON.parse(peer.remoteUserData); } catch (e) { debug(`Error: Unable to parse remote user data, ${e.message}`); return; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connect(peer, reconnecting) {\n if (reconnecting === undefined) {\n reconnecting = false;\n }\n var socket = new net.Socket();\n var self = this;\n socket.connect(peer.port, peer.host, function() {\n // console.log('Connected to: ' + peer.host + ':' + peer.p...
[ "0.5897185", "0.5879798", "0.5759963", "0.5752473", "0.57231104", "0.5627992", "0.5614241", "0.5581327", "0.5555402", "0.5549579", "0.55265284", "0.55065656", "0.55002075", "0.54649746", "0.54619384", "0.5450875", "0.54504305", "0.54375035", "0.5422816", "0.54219234", "0.5405...
0.6495351
0
Parses all input values and removes results from the state.
handleInputChange() { this.setState({ inputs: this._getInputs(), results: null, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear() {\n state = {\n operandOne: \"0\",\n operandTwo: undefined,\n operation: undefined,\n result: undefined\n };\n }", "resetUserInput(){\n /*First we have to reset the saved inputs*/\n ResetUserInput();\n /*Then we have to tell react to update to the ...
[ "0.61654866", "0.60345244", "0.5790858", "0.57854664", "0.5728948", "0.5711306", "0.5705838", "0.56540734", "0.5645893", "0.5580862", "0.557997", "0.55281687", "0.5513825", "0.5512374", "0.55119836", "0.55057913", "0.54959315", "0.5485859", "0.5477678", "0.54709613", "0.54602...
0.543061
22
Prints the current screen.
handlePrint() { window.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayToScreen() {\n\n\n\t}", "function deviceprint_display ()\n\t{\n\t\tt = \"\";\n\t\tif (self.screen)\n\t\t{\n\t\t\tt += screen.colorDepth +SEP+ screen.width +SEP+ screen.height +SEP+ screen.availHeight;\n\t\t}\n\t\treturn t;\n\t}", "function startPrintingToScreen()\n {\n var col = pickC...
[ "0.71865", "0.7139422", "0.6783412", "0.65769124", "0.6454992", "0.64510024", "0.64195925", "0.64195925", "0.64072853", "0.6402459", "0.6328142", "0.6325333", "0.6325333", "0.63124824", "0.6283526", "0.62213916", "0.61908704", "0.6162748", "0.6137395", "0.6131496", "0.6124002...
0.5639784
66
Recalculates the results based on current inputs.
_recalculate() { const inputs = this._getInputs(); const errors = validateInputs(inputs); if (Object.keys(errors).length) { this.setState({ errors }); return; } const { backlogSize, velocity, startDate, endDate } = inputs; const duration = endDate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "compute() {\n const prev = parseFloat(this.previousOperand);\n const current = parseFloat(this.currentOperand);\n const operations = {\n '+': prev + current,\n '-': prev - current,\n '*': prev * current,\n '/': prev / current\n }\n \n ...
[ "0.6625185", "0.6310282", "0.6276998", "0.6256536", "0.6228916", "0.6217903", "0.6183642", "0.6152298", "0.61443335", "0.6080098", "0.6077788", "0.60774624", "0.60589176", "0.6014202", "0.60124075", "0.6009695", "0.5984306", "0.5980055", "0.5945545", "0.59285164", "0.58867145...
0.70596445
0
The text container in the card div var cardTxt; The offscreen card, used for sizing var osCard; Initialize the app
function init() { // set HTML element variables card = document.getElementById("card"); /*cardTxt = document.getElementById("cardTxt"); osCard = document.getElementById("osCard");*/ // osCard.style.left = (window.innerWidth + 5000) + "px"; document.getElementById("nextCardBtn").disabled = false; document.getEleme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constructCurrentCard(cardData)\n{\n\tconst cardId = cardData.title.split(\" \").join(\"\");\n\tvar card = \"<div class='card slide-card' id='\"+cardId+\"' onclick='centerScrollToCard(\\\"\"+cardId+\"\\\")'>\";\n\t\n\tplt = colourTheProjectCard(cardData.platform);\n\tcard += \"<div class='card-header \"+pl...
[ "0.63620967", "0.628936", "0.62795436", "0.6278714", "0.613388", "0.61199415", "0.61046386", "0.6091823", "0.60354614", "0.60336393", "0.601283", "0.5969185", "0.59478647", "0.59478647", "0.5915647", "0.5912882", "0.59069663", "0.5905", "0.5903607", "0.5896282", "0.5891398", ...
0.61176085
6
Display the next card in the list.
function prevCard() { if (current > 0) { current -= 2; nextCard(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextCard() {\n\t// when the 'next' button is clicked the next card in the stack displays\n\tcurrentCard += 1;\n\tif (currentCard >= energetics.length) {\n\t\tcurrentCard = 0;\n\t}\n\tsetCardText(currentCard);\n\tincrementCount();\n}", "function selectNextCard() {\n\tcurrentCard = cardList[1];\n\tdisplay...
[ "0.8266303", "0.8095937", "0.7700126", "0.75604004", "0.7475823", "0.7206473", "0.71095186", "0.69663084", "0.68476367", "0.67549056", "0.6715971", "0.6693903", "0.667062", "0.6668485", "0.6633246", "0.66167104", "0.65829426", "0.6560366", "0.65589815", "0.65539145", "0.65507...
0.0
-1
Remove the current card and skip to the next card in the list.
function dropCardAndContinue() { list.splice(current, 1); var userListPane = document.getElementById("userListPane"); userListPane.removeChild(userListPane.getElementsByClassName("listItem")[current]); saveUserList(); current--; nextCard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeCard()\n\t{\n\t\tif (this.numCards >= 1)\n\t\t{\n\t\t\tthis.numCards--;\n\t\t\tconst card = this.cards[this.numCards];\n\t\t\tthis.cards[this.numCards] = null;\n\t\t\treturn card;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcerr(\"no card to remove\");\n\t\t}\n\t}", "nextCardinDeck(){\n const mainDeck = Store.ge...
[ "0.725364", "0.72479635", "0.69996977", "0.6897465", "0.6878553", "0.6803503", "0.673618", "0.66765535", "0.6637636", "0.66350204", "0.6631559", "0.6628398", "0.6590122", "0.6570792", "0.6565996", "0.6561952", "0.655989", "0.65512514", "0.6531166", "0.6516392", "0.64874434", ...
0.73530823
0
Funciones Trae eventos en un rango de fechas
function traerEventos(Fecha_Inicio,Fecha_Fin) { $.ajax ({ url: base_url+"bi/muestraAgendaEnRango/", data: { Fecha_Inicio: Fecha_Inicio, Fecha_Fin: Fecha_Fin, }, dataType: "json", type: "post", success: function(data) { var etiquetas = []; var scores = []; fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constroiEventos(){}", "function resultado(event) {\n if (event == \"gano\") {\n agregarEventoAlBody(event);\n regresarANuevo(event);\n document.querySelector(\"h1\").innerHTML = \"Ganaste!🎉👍\";\n\n } else if (event == \"pierde\") {\n agregarEventoAlBody(event);\n ...
[ "0.70805776", "0.61797655", "0.608596", "0.6075683", "0.5942187", "0.59045774", "0.59003985", "0.5884804", "0.5858693", "0.58402836", "0.5813615", "0.5799985", "0.5793216", "0.5778676", "0.57107806", "0.56931365", "0.56859964", "0.5683151", "0.5679288", "0.5675031", "0.566976...
0.537035
54
Trae visitas en un rango de fechas
function traerVisitas(Fecha_Inicio,Fecha_Fin) { $("#tblvisitas").DataTable({ responsive: true, language: { url: base_url+"public/libs/DataTables/json/spanish.json", }, ajax:{ url: base_url+"bi/muestraVisitasFechas/", data:{ Fecha_Inicio: Fecha_Inicio, Fecha_Fin: Fecha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TrafferTrafficAfterHoming(nodei, nodej, home){\n //console.log(\"Home của \" + nodei.label + \" và \" + nodej.label + \" là: \" + home.label)\n let t = 0;\n nodei.processingTraffic.forEach((tra) => {\n if(tra.label == nodej.label){\n t += tra.traffic\n }\n ...
[ "0.6240319", "0.6023051", "0.5927732", "0.57610464", "0.5578592", "0.5524995", "0.55087304", "0.549448", "0.5462863", "0.5442439", "0.54228765", "0.539886", "0.53586686", "0.534873", "0.5344876", "0.5344122", "0.53331304", "0.53293115", "0.53286016", "0.53165174", "0.5311517"...
0.0
-1
spawn cenas at random locations
function cenas(){ image(cena2, random(-1000,1000), random(-1000,1000)); image(cena3, random(-1000,1000), random(-1000,1000)); image(cena4, random(-1000,1000), random(-1000,1000)); image(cena5, random(-1000,1000), random(-1000,1000)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "spawn() {\n this.x = getRandomInt(0, 25) * this.grid;\n this.y = getRandomInt(0, 25) * this.grid;\n }", "setRandomSpawnPoint() {\n // leer\n }", "spawns() {\n if (random(1) < 0.01) {\n // accelerates in y axis\n this.accelerations.push(new createVector(0, random(...
[ "0.7835076", "0.74853784", "0.7009019", "0.6950743", "0.6883613", "0.68646306", "0.6804903", "0.67758065", "0.6720339", "0.67108345", "0.668172", "0.66409934", "0.6618682", "0.66136575", "0.66068333", "0.65930957", "0.6547201", "0.65427727", "0.65291625", "0.65261644", "0.651...
0.6196029
58
lots of duplication between .increment and .decrement, DRY it out!
increment(event) { let minutesBooked = 0; let minutesBookedElement = null; this.minutesBookedTargets.forEach((element) => { // storing data on the parent element so that actions and targets could get access to it if (element.parentNode.dataset.gameId == event.currentTarget.parentNode.dataset.ga...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "decrement(){\n this.increment(null, true);\n }", "get increment(){ return this._increments.peek(); }", "_keyIncrementDecrement(action, preValue) {\n const that = this,\n actionCoefficient = action === 'add' ? 1 : -1,\n calculatePreValue = preValue === undefined;\n\n ...
[ "0.75322783", "0.6668409", "0.66580504", "0.66136926", "0.6611188", "0.66103846", "0.66039914", "0.64511293", "0.64491814", "0.6420383", "0.631949", "0.6167005", "0.6162694", "0.61609733", "0.61513644", "0.6147879", "0.6119372", "0.61046684", "0.6099887", "0.6099887", "0.6099...
0.0
-1
this function does too much, refactor animation into its own function.
calculateFinalPrice() { let totalMinutesBooked = 0; let finalPrice = 0; this.minutesBookedTargets.forEach((element) => { totalMinutesBooked += parseInt(element.textContent); finalPrice += (parseInt(element.textContent) * parseInt(element.dataset.pricePerMinute)); }); if (parseInt(final...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "animate(){\n if (this.timeFromLast > this.animationTime){\n this.currentFrameNum++;\n this.currentFrameX += this.frameWidth;\n this.timeFromLast = 0;\n this.timeUntilLast = millis();\n }\n \n if (this.currentFrameNum > this.maxFrame){\n this.currentFrameNum = 3;\n this.curren...
[ "0.7311286", "0.7292337", "0.7217716", "0.7176077", "0.71195513", "0.71181077", "0.70896536", "0.6952254", "0.68847185", "0.6867564", "0.68249327", "0.67832226", "0.6771535", "0.67620623", "0.6755002", "0.67417467", "0.6735733", "0.67309266", "0.67292374", "0.67118806", "0.67...
0.0
-1
change avatars once per second if disco mode is engaged
function sleep(ms){ var dt = new Date(); dt.setTime(dt.getTime() + ms); while (new Date().getTime() < dt.getTime()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateAvatar (avatarUrl) {\n $(\"#dominantSpeakerAvatar\").attr('src', avatarUrl);\n }", "async changeAvatar() {\n\n let response = await fetchApi('user/profile/change_avatar', 'PUT', true, {\n avatar_id: this.state.selectedImage.id,\n user_id: this.state.user.id\n }...
[ "0.6661927", "0.63360304", "0.6158883", "0.61577934", "0.5998678", "0.5961405", "0.58244705", "0.5817674", "0.58160347", "0.57415533", "0.5737721", "0.5723432", "0.5689886", "0.5658639", "0.56435955", "0.5642723", "0.56418157", "0.56383026", "0.56313825", "0.56231356", "0.561...
0.0
-1
const BASE_URL = ' const USER_URL = '/user'
function getAll (query) { return service.get('/user/all', { params: query }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userProfileUrl() { return \"{{conf.reqUrl}}/api/userprofile/\"; }", "static get restBaseUrl() {\n return `${BASE_URL}`;\n }", "static baseUrl() {\n return '/'\n }", "baseUrl() {\n // console.log(\"baseUrl: \" + process.env.REACT_APP_URL);\n\n return (process.env.REACT_APP_URL) ? ...
[ "0.66112953", "0.6456542", "0.6446984", "0.6395315", "0.6315453", "0.628589", "0.6211738", "0.61736953", "0.60956943", "0.6069108", "0.6002185", "0.59909177", "0.598459", "0.5968475", "0.59644514", "0.5924628", "0.59113884", "0.58801883", "0.58706295", "0.58648527", "0.584841...
0.0
-1
remove :hover effects on mobile
function hoverTouchUnstick() { // check if the device supports touch events if('ontouchstart' in document.documentElement) { // loop through each stylesheet for(var sheetI = document.styleSheets.length - 1; sheetI >= 0; sheetI--) { var sheet = document.styleSheets[sheetI]; // verify if css...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hover_mobile() {\n \t\"use strict\";\n if (jQuery(\"#mobile_tap_hover\").length > 0) {\n $('a.taphover').on(\"touchstart\", function(e) {\n var link = $(this); //preselect the link\n if (link.hasClass('hover')) {\n return true;\n } else {\n ...
[ "0.68944544", "0.66724867", "0.6430406", "0.6344179", "0.6285693", "0.6269458", "0.62359947", "0.6225614", "0.6173128", "0.61659527", "0.6060603", "0.6054847", "0.6053324", "0.60020995", "0.5961557", "0.5951741", "0.58937687", "0.58834785", "0.58801085", "0.5831925", "0.58078...
0.7101051
0
selects the task elements to show according to the header and pass them to createTask
function displayTasks(arr, container, cbCreateTask, projectId = '') { cleanContainer(container); const projectName = document.querySelector('#header-element').textContent; if (projectName === 'Home') { // this displays all tasks for (let i = 0; i < arr.length; i++) { const taskList = arr[i].tasks; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showTasks(filterName) {\n const taskList = document.getElementById(\"tasks\")\n const filterTitle = document.getElementById(\"task-filter-head\")\n this.clearTasks()\n let tasks\n switch(filterName){\n case \"filter-all\":\n tasks = this.taskManager.all;...
[ "0.7022266", "0.6738953", "0.6654521", "0.66182745", "0.6559225", "0.6557034", "0.65305984", "0.64941305", "0.6412378", "0.6410798", "0.6391834", "0.634605", "0.63328946", "0.6312092", "0.6309828", "0.63043624", "0.6293369", "0.62930536", "0.6289301", "0.6271599", "0.62555426...
0.6497671
7
creates the task element
function createTask(name, date, priority, container, id, taskIsComplete, details) { const taskId = id; const task = createNewElement(container, 'li', 'user-tasks', ''); const taskDetails = createNewElement(container, 'div', 'task-details', '', details); let taskDetailsVisible = false; const taskLeftSide = cre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTask(v,t){\r\n \r\n }", "function createTaskElement(task) {\n const taskElement = document.createElement('li');\n taskElement.className = 'task';\n\n const titleElement = document.createElement('span');\n titleElement.innerText = task.title;\n\n \n\n taskElement.appendChild(titleEl...
[ "0.79402816", "0.7671166", "0.76522523", "0.755951", "0.75154483", "0.7360442", "0.72652984", "0.72254604", "0.72102845", "0.72065926", "0.7160172", "0.7042455", "0.69715285", "0.6926102", "0.6909891", "0.6842357", "0.67944056", "0.67910916", "0.678846", "0.6767791", "0.67484...
0.7269999
6
creates the project element
function createProject(id, name, container, callback) { const project = createNewElement(container, 'div', 'nav-project', '', name); const projectDelete = createNewElement( project, 'span', 'material-icons', '', 'delete', ); projectDelete.setAttribute('id', 'delete-project-button'); projec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createProjectElement(title) {\n const projectElement = document.createElement('li');\n const titleBtn = document.createElement('button');\n const deleteBtn = document.createElement('button');\n const heading = document.createElement('h3');\n const deleteIcon = document.createElement('i');\n\n headin...
[ "0.71663946", "0.6786605", "0.67188114", "0.6714631", "0.6621706", "0.6532196", "0.6487071", "0.6359081", "0.63551533", "0.63246226", "0.63175136", "0.6198166", "0.6170615", "0.6169542", "0.614349", "0.60681206", "0.60670686", "0.60489523", "0.6015135", "0.6003681", "0.600302...
0.5717832
44
displays the projects from the project list array and attach an event listener to each of them
function displayProjects(arr, container) { cleanContainer(container); for (let i = 1; i < arr.length; i++) { createProject(arr[i].id, arr[i].title, container, displayProjects); } const projects = document.querySelectorAll('.nav-project'); const taskContainer = document.querySelector('#task-container'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderProjects() {\n const projectNames = state.projects.map((i) => i.name);\n\n clearTarget(projectsTarget);\n\n projectNames.forEach((element, index) => {\n const newListItem = document.createElement(\"li\");\n newListItem.className = \"list-item\";\n newListItem.textContent = element;\n ...
[ "0.75240505", "0.7455303", "0.7454844", "0.73937976", "0.7325674", "0.7175236", "0.71251374", "0.7023254", "0.6988489", "0.6984137", "0.69801134", "0.6935613", "0.68915796", "0.6883964", "0.6881141", "0.67826736", "0.6769165", "0.6753928", "0.66776425", "0.6633917", "0.662893...
0.77872854
0
Displays projects in navbar
function createNavbarProjectElements(container) { const projectHeadline = createNewElement( container, 'div', '', 'project-headline', 'Projects', ); createProjectForm(container); const projectContainer = createNewElement( container, 'div', '', 'project-container', ); retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _viewProjectList() {\n const userProjects = todo.returnAll().slice(1);\n _renderPanel(projectPanel, renderList, userProjects);\n }", "function renderProjects() {\n projects.forEach((project) => {\n const projectElement = document.createElement('li');\n projectElement.dataset.proj...
[ "0.7332625", "0.6792514", "0.6714808", "0.6625134", "0.6571275", "0.64502", "0.6443637", "0.64243686", "0.64064276", "0.63585335", "0.62581193", "0.6245971", "0.62146753", "0.6212202", "0.6178485", "0.61548704", "0.6149537", "0.6115788", "0.6093789", "0.6069592", "0.6062301",...
0.6254437
11
Find the 4 largest elements from an array
function findKLargest(collection, k) { if (!collection || !Array.isArray(collection)) { throw new Error('Invalid / missing collection'); } // create a MaxHeap using the collection const mh = new MaxHeap(collection); const result = []; for (let i = 0; i < k; i += 1) { result.push(mh.remove()); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function largestOfFour(arr) {\r\n return arr.map((group) => group.reduce((prev, current) => current > prev ? current : prev));\r\n}", "function largestOfFour(arr) {\r\n return arr.map(function(group){\r\n return group.reduce(function(prev, current) {\r\n return (current > prev) ? current ...
[ "0.85543585", "0.8447037", "0.8274306", "0.8264015", "0.8262208", "0.82341737", "0.8108693", "0.8095389", "0.8083563", "0.806059", "0.8056279", "0.8000136", "0.79909104", "0.79771805", "0.797292", "0.7962422", "0.7946291", "0.79368174", "0.79332775", "0.79141814", "0.7884109"...
0.0
-1
You need to call this method to tell if you are signed in or not
componentDidMount() { console.log('on mount'); Auth.currentAuthenticatedUser().then(user => { console.log(user); this.setState({authState: 'signedIn'}); }).catch(e => { console.log(e); this.setState({authState: 'signIn'}); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isUserSignedIn() {\n return !!getAuth().currentUser;\n}", "function userSignedIn() {\n return !!firebase.auth().currentUser;\n }", "function isUserSignedIn() {\n return isUserSignedInFirebase();\n}", "function isUserSignedIn() {\nreturn !!firebase.auth().currentUser;\n}", "function isUse...
[ "0.8127327", "0.79501957", "0.7865226", "0.7858822", "0.7858822", "0.7858822", "0.78586316", "0.785247", "0.784992", "0.7799674", "0.7797301", "0.7797301", "0.7797301", "0.7797301", "0.7797301", "0.7797301", "0.7797301", "0.7797301", "0.7797301", "0.7797301", "0.7797301", "...
0.0
-1
listen on events so when you are redirected back from Hosted UI, you can know if you are signed in or not
onHubCapsule(capsule) { console.log(capsule); const { channel, payload, source } = capsule; if (channel === 'auth') { switch (payload.event) { case 'signIn': console.log('signed in'); this.setState({authState: 'signedIn'}); break; case 'signIn_failure': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function authStateObserver(user) {\n if (user) { // User is signed in\n console.log(\"User signed in\");\n } else { // User is signed out\n window.open('../index.html', \"_self\");\n }\n }", "handleSignIn() {\n // Sign in the user -- this will trigger the onAuthStateChanged() method\n\...
[ "0.73647475", "0.7186613", "0.69970727", "0.6981277", "0.691396", "0.68517554", "0.6820775", "0.6820271", "0.6757521", "0.6689905", "0.6678663", "0.66719705", "0.6659967", "0.6642617", "0.6634276", "0.66251945", "0.66249293", "0.66195565", "0.66165334", "0.66135573", "0.66057...
0.0
-1
Takes a large response, and uses separate parse functions and ultimately returns a nested object, with each value in the format expected by the corresponding component.
parse(response) { // separate the response into objects which will be separately parsed var _rawFeatures = _.pick(response, ['rows', 'data', 'columns']); var _rawGo = _.pick(response, ['go_slim_terms', 'go_slim_relationships']); var _rawPhenotypes = _.pick(response, [ 'phenotype_slim_terms', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static parseResponse(response) {\n\n const {data} = response;\n\n const createdAt = (data.gh_created_at) ? new Date(data.gh_created_at * 1000) : null;\n const updatedAt = (data.gh_last_updated_at) ? new Date(data.gh_last_updated_at * 1000) : null;\n const pushedAt = (data.gh_last_pushed...
[ "0.65967387", "0.61966336", "0.6167964", "0.61565375", "0.6094785", "0.6029115", "0.5820569", "0.57865596", "0.57764304", "0.5706784", "0.5641389", "0.56337166", "0.5628258", "0.561493", "0.5612862", "0.5610237", "0.5599815", "0.5595429", "0.5570482", "0.5548707", "0.5543845"...
0.71755785
0
Helper Parse Methods helper function which takes a list of features and nests the characterization status returns features array filtered and nested in "nestedValues" of ORF
_nestOrfCharacterizationStatuses(features) { // boolean helper function var isORFChara = (f) => { return QUALIFICATION_STATUSES.indexOf(f.name) >= 0; }; // get the statuses, separate them from the rest of features var characFeatures = _.sortBy(_.filter(features, isORFChara), (f) => { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function n$1(r){return r&&g.fromJSON(r).features.map((r=>r))}", "function explodeFlattenedFeature (features) {\n let geometry = null\n if (features.length === 1) {\n geometry = features[0].geometry\n } else if (features.length > 1) {\n const featureTypes = features.map(feature => feature.geometry.type)\...
[ "0.5275701", "0.5208108", "0.49504793", "0.48775554", "0.48588026", "0.48263907", "0.48247218", "0.47987998", "0.4772867", "0.47674972", "0.47330657", "0.47153336", "0.46496603", "0.46182847", "0.46101567", "0.4607012", "0.4599566", "0.4597434", "0.4584429", "0.45830485", "0....
0.7463962
0
put data in table format
_formatDataForTable(chromosomeData) { var tableHeaders = _.map(chromosomeData, (c) => { return { value: c.display_name.split(' ')[1], href: c.link, }; }); tableHeaders.unshift('Feature Type'); tableHeaders = [['', 'Chromosome Number'], tableHeaders]; var tableRows = _.ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function table(data){\n tbody.html(\"\");\n\n\t//append the rows(tr) and cells(td) for returned values\n data.forEach((dataRow) => {\n let row = tbody.append(\"tr\");\n \n Object.values(dataRow).forEach((val) => {\n let cell = row.append(\"td\");\n cell.text(va...
[ "0.7479992", "0.74526495", "0.73550403", "0.7310958", "0.7286865", "0.72674435", "0.7263905", "0.72361344", "0.7226763", "0.72196645", "0.7200646", "0.7189666", "0.71633655", "0.7149123", "0.71387714", "0.71381843", "0.71354526", "0.71241486", "0.71241486", "0.7078743", "0.70...
0.0
-1
format GO data into nested format for d3 partition
_parseGo(response) { var data = _.clone(response); var allSlimTerms = _.uniq(data.go_slim_terms, (t) => { return t.id; }); // helper function to get terms from their ID var termById = function (_id) { return _.findWhere(allSlimTerms, { id: _id }); }; // start with array of top ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatData(data) {\n\n\n let clusterNames = d3.keys(data[0]).filter(function (key) { return (key !== 'comparison' && key !== 'file_1' && key !== 'file_2'); });\n let binNames = [];\n\n let blockData = [];\n\n\n for (let i = 0; i < data.length; i++) {\n let y = 0;\n binNames.push(...
[ "0.69884104", "0.6965663", "0.65322256", "0.6281971", "0.61005753", "0.60371995", "0.59905267", "0.5937659", "0.5920783", "0.5914716", "0.5902", "0.58928543", "0.58798146", "0.5819025", "0.5819025", "0.57946724", "0.57597125", "0.57577825", "0.57337993", "0.57098895", "0.5689...
0.0
-1
return just array of phenotype terms (no relationships)
_parsePhenotypes(response) { var arr = _.filter(response.phenotype_slim_terms, (p) => { return !p.is_root; }); arr = _.sortBy(arr, (p) => { return -p.descendant_annotation_gene_count; }); return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPredictiveSearchTerms() {\n\n searchArray = [];\n l = Search.terms.length > 4 ? 4 : Search.terms.length;\n\n for (i = 0; i < l; i++) {\n if (Search.terms[i].term) { //watch out for undefined!\n searchArray.push(Search.terms[i].term);\n ...
[ "0.64069176", "0.6065795", "0.59631", "0.5912037", "0.5912037", "0.58262485", "0.5815913", "0.57659703", "0.5725688", "0.56821966", "0.555923", "0.55372274", "0.553259", "0.5503652", "0.54805875", "0.54771286", "0.5465864", "0.5464254", "0.54367834", "0.5384124", "0.53663987"...
0.61341375
1
return an array containing the i angle of rotation correspondent to the i element of the Collatz path for the given number n. n = 2; result = [ 0.20(0.00020) ] n = 3; result = [ 0.19(0.00025 0), 0.19(0.00025 1), 0.20(0.0002 2), 0.20(0.0002 3), 0.20(0.0002 4) ]
function doCollatz(n){ let aux = n; let angle; let result = []; let a1 = PI/13; let a2 = -PI/20; result.push( n%2 == 0 ? a1 : a2 ); while( aux != 1 ){ if(aux %2 == 0){ aux /= 2; angle = a1; } else{ //canonic is 3n+1 but with /2 is more aesthetic aux =( aux * 3 +1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function angle(n) {\n\treturn (n - 2) * 180\n}", "function collatz (n) {\n if (n === 1) {\n return 1;\n } else if (n%2 === 0) {\n return collatz(n/2);\n } else {\n return collatz(3*n + 1);\n }\n}", "function collatz(n) {\r\n // even\r\n if (n % 2 == 0) {\r\n return n / 2;\r\n // od...
[ "0.6164941", "0.6159359", "0.6113508", "0.6037024", "0.5976464", "0.59566975", "0.5922692", "0.56898534", "0.5673901", "0.55703354", "0.55400085", "0.54713434", "0.5444726", "0.54344505", "0.54127413", "0.5404455", "0.5383266", "0.5372852", "0.536358", "0.53622216", "0.535790...
0.78172994
0
functions provide new type of control flow
function unless(test, then) { if(!test) then(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "step_func(func) { func(); }", "step()\n {\n if (this.halted)\n {\n return false;\n }\n\n let instruction = this._read(this.pointer);\n let startingPoint = this.pointer;\n\n let opCode = this._opCode(instruction);\n if (opCode == 99) // halt \n ...
[ "0.5621337", "0.55826056", "0.54572225", "0.5450621", "0.53964627", "0.53948194", "0.5380926", "0.5372248", "0.5359649", "0.53548515", "0.5352095", "0.5298561", "0.5235147", "0.51955867", "0.5194733", "0.5170529", "0.5158308", "0.50975627", "0.50895303", "0.5080651", "0.50627...
0.0
-1
functions create new functions
function greaterThan(n) { return m => m > n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function miFuncion (){}", "function myNewFunction(a, b) {\n\t\treturn a + b;\n\t}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function newFunction(){ //function declaration\n console.log(\"hello world\");\n }", "function newFunction(param1, param2) { //param1 ...
[ "0.6728586", "0.66710263", "0.6657004", "0.6657004", "0.6657004", "0.64766806", "0.6417819", "0.6393159", "0.63157547", "0.6303201", "0.62669486", "0.62241405", "0.622191", "0.6200365", "0.6168958", "0.61135316", "0.6105009", "0.6102174", "0.6088611", "0.6071772", "0.6069908"...
0.0
-1
Functions change other functions
function noisy(f) { return (...args /*use rest operator: access arguments from the enclosing function */ ) => { console.log("calling with", args); let result = f(...args); console.log("called with", args, ", returned", result); return result; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function temperature_change(){\n a_FAO_i='temperature_change';\n initializing_change();\n change();\n}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function nonewFun() {}", "function miFuncion (){}", "function normal() {}", "function manure_left_on_pasture...
[ "0.61365014", "0.61153513", "0.61153513", "0.61153513", "0.6098796", "0.60977113", "0.6078319", "0.6073662", "0.6045825", "0.60420763", "0.6011949", "0.59691304", "0.58978146", "0.5896806", "0.586277", "0.5849135", "0.5848639", "0.5841472", "0.5831566", "0.5820726", "0.581274...
0.0
-1
timer call for chat
function chat_timercall() { var cct = $("chatntf").getAttribute('data-ccount'); if(cct == 0) chat_switchicon(1); else chat_switchicon(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendmsgs() {\n timer();\n // get message on click from the input\n var message = $(\".chatsbox.active .msg\").val();\n console.log(message);\n\n // copy the message template\n var msgCopy = $(\"#template .msgsent\").clone();\n msgCopy.find(\".txt\").text(message);\n msgCopy.find(\"...
[ "0.68630904", "0.68610275", "0.68569994", "0.671809", "0.6658988", "0.6653079", "0.66482", "0.66119325", "0.6570597", "0.65591", "0.65461355", "0.6533629", "0.6508042", "0.64960515", "0.6466724", "0.6460412", "0.6456826", "0.6431111", "0.64209217", "0.6384107", "0.6384107", ...
0.7032836
0
1 show 2 hide
function chat_switchicon(mode) { if(mode == 1) { $("sideicon_chat").style.display = "inline"; $("chatntf").style.top = "34px"; }else{ $("sideicon_chat").style.display = "none"; $("chatntf").style.top = "0px"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function swap_show_hide()\n{\n if (showhide_status) \n {\n showhide_status = false;\n } \n else \n {\n showhide_status = true;\n }\n this.refresh_show_hide();\n}", "function show2() {\n q1.className = \"hide\";\n q2.className = \"show\";\n }", "function viewShowHide(...
[ "0.7386605", "0.7385269", "0.71529615", "0.7124175", "0.7110393", "0.7093273", "0.7091131", "0.7062627", "0.7041963", "0.7036715", "0.7017203", "0.7009777", "0.7009678", "0.70011204", "0.6998793", "0.6988107", "0.6972504", "0.6948737", "0.69346213", "0.6925609", "0.69102234",...
0.0
-1
min and max included
function randomIntFromInterval(min, max) { return Math.floor(Math.random() * (max - min + 1) + min); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculate_minmax(data) {\n\n bound = [];\n bound.max = Math.max.apply(Math, data);\n bound.min = Math.min.apply(Math, data);\n return bound;\n\n}", "function range(){\nmin =Math.floor( Math.min.apply(null, resultHotel.map((item)=> {\n return item.price;\n}))),\nmax = Math.round( Math.max.apply(null...
[ "0.7569572", "0.7446354", "0.7366859", "0.7320678", "0.7234075", "0.716857", "0.7165681", "0.71598876", "0.7127205", "0.710352", "0.7088796", "0.7071206", "0.7070619", "0.7066595", "0.7065789", "0.70455927", "0.7034429", "0.701032", "0.7000692", "0.6998992", "0.6991885", "0...
0.0
-1
create a function that will be called to reset the game
function gameStart() { score = 0; randomNumber = randomIntFromInterval(19, 120); $(".randomNumber").text(randomNumber); // display randon number //2. each crystal should have a random hidden between 1-12 //create 4 vars for the each crystal var whiteCrystal = randomIntFro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetGame() {\n resetClockAndTime();\n resetMoves(); \n resetRatings();\n startGame();\n}", "function reset() {\n //Reset the game\n channelResetGame();\n }", "function resetGame() {\n resetTimer();\n resetMoves();\n resetStars();\n shuffleDeck();\n resetCards();\n}",...
[ "0.8333814", "0.8314418", "0.8302247", "0.82742524", "0.82612056", "0.82449234", "0.8236259", "0.82042336", "0.8195756", "0.81012994", "0.80819714", "0.8072035", "0.8061892", "0.8040179", "0.80214894", "0.80000186", "0.79858917", "0.79838157", "0.79705226", "0.79479283", "0.7...
0.0
-1
const arr = sortByVersionNumber(['1.0.9','1.0.2','1.0.7'],null,true); console.log(arr);
function checkoutSvnDir() { const svnAccountInfo = { username: "liuzhengwu", password: "4AbPFUJB" } const url = "https://repo.ds.gome.com.cn:8443/svn/atg_poc/30_Coding/NewDevMode/tags/gome-gfe/channel-web/public"; const dir = "D:\\test"; svnUltimate.commands.checkout(url, dir, svnAc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortVersionArray(arr) {\n return arr.map( a => a.replace(/\\d+/g, n => +n+100000 ) ).sort()\n .map( a => a.replace(/\\d+/g, n => +n-100000 ) );\n}", "sort(arr) {\n function IsNumber(arr) {\n for (let i = 0; i < arr.length; i++) {\n\n if (typeof arr[i] === 'number')...
[ "0.73797065", "0.6708783", "0.6680255", "0.63762087", "0.62850636", "0.6190284", "0.61826557", "0.61682975", "0.61252683", "0.60960186", "0.60893595", "0.6074732", "0.6060324", "0.60290504", "0.60103846", "0.5986294", "0.5972339", "0.5961596", "0.5961025", "0.594491", "0.5939...
0.0
-1
Helper method to join path fragments
function joinPath(...fragments) { return fragments.join('/').replace(/\/{1,}/g, '/') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function join() {\n var result = path.join.apply(this, arguments);\n return path.normalize(result);\n}", "function join(/* path segments */) {\n var parts = [];\n for (var i = 0, l = arguments.length; i < l; i++) {\n parts = parts.concat(arguments[i].split(\"/\"));\n }\n var newParts = [];\n ...
[ "0.73970664", "0.734348", "0.7125489", "0.70986223", "0.7085082", "0.7064154", "0.7064154", "0.70513296", "0.68285626", "0.6808422", "0.67842966", "0.6759681", "0.6758721", "0.6754168", "0.67310196", "0.6707673", "0.66734785", "0.66616297", "0.6656449", "0.66476053", "0.66476...
0.82905823
0
import images from './assets'
function Cdashboard({ navigation }) { const cusContext = useContext(CustomerContext); const prodContext = useContext(ProductContext); const [isLoading, setLoad] = useState(true); const [arrayP, setArrayP] = useState([]); useEffect(() => { // console.log(prodContext.data.prod_details); arrayP.sp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function images() {\n return gulp.src( 'src/assets/img/**/*' )\n .pipe( gulp.dest( './build/assets/img' ) );\n}", "static importAllImages(r = require.context(\"./images\", false, /\\.(png|jpe?g|svg)$/)) {\n let images = {};\n r.keys().map((item) => { images[item.replace('./', '')] = r(item); });\...
[ "0.70647174", "0.6994071", "0.6831676", "0.68024343", "0.6781567", "0.67426306", "0.6717476", "0.6694284", "0.66601145", "0.6621302", "0.65535235", "0.6498763", "0.64963245", "0.6442185", "0.6380984", "0.6379741", "0.6358977", "0.6350223", "0.629371", "0.6292785", "0.6236182"...
0.0
-1
PARAMETERS think of parameters as a newly declared variable that we haven't given a value to yet. the value we pass into our function when we call the function to run (also known as an argument), is the value that gets assigned to the parameter. general naming convention for function parameters: the parameter should be...
function myDog(husky) { console.log(`My dog's name is ${husky}`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parameterFunc(num){\n console.log(num);\n}", "function parameterFunc(num) {\n console.log(num);\n}", "function parameterFunc(num) {\n console.log(num);\n}", "function parameterFunc (num) {\n console.log(num);\n}", "function Parameter() {}", "function test_param(name, age, gender) {\n...
[ "0.7577271", "0.75051266", "0.75051266", "0.7462012", "0.68674105", "0.6845575", "0.6828071", "0.6692495", "0.6622041", "0.6616881", "0.65676236", "0.65268016", "0.6462208", "0.6410187", "0.63927734", "0.6356603", "0.6353296", "0.6350531", "0.62860525", "0.62772804", "0.62664...
0.0
-1
MULTIPLE PARAMETERS AND ARGUEMENTS
function allMyDogs(smallHusky, bigHusky, borderCollie) { console.log(`My dogs are named ${smallHusky}, ${bigHusky}, ${borderCollie}`) { if (smallHusky === undefined || bigHusky === undefined || borderCollie === undefined){ console.log('no arguements passed') } else { console....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UsingParams(pRequired, pDefault, pOptional) {\n if (pDefault === void 0) { pDefault = \"DBS-ID\"; }\n var pRest = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n pRest[_i - 3] = arguments[_i];\n }\n console.log(pRequired);\n console.log(pDefault);\n console.log(pOptiona...
[ "0.6921075", "0.65673673", "0.64885163", "0.643913", "0.63338757", "0.6299389", "0.62974614", "0.6278459", "0.6264082", "0.62103856", "0.6188756", "0.61337036", "0.61229", "0.61187804", "0.6068071", "0.6046893", "0.60224485", "0.6008692", "0.5964104", "0.5955619", "0.59476966...
0.0
-1
the arguemnt we pass into our fuction call are assigned by position, or by order. First arguement gets assigned to first parameter, etc. allMyDogs('Peyton', 'Jonathan', 'Jessica'); / RETURN functions can also manipulate the data sent to them, and return a new value find average weight
function calculator( one, two, three) { //console.log(one, two, three); let totalWeight= one + two + three; //console.log(totalWeight); let average = Math.round(totalWeight / 3) ; //Math.round rounds to the nearest integer (whole number) //console.log(average) return average; //can also use mat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function average() {\n // // parse arguments into an array\n var total = 0\n var args = [].slice.call(arguments);\n forEach(args, function(a) {\n total += a;\n })\n return total / args.length;\n\n\n // // .. do something with each element of args\n // // YOUR CODE HERE\n}...
[ "0.6300244", "0.6062145", "0.6044867", "0.6033577", "0.6033577", "0.60206294", "0.5960126", "0.59342873", "0.591811", "0.5836825", "0.5835542", "0.5769066", "0.5758555", "0.5725229", "0.57207346", "0.5698574", "0.56962955", "0.56930476", "0.56728435", "0.5672254", "0.5659451"...
0.52211
55
get tweets from "trudeau" or "trump"
function getTweets(name){ let i = 0; for (i ; i <= 17 ; i++) { let varName = eval(name+i); let j = 0; for (j = 0; j < varName.length ; j++){ // normalize text to Extended ASCII 255, removing emojis let text = varName[j].text.replace(/[^\x00-\xFF]/g, ""); //format the output to JSON not...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tweets(){\n\tvar client = new Twitter(theKeys.twitterKeys);\n\tvar params = {screen_name: 'rachgriarte',\n\t\t\t\tlimit: 20\n\t\t\t};\n\t//Retrieving tweets\n\tclient.get('statuses/user_timeline', params, function(error, tweets, response) {\n\t if (!error) {\n\t \tfor (var i=0; i<tweets.length; i++){\n\...
[ "0.74462783", "0.74417806", "0.7407101", "0.7313422", "0.7254897", "0.7254772", "0.72482574", "0.7198618", "0.7165822", "0.7160016", "0.71482795", "0.7136267", "0.71244836", "0.7092387", "0.7059973", "0.7032116", "0.6975136", "0.6973243", "0.69250166", "0.6921898", "0.6917434...
0.6849114
32
remembers work it has previously done
function memoized_cut_rod(p, n) { var r = {}; for (var i=0; i<=n; i++) { r[i] = Number.NEGATIVE_INFINITY; } return memoized_cut_rod_aux(p, n, r); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restartUsed(){\n arrUsedBefore.splice(1,questlength);\n }", "doHomework() {\n this.homeworkDone = true;\n }", "addToPreviouslyEncountered() {\n BoardNode.previousBoards[this.hash()] = null;\n }", "Rewind() {}", "function workDone() {\n clearInterval...
[ "0.65108424", "0.63546216", "0.5900094", "0.58595824", "0.5846151", "0.58098435", "0.58055955", "0.57964045", "0.5778071", "0.57731616", "0.576475", "0.5751011", "0.57386136", "0.5679652", "0.56603587", "0.5646597", "0.56461406", "0.563263", "0.5621452", "0.5619574", "0.56145...
0.0
-1
TODO Refactor this service
function LocalDatabaseService ($q){ var request, localDb; var deferred = $q.defer(); return LocalDatabaseService = { openDatabase: openDatabase, clearObjectStore: clearObjectStore, addDataToLocalDatabase: addDataToLocalDatabase, removeDataFromLocalDatabase: removeDataFromLocalDatabase, getDataFro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "obtain(){}", "private public function m246() {}", "function IndexService() {\n }", "getEntity() {}", "constructor(service) {\n this.service = service;\n }", "function questionAndAnswerNotesService() {\n\n}", "getServiceInfos(service) {\n return this.OvhHttp.get(\n `${service.pa...
[ "0.5673894", "0.5389137", "0.53238946", "0.5117828", "0.51011896", "0.50798124", "0.5031944", "0.5031625", "0.5004802", "0.4999089", "0.4981615", "0.49737754", "0.49737754", "0.49737754", "0.49737754", "0.49737754", "0.49737754", "0.49737754", "0.49737754", "0.49737754", "0.4...
0.0
-1
Then, define the action to run once we'll receive the notification from GitHub.
function gitPull(root, options) { return function(req, res, next) { console.log('[flick] Web hook called.'); var cmd = 'git pull' + (options.rebase ? ' --rebase' : ''); shell.cd(root); shell.exec(cmd, function(code, output) { console.log(cmd + ' exited with code ' +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dispatchNotify(event, callback) {\n const repoName = event.repository.full_name;\n const repoURL = event.repository.html_url;\n const githubUser = event.sender.login;\n\n const message = {\n type: 'self-service',\n retrigger: true,\n users: [\n {\n 'github': githubUser\n }\n ...
[ "0.7119659", "0.614585", "0.6102614", "0.60672104", "0.6034769", "0.5844794", "0.5792703", "0.56462675", "0.5616128", "0.5599558", "0.5555498", "0.5550027", "0.5536131", "0.5523133", "0.552268", "0.5514638", "0.55080104", "0.5492062", "0.54812735", "0.54723364", "0.54566544",...
0.0
-1
This Function Logs the activity of the user and adds it to the activity[] state
logActivity() { //Pushes the title and details of the activity to activity[] this.state.activity.push(this.state.title); this.state.activity.push(this.state.details); //Get the date values var date = new Date().getDate(); //Current Date var month = new Date()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "activities(acts) {\n this.activityStream.add(acts)\n const newActivities = this.activityStream.since()\n\n _.each(newActivities, act => {\n const timestamp = act.modified.format(\"YYYY-MM-DD hh:mm\")\n const lineColor = colorUtils.colorForState(act.state)\n this.log.log(lineColor(`${timesta...
[ "0.70138794", "0.6522124", "0.63850796", "0.6383487", "0.63225144", "0.6197502", "0.61898404", "0.6156511", "0.61295897", "0.5991944", "0.5953027", "0.5903477", "0.5887428", "0.58588284", "0.58162177", "0.5772198", "0.5734926", "0.5703688", "0.5676067", "0.5675615", "0.565063...
0.709093
0
SELECT id_producto, nombre, porcentaje_ganancia, precio, cantidad, id_categoria FROM producto;
async function getProductos() { try { let conn = await mariaDb.getConn(); const resp = await conn.query("select id_producto, nombre, porcentaje_ganancia, precio, cantidad, id_categoria from producto;"); conn.release(); var productosJSON = []; resp.forEach(function (prod, ind...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leerDatosProductos(producto){\n const infoProducto = {\n img: producto.querySelector('.imagen').src,\n titulo: producto.querySelector('#title-product').textContent,\n cantidad: producto.querySelector('#cantidad').value,\n precio: producto.querySelector('#precio').textCo...
[ "0.6613934", "0.6362887", "0.63097495", "0.6251947", "0.6234413", "0.61619383", "0.61383164", "0.6137575", "0.61291564", "0.6063857", "0.60615826", "0.6033271", "0.60258824", "0.6012906", "0.60023594", "0.59930754", "0.59746873", "0.5967959", "0.5949026", "0.5948224", "0.5946...
0.6196159
5
INSERT INTO producto (nombre, porcentaje_ganancia, precio, cantidad, id_categoria) VALUES('', 0, 0, 0, 0);
async function agregarProducto(producto) { try { let conn = await mariaDb.getConn(); const resp = await conn.query("insert into producto (nombre, porcentaje_ganancia, precio, cantidad, id_categoria) values ( ?, ?, ?, ?, ?);", [producto.nombre, Number(producto.porcentaje), Number(producto.precio), N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addProducts(products, deptID) {\n // debugging\n // console.log(products);\n // console.log(products.quantity1);\n\n var priceFix = parseFloat(products.price)\n var quantityFix = parseFloat(products.quantity)\n connection.query(\n\n \"INSERT INTO products SET?\", {\n pr...
[ "0.6520118", "0.60868096", "0.6067956", "0.6019596", "0.6019174", "0.600002", "0.59735936", "0.5971321", "0.59096915", "0.58860135", "0.58849484", "0.58294487", "0.5817813", "0.58006966", "0.5794111", "0.57853645", "0.5774132", "0.5768945", "0.5768628", "0.57586014", "0.57449...
0.64347345
1
UUPDATE producto SET nombre='', porcentaje_ganancia=0, precio=0, cantidad=0, id_categoria=0 WHERE id_producto=0;
async function actualizarProducto(producto) { try { let conn = await mariaDb.getConn(); const resp = await conn.query("update producto set nombre= ?, porcentaje_ganancia= ?, precio= ?, cantidad= ?, id_categoria= ? where id_producto = ?;", [producto.nombre, Number(producto.porcentaje), Number(produc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static update_fuente(cadenaDeConexion, idIngreso) {\n var flag = (-1);\n //1 - ingreso, 0-egreso\n ///verificar si es ingreso o egreso para sumar o restar el valor a la caja fuente\n sqlNegocio(\n cadenaDeConexion,\n \"SELECT * from info_ingresos WHERE idIngreso =...
[ "0.6297255", "0.6269257", "0.6220079", "0.60693324", "0.6055341", "0.60275227", "0.5995582", "0.5977397", "0.59534174", "0.592889", "0.59283805", "0.5893338", "0.58606106", "0.5856151", "0.58528745", "0.5825457", "0.58084834", "0.5805886", "0.5772985", "0.57650083", "0.576038...
0.6701067
0
DELETE FROM producto WHERE id_producto=0;
async function eliminarProducto(Id) { try { let conn = await mariaDb.getConn(); const resp = await conn.query("delete from producto where id_producto = ?;", [Number(Id)]); conn.release(); // if (resp === null){ // return "No se actualizo"; // }else if(resp.warnin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteProduct(product) {\n const queryString = `DELETE FROM products\n WHERE products.id = $1`;\n\n const queryParams = [product.productId];\n\n return db\n .query(queryString, queryParams)\n .then(result => result)\n .catch(error => error.message);\n ...
[ "0.689974", "0.68849516", "0.66933644", "0.6632912", "0.6618526", "0.65767086", "0.6558028", "0.6526301", "0.6525791", "0.6511286", "0.65028185", "0.6492259", "0.6485579", "0.6395268", "0.6392118", "0.63878524", "0.6381477", "0.6367408", "0.6361322", "0.6340429", "0.63151306"...
0.64752924
13
global scope adding pokemon if it is an object and is not null
function add(pokemon) { if (typeof pokemon === 'object' && 'name' in pokemon && 'detailsUrl' in pokemon ) { pokemonList.push(pokemon); } else { console.log('The Pokemon is not correct' + '<br>') } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add(pokemon) {\n if (typeof pokemon === 'object' &&\n 'name' in pokemon) {\n pokemonList.push(pokemon);\n } else {\n console.log('pokemon is not correct');\n }\n }", "function add(pokemon) {\n if ( typeof pokemon === 'object' &&\n 'name' in pokemon &&\n ...
[ "0.74980295", "0.7295002", "0.71256626", "0.7089412", "0.70870936", "0.6964477", "0.69603187", "0.68924594", "0.67865866", "0.64038604", "0.64038604", "0.6383211", "0.6324553", "0.6210877", "0.61844116", "0.61646676", "0.6161359", "0.6037014", "0.60023475", "0.59977394", "0.5...
0.7308091
1
Definition of get_altavault routes function starts here
async function get_altavault(req, res, next) { try { const connection1 = await oracledb.getConnection(dbConfig.fcmatdb); // Db connection created let serial_number = req.query.serial_number.trim(); // Splitting query string variable let obj; let options = { outFormat: oracledb.ARRAY // query resul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "route() {\n this.router\n .route('/:id/accounts')\n .get(validateToken, verifyIsClient, this.userController.getAccounts)\n .post(\n validateToken,\n verifyIsClient,\n createAccountValidator,\n validate,\n this.userController.createAccount,\n );\n\n this....
[ "0.603828", "0.5982172", "0.5954415", "0.5898831", "0.57395047", "0.57241845", "0.5721555", "0.5709355", "0.57005376", "0.56850505", "0.5683784", "0.55900496", "0.5494362", "0.54911894", "0.54800564", "0.547198", "0.54692864", "0.54596806", "0.54414934", "0.54093766", "0.5402...
0.50278
67
Definition of get_altavault routes function ends here Definition of get_eseries routes function starts here
async function get_eseries(req, res, next) { try { // const connection1 = await oracledb.getConnection(dbConfig.fcmatdb); // Db connection created // let serial_number = req.query.serial_number.trim(); // Splitting query string variable // let obj; // let options = { // outFormat: oracledb.ARRAY ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n getRoutes();\n}", "getRoutes(agency) {\n // first get the segments so we can build our route paths\n let url = `/segments.json?agencies=${this.agency_id}`;\n return this.requestor.get(url).then((response) => {\n let segments = response.data.data;\n\n ...
[ "0.6216252", "0.6184097", "0.6064237", "0.606099", "0.6042549", "0.6041807", "0.59525317", "0.5941121", "0.5909914", "0.5852695", "0.58325905", "0.57357407", "0.57108426", "0.56736904", "0.5671289", "0.5653373", "0.5650016", "0.5647971", "0.5629444", "0.5615573", "0.5577937",...
0.0
-1
ricerca img da sistemare parte serie tv
ricercaPoster (element) { let poster = 'imgNotFound.jpg'; if (element.poster_path != null) { poster = 'https://image.tmdb.org/t/p/' + 'w342' + element.poster_path; } return poster; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cargarunaImagen(valorI){\n return 'media/ImagenesDeIncidencia/'+valorI\n }", "function cargarImagenArticulo()\n{\n\tif(($photo.length != 0)){\n\t\t$('#preview img').attr('src', $basePath +\"/public/img/inventories/\"+ $photo);\n\t}\n}", "function carregarImagem( img ){\n \n var caminho ...
[ "0.69996303", "0.693175", "0.6684706", "0.6676933", "0.6670075", "0.6660171", "0.655274", "0.65470153", "0.6515985", "0.6511338", "0.6471344", "0.6439931", "0.6439931", "0.64337546", "0.64127076", "0.63790995", "0.6378152", "0.63600606", "0.6349747", "0.63447696", "0.63364947...
0.0
-1
axios fuori da mounted e dentro methods
mounted() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.inicio();\n this.mostraralergias();\n this.eliminaralergias();\n this.mostrarhabitos();\n this.eliminarhabitos();\n this.mostrarpatologicos();\n this.eliminarpatologicos();\n this.mostrarquirurgicos();\n this.eliminarquirurgico();\n thi...
[ "0.55898607", "0.54762316", "0.54715127", "0.5448938", "0.5434793", "0.5422993", "0.5382759", "0.53526455", "0.5338686", "0.5338686", "0.5319926", "0.5291888", "0.52864045", "0.5268009", "0.52612484", "0.5225291", "0.5222899", "0.5219032", "0.5181348", "0.5159006", "0.5158276...
0.50839764
22
Used to send the contact form from the index page
function sendContactForm() { let sCustomerName = contactFormName.value; let sCustomerEmail = customerFormEmail.value; let sCustomerMessage = customerFormMessage.value; //check if input fields has been filled out if (sCustomerName == "" || sCustomerEmail == "" || sCustomerMessage == "") { showMessage("Ple...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function directToContactForm ()\n{\n\t$('html, body').animate({\n\t\tscrollTop : $(\"#contact-me\").offset().top\n\t}, 'slow');\n}", "function sendForm(data) {\n document.querySelector('form').style.display = 'none'\n let box = document.createElement('div')\n box.className = 'eve...
[ "0.68289524", "0.6780844", "0.6770243", "0.6602718", "0.6602218", "0.6597599", "0.65610325", "0.6560453", "0.65393573", "0.6537112", "0.6506569", "0.648698", "0.6477719", "0.64366245", "0.6417384", "0.6407638", "0.63515073", "0.6328972", "0.63149583", "0.62965286", "0.6291526...
0.57636535
69
used to add an addon to the cart
function addAddOnToCart(sAddOnId) { //get the amount of the addon that the user wanted to ass let nAddOnAmount = document.querySelector( ".addon-form__input_" + sAddOnId ).value; //check if it is a number if it isn't let the user know if (isNaN(parseInt(nAddOnAmount))) { showMessage("Please input a n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItemToCart() {}", "function addItemToCart() {}", "function addAddon(){\r\n\t\t\r\n\t\tvar selectedCatID = 0;\r\n\t\t\r\n\t\tif(g_objCats)\r\n\t\t\tselectedCatID = g_objCats.getSelectedCatID();\r\n\t\t\r\n\t\tvar data = {\r\n\t\t\t\ttitle: jQuery(\"#dialog_add_addon_title\").val(),\r\n\t\t\t\tname: ...
[ "0.7354693", "0.7354693", "0.71593237", "0.68186855", "0.67642814", "0.6564874", "0.6439844", "0.63613933", "0.63127416", "0.6220101", "0.61779004", "0.6156193", "0.6149313", "0.61395276", "0.6138675", "0.60661405", "0.60643274", "0.60536313", "0.60419136", "0.6032516", "0.60...
0.7089528
3
used to add a product to the cart
function addProductToCart(sProductId, sButtonId) { let aSubscriptionItems = document.querySelectorAll(".dropdown__list-item"); let bSubscriptionChosen = false; let sSubscriptionId = undefined; //check which subscription the user has chosen for (let i = 0; i < aSubscriptionItems.length; i++) { if ( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addProductToCart(product) {\n let cart = getCart();\n cart.items.push(product);\n\n setCart(cart);\n alert(product.name + ' added to cart, Total is R' + getTotal(cart));\n}", "function addToCart()\n\t{\n\t\t// avoid adding to cart before the item info is fetched\n\t\t// if( product.ASIN === ...
[ "0.838311", "0.8198042", "0.81974715", "0.81946975", "0.81946975", "0.80960476", "0.80941975", "0.8004193", "0.79955727", "0.79464614", "0.7932965", "0.7919421", "0.78953713", "0.7829411", "0.7823941", "0.78180563", "0.7810408", "0.78024083", "0.77012664", "0.7671496", "0.763...
0.0
-1
hides any open dialogbox. Gets called when the user chooses a subscription
function toggleDialogBox() { let aDialogBoxes = document.querySelectorAll(".dialog-box"); for (let i = 0; i < aDialogBoxes.length; i++) { if (!aDialogBoxes[i].classList.contains("dialog-box--hidden")) { aDialogBoxes[i].classList.add("dialog-box--hidden"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeDialog() {\n jQuery('#oexchange-dialog').hide();\n jQuery('#oexchange-remember-dialog').hide();\n refreshShareLinks();\n }", "function closeInformationDialogBox() {\n document.getElementById(\"checkDoc\").style.display = \"none\";\n document.getElementById(\"dialogBox\...
[ "0.69752747", "0.6838167", "0.6697607", "0.6683203", "0.6637904", "0.65426296", "0.6524643", "0.64981115", "0.6459996", "0.64090663", "0.64046884", "0.63832754", "0.6381353", "0.63420105", "0.63332987", "0.6332824", "0.6303228", "0.63030535", "0.63030535", "0.6292807", "0.625...
0.0
-1
opens and closes the subscription dropdown
function toggleDropdown() { if (document.querySelector(".dropdown") !== null) { let aDropdownButtonElements = document.querySelectorAll(".dropdown__button"); /* let aDropdownListElements = document.querySelectorAll( ".dropdown-list-container" ); */ aDropdownButtonElements.forEach((eButton...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_closeDropDown () {\n this._mainDropDownActive = false\n this._sizeDropDownActive = false\n this._containerHeader.querySelector('.dropdown-sub1-content').style.display = 'none'\n this._containerHeader.querySelector('.dropdown-content').style.display = 'none'\n }", "_open() {\n this.$.dropdown.o...
[ "0.61520123", "0.60956544", "0.6067937", "0.60623354", "0.60055935", "0.6002115", "0.5967643", "0.58292884", "0.5812524", "0.5796513", "0.57964444", "0.57707477", "0.5733543", "0.571844", "0.57130873", "0.5712697", "0.57061917", "0.57057303", "0.5668423", "0.5665109", "0.5655...
0.5383447
91
listens for clicks on any subscription
function itemSelector() { let aDropdownItems = ""; if (document.querySelector(".dropdown__list-item") !== null) { aDropdownItems = document.querySelectorAll(".dropdown__list-item"); for (let i = 0; i < aDropdownItems.length; i++) { //remove active class from all items aDropdownItems[i].addEvent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "subscribe() {}", "subscriptions () {\r\n events.on(\"url-change\", (data) => {\r\n if (data.state && data.state.selector) {\r\n const target = document.querySelector(data.state.selector);\r\n\r\n this.toggleActivePages(target);\r\n this.toggleActiveS...
[ "0.64748025", "0.6463716", "0.6374103", "0.6317973", "0.63111925", "0.63039905", "0.6302404", "0.6196113", "0.6195642", "0.6183956", "0.6172561", "0.6146549", "0.6097005", "0.60961646", "0.60577077", "0.605714", "0.6034528", "0.60209894", "0.6019067", "0.60097504", "0.6009242...
0.0
-1
Toggles styling for chosen subscription element
function clickedItem(eDropDownItem) { let aDropdownButtons = document.querySelectorAll(".dropdown__button"); aDropdownButtons.forEach((eButton) => { if (eButton.dataset.buttonid === eDropDownItem.dataset.buttonid) { if ( eButton.dataset.subscriptionid === undefined || eButton.dataset.subsc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggle() {\n toggleSelected(!selected);\n handleThemeChange();\n }", "function ShowSubscriptionElement(subscriptionComponent, cssClassName)\n {\n subscriptionComponent.find(\".btn-subscribe-login\").hide();\n subscriptionComponent.find(\".subscribe-success...
[ "0.6152348", "0.5627057", "0.5612835", "0.5588451", "0.5539887", "0.5449147", "0.5415044", "0.5415044", "0.5376359", "0.5373069", "0.53650534", "0.53419656", "0.53349626", "0.5323986", "0.5320926", "0.5315423", "0.53137845", "0.53094614", "0.53094614", "0.5309296", "0.5309296...
0.0
-1
possible values: NaN, undefined, null, number, string, function, array, object, regex
function typeOf (obj) { // NaN if (obj !== obj) return 'NaN' const type = typeof obj // null, undefined if (obj == null) { if (type === 'object') return 'null' else return 'undefined' } // number, string, function if (type !== 'object') return type // array, object, regex const typeString ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRealValue(obj){\n return obj && obj !== \"null\" && obj!== \"undefined\";\n}", "matchJSONValue(obj) {\n return hasOwn(obj, \"$InfNaN\") && lengthOf(obj) === 1;\n }", "function isGood(val){ \n return val !== false && val !== null && val !== 0 && val !== \"\" && v...
[ "0.6399714", "0.63328344", "0.6269784", "0.6253463", "0.6161994", "0.6101899", "0.6101899", "0.6088249", "0.60385823", "0.6025522", "0.601834", "0.60123855", "0.5995693", "0.5965365", "0.5952839", "0.59528035", "0.59316957", "0.59316957", "0.5921199", "0.58958906", "0.5894937...
0.0
-1
override default map coordinates. the flash control calls this function, if available, after the map object loads
function afterMapLoad_JS(panelId, mapId) { // this changeExtent statement is optional. Be default, map will show // northeast USA. User calls this function if need to show different extent // when the map is loaded. // // parameters: // xmin Bottom-left X-coordinate of an extent envelope. // ymin Bottom-left Y-c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDefaultLocation() {\n mapCenter = [48, -100];\n mapZoom = 4;\n}", "function defaultPosition ()\n{\n let lng = DEFAULT_LNG;\n\tlet lat = DEFAULT_LAT;\n\tlet coordinates = new Array();\n\tlet zoom = DEFAULT_ZOOM_MAP;\n \n coordinates['lng'] = lng;\n coordinates['lat'] = lat;\n \n\tload...
[ "0.7335342", "0.71634907", "0.6820614", "0.6764902", "0.6746747", "0.6740615", "0.6693905", "0.66895586", "0.6674279", "0.66728735", "0.6660668", "0.6651396", "0.66495746", "0.664322", "0.6638602", "0.66370827", "0.66332376", "0.66250247", "0.662385", "0.6617197", "0.66145676...
0.6343478
55