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
Note that attemps to consolidate this with Functionmemoize ended up clunky as that is also serializing arguments. Separating these implementations turned out to be simpler.
function memoizeFunction(fn) { var memo = {}, counter = 0; return function(key) { if (hasOwn(memo, key)) { return memo[key]; } // istanbul ignore if if (counter === INTERNAL_MEMOIZE_LIMIT) { memo = {}; counter = 0; } counter++; return memo[key] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize( fn ) {\n return function () {\n var args = Array.prototype.slice.call(arguments),\n hash = \"\",\n i = args.length;\n currentArg = null;\n while (i--) {\n currentArg = args[i];\n hash += (currentArg === Object(currentArg)) ?\n ...
[ "0.720791", "0.71168107", "0.7018706", "0.6839484", "0.68372804", "0.68078077", "0.6787423", "0.67666715", "0.67349654", "0.66731894", "0.6658195", "0.6649186", "0.6640361", "0.66287696", "0.66170543", "0.6580726", "0.6529843", "0.6515903", "0.6505267", "0.647529", "0.647529"...
0.6203655
37
Polyfilled methods will automatically be added to the chainable prototype. However, Object.getOwnPropertyNames cannot be shimmed for nonenumerable properties, so if it does not exist, then the only way to access native methods previous to ES5 is to provide them as a list of tokens here.
function defineNativeMethodsOnChainable() { var nativeTokens = { 'Function': 'apply,call', 'RegExp': 'compile,exec,test', 'Number': 'toExponential,toFixed,toLocaleString,toPrecision', 'Object': 'hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString', 'Array': 'conc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_proxyMethods() {\n const methods = this._opts.methods || {}\n for(const method in methods) {\n Object.defineProperty(this, method, {\n get() {\n return methods[method]\n }\n })\n }\n }", "getMethods(){\n let pr...
[ "0.6664982", "0.6135343", "0.61096096", "0.60646796", "0.60501057", "0.597178", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", "0.5961773", ...
0.6416135
1
Normal callDateSet method with ability to handle ISOWeek setting as well.
function callDateSetWithWeek(d, method, value, safe) { if (method === 'ISOWeek') { setISOWeekNumber(d, value); } else { callDateSet(d, method, value, safe); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUTCISOWeek(dirtyDate, dirtyISOWeek) {\n\t if (arguments.length < 2) {\n\t throw new TypeError('2 arguments required, but only ' + arguments.length + ' present');\n\t }\n\n\t var date = toDate(dirtyDate);\n\t var isoWeek = toInteger(dirtyISOWeek);\n\t var diff = getUTCISOWeek(date) - isoWeek;\n\...
[ "0.68992835", "0.6870512", "0.6870512", "0.6870512", "0.6870512", "0.6870512", "0.6870512", "0.6860117", "0.6681953", "0.6660434", "0.6638895", "0.6629418", "0.66252005", "0.66252005", "0.66252005", "0.66252005", "0.66252005", "0.66252005", "0.66252005", "0.66252005", "0.6618...
0.7702475
0
Iteration helpers Years > Milliseconds
function iterateOverDateUnits(fn, startIndex, endIndex) { endIndex = endIndex || 0; if (isUndefined(startIndex)) { startIndex = YEAR_INDEX; } for (var index = startIndex; index >= endIndex; index--) { if (fn(DateUnits[index], index) === false) { break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myYear(year){\n return year * 365 * 24 * 60 * 60;\n}", "listYears () {\n const dates = []\n let currentDate = Moment(this.minMoment)\n while (currentDate <= this.maxMoment) {\n dates.push({\n text: currentDate.year(),\n value: currentDate.year()\n })\n ...
[ "0.6532999", "0.64240307", "0.6318289", "0.6229092", "0.6178315", "0.60467386", "0.6009349", "0.5990406", "0.5972754", "0.5927787", "0.5915735", "0.59116834", "0.59051734", "0.58835465", "0.58426166", "0.58052546", "0.5804909", "0.57973474", "0.5781033", "0.5773062", "0.57649...
0.57335764
22
Years > Milliseconds using getLower/Higher methods
function walkUnitDown(unitIndex, fn) { while (unitIndex >= 0) { if (fn(DateUnits[unitIndex], unitIndex) === false) { break; } unitIndex = getLowerUnitIndex(unitIndex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getYears (seconds) {\nreturn (seconds/31536000).toFixed(5) + \" number of years\";\n}", "function yearsSince1949() {\n var dt2=new Date();\n var dt1=new Date(1949,1,1);\n var diff =(dt2.getTime() - dt1.getTime()) / 1000;\n diff /= (60 * 60 * 24);\n return Math.abs(Math.round(diff/365.25))...
[ "0.678005", "0.675483", "0.6690916", "0.66270167", "0.6462601", "0.64062583", "0.6343117", "0.62855947", "0.62700474", "0.6259161", "0.6251532", "0.62401944", "0.6226054", "0.6219462", "0.6192081", "0.61806744", "0.6132331", "0.6126088", "0.61201066", "0.60772365", "0.6074345...
0.0
-1
Moving lower from specific unit
function getLowerUnitIndex(index) { if (index === MONTH_INDEX) { return DAY_INDEX; } else if (index === WEEK_INDEX) { return HOURS_INDEX; } return index - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n this.x = this.x + this.speed * this.xDir;\n if (this.x >= this.unit || this.x <= 0) {\n this.xDir *= -1;\n this.x = this.x + 5 * this.xDir;\n this.y = this.y + 5 * this.yDir;\n }\n if (this.y >= this.unit || this.y <= 0) {\n this.yDir *= -1;\n this.y = this.y + 7 *...
[ "0.64984584", "0.64147395", "0.626525", "0.6231357", "0.62201095", "0.62142944", "0.6207542", "0.61814624", "0.61668146", "0.61611015", "0.6110508", "0.6088228", "0.6084297", "0.6078784", "0.6075402", "0.602571", "0.59751135", "0.59751135", "0.59660804", "0.5965274", "0.59596...
0.0
-1
Moving higher from specific unit
function getHigherUnitIndex(index) { return index === DAY_INDEX ? MONTH_INDEX : index + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function higher(){\n coords.Y-=1\n ground.style = 'transform: translateX(-5000px) translateY(-5000px) translateZ('+coords.Y+'px) rotateZ('+coords.xRot+'deg) translateY('+coords.yMove+'px) translateX('+coords.xMove+'px)'\n}", "moveUpNext() {\r\n this.movement.y = -this.speed;\r\n this.move();\r\n ...
[ "0.6935016", "0.6590296", "0.6561379", "0.6542149", "0.6505734", "0.64901936", "0.6468716", "0.64382035", "0.64382035", "0.6427808", "0.64104223", "0.6402917", "0.63933474", "0.6351857", "0.6313664", "0.6285411", "0.628211", "0.6275423", "0.6266584", "0.62333417", "0.6221131"...
0.0
-1
Years > Milliseconds checking all date params including "weekday"
function iterateOverDateParams(params, fn, startIndex, endIndex) { function run(name, unit, i) { var val = getDateParam(params, name); if (isDefined(val)) { fn(name, val, unit, i); } } iterateOverDateUnits(function (unit, i) { var result = run(unit.name, unit, i); if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkOverEighteenFn(year, month, day) {\n // Write your code here\n let d = new Date();\n year = d.getFullYear() - year\n if(year >= 18){\n return true\n }\n \n return false\n}", "function CheckDate(theYear, startYear, feet) {\n if (theYear > startYear)\n return true;\n else ret...
[ "0.68476397", "0.674336", "0.6353497", "0.6350724", "0.6342307", "0.63280606", "0.63110995", "0.62616783", "0.6217674", "0.61434925", "0.612226", "0.606273", "0.59984213", "0.5968825", "0.5968825", "0.59645265", "0.5943185", "0.5936375", "0.59329325", "0.59036756", "0.590114"...
0.0
-1
Gets an "adjusted date unit" which is a way of representing the largest possible meaningful unit. In other words, if passed 3600000, this will return an array which represents "1 hour".
function getAdjustedUnit(ms, fn) { var unitIndex = 0, value = 0; iterateOverDateUnits(function(unit, i) { value = abs(fn(unit)); if (value >= 1) { unitIndex = i; return false; } }); return [value, unitIndex, ms]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUnits() {\n const seconds = this.props.timeElapsed / 1000;\n var hr = Math.floor(seconds / 3600).toString();\n var min = Math.floor(seconds / 60).toString();\n var sec = Math.floor(seconds % 60).toString();\n var msec = (seconds % 1).toFixed(2).substring(2);\n \n return this.formatTime(hr) ...
[ "0.582244", "0.5754513", "0.55795866", "0.55308455", "0.54940385", "0.54171276", "0.53659946", "0.53495467", "0.534078", "0.53324026", "0.5330655", "0.5321214", "0.53141576", "0.5312252", "0.5281898", "0.5272487", "0.5267524", "0.5264622", "0.52429765", "0.5235417", "0.522236...
0.58668166
0
Gets the adjusted unit based on simple division by date unit multiplier.
function getAdjustedUnitForNumber(ms) { return getAdjustedUnit(ms, function(unit) { return trunc(withPrecision(ms / unit.multiplier, 1)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUnitToShift(){\n // valuto la label della unit corrente\n switch($scope.units[$scope.indexDefaultUnit].key){\n case 'hour':\n // appende il giorno corrente della settimana e il numero\n return 'day';\n ...
[ "0.597214", "0.5907176", "0.5737213", "0.569242", "0.5679706", "0.55815566", "0.5558764", "0.5557913", "0.5488801", "0.5486323", "0.54645425", "0.5457529", "0.5377204", "0.5366833", "0.5336979", "0.53307885", "0.5321531", "0.53054607", "0.5304867", "0.5304867", "0.5304431", ...
0.613858
0
Gets the adjusted unit using the unitsFromNow methods, which use internal date methods that neatly avoid vaguely defined units of time (days in month, leap years, etc). Reserving dRelative to allow another date to be relative to.
function getAdjustedUnitForDate(d, dRelative) { var ms; if (!dRelative) { dRelative = getNewDate(); if (d > dRelative) { // If our date is greater than the one that we got from getNewDate, it // means that we are finding the unit for a date that is in the future // relative t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "roundDate(date, relativeTo) {\n const me = this,\n dt = DateHelper.clone(date),\n increment = me.resolutionIncrement || 1;\n relativeTo = DateHelper.clone(relativeTo || me.startDate);\n\n switch (me.resolutionUnit) {\n case 'week':\n DateHelper.startOf(dt, 'day');\n le...
[ "0.60372895", "0.6018127", "0.5753851", "0.56760967", "0.56709504", "0.5566327", "0.5537377", "0.55072993", "0.5506553", "0.5410404", "0.5360319", "0.533191", "0.5319537", "0.53189856", "0.5309105", "0.5127476", "0.5085225", "0.50560987", "0.5032442", "0.50117934", "0.5008167...
0.80133134
0
Force the UTC flags to be true if the source date date is UTC, as they will be overwritten later.
function cloneDateByFlag(d, clone) { if (_utc(d) && !isDefined(optFromUTC)) { optFromUTC = true; } if (_utc(d) && !isDefined(optSetUTC)) { optSetUTC = true; } if (clone) { d = new Date(d.getTime()); } return d; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneDateByFlag(d, clone) {\n if (_utc(d) && !isDefined(getOwn(options, 'fromUTC'))) {\n options.fromUTC = true;\n }\n if (_utc(d) && !isDefined(getOwn(options, 'setUTC'))) {\n options.setUTC = true;\n }\n if (clone) {\n d = new Date(d.getTime());\n }\n return d;\n }",...
[ "0.59295565", "0.5703573", "0.5617592", "0.5599234", "0.55491805", "0.55326664", "0.54748815", "0.54590464", "0.5455702", "0.5378494", "0.5329606", "0.5301553", "0.5255596", "0.5248746", "0.524837", "0.5245126", "0.5245126", "0.5245126", "0.5245126", "0.5245126", "0.5245126",...
0.58129585
1
TODO: consolidate arguments into options
function updateDate(d, params, reset, advance, prefer, weekdayDir, contextDate) { var upperUnitIndex; function setUpperUnit(unitName, unitIndex) { if (prefer && !upperUnitIndex) { if (unitName === 'weekday') { upperUnitIndex = WEEK_INDEX; } else { upperUnitIndex = getH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function foo(name, options, args) {\n // ...\n }", "constructor(args, opts) {\n super(args, opts);\n\n console.log(args);\n // Cconsole.log(opts);\n /**\n * Set option skip welcome message\n */\n this.option('skip-welcome-msg', {\n desc: 'Skips the welcome message',\n type: B...
[ "0.65365326", "0.64445287", "0.6355552", "0.6355552", "0.6350718", "0.6319127", "0.62159824", "0.6194311", "0.6194311", "0.61877733", "0.6065298", "0.6053841", "0.6048323", "0.603789", "0.603789", "0.60253704", "0.58624953", "0.5856497", "0.5803419", "0.5798335", "0.5765769",...
0.0
-1
Value array build helpers
function buildValueArray(name, mod, map, fn) { var field = name, all = [], setMap; if (!loc[field]) { field += 's'; } if (!map) { map = {}; setMap = true; } forAllAlternates(field, function(alt, j, i) { var idx =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildValueArray(name, mod, map, fn) {\n var field = name, all = [], setMap;\n if (!loc[field]) {\n field += 's';\n }\n if (!map) {\n map = {};\n setMap = true;\n }\n forAllAlternates(field, function(alt, j, i) {\n var idx = j * ...
[ "0.69894564", "0.63976806", "0.62891704", "0.62891704", "0.62215394", "0.6064448", "0.59411025", "0.59411025", "0.592623", "0.5912244", "0.5911221", "0.58933365", "0.58679104", "0.58402187", "0.58212507", "0.5820535", "0.57948786", "0.57778925", "0.57766545", "0.57766545", "0...
0.6980912
1
"match" in < IE9 has enumable properties that will confuse for..in loops, so ensure that the match is a normal array by manually running "exec". Note that this method is also slightly more performant.
function runGlobalMatch(str, reg) { var result = [], match, lastLastIndex; while ((match = reg.exec(str)) != null) { if (reg.lastIndex === lastLastIndex) { reg.lastIndex += 1; } else { result.push(match[0]); } lastLastIndex = reg.lastIndex; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detect(arr, val) {\n\t return arr.some(function (v) {\n\t return val.match(v);\n\t });\n\t}", "function match (a, v) {\n if (a instanceof Array) {\n for (var i = 0; i < a.length; i++) {if (a[i] == v) return v} \n }\n return null;\n }", "function checkVal...
[ "0.5551569", "0.54231024", "0.5413297", "0.5413297", "0.540601", "0.5392974", "0.5376015", "0.5239292", "0.52353156", "0.51709455", "0.5170563", "0.5162471", "0.51593757", "0.51558065", "0.51310337", "0.5129312", "0.5128928", "0.51245457", "0.5091342", "0.5084676", "0.5061015...
0.4803453
61
Avoids issues with [undefined] in < IE9
function arrayWrap(obj) { var arr = []; arr.push(obj); return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnUndefined() {}", "function _undefinedCoerce() {\n return '';\n}", "function k(e){return null===e||void 0===e}", "function nullAndUndefined()\n{\n\n}", "function i(e){return void 0===e||null===e}", "function i(e){return void 0===e||null===e}", "function i(e){return void 0===e||null===e...
[ "0.72256374", "0.6855278", "0.67917407", "0.6712902", "0.67108005", "0.67108005", "0.67108005", "0.67108005", "0.67108005", "0.66208124", "0.65957624", "0.65127796", "0.65127796", "0.6503001", "0.64950734", "0.64869404", "0.64703536", "0.64703536", "0.64703536", "0.64703536", ...
0.0
-1
Avoids issues with concat in < IE8 istanbul ignore next
function arraySafeConcat(arr, arg) { var result = arrayClone(arr), len = result.length, arr2; arr2 = isArray(arg) ? arg : [arg]; result.length += arr2.length; forEach(arr2, function(el, i) { result[len + i] = el; }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get exposed() { return ['concat']; }", "function concat(input1, input2) {}", "concat () {\n return this[OBJECTMODE]\n ? Promise.reject(new Error('cannot concat in objectMode'))\n : this.collect().then(buf =>\n this[OBJECTMODE]\n ? Promise.reject(new Error('cannot concat ...
[ "0.7289368", "0.6745369", "0.66187835", "0.6582034", "0.65697485", "0.6542704", "0.6524688", "0.65237516", "0.64794576", "0.647387", "0.6389937", "0.6361496", "0.6329074", "0.6325002", "0.62717134", "0.62717134", "0.62717134", "0.62717134", "0.626436", "0.62579703", "0.623184...
0.638642
11
Query Strings | Creating
function toQueryStringWithOptions(obj, opts) { opts = opts || {}; if (isUndefined(opts.separator)) { opts.separator = '_'; } return toQueryString(obj, opts.deep, opts.transform, opts.prefix || '', opts.separator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constructQueryString(){\n\tvar result = \"\";\n\t\n\tif(count > 0){\n\t\tresult = \"?\" + queries[0].name + \"=\" + queries[0].value;\n\t\tvar i = 1;\n\t\tfor(; i < count; i++){\n\t\t\tresult+= \"&\" + queries[i].name + \"=\" + queries[i].value;\n\t\t}\n\t}\n\treturn result;\n}", "function urlQueryValue...
[ "0.7441993", "0.69436425", "0.69241446", "0.69241446", "0.687703", "0.6825245", "0.6744296", "0.67437845", "0.6710579", "0.6702793", "0.66626304", "0.6662384", "0.66489834", "0.6627566", "0.6592801", "0.65715796", "0.65601754", "0.65510124", "0.65316653", "0.6530723", "0.6446...
0.0
-1
Query Strings | Parsing
function fromQueryStringWithOptions(obj, opts) { var str = String(obj || '').replace(/^.*?\?/, ''), result = {}, auto; opts = opts || {}; if (str) { forEach(str.split('&'), function(p) { var split = p.split('='); var key = decodeURIComponent(split[0]); var val = split.length ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseQueryString()\n{\n\tif(document.location.href.indexOf(\"?\") == -1){\n\t\tqueries = new Array(10);\n\t\treturn;\n\t}\n\tvar x = document.location.href.split(\"?\")[1].split(\"&\");\n\tvar xx;\n\tvar result = new Array(x.length);\n\t\n\tfor(i=0; i < x.length; i++)\n\t{\n\t\txx = x[i].split(\"=\");\n\t...
[ "0.79405224", "0.7844249", "0.7844249", "0.7574438", "0.7483573", "0.74792093", "0.7293494", "0.72499496", "0.72430015", "0.7198183", "0.7187703", "0.7122315", "0.71080273", "0.7087258", "0.7077709", "0.70389575", "0.7023207", "0.70218015", "0.69818395", "0.6977139", "0.69755...
0.0
-1
"keys" may include symbols
function iterateOverKeys(getFn, obj, fn, hidden) { var keys = getFn(obj), desc; for (var i = 0, key; key = keys[i]; i++) { desc = getOwnPropertyDescriptor(obj, key); if (desc.enumerable || hidden) { fn(obj[key], key); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseKey() {\n var specialValues = ['null', 'true', 'false'];\n var key = '';\n var c = curr();\n\n var regexp = /[a-zA-Z_$\\d]/; // letter, number, underscore, dollar character\n while (regexp.test(c)) {\n key += c;\n i++;\n c = curr();\n }\n\n if (specialValues.indexO...
[ "0.7272207", "0.65867966", "0.6539084", "0.63850003", "0.622032", "0.618602", "0.61636615", "0.61378765", "0.61202896", "0.6113466", "0.6100426", "0.60802084", "0.60482454", "0.6042917", "0.6033673", "0.5992771", "0.5992771", "0.5983409", "0.5931499", "0.59284306", "0.5911117...
0.0
-1
Methods like filter and find have a direct association between the value returned by the callback and the element of the current iteration. This means that when looping, array elements must match the actual index for which they are being called, so the array must be sliced. This is not the case for methods like forEach...
function sliceArrayFromLeft(arr, startIndex, loop) { var result = arr; if (startIndex) { result = arr.slice(startIndex); if (loop) { result = result.concat(arr.slice(0, startIndex)); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iterate(stupidCallback) {\n let myArray = [1, 2, 3, 4];\n myArray.forEach(stupidCallback)\n return myArray\n}", "function each(arr, cb) {\n // return item and an index to callback\n // call the call back once for each item in the array\n\n // arr.forEach.indexOf(cb(arr);\n // }\n}", "functi...
[ "0.6320792", "0.63194656", "0.612285", "0.6103521", "0.6103447", "0.60697174", "0.6036583", "0.60331464", "0.598568", "0.59393007", "0.5918572", "0.5909171", "0.58904403", "0.5861081", "0.582576", "0.5796246", "0.57891554", "0.57891554", "0.57657206", "0.5763878", "0.5753712"...
0.0
-1
When iterating from the right, indexes are effectively shifted by 1. For example, iterating from the right from index 2 in an array of 3 should also include the last element in the array. This matches the "lastIndexOf" method which also iterates from the right.
function sliceArrayFromRight(arr, startIndex, loop) { if (!loop) { startIndex += 1; arr = arr.slice(0, max(0, startIndex)); } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lastIndexOf(arr, elt, start=arr.length-1) {\n\tconsole.log(start);\n\tfor (let i = start; i >= 0; i--)\n\t\tif (arr[i] === elt) return i;\n\treturn -1;\n}", "function myLastIndexOf(arr, element, startPos = arr.length){\n\n var index ;\n\n // uses the optional parameter\n\n for (let i = startPos ; i >...
[ "0.65856904", "0.6509352", "0.6471038", "0.64355916", "0.6397207", "0.6319028", "0.63092643", "0.63019866", "0.629656", "0.6267755", "0.6267755", "0.6265841", "0.62299556", "0.6226182", "0.6226182", "0.6199193", "0.61860645", "0.6176815", "0.61713696", "0.61713696", "0.617136...
0.61734194
18
As indexes are shifted by 1 when starting from the right, clamping has to go down to 1 to accommodate the full range of the sliced array.
function clampStartIndexFromRight(startIndex, len) { return min(len, max(-1, startIndex)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clampStartIndexFromRight(startIndex, len) {\n return min(len, max(-1, startIndex));\n }", "function cutIt(arr){\n var min = Math.min(...arr.map(({ length }) => length));\n //map over array slice it by min.\n<<<<<<< HEAD\n \n \n}", "function clamp(r) {\r\n var c = r.s&DM, t = r.t;\r\n while...
[ "0.6202726", "0.617459", "0.5972949", "0.5851899", "0.57952183", "0.57735074", "0.5742987", "0.57289296", "0.57238466", "0.56982934", "0.5690398", "0.563879", "0.5636106", "0.5627376", "0.5601462", "0.55264145", "0.55250883", "0.55250883", "0.55233395", "0.55133724", "0.55010...
0.6227656
0
Collecting arguments in an array instead of passing back the arguments object which will deopt this function in V8.
function collectArguments() { var args = arguments, i = args.length, arr = new Array(i); while (i--) { arr[i] = args[i]; } return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function args() {\n return Array.prototype.slice.call(arguments[0]);\n }", "function getArguments() {\n return arguments;\n}", "function getArguments(...args) {\n return args;\n}", "function getArguments(args) {\n if (args.length <= 2) return null;\n\n // splice on arguments prevents ...
[ "0.7503336", "0.7274843", "0.71985924", "0.7124198", "0.7113662", "0.7108306", "0.7088941", "0.70184994", "0.69967", "0.69452405", "0.69116336", "0.6898404", "0.6889889", "0.6870637", "0.6805451", "0.67717296", "0.67069846", "0.6694212", "0.6690736", "0.66325575", "0.6622071"...
0.8203186
0
REVEAL TILE (left click)
function checkClick(tile) { if (tile.type === 0) { revealTile(tile) revealBlanks(tile) } else if (tile.type > 0) revealTile(tile) else { revealMines(tile) displayLose(tile) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myDown(e) {\n\n // funciton to mark/unmark tiles while moving mouse\n canvas.onmousemove = myMove;\n\n x = e.pageX - canvas.offsetLeft;\n y = e.pageY - canvas.offsetTop;\n\n for (c = 0; c < tileColumnCount; c++) {\n for (r = 0; r < tileRowCount; r++) {\n if (c * (tileW + 3...
[ "0.6766459", "0.6699346", "0.6612916", "0.6543595", "0.6529568", "0.64292496", "0.62498957", "0.62450594", "0.61321586", "0.6085886", "0.60794157", "0.60794157", "0.6051598", "0.60221475", "0.60204184", "0.59797853", "0.5975742", "0.5963171", "0.59388995", "0.5926713", "0.590...
0.58372176
30
MARK TILE (right click)
function markTile_1(tile) { const button = tile.buttonElement if (button.innerHTML === '?') button.innerHTML = '' else button.innerHTML = '?' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function markTile(row, col) {\n // markne dlazdicu ked je CLOSED\n // nastavi CLOSED, pokial bola predtym MARKED\n}", "function myDown(e) {\n\n // funciton to mark/unmark tiles while moving mouse\n canvas.onmousemove = myMove;\n\n x = e.pageX - canvas.offsetLeft;\n y = e.pageY - canvas.offsetTop;\n...
[ "0.7133757", "0.6423783", "0.6360065", "0.62791497", "0.6166443", "0.61566097", "0.61566097", "0.61385685", "0.6136821", "0.6043604", "0.6033603", "0.5992178", "0.5977931", "0.5928516", "0.58814275", "0.58756804", "0.58692753", "0.5851364", "0.5848787", "0.58143955", "0.58091...
0.6491619
1
CHECK WIN OR LOSE
function displayLose(tile) { setTimeout(function(){ if (confirm("You Lost! Press 'OK' or refresh the page to restart.")) location.reload() else disableBoard() }, 500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkWin()\n{\n\t//return(checkWinHorizontal()||checkWinVertical());\n\treturn(checkWinHorizontal()||checkWinVertical()||checkWinRightDiag()||checkWinLeftDiag());\n}", "function checkWin(){\n return checkRowWinCondition()||checkColWinCondition()||checkDiagWinCondition();\n}", "function checkWin() {...
[ "0.7709937", "0.75662637", "0.7354929", "0.7218523", "0.71898025", "0.7121665", "0.70817393", "0.7065797", "0.6959575", "0.6909083", "0.69076127", "0.68746513", "0.6857911", "0.68328863", "0.6810789", "0.68064785", "0.677349", "0.675045", "0.67473227", "0.67326564", "0.672421...
0.0
-1
THIS FUNCTION SHOWS THE MODAL FOR PROMPTING THE USER TO SEE IF THEY REALLY WANT TO DELETE THE LIST
showDeleteListModal() { let modal = document.getElementById("delete-modal"); modal.classList.add("is-visible"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteList(){\n if(confirm(\"Tem Sertesa que deseja excluir a tabela?\")){\n list = '';\n setList(list);\n }\n}//fim", "function deleteFromList(element){\n if(confirm('Would you like to delete this item?') == 1){\n $(element).parent().remove();\n }\n}", "processDeleteList() { ...
[ "0.79745924", "0.7081014", "0.697997", "0.69209623", "0.6881205", "0.68545306", "0.68475294", "0.6738376", "0.67252094", "0.6722767", "0.67032945", "0.66326547", "0.66252947", "0.6619479", "0.6614506", "0.66033924", "0.66015387", "0.657594", "0.6547712", "0.65309584", "0.6529...
0.0
-1
THIS FUNCTION IS FOR HIDING THE MODAL
hideDeleteListModal() { let modal = document.getElementById("delete-modal"); modal.classList.remove("is-visible"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onHide() {}", "onHide() {}", "modify () {\n\n // Hide modal\n this.modal.hide();\n }", "checkhide(e) {\n if (e.target == this.modal) {\n this.hide();\n }\n }", "_dismiss() {\n\t\tthis.unbind();\n\t\tthis._isVisible = false;\n\t}", "function closeModuleList() {...
[ "0.68002546", "0.68002546", "0.67965865", "0.674451", "0.65911037", "0.65705544", "0.6554681", "0.65243864", "0.64988214", "0.64806247", "0.64743596", "0.6443927", "0.644186", "0.64240825", "0.6393692", "0.63902396", "0.6381177", "0.63687164", "0.63671106", "0.63628626", "0.6...
0.0
-1
the next methods are to disable and enable the 3 buttons
enableUndo(){ let undo = document.getElementById("undo-button"); undo.classList.remove("top5-button-disabled"); undo.classList.add("top5-button") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableButtons (p1Attack,p1Heal,p1Yield,p2Attack,p2Heal,p2Yield){\n\n p1Attack.disabled = true;\n p1Heal.disabled = true;\n p1Yield.disabled = true;\n\n p2Attack.disabled = false;\n p2Heal.disabled = false;\n p2Yield.disabled =false;\n \n\n}", "function enableButtons() {\n\tdocument...
[ "0.7994481", "0.79692435", "0.79667187", "0.79581434", "0.79160416", "0.78694427", "0.7838515", "0.77675384", "0.77469724", "0.7737624", "0.77050555", "0.7610008", "0.75785977", "0.75700694", "0.7569608", "0.75615984", "0.7528568", "0.74868816", "0.7450299", "0.7447155", "0.7...
0.0
-1
Store input search string from LWC
getProductInput(event){ this.productNameSearch = event.target.value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchCocktail() {\n //set searchTerm to what a user typed in\n console.log(searchValue.current.value);\n setSearchTerm(searchValue.current.value);\n }", "function retSearchStr(usrInput) {\n var query = \"https://en.wikipedia.org//w/api.php?action=query&format=json&origin=\\*&uselang=user&l...
[ "0.6475682", "0.63375247", "0.6337361", "0.63251853", "0.629417", "0.62544006", "0.62299454", "0.6226138", "0.6211124", "0.6210584", "0.62065995", "0.61814904", "0.6166388", "0.6159283", "0.61576146", "0.6156042", "0.6145601", "0.61335546", "0.6117557", "0.61137295", "0.61101...
0.0
-1
omni Temp variable to push row Omni Add Row Contact Action
handleRowAddTrailContact(event){ this.isErrorSpinner= true; var row = event.detail.row; var isValidEmail = true; //DPS-20337 - scenario 1 var isValidNotCompetitor = true; //DPS-20337 - scenario 2 var isValidDomain = true; //DPS-20337 - scenario 3 var isErrorInDo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addFrom(sender, eventArgs) {\n\n currentRowIndex = eventArgs.get_itemIndexHierarchical();\n\n var ary = [];\n\n ary[1] = FromTypeTableView.get_dataItems()[currentRowIndex].findElement(\"FORM_NAME\").value;\n ary[2] = FromTypeTableView.get_dataItems()[currentRowIndex].findElement(\"FILE_NAME\")...
[ "0.6578052", "0.657566", "0.65442556", "0.64555043", "0.64378023", "0.6417163", "0.6317649", "0.62882376", "0.6266303", "0.6265714", "0.62050396", "0.6189297", "0.6144517", "0.613196", "0.602328", "0.5995397", "0.5951104", "0.5916078", "0.5892517", "0.5889776", "0.5889066", ...
0.0
-1
Omni Remove Reow from Contact Table
handleRowRemoveTrialContact(event){ this.isErrorSpinner= true; var row = event.detail.row; let rows = JSON.parse(JSON.stringify(this.trailContactsSelected)); var index = rows.map(x => { return x.email; }).indexOf(row.email); rows...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove(contact) {\n // Filter out any items that have the same _id as the 'contact'\n this.data = this.data.filter((item) => {\n return item._id !== contact._id;\n });\n\n this.render();\n }", "function removeContact() {\n let contactId = getSelectedContactId()\n client.contacts.remove(co...
[ "0.70065755", "0.69900966", "0.68084663", "0.67060846", "0.66527724", "0.6639317", "0.66301537", "0.6507868", "0.64213985", "0.6421135", "0.64081293", "0.6390295", "0.6382681", "0.63780177", "0.6371094", "0.6356291", "0.6335503", "0.63116735", "0.6296439", "0.6280909", "0.627...
0.667298
4
Registers a change listener
function start() { resetData(); pedometer.start( CONTEXT_TYPE, function onSuccess(pedometerInfo) { handlePedometerInfo(pedometerInfo, 'pedometer.change'); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addListener(changeListener) {\n this.changeListeners.push(changeListener);\n }", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on('change', ca...
[ "0.8072799", "0.80006343", "0.7910576", "0.7892719", "0.78818387", "0.7784882", "0.7678243", "0.7678243", "0.7624219", "0.72954553", "0.71148616", "0.6882892", "0.68161726", "0.6746224", "0.66599715", "0.6640941", "0.6629247", "0.6587044", "0.6557751", "0.64584595", "0.645157...
0.0
-1
Unregisters a change listener
function stop() { pedometer.stop(CONTEXT_TYPE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeChangeListener(callback) {\n this.removeListener('change', callback);\n }", "removeChangeListener(callback) {\n\t\tthis.removeListener(CHANGE_EVENT, callback)\n\t}", "removeChangeListener(callback) {\n this.removeListener(CHANGE, callback);\n }", "removeChangeListener(callback) {\n this....
[ "0.83456045", "0.80969715", "0.80702037", "0.79235715", "0.79235715", "0.77727807", "0.738358", "0.7292857", "0.70630497", "0.6983214", "0.6961473", "0.6911392", "0.68763", "0.68407655", "0.68139976", "0.6771918", "0.6757146", "0.67110175", "0.6706129", "0.66592044", "0.66412...
0.0
-1
labels: ['crusher1', 'cursher2', 'crusher3'] avl: [val1, val2, val3] run:[val1,val2,val3] Along the x axix are items along the y axis are atrributes in tooltip, x index is available as index y index is available ia datasetIndex
function crusherGraph(obj) { Chart.defaults.global.animation.duration = 0; let crushers = obj.crushers; let crusherTotal = obj.crusherTotal; let section = document.querySelector('#crusher-sec'); section.querySelectorAll('.chart-container canvas').forEach(x => x.remove()); plotTime('#crusher-t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_tooltip(d, i) {\n // console.log(\"flag\");\n if (d.indexData !== -1) {\n return this.model.data.children.data[this._vOrder[d.indexData]].labels[1] + \"\\n\" + // Full name\n this.model.data.edges.valueTitle[i] + \": \" +\n this.model.data.children.data[this._vOrder[d.indexData]].edge.val...
[ "0.6004307", "0.5836038", "0.570308", "0.5701164", "0.5619763", "0.55820036", "0.55407256", "0.55209535", "0.55155045", "0.5504868", "0.5504437", "0.5498782", "0.54942745", "0.5488074", "0.54863274", "0.5476902", "0.54695034", "0.54643494", "0.5459609", "0.5456958", "0.544862...
0.0
-1
Creating the JSON Web Token
function createToken( user ) { return jwt.sign( user, 'secret', { expiresIn: 60 * 60 * 5 } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function maketoken(info){\n info.expires=Date.now()+tokenExpiresTime\n return jwt.encode(info,secret)\n}", "function createToken() {\n var token = jwt.sign({\n \"userId\": \"ruhan-jwt-js\",\n \"userDirectory\": \"JWT\"\n // \"email\": \"boz@example.com\",\n // \"Group\": [\"s...
[ "0.7573294", "0.7515609", "0.7482611", "0.7394451", "0.73688364", "0.7335852", "0.7309563", "0.72715396", "0.7253773", "0.72365016", "0.7228202", "0.7173194", "0.7160755", "0.70892787", "0.7076161", "0.70671964", "0.70598525", "0.704265", "0.70234525", "0.7000705", "0.6995856...
0.66999966
44
Accessing the Database for the specified user
function getUserDB( username, callback ) { connection.query( "SELECT * FROM YOUA.USERS WHERE username = '" + username + "';", function( err, rows, fields ) { if ( err ) throw err; if ( rows[ 0 ] ) callback( rows[ 0 ] ); else callback( rows ); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUserWithUserName(db, user_name) {\n return db('thingful_users').where({ user_name }).first();\n }", "function UserDB() {\n\tUser.sync();\n}", "static async getUserDatabases(ctx) {\n const [ user ] = await User.getBy('email', ctx.request.query.user); // lookup user\n\n ctx.response.body = {...
[ "0.63195187", "0.60146445", "0.5943064", "0.58730996", "0.5844551", "0.5832401", "0.5730577", "0.57297564", "0.56448156", "0.5579676", "0.5564445", "0.55552435", "0.5510448", "0.5505986", "0.55025417", "0.54937565", "0.54817194", "0.54794085", "0.5472497", "0.5447583", "0.543...
0.61884874
1
TODO Check differences (probably round problem)
function testCoordinationRatioInfDiffWorks3() { debug(arguments.callee.name); reset(); task6.setProperty('coordinationRatioInf', '1.5'); task6.setProperty('coordinationRatioSup', '1.2'); assign(informaticien1, task6); assign(informaticien2, task6); assign(commercial1, task6); assign(co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "private public function m246() {}", "getRelation(t) {\n\n var r = 0;\n var a = [0, 0];\n var b = [0, 0];\n a = this....
[ "0.5536694", "0.5399288", "0.5399288", "0.5399288", "0.5399288", "0.5399288", "0.5399288", "0.53412247", "0.51460296", "0.5131264", "0.5128784", "0.5126291", "0.51018053", "0.51005226", "0.50933033", "0.5079559", "0.50783205", "0.5074916", "0.5068405", "0.5068405", "0.5068405...
0.0
-1
TODO Check differences (probably round problem)
function testCoordinationRatioDiffLevel() { debug(arguments.callee.name); reset(); task2.setProperty('coordinationRatioSup', '1.3'); informaticien1.instance.setSkillset("Informaticien", 11); informaticien2.instance.setSkillset("Informaticien", 11); commercial1.instance.setSkillset("Commercial"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "private public function m246() {}", "getRelation(t) {\n\n var r = 0;\n var a = [0, 0];\n var b = [0, 0];\n a = this....
[ "0.5536694", "0.5399288", "0.5399288", "0.5399288", "0.5399288", "0.5399288", "0.5399288", "0.53412247", "0.51460296", "0.5131264", "0.5128784", "0.5126291", "0.51018053", "0.51005226", "0.50933033", "0.5079559", "0.50783205", "0.5074916", "0.5068405", "0.5068405", "0.5068405...
0.0
-1
Function to update the timeline template.
function update() { var minValue; var maxValue; var delta; /* Find all the bars that go in this timeline. We * reverse the list so bars are placed bottom-up. */ scope.barList...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateTemplate() {\n this.updateLine();\n }", "function updateTimelinePosition() {\r\n\tupdatePosition('updateTimelinePosition', '#timeline > .video-container');\r\n}", "template() {\r\n return `<div id=\"container\" role=\"presentation\">\r\n <div id=\"header\" class=\"lw-schedul...
[ "0.6679493", "0.6254362", "0.6004917", "0.5895875", "0.5804955", "0.5789477", "0.56695926", "0.56588906", "0.56056136", "0.55874395", "0.5556265", "0.55249244", "0.5520271", "0.5496592", "0.5493614", "0.54684126", "0.5446852", "0.5422526", "0.54196954", "0.5346465", "0.534019...
0.5301974
23
change your event date event here.
function toSt(n) { s="" if(n<10) s+="0"; return s+n.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "date(e){\n this.appDate = e.detail.value; \n \n }", "set eventDate(aValue) {\n this._logger.debug(\"eventDate[set]\");\n this._eventDate = aValue;\n }", "function changeDate(e){\n var _v = e.target.value;\n lastSelectedDay = _v;\n mapL.changeDate(_v);\n mapR.changeDate(_v);\n chart...
[ "0.6974229", "0.6814941", "0.67453325", "0.67264926", "0.6725595", "0.6691876", "0.66511756", "0.6650085", "0.66365945", "0.65977544", "0.6592044", "0.6572792", "0.6571499", "0.65712875", "0.6560022", "0.6557897", "0.65406317", "0.65298915", "0.65065104", "0.65065104", "0.650...
0.0
-1
handle the tethered stderr and stdout
function tetheredStd(data){ console.log(data) //handle messages if( data.indexOf('.jpg')>-1 || data.indexOf('.JPG')>-1 ){ if(data.indexOf('Deleting')>-1){ console.log('Detected Photo') var s = data.indexOf("'") var e = data.indexOf("'",s+1) //get the filename by finding the first and second '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleError(err, scope, msg, context, stdout) {\t\n\tcontext._stdout = stdout;\n\tcontext._exception = {\n\t\tscope: scope,\n\t\tlineNumber: err.lineNumber,\n\t\tmessage: err.message,\n\t\tstack: err.stack\n\t};\n\tprocess.send(clean(context, msg));\n\tprocess.exit(1);\t\n}", "function stderr (data) {\n...
[ "0.62388444", "0.6127508", "0.6118763", "0.6037213", "0.6001294", "0.599092", "0.59758687", "0.5942322", "0.58019644", "0.5726852", "0.5702726", "0.5702726", "0.5702726", "0.5691886", "0.566945", "0.56460905", "0.5561091", "0.5540585", "0.553849", "0.5518177", "0.5499813", ...
0.0
-1
When the focused prop is changed from false to true, and the input is not focused, it should receive focus. If focused prop is true, the input should receive the focus. Implement your solution below:
componentDidUpdate(prevProps) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onFocus() {\n const {\n disabled,\n input: { value, onChange },\n } = this.props;\n if (!disabled) {\n onChange(value);\n }\n }", "_onFocus(event) {\n this.focused = true;\n this.forceUpdate();\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n }", "h...
[ "0.72442347", "0.6912993", "0.68703294", "0.6847538", "0.6847538", "0.6840192", "0.6801376", "0.67277396", "0.67277396", "0.6712456", "0.67083335", "0.6680012", "0.66669387", "0.6665149", "0.6649374", "0.65943", "0.6568441", "0.6520653", "0.65162444", "0.6498557", "0.6473012"...
0.0
-1
output: a string with all words reversed, but still in the original order do not use Array.reverse()
function reverseWords(str) { // create an array of the words in the string str = str.split(" "); let reverseString = []; str.forEach(word => { // word = [...word]; let reverseWord = ""; for (let i = word.length - 1; i >= 0; i--) { reverseWord += word[i]; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rvr(words)\n{\nreturn words.split(\"\").reverse().join(\"\");\n}", "function reverse(word) {\r\n\tvar reversedWord = []\r\n\tfor (var index = word.length - 1; index > -1; index--) {\r\n\t\treversedWord.push(word[index])\r\n\t}\r\n\tconsole.log(reversedWord.join(\"\",reversedWord))\r\n}", "function rev...
[ "0.837818", "0.8059454", "0.7926021", "0.7901989", "0.78755444", "0.7812013", "0.7795773", "0.77547044", "0.77373296", "0.7732972", "0.7730678", "0.7697297", "0.767777", "0.76598346", "0.7644204", "0.75912094", "0.7582653", "0.75806326", "0.75652725", "0.7558482", "0.7557818"...
0.0
-1
========================================================================== / CONSTRUCTOR / ==========================================================================
constructor(config) { super(config.scene, config.x, config.y, config.key, config.seed, config.size, config.env); var scene = config.scene; var self = this; this.isLanding = false; this.landingGear = false; this.isLanded = false; this.altitude = 0; this....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor (){}", "constructor() {\n\t\t// ...\n\t}", "consructor() {\n }", "constructor( ) {}", "constructor() {\n }", "constructor() {\n\n\t}", "constructor() {\r\n // ohne Inhalt\r\n }", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", ...
[ "0.8575729", "0.8572154", "0.84355015", "0.83861864", "0.8365556", "0.8254402", "0.82210374", "0.818365", "0.818365", "0.818365", "0.818365", "0.818365", "0.818365", "0.818365", "0.8182909", "0.8182909", "0.80766624", "0.8032974", "0.7972576", "0.79573506", "0.79524153", "0...
0.0
-1
========================================================================== / UPDATE PLANET / ==========================================================================
updatePlanet(keys, time, delta) { /* -------------------------------- CONTROLS -------------------------------- */ // Déplacements avec les touches directionnelles if (this.keyUp.isDown) { this.body.thrustLeft(0.003); Game.player.consumeFuel(0.2); } else if (thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_planet(item){\n var planet_id = encodeURIComponent(document.getElementById(\"update_planet\" + item).value),\n mission_id = encodeURIComponent(document.getElementById(\"mission_update_name\").value),\n type = 0;\n\n //Determines if planet is being added or deleted. . .\n if (document.g...
[ "0.57928795", "0.578628", "0.56139886", "0.55625635", "0.55029786", "0.54887587", "0.5468182", "0.5450561", "0.5431082", "0.53992367", "0.53775966", "0.5313585", "0.5304357", "0.5304357", "0.5304357", "0.5304357", "0.5304357", "0.5304357", "0.5304357", "0.5293291", "0.5284928...
0.0
-1
========================================================================== / UPDATE SYSTEM / ==========================================================================
updateSystem(keys, time, delta) { /* -------------------------------- CONTROLS -------------------------------- */ // Déplacements avec les touches directionnelles if (this.keyUp.isDown) { this.body.thrustLeft(0.0001); Game.player.consumeFuel(0.2); } else if (th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSys(ID) {\n sys.modelID = ID\n if (ID.includes(\"MacBook\") == true) {\n sys.isMacBook = true\n }\n\n //console.log(\"updateSys has updated!\")\n //console.log(ID.includes(\"MacBook\"))\n //console.log(sys.isMacBook)\n} // end updateSys", "function updateStatus () {\n get('services', fun...
[ "0.6106725", "0.60854363", "0.60823864", "0.60823864", "0.60823864", "0.60463643", "0.60425484", "0.598148", "0.5952859", "0.592043", "0.5877793", "0.585796", "0.5845866", "0.58440393", "0.5810762", "0.57858795", "0.57831377", "0.57809955", "0.57697845", "0.5703685", "0.56655...
0.0
-1
========================================================================== / CONTROLS / ==========================================================================
controls(scene, self) { /* -------------------------------- CONTROLS -------------------------------- */ // Input Keys this.keyLeft = scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Q); this.keyRight = scene.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.D); thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Control() {}", "function Control() {}", "function Control() {}", "function Control() {}", "function ProcessController() {}", "handle() {}", "function Controller(){} //Extends Class (at bottom of page).", "function Mechanism() {\n\t }", "function Mechanism() {\n\t }", "function Mechanis...
[ "0.63353044", "0.63353044", "0.63353044", "0.63353044", "0.60079086", "0.59677076", "0.5848231", "0.5834034", "0.5834034", "0.5834034", "0.5834034", "0.580201", "0.57119316", "0.5701981", "0.5701981", "0.5614541", "0.5593389", "0.551077", "0.54809356", "0.54699373", "0.545167...
0.0
-1
========================================================================== / COLLISIONS PLANET / ==========================================================================
collisionsPlanet(scene, self) { /* ------------------------------- COLLISIONS ------------------------------- */ scene.matter.world.on('collisionstart', function (event) { var pairs = event.pairs; for (var i = 0; i < pairs.length; i++) { var bodyA = pairs[i].bod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "step() {\n /* If you put logic from CCA here it works as should */\n\n /* In the Game of Life, these rules examine each cell of the grid. \n For each cell, it counts that cell's eight neighbors\n (up, down, left, right, and diagonals), and then act on that result.\n\n If the cell is alive and has 2 ...
[ "0.62008476", "0.58982676", "0.5811316", "0.58072996", "0.5800245", "0.57921803", "0.5774704", "0.573565", "0.5721641", "0.567843", "0.56507903", "0.5617427", "0.55992436", "0.55882883", "0.558373", "0.55660677", "0.55649954", "0.55526274", "0.5523821", "0.55233157", "0.55172...
0.5545046
18
========================================================================== / COLLISIONS SYSTEM / ==========================================================================
collisionsSystem(scene, self) { scene.matter.world.on('collisionstart', function (event) { var pairs = event.pairs; for (var i = 0; i < pairs.length; i++) { var bodyA = pairs[i].bodyA; var bodyB = pairs[i].bodyB; // Ship - Planet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colCheck(shape0, shape1, shape2, shape3, shape4, shape5, shape6, shape7, shape8, shape9, shape10, shape11, shape12, shape13, shape14, shape15, shape16, shape17, shape18, shape19, shape20, shape21, shape22, shape23, shape24, shape25)\n{\n // Collision split up into separate object checks as pushing to a...
[ "0.61549973", "0.610756", "0.6089489", "0.6048952", "0.6030708", "0.5963807", "0.59054416", "0.59003574", "0.5852503", "0.58143157", "0.5812366", "0.5789257", "0.5771581", "0.5770732", "0.5759437", "0.57423526", "0.5736262", "0.573624", "0.56672144", "0.5665871", "0.565327", ...
0.5507511
35
========================================================================== / GETTERS / ==========================================================================
getAltitude() { return this.altitude; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get() {}", "get () {\n }", "static get properties(){return{}}", "static get properties(){return{}}", "get() {\n\n }", "static get attributes() {}", "_get () {\n throw new Error('_get not implemented')\n }", "get value() {}", "get value() {}", "get Custom() {}", "static get properties() ...
[ "0.6693614", "0.654955", "0.6466785", "0.6466785", "0.6434517", "0.6426076", "0.6382661", "0.63790566", "0.63790566", "0.6327446", "0.6248836", "0.624537", "0.6207606", "0.6191191", "0.61887324", "0.615158", "0.6128797", "0.6068068", "0.6059282", "0.6056588", "0.60504967", ...
0.0
-1
========================================================================== / SETTERS / ==========================================================================
setAltitude(alt) { this.altitude = alt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set() {}", "setValue() {\n }", "SetData() {}", "set value(value) {}", "set(_value) {\n this.value = _value;\n }", "set(_value) {\n this.value = _value;\n }", "setValue(value) {\n this._value = value;\n }", "Set() {}", "SetValue(str)\n\t{\n\t\tthis.value = str;\n\t}", "static set pr...
[ "0.70255435", "0.66870874", "0.6653768", "0.6318889", "0.6270061", "0.6270061", "0.6264564", "0.6237643", "0.61763775", "0.6149228", "0.6147992", "0.6031915", "0.602755", "0.60099345", "0.5962848", "0.59484553", "0.5905337", "0.58937234", "0.5891228", "0.58864087", "0.5856944...
0.0
-1
Let's subscribe to the network connectivity status, to possibly send data to the server.
componentDidMount() { this.appConnectionSubscription = NetInfo.addEventListener( this.handleConnectionInfoChange ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doOnline() {\n console.log('Event: online\\n' + 'Network Type: ' + navigator.network.connection.type + '\\n');\n //setNetworkType();\n }", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"...
[ "0.67507696", "0.66402227", "0.6625304", "0.6578711", "0.65426064", "0.6536996", "0.65146464", "0.6505485", "0.6472549", "0.64469445", "0.6385553", "0.6375248", "0.6317626", "0.6315359", "0.6270361", "0.62382925", "0.6213354", "0.61783224", "0.61746484", "0.615844", "0.615732...
0.0
-1
When unmounting this screen, remove the NetInfo listener.
componentWillUnmount() { this.appConnectionSubscription && this.appConnectionSubscription(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillUnmount() {\n // Unsubscribe network info event listener\n this.removeNetInfoListener();\n }", "componentWillUnmount() {\n this.state.netInfo(); // unsubscribe NetInfo event listener\n }", "componentWillUnmount() {\n // NetInfo.removeEventListener(\"change\", this._handleConnection...
[ "0.74496895", "0.7434686", "0.70161945", "0.6701509", "0.66713727", "0.65130043", "0.6464946", "0.6429805", "0.64051867", "0.6396383", "0.636494", "0.6362336", "0.63488126", "0.6278285", "0.627812", "0.6242455", "0.621672", "0.62111896", "0.62080085", "0.61959356", "0.6188963...
0.0
-1
Helper to echo strings in the terminal window
function spitt(msg) { shell.echo(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "echo(message){\n this.terminal.echo(message);\n }", "function basicEcho(text) {\n\tthisTerm.echo(text, {keepWords: true});\n}", "function echo(argv) {\n const args = argv.slice(1).map(a => a.startsWith('$') ? this.getVariable(a) : a)\n console.log('args:', args)\n\n this.write(`${args.join(' ')}\\...
[ "0.72751534", "0.68015087", "0.6575617", "0.63117844", "0.63117844", "0.62950736", "0.6182899", "0.6164445", "0.6159749", "0.6158478", "0.615531", "0.6141679", "0.61338127", "0.6124716", "0.609804", "0.60880834", "0.60826695", "0.6072349", "0.60660154", "0.6036988", "0.603114...
0.6853662
1
Esto es un Ejemplo de como usarlo
async function todosArticulosController (req, res){ let query = `SELECT Articulo, Nombre, UnidadCompra, UnidadVenta FROM Articulos`; let resultado = await createRawQuery({suc: 'bo', query}) res.json(resultado) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iniciar() {\n \n }", "function Go_Funciones()\n {\n if( g_listar == 1 )\n {\n Get_Marca_Producto();\n }\n \n }", "function mostrarRegistrarseComoColaborador(){\n mostrarComo('colaborador')\n}", "function Buscar() {\n //todos objBusqu...
[ "0.67870945", "0.615437", "0.6115825", "0.59720266", "0.5954896", "0.5947511", "0.59358084", "0.59085464", "0.5866042", "0.5852476", "0.58345014", "0.582009", "0.5816861", "0.5814319", "0.5803358", "0.5800327", "0.5798119", "0.5767192", "0.57636034", "0.57431346", "0.5717439"...
0.0
-1
update child info after server update call
updateChildInfo(state, payload){ const firstName = payload.firstName || null; const middleName = payload.middleName || null; const lastName = payload.lastName || null; const knownName = payload.knownName || null; const genderId = payload.genderId || 0; const ethnicity = payload.ethni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set info(newInfo) {\n\t\tthis._info = newInfo\n\t\tserver.send('update-node-info', {\"id\": this.id, \"info\": this._info})\n\t}", "update() {\r\n this.sendDetail();\r\n }", "updateSelfData(ro) {}", "update() {\n\t\tbus.emit('Server:Update', this)\n\t\tif (this.Vars._displayStatusMessage) {\n\t\t\t...
[ "0.6363024", "0.62865996", "0.6189458", "0.6178824", "0.6119235", "0.6054102", "0.59929997", "0.59778607", "0.59258974", "0.5893726", "0.5883283", "0.58629936", "0.5854902", "0.5853185", "0.5822812", "0.5804585", "0.579231", "0.57805455", "0.5756506", "0.57398534", "0.5729041...
0.6225523
3
XXX: duplicates private faucetcore's fingerprinting
function generateHash(str) { let hash = crypto.createHash("md5"); hash.update(str); return hash.digest("hex"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fingerprint(str){var utf8=utf8Encode(str);var _a=Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])([hash32(utf8,0),hash32(utf8,102072)],2),hi=_a[0],lo=_a[1];if(hi==0&&(lo==0||lo==1)){hi=hi^0x130f9bef;lo=lo^-0x6b5f56d8;}return[hi,lo];}", "function hash_to_fingerprint( hash ) {\n retur...
[ "0.6788875", "0.6477588", "0.6477257", "0.61703354", "0.6164969", "0.6091333", "0.6091333", "0.6083941", "0.6083941", "0.6083941", "0.6078994", "0.60358447", "0.60358447", "0.5811434", "0.5804559", "0.57967466", "0.5623009", "0.5602588", "0.55926335", "0.5588669", "0.5582542"...
0.0
-1
Function that boot straps the entire system
function bootStrapSystem() { return new Promise(async (resolve, reject) => { try { setNetworkAndInstances() await getEOAccounts() await baseLogic.systemWideSettings() await baseLogic.openDBConnection() await baseLogic.createSQLiteTables() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function boot() {\n var locale = getBootLocale();\n var region = getBootRegion(locale);\n invalidateBootstapCache();\n if (!Util.isOnline()) {\n Log.warn(\"No network connection detected.\");\n return bootHardcoded();\n }\n var urls = getBootSequence(region);\n return runBootSequence(urls);\n}", "bo...
[ "0.7349205", "0.7322568", "0.7165578", "0.6954575", "0.6452886", "0.6366878", "0.63593507", "0.6354879", "0.6341386", "0.62893283", "0.62125254", "0.6160932", "0.6142808", "0.61214614", "0.5987813", "0.5971665", "0.5969757", "0.595506", "0.59409064", "0.5929639", "0.58913445"...
0.69745696
3
Function that gets the Ethereum accounts
function getEOAccounts() { return new Promise(async (resolve, reject) => { try { resolve( await baseLogic.getAllEthAccounts() ) } catch (error) { console.log('error in getEOAccounts: ', error) reject({ status: 'failure',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAccounts() {\n this.props.web3Client.eth.getAccounts((err, result) => {\n console.log(result);\n });\n }", "accounts () {\n var p = this.withLedgerFile(this.cli).exec(['accounts'])\n return p.then(pro => {\n return pro.invoke('toString', []).split().compact()\n })\n }", "loadAccou...
[ "0.76789254", "0.74857944", "0.7312282", "0.71393293", "0.70885825", "0.70847106", "0.70416427", "0.7001034", "0.69608647", "0.6955412", "0.6922919", "0.69003505", "0.6892858", "0.6851675", "0.68131363", "0.6790633", "0.6789067", "0.6778003", "0.6753163", "0.67524487", "0.674...
0.73643374
2
Function that gets the deployed contract addresses
function getContractAddresses() { return baseLogic.getContractAddresses() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getContractAddresses(){\n return JSON.parse(fs.readFileSync('tmp/addresses.txt', 'utf8', function (err, data) {\n if (err){\n throw err;\n }\n return data\n }));\n}", "async function getAddresses() {\n\n // Get ip address.\n const addresses = [ipAddressUtil.getLanI...
[ "0.68125457", "0.680921", "0.6786282", "0.66322684", "0.6596892", "0.6489865", "0.6482861", "0.6467263", "0.6467263", "0.64232635", "0.6310468", "0.6113248", "0.6075328", "0.60554844", "0.5972081", "0.59316075", "0.59101516", "0.5687772", "0.5687741", "0.5668999", "0.5631674"...
0.81738776
0
Function that gets the amount that can be deposited into the Escrow
function amountThatCanBeDepositedInEscrow() { return new Promise (async (resolve, reject) => { try { resolve(await baseLogic.getFixedDepositAmount()) } catch (error) { console.log('error in amountThatCanBeDepositedInEscrow : ', error) reject({ stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDeposit() {\n return askMoney;\n }", "moneyInSafe() {\n let money = this.bank.money;\n money += this.moneyOfPlayers;\n money += this.moneyInCustoms;\n return money;\n }", "get saldo() {\n\t\treturn this.ingreso - this.deuda\n\t}", "static get TRANSFER_TEST_A...
[ "0.7541849", "0.70846254", "0.7011428", "0.68995166", "0.6818396", "0.6719488", "0.66631556", "0.66361797", "0.6614746", "0.6576676", "0.65756947", "0.6567582", "0.65571487", "0.6513783", "0.648163", "0.6460799", "0.64604574", "0.6459548", "0.6452465", "0.64243174", "0.638474...
0.7099462
1
Function that invokes deposits in Escrow
function depositTokensInEscrow(depositors, initialTransfer, eachDepositorsDeposit) { return new Promise (async (resolve, reject) => { try { //Note: eachDepositorsDeposit < initialTransfer await baseLogic.depositInEscrowPreRequisites(depositors, initialTransfer) resolve(aw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unsee() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", "function deactivate() {}", ...
[ "0.6394434", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.627932", "0.6279...
0.0
-1
Function that gets the Borrower Contract from BorrowerRegistry by calculating it's hash from it's JSON stored in DB
function getBorrowerFromBorrowerRegistry(params) { return new Promise(async (resolve, reject) => { try { let userDetails = (await baseLogic.getUserDetailsFromDB(params)).data[0].UserDetails console.log('userDetails: ', userDetails) let hash = baseLogic.getSHA3({jsonSchema...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBorrowerContractFromBorrowerRegistry(hash) {\n return new Promise(async(resolve, reject) => {\n try {\n let borrower = await borrowerRegistryInstance.getBorrowerContractFromRegistry.call(hash)\n console.log('Borrower in borrower registry: ', borrower)\n resolv...
[ "0.7339055", "0.60236514", "0.58248836", "0.5794925", "0.57290643", "0.5670209", "0.5669065", "0.56689554", "0.5645967", "0.56425154", "0.5627724", "0.5584999", "0.5564705", "0.5561024", "0.55400574", "0.55357707", "0.55352795", "0.55300564", "0.552737", "0.5519319", "0.55051...
0.70263225
1
Function that sets the Borrower contract address in the Borrower Registry
function setBorrowerInBorrowerRegistry(params) { return new Promise (async (resolve, reject) => { try { //Make an entry in the borrowerRegistry for the new Borrower resolve(await baseLogic.setBorrowerContractAddrInBorrowerRegistry(params)) //params should contain debtor and userDetai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setAuctionHouseAddress(address) {\n hideSpinnerNextTo(\"#auctionHouseContractAddressDeployBtn\");\n\n $(\"#auctionHouseContractAddress\").text(address);\n }", "SET_MANAGER(state, address) {\n state.contract.manager = address\n }", "function setupContract(address) {\n if(!abis) {\n ...
[ "0.6333082", "0.5946002", "0.58885914", "0.5885433", "0.58658683", "0.5858852", "0.5816564", "0.5760797", "0.57086724", "0.5672452", "0.56708133", "0.56534487", "0.5651809", "0.5497876", "0.5463083", "0.54504067", "0.54465836", "0.5424661", "0.54234403", "0.5414376", "0.54087...
0.6481072
0
Function that deploys the Borrower contract
function deployBorrower(networkName='ganache') { return new Promise(async (resolve, reject) => { try { let accounts = (await getEOAccounts()).data[0] let borrowerAddress //Unlock account await baseLogic.unlockAccount(accounts.acc1) if (networkName ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function main() {\n const contractName = \"UniLion\";\n const [ deployer ] = await hre.ethers.getSigners();\n const network = await hre.ethers.provider.getNetwork() // needs to be this router address for testnet in order for swapbnb to work\n const routerAddress =...
[ "0.73296946", "0.6830035", "0.6787738", "0.67442656", "0.67152184", "0.6697645", "0.6660446", "0.6544599", "0.6541632", "0.6501438", "0.6470869", "0.6460565", "0.64115936", "0.6401179", "0.6389384", "0.63829255", "0.6363175", "0.63257354", "0.63245916", "0.62740946", "0.62734...
0.6137868
24
Function that gets the repayment details
function getDebtRepaymentDetails(params) { return new Promise(async (resolve, reject) => { let response = { myDebtAgreements: '', termEndTimestamp: '', expectedRepaymentValue: '' } let termEndTimestampArr = [], expectedRepaymentValueArr = [] try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retreive_tx_payment() {}", "getPaymentDetails() {\n if (this.globals.getIsLoggedIn()) {\n // const requestConfig = {};\n // requestConfig.headers = this.globals.getHeaders();\n // requestConfig.url = this.globals.getRestUrl('paymentDetails', 'user');\n // requestConfig.m...
[ "0.6988105", "0.6907205", "0.6403736", "0.6177865", "0.59581137", "0.58894116", "0.5877638", "0.5823462", "0.5778001", "0.57617587", "0.5759151", "0.5755094", "0.57125014", "0.57014525", "0.56530505", "0.56514955", "0.56487876", "0.5646488", "0.56261706", "0.5591211", "0.5590...
0.6356109
3
Function that starts the repayment for a debt agreement
function startRepayment(debtor, debtAgreement, repaymentValue, tokenContractAddress) { return new Promise(async (resolve, reject) => { try { await baseLogic.repaymentOfDebtPreRequisites(debtor, repaymentValue) resolve(baseLogic.repaymentOfDebt(debtAgreement, repaymentValue, tokenCont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestApproval() {\n tokenInst.approve(\n addrHOLD,\n truePlanCost,\n { gasPrice: web3.toWei('50', 'gwei') },\n function (error, result) {\n\n if (!error && result) {\n var data;\n console.log('approval sent to network.');\n ...
[ "0.6002376", "0.58844966", "0.5815099", "0.5721617", "0.5664184", "0.5628454", "0.55801964", "0.5519443", "0.5490222", "0.5489857", "0.5475279", "0.54738766", "0.5453396", "0.5435322", "0.5434529", "0.5389656", "0.5364139", "0.5355211", "0.53450936", "0.53260374", "0.53231573...
0.7140187
0
Function to withdraw tokens from the Escrow
function withdrawTokens(depositors, principalAmount) { return new Promise(async (resolve, reject) => { try { resolve(await baseLogic.withdrawFromEscrow(depositors, principalAmount)) } catch (error) { console.log('error in withdrawTokens: ', error) reject({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "advance() {\n this.currentToken = ''; // reset\n const input = this.input;\n\n const isWhitespaceChar = c => {\n return /\\s/.test(c);\n };\n\n const skipWhitespaces = () => {\n while (this.pos < this.length && isWhitespaceChar(input[this.pos])) {\n this.pos++;\n }\n };\n\n ...
[ "0.5552448", "0.5536694", "0.5529724", "0.54567313", "0.5329022", "0.5279268", "0.5266255", "0.5230329", "0.5213369", "0.51859254", "0.5173177", "0.5138554", "0.5136658", "0.5116963", "0.50860065", "0.50640416", "0.5056514", "0.5056273", "0.49894089", "0.4981977", "0.49754214...
0.5358151
4
Function that gets the scaling factors
function getScalingFactors(creditor) { return new Promise(async (resolve, reject) => { try { resolve(await baseLogic.getScalingFactors(creditor)) } catch(error) { console.log('error in getScalingFactors driver: ', error) reject({ status: 'failure',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getScaleFactor() { return Math.pow(2, Globals.scale * -1); }", "get scaleFactor() {}", "function scaleFactor () {\n var img = document.getElementById(\"preview\");\n // console.log(\"Height\",img.naturalHeight);\n return img.naturalWidth/img.clientWidth;\n }", "function scale...
[ "0.7796483", "0.7728735", "0.7156311", "0.6977067", "0.6881816", "0.6784818", "0.6763628", "0.6763628", "0.6722638", "0.6708376", "0.6647774", "0.6647774", "0.6646134", "0.6635215", "0.6540266", "0.6540266", "0.6535114", "0.6535114", "0.6535114", "0.6535114", "0.6535114", "...
0.0
-1
Function that gets the collateral details
function getCollateralDetails(debtAgreementId) { return new Promise(async (resolve, reject) => { try { resolve(await baseLogic.fetchCollateralDetails(debtAgreementId)) } catch(error) { console.log('error in getScalingFactors driver: ', error) reject({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDetails() {\n\n}", "function getCollaboratorsInfo(){\n\tvar collaborators = getCollaboratorsByProject();\n\tvar collaboratorsInfo = new Array();\n\t$.each(collaborators, function() {\t\n\t\tcollaboratorsInfo.push(getCollaboratorInfo(this));\n\t});\n\treturn collaboratorsInfo;\n}", "function fetchDe...
[ "0.5907699", "0.58041805", "0.5714154", "0.56151915", "0.55990374", "0.55855423", "0.5532278", "0.55258644", "0.5497195", "0.54829204", "0.54295546", "0.54151356", "0.5375145", "0.53411645", "0.5266954", "0.5264746", "0.52539307", "0.5207488", "0.519636", "0.51872975", "0.518...
0.58206964
1
Function that gets the deposited tokens when the collateral is seized
function getDepositedTokensWhenCollateralSeized() { return new Promise(async (resolve, reject) => { try { resolve(await baseLogic.getDepositedTokensForSeizeCollateral()) } catch(error) { console.log('error in getDepositedTokensWhenCollateralSeized driver: ', error) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDepositedTokensForSeizeCollateral() {\n return new Promise(async (resolve, reject) => {\n try{\n let balance\n balance = await erc20TokenInstance.balanceOf.call(escrowInstance.address, {from: karmaMainAccount})\n // async.eachSeries(depositors, async(depositor...
[ "0.67942226", "0.60751194", "0.59996295", "0.5990781", "0.59481925", "0.5908407", "0.58473086", "0.5814432", "0.5764478", "0.57362944", "0.57359815", "0.5709778", "0.5702185", "0.56659544", "0.5625533", "0.5595096", "0.5547406", "0.5531221", "0.5474453", "0.5447837", "0.54358...
0.70204467
0
Note params should have the depositors array as one of the keys in the JSON object Function that gets the remaining tokens from the Escrow
function getRemainingTokensFromEscrow(params) { return new Promise(async (resolve, reject) => { try { resolve(await baseLogic.getDepositedTokensFromEscrow(params)) } catch(error) { console.log('error in getRemainingTokensFromEscrow driver: ', error) reject({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Params() {\n if (currentToken() == \"(\") {\n nextToken();\n ArgList();\n if (currentToken() == \")\") {\n nextToken();\n return;\n } else {\n let errorMessage = \"Não foi encontrado o fechamento da lista de parâmetros da função\";\n handleError(errorMess...
[ "0.5201805", "0.5076858", "0.50737816", "0.50340706", "0.4965649", "0.4938629", "0.49068016", "0.48463157", "0.48303476", "0.48146066", "0.4778422", "0.47715437", "0.47549042", "0.47492194", "0.4731822", "0.47237587", "0.4708759", "0.47086227", "0.47078177", "0.47078174", "0....
0.45730522
49
Function that gets the Debtor's debt agreements
function getMyDebtAgreements(debtor, creditor) { return new Promise(async (resolve, reject) => { try { resolve( await baseLogic.getDebtAgreements(debtor, creditor) ) } catch (error) { console.log('error in getMyDebtAgreements: ', error) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDebtValueRepaidToDateFor(debtAgreement) {\n return new Promise(async (resolve, reject) => {\n try {\n resolve(\n await baseLogic.getDebtValueRepaidToDate(debtAgreement)\n )\n } catch (error) {\n console.log('error in getMyDebtAgreements: ...
[ "0.59227735", "0.5655436", "0.56064624", "0.5599318", "0.55909365", "0.55240464", "0.55021924", "0.5477147", "0.5378363", "0.5369919", "0.5308298", "0.5292386", "0.5280565", "0.5275383", "0.5245661", "0.5236645", "0.5171826", "0.5167819", "0.5161441", "0.51540536", "0.5096473...
0.67306954
0
Function that gets the debt agreement end timestamp
function getDebtEndTimestamp(debtAgreement) { return new Promise(async (resolve, reject) => { try { resolve( await baseLogic.getDebtAgreementTermEndTimestamp(debtAgreement) ) } catch (error) { console.log('error in getMyDebtAgreements: ', error) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDebtStartTimestamp(debtAgreement) {\n return new Promise(async (resolve, reject) => {\n try {\n resolve (\n await baseLogic.getDebtAgreementTermStartTimestamp(debtAgreement)\n )\n } catch (error) {\n console.log('error in getMyDebtAgreeme...
[ "0.6316997", "0.5852655", "0.5838219", "0.56763554", "0.5491811", "0.54562515", "0.54310375", "0.54239386", "0.53819287", "0.53482014", "0.5299512", "0.5286178", "0.5276892", "0.52656525", "0.52641594", "0.52385324", "0.52325356", "0.5223801", "0.5205443", "0.5193827", "0.519...
0.7873052
0
Function that gets the debt agreement start timestamp
function getDebtStartTimestamp(debtAgreement) { return new Promise(async (resolve, reject) => { try { resolve ( await baseLogic.getDebtAgreementTermStartTimestamp(debtAgreement) ) } catch (error) { console.log('error in getMyDebtAgreements: ', erro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDebtEndTimestamp(debtAgreement) {\n return new Promise(async (resolve, reject) => {\n try {\n resolve(\n await baseLogic.getDebtAgreementTermEndTimestamp(debtAgreement)\n )\n } catch (error) {\n console.log('error in getMyDebtAgreements: ...
[ "0.63297653", "0.6102052", "0.5952916", "0.5701102", "0.5689705", "0.5657608", "0.56364614", "0.55728805", "0.55715626", "0.54666394", "0.54602534", "0.5426953", "0.5409781", "0.5402799", "0.539378", "0.5393333", "0.5374693", "0.5373871", "0.53468984", "0.5342615", "0.5342615...
0.79378986
0
Function that gets the value repaid to date
function getDebtValueRepaidToDateFor(debtAgreement) { return new Promise(async (resolve, reject) => { try { resolve( await baseLogic.getDebtValueRepaidToDate(debtAgreement) ) } catch (error) { console.log('error in getMyDebtAgreements: ', error) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getValue(baseDate=new StemDate()) {\n let newDate = new StemDate(baseDate);\n newDate.setHours(0, 0, 0, this.node.valueAsNumber);\n return newDate;\n }", "get valueDate () {\r\n\t\treturn this.__valueDate;\r\n\t}", "function pDateValue(gdate) {\r\n //debugger;\r\n var jsDate = get...
[ "0.69132173", "0.67625463", "0.6430876", "0.64098746", "0.64098746", "0.64098746", "0.64098746", "0.64098746", "0.63700354", "0.63680905", "0.6320516", "0.6309667", "0.6257905", "0.6172347", "0.61083275", "0.6107841", "0.60817224", "0.60683084", "0.6064416", "0.60336256", "0....
0.0
-1
Function that gets the expected repayment value
function getDebtExpectedRepaymentValueFor(debtAgreement, timestamp) { return new Promise(async (resolve, reject) => { try { resolve( await baseLogic.getExpectedDebtRepaymentValue(debtAgreement, timestamp) ) } catch (error) { console.log('error in g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "payment(P, Y, R) {\n var n = 12 * Y;\n var r = R / (12 * 100);\n var payment = (P * r) / (1 - (1 + r) ^ (-n));\n console.log(\"Monthly Payment is:\" + payment);\n\n\n\n\n }", "static get TRANSFER_TEST_AMOUNT ()\n {\n return this.INITIAL_SUPPLY.div(new BN('2'));\n }", ...
[ "0.64579993", "0.6310951", "0.6172919", "0.6151418", "0.61429703", "0.6126584", "0.6103933", "0.6071528", "0.6035077", "0.6005801", "0.5996771", "0.5969565", "0.5884875", "0.5876673", "0.5859245", "0.5847444", "0.5834207", "0.58330363", "0.5826357", "0.5809968", "0.5789493", ...
0.60692376
8
Function that gets the EMI details
function getEMIsFor(debtAgreement, numberOfDays = 30, debtor) { return new Promise(async (resolve, reject) => { try { resolve( await baseLogic.getEmiDetails(debtAgreement, numberOfDays, debtor) ) } catch (error) { console.log('error in getMyDebtAgr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getECUInfo() {\n return __awaiter(this, void 0, void 0, function* () {\n var resp = yield Utils.OSExecute(`apx-ecu configure`);\n var resp2 = yield Redis_1.SystemRedisClient.hgetall(`ecumonitor_current_state`);\n return {\n primary_can: resp.PRIMARY_CAN,\n sec...
[ "0.62369233", "0.62117255", "0.6118188", "0.58899903", "0.58263856", "0.57654315", "0.57430995", "0.5607919", "0.5539959", "0.54629564", "0.54344326", "0.5354004", "0.5326746", "0.5311108", "0.53032774", "0.53032774", "0.53032774", "0.5299551", "0.5289852", "0.5279201", "0.52...
0.48560613
87
Function that shuts down the entire system
function shutdownSystem(params) { return new Promise(async (resolve, reject) => { try { await baseLogic.printLenderLedger(params) await baseLogic.printBorrowerLedger(params) await baseLogic.printDepositorsLedger(params) resolve(await baseLogic.closeDBConnectio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shutdown() {\n process.exit(0);\n }", "function graceful_shutdown(){\n process.exit();\n}", "function shutdown() {\n logger.log('Shutting down Jankbot...');\n friends.save();\n for (let i = 0; i < modules.length; i += 1) {\n if (typeof modules[i].onExit === 'function') {\n modules[i].onEx...
[ "0.6744038", "0.6682714", "0.66689783", "0.6633834", "0.6629348", "0.6583131", "0.6572651", "0.6552195", "0.65507936", "0.6410128", "0.64002097", "0.63702047", "0.63688636", "0.6361815", "0.6315802", "0.63148344", "0.63146055", "0.6307104", "0.62872124", "0.6276946", "0.62481...
0.60272163
39
Adding Method to Position Shape Randomly in container
build() { this.newShape.style.position = "absolute"; // The random positioner has to be redeclared for every position // to get a fresh number each time randPos = Math.floor(Math.random() * 500 + 1); this.newShape.style.top = `${randPos}px`; randPos = Math.floor(Math.random() * 500 + 1); thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomizeCardPosition(shape) {\r\n function randomCardX() {\r\n let randomX = Math.floor(Math.random() * innerWidth);\r\n if (randomX < (innerWidth - 200) && randomX > 200){\r\n shape.style.left = randomX + \"px\";\r\n }else {\r\n randomCardX();\r\n }\r...
[ "0.71134526", "0.68706894", "0.68269515", "0.6589449", "0.65860635", "0.65263015", "0.65234804", "0.6456237", "0.6432274", "0.6423562", "0.638733", "0.6329052", "0.63268346", "0.6305408", "0.6274989", "0.62614757", "0.625828", "0.62537235", "0.6232458", "0.6232458", "0.622723...
0.711114
1
import question from '../../assets/icons/question.svg';
function Icon({ name, ...props }) { return ( <span/> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "icons () {\n return require('@packages/icons')\n }", "function QuestionIcon(){\n return <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" data-supported-dps=\"16x16\" fill=\"currentColor\" class=\"mercado-match\" width=\"16\" height=\"16\" focusable=\"false\">\n <path d=\"M8 1a7 7 0 107 7 7...
[ "0.71750194", "0.68485683", "0.61711735", "0.58763707", "0.58594525", "0.5734665", "0.5724382", "0.56913906", "0.56913906", "0.5690963", "0.5689453", "0.56875604", "0.5685012", "0.5683708", "0.5643971", "0.5546237", "0.5539937", "0.5536781", "0.5533049", "0.5495367", "0.54868...
0.0
-1
EVENT LISTENERS listens on the submission to add an item
function addItem(){ $('#js-shopping-list-form').submit(function(event){ event.preventDefault(); console.log('im listening'); const newItemName = $('.js-shopping-list-entry').val(); console.log(newItemName); $('.js-shopping-list-entry').val(' '); addItemToShoppingList(newItemName) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleNewItemSubmit() {\r\n $('main').on('submit','#new-bookmark-form', event => {\r\n console.log(\"new item submit is listening\");\r\n event.preventDefault();\r\n let data = serializeJson(event.target)\r\n console.log(data)\r\n api.createBookmark(data)\r\n .then((newItem) => {\r\n ...
[ "0.7253232", "0.6895122", "0.674056", "0.6623487", "0.66131526", "0.65943736", "0.64841276", "0.6454535", "0.6452563", "0.6431847", "0.64317566", "0.64057577", "0.63925904", "0.6388536", "0.638534", "0.6298116", "0.62980974", "0.6295788", "0.6282838", "0.62735367", "0.625937"...
0.653122
6
NAME (anything in paranthesis) of the function what we use when calling it
function printName(yourName){ console.log(yourName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function name() {}", "function NamedFunction() {\n\treturn \"I was called\";\n}", "function getName(){\n console.log('THIS IS MY FUNCTION');\n}", "function my_function(name) {\n return \"Hello \" + name;\n}", "function myFunc(name) {\n return 'Hello' + name;\n}", "function funcName(func) {\n ...
[ "0.8101257", "0.7498852", "0.7429935", "0.73077583", "0.7231234", "0.722865", "0.7228446", "0.721537", "0.7212595", "0.7204413", "0.72016287", "0.71531284", "0.7132943", "0.71327645", "0.7117444", "0.71096855", "0.7027585", "0.70140576", "0.70133704", "0.69751656", "0.6973806...
0.64180344
84
will only print ONE variable the first one
function checkNameLength(potato, tomato){ // if(potato.length > tomato.length){ // console.log(true); // } else { // console.log(false); // } console.log(potato.length > tomato.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printName() {\nconsole.log(vardas, pavarde, klase);\n }", "print(){\n\t return `eta = ${this._eta}\ntau_SFE = ${this._tau_SFE}`;\n\t}", "print() {\n console.log(`${this.movieName}, ${this.rating}, ${this.yearRelased}`);\n }", "function printVardasPavarde() {\n var vardas1 = \"Jonas\";\...
[ "0.6286164", "0.60905766", "0.60205317", "0.59757465", "0.5932075", "0.59176815", "0.59097666", "0.5881552", "0.58624285", "0.5850504", "0.58401823", "0.58398217", "0.5835558", "0.5829989", "0.5827781", "0.5825071", "0.58019435", "0.5793174", "0.57736737", "0.57587856", "0.57...
0.0
-1
function that takes in two numbers and logs if first number is multiple of second number
function anyNumber(firstNum, secondNum){ // if(firstNum % secondNum === 0){ // console.log(true); // } else { // console.log(false); // } console.log(firstNum % secondNum == 0); // can also write it like this }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isMultiple(num1,num2){\n if(num2/num1 === 1){\n return false;\n }\n else if(parseFloat(num2) % parseFloat(num1) == 0){\n return true;\n }\n else\n return false;\n\n}", "function isMultiple(number1, number2) {\r\n if (number1 % number2 === 0) {\r\n return tru...
[ "0.76536804", "0.7630677", "0.7550515", "0.7375766", "0.7236172", "0.7146409", "0.6935747", "0.6904144", "0.6870114", "0.6858714", "0.68578213", "0.68513954", "0.68345475", "0.6784684", "0.6745135", "0.67099035", "0.6704818", "0.6682823", "0.6652841", "0.66037476", "0.6599829...
0.72475755
4
return lets it be sent outside of the scope of the function
function returnCity() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dummyReturn(){\n}", "function returnArg() {\n\treturn arg;\n}", "function emptyReturn() {return;}", "function returnArg(arg) {\n return arg;\n}", "function doTheThing() {\n return \"yasssss\";\n}", "function a(){\n return param\n}", "function functionName(a){\nconsole.log(a);\nreturn(a)...
[ "0.6679529", "0.65053827", "0.6244927", "0.6068982", "0.60431516", "0.60323405", "0.60277194", "0.60174143", "0.60005987", "0.594201", "0.594201", "0.5937959", "0.5911078", "0.5902177", "0.580111", "0.57603055", "0.57386696", "0.57337976", "0.5731832", "0.56858736", "0.568035...
0.0
-1
return keyword 2 5
function calculator(num1, num2) { console.log(num1 + num2); return num1 + num2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get keyword () {\n\t\treturn this._keyword;\n\t}", "parseKeyword () {\n if (this.char === CHAR_QUOT) {\n return this.next(this.parseBasicString)\n } else if (this.char === CHAR_APOS) {\n return this.next(this.parseLiteralString)\n } else {\n return this.goto(this.parseBareKey)...
[ "0.6300478", "0.6139293", "0.6126479", "0.6125888", "0.61211354", "0.61052763", "0.6017064", "0.59606254", "0.58336586", "0.5816054", "0.5802723", "0.5787725", "0.57856977", "0.57519794", "0.57280886", "0.5716695", "0.569416", "0.5677281", "0.5662911", "0.56515944", "0.560464...
0.0
-1
Add to the DynamoDB table
function addToRekognitionTable(labelData, faceDetails, textDetails, witData) { let params = { TableName: TABLE_NAME, Item: { timestamp: new Date().getTime(), filename: key.split(".")[0], faceDetails: faceDetails, labels: labelData, texts: textDetails, witData: witData ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToDynamoDB(params) {\n ddb.putItem(params, function (err, data) {\n if (err)\n console.log(err, err.stack); // an error occurred\n else\n console.log(data); // successful response\n });\n return params.Item.id;\n}", "async function writeToDB(event) {\n co...
[ "0.6914267", "0.64750737", "0.64738655", "0.63704467", "0.63530356", "0.62973446", "0.6294299", "0.6293429", "0.6223854", "0.61881673", "0.60311854", "0.5991991", "0.5982995", "0.59216684", "0.59124744", "0.5845943", "0.58320767", "0.5828065", "0.58121574", "0.5802959", "0.57...
0.6498325
1
Who is that person?
function rekognizeFace(bucket, key) { let params = { Attributes: ["ALL"], Image: { S3Object: { Bucket: bucket, Name: key } } }; return rekognition.detectFaces(params).promise() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function greet(person) {\n\tconsole.log(person.firstname + \"'s phone numbers are, Home: \" + person.address.phones.home + \" and number is, Cell: \" + person.address.phones.cell);\n}", "function greeter(person) {\n return \"Hi \" + person.firstName + \" \" + person.lastName;\n}", "function sayName(person) ...
[ "0.6629145", "0.65774953", "0.6576", "0.6567043", "0.6549315", "0.63792634", "0.63704675", "0.63624614", "0.63129693", "0.62625223", "0.62559706", "0.62521017", "0.6220415", "0.6193096", "0.6165345", "0.615498", "0.61434853", "0.61294585", "0.6118475", "0.6117244", "0.6092009...
0.0
-1
What is that? You might want to change the MaxLabels and MinConfidence to suit your needs.
function rekognizeLabels(bucket, key) { let params = { Image: { S3Object: { Bucket: bucket, Name: key } }, MaxLabels: 3, MinConfidence: 80 }; return rekognition.detectLabels(params).promise() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLabel(results) {\n const entries = Object.entries(results.confidencesByLabel);\n let greatestConfidence = entries[0];\n for(let i = 0; i < entries.length; i++) {\n if(entries[i][1] > greatestConfidence[1]) {\n greatestConfidence = entries[i];\n }\n }\n return greatestConfidence[0];\n}",...
[ "0.644567", "0.58378017", "0.5772928", "0.56272525", "0.56240577", "0.5539307", "0.54616344", "0.53965306", "0.5396186", "0.5357225", "0.5324017", "0.5298224", "0.52956367", "0.52919894", "0.52790064", "0.5179968", "0.5170037", "0.5142613", "0.51254684", "0.51198006", "0.5103...
0.0
-1
Does that say something, in text form, not in some sort of artistic sense?
function rekognizeText(bucket, key) { let params = { Image: { S3Object: { Bucket: bucket, Name: key } }, }; return rekognition.detectText(params).promise() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function identity(text){\n\treturn(text)\n}", "function TextData() {}", "function TextData() {}", "function TextData() {}", "function ______TEXT_QUERIES______() {}", "function n(a){return!!a&&\"undefined\"!=typeof a.text}", "function TextData() { }", "function TextData() { }", "function t(text) { r...
[ "0.59154564", "0.5736722", "0.5736722", "0.5736722", "0.568998", "0.56133753", "0.55909824", "0.55909824", "0.55173576", "0.54681414", "0.546808", "0.546808", "0.5452704", "0.5452704", "0.5445457", "0.5445457", "0.54062295", "0.53981334", "0.5383893", "0.5343638", "0.5342772"...
0.0
-1
Pass in a path of a directory to walk and a regex to match against. The file(s) matching the patter will be deleted.
function walkAndUnlink(dirPath, regex){ var emitter = walkdir(dirPath) emitter.on('file',function(filename,stat){ if( regex.test(filename) ){ console.log("Removing old file: " + filename) fs.unlinkSync( path.resolve( dirPath, filename) ) } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function walkAndUnlink(dirPath, regex){\n \n var emitter = walkdir(dirPath)\n\n emitter.on('file',function(filename,stat){\n if( regex.test(filename) ){\n console.log(\"Removing old file: \" + filename)\n fs.unlinkSync( path.resolve( dirPath, filename) )\n }\n })\n \n}", "clean(directory) {\...
[ "0.7272211", "0.6001293", "0.5978723", "0.5903616", "0.5733747", "0.57114774", "0.54121906", "0.5344973", "0.5327805", "0.5246603", "0.5242625", "0.52332646", "0.5215657", "0.51865804", "0.5132275", "0.51213133", "0.5118639", "0.51135796", "0.51105434", "0.5101778", "0.509873...
0.71836644
1
Removes old css/js files.
function cleaner(){ walkAndUnlink( path.join(__dirname, 'public', 'css'), new RegExp(/style-/) ) walkAndUnlink( path.join(__dirname, 'public', 'js'), new RegExp(/kloutskout-/) ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteOldJS() {\n fs.readdir(\"./_dist/js\", (e, f) => {\n if (e) throw e;\n for (const file of f) {\n fs.unlinkSync(path.join(\"./_dist/js\", file), (e) => {\n if (e) throw e;\n });\n console.log(\"Deleted Old JS\");\n }\n });\n}", "function cleanCss(cb) {\n del(['cs...
[ "0.76657254", "0.73309594", "0.71465194", "0.6972708", "0.6898062", "0.67770636", "0.6772553", "0.6719408", "0.6699883", "0.65018797", "0.6490045", "0.6472939", "0.6443296", "0.6358161", "0.6343881", "0.63055956", "0.6294319", "0.6269186", "0.6264215", "0.62494916", "0.618882...
0.6462198
12
Concats, minifies js and css for production
function smoosher(){ var version = require('./package.json').version // Smoosh the things smoosh.make({ "VERSION": version, "JSHINT_OPTS": { "browser": true, "evil":true, "boss":true, "asi": true, "laxcomma": true, "expr": true, "lastsemic": true, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minifyJs() {\n\n return gulp.src('./src/assets/js/**/*.js', { matchBase: './src/assets/js/' })\n .pipe(ugly({compress: true}))\n .pipe(gulp.dest('./src/assets/css/'))\n .pipe(browserSynnc.stream());\n}", "function compileJs() {\n return merge(\n // config-theme.js\n src...
[ "0.7566166", "0.746542", "0.7174361", "0.71572", "0.7120669", "0.7118817", "0.6991772", "0.69653547", "0.6927223", "0.69263303", "0.6914528", "0.6895258", "0.6873063", "0.68564135", "0.6854644", "0.6854068", "0.68487185", "0.6819726", "0.6811226", "0.6787511", "0.6764259", ...
0.0
-1
because it's so fucking difficult to detect the scrolling element, just move them all
function move(amount) { document.documentElement.scrollTop = amount; document.body.parentNode.scrollTop = amount; document.body.scrollTop = amount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateScroll(event) {\n moveElements();\n}", "function _moved() {\n\t\t\t\t// move elements that are half in view\n\t\t\t\t_adjustContentPosition.call(this);\n\t\t\t\t// fire the change event if we should\n\t\t\t\t_fireChangeEvent.call(this);\n\t\t\t}", "function _positions (elements) {\n for (v...
[ "0.7447708", "0.6699228", "0.6695971", "0.66053337", "0.6605015", "0.65865225", "0.6581891", "0.65690166", "0.6546657", "0.6534173", "0.6487788", "0.646257", "0.6455658", "0.64278144", "0.642447", "0.64086616", "0.6401413", "0.63649297", "0.63416463", "0.6311391", "0.6282011"...
0.66061556
3
setting that scrolling functions
function scrollToElement(element) { if (menu.getAttribute("class", "opened")) { toggleMenu(); } element.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest", }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setScrolling()\n {\n scrolling = true;\n }", "function mkdOnWindowScroll() {\n \n }", "function edgtfOnWindowScroll() {\n \n }", "function ScrollPosition() {}", "function OCM_scrolling() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$offCanvasEl.mousewheel(function (event, delta) {...
[ "0.76540756", "0.7513431", "0.74385625", "0.73957855", "0.7389256", "0.7338164", "0.7338164", "0.7302924", "0.72892576", "0.7154299", "0.7091977", "0.70807916", "0.70807916", "0.70807916", "0.70807916", "0.70807916", "0.7078317", "0.7078317", "0.7078317", "0.7078317", "0.7078...
0.0
-1
setting the sliders function
function nextSlide() { if (i === sliders.length - 1) { i = 0; sliders[sliders.length - 1].classList.remove("active"); } else { i++; sliders[i - 1].classList.remove("active"); } sliders[i].classList.add("active"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addSliders() {\n this.sliders = this.config.map(function createSlider(obj) {\n var slider = document.createElement('input'),\n valueElement = document.createElement('span');\n slider.type = 'range';\n slider.min = 0;\n slider...
[ "0.75819093", "0.7565659", "0.7247379", "0.693553", "0.6927295", "0.6889653", "0.68765974", "0.6809183", "0.6808157", "0.6792941", "0.6766303", "0.6753852", "0.67298627", "0.6728559", "0.6721065", "0.67199993", "0.67199993", "0.6690106", "0.66806364", "0.6666273", "0.66560644...
0.0
-1
checking if elements appear on the screen
function onReach(element) { let bounding = element.getBoundingClientRect(); if ( bounding.top >= 0 && bounding.left >= 0 && bounding.right <= (window.innerWidth || document.documentElement.clientWidth) && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkVisible()\n{\n\tcheckElementRunThough(\"slide-card\");\n\tcheckElementRunThough(\"cardSec\");\n}", "function checkPosition() {\n for (let i = 0; i < elements.length; i++) {\n // getBoundingClientRect returns the size of the element and its position relative to the viewport\n // ...
[ "0.7629218", "0.7525395", "0.7232478", "0.71476436", "0.712236", "0.7111136", "0.7087669", "0.7080175", "0.7067564", "0.7057415", "0.7043217", "0.70326734", "0.6914369", "0.68548685", "0.68465555", "0.6810133", "0.68014747", "0.68010837", "0.6779471", "0.67676693", "0.6743715...
0.655697
46