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
Reverse the order of variables. The index of each variable is reassigned.
reverseVariables() { this._vars.reverse(); for (let i = 0; i < this._vars.length; ++i) { this._vars[i].setIndex(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function swapValues(args) {\n return args.reverse()\n}", "function swapValues() {\n return arguments[0].reverse();\n}", "function reverseArrayInPlace2(arr){\n for(var i = 0; i < arr.length / 2; i++){\n var tempVar = arr[i];\n arr[i] = arr[arr.length - 1 - i];\n arr[arr.length - 1 - ...
[ "0.6599397", "0.6501698", "0.64879316", "0.62886304", "0.62665045", "0.62577105", "0.6230334", "0.62061083", "0.6173133", "0.6067953", "0.60217565", "0.5999072", "0.5988477", "0.5984346", "0.5956523", "0.59077287", "0.59049153", "0.5901027", "0.589915", "0.5869578", "0.586794...
0.8958765
0
Sorts variables using a specified comparator. The index of each variable is reassigned.
sortVariables(comparator) { this._vars.sort(comparator); for (let i = 0; i < this._vars.length; ++i) { this._vars[i].setIndex(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sortVariable() {\n this.setSortingRule('Variable');\n this.updateContent();\n }", "sort(comparator) {\n }", "function Sort() {}", "set sortingOrder(value) {}", "_resort() {\n // Ensure there's something to do.\n if (!this.orderComponents) return;\n\n // Define the comparator ...
[ "0.6502387", "0.6331893", "0.5915185", "0.5732662", "0.56987095", "0.5581344", "0.554017", "0.5513435", "0.54670686", "0.5456934", "0.5456528", "0.54453605", "0.54426146", "0.54426146", "0.5433986", "0.54326004", "0.54326004", "0.5428997", "0.54091096", "0.54027045", "0.53918...
0.8385208
0
Methods for Variables Returns the number of variables in the problem.
variableSize() { return this._vars.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countVars()\n\t{\n\t\tvar i = 0;\n\t\tfor (var prop in this)\n\t\t{\n\t\t\tif (prop !== \"count\")\n\t\t\t\ti++;\n\t\t}\n\n\t\treturn i;\n\t}", "emptyVariableSize() {\n\t\tlet num = 0;\n\t\tfor (const v of this._vars) {\n\t\t\tif (v.isEmpty()) num++;\n\t\t}\n\t\treturn num;\n\t}", "function numberVari...
[ "0.72741556", "0.7222241", "0.62417895", "0.61850804", "0.5951686", "0.594986", "0.5828664", "0.56623983", "0.5636969", "0.5591365", "0.55219465", "0.5498999", "0.547494", "0.53984463", "0.53969216", "0.53735214", "0.5371525", "0.533001", "0.5306437", "0.53004754", "0.5288492...
0.7756549
0
Returns a variable by index.
variableAt(index) { return this._vars[index]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getVarValue(index){\n return varList[index].value;\n}", "get(idx) {\n\n }", "get(index) {\n if (index < 0 || index >= this.length) {\n throw new Error(\"Index error\");\n }\n return memory.get(this.ptr + index);\n }", "function retr(input)\n{\n var index = names.indexOf(input);...
[ "0.7239352", "0.6581639", "0.6353569", "0.63057065", "0.6281784", "0.62661684", "0.62336826", "0.6229927", "0.6208439", "0.6174248", "0.61236846", "0.6123358", "0.60423774", "0.59402835", "0.59402835", "0.59402835", "0.5925244", "0.5863662", "0.5863662", "0.585121", "0.584933...
0.8187624
0
Returns a variable by name.
variableOf(name) { for (const v of this._vars) { if (v.name() === name) return v; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getvar(name) {\n\t\treturn window[name];\n\t}", "getVar(name) {\n return __awaiter(this, void 0, void 0, function* () {\n const args = this._getArgsByPrefix(name);\n return this.request(`${this.prefix}get_var`, args).then(res => res, err => {\n if (err && err....
[ "0.7970419", "0.72389674", "0.68727964", "0.67988706", "0.6665121", "0.6650037", "0.66435724", "0.6623034", "0.6601995", "0.6572594", "0.6572594", "0.6571606", "0.6437094", "0.6419692", "0.6414946", "0.6337239", "0.63331133", "0.62603074", "0.6180239", "0.6175297", "0.6091161...
0.8017014
0
Returns whether the variable is contained or not.
hasVariable(v) { return this._vars.includes(v); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exists(variable) {\n\treturn typeof(variable)!=\"undefined\";\n}", "function isVar(t) {\n\t\tfor (var i = 0; i < varTable.length; i++) {\n\t\t\tif (varTable[i].name == t)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function isVar(x) {\n\treturn x.props && x.props.has('is','variable')\n}", ...
[ "0.6934447", "0.66246873", "0.6574488", "0.6550966", "0.6344731", "0.6298917", "0.6267753", "0.6259221", "0.6243484", "0.6230153", "0.6225369", "0.6209988", "0.6117118", "0.5965563", "0.59532684", "0.5887144", "0.5884297", "0.58613896", "0.58589953", "0.5858548", "0.5858548",...
0.74287814
0
Returns the list of variables. The returned list is not allowed to be modified.
variables() { return this._vars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "declaredVariables() {\n var v;\n return ((function() {\n var i, len, ref, results;\n ref = this.variables;\n results = [];\n for (i = 0, len = ref.length; i < len; i++) {\n v = ref[i];\n if (v.type === 'var') {\n results.push(v.name);\n }\...
[ "0.75041026", "0.7363513", "0.7167442", "0.7109683", "0.70236975", "0.70157474", "0.66955703", "0.65445375", "0.65168816", "0.6513509", "0.6506547", "0.64358956", "0.643345", "0.6354953", "0.6353733", "0.61735624", "0.6164806", "0.6085126", "0.6048181", "0.60474986", "0.60352...
0.74822223
1
Methods for Constraints Gets the number of constraints in the problem.
constraintSize() { return this._cons.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get length() {\n return this._constraint.length;\n }", "constraintDensity() {\n\t\treturn this.constraintSize() / this.variableSize();\n\t}", "function getNumberOfConstrainsts(){\n header(\"we are now looking at the constraints\", \"We need to know the number of constraints you have modelled\");\...
[ "0.67795587", "0.6455554", "0.64467466", "0.6315717", "0.5765085", "0.57165307", "0.5501498", "0.5418643", "0.5310461", "0.53004634", "0.52395105", "0.52395105", "0.52395105", "0.5230856", "0.52299815", "0.52066904", "0.51930636", "0.5189747", "0.5172912", "0.5172912", "0.515...
0.6944725
0
Returns a constraint with an index.
constraintAt(index) { return this._cons[index]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "at(index) {\n return this.where.getAt(index);\n }", "get(idx) {\n\n }", "getCreateIndexQuery(model_name, index) {\n return null;\n }", "constraintOf(name) {\n\t\tfor (const c of this._cons) {\n\t\t\tif (c.name() === name) return c;\n\t\t}\n\t\treturn null;\n\t}", "function getIndex() {...
[ "0.54226726", "0.54155004", "0.53972316", "0.5354478", "0.5152991", "0.5109355", "0.5109355", "0.50997216", "0.5094626", "0.50481576", "0.4972826", "0.4955489", "0.49495175", "0.49392724", "0.4935859", "0.49021003", "0.48833218", "0.4879177", "0.48702875", "0.48619005", "0.48...
0.76460296
0
Returns a constraint by name.
constraintOf(name) { for (const c of this._cons) { if (c.name() === name) return c; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectConstraint(name) {\n if (name == POPULATION) {\n addConstraint(name, pop, 50);\n } else if (name == ELEVATION) {\n addConstraint(name, elevation, 100);\n } else if (name == SLOPE) {\n addConstraint(name, slope, 3);\n }\n constraint.setValue(null);\n}", "constraintAt(index) {\n\t\tret...
[ "0.6486356", "0.58156043", "0.5649615", "0.5356291", "0.53401464", "0.532007", "0.5263585", "0.5260776", "0.5234187", "0.5159625", "0.5095055", "0.5074912", "0.5051403", "0.50266415", "0.49799785", "0.4957722", "0.49348867", "0.4928724", "0.49133092", "0.48882082", "0.4847555...
0.8157388
0
Returns whether the constraint is contained or not.
hasConstraint(c) { return this._cons.includes(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get isConstrained() {\n return !!((this.fixed && this.layout) ||\n (this.controlNodes && this.controlNodes.length > 0) ||\n (this.hostedBy && this.hostedBy.isVisible) ||\n (this.internalIn && this.internalIn.isVisible));\n }", "get isConstrained() {\n return ((th...
[ "0.6373515", "0.63475466", "0.58911693", "0.5875547", "0.5726893", "0.57169026", "0.57074046", "0.5684239", "0.56828034", "0.5668099", "0.56563145", "0.560447", "0.5595539", "0.55459756", "0.55358016", "0.5506782", "0.5500473", "0.5492919", "0.54807204", "0.5470426", "0.54704...
0.6915324
0
Returns the list of constraint. The returned list is not allowed to be modified.
constraints() { return this._cons; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constraintsBetween(v1, v2) {\n\t\tconst cs = [];\n\t\tfor (const c of v1) {\n\t\t\tif (c.has(v2)) cs.push(c);\n\t\t}\n\t\treturn cs;\n\t}", "function dumpConstraints(self) {\n return dumpElements(self, self.__constraints__);\n }", "constraintsWithWorstSatisfactionDegree() {\n\t\tconst cs = [];\n\t\tlet c...
[ "0.6006923", "0.5962203", "0.5887233", "0.5855254", "0.5566256", "0.5473198", "0.5452307", "0.54490006", "0.5447599", "0.54295146", "0.5424866", "0.5379208", "0.5330478", "0.53304434", "0.53157705", "0.52305996", "0.5227214", "0.52053714", "0.51495206", "0.51316935", "0.51101...
0.6962044
0
Gets the constraints that exist between the specified variables. Returns an empty array if no constraints exist. If there are multiple constraints between two variables (including the case of nary constraints (2 < n)), they will be included in the return array.
constraintsBetween(v1, v2) { const cs = []; for (const c of v1) { if (c.has(v2)) cs.push(c); } return cs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#getConstraintsBetween(i, j) {\n\t\tif (i < j) {\n\t\t\treturn this.#relCons[j][i];\n\t\t}\n\t\treturn this.#relCons[i][j];\n\t}", "function enforceConstraintsForAnyFreeVariables() {\n while (numCidsLeft > 0 && freeVarQueue.length > 0) {\n var vid = freeVarQueue.pop();\n ...
[ "0.56515324", "0.5508495", "0.5411223", "0.5372135", "0.53569055", "0.5281623", "0.50398564", "0.5023911", "0.49971026", "0.48763314", "0.48167986", "0.48155707", "0.4801451", "0.47778913", "0.47724587", "0.47647342", "0.46774402", "0.46651673", "0.46536002", "0.4602568", "0....
0.616462
0
Finds the set of worst satisfiable constraints in a fuzzy constraint satisfaction problem.
constraintsWithWorstSatisfactionDegree() { const cs = []; let cur = 1; for (const c of this._cons) { const s = c.satisfactionDegree(); if (s < cur) { cur = s; cs.length = 0; cs.push(c); } else if (s - cur < Number.MIN_VALUE * 10) { cs.push(c); } } return [cs, cur]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "worstSatisfactionDegree() {\n\t\tlet cs = 1;\n\t\tfor (const c of this._cons) {\n\t\t\tconst s = c.satisfactionDegree();\n\t\t\tif (s === Constraint.UNDEFINED) return Constraint.UNDEFINED;\n\t\t\tif (s < cs) cs = s;\n\t\t}\n\t\treturn cs;\n\t}", "function getFirstResolvingConstraint(constraintsBestToWorst){\n ...
[ "0.6515605", "0.56646675", "0.5486355", "0.5384866", "0.5329325", "0.53224754", "0.53115183", "0.5243162", "0.5128559", "0.5109298", "0.5094239", "0.5081769", "0.50334096", "0.5032037", "0.49966523", "0.49966276", "0.49617574", "0.49531335", "0.4951505", "0.49035946", "0.4902...
0.69155693
0
State acquisition methods Returns the worst satisfaction degree for the constraints contained in the fuzzy constraint satisfaction problem. If the degree cannot be determined because the variable has not yet been assigned a value or for some other reason, 1 is returned.
worstSatisfactionDegree() { let cs = 1; for (const c of this._cons) { const s = c.satisfactionDegree(); if (s === Constraint.UNDEFINED) return Constraint.UNDEFINED; if (s < cs) cs = s; } return cs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "maxDegree() {\n\t\tlet d = 0;\n\t\tfor (let u = 1; u <= this.n; u++) d = Math.max(d, this.degree(u));\n\t\treturn d;\n\t}", "averageSatisfactionDegree() {\n\t\tlet ave = 0;\n\t\tfor (const c of this._cons) {\n\t\t\tave += c.satisfactionDegree();\n\t\t}\n\t\tave = ave / this._cons.length;\n\t\treturn ave;\n\t}", ...
[ "0.64117754", "0.60374534", "0.59368837", "0.52063733", "0.51987046", "0.5188183", "0.51823705", "0.5144971", "0.5117986", "0.5091024", "0.5089536", "0.50807345", "0.5075724", "0.5045123", "0.5012257", "0.4982904", "0.4977236", "0.49494097", "0.49401373", "0.49131677", "0.490...
0.77083856
0
Gets the average of satisfaction degrees of the fuzzy constraints.
averageSatisfactionDegree() { let ave = 0; for (const c of this._cons) { ave += c.satisfactionDegree(); } ave = ave / this._cons.length; return ave; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAverageRating() {\n let ratingsSum = this.ratings.reduce((currentSum, rating) => currentSum + rating, 0);\n const lengthOfArray = this._ratings.length;\n return ratingsSum/lengthOfArray;\n }", "getAverageFitness() {\n\t\t\tvar average = 0;\n\n\t\t\tfor(var i = 0; i < this.population.le...
[ "0.5785999", "0.5701694", "0.55920124", "0.55053556", "0.54993784", "0.54626036", "0.5461845", "0.5383493", "0.5242811", "0.5196445", "0.518065", "0.51732135", "0.51180726", "0.510409", "0.5093357", "0.5007332", "0.49980468", "0.49931642", "0.49874958", "0.49768922", "0.49752...
0.741353
0
Returns the number of variables in the problem that have not been assigned a value.
emptyVariableSize() { let num = 0; for (const v of this._vars) { if (v.isEmpty()) num++; } return num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countVars()\n\t{\n\t\tvar i = 0;\n\t\tfor (var prop in this)\n\t\t{\n\t\t\tif (prop !== \"count\")\n\t\t\t\ti++;\n\t\t}\n\n\t\treturn i;\n\t}", "variableSize() {\n\t\treturn this._vars.length;\n\t}", "function getNumberEmptyFields() {\n\tvar empty = 0;\n\tvar i, j;\n\n\tfor (i=0; i<9; i++) {\n\t\tfor ...
[ "0.7079386", "0.6907262", "0.6819874", "0.62376094", "0.60223216", "0.57034117", "0.55736756", "0.5544388", "0.5536834", "0.5527237", "0.5525954", "0.55116475", "0.5503472", "0.54841465", "0.5477676", "0.5424742", "0.5424742", "0.5387062", "0.5386115", "0.5371935", "0.5360685...
0.8226722
0
Gets the constraint density (number of constraints/number of variables).
constraintDensity() { return this.constraintSize() / this.variableSize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get dof() {\n let dof = 0;\n for (const node of this.nodes)\n dof += node.dof;\n for (const constraint of this.constraints)\n dof -= (2 - constraint.dof);\n return dof;\n }", "function density(x) {\n return kde.reduce((y, k) => y +...
[ "0.67424244", "0.6338684", "0.60258937", "0.5873701", "0.5873701", "0.5411237", "0.52765423", "0.5185747", "0.5163439", "0.51517135", "0.5132463", "0.5122321", "0.5092112", "0.50877374", "0.50877374", "0.50877374", "0.50877374", "0.50877374", "0.50877374", "0.50877374", "0.50...
0.8246071
0
Returns whether the constraint satisfaction problem has any variables with empty domain.
hasEmptyDomain() { for (const v of this._vars) { if (v.domain().size() === 0) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isEmpty() {\n return ( 0 === dataset.length );\n }", "function isEmpty(xs) { return Z.size (xs) === 0; }", "isZeroSet () {\n \n return (\n !this.isUniverse() &&\n this.toDisjunction().normalize().isZeroSet()\n );\n \n }", "fu...
[ "0.5976365", "0.59546924", "0.5936219", "0.5867627", "0.5836877", "0.58243304", "0.57736194", "0.57607293", "0.5750231", "0.5719744", "0.57189655", "0.5693355", "0.5659501", "0.5640438", "0.56393003", "0.563673", "0.5600386", "0.5577523", "0.55623055", "0.5550894", "0.5541537...
0.81239825
0
Returns whether the problem is a fuzzy constraint satisfaction problem, i.e., whether it contains fuzzy constraints.
isFuzzy() { return this._isFuzzy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isSolution() {\n\t\tfor (let cell of this.cells) {\n\t\t\tif (cell.possibilities.length !== 1) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}", "function fuzzySearch (text, query) {\n var hay = text.toLowerCase();\n var n = -1; // unclear what this does\n query = query.toLowerCase();\n ...
[ "0.50352895", "0.49092028", "0.48199147", "0.48087254", "0.45812702", "0.45677987", "0.4508091", "0.45015073", "0.4473455", "0.4472246", "0.44450405", "0.44321954", "0.44104412", "0.4404961", "0.43926835", "0.43895528", "0.43869194", "0.4381285", "0.43716532", "0.43686098", "...
0.68170714
0
return true, task finish; return false, task continue...
parseDone(data, flag) { //console.log("DracoTask::parseDone(), data.taskCmd: ", data.taskCmd); console.log("DracoTask::parseDone(), data: ", data); DracoSendData.RestoreByUid(data.dataIndex); switch (data.taskCmd) { case "DRACO_INIT": this.m_enabled = true; DracoTask.s_inited = tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processTask() {\n const task = tasks.shift();\n task();\n return tasks.length === 0;\n}", "function processTasksUntilComplete() {\n while (tasks.length) {\n processTask();\n }\n\n return true;\n}", "function step() {\n\n // if there's more to do\n if (!result.done) {\n ...
[ "0.73753273", "0.69178003", "0.67063296", "0.66319853", "0.6532824", "0.6439493", "0.63868254", "0.6339531", "0.6320024", "0.6250322", "0.616769", "0.61624163", "0.6143209", "0.6140918", "0.61252797", "0.61168265", "0.61088526", "0.61066926", "0.608429", "0.60709256", "0.6026...
0.6029775
20
private m_demoScene: DeomScene = new DeomScene();
constructor() { super(); this.m_initFlag = true; this.m_threadModule = null; this.m_threadModuleLoadFlag = true; this.m_dracoRawTask = null; this.m_dracoMeshBuilder = new DracoMeshRawBuilder_1.DracoMeshRawBuilder(); this.m_dracoLoaderListener = null; this.m_url = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Scene() {}", "constructor() {\n this._curScene = new _EmptyScene();\n }", "constructor() {\n this.scene = new THREE.Scene();\n }", "initializeScene(){}", "constructor()\n {\n // calling the super to inniciate this class as a scene\n super();\n }", "constructor(s...
[ "0.7628154", "0.7496223", "0.73032475", "0.70382255", "0.6949564", "0.69487536", "0.68759125", "0.6846882", "0.68115175", "0.67808944", "0.676273", "0.67610997", "0.66729105", "0.6620855", "0.6608762", "0.660395", "0.65978223", "0.6573064", "0.65598905", "0.6543568", "0.65364...
0.0
-1
================================================================= Service section accordian ===================================================================
function toggleChevron(e) { $(e.target) .prev('.accordion-toggle') .find("i.indicator") .toggleClass('fa-plus fa-minus'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleToggleSection() {\n let secObj = this.template.querySelector('[data-id=\"detail-section\"]');\n if (secObj.classList.contains('slds-is-open')) {\n secObj.classList.remove('slds-is-open');\n this.activeIcon = 'utility:chevronright';\n } else {\n secObj.cla...
[ "0.64618224", "0.640071", "0.6378064", "0.61824125", "0.60722953", "0.6038139", "0.60246426", "0.5973484", "0.59235585", "0.5885499", "0.5878939", "0.5809889", "0.58062834", "0.5759591", "0.57514", "0.5735615", "0.5731073", "0.5727395", "0.5709364", "0.5699018", "0.56809795",...
0.0
-1
takes the given parameters and creates a sequelize query object to return results based on those params
static build({ params: { include, exclude }, user }) { const { defaultTypes, operators } = this; const includeTagsOperator = include.tagsExclusive ? Op.and : Op.or; const includeParamsOperator = include.paramsExclusive ? Op.and : Op.or; const excludeTagsOperator = exclude.tagsExclusive ? Op.and : Op.or; const...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "query(params)\n {\n return this.doRequest({method: 'GET'}, null, params);\n }", "Query( parameters ) {\n\t\treturn new Promise( ( next, fail ) => {\n\n\t\t\tvar wv = this._QueryToWhereValues( parameters );\n\t\t\t\n\t\t\tvar join_str = '';\n\t\t\tif ( parameters.joins ) {\n\t\t\t\tfor ( var k in ...
[ "0.6287056", "0.628694", "0.61295784", "0.60967946", "0.6072625", "0.60171205", "0.60041714", "0.59625894", "0.59580684", "0.58967936", "0.5886936", "0.58726186", "0.58726186", "0.58726186", "0.58726186", "0.58726186", "0.58726186", "0.58726186", "0.58726186", "0.5845277", "0...
0.55744696
42
This method will map out the users on the table
function itemList(collection) { return collection.items.map((currentitem) => { return ( <Item key={currentitem._id} item={currentitem} /> ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapUsers(users) {\n var mappedUsers = $scope.data.ACL.users.map(function(aclUser) {\n _.find(users, function(user) {\n if (aclUser.uid === user.uid) {\n aclUser[\"email\"] = user.email;\n aclUser[\"username\"] = user.username;\n aclUser['_t...
[ "0.71943", "0.64646316", "0.63824373", "0.634095", "0.6303135", "0.6303135", "0.6300982", "0.6295481", "0.62406325", "0.6234119", "0.6226295", "0.6218164", "0.61970466", "0.61602443", "0.6150068", "0.6127384", "0.61124253", "0.60901845", "0.60754097", "0.60728353", "0.6072756...
0.0
-1
Really basic transcript parsing / formatting. [[TEXT]] becomes TEXT and NAME: TEXT becomes NAME: TEXT
function format(s) { s = s.replace(/\[\[(.+)\]\]/g, (_, s) => `<em>${s}</em> `); s = s.replace(/^[^:]{1,18}: /, s => `<strong>${s}</strong>`); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function t(text) { return {'macro_name': 'plaintext', 'text': text}; }", "function separateTranscript(variant) {\r\n variant.transcript = variant.name.slice(0, variant.name.indexOf(\"(\"));\r\n variant.name = variant.name.slice( variant.name.indexOf(\"(\"), variant.name.length);\r\n}", "function TextPars...
[ "0.6411967", "0.58452475", "0.5836826", "0.5836826", "0.5793798", "0.5762231", "0.5704424", "0.5553489", "0.5473782", "0.5452717", "0.53690076", "0.5348723", "0.5339968", "0.5283389", "0.5272474", "0.52638435", "0.52520406", "0.5233945", "0.5233093", "0.5158603", "0.51119953"...
0.0
-1
Query the success callback
function querySuccess(tx, results) { var len = results.rows.length; var reports = []; if (len > 0) { for ( var i = 0; i < len; i++) { reports[i] = results.rows.item(i); } ko.mapping.toJSON(reports); Indexer = results.rows.length; $("#noRecordsFound").hide("fast"); } else { $("#noRecordsFound")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSuccess () {}", "function onSuccess() {}", "onSuccess() {}", "function defaultSuccessCallbackFn() {\n debug && console.log( \"MobileDb.defaultSuccessCallbackFn: Query successful\" );\n }", "function successHandler() {\n if (response.get_statusCode() == 200)\n ...
[ "0.72478294", "0.71835244", "0.7132591", "0.6933507", "0.6891412", "0.6850007", "0.6826774", "0.67659837", "0.66656107", "0.6657915", "0.66266274", "0.6567851", "0.6546706", "0.6546706", "0.65123534", "0.6487026", "0.64844364", "0.63976127", "0.6376987", "0.636542", "0.635244...
0.0
-1
Update the donations list to DOM Ignores donations by "Anonyymi" Does not update unless new donations are found
function updateDonations(gonations) { let sum = 0; let donations = []; for (donation of gonations) { sum += donation.amount; if (donation.name != "Anonyymi") { donations.push(donation); } } const activityDiv = document.getElementById('activities'); if (donat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function donationFunc(crpID, year) {\n var donateurl2 = \"/donate/\" + crpID + \"/\" + year;\n var xhr = new XMLHttpRequest();\n console.log(crpID + year)\n xhr.open(\"GET\", donateurl2);\n xhr.addEventListener('load', function() {\n var donateObj = JSON.parse(xhr.resp...
[ "0.6474335", "0.6280039", "0.6001155", "0.5803596", "0.55403835", "0.5496827", "0.5451863", "0.5343706", "0.52758723", "0.51390195", "0.5120211", "0.50975335", "0.50970787", "0.50696784", "0.50438046", "0.49138948", "0.49026448", "0.4892966", "0.48749128", "0.48605317", "0.48...
0.6748211
0
Updates the donation bar with the currently donated amount and the current goal
function updateDonationbar(newSum) { if (goal == null || !settings["charity"]) { return; } const updateCurrent = (target) => { const diff = target - current; if (diff > 0) { let timeout = 10000 / diff; if (timeout < 30) { current = Math.round...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateDonation(state, donation) {\r\n state.donation = donation;\r\n }", "function animationUpdateDonationTotal(selector, oldVal, newVal) {\n\t$(selector)\n\t.prop('number', oldVal)\n\t.animateNumber({\n\t\tnumber: newVal,\n\t\tnumberStep: function(now, tween) {\n\t\t\tvar target = $(tween.elem);\n\t\t\t...
[ "0.6446197", "0.5979209", "0.5975949", "0.5952298", "0.5923776", "0.5899841", "0.5890348", "0.58199173", "0.5756524", "0.57498026", "0.57451487", "0.57437366", "0.5742724", "0.5736691", "0.5713379", "0.5694736", "0.5630019", "0.5625124", "0.55812645", "0.55798626", "0.556845"...
0.83044386
0
Rotates the activity that is currently displayed in the activity div
function rotateActivities() { if (activityRotationDisabled) return; let activities = document.getElementById('activity').children; activityIndex++; if (activityIndex >= activities.length) { activityIndex = 0; } let outSlide = activities[activityIndex]; let nextIndex = activityInde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rotate() {\n if (isHorizontal) {\n destroyer.classList.toggle('destroyer-container-vertical');\n submarine.classList.toggle('submarine-container-vertical');\n cruiser.classList.toggle('cruiser-container-vertical');\n battleship.classList.toggle('battleship-container-vertical');\n ...
[ "0.64373577", "0.63711166", "0.62851626", "0.62078863", "0.61309195", "0.60809284", "0.6079469", "0.605221", "0.59939", "0.5881494", "0.5855767", "0.5809845", "0.57619107", "0.5760898", "0.57472366", "0.5731488", "0.5723571", "0.5700608", "0.5689666", "0.5656925", "0.56478703...
0.7374649
0
Fetches donations from the Gonator API and updates to UI
function updateGonator() { let xhr = new XMLHttpRequest(); xhr.open("GET", gonator_url); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { var donations = JSON.parse(xhr.responseText); const sum = updateDonations(donations); updateDonationbar(sum); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchDonations(query, page, limit) {\n var paginated = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n return new Promise(function (resolve, reject) {\n if (!paginated) {\n page = 1;\n }\n\n external_commonjs_vue_commonjs2_vue_root_Vue_default.a.axios.get(\"\".c...
[ "0.65597856", "0.6477404", "0.63730925", "0.62596893", "0.6055432", "0.5932536", "0.58772576", "0.5792145", "0.56780154", "0.5587862", "0.55575097", "0.55145377", "0.5441163", "0.54402626", "0.5421985", "0.54123586", "0.53997993", "0.5381356", "0.53105825", "0.5298623", "0.52...
0.6731349
0
This function calls the function that shows the LoggedOut Perspective
function logoutUser(){ updateViewToLoggedOut(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logOut(){\n clearCurrentUser();\n showLoggedOutView();\n}", "showLoggedOff() {\n this.show('ALERT: Logged Off!', 'You are logged off of MTURK so need to log back in as soon as possible', 'loggedoff', '3alert3', true);\n }", "function displayLogin() {\n hide(\"logout\");\n display(\"log...
[ "0.65021306", "0.6185386", "0.5997007", "0.5889098", "0.5843594", "0.58144766", "0.5781659", "0.57088196", "0.5631029", "0.5603478", "0.55793273", "0.5567439", "0.55628896", "0.55557126", "0.55366737", "0.55324185", "0.5531549", "0.55286396", "0.5517062", "0.55128735", "0.550...
0.5957589
3
This function gets the MovieTitle and gives it to the vie function as json
function requestNewItem(){ var movieTitle = $("#inputTitle").val(); if(movieTitle == ""){ setErrorToINputField(); $("#errorMessage").slideDown(); }else{ var titleCellId = createIdForTitleCell(movieTitle); var tableRowId = createIdForTableRow(movieTitle); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMovie(title) {\n return $.getJSON('https://omdbapi.com?t={title}&apikey=thewdb');\n}", "function movieDisplay(movieTitle) {\n // console.log(\"Movie Display Function\");\n var queryURL = `http://www.omdbapi.com/?t=${movieTitle}&y=&plot=short&apikey=trilogy`\n // console.log(queryURL);\n\n...
[ "0.7292569", "0.70927435", "0.69220227", "0.6890443", "0.6825682", "0.6783178", "0.67621624", "0.67610157", "0.673436", "0.6733968", "0.67153966", "0.6690937", "0.6681628", "0.6617965", "0.660241", "0.6601771", "0.65980273", "0.6581768", "0.6571986", "0.6542487", "0.6539353",...
0.0
-1
This function removes the given movie
function removeMovie(id){ //Get sure the user wants to delete the movie var isWanted = confirm("Wollen sie den ausgewählten Film wirklich aus ihrer Liste entfernen?"); //React to the Result if(isWanted == true){ var hashid = "#"; var fullId = hashid + id; removeMovieFromVie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeMovie(item,target){\n const movieID = target.getAttribute('data-id')\n results.removeChild(item)\n nominationList = nominationList.filter(nominee => {\n if (nominee.id !== movieID){\n return nominee\n }\n })\n save()\n}", "function removeData() {\n var cu...
[ "0.7887632", "0.7542507", "0.7211295", "0.7104731", "0.70393276", "0.69238955", "0.6876987", "0.6837579", "0.6816441", "0.66523916", "0.66402125", "0.66275376", "0.6610264", "0.6601745", "0.6583098", "0.6552123", "0.6536881", "0.6516769", "0.65044063", "0.6497658", "0.6428679...
0.7060324
4
This function lets the user rate the movie
function rateMovie(id){ var ration = prompt("Zahl zwischen 0 und 5"); //Check if input is alright if(ration >= 0 & ration <= 5){ var imagesource = "img/" + ration + "stars.png"; var generatedHtml = "<img src='" + imagesource + "' alt='" + ration + " Sterne'/>"; //Ration as number ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dramaMoviesRate() {\n\n}", "function rateMovie(args) {\n\tconsole.log(\"Rating movie \"+movie_id+\" with a rating of \"+args[4]);\n\tvar req = new XMLHttpRequest();\n\treq.open(\"PUT\", request_path+\"/recommendations/\"+user_id, true);\n\treq.onload = function() {\n\t\tconsole.log(\"Added rating to db\...
[ "0.8061217", "0.7370716", "0.73152554", "0.69096935", "0.67766833", "0.6743851", "0.67291033", "0.6721033", "0.67174363", "0.6710708", "0.6708342", "0.6671892", "0.66708344", "0.66582465", "0.6623484", "0.66224724", "0.66154605", "0.6614859", "0.6614033", "0.66129863", "0.659...
0.6632843
14
This function sorts the Table Rows
function sortRows(){ sortRowsAlphabeticallyUpwards(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortTable() {\n\n var rows = $('.mytable tbody tr').get();\n rows.sort(function(a, b) {\n\n var A = $(a).children('td').eq(0).text().toUpperCase();\n var B = $(b).children('td').eq(0).text().toUpperCase();\n console.log(A);\n\n if (A > B) {\n ...
[ "0.7734927", "0.75263166", "0.7504125", "0.74943984", "0.73910296", "0.7375562", "0.7358218", "0.7337532", "0.732558", "0.73228407", "0.7308375", "0.7277393", "0.72415984", "0.7239057", "0.7214221", "0.7200275", "0.71820307", "0.7175887", "0.71689063", "0.7151978", "0.7123526...
0.7939273
0
static contextType = ThemeContext
render() { const {themeColor} = this.context console.log('this', this) return ( <div> <h3 className={themeColor}>HomePage</h3> <UserPage /> </div> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTheme(){ return this.theme; }", "getChildContext() {\n return {\n defaultTheme: this.props.defaultTheme,\n themeSwitcher: this,\n themes: [ ...this.state.themeOptions ],\n currentTheme: this.state.currentTheme\n };\n }", "getChildContext() {\n return {\n muiTheme: ThemeMan...
[ "0.7214811", "0.70259243", "0.70206285", "0.6851435", "0.67000717", "0.66753876", "0.6634448", "0.6608812", "0.659302", "0.65474063", "0.65422314", "0.653542", "0.65185857", "0.65185857", "0.65185857", "0.64545465", "0.64545465", "0.6427962", "0.6421654", "0.6390838", "0.6389...
0.6396906
19
This function shuffles and selects 10 questions per session to shuffledQuestions array.
function handleQuestions() { while (shuffledQuestions.length <= 9) { const random = questions[Math.floor(Math.random() * questions.length)]; if (!shuffledQuestions.includes(random)) { shuffledQuestions.push(random); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomizeQuestions() {\n\t//make a copy of questionBank, so that qbank is unaltered\n\t// var possibleQs = questionBank.slice(0);\n\t// for ( let i = 0; i < questionBank.length; i++) {\n\t// \t//get a random question\n\t// \tvar randomIndex = Math.floor(Math.random() * possibleQs.length);\n\t// \tvar ques...
[ "0.6969079", "0.6822785", "0.6812845", "0.6792495", "0.6725323", "0.6717499", "0.66285616", "0.66226906", "0.65943956", "0.653639", "0.6382562", "0.6319571", "0.6288478", "0.6230354", "0.62280875", "0.61654264", "0.61524314", "0.61461437", "0.61442107", "0.6142641", "0.613161...
0.6981262
0
This function displays the next question in array while also handling the display of player(s) and quiz information to dom.
function NextQuestion(index) { handleQuestions(); const currentQuestion = shuffledQuestions[index]; document.getElementById("question-number").innerHTML = questionNumber; document.getElementById("player-score").innerHTML = playerScore; document.getElementById("display-question").innerHTML = currentQuestio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextQuestion() {\n\t// debugger\n\tlet currentQuestion = questionList[getCurrentIndex()];\n\tlet questionsAnswered = getCurrentIndex();\n\t//.html is a setter\n\t$('#container').html(showQuizTemplate(correctAnswers, currentQuestion, questionNumber));\n\tconsole.log(nextQuestion);\n}", "function nextQues...
[ "0.8196977", "0.8174854", "0.81137574", "0.8096177", "0.80770874", "0.80757844", "0.8058101", "0.8016095", "0.8005526", "0.7948657", "0.793892", "0.7924616", "0.78987354", "0.7819101", "0.7802154", "0.77909154", "0.7790271", "0.778914", "0.7770424", "0.7750086", "0.7731062", ...
0.74926436
54
This function checks for current question, it's answer & determines if it's correct.
function checkForAnswer() { const currentQuestion = shuffledQuestions[indexNumber]; const currentQuestionAnswer = currentQuestion.correctOption; const options = document.getElementsByName("option"); let correctOption = null; options.forEach((option) => { if (option.value === currentQuestionAnswer) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function answerIsCorrect() {\n correctAnswerFeedback();\n nextQuestion();\n addToScore();\n}", "function checkAnswer(answer){\n if( answer == questions[runningQuestion].correct){\n isCorrect();\n nextQuestion();\n } else {\n isWrong();\n nextQuestion();\n }\n}", "functio...
[ "0.78234243", "0.7610755", "0.75543207", "0.75400674", "0.74396414", "0.7439423", "0.7405172", "0.73757035", "0.73720473", "0.7358007", "0.73416674", "0.73345745", "0.7334275", "0.7261444", "0.7249092", "0.72447634", "0.7241441", "0.7238657", "0.72300714", "0.72242737", "0.72...
0.0
-1
This function is called when the next button is clicked on, checks for answer & delays until next question is selected from shuffledQuestions array
function handleNextQuestion() { checkForAnswer(); unCheckRadioButtons(); setTimeout(() => { //This if/else statement checks for index number to be not greater than 9, otherwise the game ends. if (indexNumber <= 9) { NextQuestion(indexNumber); } else { handleEndGame(); } resetO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextQuestion () {\n if (questionId < questionsArr.length) {\n questionId++;\n timer.reset ();\n $(\"#trivia-question\").text(questionsArr[questionId]);\n $(\"#answer1\").html(answersArr[questionId][0]);\n $(\"#answer2\").html(answersArr[questio...
[ "0.8326227", "0.8248517", "0.8245077", "0.8219999", "0.818325", "0.81225765", "0.80957323", "0.80601066", "0.8048571", "0.8044393", "0.8043908", "0.80418867", "0.80418867", "0.8011785", "0.8009409", "0.8005187", "0.80013365", "0.80003715", "0.79929996", "0.7988665", "0.797275...
0.7503973
97
This function resets options background color after you answer a question.
function resetOptionBackground() { const options = document.getElementsByName("option"); options.forEach((option) => { document.getElementById(option.labels[0].id).style.backgroundColor = ""; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetOptionBackground() {\n const options = document.getElementsByName(\"option\");\n options.forEach((option) => {\n document.getElementById(option.labels[0].id).style.backgroundColor = \"\"\n })\n}", "function clearColor() {\n\toption1.style.backgroundColor = \"darkgreen\";\n\toption2....
[ "0.7296366", "0.72541827", "0.72045887", "0.72045887", "0.6698815", "0.66800064", "0.650476", "0.645821", "0.6437645", "0.6407036", "0.63952416", "0.6383873", "0.62604934", "0.62544614", "0.6238923", "0.6231542", "0.62088454", "0.6197834", "0.61932266", "0.61780936", "0.61682...
0.7413347
0
This function unchecks all the buttons for next question.
function unCheckRadioButtons() { const options = document.getElementsByName("option"); for (let i = 0; i < options.length; i++) { options[i].checked = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unCheckButton (_currentQuiz) {\n // Clear all click listeners\n var $btnNext = $('#next'), goNext = 1;\n var $btnBack = $('#prev'), goPrev = -1;\n $btnNext.off('click');\n $btnBack.off('click');\n // Check whether needed activating button\n if (_currentQuiz === 0) {\n $btnNext.on('click', (goQue...
[ "0.75795716", "0.73999006", "0.7259547", "0.7219019", "0.72177017", "0.6949475", "0.6933328", "0.6912599", "0.6908141", "0.6903089", "0.6890872", "0.68237484", "0.681916", "0.68159956", "0.6814617", "0.6785347", "0.67766565", "0.6743274", "0.67284757", "0.6715619", "0.6693657...
0.5977848
96
This function activates when all questions have been answered
function handleEndGame() { let remark = null; let remarkColor = null; //This if/else statement checks for how many correct answers player selected and remarks on amount of correct answers. if (playerScore <= 3) { remark = "Don't be discouraged. Give it another go."; remarkColor = "red"; } else if (play...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkQuestions() {\n $('body').on('click','#next-question', (event) => {\n STORE.progress === STORE.questions.length?\n showAnswers() : generateQuestion();\n });\n}", "function correct() {\n event.stopPropagation()\n $ (\".list\").hide();\n $ (\".question\").hide();\n $ (\"...
[ "0.67761487", "0.6719311", "0.6656131", "0.6648029", "0.6645355", "0.66385347", "0.66242933", "0.6612514", "0.65648603", "0.6560579", "0.6541634", "0.65319043", "0.6506382", "0.65033233", "0.64964145", "0.6474844", "0.64563996", "0.64485985", "0.6421542", "0.64006984", "0.639...
0.0
-1
This function closes score modal, resets game and reshuffles questions.
function closeScoreModal() { questionNumber = 1; playerScore = 0; wrongAttempt = 0; indexNumber = 0; shuffledQuestions = []; NextQuestion(indexNumber); document.getElementById("score-modal").style.display = "none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeScoreModal() {\n questionNumber = 1\n playerScore = 0\n wrongAttempt = 0\n indexNumber = 0\n shuffledQuestions = []\n NextQuestion(indexNumber)\n document.getElementById('score-modal').style.display = \"none\"\n}", "function closeScoreModal() {\r\n questionNumber = 1\r\n ...
[ "0.85776275", "0.85309064", "0.7939053", "0.72220284", "0.7107361", "0.7068769", "0.68491536", "0.6806497", "0.6779461", "0.67774236", "0.6706052", "0.6704654", "0.6697941", "0.66963744", "0.6691461", "0.6675223", "0.6637268", "0.66237015", "0.66102016", "0.6601305", "0.65945...
0.87708807
0
This function closes warning modal.
function closeOptionModal() { document.getElementById("option-modal").style.display = "none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeModals() {\n if ($scope.warning) {\n $scope.warning.close();\n $scope.warning = null;\n }\n if ($scope.timedout) {\n $scope.timedout.close();\n $scope.timedout = null;\n }\n }", "function MUPS_MessageClose() {\n console.log(\" --- MUPS_Messa...
[ "0.71709543", "0.71114284", "0.7096377", "0.7014727", "0.6897244", "0.68901783", "0.688128", "0.68746567", "0.6862796", "0.6855048", "0.68524075", "0.68253803", "0.68140507", "0.6808177", "0.6778858", "0.6775529", "0.6769895", "0.6759588", "0.6759588", "0.6750428", "0.6749219...
0.0
-1
Function opens the contact modal window
function openModal() { let modal = document.querySelector('#contact-modal'); modal.classList.toggle('show-modal'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doModalContact() {\n\tcustomModalBox.htmlBox('yt-ContactContent', '', 'Contact'); \n\t$('mb_close_link').addEvent('click', function() {\n\t\t$('yt-ContactContent').injectInside(document.forms[0]);\n\t});\n}", "function openContactDetails() {\n\t\tconst contactId = Number(this.id);\n\t\tupdateContactDeta...
[ "0.7933163", "0.79219365", "0.7761337", "0.7515029", "0.7272764", "0.6958078", "0.69383216", "0.68356806", "0.67750156", "0.67612064", "0.6758028", "0.6756309", "0.67545474", "0.6743794", "0.6737854", "0.6731702", "0.6729312", "0.6711814", "0.6684834", "0.6684834", "0.6684049...
0.72035146
5
Start of the service
function run() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startService() {\n $log.log(TAG + 'starting.');\n running = true;\n }", "function startService() {\n $log.log(TAG + 'starting');\n running = true;\n }", "start(key) {\n var service = _services[key];\n console.warn('Starting service', key, service);\n return service.s...
[ "0.8267542", "0.8239446", "0.7565739", "0.7262538", "0.7086334", "0.7024873", "0.6945063", "0.69309783", "0.6910012", "0.69094783", "0.68701106", "0.68364614", "0.68354064", "0.6823846", "0.6805906", "0.67951804", "0.6765686", "0.67506754", "0.67175627", "0.6705191", "0.66861...
0.0
-1
taking the value and name of input to set in state, before making post request to register
handleChange({ target: { name, value }}) { const postData = {...this.state.postData, [name]: value, errors: {} } this.setState({ postData }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleInput(e) {\n let value = e.target.value;\n let name = e.target.name;\n this.setState(\n prevState => ({\n newUser: {\n ...prevState.newUser,\n [name]: value\n }\n }),\n () => console.log(this.state.newUser)\n );\n }", "handleInput(e) {\n e.prev...
[ "0.674922", "0.6693615", "0.66393954", "0.6555331", "0.65359795", "0.6519938", "0.65148145", "0.6500059", "0.64977884", "0.6487021", "0.6442219", "0.64417195", "0.641675", "0.64155203", "0.64131784", "0.63993233", "0.6378781", "0.63699853", "0.63599813", "0.63484895", "0.6344...
0.6137853
60
submitting the data to back end register route
handleSubmit(e){ e.preventDefault() if(Auth.isAuthenticated()){ if(!this.state.postData || this.state.postData.content.length < 1 ){ this.setState({ errors: { content: 'Cannot send a empty message'} }) }else{ const headers = {'Authorization': `Bearer ${Auth.getToken()}`} cons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register() {\n\tvar data = {}\n\t\n\tif (form.email.value) data.email = form.email.value\n\tif (form.password.value) data.password = form.password.value\n\tif (form.name.value) data.name = form.name.value\n\t\n\t//take out later\n\tconsole.log(data)\n\n\tfetch('/register', {\n\t\theaders: {\n\t\t\t'Conten...
[ "0.7363452", "0.72754407", "0.72355604", "0.7217786", "0.7123133", "0.71072125", "0.7044973", "0.7022371", "0.7016231", "0.7014481", "0.69549483", "0.69474673", "0.6888514", "0.6879972", "0.6869844", "0.68418866", "0.68333966", "0.68082154", "0.68068635", "0.680564", "0.68026...
0.0
-1
MOVE THIS TO A LIB FILE
function callGoogle(address, callback){ var publicConfig = { key: process.env.POWWOW_GA_KEY, secure: true }; var gmAPI = new GoogleMapsAPI(publicConfig); var geocodeParams = { address: address} var cb = callback || () => {} return new Promise((resolve, reject) => { gmAPI.geocode(geocodeParams...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Library() {\n \n}", "function copyLib(){\n return gulp.src('src/js/lib/*.js') \n\t .pipe(gulp.dest('dist/src/js/lib') );\n}", "function addDocToLibraries (doc) {\n //AppController.sharedInstance().librariesController().addAssetLibraryAtURL(doc.fileURL())\n\tdoc.saveAndAddLibrary()\n...
[ "0.569575", "0.5691487", "0.5499845", "0.5327317", "0.53191173", "0.52710587", "0.517674", "0.5141355", "0.5068015", "0.505614", "0.505058", "0.50248206", "0.5017177", "0.5009769", "0.50051814", "0.50051814", "0.49983642", "0.49879408", "0.49840936", "0.49820176", "0.49814883...
0.0
-1
TODO: Disable the save button if the input is incorrect or nothing on the schedule form has been changed
async function handleSaveSchedulePress() { setLoading(true); let riskAssessmentScheduleIdToFetch; if (route.params.riskAssessmentScheduleId) { const updateRiskAssessmentScheduleResponse = await updateRiskAssessmentSchedule( user.id, route.params.riskAs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveschedule() {\n var status = true;\n if ($('#txtSurveySlotTime').val() == \"\")\n {\n $('#SurveySlotTimeValidation').show();\n status = false;\n }\n else\n {\n $('#SurveySlotTimeValidation').hide();\n }\n if ($('#txtCognitionTestSlotTime').val() == \"\") {\n...
[ "0.6744731", "0.65461516", "0.64682114", "0.6333954", "0.62699026", "0.6258152", "0.6229988", "0.6219638", "0.6211305", "0.62053794", "0.6196815", "0.6163707", "0.6137281", "0.60997784", "0.6093017", "0.6089577", "0.608947", "0.60760444", "0.6070084", "0.6015836", "0.5999584"...
0.6254818
6
Instantiates a new Emote Action
constructor() { super('Emote Action', 'core.rosie.action.emote') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createAction() {}", "function machine(name) {\n return new Action(name); \n}", "function Action(){\n this.actionClass = \"\";\n\tthis.variables = new Array();\n}", "function actionCreator() {\n return action\n}", "function actionCreator() {\n return action\n }", "function actionCreator(){\n ...
[ "0.6736925", "0.57957673", "0.5687706", "0.56481206", "0.56314427", "0.56099457", "0.5592111", "0.5539078", "0.54250735", "0.5406853", "0.53907645", "0.5365611", "0.5348985", "0.5314755", "0.5280566", "0.5250143", "0.52340966", "0.52282315", "0.5212614", "0.5196576", "0.51860...
0.69111377
0
sound var added 2/24 source w3schools 404 error in console, doesnt effect game but need to trace
function sound(src) { this.sound = document.createElement("audio"); this.sound.src = src; this.sound.setAttribute("preload", "auto"); this.sound.setAttribute("controls", "none"); this.sound.style.display = "none"; document.body.appendChild(this.sound); this.play = function(){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wingFlapper() {\r\n\t\tconsole.log(sound);\r\n\t}", "function plyanimsound(soundeffect){\n const soundplay = new Audio(`/static/frontend/sounds/cards/${soundeffect}.wav`);\n soundplay.loop = false;\n soundplay.play();\n}", "function errorSound() {\n var error = new Audio(\"./assets/sou...
[ "0.74521554", "0.7384498", "0.7146996", "0.7070776", "0.70345086", "0.6975556", "0.69571877", "0.69475114", "0.69336504", "0.6916625", "0.6871947", "0.6862031", "0.68599707", "0.68593615", "0.68451655", "0.684487", "0.683448", "0.680838", "0.6802375", "0.680042", "0.679953", ...
0.0
-1
new classes for these functions, have to account for nonquestions (i.e transition and answers)
function AnswerCorrect() { if (questionCounter % 3 == 1 && questionCounter != 0) { incrementScore(SCORE_POINTS); console.log(score); correctSound.play(); playerAnimateTrigger = true; document.getElementById("modalTitle").innerHTML = "Your Answer is Correct...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextQuestion() {\n newQuestion();\n}", "function nextQuestion() {\n\n}", "function questions(prize, category, question, alt, hint, publicVote, fifty1, fifty2) {\n this.prize = prize;\n this.category = category;\n this.question = question;\n this.alt = alt;\n this.hi...
[ "0.6451782", "0.6390186", "0.62501466", "0.62377805", "0.6232754", "0.6139243", "0.61352944", "0.6130384", "0.61187017", "0.60951555", "0.6068492", "0.60572726", "0.5994062", "0.5992255", "0.5968235", "0.5936098", "0.5934481", "0.5933089", "0.5914306", "0.59072053", "0.590585...
0.0
-1
Button on click Edit/View
function handleOnClick(index) { console.log("click edit/view button"); console.log(projects[index]); dispatch(storeClickProjects(projects[index], index)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addActionEdit() {\n let btn = this._actions.getElementsByClassName('edit')[0];\n if (btn === undefined) {\n return;\n }\n\n btn.onclick = ((event) => {\n window.location.href = Service.editorUrl(this._api.getSlug());\n }).bind(this);\n\n this._btns.e...
[ "0.7588414", "0.7212212", "0.7135093", "0.71315974", "0.70495194", "0.69979215", "0.6957381", "0.6945247", "0.6917162", "0.69137734", "0.6856512", "0.6856512", "0.6856512", "0.6856512", "0.6856512", "0.6856512", "0.6856512", "0.6827374", "0.68139964", "0.681285", "0.6800664",...
0.0
-1
Add the sticky class to the header when you reach its scroll position. Remove "sticky" when you leave the scroll position
function myFunction() { if (window.pageYOffset > sticky) { header.classList.add("sticky"); } else { header.classList.remove("sticky"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function headerScroll() {\n // if the user scrolls (pageYOffset) past the header's position, add the sticky class\n if (window.pageYOffset > sticky) {\n header.classList.add(\"sticky\");\n } else {\n header.classList.remove(\"sticky\");\n }\n}", "function onScrollFuntion(position, header) {\n if...
[ "0.87417257", "0.8612521", "0.8570463", "0.8527064", "0.8517288", "0.84787875", "0.8460121", "0.8450305", "0.8440693", "0.8414207", "0.82765466", "0.81295305", "0.8077693", "0.8072253", "0.8048328", "0.8031857", "0.8031857", "0.8031857", "0.8031857", "0.8031857", "0.8031857",...
0.8030553
26
Make camera toggle be active on load for desktop devices
function addActiveToggle(x) { var cameraTagItem = document.getElementById("camera-tag"); if (x.matches) { cameraTagItem.classList.add("_active"); } else { cameraTagItem.classList.remove("_active"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function turnOn()\n{\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\n if (navigator.getUserMedia)\n {\n navigator.getUserMedia({video: true}, handleVideo, videoError);\n }\n}...
[ "0.697656", "0.6925485", "0.6918725", "0.68922216", "0.68828934", "0.68041855", "0.6675012", "0.6629841", "0.6540846", "0.6527894", "0.6512753", "0.6499572", "0.6458482", "0.64468503", "0.64385366", "0.6357481", "0.6357177", "0.63153785", "0.6256392", "0.6255697", "0.62448794...
0.0
-1
AJAX call, ring ring hello helloooo ??
function getJSONData() { var flickrURL = ''; $.getJSON( flickrURL, successFn ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxResult(address, search) {\n//alert(\"ready to lauch...\");\n var request = getRequestObject();\n request.onreadystatechange = \n function() { showResponseText(request, search); };\n request.open(\"GET\", address, true);\n request.send(null);\n//alert(\"lauched...\");\n}", "function callBack()...
[ "0.6943717", "0.6802011", "0.6706867", "0.6688871", "0.66712105", "0.6669521", "0.6652491", "0.66418695", "0.6633396", "0.6590455", "0.6562582", "0.65258586", "0.65181524", "0.6512184", "0.64905006", "0.64886373", "0.6486704", "0.64677113", "0.6460039", "0.6450082", "0.643795...
0.0
-1
picks up ah yes hello, I have your request, here you go!
function successFn(result) { console.log(result); console.log("flickr images loaded, hurray! do a backflip"); initMasonry(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleWelcomeRequest(response) {\n var speechOutput = \"Welcome to Know Your Congress. Which state or congressperson would you like to know about? \";\n var repromptOutput = \"You can ask things like who represents Iowa? or Who is Charles Grassley? \"\n + \"When looking for a person, you can ...
[ "0.647381", "0.6336533", "0.6271119", "0.6267581", "0.61876565", "0.6151667", "0.61511266", "0.6144546", "0.6074806", "0.6073493", "0.60689795", "0.605111", "0.6027189", "0.6027064", "0.5980625", "0.5974761", "0.59649897", "0.5956704", "0.59505355", "0.5940494", "0.59295493",...
0.0
-1
initialize masonry This is pretty default stuff right here that you can find in the documentation / examples, I won't go over this unless you ask me to.
function initMasonry() { // first handle the imagesloaded because we are loading images var $grid = $('.grid').imagesLoaded( function() { console.log("masonry initialized"); // Now call masonry after all images have loaded so it'll // properly gridify the images, gridify is probably not a real word....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMasonry() {\n window.myMasonry = new Masonry(document.querySelector(`.${CLASSES.MASONRY}`))\n }", "function init_masonry(){\n var $container = $('#content');\n\n $container.imagesLoaded( function(){\n $container.masonry({\n itemSelector: '.box-content',\n ...
[ "0.807322", "0.79483163", "0.7908077", "0.75793004", "0.75087136", "0.73077667", "0.7293584", "0.72049767", "0.7139593", "0.7061661", "0.7019808", "0.7016042", "0.70078975", "0.70049924", "0.6973663", "0.6938705", "0.69352216", "0.69352216", "0.69352216", "0.69352216", "0.693...
0.7976823
1
Also very default settings here and can be found below:
function initFeatherLight() { $('a.gallery').featherlightGallery({ previousIcon: '«', /* Code that is used as previous icon */ nextIcon: '»', /* Code that is used as next icon */ galleryFadeIn: 100, /* fadeIn speed when slide is loaded */ galleryFadeOut: 100 /* fadeOut speed before sl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function additionalSettings(){\n\n\n}", "constructor(settings) {\n //default settings\n super(settings);\n }", "constructor() {\n this.settings = {\n load: false,\n angle: false,\n moment: false,\n distload: false,\n material: false,\n one_load: false,\n one_moment:...
[ "0.6619496", "0.65048105", "0.6373434", "0.63399726", "0.62954205", "0.62723476", "0.626693", "0.61653006", "0.61644834", "0.6164273", "0.6137965", "0.6137965", "0.6118617", "0.61102664", "0.61082727", "0.6050331", "0.6035206", "0.5997318", "0.5987187", "0.5986291", "0.594956...
0.0
-1
for a given string and tag pair, uses the tags to extract any substring that are already tagged, creates a version of the string without those tags, and then returns a 2tuple array with the array of matches and the string without tags
function get_matches_and_string_without_tags(str, tag) { const matches = []; const start_tag = '<' + tag + '>'; const end_tag = '</' + tag + '>'; // Deal with already highlighted text from ES, pulls any existing tags from the source, marks them // as regex matches, and then let it process them as if they wer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matchTagsAsFreeStrings(stringArray) {\n let regExpStr = '^';\n for (let i = 0; i < stringArray.length; i++) {\n regExpStr += `(?=.*${stringArray[i]})`;\n }\n var reg = new RegExp(regExpStr);\n if (reg.test(this.__combinedTagString)) {\n return true;\n ...
[ "0.6905435", "0.65996593", "0.6346369", "0.62452036", "0.60513884", "0.59434855", "0.5923678", "0.58773077", "0.5846709", "0.56856614", "0.56378746", "0.56109095", "0.5594636", "0.55497175", "0.55421484", "0.55064064", "0.5506099", "0.5446844", "0.53921497", "0.5332093", "0.5...
0.77443165
0
takes a string that has been preprocessed and stripped of existing tags, an array of terms, and an array of known matches (or empty array if none). it then aggregates all of the matches for all of the terms into a single array, sorts them by the index then collapses any matches that are overlapping, and returns an arra...
function get_term_matches_for_string(str_without_tags, terms, matches) { // gather up all of the match indices/lengths for all of the terms for (const term of terms) { const regex = new RegExp(_.escapeRegExp(term), 'gi'); let match; do { match = regex.exec(str_without_tags); if (match) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_prepareMatches(matchesWithLength, matches, matchesLength) {\n function isSubTerm(currentIndex) {\n const currentElem = matchesWithLength[currentIndex];\n const nextElem = matchesWithLength[currentIndex + 1];\n\n // Check for cases like \"TAMEd TAME\".\n if (\n currentInde...
[ "0.6219953", "0.5756079", "0.54872346", "0.5399057", "0.53377926", "0.5294609", "0.5268663", "0.51580286", "0.5116089", "0.50814444", "0.5081288", "0.50424445", "0.50399005", "0.50375885", "0.50031996", "0.5001522", "0.49991655", "0.49456167", "0.4932813", "0.49222738", "0.49...
0.76583767
0
goals for this component: need to have a button that when clicked will render selected job's details
render() { let jobs; if (this.props.user) { console.log(this.props.user.jobs) jobs = Object.keys(this.props.user.jobs) } console.log(jobs) return ( <div> { this.state.form ? <Form /> : null } <button onClick={thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printJob(jobId) {\n\tjobname = localStorage[\"timepunch.job\" + jobId + \".name\"];\n\tdocument.getElementById(\"view\").innerHTML += '<button class=\"jobs\" id=\"' + jobId + '\" onclick=\"selectJob(this.id)\"> ' + jobname + '</button>';\n}", "render() {\n\t\treturn (\n\t\t\t<div className='jobCard' id=...
[ "0.6830779", "0.67627454", "0.6644044", "0.6494461", "0.6456886", "0.63147664", "0.6304015", "0.6115756", "0.60307264", "0.6027754", "0.5963832", "0.59517735", "0.59328645", "0.59008616", "0.58839685", "0.58224607", "0.5768425", "0.57615286", "0.57459563", "0.57231647", "0.57...
0.54498005
37
constant drawing while playing
function drawBall(){ ctxB.beginPath(); ctxB.arc(x, y, ballRadius, 0, Math.PI*2); ctxB.fillStyle = colorBricks; ctxB.fill(); ctxB.closePath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw(){\t\n\trequestAnimationFrame(draw); //allows for maximum use of the hardwares potential\n}", "function draw() {\r\n if (x < background.w)x += 1;\r\n else x=0;\r\n if(theme==\"basic\"){\r\n bgImg=background.img;\r\n }else bgImg=backgroundSnow.img; \r\n ...
[ "0.7461346", "0.7342676", "0.7324187", "0.7286665", "0.7267792", "0.7267792", "0.72568053", "0.7196146", "0.7125808", "0.70686877", "0.7060575", "0.7060575", "0.7060575", "0.702787", "0.7026176", "0.6996553", "0.6994125", "0.6994125", "0.6994125", "0.6994125", "0.6974465", ...
0.0
-1
function to convert vw to px
function vwTOpx(value) { var w = window, d = document, e = d.documentElement, g = d.getElementsByTagName('body')[0], x = w.innerWidth || e.clientWidth || g.clientWidth, y = w.innerHeight|| e.clientHeight|| g.clientHeight; var result = (x*value)/100; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vw (w){\n \treturn (w*window.innerWidth)/100;\n }", "function calcVw(vw) {\n let cacheVw = cache.vw[vw];\n if(cacheVw || cacheVw === 0) {\n return cacheVw;\n } else {\n return cache.vw[vw] = vw / 100 * width;\n }\n}", "function punto_x(){\n var x;\n x = width/2.3;\n retu...
[ "0.7886128", "0.71017814", "0.66783506", "0.65371495", "0.6489681", "0.63394034", "0.6315869", "0.6258298", "0.61926717", "0.6187911", "0.6176531", "0.6153134", "0.6124476", "0.61009747", "0.6083892", "0.60768664", "0.60656714", "0.5949589", "0.5942609", "0.58756477", "0.5872...
0.8203559
0
it will check if the transaction is a new block that is being saved or it was already saved on HDD
async getTxBlockHeight( txId ){ //check if tx is in pending blocks for (const key in this.blockManager._pendingBlocks){ let block = this.blockManager._pendingBlocks[key]; if (!block) continue; // be sure block exists if (block instanceof Promise) block = await bloc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveDoneBlock() {\n\n let blockAlreadyInserted = false;\n for (let i = 0; i < playerLevelEnvironment.listOfBlocksInThePlayingArea.length; i++) {\n if (playerLevelEnvironment.listOfBlocksInThePlayingArea[i].blockCounter === playerLevelEnvironment.blockCounter) {\n bl...
[ "0.67164075", "0.64381754", "0.61181843", "0.6089733", "0.59952766", "0.5951234", "0.59345955", "0.5902349", "0.5842701", "0.58287674", "0.5800366", "0.5784207", "0.5784207", "0.5777439", "0.5771904", "0.5756402", "0.5712516", "0.56960654", "0.56857616", "0.56749743", "0.5624...
0.0
-1
return true is palindrome and false if not ex. isPalindrome('racecar') === 'true' , is Palindrome ('hello') == false
function isPalindrom(str) { const revString = str .split("") .reverse() .join(""); return revString === str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPalindrome(str) {\n\n}", "function palindrome(str) {\n return true;\n}", "isPalindrome() {\n }", "function palindrome(str) {\r\n // Good luck!\r\n return true;\r\n}", "function isPalindrome(phrase){\r\n return true;\r\n}", "function isPalindrome(text){\n if (text === undefined){\...
[ "0.85355103", "0.83539677", "0.82484514", "0.8150437", "0.80747086", "0.79551595", "0.7927378", "0.78660804", "0.7856458", "0.7840408", "0.7838299", "0.7836722", "0.78306127", "0.7829995", "0.78240615", "0.7821312", "0.7816509", "0.78000075", "0.779613", "0.7787471", "0.77806...
0.0
-1
Active Threads Over Time
function refreshActiveThreadsOverTime(fixTimestamps) { var infos = activeThreadsOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotActiveThreadsOverTime"))) { infos.createGraph(); }else{ va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendActiveThreadCountRes() {\n \n }", "function inc_busy()\n{\n background_jobs++;\n update_busy_indicator();\n}", "get threads() {\r\n return new Threads(this);\r\n }", "scheduler() {\n const {busyApps, appPriorities, ticks} = this;\n this.__apps.map((app, appId) => {\n return...
[ "0.6575646", "0.59852815", "0.58234316", "0.57195354", "0.5596652", "0.55964047", "0.5541449", "0.5523125", "0.55226135", "0.550012", "0.5478211", "0.54375935", "0.54304224", "0.54265594", "0.54097", "0.53732216", "0.53680176", "0.5362083", "0.5361552", "0.5359218", "0.535424...
0.0
-1
Bytes throughput Over Time
function refreshBytesThroughputOverTime(fixTimestamps) { var infos = bytesThroughputOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotBytesThroughputOverTime"))){ infos.createGraph(); }else{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _calculateDownloadTime(sizeInBytes) {\n return Math$floor(sizeInBytes / _throughput); \n }", "_measureSpeed() {\n\t\tif(!this._socket) return;\n\t\tif(!this._connected) {\n\t\t\tthis._upspeed = 0;\n\t\t\tthis._downspeed = 0;\n\t\t}\n\t\tconst dt = new Date();\n\t\tconst dtime = (dt - this._mea...
[ "0.6507428", "0.60907906", "0.59227574", "0.59149253", "0.5825179", "0.57521904", "0.57425064", "0.5732041", "0.56578", "0.5652652", "0.56324565", "0.5610195", "0.56014746", "0.55944264", "0.5573114", "0.5547082", "0.5542739", "0.55416393", "0.5531483", "0.55311495", "0.55264...
0.0
-1
Response Times Over Time
function refreshResponseTimeOverTime(fixTimestamps) { var infos = responseTimesOverTimeInfos; prepareSeries(infos.data); if(infos.data.result.series.length == 0) { setEmptyGraph("#bodyResponseTimeOverTime"); return; } if(fixTimestamps) { fixTimeStamps(infos.data.result.series...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseTime (req, res) {\n if (!res._header || !req._startAt) {\n return ''\n }\n\n var tdiff = process.hrtime(req._startAt)\n , ms = tdiff[0] * 1e3 + tdiff[1] * 1e-6\n\n return ms.toFixed(3)\n}", "function getServerTime(request, response) {\r\n\tvar time = new Date();\r\n\t\r\n\tvar result =...
[ "0.7092822", "0.6836103", "0.639537", "0.63374466", "0.6251988", "0.61462384", "0.6100139", "0.6068924", "0.6020777", "0.60106874", "0.60009605", "0.59932894", "0.59754544", "0.597369", "0.59192896", "0.5914399", "0.5872192", "0.5872192", "0.5872192", "0.5850241", "0.5811009"...
0.0
-1
Connect Time Over Time
function refreshConnectTimeOverTime(fixTimestamps) { var infos = connectTimeOverTimeInfos; prepareSeries(infos.data); if(infos.data.result.series.length == 0) { setEmptyGraph("#bodyConnectTimeOverTime"); return; } if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connectTimeout() {\n var worker = cluster.workers[this.worker_key]\n if ( worker !== undefined ) {\n if ( !(worker.isConnected()) ) {\n var onset = this.trackingStartTime\n var diff = Date.now() - onset\n //\n //if ( diff > MAX_CONNECT_FAIL_TIME ) writeConsoleLog('log',{com...
[ "0.57900476", "0.5770421", "0.5753667", "0.5660272", "0.55595124", "0.553363", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5528221", "0.55238473", "0.55238473", "0.55238473", "0.55238473", "0.55238473", "0.5523847...
0.55215293
62
Response Time Percentiles Over Time
function refreshResponseTimePercentilesOverTime(fixTimestamps) { var infos = responseTimePercentilesOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotResponseTimePercentilesOverTime"))) { infos.create...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getReqPerTime() {\n let sum_time = 0.0\n let dif = 0.0\n for (let d = 0; d < this.state.data.length; d++) {\n dif = new Date(this.state.data[d].dt_end_log).getTime() - new Date(this.state.data[d].dt_Start_Log).getTime()\n sum_time += dif / 1000\n }\n \n return (sum_time / this.state.data....
[ "0.64692897", "0.590526", "0.5725271", "0.5562733", "0.5540248", "0.5540248", "0.5540248", "0.5540248", "0.5540248", "0.5536946", "0.5533093", "0.55329615", "0.55329615", "0.55329615", "0.55329615", "0.55329615", "0.55329615", "0.55329615", "0.55329615", "0.55329615", "0.5532...
0.5531854
41
Response Time vs Request
function refreshResponseTimeVsRequest() { var infos = responseTimeVsRequestInfos; prepareSeries(infos.data); if (isGraph($("#flotResponseTimeVsRequest"))){ infos.createGraph(); }else{ var choiceContainer = $("#choicesResponseTimeVsRequest"); createLegend(choiceContainer, infos); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseTime (req, res) {\n if (!res._header || !req._startAt) {\n return ''\n }\n\n var tdiff = process.hrtime(req._startAt)\n , ms = tdiff[0] * 1e3 + tdiff[1] * 1e-6\n\n return ms.toFixed(3)\n}", "function getServerTime(request, response) {\r\n\tvar time = new Date();\r\n\t\r\n\tvar result =...
[ "0.75744617", "0.7416566", "0.6893877", "0.68084794", "0.6781717", "0.6561443", "0.652187", "0.65142745", "0.6462254", "0.6462254", "0.6462254", "0.6245028", "0.6245028", "0.62287295", "0.6191165", "0.61851764", "0.61500037", "0.61434627", "0.6104452", "0.60714453", "0.594592...
0.0
-1
Total Transactions per second
function refreshTotalTPS(fixTimestamps) { var infos = totalTPSInfos; // We want to ignore seriesFilter prepareSeries(infos.data, false, true); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotTotalTPS"))){ infos.createGraph(); }else{...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "totalTime() {\n let time = 0\n this.measures.forEach(m => time += m.totalTime())\n return time\n }", "function updateValues() {\n\tconst amounts = transactions.map((transaction) => transaction.time);\n\n\tconst total = amounts.reduce((acc, item) => (acc += item), 0);\n\t//console.log(time...
[ "0.65046084", "0.6479991", "0.6461238", "0.6340553", "0.63175285", "0.62999165", "0.6285214", "0.6285214", "0.6269029", "0.62109965", "0.6122031", "0.611619", "0.5952385", "0.587621", "0.5870545", "0.584586", "0.58369875", "0.58181375", "0.5804055", "0.5803499", "0.579104", ...
0.0
-1
Collapse the graph matching the specified DOM element depending the collapsed status
function collapse(elem, collapsed){ if(collapsed){ $(elem).parent().find(".fa-chevron-up").removeClass("fa-chevron-up").addClass("fa-chevron-down"); } else { $(elem).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-up"); if (elem.id == "bodyBytesThrou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collapse_unload(d,svg_dom)\n\t\t{\n\n\t\t\t//get all nodes\n\t\t\tvar nodes = d3.select(svg_dom).selectAll(\"g.node\").data();\n\t\t\tvar idx = nodes.findIndex( //find node that is already opened\n\t\t\t\t\tfunction(element)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn ( element.depth === d.depth && element.children ...
[ "0.6733574", "0.66582936", "0.6610769", "0.6518608" ]
0.0
-1
Activates or deactivates all series of the specified graph (represented by id parameter) depending on checked argument.
function toggleAll(id, checked){ var placeholder = document.getElementById(id); var cases = $(placeholder).find(':checkbox'); cases.prop('checked', checked); $(cases).parent().children().children().toggleClass("legend-disabled", !checked); var choiceContainer; if ( id == "choicesBytesThroughpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchAllGraphItems(flag) {\n\t$$('.graphCheckBox').each(function(checkbox) {\n\t\tif (!checkbox.disabled) {\n\t\t\tcheckbox.checked = flag;\n\t\t}\n\t});\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id)...
[ "0.53524375", "0.53500825", "0.53500825", "0.53500825", "0.53500825", "0.53500825", "0.53500825", "0.53500825", "0.53500825", "0.53500825", "0.5307892", "0.5307892", "0.5307892", "0.5307892", "0.5307892", "0.5307892", "0.5307892", "0.5307892", "0.5307892", "0.5307892", "0.530...
0.0
-1
set default origin/destination stations when stnList is received
static getDerivedStateFromProps(nextProps, prevState) { const hasStnList = nextProps.stnList.length > 0 ? true : false; if (!prevState.originStn && hasStnList) { prevState.originStn = nextProps.stnList[0]; } if (!prevState.destStn && hasStnList) { prevState.destStn = nextProps.stnList[0]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setStationLocations() {\n stations[0] = new Station(62 * windowWidth/575, windowHeight * 2 / 7);\n stations[1] = new Station(156 * windowWidth/575, windowHeight * 2 / 7);\n stations[2] = new Station(255 * windowWidth/575, windowHeight * 2 / 7);\n stations[3] = new Station(366 * windowWidth/575, window...
[ "0.61229205", "0.59025764", "0.57958484", "0.5589636", "0.54652166", "0.5391051", "0.53130823", "0.53117466", "0.5264654", "0.5190211", "0.51815546", "0.5176441", "0.5175263", "0.5150674", "0.50709844", "0.5038835", "0.5012576", "0.50117826", "0.5007282", "0.50032353", "0.499...
0.49592942
22
send message to user decrement availableCoins, increase reservedCoins
static updateStandingPredictionUser(author, pred, wager, callback) { const userUpdate = { $push: { messages: { message: "The wager " + pred.text +" has been approved by the Iron Bank. Watch and see if it comes true!", dismissed: false, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loseSevenCoins() {\n this.coins -= 7;\n }", "gainTwoCoins() {\n this.coins += 2;\n }", "function buyShovel(){\nif (cash >= clickUpgrades.shovel.price){ \n cash = cash - clickUpgrades.shovel.price,\n clickUpgrades.shovel.quantity+=1,\n clickUpgrades.shovel.price+=1,\n cashPC = cashPC + clickUpgrades...
[ "0.6662308", "0.6392549", "0.6255665", "0.62481165", "0.6223932", "0.62123096", "0.6160452", "0.5942144", "0.5939604", "0.58996886", "0.58860195", "0.58652496", "0.5852427", "0.5843614", "0.58407056", "0.5834618", "0.58303714", "0.5825523", "0.5823026", "0.5818695", "0.581077...
0.0
-1
send message to user increment availableCoins
static updateRejectedPredictionUser(author, pred, wager, callback) { const userUpdate = { $inc: { availableCoins: wager.coins, reservedCoins: -wager.coins }, $push: { messages: { message: "The salt wager " + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "gainTwoCoins() {\n this.coins += 2;\n }", "gainOneCoin() {\n this.coins += 1;\n }", "gainThreeCoins() {\n this.coins += 3;\n }", "function collectCoins() {\n playAudioCoin();\n this.classList.add('coin-collected');\n coins += 1;\n getCoins();\n ...
[ "0.6690531", "0.6634649", "0.6613598", "0.6519937", "0.64978623", "0.63637626", "0.62644136", "0.62567395", "0.6201052", "0.61296654", "0.6102674", "0.60825473", "0.603021", "0.6000263", "0.5999063", "0.599858", "0.5964633", "0.5963989", "0.59519035", "0.5950832", "0.5900484"...
0.0
-1
send message to user decrement availableCoins, decrese reserved TODO: do this for all wagers on this pred!
static updateTruePredictionUser(author, pred, wager, callback) { const userUpdate = { $inc: { coins: wager.coins, reservedCoins: -wager.coins }, $push: { messages: { message: "The wager " + pred.text +" has c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showLossAction() {\n //playerMoney -= playerBet;\n console.log(\"You Lost!\");\n resetFruitTally();\n}", "loseSevenCoins() {\n this.coins -= 7;\n }", "function enemyBuyOptionu() {\n if(enemyCash>300){\n enemyBuyU();\n }\n}", "function roboteggCollectorOn () {\n if (gameData.robo...
[ "0.61918336", "0.6153436", "0.61251605", "0.61164504", "0.6016264", "0.6002213", "0.5993354", "0.5939033", "0.59250283", "0.5922974", "0.5890569", "0.5889301", "0.5885766", "0.58804375", "0.5817918", "0.5793935", "0.5770022", "0.5767069", "0.57615703", "0.5761168", "0.5760376...
0.0
-1
send message to user decrement reservedCoins
static updateFalsePredictionUser(author, pred, wager, callback) { const userUpdate = { $inc: { reservedCoins: -wager.coins, lostCoins: wager.coins }, $push: { messages: { message: "Your wager " + pred.text +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loseSevenCoins() {\n this.coins -= 7;\n }", "loseThreeCoins() {\n this.coins -= 3;\n if (this.coins < 0) {\n this.coins = 0;\n }\n }", "loseTwoCoins() {\n if (this.coins < 2) {\n this.coins = 0;\n } else {\n this.coins -= 2;\n }\n }", "onClick() {\n // Remove a bushe...
[ "0.6465889", "0.6152621", "0.6051002", "0.5978813", "0.59377176", "0.5853151", "0.58509", "0.57916546", "0.5769651", "0.57661456", "0.57486534", "0.57478994", "0.5673361", "0.56431854", "0.5630972", "0.56178874", "0.5601355", "0.5600297", "0.55850744", "0.55651563", "0.556272...
0.0
-1
This function searching for pattern substring in vacancies list
function searchVacancy(event) { var openVacancy = document.getElementById("vacancy-id").children; var searchStr = document.getElementById("vacancy-search-id").value.toLowerCase(); if (event.keyCode > 32) { for(var i = 0; i < openVacancy.length; i++){ var startIndex = openVacancy[i].inne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkSubStringMatch(item) {\n return item.name.toLowerCase().includes(SearchString.toLowerCase());\n }", "function search(str) {\n\t\t\tif (str.length == 0) {\n\t\t\t\tbuild_list(items);\n\t\t\t} else {\n\t\t\t\tstr = str.split('\\\\').join('\\\\\\\\');\n\t\t\t\tmatches.length = 0;\n\t\t\t\tpattern ...
[ "0.5923604", "0.5533286", "0.5318858", "0.5293168", "0.5283753", "0.52829826", "0.5218803", "0.52185744", "0.5214202", "0.5161525", "0.5131438", "0.510901", "0.5064645", "0.5003493", "0.49918804", "0.4967487", "0.49554008", "0.49396223", "0.49322873", "0.49241418", "0.4916431...
0.48610562
28
Based on getPageScroll() by quirksmode.com
function getPageY(){ var yScroll; if(self.pageYOffset){ yScroll = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop) { yScroll = document.documentElement.scrollTop; } else if (document.body) {// all other Explorers yScroll = document.body.scrollTop; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPageScroll() {\n var xScroll, yScroll;\n\n if (self.pageYOffset)\n {\n yScroll = self.pageYOffset;\n xScroll = self.pageXOffset;\n } else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict\n yScroll = document.documentElement.scrollTop;\n xScroll...
[ "0.76897246", "0.761914", "0.75793195", "0.7518473", "0.7483463", "0.7464243", "0.7437774", "0.7429972", "0.74247426", "0.74056345", "0.72531354", "0.7120017", "0.7120017", "0.70782405", "0.7037326", "0.7037326", "0.7037326", "0.7037326", "0.698266", "0.6947981", "0.6917041",...
0.6514446
22
Populates popupObject with necessary data, and passes it to open method of windowManager effectively opening the popup. If image was clicked over in order to edit it, it will be replaced with new container
function showPopup (editor) { var popupObject, propertiesToSend; popupObject = preparePopupObject(); propertiesToSend = { window: window, editor_id : editor.editor_id, popup: popupObject }; popup = editor.windowManager.open(popupObject, prope...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OpenPopup( propsObj ) \r\n{\t\r\n\ttry {\r\n\t\tif(!propsObj.distFromTop) { propsObj.distFromTop = 100; }\r\n\t\tif(!propsObj.height) { propsObj.height = 500; }\r\n\t\tif(!propsObj.width) { propsObj.width = 500; }\r\n\t\tif(propsObj.title) { window.titleBarText = propsObj.title }\r\n\t\tif(propsObj.redire...
[ "0.692838", "0.68453217", "0.6614162", "0.6406276", "0.63022685", "0.61996037", "0.6192229", "0.6189091", "0.6167469", "0.61409205", "0.61022156", "0.6073946", "0.60510594", "0.6043436", "0.602107", "0.6011137", "0.60021883", "0.59524757", "0.5936517", "0.59301716", "0.592703...
0.5528905
100
Creates popupObject required for popup creation, and sets all handlers all handlers must be passed through to parent from iframe
function preparePopupObject() { var height = $( window ).height() * 9 / 10; //90% with limit on 700px if (height > 700) { height = 700; } return { file : IMAGES_URL, title : "Insert image", width : $( window ).width() * 9 / 10, //90% ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PopupMenu_CreateHTMLObject(theObject)\n{\n\t//create the div\n\tvar theHTML = document.createElement(\"div\");\n\t//FIRST THING TO DO: SET OBJECT REFERENCE\n\ttheObject.HTML = theHTML;\n\ttheHTML.InterpreterObject = theObject;\n\ttheHTML.id = theObject.DataObject.Id;\n\t//add directly to our parent\n\tthe...
[ "0.6493965", "0.64263344", "0.6371444", "0.62931263", "0.62558144", "0.625442", "0.6196589", "0.61670643", "0.61471385", "0.6057699", "0.59494054", "0.59341246", "0.5921979", "0.5908771", "0.5902689", "0.5881588", "0.5877702", "0.5868853", "0.5824184", "0.5819471", "0.5810827...
0.5297788
65
Inserts selected image back into main editor window, closing the popup
function insertImage() { var data, container, images; detectPlugin('rasimage'); data = $(getIframe()).contents().find('input[name="' + SELECTED_IMAGE_CLASS + '"]').data(); var content = renderPluginContent($(getIframe()).contents().find('#lightbox').prop('checked'), data); container = '<div class=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openOldImageDialog(title,onInsert){\r\n\t\tvar params = \"type=image&post_id=0&TB_iframe=true\";\r\n\t\t\r\n\t\tparams = encodeURI(params);\r\n\t\t\r\n\t\ttb_show(title,'media-upload.php?'+params);\r\n\t\t\r\n\t\twindow.send_to_editor = function(html) {\r\n\t\t\t tb_remove();\r\n\t\t\t var urlImage = jQue...
[ "0.639211", "0.6342929", "0.6259266", "0.6228133", "0.6225105", "0.6091711", "0.5962957", "0.59470713", "0.59107065", "0.5883446", "0.58599174", "0.5848421", "0.5842812", "0.5828605", "0.580265", "0.57984704", "0.5772132", "0.57584536", "0.57493955", "0.57388777", "0.5710003"...
0.5764436
17
most common letter in the array, and a count of how many times it appears. The function should not count spaces or punctuation.
function mostCommonLetter(string){ var max_val = 0; var max = []; const hash = makeObject(string.split("")); for (var property in hash){ var value = hash[property]; if (value > max_val && property.match(/[a-z]/)){ max_val = value; max = [property,value]; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highestFreq (str) {\n\t// Create an object displaying the character count for each character.\n \tlet count = str.split('').reduce((a,b) => {\n \ta[b] ? a[b] ++ : a[b] = 1;\n \treturn a;\n \t},{});\n \t// Reduce the keys of our count object\n \treturn Object.keys(count).reduce((a,b,c) => {\n \t\t// ...
[ "0.70689714", "0.70276153", "0.6998593", "0.6967429", "0.69510126", "0.69470847", "0.69439447", "0.6886947", "0.6839723", "0.68130875", "0.6809954", "0.6788162", "0.6751625", "0.6688149", "0.66719717", "0.66435045", "0.66419786", "0.66340184", "0.6628495", "0.66195595", "0.66...
0.6645011
15
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "ASIS" BASIS, WITHOUT WARRANTIES...
function ConversationSkin( $scope, $timeout, $window, warningsData, messengerService, oppiaPlayerService) { var urlParams = $scope.getUrlParams(); $scope.iframed = !!urlParams.iframed; $scope.showPage = !$scope.iframed; $scope.hasInteractedAtLeastOnce = false; $window.addEventListener('beforeunloa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient private internal function m185() {}", "transient private protected internal function m182() {}", "function version(){ return \"0.13.0\" }", "static final private internal function m106() {}", "transient final protecte...
[ "0.58308905", "0.5825461", "0.54966676", "0.54548806", "0.5444454", "0.5393702", "0.53810525", "0.52856684", "0.5244303", "0.524405", "0.5233188", "0.5193934", "0.51784855", "0.5164272", "0.5155304", "0.5154935", "0.51485944", "0.51470554", "0.5135127", "0.512333", "0.509516"...
0.0
-1
This sample demonstrates how to The Update Domain Service operation can be used to update the existing deployment. The update call only supports the properties listed in the PATCH body.
async function updateDomainService() { const subscriptionId = "1639790a-76a2-4ac4-98d9-8562f5dfcb4d"; const resourceGroupName = "TestResourceGroup"; const domainServiceName = "TestDomainService.com"; const domainService = { configDiagnostics: { lastExecuted: new Date("2021-05-05T12:00:23Z;"), va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_k8s_deployment() {\n deployment_info = k8s.callWS('/apis/apps/v1/namespaces/' + k8s_namespace + \"/deployments/myvd-\" + k8s_obj.metadata.name,\"\",0);\n\n if (deployment_info.code == 200) {\n\n deployment = JSON.parse(deployment_info.data);\n\n\n patch = {\n \"spec\"...
[ "0.655081", "0.59891814", "0.53984195", "0.5106364", "0.5088774", "0.5088303", "0.50550866", "0.50516564", "0.4994003", "0.4984773", "0.49318975", "0.49318975", "0.49318975", "0.49318975", "0.49318975", "0.49318975", "0.49318975", "0.4913813", "0.48847595", "0.48847055", "0.4...
0.6535548
1
move function setting variables (empty)
function move(newIndex) { var animateLeft, slideLeft; //invoking advance function advance(); //if the slider is animated = moving, stops function (return) if($group.is(':animated') || currentIndex === newIndex) { return; } buttonArray[currentIndex].removeClass('active'); buttonArray[newIndex]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateVariables(move) { }", "move() { }", "move() { }", "move(args) {\n\n }", "move() {\n }", "updatePosition(position, move) {\n position[move.to] = position[move.from];\n position[move.from] = null;\n }", "function move(from, to) {\n\n}", "move() {\n\n }", "move () {\n }", "AllowNu...
[ "0.7068953", "0.6612803", "0.6612803", "0.6564077", "0.65559053", "0.6528332", "0.6459014", "0.64552915", "0.63812315", "0.63047606", "0.61732244", "0.6166184", "0.6131085", "0.60953087", "0.60475254", "0.6001332", "0.59357995", "0.59230924", "0.59225386", "0.59056145", "0.58...
0.0
-1
Returns true if both chat items are acknowledgeable, have no acknowledgments, and were created within 60 seconds of eachother
isContiguousWith(chatItem) { if (chatItem instanceof AcknowledgableChatItem_1.AcknowledgableChatItem && this instanceof AcknowledgableChatItem_1.AcknowledgableChatItem) { if (chatItem.acknowledgments.length > 0 || this.acknowledgments.length > 0) return false; const { dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function conversationIsEnabled(created, updated){\n\tvar isActive = false;\n\tvar strCreated = created.split(\"T\");\n\tvar strUpdated = updated.split(\"T\");\n\tvar dateCreated = strCreated[0];\n\tvar timeCreated = strCreated[1].split(\":\");\n\tvar dateUpdated = strUpdated[0];\n\tvar timeUpdated = strUpdated[1]....
[ "0.6178814", "0.5987688", "0.5860304", "0.5747234", "0.5702561", "0.5680924", "0.5668329", "0.5559008", "0.55383736", "0.55191493", "0.5518314", "0.5467369", "0.5448552", "0.5442561", "0.5435064", "0.54081017", "0.5404797", "0.53734636", "0.53612554", "0.5340511", "0.53291744...
0.7353529
0
Returns the hour and day of where the click occurred
function decodeEvent0(clientX, clientY, numDays, startHour, endHour) { const calendar = document.getElementById("event-calendar"); const boundingBox = calendar.getBoundingClientRect(); // x is px for days const x = clientX - boundingBox.left; //x position within the element. // y is px for hours const y = c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTimeAndDay(entry) {\n var id = entry.attr('id');\n return id.split(\"-\");\n }", "function hourNow() {\n return (new Date).getHours();\n}", "function getHours() {\r\n\tlet date = new Date();\r\n\tlet hour = date.getHours();\r\n\r\n\treturn hour;\r\n}", "function returnHour(){\n\tvar date ...
[ "0.61571425", "0.6128765", "0.6058594", "0.59707826", "0.59303975", "0.5894947", "0.5778573", "0.57042015", "0.56713", "0.5651738", "0.564432", "0.56230855", "0.55789614", "0.55529827", "0.5478922", "0.54550254", "0.54504615", "0.54351753", "0.5420105", "0.5412602", "0.540969...
0.0
-1
Handles a brush event, toggling the display of foreground lines.
function brush() { render.invalidate(); var actives = []; svg.selectAll(".axis .brush") .filter(function(d) { return d3.brushSelection(this); }) .each(function(d) { actives.push({ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function brush() {\n // Get all the active brushes (the one that are not empty)\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); });\n // Get the min and max covered by active brushes\n var extents = actives.map(function(p) { return y[p].brush.extent(); });\n\n // For all the foregr...
[ "0.7295593", "0.72506595", "0.71831656", "0.6955421", "0.69208777", "0.6909539", "0.6880049", "0.68485016", "0.68485016", "0.68440384", "0.6786918", "0.6768102", "0.67191696", "0.671046", "0.6696617", "0.6586233", "0.6582614", "0.6540441", "0.6532353", "0.6468224", "0.6462489...
0.57015914
68
This function is called by the aliased method
keypressInput(e) { // console.log(e); let keycode = event.key; // also for cross-browser compatible (this.acceptMoves) && this.ea.publish('keyPressed', keycode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get alias() {\n\t\treturn this.__alias;\n\t}", "function mtTranslateAlias(k, d) { spec[k] = getOwn(d, spec[k], spec[k]); }", "transient final protected internal function m174() {}", "alias(token) {\n return target => token.getValueFor(target);\n }", "alias() {\n return this.get('ALIASNAME');\n ...
[ "0.5893395", "0.5862072", "0.578804", "0.5771244", "0.5760698", "0.57360685", "0.56887853", "0.5648101", "0.5640437", "0.5630379", "0.56054085", "0.558989", "0.5535715", "0.5535715", "0.5535715", "0.5535715", "0.55025536", "0.54986566", "0.5492872", "0.5470709", "0.5444637", ...
0.0
-1
Decrease number of mines according the marked tiles
function minesLeft() { const markedTilesCount = board.reduce((count, row) => { return count + row.filter(tile => tile.status === TILE_STATUSES.MARKED).length }, 0) mineLeftText.textContent = NUMBER_OF_MINES - markedTilesCount }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMinesAround() {\n\n for (let i = 0; i < tiles.length; i++) {\n let minesAround = 0;\n \n if (tiles[i].classList.contains('empty')) {\n\n // North\n if (i > 9 && tiles[N(i)].classList.contains('mine')) {\n minesAround++;\n }\n \n // North-East\n if (i > 9 && !i...
[ "0.6466373", "0.6248793", "0.6248589", "0.62137455", "0.6171647", "0.6101396", "0.6094169", "0.6039977", "0.5987998", "0.59625053", "0.59455067", "0.59443104", "0.5916956", "0.59145105", "0.5899606", "0.58912355", "0.58752984", "0.5869833", "0.58693135", "0.58516634", "0.5848...
0.61076593
5
FlaskSecurity API JSON response has: ["response"]["error"] = str OR ["response"]["errors"][""] = list of str Given a response look for errors and return True if there were some.
function display_errors(response, id) { if (!("error" in response) && !("errors" in response)){ return false } const error_element = document.getElementById(id) if (error_element) { if ("error" in response) { error_element.innerHTML = `<b>ERROR</b>: <em>${response["error"]}</em` } else if ("er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForErrors(response) {\n if (response.ok) {\n return response.json();\n } else {\n throw Error(response.statusText);\n }\n }", "function isResponseValid() {\n var isValid = true;\n if (typeof response['HotelList'] !== 'object' ||\n response.HotelList.leng...
[ "0.67290264", "0.66819924", "0.66470116", "0.6401506", "0.63397676", "0.6335457", "0.6298956", "0.62433255", "0.62252235", "0.6205416", "0.61969733", "0.61960244", "0.61960244", "0.61721516", "0.61670375", "0.61436385", "0.60708374", "0.60318774", "0.60246897", "0.6021836", "...
0.62117714
9
This function should return a promise
function updateDatProfile(you, them) { var uidURL = you.uid; var updateProfileRef = new Firebase('https://carousel-of-love.firebaseio.com/Users/'+uidURL+'/'); // Update the profile with all the values from the input fields updateProfileRef.set({ "About" : $("textarea[name='profile']").val(), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static promiseURI(theURI, form) {\nreturn new Promise((resolve, reject) => {\nvar theCB;\ntheCB = (val, errC, errT, part) => {\nif (errC > 0) {\nif (typeof lggr.trace === \"function\") {\nlggr.trace(`promiseURI ${theURI} rejecting ${errT}`);\n}\nreturn reject(new Error(JSON.stringify([errC, errT, part])));\n} else...
[ "0.62563735", "0.61982805", "0.6189624", "0.60574096", "0.6049045", "0.59931076", "0.59515274", "0.59485185", "0.5939554", "0.59361374", "0.5927776", "0.5924844", "0.59140545", "0.58950835", "0.5884845", "0.587006", "0.58655566", "0.5862613", "0.58623916", "0.58481836", "0.58...
0.0
-1
THIS CONSTRUCTOR WILL HOLD MULTIPLE PLAYER OBJECTS
function Game() { this.player = [], this.currentId = 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initPlayerObjects() {\n var numfriendlyPlayers = 1;\n\n for (var i = 0; i < numfriendlyPlayers; i++) {\n // Create new star and push it to the friendlyPlayers array\n friendlyPlayers.push(new Player((i / numfriendlyPlayers) * 5.0, i / numfriendlyPlayers));\n }\n}", "constructor(_name = \"\", _d...
[ "0.7286839", "0.72240204", "0.7055258", "0.70247173", "0.70067173", "0.69855917", "0.69389975", "0.6896819", "0.68781376", "0.67868507", "0.6765788", "0.6759348", "0.67542756", "0.6746565", "0.66880214", "0.6679604", "0.6671552", "0.6632406", "0.65995747", "0.65550786", "0.65...
0.0
-1