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 |
|---|---|---|---|---|---|---|
Remove an element from the dom | function removeElement(elem) {
if (elem.prev)
elem.prev.next = elem.next;
if (elem.next)
elem.next.prev = elem.prev;
if (elem.parent) {
var childs = elem.parent.children;
childs.splice(childs.lastIndexOf(elem), 1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"removeElement() {\n this.el.parentNode.removeChild(this.el);\n }",
"remove() {\n this.element.remove();\n }",
"static deleteDomElement(element) {\n element.parentNode.removeChild(element);\n }",
"function removeElement(elem){ if (elem) elem.parentNode.removeChild(elem) }",
"functio... | [
"0.8216155",
"0.8001162",
"0.789542",
"0.7837395",
"0.7837395",
"0.77874255",
"0.7766495",
"0.77588284",
"0.75943047",
"0.7584176",
"0.7558708",
"0.75252",
"0.75154984",
"0.749889",
"0.74937016",
"0.7476632",
"0.7460629",
"0.74551415",
"0.74040943",
"0.74040943",
"0.74040943"... | 0.0 | -1 |
Replace an element in the dom | function replaceElement(elem, replacement) {
var prev = (replacement.prev = elem.prev);
if (prev) {
prev.next = replacement;
}
var next = (replacement.next = elem.next);
if (next) {
next.prev = replacement;
}
var parent = (replacement.parent = elem.parent);
if (parent) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function replaceElement()\n {\n filtersPrepare(this);\n var replacement = applyModule( this.subject, this.module, this.context );\n replacement = filtersProcess(this, replacement);\n \n replacement = fixWhiteSpaceBeforeWriting( replacement );\n \n var dom_element... | [
"0.74327815",
"0.74221987",
"0.7384942",
"0.70174384",
"0.69383854",
"0.68941504",
"0.6864857",
"0.6838641",
"0.6838641",
"0.68095124",
"0.675934",
"0.6703672",
"0.6702075",
"0.664771",
"0.65927535",
"0.6567438",
"0.64966434",
"0.6462857",
"0.6441904",
"0.6416629",
"0.6384623... | 0.64916986 | 21 |
Append a child to an element | function appendChild(elem, child) {
child.parent = elem;
if (elem.children.push(child) !== 1) {
var sibling = elem.children[elem.children.length - 2];
sibling.next = child;
child.prev = sibling;
child.next = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function result_element_append(parent, child)\n{\n if(parent != null && child != null) {\n parent.content.push(child);\n }\n}",
"function appendChild(elem,child){child.parent=elem;if(elem.children.push(child)!==1){var sibling=elem.children[elem.children.length-2];sibling.next=child;child.prev=siblin... | [
"0.78245354",
"0.7658367",
"0.74705786",
"0.7461731",
"0.7459877",
"0.74431586",
"0.74331164",
"0.7430443",
"0.74131995",
"0.73627377",
"0.7322215",
"0.7316499",
"0.7267737",
"0.72576094",
"0.72576094",
"0.7247169",
"0.7237919",
"0.7225688",
"0.7225688",
"0.7225688",
"0.72208... | 0.7130147 | 24 |
Append an element after another | function append(elem, next) {
var parent = elem.parent, currNext = elem.next;
next.next = currNext;
next.prev = elem;
elem.next = next;
next.parent = parent;
if (currNext) {
currNext.prev = next;
if (parent) {
var childs = parent.children;
childs.splice(ch... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"insertAfter() {\n this.insertElementAdjacentToChild('after');\n }",
"function insertAfter(newElement,existingElement) {\r\n\tvar parentElement = existingElement.parentNode;\r\n\tif(parentElement.lastChild == existingElement){return parentElement.appendChild(newElement);}\r\n\telse{return parentElement.... | [
"0.737062",
"0.7342712",
"0.7246025",
"0.7233727",
"0.72304916",
"0.72106445",
"0.72045976",
"0.717582",
"0.7133486",
"0.704649",
"0.7026368",
"0.70129293",
"0.68494904",
"0.68458897",
"0.67852134",
"0.67150515",
"0.6693093",
"0.65975475",
"0.65319866",
"0.65311944",
"0.64625... | 0.62814367 | 34 |
Prepend an element before another | function prepend(elem, prev) {
var parent = elem.parent;
if (parent) {
var childs = parent.children;
childs.splice(childs.lastIndexOf(elem), 0, prev);
}
if (elem.prev) {
elem.prev.next = prev;
}
prev.parent = parent;
prev.prev = elem.prev;
prev.next = elem;
el... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function result_element_prepend(parent, child, next)\n{\n if(next == null)\n result_element_append(parent, child);\n else\n if(parent != null && child != null)\n {\n // insert child node before the next node:\n for(var i = 0; i < parent.content.length; i++)\n {\n ... | [
"0.7984816",
"0.77168846",
"0.76714736",
"0.7613354",
"0.76015365",
"0.76015365",
"0.76015365",
"0.76015365",
"0.76015365",
"0.75892776",
"0.75000364",
"0.74979913",
"0.7445392",
"0.7415784",
"0.74080944",
"0.74031824",
"0.74031824",
"0.74031824",
"0.74031824",
"0.74031824",
... | 0.7297577 | 22 |
Returns the name property of an element | function getName(elem) {
return elem.name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getName(elem) {\n return elem.name;\n }",
"function getName(elem) {\n return elem.name;\n}",
"function getName(elem){return elem.name;}",
"function getName(element){\n return element.attr('id').toString() /*retorna o nome do elemento*/\n }",
"get name() {\n return new... | [
"0.8172356",
"0.81451535",
"0.810348",
"0.7875148",
"0.77497053",
"0.76580614",
"0.75340855",
"0.75292546",
"0.74671966",
"0.7278669",
"0.72209877",
"0.72209877",
"0.72209877",
"0.7195817",
"0.71289986",
"0.7074841",
"0.7074841",
"0.7074841",
"0.7074841",
"0.7074841",
"0.7074... | 0.81614184 | 5 |
Represent num in a wNAF form | function getNAF(num, w, bits) {
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
naf.fill(0);
var ws = 1 << (w + 1);
var k = num.clone();
for (var i = 0; i < naf.length; i++) {
var z;
var mod = k.andln(ws - 1);
if (k.isOdd()) {
if (mod > (ws >> 1) - 1)
z = (ws >> 1) - mod;... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function toUnformattedNF()\n{\n\treturn (this.num);\n}",
"function getNAF(num,w){var naf=[];var ws=1<<w+1;var k=num.clone();while(k.cmpn(1)>=0){var z;if(k.isOdd()){var mod=k.andln(ws-1);if(mod>(ws>>1)-1)z=(ws>>1)-mod;else z=mod;k.isubn(z);}else{z=0;}naf.push(z);// Optimization, shift by word if possible\nvar shi... | [
"0.6765914",
"0.64303064",
"0.64303064",
"0.6332739",
"0.6330919",
"0.62930375",
"0.6287292",
"0.6284914",
"0.6284914",
"0.6283662",
"0.627307",
"0.627307",
"0.627307",
"0.627307",
"0.627307",
"0.6270584",
"0.6270584",
"0.62674284",
"0.6263132",
"0.6263132",
"0.6263132",
"0... | 0.60998714 | 92 |
Represent k1, k2 in a Joint Sparse Form | function getJSF(k1, k2) {
var jsf = [
[],
[]
];
k1 = k1.clone();
k2 = k2.clone();
var d1 = 0;
var d2 = 0;
while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {
// First phase
var m14 = (k1.andln(3) + d1) & 3;
var m24 = (k2.andln(3) + d2) & 3;
if (m14 === 3)
m14 = -1;
if (m24 =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function K(a,b){this.g=[];this.H=a;this.G=b||null;this.f=this.a=!1;this.c=void 0;this.u=this.K=this.m=!1;this.j=0;this.b=null;this.o=0}",
"function K(){this.i=0,this.j=0,this.S=new Array}",
"function k(m1, m2){\r\n return do_(\r\n bind(\"x\", m1),\r\n bind(\"xs\", m2),\r\n ... | [
"0.5769692",
"0.5731908",
"0.53482056",
"0.52648157",
"0.5132514",
"0.51150286",
"0.5110443",
"0.50927955",
"0.50731033",
"0.50641257",
"0.50608915",
"0.5059641",
"0.5027422",
"0.50183904",
"0.5014289",
"0.49767065",
"0.49767065",
"0.49767065",
"0.49522403",
"0.4840789",
"0.4... | 0.0 | -1 |
These standalone emit functions are used to optimize calling of event handlers for fast cases because emit() itself often has a variable number of arguments and can be deoptimized because of that. These functions always have the same number of arguments and thus do not get deoptimized, so the code inside them can execu... | function emitNone(handler, isFn, self) {
if (isFn)
handler.call(self);
else {
var len = handler.length;
var listeners = arrayClone(handler, len);
for (var i = 0; i < len; ++i)
listeners[i].call(self);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"emit(...args) {\n this._event_dispatcher.$emit(...args);\n }",
"function emitAsync(args){\n\t\tsetTimeout(function(){\n\t\t\temit.apply(evented, args);\n\t\t}, 0);\n\t}",
"function emitEvent(fn) {\n if (typeof fn != 'function') return\n\n var args = [].slice.call(arguments, 1)\n return fn.apply(null, ar... | [
"0.65232825",
"0.64034903",
"0.6345563",
"0.61951494",
"0.606324",
"0.60423094",
"0.5946029",
"0.5925401",
"0.59008384",
"0.5893087",
"0.58764905",
"0.5866933",
"0.58611524",
"0.5856904",
"0.58474696",
"0.58474696",
"0.5824",
"0.5816713",
"0.5792711",
"0.5792711",
"0.5792652"... | 0.55675447 | 97 |
About 1.5x faster than the twoarg version of Arraysplice(). | function spliceOne(list, index) {
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
list[i] = list[k];
list.pop();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static fastSplice(arr, startIdx, removeCount) {\n let i, length = arr.length;\n if (startIdx >= length || removeCount === 0) {\n return;\n }\n removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);\n let len = length - removeCount;\n ... | [
"0.7395812",
"0.71519256",
"0.7065192",
"0.7012039",
"0.6878061",
"0.6753091",
"0.67074555",
"0.66961807",
"0.66882205",
"0.6687342",
"0.6681239",
"0.6679162",
"0.6678183",
"0.66775954",
"0.66335577",
"0.6621636",
"0.65752155",
"0.6558999",
"0.6531689",
"0.65295357",
"0.64876... | 0.0 | -1 |
The `defineToJSON()` function defines toJSON() and inspect() prototype methods, if no function provided they become aliases for toString(). | function defineToJSON(classObject) {
var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : classObject.prototype.toString;
classObject.prototype.toJSON = fn;
classObject.prototype.inspect = fn;
if (_nodejsCustomInspectSymbol.default) {
classObject.prototype[_nodejsCustomInspectSymbol... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function defineToJSON( // eslint-disable-next-line flowtype/no-weak-types\nclassObject) {\n var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : classObject.prototype.toString;\n classObject.prototype.toJSON = fn;\n classObject.prototype.inspect = fn;\n\n if (nodejsCustomInspectSymbol) ... | [
"0.7846291",
"0.7841683",
"0.7841683",
"0.76182044",
"0.7552503",
"0.7552503",
"0.64149547",
"0.62821907",
"0.6274903",
"0.6008001",
"0.6007019",
"0.5972311",
"0.58984476",
"0.58984476",
"0.5872023",
"0.58612436",
"0.5861123",
"0.58400583",
"0.57618713",
"0.57246906",
"0.5724... | 0.76123947 | 4 |
Used to print values in error messages. | function inspect(value) {
return formatValue(value, []);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"printErrors() {\n console.log(this.toOutputString());\n }",
"function displayErrors(pErr){\n console.log('-----------');\n console.log('Error in Mod: ' +pErr.mod +' | Func: ' +pErr.func);\n //console.log('name: ' +pErr.name);\n console.log(getException(pErr.name));\n console.log('msg: '+pErr.m... | [
"0.73850906",
"0.68270606",
"0.67731297",
"0.67120796",
"0.6632994",
"0.6515777",
"0.6515777",
"0.6462721",
"0.64425826",
"0.6403813",
"0.63979447",
"0.6337862",
"0.63326454",
"0.6295945",
"0.6295945",
"0.6292053",
"0.6249493",
"0.6235552",
"0.61916476",
"0.6176068",
"0.61729... | 0.0 | -1 |
Return true if `value` is objectlike. A value is objectlike if it's not `null` and has a `typeof` result of "object". | function isObjectLike(value) {
return _typeof(value) == 'object' && value !== null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isObjectLike(value) {\n return _typeof$1(value) == 'object' && value !== null;\n }",
"function isObjectLike$a(value) {\n return typeof value == 'object' && value !== null;\n}",
"function isObjectLike(value) {\n return typeof value === \"object\" && !!value;\n}",
"function isObjectLike(va... | [
"0.86815506",
"0.8407923",
"0.82703304",
"0.82158667",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.81635505",
"0.80934095",
"0.79514503",
"0.7902399",
"0.78982896",
... | 0.8587879 | 12 |
Produces the value of a block string from its parsed raw value, similar to CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. This implements the GraphQL spec's BlockStringValue() static algorithm. | function dedentBlockStringValue(rawString) {
// Expand a block string's raw value into independent lines.
var lines = rawString.split(/\r\n|[\n\r]/g); // Remove common indentation from all lines but first.
var commonIndent = getBlockStringIndentation(lines);
if (commonIndent !== 0) {
for (var i = 1; i < l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function blockStringValue(rawString) {\n // Expand a block string's raw value into independent lines.\n var lines = rawString.split(/\\r\\n|[\\n\\r]/g);\n\n // Remove common indentation from all lines but first.\n var commonIndent = null;\n for (var i = 1; i < lines.length; i++) {\n var line = lines[i];\n ... | [
"0.74625176",
"0.74625176",
"0.74625176",
"0.74625176",
"0.74625176",
"0.74518496",
"0.74518496",
"0.73024595",
"0.6739009",
"0.6724367",
"0.6585725",
"0.6576142",
"0.6567848",
"0.6563382",
"0.6534733",
"0.6534733",
"0.6534733",
"0.6534733",
"0.6534733",
"0.6532042",
"0.65169... | 0.6444007 | 41 |
Print a block string in the indented block form by adding a leading and trailing blank line. However, if a block string starts with whitespace and is a singleline, adding a leading blank line would strip that whitespace. | function printBlockString(value) {
var indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var preferMultipleLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var isSingleLine = value.indexOf('\n') === -1;
var hasLeadingSpace = value[0] === ' ' ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function dedentBlockStringValue(rawString) {\n // Expand a block string's raw value into independent lines.\n var lines = rawString.split(/\\r\\n|[\\n\\r]/g); // Remove common indentation from all lines but first.\n\n var commonIndent = null;\n\n for (var i = 1; i < lines.length; i++) {\n var line = lines[i... | [
"0.66551816",
"0.6570223",
"0.6570223",
"0.6570223",
"0.65681314",
"0.65542954",
"0.6529742",
"0.6517451",
"0.6517451",
"0.6517451",
"0.6517451",
"0.65028507",
"0.65028507",
"0.65028507",
"0.65028507",
"0.65028507",
"0.65028507",
"0.65028507",
"0.65028507",
"0.65028507",
"0.6... | 0.65010077 | 32 |
Given a Source object, this returns a Lexer for that source. A Lexer is a stateful stream generator in that every time it is advanced, it returns the next token in the Source. Assuming the source lexes, the final Token emitted by the lexer will be of kind EOF, after which the lexer will repeatedly return the same EOF t... | function createLexer(source, options) {
var startOfFileToken = new Tok(_tokenKind.TokenKind.SOF, 0, 0, 0, 0, null);
var lexer = {
source: source,
options: options,
lastToken: startOfFileToken,
token: startOfFileToken,
line: 1,
lineStart: 0,
advance: advanceLexer,
lookahead: lookahead... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Lexer(source) {\n var startOfFileToken = new _ast_mjs__WEBPACK_IMPORTED_MODULE_0__.Token(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__.TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lin... | [
"0.7593497",
"0.7593497",
"0.75868636",
"0.75835013",
"0.74685055",
"0.74685055",
"0.74685055",
"0.73018223",
"0.73018223",
"0.73018223",
"0.73018223",
"0.73018223",
"0.73018223",
"0.7283453",
"0.7263484",
"0.72592604",
"0.72556704",
"0.72346634",
"0.72218",
"0.71255815",
"0.... | 0.72048175 | 19 |
The return type of createLexer. | function isPunctuatorToken(token) {
var kind = token.kind;
return kind === _tokenKind.TokenKind.BANG || kind === _tokenKind.TokenKind.DOLLAR || kind === _tokenKind.TokenKind.AMP || kind === _tokenKind.TokenKind.PAREN_L || kind === _tokenKind.TokenKind.PAREN_R || kind === _tokenKind.TokenKind.SPREAD || kind === _tok... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function makeLexer() {\n const mooLexer = moo.compile(tokens);\n\n return {\n current: null,\n lines: [],\n get line() {\n return mooLexer.line;\n },\n get col() {\n return mooLexer.col;\n },\n save() {\n return mooLexer.save();\n },\n reset(chunk, info) {\n this.li... | [
"0.6777431",
"0.67016006",
"0.66394943",
"0.66394943",
"0.66394943",
"0.6548947",
"0.6512892",
"0.6473486",
"0.63578767",
"0.63490534",
"0.6299465",
"0.61170155",
"0.6104614",
"0.6060769",
"0.6047272",
"0.6037802",
"0.6014201",
"0.6014201",
"0.6014201",
"0.6014201",
"0.601420... | 0.0 | -1 |
Helper function for constructing the Token object. | function Tok(kind, start, end, line, column, prev, value) {
this.kind = kind;
this.start = start;
this.end = end;
this.line = line;
this.column = column;
this.value = value;
this.prev = prev;
this.next = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function makeToken(kind, start, end, value) {\n\t return { kind: kind, start: start, end: end, value: value };\n\t}",
"function makeToken(kind, start, end, value) {\n return { kind: kind, start: start, end: end, value: value };\n}",
"constructor(token, type) {\n this._token = token; //token object\n ... | [
"0.716749",
"0.7155585",
"0.706904",
"0.7064976",
"0.69540286",
"0.6936082",
"0.6918525",
"0.68987185",
"0.6793239",
"0.67745304",
"0.6673528",
"0.66003233",
"0.659534",
"0.649638",
"0.6490552",
"0.63975376",
"0.6384403",
"0.6367625",
"0.63613516",
"0.6276101",
"0.6250431",
... | 0.0 | -1 |
Gets the next token from the source starting at the given position. This skips over whitespace until it finds the next lexable token, then lexes punctuators immediately or calls the appropriate helper function for more complicated tokens. | function readToken(lexer, prev) {
var source = lexer.source;
var body = source.body;
var bodyLength = body.length;
var pos = positionAfterWhitespace(body, prev.end, lexer);
var line = lexer.line;
var col = 1 + pos - lexer.lineStart;
if (pos >= bodyLength) {
return new Tok(_tokenKind.TokenKind.EOF, bo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function nextToken() {\n skipSpace();\n state.start = state.pos;\n if (state.pos >= input.length) {\n const tokens = state.tokens;\n // We normally run past the end a bit, but if we're way past the end, avoid an infinite loop.\n // Also check the token positions rather than the types since sometimes we... | [
"0.6481915",
"0.6425376",
"0.6416024",
"0.6358925",
"0.6329815",
"0.62764215",
"0.6218328",
"0.6218328",
"0.6218328",
"0.6218328",
"0.6218328",
"0.6218328",
"0.62158036",
"0.6195941",
"0.6189007",
"0.6181475",
"0.6168676",
"0.61488754",
"0.61488754",
"0.61488754",
"0.61488754... | 0.5996637 | 63 |
Report a message that an unexpected character was encountered. | function unexpectedCharacterMessage(code) {
if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {
return "Cannot contain the invalid character ".concat(printCharCode(code), ".");
}
if (code === 39) {
// '
return 'Unexpected single quote character (\'), did you mean to use a do... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function unexpectedCharacterMessage(code) {\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n return \"Cannot contain the invalid character \".concat(printCharCode(code), \".\");\n }\n\n if (code === 39) {\n // '\n return 'Unexpected single quote ... | [
"0.708676",
"0.6938613",
"0.6938613",
"0.6938613",
"0.6938613",
"0.6938613",
"0.6923222",
"0.68756294",
"0.6818663",
"0.6818663",
"0.6818663",
"0.6818663",
"0.6818663",
"0.6818663",
"0.6747547",
"0.6747547",
"0.6725418",
"0.6725418",
"0.6725418",
"0.6725418",
"0.6725418",
"... | 0.68689543 | 17 |
Reads from body starting at startPosition until it finds a nonwhitespace character, then returns the position of that character for lexing. | function positionAfterWhitespace(body, startPosition, lexer) {
var bodyLength = body.length;
var position = startPosition;
while (position < bodyLength) {
var code = body.charCodeAt(position); // tab | space | comma | BOM
if (code === 9 || code === 32 || code === 44 || code === 0xfeff) {
++positio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function positionAfterWhitespace(body, startPosition) {\n var bodyLength = body.length;\n var position = startPosition;\n while (position < bodyLength) {\n var code = charCodeAt.call(body, position);\n // Skip Ignored\n if (\n // BOM\n code === 0xFEFF ||\n // White Space\n code === 0x0009 |... | [
"0.67868495",
"0.6725057",
"0.6622167",
"0.6572607",
"0.657063",
"0.6462219",
"0.6462219",
"0.6462219",
"0.6462219",
"0.6462219",
"0.6462219",
"0.6461209",
"0.6461209",
"0.6461209",
"0.6461209",
"0.6461209",
"0.64409995",
"0.64409995",
"0.57714325",
"0.57078266",
"0.5652806",... | 0.65362895 | 13 |
Reads a comment token from the source file. [\u0009\u0020\uFFFF] | function readComment(source, start, line, col, prev) {
var body = source.body;
var code;
var position = start;
do {
code = body.charCodeAt(++position);
} while (!isNaN(code) && ( // SourceCharacter but not LineTerminator
code > 0x001f || code === 0x0009));
return new Tok(_tokenKind.TokenKind.COMMENT... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function readComment(source, start, line, col, prev) {\n var body = source.body;\n var code;\n var position = start;\n\n do {\n code = body.charCodeAt(++position);\n } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator\n code > 0x001f || code === 0x0009));\n\n return new _ast_mjs__WEBPACK... | [
"0.7810849",
"0.7803462",
"0.7702474",
"0.76968354",
"0.7681165",
"0.7681165",
"0.75763005",
"0.75763005",
"0.75763005",
"0.7535053",
"0.7506334",
"0.7506334",
"0.7506334",
"0.7506334",
"0.7506334",
"0.7506334",
"0.7504508",
"0.7503649",
"0.7502324",
"0.7487181",
"0.7487181",... | 0.7519027 | 10 |
Reads a number token from the source file, either a float or an int depending on whether a decimal point appears. Int: ?(0|[19][09]) Float: ?(0|[19][09])(\.[09]+)?((E|e)(+|)?[09]+)? | function readNumber(source, start, firstCode, line, col, prev) {
var body = source.body;
var code = firstCode;
var position = start;
var isFloat = false;
if (code === 45) {
// -
code = body.charCodeAt(++position);
}
if (code === 48) {
// 0
code = body.charCodeAt(++position);
if (cod... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function readNumber(source, start, firstCode, line, col, prev) {\n var body = source.body;\n var code = firstCode;\n var position = start;\n var isFloat = false;\n\n if (code === 45) {\n // -\n code = body.charCodeAt(++position);\n }\n\n if (code === 48) {\n // 0\n code = body.charCodeAt(++posit... | [
"0.78578556",
"0.7838709",
"0.78373057",
"0.78283286",
"0.7798929",
"0.7798929",
"0.77917737",
"0.77917737",
"0.77917737",
"0.778501",
"0.778501",
"0.77696466",
"0.77647454",
"0.77400035",
"0.77197856",
"0.76397234",
"0.7632159",
"0.7632159",
"0.7632159",
"0.7632159",
"0.7614... | 0.77564913 | 13 |
Returns the new position in the source after reading digits. | function readDigits(source, start, firstCode) {
var body = source.body;
var position = start;
var code = firstCode;
if (code >= 48 && code <= 57) {
// 0 - 9
do {
code = body.charCodeAt(++position);
} while (code >= 48 && code <= 57); // 0 - 9
return position;
}
throw (0, _syntaxErr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function readDigits(source, start, firstCode) {\n var body = source.body;\n var position = start;\n var code = firstCode;\n\n if (code >= 48 && code <= 57) {\n // 0 - 9\n do {\n code = body.charCodeAt(++position);\n } while (code >= 48 && code <= 57); // 0 - 9\n\n\... | [
"0.62889117",
"0.6220681",
"0.6220681",
"0.6196409",
"0.6166372",
"0.6166372",
"0.6148771",
"0.61461264",
"0.6117102",
"0.6117102",
"0.60756713",
"0.60660464",
"0.60437703",
"0.60437703",
"0.60049325",
"0.6004479",
"0.6004479",
"0.6004479",
"0.6000214",
"0.59675986",
"0.59561... | 0.60233366 | 17 |
Reads a block string token from the source file. """("?"?(\\"""|\\(?!=""")|[^"\\]))""" | function readBlockString(source, start, line, col, prev, lexer) {
var body = source.body;
var position = start + 3;
var chunkStart = position;
var code = 0;
var rawValue = '';
while (position < body.length && !isNaN(code = body.charCodeAt(position))) {
// Closing Triple-Quote (""")
if (code === 34 ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function readBlockString(source, start, line, col, prev, lexer) {\n var body = source.body;\n var position = start + 3;\n var chunkStart = position;\n var code = 0;\n var rawValue = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position))) {\n // Closing Triple-Quote (\"\"\")\n ... | [
"0.74137294",
"0.7413572",
"0.738942",
"0.738942",
"0.73713785",
"0.73378843",
"0.73358923",
"0.7332026",
"0.7323844",
"0.7323844",
"0.7323844",
"0.7308334",
"0.7291227",
"0.7284689",
"0.7284689",
"0.7284689",
"0.7284689",
"0.7269206",
"0.7269206",
"0.7226831",
"0.7225723",
... | 0.72323203 | 19 |
Converts four hexadecimal chars to the integer that the string represents. For example, uniCharCode('0','0','0','f') will return 15, and uniCharCode('0','0','f','f') returns 255. Returns a negative number on error, if a char was invalid. This is implemented by noting that char2hex() returns 1 on error, which means the ... | function uniCharCode(a, b, c, d) {
return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function uniCharCode(a, b, c, d) {\n return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);\n }",
"function uniCharCode(a, b, c, d) {\n\t return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);\n\t}",
"function uniCharCode(a, b, c, d) {\n\t return char2hex... | [
"0.71253943",
"0.70642275",
"0.70642275",
"0.70642275",
"0.62256235",
"0.6151161",
"0.61182153",
"0.6109837",
"0.5924048",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875",
"0.5912875... | 0.7169547 | 26 |
Converts a hex character to its integer value. '0' becomes 0, '9' becomes 9 'A' becomes 10, 'F' becomes 15 'a' becomes 10, 'f' becomes 15 Returns 1 on error. | function char2hex(a) {
return a >= 48 && a <= 57 ? a - 48 // 0-9
: a >= 65 && a <= 70 ? a - 55 // A-F
: a >= 97 && a <= 102 ? a - 87 // a-f
: -1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hexstr2int(str)\n{\n\tvar i = 0;\n\tif (is_hexdigit(str)==true) i = parseInt(str, [16]);\n\treturn i;\n}",
"function hexadecimalToInteger(string) {\n const DIGITS = {1:1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 };\n\n string = string.toLowerCase();... | [
"0.75071156",
"0.72284174",
"0.7174219",
"0.71694124",
"0.7087122",
"0.6992233",
"0.6980231",
"0.69140786",
"0.6892301",
"0.6804401",
"0.67283714",
"0.67022586",
"0.6697458",
"0.6697458",
"0.6697458",
"0.6697458",
"0.6697458",
"0.6697458",
"0.6697458",
"0.6697458",
"0.6697458... | 0.65861183 | 75 |
Reads an alphanumeric + underscore name from the source. [_AZaz][_09AZaz] | function readName(source, start, line, col, prev) {
var body = source.body;
var bodyLength = body.length;
var position = start + 1;
var code = 0;
while (position !== bodyLength && !isNaN(code = body.charCodeAt(position)) && (code === 95 || // _
code >= 48 && code <= 57 || // 0-9
code >= 65 && code <= 90 ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function tryReadVariableName(input, index) {\t\n\t/* Need to start with a letter or underscore. */\n\tif (!/[A-Za-z_]/.test(input.charAt(index))) return null;\n\n\t/* Keep reading characters while it's possible to do so. */\t\n\tvar result = \"\";\n\twhile (/[A-Za-z_0-9]/.test(input.charAt(index))) {\n\t\tresult +... | [
"0.6925114",
"0.6909504",
"0.6829863",
"0.6829863",
"0.6829863",
"0.68065804",
"0.65841705",
"0.654547",
"0.65248644",
"0.65248644",
"0.64740556",
"0.6468321",
"0.6455555",
"0.6425801",
"0.6425801",
"0.6425801",
"0.636898",
"0.636898",
"0.636898",
"0.636898",
"0.63322055",
... | 0.636277 | 20 |
Represents a location in a Source. Takes a Source and a UTF8 character offset, and returns the corresponding line and column as a SourceLocation. | function getLocation(source, position) {
var lineRegexp = /\r\n|[\n\r]/g;
var line = 1;
var column = position + 1;
var match;
while ((match = lineRegexp.exec(source.body)) && match.index < position) {
line += 1;
column = position + 1 - (match.index + match[0].length);
}
return {
line: line,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function SourceLocation(lexer, start, end) {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, SourceLocation);\n\n this.lexer = lexer;\n this.start = start;\n this.end = end;\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_freeze___d... | [
"0.6494564",
"0.6318829",
"0.6318829",
"0.6318829",
"0.6264982",
"0.6264982",
"0.6264982",
"0.6264982",
"0.6264982",
"0.6264982",
"0.6264982",
"0.6264982",
"0.6264982",
"0.6264982",
"0.61959803",
"0.6182084",
"0.61784947",
"0.61664635",
"0.61664635",
"0.61577433",
"0.61577433... | 0.6140856 | 46 |
A helper function to describe a token as a string for debugging | function getTokenDesc(token) {
var value = token.value;
return value ? "".concat(token.kind, " \"").concat(value, "\"") : token.kind;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printToken(token) {\r\n\t\tif (token.type === 'quote') {\r\n\t\t\treturn `\"${token.token}\"`;\r\n\t\t} else {\r\n\t\t\treturn token.token;\r\n\t\t}\r\n\t}",
"function getTokenDesc(token) {\n var value = token.value;\n return value ? \"\".concat(token.kind, \" \\\"\").concat(value, \"\\\"\") :... | [
"0.7345775",
"0.72633046",
"0.7247309",
"0.7247309",
"0.72251993",
"0.72135633",
"0.72135633",
"0.72135633",
"0.72135633",
"0.72135633",
"0.72135633",
"0.72135633",
"0.72135633",
"0.72135633",
"0.72135633",
"0.72135633",
"0.7139773",
"0.713746",
"0.70756185",
"0.7073699",
"0.... | 0.7237552 | 10 |
Render a helpful description of the location in the GraphQL Source document. | function printLocation(location) {
return printSourceLocation(location.source, (0, _location.getLocation)(location.source, location.start));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printLocation(location) {\n return printSourceLocation(location.source, Object(_language_location__WEBPACK_IMPORTED_MODULE_0__[\"getLocation\"])(location.source, location.start));\n}",
"function printLocation(location) {\n return printSourceLocation(location.source, Object(_language_location__WEBPACK_... | [
"0.6404101",
"0.6404101",
"0.6276293",
"0.61336064",
"0.61336064",
"0.6112002",
"0.6112002",
"0.60332894",
"0.5864094",
"0.5854736",
"0.58409953",
"0.5830939",
"0.57449424",
"0.5733839",
"0.5729918",
"0.5689605",
"0.5665516",
"0.56583863",
"0.56444794",
"0.5617545",
"0.561754... | 0.5847498 | 14 |
Render a helpful description of the location in the GraphQL Source document. | function printSourceLocation(source, sourceLocation) {
var firstLineColumnOffset = source.locationOffset.column - 1;
var body = whitespace(firstLineColumnOffset) + source.body;
var lineIndex = sourceLocation.line - 1;
var lineOffset = source.locationOffset.line - 1;
var lineNum = sourceLocation.line + lineOff... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printLocation(location) {\n return printSourceLocation(location.source, Object(_language_location__WEBPACK_IMPORTED_MODULE_0__[\"getLocation\"])(location.source, location.start));\n}",
"function printLocation(location) {\n return printSourceLocation(location.source, Object(_language_location__WEBPACK_... | [
"0.64021903",
"0.64021903",
"0.6276539",
"0.6131467",
"0.6131467",
"0.6110162",
"0.6110162",
"0.6032113",
"0.586277",
"0.5854722",
"0.5846019",
"0.5846019",
"0.5846019",
"0.5846019",
"0.5846019",
"0.5843979",
"0.5829463",
"0.5745135",
"0.5732682",
"0.57315266",
"0.5688693",
... | 0.5609909 | 34 |
Converts an AST into a string, using one set of reasonable formatting rules. | function print(ast) {
return (0, _visitor.visit)(ast, {
leave: printDocASTReducer
});
} // TODO: provide better type coverage in future | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function formatAst(ast) {\n return (0, _language.visit)(ast, { leave: printDocASTReducer });\n}",
"function church_ast_to_string(ast) {\n\tif (util.is_leaf(ast)) {\n\t\treturn ast.text;\n\t} else {\n\t\treturn \"(\" + ast.children.map(function(x) {return church_ast_to_string(x)}).join(\" \") + \")\"\n\t}\n}",
... | [
"0.6907318",
"0.6658709",
"0.64763826",
"0.57551503",
"0.57519037",
"0.57148486",
"0.55270946",
"0.5489868",
"0.5480407",
"0.5476735",
"0.54718816",
"0.5463142",
"0.54609615",
"0.5440716",
"0.5437396",
"0.5419792",
"0.5419664",
"0.54123235",
"0.53808147",
"0.53808147",
"0.538... | 0.5510983 | 9 |
Given maybeArray, print an empty string if it is null or empty, otherwise print all items together separated by separator if provided | function join(maybeArray, separator) {
return maybeArray ? maybeArray.filter(function (x) {
return x;
}).join(separator || '') : '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n }",
"function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '... | [
"0.7627582",
"0.7627582",
"0.7583337",
"0.7527294",
"0.7527294",
"0.7527294",
"0.73411876",
"0.7280364",
"0.7158781",
"0.7158781",
"0.7158781",
"0.7158781",
"0.7158781",
"0.7158781",
"0.7158781",
"0.7158781",
"0.7158781",
"0.7158781",
"0.6878384",
"0.66163987",
"0.64366996",
... | 0.7438268 | 25 |
If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string. | function wrap(start, maybeString, end) {
return maybeString ? start + maybeString + (end || '') : '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wrap(start, maybeString, end) {\n return maybeString ? start + maybeString + (end || '') : '';\n }",
"function wrap(start, maybeString, end) {\n return maybeString ? start + maybeString + (end || '') : '';\n }",
"function wrap(start, maybeString, end) {\n\t\t return maybeString ? star... | [
"0.82954526",
"0.82954526",
"0.8253784",
"0.8213931",
"0.8213931",
"0.8213931",
"0.8131591",
"0.7981966",
"0.7981966",
"0.7981966",
"0.7981966",
"0.7981966",
"0.7981966",
"0.79554856",
"0.79554856",
"0.79554856",
"0.79554856",
"0.5565251",
"0.540801",
"0.5296351",
"0.5289949"... | 0.8174603 | 26 |
Creates a new visitor instance which delegates to many visitors to run in parallel. Each visitor will be visited for each node before moving on. If a prior visitor edits a node, no following visitors will see that node. | function visitInParallel(visitors) {
var skipping = new Array(visitors.length);
return {
enter: function enter(node) {
for (var i = 0; i < visitors.length; i++) {
if (!skipping[i]) {
var fn = getVisitFn(visitors[i], node.kind,
/* isLeaving */
false);
if (fn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function visitInParallel(visitors) {\n var skipping = new Array(visitors.length);\n\n return {\n enter: function enter(node) {\n for (var i = 0; i < visitors.length; i++) {\n if (!skipping[i]) {\n var fn = getVisitFn(visitors[i], node.kind, /* isLeaving */false);\n if (fn) {\n ... | [
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64450544",
"0.64230555",
"0.63888925",
"0.63888925",
"0.63888925",
"0.6372133",
"0.6370065",
... | 0.6375117 | 23 |
Creates a new visitor instance which maintains a provided TypeInfo instance along with visiting visitor. | function visitWithTypeInfo(typeInfo, visitor) {
return {
enter: function enter(node) {
typeInfo.enter(node);
var fn = getVisitFn(visitor, node.kind,
/* isLeaving */
false);
if (fn) {
var result = fn.apply(visitor, arguments);
if (result !== undefined) {
ty... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function visitWithTypeInfo(typeInfo, visitor) {\n return {\n enter: function enter(node) {\n typeInfo.enter(node);\n var fn = Object(_language_visitor_mjs__WEBPACK_IMPORTED_MODULE_3__[\"getVisitFn\"])(visitor, node.kind,\n /* isLeaving */\n false);\n\n if (fn) {\n var result = f... | [
"0.72597224",
"0.7257195",
"0.72281986",
"0.72279567",
"0.7212319",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.72032493",
"0.71900344",
"0.71900344",
... | 0.71968234 | 23 |
Given a visitor instance, if it is leaving or not, and a node kind, return the function the visitor runtime should call. | function getVisitFn(visitor, kind, isLeaving) {
var kindVisitor = visitor[kind];
if (kindVisitor) {
if (!isLeaving && typeof kindVisitor === 'function') {
// { Kind() {} }
return kindVisitor;
}
var kindSpecificVisitor = isLeaving ? kindVisitor.leave : kindVisitor.enter;
if (typeof kin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getVisitFn(visitor, kind, isLeaving) {\n var kindVisitor = visitor[kind];\n if (kindVisitor) {\n if (!isLeaving && typeof kindVisitor === 'function') {\n // { Kind() {} }\n return kindVisitor;\n }\n var kindSpecificVisitor = isLeaving ? kindVisitor.leave : ... | [
"0.735789",
"0.7335283",
"0.73079747",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.72866946",
"0.7262107",
"0.7262107",
"0.7262107",
"0... | 0.7282289 | 33 |
Helper methods Parses data, returns the resulting DOM. | function parseDOM(data, options) {
var handler = new domhandler_1.DomHandler(void 0, options);
new Parser_1.Parser(handler, options).end(data);
return handler.dom;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function parseDOM(data,options){var handler=new domhandler_1.DomHandler(void 0,options);new Parser_1.Parser(handler,options).end(data);return handler.dom;}",
"function parseDOM(data, options) {\n var handler = new domhandler_1.DomHandler(void 0, options);\n new Parser_1.Parser(handler, options).end... | [
"0.73538655",
"0.7153808",
"0.6935456",
"0.6734323",
"0.6734323",
"0.6734323",
"0.6718884",
"0.65140194",
"0.6445328",
"0.64416325",
"0.6397323",
"0.638046",
"0.58733344",
"0.58483803",
"0.5833738",
"0.57239455",
"0.57164496",
"0.571083",
"0.56792533",
"0.5669696",
"0.5552929... | 0.7001255 | 3 |
Creates a parser instance, with an attached DOM handler. | function createDomStream(cb, options, elementCb) {
var handler = new domhandler_1.DomHandler(cb, options, elementCb);
return new Parser_1.Parser(handler, options);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDOMParser() {\n domParser = domParser || new DOMParser();\n return domParser;\n }",
"function createDomStream(cb,options,elementCb){var handler=new domhandler_1.DomHandler(cb,options,elementCb);return new Parser_1.Parser(handler,options);}",
"function createDomStream(cb, options, elementCb) ... | [
"0.70758134",
"0.6924839",
"0.6825962",
"0.6777709",
"0.676648",
"0.66548616",
"0.6425167",
"0.63901234",
"0.63640386",
"0.6325592",
"0.6301971",
"0.6293109",
"0.6256142",
"0.61976266",
"0.6073341",
"0.6073341",
"0.6042293",
"0.5908865",
"0.5800092",
"0.56880313",
"0.5661269"... | 0.66883624 | 7 |
A function which returns a value representing an "owner" for transient writes to tries. The return value will only ever equal itself, and will not equal the return of any subsequent call of this function. | function OwnerID() {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get owner() {\n return new User_1.default(this.data.owner, this.client);\n }",
"function getOwner(){\n return owner;\n }",
"get owner() { return this.ownerIn; }",
"getOwner() {\n return this.currentOwner;\n }",
"function lookupHash(owner) {\n var hash = ownerData.get(owner)... | [
"0.61068887",
"0.601593",
"0.6012086",
"0.57780796",
"0.5757037",
"0.57163393",
"0.5642594",
"0.5637886",
"0.55797154",
"0.556985",
"0.5535591",
"0.55009186",
"0.5461291",
"0.5396689",
"0.5385246",
"0.5351532",
"0.5340677",
"0.53220975",
"0.5303463",
"0.5237344",
"0.52327603"... | 0.5618774 | 71 |
v8 has an optimization for storing 31bit signed numbers. Values which have either 00 or 11 as the high order bits qualify. This function drops the highest order bit in a signed number, maintaining the sign bit. | function smi(i32) {
return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }",
"function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }",
"function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }",
"function as_signed(value, bits) { var s = 32 - bits; retu... | [
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"0.6923097",
"... | 0.0 | -1 |
IE has a `uniqueID` property on DOM nodes. We can construct the hash from it and avoid memory leaks from the IE cloneNode bug. | function getIENodeHash(node) {
if (node && node.nodeType > 0) {
switch (node.nodeType) {
case 1: // Element
return node.uniqueID;
case 9: // Document
return node.documentElement && node.documentElement.uniqueID;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getIENodeHash(node){if(node&&node.nodeType>0){switch(node.nodeType){case 1: // Element\n\treturn node.uniqueID;case 9: // Document\n\treturn node.documentElement&&node.documentElement.uniqueID;}}} // If possible, use a WeakMap.",
"function getIENodeHash(node){if(node&&node.nodeType>0){switch(node.nodeTy... | [
"0.7387086",
"0.7372303",
"0.7372303",
"0.7163467",
"0.7163467",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"0.70180583",
"... | 0.7010067 | 62 |
Contributes additional methods to a constructor | function mixin(ctor, methods) {
var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };
Object.keys(methods).forEach(keyCopier);
Object.getOwnPropertySymbols &&
Object.getOwnPropertySymbols(methods).forEach(keyCopier);
return ctor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Constructor() {}",
"function Constructor() {}",
"function Constructor() {}",
"function HelperConstructor() {}",
"constructor(a, b, c) {\n super(a, b, c);\n }",
"constructur() {}",
"function ExtraMethods() {}",
"function mixin(ctor,methods){var keyCopier=function keyCopier(key){ctor.proto... | [
"0.6711224",
"0.6711224",
"0.6711224",
"0.66712135",
"0.661554",
"0.6549054",
"0.6541559",
"0.65297145",
"0.65297145",
"0.65297145",
"0.6490964",
"0.63391995",
"0.6323375",
"0.6320301",
"0.6317812",
"0.62991256",
"0.6297659",
"0.6291466",
"0.6290314",
"0.62786216",
"0.6223624... | 0.0 | -1 |
For Node v0.10 support. Remove this eventually. | function isSlowBuffer (obj) {
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _node_p(){\n\tvar ret = false;\n\tif( anchor.environment() == 'Node.js' ){ ret = true; }\n\treturn ret;\n }",
"function node_error(err) {\r\n node.error(err, err);\r\n }",
"private public function m246() {}",
"function NodeFsHandler() {}",
"function NodeFsHandler() {}",
"static reset(... | [
"0.5863474",
"0.5705808",
"0.568645",
"0.55544066",
"0.55544066",
"0.5446477",
"0.5434516",
"0.5381192",
"0.5356294",
"0.53282356",
"0.53189546",
"0.52043676",
"0.51996946",
"0.5156968",
"0.51501393",
"0.51281303",
"0.51281303",
"0.51281303",
"0.5112595",
"0.5100047",
"0.5090... | 0.0 | -1 |
Fetch the given URL as a raw JSONLD context. | load(url) {
return __awaiter(this, void 0, void 0, function* () {
// First try to retrieve the context from cache
const cached = this.documentCache[url];
if (cached) {
return typeof cached === 'string' ? cached : Array.isArray(cached) ? cached.slice() : Object... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async getJsonLd(url, options) {\n options = options || {};\n\n const jsonld = this.injector.use('jsonld');\n const remoteDoc = await jsonld.get(url, options);\n\n // compact w/context URL from link header\n if(remoteDoc.contextUrl) {\n const opts = {expandContext: remoteDoc.contextUrl};\n ... | [
"0.6532325",
"0.598331",
"0.5974199",
"0.5913816",
"0.587331",
"0.5858981",
"0.58065295",
"0.57226276",
"0.56940585",
"0.5690792",
"0.5687644",
"0.5645086",
"0.5627638",
"0.5616299",
"0.5607324",
"0.56066614",
"0.560115",
"0.5598023",
"0.55972177",
"0.55889165",
"0.5577375",
... | 0.5593508 | 19 |
Override the given context that may be loaded. This will check whether or not the url is recursively being loaded. | getOverriddenLoad(url, options) {
if (url in (options.remoteContexts || {})) {
if (options.ignoreRemoteScopedContexts) {
return url;
}
else {
throw new ErrorCoded_1.ErrorCoded('Detected a cyclic context inclusion of ' + url, ErrorCoded_1.ERROR_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"canLoad(resolvedUrl) {\n return this._urlLoader.canLoad(resolvedUrl);\n }",
"function startInterceptingLoad () {\n var original = Module._load;\n Module._load = function (request, parent, isMain) {\n var index, first;\n if (specifiedModules[request]) {\n request = specifiedModule... | [
"0.5355534",
"0.5205445",
"0.51326674",
"0.51275784",
"0.512714",
"0.51093346",
"0.5064854",
"0.50084627",
"0.49849457",
"0.49849457",
"0.48863798",
"0.48696303",
"0.48561963",
"0.48438644",
"0.4814984",
"0.4810115",
"0.479224",
"0.47815025",
"0.47671422",
"0.4762156",
"0.475... | 0.69987243 | 0 |
Check if the given simple term definition (stringbased value of a context term) should be considered a prefix. | static isSimpleTermDefinitionPrefix(value, options) {
return !Util.isPotentialKeyword(value)
&& (value[0] === '_' || options.allowPrefixNonGenDelims || Util.isPrefixIriEndingWithGenDelim(value));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getPrefix(word) {\n validate(word);\n const retValue = getLastLetterNode(this.head, word);\n return !!retValue.value && retValue.word;\n }",
"function startsWith(str, prefix) {\n\t str = toString(str);\n\t prefix = toString(prefix);\n\n\t return str.indexOf(prefix) === 0;\n\t }"... | [
"0.68490475",
"0.67845374",
"0.6748365",
"0.66796666",
"0.65658224",
"0.6565576",
"0.6480164",
"0.6472234",
"0.6471197",
"0.6420911",
"0.6420911",
"0.6418973",
"0.63852596",
"0.6379375",
"0.63718694",
"0.6336256",
"0.6287373",
"0.62495446",
"0.6092269",
"0.5954876",
"0.591390... | 0.7731515 | 1 |
Check if the given context has at least one protected term. | static hasProtectedTerms(context) {
for (const key of Object.keys(context)) {
if (Util.isTermProtected(context, key)) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isSetContext(tokens) {\n if (tokens.length == 4 || tokens.length == 6) {\n if (eq('set', 3, tokens[0]) && eq('context', 4, tokens[1]) && (eq('user', 4, tokens[2]) || eq('person', 5, tokens[2]))) {\n if (tokens.length == 4) {\n return { user: tokens[3], password: '' };\n } else if (eq(... | [
"0.5710564",
"0.5365054",
"0.53642243",
"0.51194084",
"0.50554603",
"0.50184524",
"0.49586162",
"0.4905306",
"0.4897504",
"0.48914737",
"0.48786852",
"0.4865531",
"0.4800875",
"0.47554487",
"0.4743764",
"0.47304955",
"0.47299212",
"0.47289723",
"0.47027463",
"0.47011763",
"0.... | 0.7892041 | 1 |
Check if the given key is an internal reserved keyword. | static isReservedInternalKeyword(key) {
return key.startsWith('@__');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isReserved(key) {\n return (key === \"add\" || key === \"delete\");\n}",
"function invalidKeyword(keyword) {\r\n\treturn (KEYLINKS[keyword] && keyword !== OLD_KEYWORD);\r\n}",
"function cIsReservedIdentifier(token) {\n if (!token || token.length < 2) return false;\n if (token[0] != '_') retur... | [
"0.7333359",
"0.6839771",
"0.68149304",
"0.6634929",
"0.6555235",
"0.65352935",
"0.6535203",
"0.65291965",
"0.65291965",
"0.65291965",
"0.65291965",
"0.64886904",
"0.64886904",
"0.648708",
"0.648708",
"0.6447579",
"0.63216525",
"0.6287819",
"0.6287819",
"0.62412906",
"0.62203... | 0.83574647 | 1 |
Removes all keyvalue entries from the hash. | function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear() {
this.__data__ = [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7234546",... | 0.0 | -1 |
Removes all keyvalue entries from the map. | function mapCacheClear() {
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7590112",
"0.70694387",
"0.6735414",
"0.6652174",
"0.6530006",
"0.6267597",
"0.62582785",
"0.62582785",
"0.62582785",
"0.617115",
"0.617115",
"0.617115",
"0.6166302",
"0.61519635",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614... | 0.0 | -1 |
Removes all keyvalue entries from the stack. | function stackClear() {
this.__data__ = new ListCache;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear () {\n this._dict = {}\n this._stack = [this._dict]\n }",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear() {\n\t this.__... | [
"0.63577217",
"0.63291264",
"0.63291264",
"0.63291264",
"0.62734073",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006"... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear() {
this.__data__ = [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7234546",... | 0.0 | -1 |
Removes all keyvalue entries from the map. | function mapCacheClear() {
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7590112",
"0.70694387",
"0.6735414",
"0.6652174",
"0.6530006",
"0.6267597",
"0.62582785",
"0.62582785",
"0.62582785",
"0.617115",
"0.617115",
"0.617115",
"0.6166302",
"0.61519635",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear() {
this.__data__ = [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7234546",... | 0.0 | -1 |
Removes all keyvalue entries from the map. | function mapCacheClear() {
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7590112",
"0.70694387",
"0.6735414",
"0.6652174",
"0.6530006",
"0.6267597",
"0.62582785",
"0.62582785",
"0.62582785",
"0.617115",
"0.617115",
"0.617115",
"0.6166302",
"0.61519635",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614... | 0.0 | -1 |
Removes all keyvalue entries from the stack. | function stackClear() {
this.__data__ = new ListCache;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear () {\n this._dict = {}\n this._stack = [this._dict]\n }",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear() {\n\t this.__... | [
"0.63577217",
"0.63291264",
"0.63291264",
"0.63291264",
"0.62734073",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006"... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear() {
this.__data__ = [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7234546",... | 0.0 | -1 |
Removes all keyvalue entries from the map. | function mapCacheClear() {
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7590112",
"0.70694387",
"0.6735414",
"0.6652174",
"0.6530006",
"0.6267597",
"0.62582785",
"0.62582785",
"0.62582785",
"0.617115",
"0.617115",
"0.617115",
"0.6166302",
"0.61519635",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614... | 0.0 | -1 |
This method returns `undefined`. | function noop() {
// No operation performed.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function returnUndefined() {}",
"value() { return undefined; }",
"function _undefined() {\n return exports.PREFIX.undefined;\n}",
"function f () {\n return undefined;\n }",
"_get(key) { return undefined; }",
"get None() {}",
"get None() {}",
"get None() {}",
"get None() {}",
"_get_value() ... | [
"0.7349204",
"0.67813563",
"0.6498075",
"0.6468386",
"0.6265139",
"0.6195519",
"0.6195519",
"0.6195519",
"0.6195519",
"0.5957684",
"0.5942946",
"0.5942946",
"0.59360754",
"0.5919196",
"0.5828133",
"0.5788914",
"0.57824624",
"0.5770755",
"0.5736466",
"0.5725097",
"0.57073194",... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear() {
this.__data__ = [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7234546",... | 0.0 | -1 |
Removes all keyvalue entries from the map. | function mapCacheClear() {
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7590112",
"0.70694387",
"0.6735414",
"0.6652174",
"0.6530006",
"0.6267597",
"0.62582785",
"0.62582785",
"0.62582785",
"0.617115",
"0.617115",
"0.617115",
"0.6166302",
"0.61519635",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614... | 0.0 | -1 |
This method returns `undefined`. | function noop() {
// No operation performed.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function returnUndefined() {}",
"value() { return undefined; }",
"function _undefined() {\n return exports.PREFIX.undefined;\n}",
"function f () {\n return undefined;\n }",
"_get(key) { return undefined; }",
"get None() {}",
"get None() {}",
"get None() {}",
"get None() {}",
"_get_value() ... | [
"0.7349204",
"0.67813563",
"0.6498075",
"0.6468386",
"0.6265139",
"0.6195519",
"0.6195519",
"0.6195519",
"0.6195519",
"0.5957684",
"0.5942946",
"0.5942946",
"0.59360754",
"0.5919196",
"0.5828133",
"0.5788914",
"0.57824624",
"0.5770755",
"0.5736466",
"0.5725097",
"0.57073194",... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear() {
this.__data__ = [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7236393",
"0.7234546",... | 0.0 | -1 |
Removes all keyvalue entries from the map. | function mapCacheClear() {
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7590112",
"0.70694387",
"0.6735414",
"0.6652174",
"0.6530006",
"0.6267597",
"0.62582785",
"0.62582785",
"0.62582785",
"0.617115",
"0.617115",
"0.617115",
"0.6166302",
"0.61519635",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614... | 0.0 | -1 |
This method returns `undefined`. | function noop() {
// No operation performed.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function returnUndefined() {}",
"value() { return undefined; }",
"function _undefined() {\n return exports.PREFIX.undefined;\n}",
"function f () {\n return undefined;\n }",
"_get(key) { return undefined; }",
"get None() {}",
"get None() {}",
"get None() {}",
"get None() {}",
"_get_value() ... | [
"0.7349204",
"0.67813563",
"0.6498075",
"0.6468386",
"0.6265139",
"0.6195519",
"0.6195519",
"0.6195519",
"0.6195519",
"0.5957684",
"0.5942946",
"0.5942946",
"0.59360754",
"0.5919196",
"0.5828133",
"0.5788914",
"0.57824624",
"0.5770755",
"0.5736466",
"0.5725097",
"0.57073194",... | 0.0 | -1 |
The value of this term | get value() {
return this.id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getValue() {\n return this.value;\n }",
"getValue() {\n return this.value;\n }",
"getValue() {\n return this.value;\n }",
"getValue() {\n return this.value;\n }",
"getValue()\n {\n return this.value;\n }",
"getValue() {\n return this... | [
"0.74355",
"0.74341893",
"0.74341893",
"0.74341893",
"0.7418977",
"0.7372031",
"0.7245115",
"0.72054756",
"0.71288097",
"0.7125422",
"0.7098375",
"0.7092061",
"0.7092061",
"0.7091215",
"0.7091215",
"0.7076035",
"0.7076035",
"0.7064503",
"0.7064503",
"0.70372254",
"0.7028981",... | 0.0 | -1 |
Returns whether this object represents the same term as the other | equals(other) {
// If both terms were created by this library,
// equality can be computed through ids
if (other instanceof Term) return this.id === other.id; // Otherwise, compare term type and value
return !!other && this.termType === other.termType && this.value === other.value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"equals(other) {\n // If both terms were created by this library,\n // equality can be computed through ids\n if (other instanceof Term) return this.id === other.id;\n // Otherwise, compare term type and value\n return !!other && this.termType === other.termType && this.value === other.value;\n }",
... | [
"0.7608882",
"0.75679743",
"0.75679743",
"0.6882065",
"0.6845658",
"0.62384605",
"0.62023807",
"0.6194008",
"0.6170824",
"0.6108149",
"0.61066735",
"0.60774165",
"0.60774165",
"0.60692984",
"0.60639185",
"0.6041561",
"0.6022777",
"0.60133797",
"0.598883",
"0.5987352",
"0.5987... | 0.7643897 | 0 |
Returns a plain object representation of this term | toJSON() {
return {
termType: this.termType,
value: this.value
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"toJSON() {\n return {\n termType: this.termType,\n subject: this._subject.toJSON(),\n predicate: this._predicate.toJSON(),\n object: this._object.toJSON(),\n graph: this._graph.toJSON()\n };\n }",
"get term () {\n\t\treturn this._term;\n\t}",
"get termType() {\n return 'Liter... | [
"0.6833811",
"0.6572675",
"0.64939934",
"0.64939934",
"0.6359289",
"0.6131658",
"0.6128096",
"0.6128096",
"0.60077065",
"0.60077065",
"0.5845558",
"0.5802353",
"0.5799194",
"0.57941216",
"0.5791438",
"0.57696843",
"0.57696843",
"0.5737452",
"0.56582636",
"0.56466484",
"0.5605... | 0.665086 | 2 |
The term type of this term | get termType() {
return 'NamedNode';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getType() {}",
"function isTerm(object) { return !!object.termType; }",
"type() {\n return this._type.name;\n }",
"getType () {\n\t\treturn this.type;\n\t}",
"get termType() {\n return 'Literal';\n }",
"get termType() {\n return 'Literal';\n }",
"getType() {\n\t\treturn this.type;\n\t}",
... | [
"0.6972158",
"0.67618823",
"0.67041284",
"0.66756564",
"0.66234386",
"0.66234386",
"0.6619468",
"0.661288",
"0.66106397",
"0.66003144",
"0.6582573",
"0.6574557",
"0.6574557",
"0.6518335",
"0.6469852",
"0.6461396",
"0.6461396",
"0.64552087",
"0.64278907",
"0.639043",
"0.638294... | 0.65320706 | 14 |
The term type of this term | get termType() {
return 'Literal';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getType() {}",
"function isTerm(object) { return !!object.termType; }",
"type() {\n return this._type.name;\n }",
"getType () {\n\t\treturn this.type;\n\t}",
"getType() {\n\t\treturn this.type;\n\t}",
"type() {\n return this.#type;\n }",
"getType(){return this.__type}",
"get type() {}",... | [
"0.6972158",
"0.67618823",
"0.67041284",
"0.66756564",
"0.6619468",
"0.661288",
"0.66106397",
"0.66003144",
"0.6582573",
"0.6574557",
"0.6574557",
"0.65320706",
"0.65320706",
"0.6518335",
"0.6469852",
"0.6461396",
"0.6461396",
"0.64552087",
"0.64278907",
"0.639043",
"0.638294... | 0.66234386 | 5 |
The text value of this literal | get value() {
return this.id.substring(1, this.id.lastIndexOf('"'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getLiteralValue() {\r\n return this.compilerNode.text;\r\n }",
"text() {\n return this.#text;\n }",
"get text() {\n\t\treturn this.__text;\n\t}",
"get text() {}",
"get text() {}",
"getText() {\n return this._codeMirror.getValue();\n }",
"get text () {\n\t\treturn this._tex... | [
"0.77580464",
"0.75273526",
"0.74614465",
"0.74454474",
"0.74454474",
"0.7441618",
"0.74158555",
"0.7387417",
"0.7316932",
"0.7305053",
"0.72778517",
"0.7257336",
"0.71693975",
"0.7104224",
"0.70982665",
"0.7096477",
"0.70326555",
"0.70262635",
"0.70262635",
"0.69167614",
"0.... | 0.0 | -1 |
The language of this literal | get language() {
// Find the last quotation mark (e.g., '"abc"@en-us')
var id = this.id,
atPos = id.lastIndexOf('"') + 1; // If "@" it follows, return the remaining substring; empty otherwise
return atPos < id.length && id[atPos++] === '@' ? id.substr(atPos).toLowerCase() : '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get language() {\n\t\treturn this.__language;\n\t}",
"get language() {\n\t\treturn this.__language;\n\t}",
"get lang () { return this._.recog.lang }",
"getLanguage() {\n\t\treturn this.language;\n\t}",
"function get_language() {\r\n return _lang_code;\r\n }",
"get language () {\n\t\treturn this... | [
"0.6831164",
"0.6831164",
"0.67439294",
"0.6708321",
"0.6693709",
"0.6660476",
"0.65835124",
"0.6510173",
"0.64711404",
"0.64707476",
"0.6454748",
"0.6452695",
"0.6408784",
"0.6347346",
"0.6306836",
"0.6278699",
"0.62680733",
"0.6251212",
"0.6235846",
"0.62282586",
"0.6145434... | 0.60423917 | 23 |
The datatype IRI of this literal | get datatype() {
return new NamedNode(this.datatypeString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get datatypeString() {\n // Find the last quotation mark (e.g., '\"abc\"^^http://ex.org/types#t')\n const id = this.id,\n dtPos = id.lastIndexOf('\"') + 1;\n const char = dtPos < id.length ? id[dtPos] : '';\n // If \"^\" it follows, return the remaining substring\n return char === '^' ? id.subs... | [
"0.7047373",
"0.6834564",
"0.6484293",
"0.6370968",
"0.63527745",
"0.63140804",
"0.6282403",
"0.6279363",
"0.6231075",
"0.6180163",
"0.60704917",
"0.60704917",
"0.60704917",
"0.60704917",
"0.60659236",
"0.6040001",
"0.6038955",
"0.60216606",
"0.59646446",
"0.5944303",
"0.5923... | 0.72064 | 1 |
The datatype string of this literal | get datatypeString() {
// Find the last quotation mark (e.g., '"abc"^^http://ex.org/types#t')
var id = this.id,
dtPos = id.lastIndexOf('"') + 1,
ch; // If "^" it follows, return the remaining substring
return dtPos < id.length && (ch = id[dtPos]) === '^' ? id.substr(dtPos + 2) : // If "@" f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get datatype() {\n return new NamedNode(this.datatypeString);\n }",
"get datatype() {\n return new NamedNode(this.datatypeString);\n }",
"get datatypeString() {\n // Find the last quotation mark (e.g., '\"abc\"^^http://ex.org/types#t')\n const id = this.id,\n dtPos = id.lastIndexOf('\"') + 1... | [
"0.72201645",
"0.72201645",
"0.7083252",
"0.6909633",
"0.6909633",
"0.6793156",
"0.6756663",
"0.66761386",
"0.66761386",
"0.6507698",
"0.6334573",
"0.6316086",
"0.62805754",
"0.6264466",
"0.624421",
"0.6226814",
"0.62217796",
"0.61765075",
"0.61031574",
"0.60930175",
"0.60856... | 0.6804524 | 5 |
Returns whether this object represents the same term as the other | equals(other) {
// If both literals were created by this library,
// equality can be computed through ids
if (other instanceof Literal) return this.id === other.id; // Otherwise, compare term type, value, language, and datatype
return !!other && !!other.datatype && this.termType === other.termType && t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"equals(other) {\n // If both terms were created by this library,\n // equality can be computed through ids\n if (other instanceof Term) return this.id === other.id; // Otherwise, compare term type and value\n\n return !!other && this.termType === other.termType && this.value === other.value;\n }",
"... | [
"0.7643897",
"0.7608882",
"0.75679743",
"0.75679743",
"0.6845658",
"0.62384605",
"0.62023807",
"0.6194008",
"0.6170824",
"0.6108149",
"0.61066735",
"0.60774165",
"0.60774165",
"0.60692984",
"0.60639185",
"0.6041561",
"0.6022777",
"0.60133797",
"0.598883",
"0.5987352",
"0.5987... | 0.6882065 | 4 |
The term type of this term | get termType() {
return 'BlankNode';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getType() {}",
"function isTerm(object) { return !!object.termType; }",
"type() {\n return this._type.name;\n }",
"getType () {\n\t\treturn this.type;\n\t}",
"get termType() {\n return 'Literal';\n }",
"get termType() {\n return 'Literal';\n }",
"getType() {\n\t\treturn this.type;\n\t}",
... | [
"0.6972158",
"0.67618823",
"0.67041284",
"0.66756564",
"0.66234386",
"0.66234386",
"0.6619468",
"0.661288",
"0.66106397",
"0.66003144",
"0.6582573",
"0.6574557",
"0.6574557",
"0.65320706",
"0.65320706",
"0.6518335",
"0.6469852",
"0.6461396",
"0.6461396",
"0.64552087",
"0.6427... | 0.63295645 | 25 |
The name of this blank node | get value() {
return this.id.substr(2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get name() {\n const context = getLContext(this.nativeNode);\n if (context !== null) {\n const lView = context.lView;\n const tData = lView[TVIEW].data;\n const tNode = tData[context.nodeIndex];\n return tNode.value;\n }\n else {\n ... | [
"0.7770903",
"0.77272177",
"0.7508787",
"0.7505452",
"0.73589915",
"0.73589915",
"0.73383826",
"0.71667254",
"0.71207947",
"0.7081337",
"0.7081337",
"0.69634676",
"0.6955914",
"0.69322765",
"0.6896967",
"0.6893072",
"0.6889684",
"0.6812139",
"0.6772626",
"0.6717521",
"0.66473... | 0.0 | -1 |
The term type of this term | get termType() {
return 'Variable';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getType() {}",
"function isTerm(object) { return !!object.termType; }",
"type() {\n return this._type.name;\n }",
"getType () {\n\t\treturn this.type;\n\t}",
"get termType() {\n return 'Literal';\n }",
"get termType() {\n return 'Literal';\n }",
"getType() {\n\t\treturn this.type;\n\t}",
... | [
"0.6972158",
"0.67618823",
"0.67041284",
"0.66756564",
"0.66234386",
"0.66234386",
"0.6619468",
"0.661288",
"0.66106397",
"0.66003144",
"0.6582573",
"0.65320706",
"0.65320706",
"0.6518335",
"0.6469852",
"0.6461396",
"0.6461396",
"0.64552087",
"0.64278907",
"0.639043",
"0.6382... | 0.6574557 | 12 |
The name of this variable | get value() {
return this.id.substr(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"determineName() {\r\n\t\t\t\t\tvar message, name, node, ref1, tail;\r\n\t\t\t\t\tif (!this.variable) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tref1 = this.variable.properties, [tail] = slice1.call(ref1, -1);\r\n\t\t\t\t\tnode = tail ? tail instanceof Access && tail.name : this.variable.base;\r\n\t\... | [
"0.75068444",
"0.74208516",
"0.7356449",
"0.73191565",
"0.73191565",
"0.73191565",
"0.73191565",
"0.73191565",
"0.73191565",
"0.73191565",
"0.73191565",
"0.72476465",
"0.72476465",
"0.72476465",
"0.72476465",
"0.72476465",
"0.72476465",
"0.72476465",
"0.7215349",
"0.71428126",
... | 0.0 | -1 |
The term type of this term | get termType() {
return 'DefaultGraph';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getType() {}",
"function isTerm(object) { return !!object.termType; }",
"type() {\n return this._type.name;\n }",
"getType () {\n\t\treturn this.type;\n\t}",
"get termType() {\n return 'Literal';\n }",
"get termType() {\n return 'Literal';\n }",
"getType() {\n\t\treturn this.type;\n\t}",
... | [
"0.6972158",
"0.67618823",
"0.67041284",
"0.66756564",
"0.66234386",
"0.66234386",
"0.6619468",
"0.661288",
"0.66106397",
"0.66003144",
"0.6582573",
"0.6574557",
"0.6574557",
"0.65320706",
"0.65320706",
"0.6518335",
"0.6469852",
"0.64552087",
"0.64278907",
"0.639043",
"0.6382... | 0.6461396 | 18 |
Returns whether this object represents the same term as the other | equals(other) {
// If both terms were created by this library,
// equality can be computed through strict equality;
// otherwise, compare term types.
return this === other || !!other && this.termType === other.termType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"equals(other) {\n // If both terms were created by this library,\n // equality can be computed through ids\n if (other instanceof Term) return this.id === other.id; // Otherwise, compare term type and value\n\n return !!other && this.termType === other.termType && this.value === other.value;\n }",
"... | [
"0.7643897",
"0.7608882",
"0.6882065",
"0.6845658",
"0.62384605",
"0.62023807",
"0.6194008",
"0.6170824",
"0.6108149",
"0.61066735",
"0.60774165",
"0.60774165",
"0.60692984",
"0.60639185",
"0.6041561",
"0.6022777",
"0.60133797",
"0.598883",
"0.5987352",
"0.5987352",
"0.598735... | 0.75679743 | 3 |
Constructs a term from the given internal string ID | function fromId(id, factory) {
factory = factory || DataFactory; // Falsy value or empty string indicate the default graph
if (!id) return factory.defaultGraph(); // Identify the term type based on the first character
switch (id[0]) {
case '_':
return factory.blankNode(id.substr(2));
case '?':
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function termFromId(id, factory) {\n factory = factory || DataFactory;\n\n // Falsy value or empty string indicate the default graph\n if (!id) return factory.defaultGraph();\n\n // Identify the term type based on the first character\n switch (id[0]) {\n case '?':\n return factory.variable(id.substr(1... | [
"0.71467775",
"0.6554483",
"0.606138",
"0.589233",
"0.5842106",
"0.5822708",
"0.5814367",
"0.5770881",
"0.57658917",
"0.57241714",
"0.57241714",
"0.57241714",
"0.57241714",
"0.57241714",
"0.57132393",
"0.57132393",
"0.56984085",
"0.56041896",
"0.5576798",
"0.55232716",
"0.545... | 0.7090697 | 1 |
Returns a plain object representation of this quad | toJSON() {
return {
subject: this.subject.toJSON(),
predicate: this.predicate.toJSON(),
object: this.object.toJSON(),
graph: this.graph.toJSON()
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get Quad() {}",
"static serializeQuad(quad) {\n return NQuads.serializeQuadComponents(quad.subject, quad.predicate, quad.object, quad.graph);\n }",
"toJSON() {\n return {\n id: this.id,\n name: this.name,\n color: this.color,\n position: this.body.position,\n quaternion: this.bo... | [
"0.740209",
"0.67024726",
"0.6484778",
"0.6461032",
"0.6460962",
"0.6460962",
"0.6355279",
"0.6355279",
"0.6344086",
"0.6338132",
"0.6303765",
"0.6303765",
"0.62897754",
"0.6164745",
"0.6095334",
"0.59701365",
"0.5879182",
"0.58758986",
"0.5862037",
"0.5859637",
"0.58548194",... | 0.0 | -1 |
Returns whether this object represents the same quad as the other | equals(other) {
return !!other && this.subject.equals(other.subject) && this.predicate.equals(other.predicate) && this.object.equals(other.object) && this.graph.equals(other.graph);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Equals(other) {\n return GDUtility.IsSameTypeAsTarget(this, other) && (\n this.translation.Equals(other.translation) &&\n this.rotationInRadians === other.rotationInRadians &&\n this.scale.Equals(other.scale) &&\n this.origin.Equals(other.origin) &&\n this.dimensions.Equals(other.dimens... | [
"0.6520341",
"0.64820075",
"0.63117296",
"0.6305414",
"0.6284833",
"0.6283703",
"0.6239338",
"0.6211729",
"0.61381197",
"0.599491",
"0.5979671",
"0.5972883",
"0.59557503",
"0.59342116",
"0.5922039",
"0.5914286",
"0.57888305",
"0.5764331",
"0.570992",
"0.56458145",
"0.56458145... | 0.0 | -1 |
Private methods `_tokenizeToEnd` tokenizes as for as possible, emitting tokens through the callback | _tokenizeToEnd(callback, inputFinished) {
// Continue parsing as far as possible; the loop will return eventually
var input = this._input,
outputComments = this._comments;
while (true) {
// Count and skip whitespace lines
var whiteSpaceMatch, comment;
while (whiteSpaceMatch = thi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function end() {\n if (self._input !== null) {\n self._tokenizeToEnd(callback, true);\n }\n }",
"_tokenizeToEnd(callback, inputFinished) {\n // Continue parsing as far as possible; the loop will return eventually\n let input = this._input;\n let currentLineLength = input.length;\n ... | [
"0.7308685",
"0.7114138",
"0.6908468",
"0.6247614",
"0.5892048",
"0.5881995",
"0.5797632",
"0.57496136",
"0.5745875",
"0.56320167",
"0.562622",
"0.561307",
"0.5561736",
"0.54794145",
"0.5476053",
"0.5429455",
"0.54217285",
"0.5418407",
"0.5404743",
"0.5404743",
"0.5368794",
... | 0.6820745 | 3 |
Signals the syntax error through the callback | function reportSyntaxError(self) {
callback(self._syntaxError(/^\S*/.exec(input)[0]));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function reportSyntaxError(self) { callback(self._syntaxError(/^\\S*/.exec(input)[0])); }",
"function reportSyntaxError(self) { callback(self._syntaxError(/^\\S*/.exec(input)[0])); }",
"function reportSyntaxError(self) { callback(self._syntaxError(/^\\S*/.exec(input)[0])); }",
"_syntaxError(message) {\n l... | [
"0.7861243",
"0.7861243",
"0.7861243",
"0.7136191",
"0.65660244",
"0.65561825",
"0.65201175",
"0.6493053",
"0.62315136",
"0.6009968",
"0.597161",
"0.59487134",
"0.5942633",
"0.5907965",
"0.588798",
"0.58845437",
"0.5866159",
"0.58643425",
"0.5828277",
"0.5797787",
"0.5761501"... | 0.77467567 | 4 |
`_unescape` replaces N3 escape codes by their corresponding characters | _unescape(item) {
try {
return item.replace(escapeSequence, function (sequence, unicode4, unicode8, escapedChar) {
var charCode;
if (unicode4) {
charCode = parseInt(unicode4, 16);
if (isNaN(charCode)) throw new Error(); // can never happen (regex), but helps performance
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_unescape(item) {\n let invalid = false;\n const replaced = item.replace(escapeSequence, (sequence, unicode4, unicode8, escapedChar) => {\n // 4-digit unicode character\n if (typeof unicode4 === 'string') return String.fromCharCode(Number.parseInt(unicode4, 16));\n // 8-digit unicode character... | [
"0.76946867",
"0.68869966",
"0.6798958",
"0.6617053",
"0.6617053",
"0.6617053",
"0.6554109",
"0.6554109",
"0.6554109",
"0.6554109",
"0.6554109",
"0.6554109",
"0.64767396",
"0.6446488",
"0.6443523",
"0.64035124",
"0.63568723",
"0.63321745",
"0.63321745",
"0.6157978",
"0.606695... | 0.7427256 | 1 |
`_parseLiteral` parses a literal into an unescaped value | _parseLiteral(input) {
// Ensure we have enough lookahead to identify triple-quoted strings
if (input.length >= 3) {
// Identify the opening quote(s)
const opening = input.match(/^(?:"""|"|'''|'|)/)[0];
const openingLength = opening.length; // Find the next candidate closing quotes
let ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_parseLiteral(input) {\n // Ensure we have enough lookahead to identify triple-quoted strings\n if (input.length >= 3) {\n // Identify the opening quote(s)\n const opening = input.match(/^(?:\"\"\"|\"|'''|'|)/)[0];\n const openingLength = opening.length;\n\n // Find the next candidate clo... | [
"0.76413",
"0.70543975",
"0.7028856",
"0.7014936",
"0.7014936",
"0.7014936",
"0.7014936",
"0.7014936",
"0.7014936",
"0.70147306",
"0.6999251",
"0.69987875",
"0.69987875",
"0.69987875",
"0.69987875",
"0.6993846",
"0.6993846",
"0.69822896",
"0.69677734",
"0.69431305",
"0.694248... | 0.75457376 | 1 |
Public methods `tokenize` starts the transformation of an N3 document into an array of tokens. The input can be a string or a stream. | tokenize(input, callback) {
var self = this;
this._line = 1; // If the input is a string, continuously emit tokens through the callback until the end
if (typeof input === 'string') {
this._input = input; // If a callback was passed, asynchronously call it
if (typeof callback === 'function') se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"tokenize(index) {\n\t\t\tconst {tokenize} = this.impl;\n\t\t\tif (tokenize === undefined) {\n\t\t\t\tthrow new Error(\"No tokenize implementation defined\");\n\t\t\t} else {\n\t\t\t\treturn tokenize(this, index);\n\t\t\t}\n\t\t}",
"tokenize(input, callback) {\n this._line = 1;\n\n // If the input is a stri... | [
"0.63961965",
"0.6343673",
"0.62764037",
"0.62362933",
"0.62362933",
"0.62362933",
"0.6155718",
"0.6155718",
"0.6155718",
"0.6155718",
"0.6155718",
"0.6155718",
"0.6155718",
"0.60321486",
"0.5991838",
"0.598055",
"0.59699655",
"0.5943599",
"0.5943599",
"0.5943599",
"0.5928469... | 0.6218256 | 6 |
Static class methods `_resetBlankNodeIds` restarts blank node identification | static _resetBlankNodeIds() {
blankNodePrefix = blankNodeCount = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static _resetBlankNodePrefix() {\n blankNodePrefix = 0;\n }",
"static reset(){\n _NODE_UID = 0;\n }",
"function resetNodes() {\r\n allNodes.forEach(node => {\r\n node.visited = false;\r\n });\r\n}",
"function resetData() {\n var nodeIds = nodes.map(function (node) {\n return node.id\n })\n ba... | [
"0.75865114",
"0.67929965",
"0.6684571",
"0.66043884",
"0.6374133",
"0.6359445",
"0.6216784",
"0.6167083",
"0.6158314",
"0.61250335",
"0.61051196",
"0.6090858",
"0.6090858",
"0.6090858",
"0.6068827",
"0.6066117",
"0.60329103",
"0.6014439",
"0.5998439",
"0.5998439",
"0.5942948... | 0.90763146 | 0 |
Private methods `_blank` creates a new blank node | _blank() {
return this._blankNode('b' + blankNodeCount++);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function blankNode(name) {\n return new BlankNode(name || `n3-${_blankNodeCounter++}`);\n}",
"createBlankNode(suggestedName) {\n let name, index;\n // Generate a name based on the suggested name\n if (suggestedName) {\n name = suggestedName = `_:${suggestedName}`, index = 1;\n while (this._id... | [
"0.7971016",
"0.7077041",
"0.68661475",
"0.6826059",
"0.66386354",
"0.65961295",
"0.65774715",
"0.65339136",
"0.65339136",
"0.65339136",
"0.65339136",
"0.65339136",
"0.648963",
"0.63699275",
"0.6307102",
"0.62762517",
"0.6255766",
"0.62204945",
"0.61868834",
"0.61868834",
"0.... | 0.8219731 | 0 |
`_setBase` sets the base IRI to resolve relative IRIs | _setBase(baseIRI) {
if (!baseIRI) {
this._base = '';
this._basePath = '';
} else {
// Remove fragment if present
var fragmentPos = baseIRI.indexOf('#');
if (fragmentPos >= 0) baseIRI = baseIRI.substr(0, fragmentPos); // Set base IRI and its components
this._base = baseIRI;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_setBase(baseIRI) {\n if (!baseIRI) {\n this._base = '';\n this._basePath = '';\n } else {\n // Remove fragment if present\n const fragmentPos = baseIRI.indexOf('#');\n if (fragmentPos >= 0) baseIRI = baseIRI.substr(0, fragmentPos);\n // Set base IRI and its components\n th... | [
"0.81317",
"0.67427766",
"0.6554797",
"0.6316008",
"0.630953",
"0.630953",
"0.629745",
"0.629745",
"0.629745",
"0.629745",
"0.62863004",
"0.62495846",
"0.62468994",
"0.623401",
"0.6171113",
"0.6112857",
"0.5813336",
"0.57694256",
"0.57694256",
"0.5736333",
"0.5711729",
"0.5... | 0.81406003 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.