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
Convert an array bytes to an array of littleendian words Characters >255 have their highbyte silently ignored.
function bytesToWords(input) { var i; var output = []; output[(input.length >> 2) - 1] = undefined; for (i = 0; i < output.length; i += 1) { output[i] = 0; } var length8 = input.length * 8; for (i = 0; i < length8; i += 8) { output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; } return outpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}", "funct...
[ "0.7200717", "0.7200717", "0.7200717", "0.7200717", "0.7200717", "0.7200717", "0.71074295", "0.70816743", "0.70816743", "0.70816743", "0.70816743", "0.6904962", "0.6855157", "0.6807172", "0.6612748", "0.6484283", "0.6415348", "0.6371551", "0.6257897", "0.61460245", "0.6137803...
0.7168494
6
Add integers, wrapping at 2^32. This uses 16bit operations internally to work around bugs in some JS interpreters.
function safeAdd(x, y) { var lsw = (x & 0xffff) + (y & 0xffff); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return msw << 16 | lsw & 0xffff; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n}", "function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b...
[ "0.7800228", "0.7800228", "0.77586955", "0.7742032", "0.7737177", "0.7730894", "0.7730894", "0.7723056", "0.77207667", "0.76973903", "0.7693705", "0.7693705", "0.76818234", "0.76818234", "0.76818234", "0.7523649", "0.74487966", "0.72901595", "0.71555746", "0.7140419", "0.7063...
0.6760609
46
Bitwise rotate a 32bit number to the left.
function bitRotateLeft(num, cnt) { return num << cnt | num >>> 32 - cnt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bitRotateLeft(num,cnt){return num<<cnt|num>>>32-cnt;}", "function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }", "function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }", "function bitRotateLeft (num, cnt) {\n return (num << cnt...
[ "0.87508583", "0.8438198", "0.8438198", "0.8438198", "0.8438198", "0.8334637", "0.83200794", "0.8303131", "0.78028613", "0.772624", "0.77101445", "0.7570813", "0.7397471", "0.7397471", "0.73963314", "0.73750615", "0.73750615", "0.73750615", "0.73750615", "0.73750615", "0.7375...
0.8341921
15
These functions implement the four basic operations the algorithm uses.
function md5cmn(q, a, b, x, s, t) { return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BasicOp(a, b) {\n var sum = a + b;\n console.log(\"sum\" + sum);\n var sub = a - b;\n console.log(\"sub\" + sub);\n var multi = a * b;\n console.log(\"multiplication\" + multi);\n var div = a / b;\n console.log(\"devision\" + sub);\n}", "function arithmaticOpration(){\n\taddition();\n\tSubstrati...
[ "0.614667", "0.60421485", "0.5994541", "0.5898469", "0.57985216", "0.5742825", "0.5727613", "0.57271165", "0.56053096", "0.55835235", "0.5573103", "0.55728894", "0.55604", "0.5515135", "0.550902", "0.55050015", "0.54754686", "0.5475394", "0.5429418", "0.54290855", "0.54249525...
0.0
-1
Adapted from Chris Veness' SHA1 code at
function f(s, x, y, z) { switch (s) { case 0: return x & y ^ ~x & z; case 1: return x ^ y ^ z; case 2: return x & y ^ x & z ^ y & z; case 3: return x ^ y ^ z; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SHA1(s){function U(a,b,c){while(0<c--)a.push(b)}function L(a,b){return(a<<b)|(a>>>(32-b))}function P(a,b,c){return a^b^c}function A(a,b){var c=(b&0xFFFF)+(a&0xFFFF),d=(b>>>16)+(a>>>16)+(c>>>16);return((d&0xFFFF)<<16)|(c&0xFFFF)}var B=\"0123456789abcdef\";return(function(a){var c=[],d=a.length*4,e;for(var ...
[ "0.837422", "0.837422", "0.81581235", "0.81581235", "0.81581235", "0.81581235", "0.81581235", "0.81581235", "0.81581235", "0.81475925", "0.8111874", "0.8091433", "0.8077196", "0.80572677", "0.8054155", "0.803335", "0.80330634", "0.8013599", "0.80105263", "0.80105263", "0.8010...
0.0
-1
See for API details
function v1(options, buf, offset) { var i = buf && offset || 0; var b = buf || []; options = options || {}; var node = options.node || _nodeId; var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not // specifi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "obtain(){}", "function API(){}", "function API(){}", "private internal function m248() {}", "transient private internal function m185() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "protected ...
[ "0.64539295", "0.628222", "0.6083875", "0.6083875", "0.58966196", "0.58931714", "0.5843906", "0.5807617", "0.56874675", "0.55977154", "0.55894995", "0.55894995", "0.5536012", "0.54927725", "0.547576", "0.5461862", "0.5457917", "0.54515964", "0.54515964", "0.54515964", "0.5451...
0.0
-1
Build a destructive iterator for the value list
function iteratorFor(items) { var iterator = { next: function() { var value = items.shift(); return {done: value === undefined, value: value} } }; if (support.iterable) { iterator[Symbol.iterator] = function() { return iterator }; } return iterator ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createIteratorFromValue(value){\n return (function(){\n let used = false;\n\n return {\n next: function(){\n try {\n return used ? {done: true} : {value: value, done: false};\n ...
[ "0.6567051", "0.61971587", "0.6129268", "0.60959846", "0.6081213", "0.6081213", "0.60518825", "0.60518825", "0.60518825", "0.60518825", "0.60518825", "0.60395825", "0.6019784", "0.6000144", "0.593555", "0.59003186", "0.5864537", "0.58550805", "0.57782644", "0.57182074", "0.56...
0.0
-1
Picks the preferred compaction term from the given inverse context entry.
function _selectTerm( activeCtx, iri, value, containers, typeOrLanguage, typeOrLanguageValue) { if(typeOrLanguageValue === null) { typeOrLanguageValue = '@null'; } // preferences for the value of @type or @language const prefs = []; // determine prefs for @id based on whether or not va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _createInverseContext() {\n var activeCtx = this;\n\n // lazily create inverse\n if(activeCtx.inverse) {\n return activeCtx.inverse;\n }\n var inverse = activeCtx.inverse = {};\n\n // handle default language\n var defaultLanguage = activeCtx['@language'] || '@none';\n\n // cre...
[ "0.49174193", "0.49174193", "0.49174193", "0.49174193", "0.48344064", "0.47892135", "0.4749464", "0.4735939", "0.4735939", "0.4735939", "0.4735939", "0.4735939", "0.4685858", "0.46695247", "0.46644682", "0.461741", "0.45761716", "0.45761716", "0.45761716", "0.45761716", "0.45...
0.45934469
16
Generates an inverse context for use in the compaction algorithm, if not already generated for the given active context.
function _createInverseContext() { const activeCtx = this; // lazily create inverse if(activeCtx.inverse) { return activeCtx.inverse; } const inverse = activeCtx.inverse = {}; // variables for building fast CURIE map const fastCurieMap = activeCtx.fa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _createInverseContext() {\n const activeCtx = this;\n\n // lazily create inverse\n if (activeCtx.inverse) {\n return activeCtx.inverse;\n }\n const inverse = activeCtx.inverse = {};\n\n // variables for building fast CURIE map\n const fastCurieMap = activeCtx.fastCurieMap = {};\n...
[ "0.71982336", "0.71161157", "0.71161157", "0.71161157", "0.71161157", "0.7082625", "0.62059164", "0.6131775", "0.6131775", "0.6131775", "0.6131775", "0.5247499", "0.51584256", "0.51112837", "0.4993452", "0.49811417", "0.49811417", "0.49811417", "0.49811417", "0.49811417", "0....
0.7060768
6
Runs a recursive algorithm to build a lookup map for quickly finding potential CURIEs.
function _buildIriMap(iriMap, key, idx) { const entries = iriMap[key]; const next = iriMap[key] = {}; let iri; let letter; for(const entry of entries) { iri = entry.iri; if(idx >= iri.length) { letter = ''; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeLookupTables()\n{\n\tfor(var loop = 0; loop < 360; loop++)\n\t{\n\t\tdeg2rad[loop] = degToRad(loop);\n\t\t\n\t\tsine[loop] = Math.sin(deg2rad[loop]);\n\t\t\n\t\tcosine[loop] = Math.cos(deg2rad[loop]);\n\t\t\n\t\ttangent[loop] = Math.tan(deg2rad[loop]);\n\t}\n\t\n\t/*\n\tfor(some granularity of radians...
[ "0.540251", "0.5311126", "0.527645", "0.5215158", "0.5198356", "0.51666963", "0.512547", "0.5088617", "0.5064267", "0.50146395", "0.50118977", "0.50042367", "0.49996608", "0.49832717", "0.49832717", "0.49832717", "0.4961401", "0.4944083", "0.4936794", "0.4931245", "0.4909585"...
0.4854122
32
Adds the term for the given entry if not already added.
function _addPreferredTerm(term, entry, typeOrLanguageValue) { if(!entry.hasOwnProperty(typeOrLanguageValue)) { entry[typeOrLanguageValue] = term; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _addPreferredTerm(term, entry, typeOrLanguageValue) {\n if (!entry.hasOwnProperty(typeOrLanguageValue)) {\n entry[typeOrLanguageValue] = term;\n }\n }", "function _addPreferredTerm(mapping, term, entry, typeOrLanguageValue) {\n if(!(typeOrLanguageValue in entry)) {\n entry[typeOrLang...
[ "0.6736275", "0.66705436", "0.66705436", "0.66705436", "0.66705436", "0.66705436", "0.6329206", "0.6318393", "0.59796625", "0.5670128", "0.55823046", "0.55814475", "0.55724335", "0.54960656", "0.54503876", "0.54104763", "0.5290073", "0.5258773", "0.52440745", "0.52089465", "0...
0.6749207
0
Clones an active context, creating a child active context.
function _cloneActiveContext() { const child = {}; child.mappings = util.clone(this.mappings); child.clone = this.clone; child.inverse = null; child.getInverse = this.getInverse; child.protected = util.clone(this.protected); if(this.previousContext) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _cloneActiveContext() {\n const child = {};\n child.mappings = util.clone(this.mappings);\n child.clone = this.clone;\n child.inverse = null;\n child.getInverse = this.getInverse;\n child.protected = util.clone(this.protected);\n if (this.previousContext) {\n child.previousContex...
[ "0.6862765", "0.6788757", "0.6788757", "0.6788757", "0.6788757", "0.6788757", "0.62925607", "0.6145718", "0.5751539", "0.56024176", "0.54094976", "0.53981984", "0.53981876", "0.5396501", "0.5392299", "0.5387706", "0.531324", "0.531324", "0.531324", "0.531324", "0.53106177", ...
0.68392205
1
Reverts any typescoped context in this active context to the previous context.
function _revertToPreviousContext() { if(!this.previousContext) { return this; } return this.previousContext.clone(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shiftContext() {\n this.contexts.shift();\n this.setContext(this.contexts[0]);\n}", "function shiftContext() {\n\t this.contexts.shift();\n\t this.setContext(this.contexts[0]);\n\t}", "function shiftContext() {\n\t this.contexts.shift();\n\t this.setContext(this.contexts[0]);\n\t}", "function ...
[ "0.67691195", "0.6726239", "0.6726239", "0.6719133", "0.6658657", "0.6626577", "0.6581186", "0.63305444", "0.623176", "0.6044647", "0.6039065", "0.59303284", "0.5848386", "0.5803555", "0.57343215", "0.5729932", "0.5719848", "0.5719848", "0.5701598", "0.5701598", "0.5680772", ...
0.6605072
6
Expand each key and value of element adding to result
function _expandObject({ activeCtx, activeProperty, expandedActiveProperty, element, expandedParent, options = {}, insideList, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addKeyAndValue(arr, key, value){\nreturn arr.reduce(function(accm, next, idx){\naccm[idx] [key] = value;\nreturn accm;\n},arr)\n}", "function expand(data) {\n var rt\n\n if (utilx.isObject(data)) {\n rt = {}\n Object.keys(data).forEach(function(k) {\n // ignore return value derived from tem...
[ "0.5666636", "0.56385946", "0.56341314", "0.54579544", "0.53617847", "0.5359742", "0.5352563", "0.5343504", "0.53325", "0.53300124", "0.5226525", "0.517934", "0.51492804", "0.5141779", "0.5140224", "0.5109914", "0.51029265", "0.5098183", "0.5009009", "0.4894427", "0.4858231",...
0.49067912
19
Creates a new IdentifierIssuer. A IdentifierIssuer issues unique identifiers, keeping track of any previously issued identifiers.
constructor(prefix) { this.prefix = prefix; this.counter = 0; this.existing = {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IdentifierIssuer(prefix) {\n this.prefix = prefix;\n this.counter = 0;\n this.existing = {};\n}", "function IdentifierIssuer(prefix) {\n this.prefix = prefix;\n this.counter = 0;\n this.existing = {};\n}", "function IdentifierIssuer(prefix) {\n this.prefix = prefix;\n this.counter = 0;\n this...
[ "0.696795", "0.696795", "0.696795", "0.5217142", "0.506314", "0.5025471", "0.5022195", "0.49233925", "0.4882263", "0.48435885", "0.4602926", "0.4593636", "0.45735624", "0.45142335", "0.45027333", "0.4490352", "0.44736865", "0.4473085", "0.44641224", "0.44608092", "0.44052756"...
0.0
-1
Gets the new identifier for the given old identifier, where if no old identifier is given a new identifier will be generated.
getId(old) { // return existing old identifier if(old && old in this.existing) { return this.existing[old]; } // get next identifier const identifier = this.prefix + this.counter; this.counter += 1; // save mapping if(old) { this.existing[old] = identifier; } retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getId(old) {\n // return existing old identifier\n const existing = old && this._existing.get(old);\n if(existing) {\n return existing;\n }\n\n // get next identifier\n const identifier = this.prefix + this.counter;\n this.counter++;\n\n // save mapping\n if(old) {\n this._exis...
[ "0.78103524", "0.7809994", "0.76968646", "0.6354916", "0.63256615", "0.6071396", "0.597056", "0.58234775", "0.58208424", "0.58148366", "0.57252353", "0.57041633", "0.5673865", "0.5587018", "0.5584197", "0.5578676", "0.55093956", "0.54740614", "0.5468597", "0.54401", "0.543903...
0.7764602
2
Returns true if the given old identifer has already been assigned a new identifier.
hasId(old) { return (old in this.existing); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasId(old) {\n return this._existing.has(old);\n }", "hasId(old) {\n return this._existing.has(old);\n }", "hasId(old) {\n return old in this.existing;\n }", "function is_ident(a,b) {\n\tvar identical = false;\n\tif (typeof(a)==typeof(b)) {\n\t\tif (a==b) {\n\t\t\tidentical = true; }}\n\treturn i...
[ "0.65985787", "0.65985787", "0.65448827", "0.5992087", "0.558431", "0.5312151", "0.53107846", "0.5289739", "0.52620536", "0.5244666", "0.52412874", "0.5220882", "0.5215839", "0.51632345", "0.51517427", "0.51241016", "0.5107565", "0.5104535", "0.5086042", "0.50669515", "0.5035...
0.6451052
3
Labels the blank nodes in the given value using the given IdentifierIssuer.
function _labelBlankNodes(issuer, element) { if(types.isArray(element)) { for(let i = 0; i < element.length; ++i) { element[i] = _labelBlankNodes(issuer, element[i]); } } else if(graphTypes.isList(element)) { element['@list'] = _labelBlankNodes(issuer, element['@list']); } else if(types.isObject...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _labelBlankNodes(issuer, element) {\n if(_isArray(element)) {\n for(var i = 0; i < element.length; ++i) {\n element[i] = _labelBlankNodes(issuer, element[i]);\n }\n } else if(_isList(element)) {\n element['@list'] = _labelBlankNodes(issuer, element['@list']);\n } else if(_isObject(element...
[ "0.6838735", "0.6838735", "0.6838735", "0.67854494", "0.5455094", "0.5455094", "0.5378816", "0.48738277", "0.48738277", "0.48738277", "0.4833792", "0.4783606", "0.47574446", "0.46912456", "0.467747", "0.4663731", "0.4561205", "0.45471764", "0.45369002", "0.44542295", "0.44503...
0.6802975
3
Candidates: NodeFactory.registerNamespace("prov", " A shortcut for NodeFactory.term(str) turns a TTL string representation of an RDF term into a proper RDF term. This will also use the globally registered namespace prefixes.
function T(str) { return NodeFactory.term(str) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createResolverString() {\n\tvar retval = [];\n\tfor( var item in Jath.namespaces ) {\n\t\tif( item == \"_\" ) {\n\t\t\tretval.push( \"xmlns='\" + Jath.namespaces[item] + \"'\" );\n\t\t}\n\t\telse {\n\t\t\tretval.push( \"xmlns:\" + item + \"='\" + Jath.namespaces[item] + \"'\" );\n\t\t}\n\t}\n\treturn retv...
[ "0.54210526", "0.53763974", "0.5353552", "0.53259313", "0.5305001", "0.52901787", "0.5181954", "0.5134779", "0.5134779", "0.5092395", "0.5092395", "0.507921", "0.49895447", "0.49612775", "0.49564937", "0.4947134", "0.49336323", "0.49336323", "0.48981556", "0.48803687", "0.487...
0.48515797
24
Creates a query object for a given graph and optional initial solution. The resulting object can be further refined using the functions on AbstractQuery such as match() and filter(). Functions such as nextSolution() can be used to get the actual results.
function RDFQuery(graph, initialSolution) { return new StartQuery(graph, initialSolution ? initialSolution : []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RDFQuery(graph, initialSolution) {\r\n return new StartQuery(graph, initialSolution ? initialSolution : []);\r\n}", "function StartQuery(source, initialSolution) {\n this.source = source;\n if (initialSolution && initialSolution.length > 0) {\n this.solution = initialSolution;\n } els...
[ "0.7458259", "0.6295969", "0.6278393", "0.55522805", "0.54594785", "0.5438404", "0.5433524", "0.5405926", "0.5274687", "0.526348", "0.5214645", "0.51956785", "0.51935947", "0.5178264", "0.51471364", "0.51014435", "0.49804875", "0.4924121", "0.4906946", "0.48925108", "0.488386...
0.74467206
1
Expression functions may be used in filter and bind queries Creates a function that takes a solution and compares a given node with the binding of a given variable from that solution.
function exprEquals(varName, node) { return function(sol) { return node.equals(sol[var2Attr(varName)]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exprEquals(varName, node) {\r\n return function(sol) {\r\n return node.equals(sol[var2Attr(varName)]);\r\n }\r\n}", "function functionFindAndReplace(node, state) {\n var comp, parts, func\n parts = generators[node.type](node)\n for (var i = 0; i < parsed_dsl[node.type].length; i++) {\n ...
[ "0.6560241", "0.577191", "0.5656358", "0.5621368", "0.561857", "0.55596715", "0.54614794", "0.5452605", "0.54302454", "0.536215", "0.53156334", "0.5269132", "0.5231203", "0.5199363", "0.51698637", "0.5095569", "0.50820804", "0.5050827", "0.5011937", "0.49780568", "0.494662", ...
0.65282303
1
Creates a function that takes a solution and compares a given node with the binding of a given variable from that solution.
function exprNotEquals(varName, node) { return function(sol) { return !node.equals(sol[var2Attr(varName)]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exprEquals(varName, node) {\r\n return function(sol) {\r\n return node.equals(sol[var2Attr(varName)]);\r\n }\r\n}", "function exprEquals(varName, node) {\n return function(sol) {\n return node.equals(sol[var2Attr(varName)]);\n }\n}", "function functionFindAndReplace(node, sta...
[ "0.6229217", "0.61980104", "0.5790122", "0.5358336", "0.5280755", "0.52350736", "0.51387745", "0.5079411", "0.5079411", "0.5023374", "0.48539564", "0.4838772", "0.4838772", "0.48185703", "0.48102334", "0.4743697", "0.4732659", "0.4702775", "0.4702775", "0.4702775", "0.4702775...
0.5251265
5
END OF PUBLIC API class BindQuery Takes all input solutions but adds a value for a given variable so that the value is computed by a given function based on the current solution. It is illegal to use a variable that already has a value from the input.
function BindQuery(input, varName, bindFunction) { this.attr = var2Attr(varName); this.source = input.source; this.input = input; this.bindFunction = bindFunction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BindQuery(input, varName, bindFunction) {\r\n this.attr = var2Attr(varName);\r\n this.source = input.source;\r\n this.input = input;\r\n this.bindFunction = bindFunction;\r\n}", "_substituteVariables(query, variables, definedParameters) {\n const keys = Object.keys(variables);\n\n if (...
[ "0.6823844", "0.58111244", "0.52337444", "0.5092569", "0.5089885", "0.50876087", "0.50796765", "0.4959359", "0.4945765", "0.4944387", "0.49027276", "0.48678225", "0.48635146", "0.48164842", "0.4811888", "0.4805601", "0.47964492", "0.47932732", "0.47541183", "0.47434515", "0.4...
0.68360144
0
class FilterQuery Filters the incoming solutions, only letting through those where filterFunction(solution) returns true
function FilterQuery(input, filterFunction) { this.source = input.source; this.input = input; this.filterFunction = filterFunction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FilterQuery(input, filterFunction) {\r\n this.source = input.source;\r\n this.input = input;\r\n this.filterFunction = filterFunction;\r\n}", "\"filter:database\"(queryPayload) {\n return queryDatabase(queryPayload, (data, attrs) => _.filter(data.results, attrs));\n }", "filte...
[ "0.6711514", "0.61055624", "0.6097135", "0.6092635", "0.59935224", "0.5908583", "0.5901184", "0.588799", "0.58459806", "0.58333707", "0.58179265", "0.58133227", "0.58019054", "0.58019054", "0.5751289", "0.5747103", "0.5740054", "0.57039577", "0.5684493", "0.56603175", "0.5642...
0.6754351
0
class LimitQuery Only allows the first n values of the input query through
function LimitQuery(input, limit) { this.source = input.source; this.input = input; this.limit = limit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LimitQuery(input, limit) {\r\n this.source = input.source;\r\n this.input = input;\r\n this.limit = limit;\r\n}", "limit(limit) {\n // Respect the one-limit-per-query lock.\n if (this.hasLimit) throw new QueryError('Query already has limit');\n this.hasLimit = true;\n\n ...
[ "0.75229967", "0.68502355", "0.6829497", "0.68213606", "0.66965455", "0.65613633", "0.65571237", "0.6452426", "0.6451633", "0.6367578", "0.6338746", "0.6302542", "0.6242069", "0.6237492", "0.6185669", "0.6185551", "0.61712813", "0.6077578", "0.6007733", "0.6001568", "0.598740...
0.7525958
0
class MatchQuery Joins the solutions from the input Query with triple matches against the current input graph.
function MatchQuery(input, s, p, o) { this.source = input.source; this.input = input; if(typeof s === 'string') { if(s.indexOf('?') == 0) { this.sv = var2Attr(s); } else { this.s = T(s); } } else { this.s = s; } if(typeof p === ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "processQuery(query) {\n const terms = query.split(' ');\n const stemmed = terms.map(this.stemTerm);\n const hashed = stemmed.map(this.hashTerm);\n // const edgeLists: Array<Array<{ score: number, length: number }>> = [];\n const edgeLists = [];\n hashed.forEach((hash, inde...
[ "0.56904", "0.5190034", "0.5069403", "0.5046294", "0.49692607", "0.49677208", "0.49168086", "0.48959336", "0.4825889", "0.4763579", "0.47486973", "0.4739721", "0.47138262", "0.4702963", "0.46654904", "0.46303567", "0.46303567", "0.46303567", "0.46303567", "0.46303567", "0.462...
0.50540125
3
class OrderByQuery Sorts all solutions from the input stream by a given variable
function OrderByQuery(input, varName) { this.input = input; this.source = input.source; this.attrName = var2Attr(varName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OrderByQuery(input, varName) {\r\n this.input = input;\r\n this.source = input.source;\r\n this.attrName = var2Attr(varName);\r\n}", "order(by) {\n if (typeof by === 'string') {\n by = {[by]: 'desc'};\n }\n return this.spawn().applyOrder(by);\n }", "async fu...
[ "0.70785254", "0.59759873", "0.59557843", "0.58038694", "0.573974", "0.573974", "0.56904215", "0.56676996", "0.5599598", "0.5592256", "0.5524794", "0.5521949", "0.55074155", "0.54903024", "0.54240507", "0.5350309", "0.5343574", "0.53422815", "0.5337857", "0.53155255", "0.5311...
0.7120009
0
class PathQuery Expects subject and path to be bound and produces all bindings for the object variable or matches that by evaluating the given path
function PathQuery(input, subject, path, object) { this.input = input; this.source = input.source; if(typeof subject === 'string' && subject.indexOf("?") == 0) { this.subjectAttr = var2Attr(subject); } else { this.subject = subject; } if(path == null) { throw "Path ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PathQuery(input, subject, path, object) {\r\n this.input = input;\r\n this.source = input.source;\r\n if(typeof subject === 'string' && subject.indexOf(\"?\") == 0) {\r\n this.subjectAttr = var2Attr(subject);\r\n }\r\n else {\r\n this.subject = subject;\r\n }\r\n if(path...
[ "0.7452347", "0.574495", "0.5538446", "0.53962755", "0.5327566", "0.5322275", "0.5294832", "0.51309365", "0.5043115", "0.50229263", "0.5005091", "0.49979502", "0.49877676", "0.49778825", "0.4943055", "0.4909898", "0.4904243", "0.4887856", "0.48740393", "0.48532012", "0.484398...
0.7482845
0
class StartQuery This simply produces a single result: the initial solution
function StartQuery(source, initialSolution) { this.source = source; if (initialSolution && initialSolution.length > 0) { this.solution = initialSolution; } else { this.solution = [{}]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StartQuery(source, initialSolution) {\r\n this.source = source;\r\n if (initialSolution && initialSolution.length > 0) {\r\n this.solution = initialSolution;\r\n } else {\r\n this.solution = [{}];\r\n }\r\n}", "function query()\n{\n return query_start(0, -1)\n}", "function R...
[ "0.7870219", "0.6587974", "0.6242505", "0.62002236", "0.6035029", "0.5999541", "0.5999541", "0.5999541", "0.5973679", "0.59428847", "0.5899386", "0.5899386", "0.58977777", "0.58800846", "0.5793948", "0.5793948", "0.5793948", "0.57673776", "0.57647365", "0.57447714", "0.574477...
0.7802804
1
class NodeSet (a superprimitive implementation for now!)
function NodeSet() { this.values = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NodeSet() {\r\n this.values = [];\r\n}", "constructor(\n /// The node types in this set, by id.\n types) {\n this.types = types;\n for (let i = 0; i < types.length; i++)\n if (types[i].id != i)\n throw new RangeError(\"Node type ids should correspond to a...
[ "0.85355526", "0.64652073", "0.6376476", "0.63219833", "0.6308661", "0.63054657", "0.6284397", "0.6271459", "0.6253671", "0.6249679", "0.62431127", "0.62201583", "0.6200773", "0.61969304", "0.6114931", "0.61091906", "0.6105067", "0.60962373", "0.6038447", "0.60284775", "0.602...
0.85611874
0
Simple Path syntax implementation: Adds all matches for a given subject and path combination into a given NodeSet. This should really be doing lazy evaluation and only up to the point where the match object is found.
function addPathValues(graph, subject, path, set) { if(path.uri) { set.addAll(RDFQuery(graph).match(subject, path, "?object").getNodeArray("?object")); } else if(Array.isArray(path)) { var s = new NodeSet(); s.add(subject); for(var i = 0; i < path.length; i++) { v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPathValues(graph, subject, path, set) {\r\n if(path.uri) {\r\n set.addAll(RDFQuery(graph).match(subject, path, \"?object\").getNodeArray(\"?object\"));\r\n }\r\n else if(Array.isArray(path)) {\r\n var s = new NodeSet();\r\n s.add(subject);\r\n for(var i = 0; i < pat...
[ "0.6603379", "0.51909757", "0.5086822", "0.47960028", "0.4758692", "0.47497773", "0.45732635", "0.45700496", "0.45181227", "0.4463251", "0.44315532", "0.44124854", "0.44007573", "0.4397918", "0.43885463", "0.43866158", "0.43763274", "0.43154937", "0.4277809", "0.4253642", "0....
0.6649068
0
Set up the document and return the App options appropriate for it.
function setUpDocument() { document.body.innerHTML = `\ <div>\ <h1>Test Content</h1>\ <div id="${selector}">\ Uninitialized </div>\ </div>\ `; return { contentSelector: selector, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOptions(provided)\n{\n var options = provided || {};\n\n if (!options.documentView)\n options.documentView = {};\n if (!options.documentView.closeLabel)\n options.documentView.closeLabel = \"Done\";\n\n\n if (!options.navigationView)\n options.navigationView = {};\n ...
[ "0.5788542", "0.55255455", "0.5414663", "0.536652", "0.53259903", "0.53259903", "0.5254894", "0.52229255", "0.52178234", "0.52178234", "0.5207938", "0.5194701", "0.517823", "0.5162372", "0.5151035", "0.5142316", "0.51264685", "0.51182324", "0.5116798", "0.5098932", "0.5097130...
0.0
-1
this is a standlone application to reindex brands with records > 0 for ecommerce base type of dashboard along with the dash url set to the master account view reIndexWithDashtypeAndDashURL();
function reIndexWithDashtypeAndDashURL() { searchAll('brands', 'brand', function(response) { var hits = response.hits; for (var i = 0; i < hits.length; i++) { var recordCount = hits[i]._source.account_record_total; //console.log("PRE TINKER:" + JSON.stringify(hits[i]._source,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async _reindex(newIndex, branch) {\n let branchIndex = this.constructor.branchToIndexName(branch);\n let alias = await this.es.indices.getAlias({\n name: branchIndex,\n ignore: [404]\n });\n if (alias.status === 404) {\n this.log.info('%s is new, nothing to reindex', branch);\n } else...
[ "0.5770315", "0.56664526", "0.5390976", "0.53516746", "0.53347546", "0.52498984", "0.5211391", "0.5170489", "0.5107794", "0.5072197", "0.5049465", "0.5030829", "0.49983191", "0.4989109", "0.4949933", "0.48723137", "0.4850758", "0.48449555", "0.48331413", "0.4801422", "0.47488...
0.8003794
0
Query elastic for all brands, query analytics, and if no records found, enqueue the brand for ingestion
function reEnqueueBrandsWithZeroAnalyticDatasets() { //Get all brands searchAll('brands', 'brand', function(response) { var hits = response.hits; var tetherEmail; var _isBrandIngestible; for (var i = 0; i < hits.length; i++) { _isBrandIngestible = isBrandIngestible(hi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get() {\n const {getBrands} = require('node-car-api');\n const {getModels} = require('node-car-api');\n var allCars = [];\n\n async function getAllBrands () {\n const brands = await getBrands();\n return brands;\n }\n\n async function getBrandModels (brand, callback) {\n console.log('\\nBra...
[ "0.64832115", "0.613663", "0.6095725", "0.57255024", "0.5717748", "0.57088155", "0.5565679", "0.55464643", "0.55193806", "0.5450214", "0.542693", "0.54185736", "0.5342343", "0.53231096", "0.53165543", "0.52555877", "0.52446723", "0.5158925", "0.5139443", "0.51392", "0.5130309...
0.7411215
0
START CONFIGURATION... To avoid crosssite scripting questions, this demo should be in the same container as the OpenID Connect provider (OpenAM).
function getBaseURL() { var protocol = window.location.protocol; var hostname = window.location.hostname; var port = window.location.port; return protocol + "//" + hostname + ":" + port; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async startup() {\n const pwrap = this.app.getPage();\n\n log.info(`Start up`);\n\n const { delay = 20 } = this.loginMode;\n await pwrap.wait(delay * 1000);\n await pwrap.click('lets_get_started'); \n await pwrap.wait(5000);\n }", "setupStart() {\n const config = this._configuration;\n ...
[ "0.5968185", "0.57057893", "0.5705785", "0.56456333", "0.55335635", "0.55281305", "0.55281305", "0.5526975", "0.54858243", "0.54647917", "0.5459484", "0.54513305", "0.5422921", "0.5389168", "0.53615063", "0.5338773", "0.5328334", "0.53246754", "0.5295749", "0.5295393", "0.527...
0.0
-1
...END CONFIGURATION has lots of useful snippets...
function encodeQueryData(data) { var ret = []; for (var d in data) { ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d])); } return ret.join("&"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getConfig () {}", "function DocScannerConfig() { }", "function configure() {\n\n\t\n}", "function sampleConfig() {\n return \"\\\n---\\n\\\n# Configuration sample file for Jingo (YAML)\\n\\\napplication:\\n\\\n title: \\\"CartoWiki\\\"\\n\\\nserver:\\n\\\n hostname: \\\"localhost\\\"\\n\\\n p...
[ "0.59989876", "0.58717406", "0.58447564", "0.58259004", "0.58199286", "0.56738865", "0.56528395", "0.5649512", "0.5555", "0.55403715", "0.5534012", "0.5520917", "0.55172753", "0.547454", "0.5471379", "0.5450539", "0.53737473", "0.5362797", "0.5350046", "0.533972", "0.5334237"...
0.0
-1
Returns a map of query string parameters.
function parseQueryString() { var query = {}; var args = document.location.search.substring(1).split('&'); for (var arg in args) { var m = args[arg].split('='); query[decodeURIComponent(m[0])] = decodeURIComponent(m[1]); } return query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParameterMap() {\n const url = window.location.href;\n let parameters = url.split(\"?\");\n parameters.shift(); //Get rid of URL\n parameters = parameters.join(\"?\"); //Remerge Array\n parameters = parameters.split(\"&\"); //Split Array at parameter seperator\n\n let map...
[ "0.80089575", "0.77761537", "0.7734398", "0.76399034", "0.7587017", "0.7532604", "0.7532476", "0.7454712", "0.7436503", "0.74246883", "0.7424542", "0.7424542", "0.7424542", "0.7424542", "0.7424542", "0.7408239", "0.7356703", "0.72794414", "0.72609663", "0.7252487", "0.7248239...
0.0
-1
Validates a JWS signature according to cheating a bit by taking the preencoded header and payload.
function validateSignature(encodedHeader, encodedPayload, signature) { var signingInput = encodedHeader + "." + encodedPayload; var signed = CryptoJS.HmacSHA256(signingInput, client_secret); var encodedSigned = b64tob64u(signed.toString(CryptoJS.enc.Base64)); return encodedSigned == signature; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidSignature (pem_cert, signature, requestBody) {\n const verifier = crypto.createVerify('RSA-SHA1')\n verifier.update(requestBody, 'utf8')\n return verifier.verify(pem_cert, signature, SIGNATURE_FORMAT)\n}", "function signedRequestValidator (signature, body, path, publicKey) {\n\t// Get th...
[ "0.637316", "0.6269442", "0.6167053", "0.6066463", "0.60605264", "0.5958025", "0.5949278", "0.5947322", "0.58216375", "0.57838213", "0.57432103", "0.5721873", "0.5720675", "0.568976", "0.56881064", "0.5683661", "0.56700945", "0.56552637", "0.563921", "0.5639023", "0.5629302",...
0.7272757
0
Returns a base64urlencoded version of the base64encoded input string.
function b64tob64u(string) { var result = string; result = result.replace(/\+/g, "-"); result = result.replace(/\//g, "_"); result = result.replace(/=/g, ""); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "base64Encode(input) {\n return EncodingUtils.base64Encode(input);\n }", "function toBase64(input) {\n return util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n}", "function rstr2b64(input) {\n\ttry {\n\t\tb64pad\n\t} catch (e) {\n\t\tb64pad = '';...
[ "0.7617321", "0.72946244", "0.72248304", "0.72108954", "0.7197889", "0.71901536", "0.71901536", "0.71901536", "0.71901536", "0.71901536", "0.71901536", "0.71901536", "0.7184172", "0.7182572", "0.71385497", "0.7132515", "0.7104617", "0.70943546", "0.7086328", "0.70833045", "0....
0.65941226
61
Display the cards on the page shuffle the list of cards using the provided "shuffle" method below loop through each card and create its HTML add each card's HTML to the page Shuffle function from
function shuffle(array) { var currentIndex = array.length, temporaryValue, randomIndex; while (currentIndex !== 0) { randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createHTML() {\n let cardList = shuffle(myCards);\n cardList.forEach(function(card) {\n $(\".deck\").append('<li><i class=\"card fa ' + card + '\"></i></li>');\n })\n}", "function shuffleCards() {\n let shuffledCards = shuffle(cardsArray);\n\n for (let i = 0; i < shuffledCards.length; i++) {\n ...
[ "0.78765905", "0.7812713", "0.7795754", "0.77613914", "0.7732148", "0.76940626", "0.769223", "0.7622959", "0.7617408", "0.7617119", "0.7549082", "0.7543181", "0.7543003", "0.7542052", "0.75338775", "0.7510985", "0.7509751", "0.7505815", "0.7502341", "0.7497395", "0.7494171", ...
0.0
-1
set up the event listener for a card. If a card is clicked: display the card's symbol (put this functionality in another function that you call from this one) add the card to a list of "open" cards (put this functionality in another function that you call from this one) if the list already has another card, check to se...
function initGame() { var matchedCards = []; var deck = document.querySelector('.deck'); var str = ''; shuffle(deckCards).forEach(function(card) { //console.log(card); str += generateCard(card); }); moves = 0; counter.innerText = moves; //console.log(str); deck...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickCard(event) {\n // discard clicks on already matched or open cards\n if (event.target.nodeName === 'LI'\n && !(event.target.classList.contains(\"match\"))\n && !(event.target.classList.contains(\"open\")) ) {\n\n clickCounter += 1;\n\n if(clickCounter == 1) {\n st...
[ "0.8392274", "0.8256287", "0.8251241", "0.81680006", "0.8010867", "0.79927814", "0.79789734", "0.79624116", "0.7951098", "0.79050255", "0.7899434", "0.7869897", "0.785952", "0.78289473", "0.7807212", "0.7806482", "0.77567357", "0.7744155", "0.7720313", "0.77154434", "0.771241...
0.0
-1
This allow for a scheduler that is managed by the plugin manager
constructor() { this.tasks = {}; this.next = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setCorePluginScheduler (corePluginScheduler) {\n // TODO\n }", "getCorePluginScheduler () {\n return this.corePluginScheduler\n }", "function RequestScheduler() {}", "function Scheduler() {\n this.tasks = [];\n this.current_running = 0;\n this.enabled = false;\n this.running = {};\n}", ...
[ "0.7309249", "0.71724844", "0.6980593", "0.67334354", "0.6360193", "0.6331835", "0.630113", "0.6252756", "0.6243089", "0.6214631", "0.6122399", "0.6115685", "0.6115685", "0.6115685", "0.6115685", "0.6115685", "0.6059083", "0.591649", "0.5892173", "0.5892173", "0.5890746", "...
0.0
-1
cancels the action by removing the form
function cancelAction(){ $('#listcontent').css('display','block'); $('#editorholder').html(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cancelForm() {\n this.sendAction(\"onCancel\", null);\n }", "function cancel() {\n props.dispatch({\n type: 'CLEAR_FORM',\n });\n $(\"#registration\").hide();\n $(\"#login\").show();\n }", "function cancel() {\n props.dispatch({\n type: 'CLEAR_TRAVEL_FORM',\n });\n toggle();...
[ "0.75934017", "0.74124056", "0.7365448", "0.73001146", "0.7156283", "0.71323746", "0.71128184", "0.70356625", "0.70198786", "0.68982464", "0.68862265", "0.6853246", "0.6809534", "0.6738244", "0.67298555", "0.668562", "0.66680413", "0.6648396", "0.66452855", "0.6609859", "0.66...
0.6055842
72
Opens the new item form
function newItem(){ sendRequest( 'usergroups', { 'action': 'getNewItemForm', "id_menucategory": $('#kategoria').val() }, function(data){ $('#listcontent').css('display','none'); $('#editorholder').html(data); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNewItem() { switchToView('edit-form'); }", "click(){\n createAddItemWindow();\n }", "NewItemForm(e) {\n if (typeof this.props.onNew === 'function') {\n var props = {\n type: \"existing\",\n item_id: this.props.menu[1].item_id,\n menu: {...
[ "0.7585318", "0.6785055", "0.67106295", "0.66895473", "0.6652038", "0.6641304", "0.65911555", "0.6562074", "0.6477089", "0.64609456", "0.6454686", "0.642148", "0.6343328", "0.63294643", "0.6302457", "0.62875354", "0.6287162", "0.62748826", "0.627009", "0.6240335", "0.624013",...
0.68661374
1
Opens the item form with menuitem data
function editItem(id){ sendRequest( 'usergroups', { 'action': 'getEditItemForm', 'id': id }, function(data){ $('#listcontent').css('display','none'); $('#editorholder').html(data); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onItemSelect(item) {\n // handle action to render the new page!\n\n Actions.editdetails({text: item});\n }", "function openULForm(data){\n\t$m.open(\"Edit Lead for IPT\", \"/IncomePlanner/UpdateLeadForm.html\",data.data);\n}", "function onOpen(){\n var ui=SpreadsheetApp.getUi();\n var menu...
[ "0.681751", "0.6341688", "0.62991726", "0.6087649", "0.608387", "0.60075533", "0.5993664", "0.59866416", "0.5984993", "0.5981192", "0.5971873", "0.5968905", "0.59627795", "0.5946578", "0.59440136", "0.59236574", "0.59142095", "0.58878785", "0.5877667", "0.5869673", "0.586803"...
0.0
-1
sets the new value for specified item
function updateItem(id){ var denylogin = 0; if($('#denylogin').is(':checked')) denylogin = 1; sendRequest( 'usergroups', { "action": 'updateItem', "name": $('#name').val(), "privileges": parsePrivileges(), "denylogin": denylogin, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeValue(item){\r\n\tconsole.log(\"item1 = \" + item);//item1 = 1\r\n\titem = 2;\r\n\tconsole.log(\"item2 = \" + item);//item2 = 2\r\n}", "updateItem(el, value, index) {}", "set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n throw new E...
[ "0.723401", "0.7064907", "0.6983712", "0.6802773", "0.6785583", "0.67742807", "0.6573935", "0.65479225", "0.65367156", "0.64589983", "0.6441093", "0.6426226", "0.63970333", "0.6362808", "0.6357097", "0.63344514", "0.62907296", "0.62494653", "0.62413037", "0.6238554", "0.62327...
0.0
-1
function returns the privileges string
function parsePrivileges(){ var privileges = ''; var moduleprivilegecount; var availablemodules = $('#availablemodules').val().split(','); for(var i in availablemodules){ privileges += availablemodules[i]+':' moduleprivilegecount = $('.'+availablemodules[i]).length; for(var j=0;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toString() {\n const permissions = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n ...
[ "0.6751903", "0.6588417", "0.65329117", "0.65329117", "0.6383561", "0.6383561", "0.61164474", "0.58112913", "0.56458735", "0.55325377", "0.5477289", "0.54497033", "0.54278", "0.541346", "0.539306", "0.5313658", "0.5303473", "0.52460086", "0.5226132", "0.5221178", "0.5205592",...
0.676373
0
highlights the selectable privileges
function controlPrivilegeHighlighting(element){ var activegroup = $(element).attr('class'); var groupelementcount = $('.'+activegroup).length; var i=1; if($(element).is(':checked')){ for(i;i<groupelementcount;i++){ $('#'+activegroup+i).removeAttr('disabled'); } }else{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightSelected()\n\t{\n\t\t// selected pileups (mutations) on the diagram\n\t\tvar selected = getSelectedPileups();\n\n\t\t// highlight residues\n\t\thighlight3dResidues(selected);\n\t}", "function highlight() {\n d3.select(this).classed('selected', true)\n }", "function applySele...
[ "0.6242853", "0.5826733", "0.58251554", "0.5705619", "0.5629043", "0.5601308", "0.55582774", "0.55572015", "0.5541822", "0.550991", "0.5463889", "0.54515606", "0.53969145", "0.53787297", "0.5377292", "0.5350905", "0.53149754", "0.530295", "0.5295774", "0.5293936", "0.52822894...
0.5827977
1
one way of printing properly.
function printCounter(i) { setTimeout(function() { console.log('counter value is ' +i); }, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function print(str){ printwp(str, 0); }", "print() {\n\t\treturn \"(\" + this._head + \", \" + this._tail + \" , \" + this._capacity + \", \" + this._flow + \")\";\n\t}", "function printer() {\n print(this);\n for (var i=0; i < arguments.length; i++) print(arguments[i]);\n}", "print(obj) {\n if (obj == ...
[ "0.6683521", "0.65514827", "0.65455073", "0.65316707", "0.65158194", "0.6462265", "0.6460723", "0.64356625", "0.64115727", "0.64018244", "0.63995117", "0.6344478", "0.63360125", "0.63335425", "0.6326109", "0.632566", "0.6322799", "0.62737805", "0.62624395", "0.62610006", "0.6...
0.0
-1
This is how we talk to chat
function say (message) { var response = { type: "chat_message", data: message }; process.send(response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chatBotMessage() {\r\n newBotMsg(getBotMessage())\r\n console.log(\"chatbot message\")\r\n}", "function SendToChat(text) {\n client.say(current_channel, text);\n}", "handleChat(text) {\n this.room.broadcast({\n name: this.name,\n type: 'chat',\n text: text\n });\n }", "...
[ "0.73539877", "0.72441006", "0.7156982", "0.7125912", "0.7125738", "0.70784897", "0.69188213", "0.6917413", "0.68697613", "0.6846928", "0.6825258", "0.67923033", "0.677293", "0.67727494", "0.6757203", "0.6755664", "0.67486227", "0.67146754", "0.67098683", "0.6704479", "0.6703...
0.64119834
82
Sets and writes all objects paths by type and number of objects by type.
function postAllObjectPaths() { [allObjectsByType, numObjectsByType] = setAllObjectPaths(); return numObjectsByType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setAllObjectPaths() {\n\n var allObjectTypes = objectTypes.objectTypes;\n\n var allObjectsByType = new Map();\n var numObjectsByType = new Map();\n\n for (var i = 0; i < allObjectTypes.length/10; i++) {\n for (var j = 0; j < 10; j++) {\n var objectNum = String(i) + String(j);...
[ "0.6854889", "0.5520484", "0.5155605", "0.50971425", "0.5095451", "0.50782204", "0.5076099", "0.50618476", "0.4954045", "0.48809934", "0.48740733", "0.4848282", "0.4848282", "0.4848172", "0.48311695", "0.48289546", "0.4807344", "0.48066977", "0.47881132", "0.4778015", "0.4772...
0.6678581
1
Sets all objects paths by type and number of objects by type.
function setAllObjectPaths() { var allObjectTypes = objectTypes.objectTypes; var allObjectsByType = new Map(); var numObjectsByType = new Map(); for (var i = 0; i < allObjectTypes.length/10; i++) { for (var j = 0; j < 10; j++) { var objectNum = String(i) + String(j); v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postAllObjectPaths() {\n [allObjectsByType, numObjectsByType] = setAllObjectPaths();\n return numObjectsByType;\n}", "sortObjectsByType() {\n\t\tthis.objectsByType = { LINES: [], PART: [], SKYCRANE: [], IMAGEPLANE: [] };\n\n\t\tthis.scene.traverse( node => {\n\t\t\tif ( !node.metadata ) return;\n\...
[ "0.68031424", "0.59135187", "0.52744114", "0.522034", "0.51888716", "0.51755494", "0.51503205", "0.51370704", "0.51218474", "0.5073585", "0.5073585", "0.5073585", "0.5023729", "0.5019091", "0.49856406", "0.49856406", "0.49718854", "0.4961906", "0.4946807", "0.49373737", "0.49...
0.7419198
0
Sends email containing final_results.text (client performance) to the admin.
function sendEmailWithResults(request) { var clientInfo = request.cookies['session_id'].split("."); fullName = clientInfo[0]; let transporter = nodemailer.createTransport({ service: 'gmail', auth: { user:process.env.EMAIL_SENDER_ACC, pass:process.env.EMAIL_SENDER_P...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function batchEmail(event) {\n showEmailDialog(vm.selectedTestRuns, event);\n }", "function main() {\n // Get the campaign IDs (based on campaignNameDoesNotContain and campaignNameContains)\n var campaignIds = getCampaignIds();\n\n var localDate = Utilities.formatDate(new Date(), AdWordsApp.currentA...
[ "0.5616921", "0.5491992", "0.54890233", "0.5450626", "0.5342546", "0.52806187", "0.5256519", "0.52271044", "0.5214085", "0.5201139", "0.5193528", "0.5182902", "0.5176197", "0.51632863", "0.51266205", "0.51106644", "0.5105673", "0.5085803", "0.50821126", "0.50816214", "0.50578...
0.5618178
0
draws all actors belonging to this stage
draw() { for (let i in this.actors) { ctx.drawImage(this.actors[i].image, this.actors[i].x, this.actors[i].y, this.actors[i].width, this.actors[i].height); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "draw() {\n this.ctx.clearRect(0, 0, this.width, this.height);\n // Re-draw all the actors\n for (let i = 0, l = this.atoms.length; i < l; i++){\n const d = this.atoms[i];\n if (this.actorType === 0) {\n // Is this actor isolating? If so, draw with shield ar...
[ "0.7164705", "0.7010267", "0.69397527", "0.6907124", "0.6715875", "0.65286714", "0.6302641", "0.6270262", "0.6238139", "0.6234651", "0.62114835", "0.6206548", "0.6173512", "0.6167802", "0.6162123", "0.6106963", "0.606715", "0.6055293", "0.60545284", "0.603084", "0.6028565", ...
0.71766895
0
Put the entire initial markup rendering into a function so that we can reset the game later
function startGame(){ // Shuffle the monsters array shuffle(monsters); // Create the HTML and inject it into the DOM app.innerHTML = '<div class="row">' + monsters.map( function ( monster, index ) { //parameters for map are slightly different var html = '<div class="grid" aria-live="...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n renderButtons();\n renderPrice();\n renderReceipt()\n}", "function render() {\n\t\t\n\t}",...
[ "0.6825978", "0.6825978", "0.6801056", "0.6762535", "0.6745745", "0.6702648", "0.66623986", "0.66582924", "0.66341364", "0.66341364", "0.66341364", "0.66341364", "0.66341364", "0.66341364", "0.66341364", "0.6588051", "0.6588051", "0.6588051", "0.658467", "0.65728575", "0.6572...
0.0
-1
A TextualZoomControl is a GControl that displays textual "Zoom In" and "Zoom Out" buttons (as opposed to the iconic buttons used in Google Maps).
function TextualZoomControl() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CustomZoomControl( controlDiv, map ) {\n //grap the zoom elements from the DOM and insert them in the map \n var controlUIzoomIn = document.getElementById( 'cd-zoom-in' ),\n controlUIzoomOut = document.getElementById( 'cd-zoom-out' );\n controlDiv.appendChild( controlUIzoomIn );\n control...
[ "0.64934224", "0.6373462", "0.6233808", "0.6233808", "0.6233808", "0.6218789", "0.60782665", "0.59733623", "0.58868766", "0.5870256", "0.5703737", "0.56064916", "0.55260664", "0.54559296", "0.5413847", "0.5356141", "0.53454494", "0.53283393", "0.5306228", "0.52550477", "0.525...
0.8214917
0
simple helper to display leading zeros. source:
function pad(num, size) { var s = num+""; while (s.length < size) s = "0" + s; return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leadingZero(nr)\n{\n\tif (nr < 10) nr = \"0\" + nr;\n\treturn nr;\n}", "leadingZero(num) {\n return num < 10 ? `0${num}` : num;\n }", "leadingZero(number) {\n return number < 10 ? '0' + number : number;\n }", "function leadingzero (number) {\n return (number < 10) ? '0' + number : number;...
[ "0.8043797", "0.7875777", "0.77663875", "0.76793146", "0.7656128", "0.76505077", "0.762701", "0.7613922", "0.7592126", "0.75617373", "0.751566", "0.7512751", "0.74983907", "0.7490289", "0.748541", "0.748068", "0.7472053", "0.74718535", "0.74378824", "0.743169", "0.743158", ...
0.0
-1
crossfilter functions fate definition REQUIRES lastAvailableTerm to be defined
function fate(d) { if (d.gradTerm != 'NONE') { return 'Graduated'; } else if (d.lastTerm == lastAvailableTerm) { return 'Returning'; } else { return 'Elsewhere'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterFunction(f) {\n\t refilter = crossfilter_filterAll;\n\n\t filterIndexFunction(refilterFunction = f);\n\n\t lo0 = 0;\n\t hi0 = n;\n\n\t return dimension;\n\t }", "function filter() {\n \n}", "function xtrafilter(lst,flt,title){\n var stf='cdmStage';\n var of='cdmH...
[ "0.5951963", "0.5900448", "0.5897625", "0.5808983", "0.5582043", "0.5551853", "0.53581613", "0.53581613", "0.52592134", "0.52205193", "0.5198134", "0.5196036", "0.5174632", "0.5169011", "0.5144759", "0.5144652", "0.51199424", "0.510909", "0.50959194", "0.5086317", "0.50602674...
0.0
-1
fate fateReduceAdd, fateReduceRemove, fateReduceInitial p is the transient instance of the reduced object for a particular key v is the current record (from
function fateGradInit() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reduceAdd(p, v) {\n ++p.count;\n\n return p;\n }", "function reduceAdd(p, v) {\n\tconsole.log(p,v);\n\t\t++p.count;\n \tp.total += v.total;\n \treturn p;\n}", "function reduceAdd(p, v) {\r\n p.cas += v.cas;\r\n p.dec += v.dec;\r\n p.let = p.cas != 0 ? (p.dec / p.cas) : 0;...
[ "0.6708704", "0.66012484", "0.627969", "0.6239659", "0.61618286", "0.60248893", "0.5969862", "0.5892576", "0.57814145", "0.5764703", "0.56655246", "0.5651539", "0.5521894", "0.5416294", "0.539482", "0.5289278", "0.52278376", "0.5223355", "0.5184137", "0.5177513", "0.51471823"...
0.0
-1
for now, log the results of the conversion to objects
function logResults(data) { console.log(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function converter (obj) {\n\t\n\t\tarr.push(obj.value) //push in the value\n\n\t\tif(obj.rest !== null){\n\n\t\t\tconverter(obj.rest); //keep calling the rest in the object\n\t\n\t\t}\n\t}", "objd(obj) {\n\n return toObject(obj);\n }", "function logResult(result)\n{\n if (result === null) {\n ...
[ "0.57123584", "0.5653578", "0.5589093", "0.5523788", "0.53542435", "0.532313", "0.53123885", "0.5305775", "0.52951825", "0.52713704", "0.5236136", "0.5235256", "0.52113575", "0.5186942", "0.5170124", "0.5148863", "0.5145258", "0.513848", "0.5131805", "0.51215374", "0.51042956...
0.48130232
60
Will be invoked when an item is selected, not when we are typing in the input (that triggers onInputChange, see render)
onInternalChange (internalValue) { const { input, multiselect, onChange } = this.props; if (internalValue) { // When we have picked an item from the list. const newValue = multiselect ? internalValue.map((v) => v.value) : internalValue.value; // When the user clicked on 'Create optio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onChange(item) {}", "onListItemSelection(text) {\r\n /** HTMLInputElement : To make the element as HTMLInputElement and provides special properties and methods for manipulating the layout and presentation of input elements */\r\n const inputElement = this.getInputElement();\r\n inputElemen...
[ "0.75152355", "0.7107218", "0.694773", "0.6837015", "0.67016584", "0.666738", "0.6662563", "0.6635351", "0.662888", "0.65597516", "0.6537325", "0.6506475", "0.6498293", "0.648754", "0.6478436", "0.6464949", "0.63998955", "0.6384653", "0.638298", "0.63791376", "0.63791376", ...
0.602408
79
cache eviction policies simply discard new selector
function DiscardNewPolicy(){ this.name = "DiscardNewPolicy"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "evict_() {\n if (this.size_ <= this.capacity_) {\n return;\n }\n\n const cache = this.cache_;\n let oldest = this.access_ + 1;\n let oldestKey;\n for (const key in cache) {\n const {access} = cache[key];\n if (access < oldest) {\n oldest = access;\n oldestKey = key;\n...
[ "0.64117414", "0.60233384", "0.59937483", "0.5735585", "0.57001984", "0.5609547", "0.5280611", "0.52129734", "0.5197102", "0.5171502", "0.51342726", "0.5123343", "0.5116419", "0.5113555", "0.5085189", "0.5072788", "0.5072757", "0.5063319", "0.5054145", "0.5054145", "0.5008011...
0.0
-1
remove the least used select in the cache
function DiscardLeastUsedPolicy (){ this.name = "DiscardLeastUsedPolicy"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "evict_() {\n if (this.size_ <= this.capacity_) {\n return;\n }\n\n const cache = this.cache_;\n let oldest = this.access_ + 1;\n let oldestKey;\n for (const key in cache) {\n const {access} = cache[key];\n if (access < oldest) {\n oldest = access;\n oldestKey = key;\n...
[ "0.6270858", "0.6135886", "0.6034367", "0.60205114", "0.5906305", "0.5906305", "0.5850294", "0.5841288", "0.5841288", "0.58250904", "0.58250904", "0.58250904", "0.58250904", "0.58250904", "0.58250904", "0.58250904", "0.58250904", "0.58250904", "0.58250904", "0.5815332", "0.57...
0.0
-1
If found invalid selector, remove it and put the new one in otherwise, discard the new one
function DiscardInvalidPolicy(){ this.name = "DiscardInvalidPolicy"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clean(selector) {\n\t\tdocument.querySelector(selector).innerHTML = '';\n\t}", "removeFrom(selector) {\n // the selector is a jQuery selector - it has to be refactor if we taking care of the calling methods\n $(selector).each(function (element) {\n removeEditor(element.id)\n })\n }", "function t...
[ "0.5926108", "0.5890124", "0.5876065", "0.569588", "0.5585483", "0.55627716", "0.54934835", "0.54376334", "0.53705084", "0.52584124", "0.525274", "0.52334434", "0.5162867", "0.51411074", "0.5076882", "0.50633407", "0.5039473", "0.5029216", "0.5029216", "0.5027839", "0.4988311...
0.0
-1
SVGR has dropped some elements not supported by reactnativesvg: filter
function TypeIcon(props) { return ( <Svg width={props.size} height={props.size*1.125} viewBox="0 0 72 80.999" {...props}> <Defs></Defs> <G data-name="\uADF8\uB8F9 9332"> <G data-name="\uADF8\uB8F9 9331" transform="translate(-39 -387)"> <G transform="translate(39 387)" filter="url(#a)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SvgComponent(props) {\n return (\n <Svg width={props.width || 167} height={ props.height || 315} viewBox=\"0 0 176 324\" fill=\"none\" {...props}>\n <G filter=\"url(#prefix__filter0_d)\">\n <Path\n opacity={0.9}\n d=\"M15.371 312.52l-9.828 1.971a.453.453 0 01-.543-.444v-4...
[ "0.6804007", "0.64224076", "0.6380292", "0.6102126", "0.6035289", "0.6017963", "0.60147685", "0.60133535", "0.59938115", "0.59319085", "0.5874366", "0.5872613", "0.5857943", "0.58506536", "0.5820966", "0.57243687", "0.5698252", "0.56800425", "0.5677348", "0.56552935", "0.5631...
0.0
-1
This is the default constructor of this class.
constructor(topicArn) { AWS.config.update({ accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretKeyId: process.env.AWS_SECRET_ACCESS_KEY, region: process.env.AWS_REGION, }); this.sns = new AWS.SNS(); this.topicArn = topicArn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor (){}", "constructur() {}", "constructor( ) {}", "constructor() {\n\t\t// ...\n\t}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor() {\n super(null, null, 0, 0, 0, 0, 0);\n ...
[ "0.8395607", "0.82394147", "0.81866485", "0.8162336", "0.8130609", "0.8130609", "0.8130609", "0.8130609", "0.8130609", "0.8130609", "0.8130609", "0.81047046", "0.8070892", "0.8048915", "0.8033122", "0.78721654", "0.78395355", "0.7837437", "0.77839893", "0.77839893", "0.778398...
0.0
-1
wrap some native API on `window`
function patchClass(className) { var OriginalClass = _global[className]; if (!OriginalClass) return; // keep original class in global _global[zoneSymbol(className)] = OriginalClass; _global[className] = function () { var a = bindArguments(arguments, className); swi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function polyfillWindow(passedWindow) {\n if (!passedWindow.Intl) {\n // No `Intl`, so use and load the polyfill.\n passedWindow.Intl = Intl;\n }\n\n return passedWindow;\n}", "function Window() {}", "function zo() {\n // `window` is not always available, e.g. in ReactNative and WebWo...
[ "0.6977122", "0.69462883", "0.66001976", "0.6579221", "0.65260035", "0.62007606", "0.6078571", "0.60648024", "0.60517704", "0.59543663", "0.5892215", "0.5892215", "0.5880776", "0.5852775", "0.5852775", "0.5830314", "0.5829325", "0.58223975", "0.58052826", "0.57933134", "0.577...
0.0
-1
Whenever any eventListener fires, we check the eventListener target and all parents for `onwhatever` properties and replace them with zonebound functions Chrome (for now)
function patchViaCapturingAllTheEvents() { var _loop_1 = function _loop_1(i) { var property = eventNames[i]; var onproperty = 'on' + property; self.addEventListener(property, function (event) { var elt = event.target, bound, source; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function patchViaCapturingAllTheEvents() {\n eventNames.forEach(function (property) {\n var onproperty = 'on' + property;\n document.addEventListener(property, function (event) {\n var elt = event.target, bound;\n while (elt) {\n if (elt[onproperty] && !elt[onproperty]._unbound) {\n ...
[ "0.7309749", "0.6732104", "0.67296207", "0.67296207", "0.6693343", "0.6693343", "0.6590767", "0.65588754", "0.65286505", "0.65286505", "0.62024385", "0.6197996", "0.61785024", "0.61785024", "0.61715674", "0.61456996", "0.61055565", "0.6007862", "0.6001857", "0.59732634", "0.5...
0.67649895
1
handle unhandled promise rejection
function findPromiseRejectionHandler(evtName) { return function (e) { var eventTasks = findEventTasks(global, evtName); eventTasks.forEach(function (eventTask) { // windows has added unhandledrejection event listener // trigger the event listener ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unhandledPromiseRejection() {\n const promise = new Promise(promiseRejector);\n promise.then(promiseSuccessful);\n}", "function handleError(err) {\n return Promise.reject(err);\n}", "callUnhandledRejectionHandler(error) {\n const errHandler = window.onunhandledrejection;\n\n if (!errHandler) ...
[ "0.7895875", "0.7143925", "0.70594186", "0.6943403", "0.6936971", "0.67737", "0.6747531", "0.67265236", "0.66505444", "0.66499704", "0.6602592", "0.6602592", "0.65581733", "0.6539933", "0.6539933", "0.6539933", "0.6539933", "0.6539933", "0.6539933", "0.6539933", "0.6539933", ...
0.58873886
97
webpackBootstrap install a JSONP callback for chunk loading
function webpackJsonpCallback(data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ var executeModules = data[2]; /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function webpackJsonpCallback(data) {\n/******/ \t\tvar chunkIds = data[0];\n/******/ \t\tvar moreModules = data[1];\n/******/\n/******/ \t\tvar prefetchChunks = data[3] || [];\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/****...
[ "0.77740824", "0.7584461", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7549214", "0.7537586", "0.7537586", "0.7522305", ...
0.0
-1
Register global data to be used internally by Angular. See the ["I18n guide"](guide/i18ni18npipes) to know how to import additional locale data.
function registerLocaleData(data,localeId,extraData){if(typeof localeId!=='string'){extraData=localeId;localeId=data[0/* LocaleId */];}localeId=localeId.toLowerCase().replace(/_/g,'-');LOCALE_DATA[localeId]=data;if(extraData){LOCALE_DATA[localeId][19/* ExtraData */]=extraData;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerLocaleData(data, localeId, extraData) {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[0 /* LocaleId */];\n }\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n LOCALE_DATA[localeId] = data;\n if (extraData) {\n LOCALE_DAT...
[ "0.6190802", "0.6190802", "0.6190802", "0.61595196", "0.61595196", "0.61595196", "0.61595196", "0.61595196", "0.61595196", "0.6152467", "0.6130381", "0.56223035", "0.5608863", "0.5597018", "0.5595271", "0.5585614", "0.549073", "0.5455103", "0.54517055", "0.54309505", "0.54309...
0.6364417
0
Retrieves the locale ID from the currently loaded locale. The loaded locale could be, for example, a global one rather than a regional one.
function getLocaleId(locale){return findLocaleData(locale)[0/* LocaleId */];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleId() {\n return LOCALE_ID;\n}", "function getLocaleId() {\n return LOCALE_ID;\n }", "function getLocaleId() {\n return LOCALE_ID;\n}", "function getLocaleId() {\n return LOCALE_ID;\n}", "function getLocaleId() {\n return LOCALE_ID;\n}", "function getLocaleId() {\n ...
[ "0.7915388", "0.78793913", "0.7870404", "0.7870404", "0.7870404", "0.7870404", "0.7870404", "0.7870404", "0.7787354", "0.7690187", "0.7690187", "0.7690187", "0.74067485", "0.74067485", "0.74067485", "0.74067485", "0.74067485", "0.74067485", "0.73689467", "0.7367881", "0.73022...
0.7979807
0
Retrieves day period strings for the given locale.
function getLocaleDayPeriods(locale,formStyle,width){var data=findLocaleData(locale);var amPmData=[data[1/* DayPeriodsFormat */],data[2/* DayPeriodsStandalone */]];var amPm=getLastDefinedValue(amPmData,formStyle);return getLastDefinedValue(amPm,width);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleDayNames(locale, formStyle, width) {\n var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵfindLocaleData\"])(locale);\n var daysData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵLocaleDataIndex\"].DaysFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵ...
[ "0.7285594", "0.7280821", "0.72231007", "0.72223645", "0.72145", "0.7167392", "0.7167392", "0.7167392", "0.7167392", "0.7167392", "0.71637255", "0.7163266", "0.7163266", "0.7163266", "0.7163266", "0.7163266", "0.7156052", "0.71416485", "0.71309936", "0.70238143", "0.70238143"...
0.73867327
0
Retrieves days of the week for the given locale, using the Gregorian calendar.
function getLocaleDayNames(locale,formStyle,width){var data=findLocaleData(locale);var daysData=[data[3/* DaysFormat */],data[4/* DaysStandalone */]];var days=getLastDefinedValue(daysData,formStyle);return getLastDefinedValue(days,width);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWeekdays(locale) {\n var start = date_fns_1.startOfWeek(new Date(), { locale: locale });\n var days = [];\n for (var i = 0; i < 7; i++) {\n var day = date_fns_1.addDays(start, i);\n days.push(day);\n }\n return days;\n}", "function listWeekdaysImpl(localeSorted,format,ind...
[ "0.7725723", "0.6657264", "0.6657264", "0.66269714", "0.66269714", "0.65918124", "0.64805615", "0.64728606", "0.645664", "0.6423185", "0.64143735", "0.64139193", "0.64139193", "0.64139193", "0.64139193", "0.64139193", "0.6400488", "0.6386712", "0.6386712", "0.6386712", "0.638...
0.6578184
6
Retrieves months of the year for the given locale, using the Gregorian calendar.
function getLocaleMonthNames(locale,formStyle,width){var data=findLocaleData(locale);var monthsData=[data[5/* MonthsFormat */],data[6/* MonthsStandalone */]];var months=getLastDefinedValue(monthsData,formStyle);return getLastDefinedValue(months,width);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMonths() {\n moment.locale(\"it\");\n return moment.months();\n}", "function getMonths() {\n moment.locale(\"it\");\n\n var months = moment.months();\n\n return months;\n}", "function getMonths(){\r\n moment.locale(\"it\");\r\n var mesi = moment.months();\r\n return mesi;\r\n}", "function...
[ "0.66087437", "0.6532523", "0.65323585", "0.6282735", "0.6282735", "0.6282735", "0.6282735", "0.6282735", "0.6282735", "0.61784416", "0.6162755", "0.6149644", "0.6119914", "0.6097727", "0.6097727", "0.6097727", "0.6097727", "0.6097727", "0.59075886", "0.5903265", "0.5901649",...
0.6044997
18
Retrieves Gregoriancalendar eras for the given locale.
function getLocaleEraNames(locale,width){var data=findLocaleData(locale);var erasData=data[7/* Eras */];return getLastDefinedValue(erasData,width);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleEraNames(locale, width) {\n var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵfindLocaleData\"])(locale);\n var erasData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵLocaleDataIndex\"].Eras];\n return getLastDefinedValue(erasData, width);\n}", "function getLocaleE...
[ "0.5766304", "0.57592565", "0.57481176", "0.57481176", "0.57481176", "0.57481176", "0.57481176", "0.5741888", "0.57196814", "0.57192606", "0.57192606", "0.57192606", "0.5633491", "0.5582086", "0.55497104", "0.552212", "0.5512905", "0.5500254", "0.5483802", "0.5461685", "0.542...
0.58352995
0
Retrieves the first day of the week for the given locale.
function getLocaleFirstDayOfWeek(locale){var data=findLocaleData(locale);return data[8/* FirstDayOfWeek */];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleFirstDayOfWeek(locale) {\n var data = findLocaleData(locale);\n return data[8 /* FirstDayOfWeek */];\n}", "function getLocaleFirstDayOfWeek(locale) {\n var data = findLocaleData(locale);\n return data[8 /* FirstDayOfWeek */];\n}", "function getLocaleFirstDayOfWeek(locale) {\n v...
[ "0.852329", "0.852329", "0.852329", "0.827362", "0.82706356", "0.82706356", "0.82706356", "0.82706356", "0.82706356", "0.8254129", "0.8250962", "0.82408893", "0.8062314", "0.805155", "0.799416", "0.7643282", "0.6955239", "0.6921577", "0.66295624", "0.64433235", "0.6431564", ...
0.86566997
0
Range of week days that are considered the weekend for the given locale.
function getLocaleWeekEndRange(locale){var data=findLocaleData(locale);return data[9/* WeekendRange */];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleWeekEndRange(locale) {\n var data = findLocaleData(locale);\n return data[9 /* WeekendRange */];\n}", "function getLocaleWeekEndRange(locale) {\n var data = findLocaleData(locale);\n return data[9 /* WeekendRange */];\n}", "function getLocaleWeekEndRange(locale) {\n var data = ...
[ "0.78151655", "0.78151655", "0.78151655", "0.7734947", "0.76574516", "0.76574516", "0.76574516", "0.76574516", "0.76574516", "0.7651093", "0.7636433", "0.7632448", "0.656445", "0.61196357", "0.61196357", "0.60411084", "0.60411084", "0.59673494", "0.59602666", "0.5928685", "0....
0.80125165
0
Retrieves a localized datevalue formating string.
function getLocaleDateFormat(locale,width){var data=findLocaleData(locale);return getLastDefinedValue(data[10/* DateFormat */],width);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFormattedDate(value = '', format = constants.DATE_FORMAT) {\n return value ? moment(value).format(format) : '';\n }", "function dateStrGetter(name,width,form,extended){if(form===void 0){form=FormStyle.Format;}if(extended===void 0){extended=false;}return function(date,locale){return getDateTranslation(...
[ "0.6729461", "0.6643991", "0.65663993", "0.6364845", "0.6319362", "0.6146688", "0.6126792", "0.6126127", "0.60983104", "0.6081608", "0.60475916", "0.604184", "0.6001513", "0.59675556", "0.5954772", "0.5951461", "0.5938291", "0.59144765", "0.59144765", "0.59144765", "0.5882003...
0.6244178
5
Retrieves a localized timevalue formatting string.
function getLocaleTimeFormat(locale,width){var data=findLocaleData(locale);return getLastDefinedValue(data[11/* TimeFormat */],width);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timeFormat() {\n return setTwoDigit(timer.min) + \":\" + setTwoDigit(timer.sec) + \":\" + setTwoDigit(timer.millisecond);\n}", "function timeFormatString() {\n return is24HourTime() ? 'HH:mm' : 'hh:mm a';\n}", "function format_time(value, type_str) {\n var str = \"\";\n \n if (value > 1) {\n ...
[ "0.65751725", "0.61286837", "0.60871625", "0.6037725", "0.5993043", "0.59890753", "0.5946145", "0.59185934", "0.5862728", "0.58479774", "0.58227324", "0.58227324", "0.58227324", "0.5812944", "0.5809352", "0.5776659", "0.57531446", "0.5720746", "0.5719906", "0.56941545", "0.56...
0.6263926
1
Retrieves a localized datetime formatting string.
function getLocaleDateTimeFormat(locale,width){var data=findLocaleData(locale);var dateTimeFormatData=data[12/* DateTimeFormat */];return getLastDefinedValue(dateTimeFormatData,width);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getDateTimeString() {\n return `[${moment().format(\"DD.MM.YYYY HH:mm\")}] `;\n }", "function getFormattedDate(dt) {\n\tvar msgTime = dt.toString();\n\tvar tzPos = msgTime.search(' GMT') - ' GMT'.length;\n\t// minus bcoz it returns the last index of the search string\n\tmsgTime = msgTime.substr(...
[ "0.6286848", "0.60585743", "0.60234636", "0.60019904", "0.59804046", "0.59730875", "0.59041065", "0.5867148", "0.5826038", "0.57888013", "0.57868344", "0.5734853", "0.57305956", "0.57242596", "0.5699572", "0.5681082", "0.5660834", "0.56131727", "0.5609083", "0.5596837", "0.55...
0.5811937
9
Retrieves a localized number symbol that can be used to replace placeholders in number formats.
function getLocaleNumberSymbol(locale,symbol){var data=findLocaleData(locale);var res=data[13/* NumberSymbols */][symbol];if(typeof res==='undefined'){if(symbol===NumberSymbol.CurrencyDecimal){return data[13/* NumberSymbols */][NumberSymbol.Decimal];}else if(symbol===NumberSymbol.CurrencyGroup){return data[13/* NumberS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleNumberSymbol(locale, symbol) {\n var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵfindLocaleData\"])(locale);\n var res = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵLocaleDataIndex\"].NumberSymbols][symbol];\n if (typeof res === 'undefined') {\n if (symbol =...
[ "0.6502296", "0.6497767", "0.6497767", "0.6497767", "0.6497767", "0.6497767", "0.64949024", "0.64555204", "0.64363086", "0.61469346", "0.608888", "0.5962186", "0.5913778", "0.586919", "0.5843211", "0.5792628", "0.5754785", "0.57437325", "0.56912464", "0.56761974", "0.566962",...
0.72016096
0
Retrieves the symbol used to represent the currency for the main country corresponding to a given locale. For example, '$' for `enUS`.
function getLocaleCurrencySymbol(locale){var data=findLocaleData(locale);return data[15/* CurrencySymbol */]||null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleCurrencySymbol(locale) {\n var data = findLocaleData(locale);\n return data[15 /* CurrencySymbol */] || null;\n}", "function getLocaleCurrencySymbol(locale) {\n var data = findLocaleData(locale);\n return data[15 /* CurrencySymbol */] || null;\n}", "function getLocaleCurrencySymbo...
[ "0.7920458", "0.7920458", "0.7920458", "0.7794946", "0.7794946", "0.7794946", "0.7794946", "0.7794946", "0.7775677", "0.77511215", "0.77434933", "0.76876706", "0.7634587", "0.7514726", "0.745983", "0.7449213", "0.7449213", "0.7449213", "0.7437828", "0.73247313", "0.7298423", ...
0.8054249
0
Retrieves the name of the currency for the main country corresponding to a given locale. For example, 'US Dollar' for `enUS`.
function getLocaleCurrencyName(locale){var data=findLocaleData(locale);return data[16/* CurrencyName */]||null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleCurrencyName(locale) {\n var data = findLocaleData(locale);\n return data[16 /* CurrencyName */] || null;\n}", "function getLocaleCurrencyName(locale) {\n var data = findLocaleData(locale);\n return data[16 /* CurrencyName */] || null;\n}", "function getLocaleCurrencyName(locale) ...
[ "0.8210296", "0.8210296", "0.8210296", "0.80133265", "0.80133265", "0.80133265", "0.80133265", "0.80133265", "0.7986592", "0.7975676", "0.79714304", "0.7966079", "0.7640098", "0.7014054", "0.7014054", "0.7014054", "0.7014054", "0.7014054", "0.69919086", "0.69344777", "0.69344...
0.8277798
0
Retrieves the currency values for a given locale.
function getLocaleCurrencies(locale){var data=findLocaleData(locale);return data[17/* Currencies */];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleCurrencies(locale) {\n var data = findLocaleData(locale);\n return data[17 /* Currencies */];\n}", "function getLocaleCurrencies(locale) {\n var data = findLocaleData(locale);\n return data[17 /* Currencies */];\n}", "function getLocaleCurrencies(locale) {\n var data = findLoca...
[ "0.80039406", "0.80039406", "0.80039406", "0.7875704", "0.78346044", "0.78346044", "0.78346044", "0.78346044", "0.78346044", "0.7817719", "0.78104997", "0.78013533", "0.61242056", "0.611693", "0.60914725", "0.6048797", "0.6048797", "0.6048797", "0.6048797", "0.6048797", "0.60...
0.79594177
3
Retrieves the plural function used by ICU expressions to determine the plural case to use for a given locale.
function getLocalePluralCase(locale){var data=findLocaleData(locale);return data[18/* PluralCase */];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPluralCase(locale,nLike){if(typeof nLike==='string'){nLike=parseInt(nLike,10);}var n=nLike;var nDecimal=n.toString().replace(/^[^.]*\\.?/,'');var i=Math.floor(Math.abs(n));var v=nDecimal.length;var f=parseInt(nDecimal,10);var t=parseInt(n.toString().replace(/^[^.]*\\.?|0+$/g,''),10)||0;var lang=locale....
[ "0.75356054", "0.7382612", "0.72438586", "0.72306234", "0.72306234", "0.72306234", "0.72306234", "0.72306234", "0.72306234", "0.71506286", "0.7080303", "0.6997701", "0.69601285", "0.69601285", "0.6860405", "0.684463", "0.68414915", "0.68414915", "0.68414915", "0.68414915", "0...
0.74876165
1
Retrieves localespecific rules used to determine which day period to use when more than one period is defined for a locale. There is a rule for each defined day period. The first rule is applied to the first day period and so on. Fall back to AM/PM when no rules are available. A rule can specify a period as time range,...
function getLocaleExtraDayPeriodRules(locale){var data=findLocaleData(locale);checkFullData(data);var rules=data[19/* ExtraData */][2/* ExtraDayPeriodsRules */]||[];return rules.map(function(rule){if(typeof rule==='string'){return extractTime(rule);}return[extractTime(rule[0]),extractTime(rule[1])];});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleExtraDayPeriodRules(locale) {\n const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵfindLocaleData\"])(locale);\n checkFullData(data);\n const rules = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__[\"ɵLocaleDataIndex\"].ExtraData][2 /* ExtraDayPeriodsRules */] || [];\n ...
[ "0.7367507", "0.7367507", "0.7367507", "0.7367507", "0.7367507", "0.7275554", "0.72287893", "0.72224784", "0.7153575", "0.7153575", "0.7153575", "0.7151854", "0.6983604", "0.6696406", "0.6610942", "0.6588572", "0.6579932", "0.6579932", "0.6579932", "0.6579932", "0.6579932", ...
0.76506406
0
Retrieves localespecific day periods, which indicate roughly how a day is broken up in different languages. For example, for `enUS`, periods are morning, noon, afternoon, evening, and midnight. This functionality is only available when you have loaded the full locale data. See the ["I18n guide"](guide/i18ni18npipes).
function getLocaleExtraDayPeriods(locale,formStyle,width){var data=findLocaleData(locale);checkFullData(data);var dayPeriodsData=[data[19/* ExtraData */][0/* ExtraDayPeriodFormats */],data[19/* ExtraData */][1/* ExtraDayPeriodStandalone */]];var dayPeriods=getLastDefinedValue(dayPeriodsData,formStyle)||[];return getLas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocaleDayPeriods(locale,formStyle,width){var data=findLocaleData(locale);var amPmData=[data[1/* DayPeriodsFormat */],data[2/* DayPeriodsStandalone */]];var amPm=getLastDefinedValue(amPmData,formStyle);return getLastDefinedValue(amPm,width);}", "function getLocaleDayPeriods(locale, formStyle, width) {...
[ "0.738268", "0.71615833", "0.7141213", "0.71307826", "0.71307826", "0.71307826", "0.71307826", "0.71307826", "0.7117687", "0.7113834", "0.69672686", "0.69672686", "0.69672686", "0.68267757", "0.66333276", "0.66333276", "0.66333276", "0.66333276", "0.66333276", "0.6632571", "0...
0.69181675
13
Retrieves the first value that is defined in an array, going backwards from an index position. To avoid repeating the same data (as when the "format" and "standalone" forms are the same) add the first value to the locale data arrays, and add other values only if they are different.
function getLastDefinedValue(data,index){for(var i=index;i>-1;i--){if(typeof data[i]!=='undefined'){return data[i];}}throw new Error('Locale data API: locale data undefined');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLastDefinedValue(data, index) {\n for (let i = index; i > -1; i--) {\n if (typeof data[i] !== 'undefined') {\n return data[i];\n }\n }\n throw new Error('Locale data API: locale data undefined');\n}", "function getLastDefinedValue(data, index) {\n for (let i = ind...
[ "0.72737443", "0.72737443", "0.72737443", "0.72737443", "0.72737443", "0.7241937", "0.7241937", "0.7241937", "0.7241937", "0.72258276", "0.71888715", "0.71732295", "0.55640787", "0.5508775", "0.5486058", "0.53950655", "0.539243", "0.53921366", "0.5383739", "0.5381505", "0.538...
0.74097574
0
Extracts the hours and minutes from a string like "15:45"
function extractTime(time){var _a=Object(tslib__WEBPACK_IMPORTED_MODULE_1__["__read"])(time.split(':'),2),h=_a[0],m=_a[1];return{hours:+h,minutes:+m};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractMinutesFromTime(str) {\n arr = str.split(':');\n return arr[1];\n }", "function stringToMinutes(string) {\n var arr = string.split('h')\n var hours = Number(arr[0])\n var minutes = Number(arr[1].split(\"min\")[0])\n return hours*60+minutes\n}", "function getMinutes(...
[ "0.82844865", "0.7383035", "0.7314941", "0.7267564", "0.7267564", "0.7267564", "0.7267564", "0.7267564", "0.7211956", "0.7191818", "0.7161225", "0.7124971", "0.7122896", "0.711508", "0.7093153", "0.7072087", "0.70178586", "0.69395906", "0.69395906", "0.69395906", "0.69395906"...
0.7078329
15
Finds the locale data for a given locale.
function findLocaleData(locale){var normalizedLocale=locale.toLowerCase().replace(/_/g,'-');var match=LOCALE_DATA[normalizedLocale];if(match){return match;}// let's try to find a parent locale var parentLocale=normalizedLocale.split('-')[0];match=LOCALE_DATA[parentLocale];if(match){return match;}if(parentLocale==='en')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findLocaleData(locale) {\n const normalizedLocale = normalizeLocale(locale);\n let match = getLocaleData(normalizedLocale);\n if (match) {\n return match;\n }\n // let's try to find a parent locale\n const parentLocale = normalizedLocale.split('-')[0];\n match = getLocaleData(p...
[ "0.82525915", "0.82525915", "0.82525915", "0.82525915", "0.82525915", "0.82525915", "0.82356983", "0.8191185", "0.8136956", "0.8136956", "0.8136956", "0.8136956", "0.6671215", "0.6597577", "0.65553385", "0.6496288", "0.6496288", "0.6496288", "0.6496288", "0.6496288", "0.64962...
0.80153924
12
Retrieves the currency symbol for a given currency code. For example, for the default `enUS` locale, the code `USD` can be represented by the narrow symbol `$` or the wide symbol `US$`.
function getCurrencySymbol(code,format,locale){if(locale===void 0){locale='en';}var currency=getLocaleCurrencies(locale)[code]||CURRENCIES_EN[code]||[];var symbolNarrow=currency[1/* SymbolNarrow */];if(format==='narrow'&&typeof symbolNarrow==='string'){return symbolNarrow;}return currency[0/* Symbol */]||code;}// Most ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrencySymbol(code, format, locale) {\n if (locale === void 0) { locale = 'en'; }\n var currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n var symbolNarrow = currency[1 /* SymbolNarrow */];\n if (format === 'narrow' && typeof symbolNarrow === 'string') {\n ...
[ "0.79098547", "0.79098547", "0.79098547", "0.78803", "0.78751063", "0.78751063", "0.78751063", "0.78751063", "0.78751063", "0.7862321", "0.7838517", "0.781986", "0.7517236", "0.71064806", "0.70526963", "0.70348984", "0.70348984", "0.70348984", "0.6985421", "0.6937242", "0.693...
0.8073209
0
Reports the number of decimal digits for a given currency. The value depends upon the presence of cents in that particular currency.
function getNumberOfCurrencyDigits(code){var digits;var currency=CURRENCIES_EN[code];if(currency){digits=currency[2/* NbOfDigits */];}return typeof digits==='number'?digits:DEFAULT_NB_OF_CURRENCY_DIGITS;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function centsToDollars(num){\n return num / 100; \n}", "function getNumberOfCurrencyDigits(code) {\n var digits;\n var currency = CURRENCIES_EN[code];\n\n if (currency) {\n digits = currency[2\n /* NbOfDigits */\n ];\n }\n\n return typeof digits ===...
[ "0.6612327", "0.63065416", "0.63037825", "0.624599", "0.6230566", "0.6230566", "0.6230566", "0.6230566", "0.62235093", "0.6189185", "0.6180723", "0.61699325", "0.61699325", "0.61699325", "0.61699325", "0.61699325", "0.6041955", "0.59578025", "0.5935549", "0.5771443", "0.57486...
0.65625733
1
Returns a date formatter that transforms a date into its locale digit representation
function dateGetter(name,size,offset,trim,negWrap){if(offset===void 0){offset=0;}if(trim===void 0){trim=false;}if(negWrap===void 0){negWrap=false;}return function(date,locale){var part=getDatePart(name,date);if(offset>0||part>-offset){part+=offset;}if(name===DateType.Hours){if(part===0&&offset===-12){part=12;}}else if(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDateFormated(date) {\n const formatDate = new Intl.DateTimeFormat('en-GB', {\n day: 'numeric',\n month: 'short',\n year: 'numeric'\n }).format;\n return formatDate(date);\n }", "function formatDate(date) {\n var locale = navigator.language.indexOf('en') === 0 ? navigator.language : '...
[ "0.63224477", "0.62605", "0.6249619", "0.6048547", "0.60112244", "0.59925985", "0.59717333", "0.59357184", "0.5927592", "0.5888827", "0.58571357", "0.5835164", "0.58287376", "0.5779196", "0.57737803", "0.5744461", "0.57352954", "0.5734721", "0.5690894", "0.5686372", "0.567716...
0.0
-1
Returns a date formatter that transforms a date into its locale string representation
function dateStrGetter(name,width,form,extended){if(form===void 0){form=FormStyle.Format;}if(extended===void 0){extended=false;}return function(date,locale){return getDateTranslation(date,locale,name,width,form,extended);};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatDate(date) {\n var d = new Date(date);\n d = d.toLocaleString();\n return d;\n }", "function date_helper(date, formatName) {\n let locale = this.runtime.locale || this.__N.config.locales[0];\n\n // Actually, we have to calculate timezone correction for specified date,\n // but diff fo...
[ "0.6847604", "0.68366635", "0.676163", "0.6721494", "0.66819304", "0.642935", "0.6375332", "0.63627774", "0.6361735", "0.63132745", "0.6311132", "0.6263445", "0.62214255", "0.6210958", "0.6201188", "0.614665", "0.61329424", "0.6079644", "0.60709625", "0.6070591", "0.6060758",...
0.59153605
32
Returns the locale translation of a date for a given form, type and width
function getDateTranslation(date,locale,name,width,form,extended){switch(name){case TranslationType.Months:return getLocaleMonthNames(locale,form,width)[date.getMonth()];case TranslationType.Days:return getLocaleDayNames(locale,form,width)[date.getDay()];case TranslationType.DayPeriods:var currentHours_1=date.getHours(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateStrGetter(name, width) {\n var form = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : FormStyle.Format;\n var extended = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return function (date, locale) {\n return getDateTrans...
[ "0.7053755", "0.70531076", "0.70531076", "0.70531076", "0.70531076", "0.7042868", "0.7004216", "0.6914033", "0.6914033", "0.6914033", "0.68638563", "0.6810021", "0.67991644", "0.67991644", "0.67991644", "0.67991644", "0.67991644", "0.66837484", "0.65870446", "0.64932466", "0....
0.6972412
7
Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30, extended = +04:30)
function timeZoneGetter(width){return function(date,locale,offset){var zone=-1*offset;var minusSign=getLocaleNumberSymbol(locale,NumberSymbol.MinusSign);var hours=zone>0?Math.floor(zone/60):Math.ceil(zone/60);switch(width){case ZoneWidth.Short:return(zone>=0?'+':'')+padNumber(hours,2,minusSign)+padNumber(Math.abs(zone%...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timeZoneGetter(width) {\n return function (date, locale, offset) {\n var zone = -1 * offset;\n var minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n var hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n switch (width) {\n case Z...
[ "0.6488593", "0.6488593", "0.6488593", "0.6488593", "0.6475199", "0.6444494", "0.6444494", "0.6444494", "0.6444494", "0.6444494", "0.6427179", "0.6260149", "0.62052774", "0.61994815", "0.61355615", "0.57907426", "0.56330127", "0.54766953", "0.54113764", "0.5399152", "0.536493...
0.6320117
11
Based on CLDR formats: See complete list: See also explanations: TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x
function getDateFormatter(format){if(DATE_FORMATS[format]){return DATE_FORMATS[format];}var formatter;switch(format){// Era name (AD/BC) case'G':case'GG':case'GGG':formatter=dateStrGetter(TranslationType.Eras,TranslationWidth.Abbreviated);break;case'GGGG':formatter=dateStrGetter(TranslationType.Eras,TranslationWidth.Wi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function from_CLDR(data) {\n\t// the usual time measurement units\n\tvar units = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];\n\n\t// result\n\tvar converted = { long: {} };\n\n\t// detects the short flavour of labels (yr., mo., etc)\n\tvar short = /-short$/;\n\n\tvar locale = __WEBPACK_IMPORTED_M...
[ "0.607991", "0.55183804", "0.5262246", "0.5042219", "0.50287735", "0.49555108", "0.49106032", "0.49068466", "0.48883417", "0.48861834", "0.48846495", "0.4868778", "0.48679087", "0.4850818", "0.4843463", "0.4843463", "0.4828225", "0.48280364", "0.48257717", "0.48257717", "0.48...
0.0
-1
Converts a value to date. Supported input formats: `Date` number: timestamp string: numeric (e.g. "1234"), ISO and date strings in a format supported by [Date.parse()]( Note: ISO strings without time return a date without timeoffset. Throws if unable to convert to a date.
function toDate(value){if(isDate(value)){return value;}if(typeof value==='number'&&!isNaN(value)){return new Date(value);}if(typeof value==='string'){value=value.trim();var parsedNb=parseFloat(value);// any string that only contains numbers, like "1234" but not like "1234hello" if(!isNaN(value-parsedNb)){return new Dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toDate(value) {\n if (isDate(value)) {\n return value;\n }\n\n if (typeof value === 'number' && !isNaN(value)) {\n return new Date(value);\n }\n\n if (typeof value === 'string') {\n value = value.trim();\n\n if (/^(\\d{4}(-\\d{1,2}(-\\...
[ "0.82285154", "0.8199472", "0.8180866", "0.8180866", "0.8180866", "0.8180866", "0.8143203", "0.8087462", "0.7978731", "0.7978731", "0.7978731", "0.7978731", "0.77429754", "0.70768845", "0.7040065", "0.67071944", "0.66094446", "0.65288055", "0.6336073", "0.63043076", "0.623961...
0.7490623
13
Converts a date in ISO8601 to a Date. Used instead of `Date.parse` because of browser discrepancies.
function isoStringToDate(match){var date=new Date(0);var tzHour=0;var tzMin=0;// match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100" var dateSetter=match[8]?date.setUTCFullYear:date.setFullYear;var timeSetter=match[8]?date.setUTCHours:date.setHours;// if there is a timezone defined ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toDate(value) {\n if (isDate(value)) {\n return value;\n }\n\n if (typeof value === 'number' && !isNaN(value)) {\n return new Date(value);\n }\n\n if (typeof value === 'string') {\n value = value.trim();\n\n if (/^(\\d{4}(-\\d{1,2}(-\\...
[ "0.7130162", "0.706527", "0.6851095", "0.6851095", "0.6851095", "0.6851095", "0.68459696", "0.6772171", "0.6744806", "0.6744806", "0.6744806", "0.6744806", "0.67345256", "0.6705372", "0.6621499", "0.65968007", "0.65685844", "0.6552219", "0.65448314", "0.64380836", "0.631695",...
0.5807173
92