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
Generate the OpCodes to update the bindings of a string.
function generateBindingUpdateOpCodes(str,destinationNode,attrName,sanitizeFn){if(sanitizeFn===void 0){sanitizeFn=null;}var updateOpCodes=[null,null];// Alloc space for mask and size var textParts=str.split(BINDING_REGEXP);var mask=0;for(var j=0;j<textParts.length;j++){var textValue=textParts[j];if(j&1){// Odd indexes ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateBindingUpdateOpCodes(str, destinationNode, attrName, sanitizeFn) {\n if (sanitizeFn === void 0) { sanitizeFn = null; }\n var updateOpCodes = [null, null]; // Alloc space for mask and size\n var textParts = str.split(BINDING_REGEXP);\n var mask = 0;\n for (var j = 0; j < textParts.le...
[ "0.70179504", "0.70179504", "0.70179504", "0.66112095", "0.6564379", "0.6564379", "0.6564379", "0.6564379", "0.6564379", "0.6525063", "0.6499724", "0.5679523", "0.5610887", "0.5610887", "0.5610887", "0.5610887", "0.5610887", "0.5610887", "0.5522287", "0.5043595", "0.48661166"...
0.7171499
0
Convert binding index to mask bit. Each index represents a single bit on the bitmask. Because bitmask only has 32 bits, we make the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to have more than 32 bindings this will be hit very rarely. The downside of hitting this corner case is...
function toMaskBit(bindingIndex){return 1<<Math.min(bindingIndex,31);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toMaskBit(bindingIndex) {\n return 1 << Math.min(bindingIndex, 31);\n}", "function toMaskBit(bindingIndex) {\n return 1 << Math.min(bindingIndex, 31);\n}", "function toMaskBit(bindingIndex) {\n return 1 << Math.min(bindingIndex, 31);\n}", "function toMaskBit(bindingIndex) {\n return 1 <<...
[ "0.82177776", "0.82177776", "0.82177776", "0.82177776", "0.82177776", "0.82177776", "0.82177776", "0.82177776", "0.82177776", "0.8182092", "0.80653274", "0.58208525", "0.5787974", "0.56548977", "0.5215573", "0.5123174", "0.5011803", "0.50083613", "0.49492377", "0.49473447", "...
0.8362147
0
Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes into the render tree, moves the placeholder nodes and removes the deleted nodes.
function i18nEnd(){var tView=getLView()[TVIEW];ngDevMode&&assertDefined(tView,"tView should be defined");i18nEndFirstPass(tView);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function translate(lang)\n{\n\tvar i = 0;\n\t// insert translate block\n\t$(text_block_id).each(insert_translate_block)\n\tfunction insert_translate_block(index)\n\t{\n\t\t$(translate_block_id + \":eq(\"+index+\")\").remove();\n\t\t$(text_block_id + \":eq(\"+index+\")\").after(translate_block_insert);\n\t}\n \n...
[ "0.5892296", "0.5716084", "0.5297178", "0.5251095", "0.5240894", "0.523244", "0.52190244", "0.52127784", "0.52127784", "0.52127784", "0.52127784", "0.52127784", "0.52127784", "0.5203672", "0.50633585", "0.50633585", "0.5052211", "0.504223", "0.5000442", "0.4898683", "0.489525...
0.0
-1
Marks a list of attributes as translatable.
function i18nAttributes(index,values){var tView=getLView()[TVIEW];ngDevMode&&assertDefined(tView,"tView should be defined");ngDevMode&&assertEqual(tView.firstTemplatePass,true,"You should only call i18nEnd on first template pass");if(tView.firstTemplatePass&&tView.data[index+HEADER_OFFSET]===null){i18nAttributesFirstPa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_translateAttributes(el) {\n const attributes = el.attrs;\n const i18nParsedMessageMeta = {};\n attributes.forEach(attr => {\n if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n _par...
[ "0.60109794", "0.60109794", "0.60061187", "0.60061187", "0.584089", "0.54242575", "0.5355492", "0.5259418", "0.5229698", "0.5078834", "0.5067761", "0.50437576", "0.5018043", "0.4954378", "0.4921851", "0.48861024", "0.4822947", "0.4822947", "0.4798292", "0.47728068", "0.474024...
0.4958533
13
Stores the values of the bindings during each update cycle in order to determine if we need to update the translated nodes.
function i18nExp(expression){if(expression!==NO_CHANGE){changeMask=changeMask|1<<shiftsCounter;}shiftsCounter++;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allBindings() {\n return ko.utils.objectMap(bindingsUpdater ? bindingsUpdater() : bindings, evaluateValueAccessor);\n }", "function allBindings() {\n return ko.utils.objectMap(bindingsUpdater ? bindingsUpdater() : bindings, evaluateValueAc...
[ "0.6023532", "0.59365094", "0.59365094", "0.59365094", "0.59365094", "0.59365094", "0.59365094", "0.59365094", "0.59365094", "0.5903048", "0.5903048", "0.5903048", "0.5823472", "0.58011454", "0.55090415", "0.55003977", "0.55003977", "0.5460161", "0.5450973", "0.53952926", "0....
0.0
-1
Returns the plural case based on the locale. This is a copy of the deprecated function that we used in Angular v4. // TODO(ocombe): remove this once we can the real getPluralCase function
function getPluralCase(locale,nLike){if(typeof nLike==='string'){nLike=parseInt(nLike,10);}var n=nLike;var nDecimal=n.toString().replace(/^[^.]*\.?/,'');var i=Math.floor(Math.abs(n));var v=nDecimal.length;var f=parseInt(nDecimal,10);var t=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,''),10)||0;var lang=locale.split('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocalePluralCase(locale){var data=findLocaleData(locale);return data[18/* PluralCase */];}", "function getLocalePluralCase(locale) {\n var data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n }", "function getLocalePluralCase(locale) {\n const data = fin...
[ "0.8314261", "0.8088886", "0.8033575", "0.8033575", "0.8033575", "0.8033575", "0.8033575", "0.8033575", "0.7905262", "0.76040345", "0.74675936", "0.7338283", "0.73117507", "0.73117507", "0.73117507", "0.73117507", "0.73117507", "0.73117507", "0.7112252", "0.7112252", "0.71122...
0.77581424
9
Returns the index of the current case of an ICU expression depending on the main binding value
function getCaseIndex(icuExpression,bindingValue){var index=icuExpression.cases.indexOf(bindingValue);if(index===-1){switch(icuExpression.type){case 1/* plural */:{// TODO(ocombe): replace this hard-coded value by the real LOCALE_ID value var locale='en-US';var resolvedCase=getPluralCategory(bindingValue,locale);index=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCaseIndex(icuExpression, bindingValue) {\n var index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case 1 /* plural */: {\n var resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index...
[ "0.8307004", "0.8282976", "0.8282976", "0.8282976", "0.8282976", "0.8282976", "0.8282976", "0.82711065", "0.82603526", "0.82603526", "0.82102954", "0.6324681", "0.62830615", "0.62254745", "0.62254745", "0.62254745", "0.62254745", "0.62254745", "0.62254745", "0.5763921", "0.56...
0.8161969
11
Generate the OpCodes for ICU expressions.
function icuStart(tIcus,icuExpression,startIndex,expandoStartIndex){var createCodes=[];var removeCodes=[];var updateCodes=[];var vars=[];var childIcus=[];for(var i=0;i<icuExpression.values.length;i++){// Each value is an array of strings & other ICU expressions var valueArr=icuExpression.values[i];var nestedIcus=[];for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function i18nUpdateOpCodesToString(opcodes) {\n const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n let lines = [];\n function consumeOpCode(value) {\n const ref = value >>> 2 /* SHIFT_REF */;\n const opCode = value & 3 /* MASK_OPCODE */;\n switch (opCode)...
[ "0.63492775", "0.63492775", "0.63492775", "0.63492775", "0.63492775", "0.63492775", "0.6345024", "0.6345024", "0.6345024", "0.6345024", "0.6345024", "0.6345024", "0.6315818", "0.6300472", "0.626537", "0.6125418", "0.57933307", "0.57933307", "0.57933307", "0.5786837", "0.57868...
0.5463072
29
Transforms a string template into an HTML template and a list of instructions used to update attributes or nodes that contain bindings.
function parseIcuCase(unsafeHtml,parentIndex,nestedIcus,tIcus,expandoStartIndex){var inertBodyHelper=new InertBodyHelper(document);var inertBodyElement=inertBodyHelper.getInertBodyElement(unsafeHtml);if(!inertBodyElement){throw new Error('Unable to generate inert body element');}var wrapper=getTemplateContent(inertBody...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getHTML(){const l=this.strings.length-1;let html='';let isCommentBinding=false;for(let i=0;i<l;i++){const s=this.strings[i];// For each binding we want to determine the kind of marker to insert\n// into the template source before it's parsed by the browser's HTML\n// parser. The marker type is based on whether the...
[ "0.6636697", "0.6460634", "0.6432979", "0.6376228", "0.63235855", "0.63235855", "0.6259999", "0.62042797", "0.6174304", "0.61206925", "0.6031793", "0.58310777", "0.57733536", "0.5713389", "0.56875336", "0.5681979", "0.56345373", "0.56291956", "0.56291956", "0.5620113", "0.556...
0.0
-1
Parses a node, its children and its siblings, and generates the mutate & update OpCodes.
function parseNodes(currentNode,icuCase,parentIndex,nestedIcus,tIcus,expandoStartIndex){if(currentNode){var nestedIcusToCreate=[];while(currentNode){var nextNode=currentNode.nextSibling;var newIndex=expandoStartIndex+ ++icuCase.vars;switch(currentNode.nodeType){case Node.ELEMENT_NODE:var element$$1=currentNode;var tagN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processNode(node){\n processChild(node);\n for( i in node.children )\n processNode(node.children[i]);\n }", "function _onNodeAction (node, parent) {\n var par = parent;\n\n node.setParent = function (newParent) {\n par = ne...
[ "0.6404266", "0.56953526", "0.5686296", "0.55584556", "0.55475134", "0.55472976", "0.5504943", "0.54854834", "0.547626", "0.5415004", "0.5414624", "0.53834105", "0.53815514", "0.5362207", "0.53385675", "0.5331826", "0.52518696", "0.5247128", "0.52099067", "0.5183049", "0.5177...
0.0
-1
If the value of the provided exp has changed, calls the pure function to return an updated value. Or if the value has not changed, returns cached value.
function pureFunction1(slotOffset,pureFn,exp,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var lView=getLView();var bindingIndex=getBindingRoot()+slotOffset;return bindingUpdated(lView,bindingIndex,exp)?updateBinding(lView,bindingIndex+1,thisArg?pureFn.call(thisArg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize(fn) {\n var cache = {};\n return function (arg) {\n var cachedValue = cache[arg];\n\n // when value is not present in cache, compute it\n if (cachedValue === undefined) {\n cachedValue = cache[arg] = fn(arg);\n }\n ...
[ "0.5863571", "0.5752022", "0.55766624", "0.55054754", "0.5497169", "0.5455394", "0.54465973", "0.5439673", "0.54133093", "0.5390412", "0.53649104", "0.53396344", "0.527206", "0.5263614", "0.5253166", "0.5248555", "0.5236177", "0.5234511", "0.5223373", "0.5215952", "0.52051735...
0.0
-1
If the value of any provided exp has changed, calls the pure function to return an updated value. Or if no values have changed, returns cached value.
function pureFunction2(slotOffset,pureFn,exp1,exp2,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var bindingIndex=getBindingRoot()+slotOffset;var lView=getLView();return bindingUpdated2(lView,bindingIndex,exp1,exp2)?updateBinding(lView,bindingIndex+2,thisArg?pureFn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize(fn) {\n var cache = {};\n return function (arg) {\n var cachedValue = cache[arg];\n\n // when value is not present in cache, compute it\n if (cachedValue === undefined) {\n cachedValue = cache[arg] = fn(arg);\n }\n ...
[ "0.5713045", "0.5620165", "0.5588433", "0.5523104", "0.542933", "0.54095674", "0.53839123", "0.53734213", "0.53592426", "0.53532094", "0.5303328", "0.53022563", "0.5277356", "0.52544516", "0.52543753", "0.52487147", "0.5244851", "0.5233731", "0.5207546", "0.51993275", "0.5186...
0.0
-1
If the value of any provided exp has changed, calls the pure function to return an updated value. Or if no values have changed, returns cached value.
function pureFunction3(slotOffset,pureFn,exp1,exp2,exp3,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var bindingIndex=getBindingRoot()+slotOffset;var lView=getLView();return bindingUpdated3(lView,bindingIndex,exp1,exp2,exp3)?updateBinding(lView,bindingIndex+3,this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize(fn) {\n var cache = {};\n return function (arg) {\n var cachedValue = cache[arg];\n\n // when value is not present in cache, compute it\n if (cachedValue === undefined) {\n cachedValue = cache[arg] = fn(arg);\n }\n ...
[ "0.5713045", "0.5620165", "0.5588433", "0.5523104", "0.542933", "0.54095674", "0.53839123", "0.53734213", "0.53592426", "0.53532094", "0.5303328", "0.53022563", "0.5277356", "0.52544516", "0.52543753", "0.52487147", "0.5244851", "0.5233731", "0.5207546", "0.51993275", "0.5186...
0.0
-1
If the value of any provided exp has changed, calls the pure function to return an updated value. Or if no values have changed, returns cached value.
function pureFunction4(slotOffset,pureFn,exp1,exp2,exp3,exp4,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var bindingIndex=getBindingRoot()+slotOffset;var lView=getLView();return bindingUpdated4(lView,bindingIndex,exp1,exp2,exp3,exp4)?updateBinding(lView,bindingIn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize(fn) {\n var cache = {};\n return function (arg) {\n var cachedValue = cache[arg];\n\n // when value is not present in cache, compute it\n if (cachedValue === undefined) {\n cachedValue = cache[arg] = fn(arg);\n }\n ...
[ "0.5716262", "0.5618272", "0.5590361", "0.5526291", "0.5432642", "0.5411501", "0.53811085", "0.5376802", "0.53628606", "0.5355594", "0.5303628", "0.530154", "0.5274799", "0.52579737", "0.5252148", "0.5248532", "0.52453864", "0.52305645", "0.5208712", "0.5202276", "0.51892245"...
0.0
-1
If the value of any provided exp has changed, calls the pure function to return an updated value. Or if no values have changed, returns cached value.
function pureFunction5(slotOffset,pureFn,exp1,exp2,exp3,exp4,exp5,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var bindingIndex=getBindingRoot()+slotOffset;var lView=getLView();var different=bindingUpdated4(lView,bindingIndex,exp1,exp2,exp3,exp4);return bindingUpd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize(fn) {\n var cache = {};\n return function (arg) {\n var cachedValue = cache[arg];\n\n // when value is not present in cache, compute it\n if (cachedValue === undefined) {\n cachedValue = cache[arg] = fn(arg);\n }\n ...
[ "0.57170385", "0.5619268", "0.5590855", "0.5526064", "0.54331124", "0.5411835", "0.53825253", "0.5377042", "0.5362713", "0.53546", "0.53033566", "0.5302172", "0.5275894", "0.5258645", "0.5251692", "0.52490306", "0.5246394", "0.5230614", "0.52080315", "0.5202685", "0.5188858",...
0.0
-1
If the value of any provided exp has changed, calls the pure function to return an updated value. Or if no values have changed, returns cached value.
function pureFunction6(slotOffset,pureFn,exp1,exp2,exp3,exp4,exp5,exp6,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var bindingIndex=getBindingRoot()+slotOffset;var lView=getLView();var different=bindingUpdated4(lView,bindingIndex,exp1,exp2,exp3,exp4);return bindi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize(fn) {\n var cache = {};\n return function (arg) {\n var cachedValue = cache[arg];\n\n // when value is not present in cache, compute it\n if (cachedValue === undefined) {\n cachedValue = cache[arg] = fn(arg);\n }\n ...
[ "0.5713045", "0.5620165", "0.5588433", "0.5523104", "0.542933", "0.54095674", "0.53839123", "0.53734213", "0.53592426", "0.53532094", "0.5303328", "0.53022563", "0.5277356", "0.52544516", "0.52543753", "0.52487147", "0.5244851", "0.5233731", "0.5207546", "0.51993275", "0.5186...
0.0
-1
If the value of any provided exp has changed, calls the pure function to return an updated value. Or if no values have changed, returns cached value.
function pureFunction7(slotOffset,pureFn,exp1,exp2,exp3,exp4,exp5,exp6,exp7,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var bindingIndex=getBindingRoot()+slotOffset;var lView=getLView();var different=bindingUpdated4(lView,bindingIndex,exp1,exp2,exp3,exp4);return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize(fn) {\n var cache = {};\n return function (arg) {\n var cachedValue = cache[arg];\n\n // when value is not present in cache, compute it\n if (cachedValue === undefined) {\n cachedValue = cache[arg] = fn(arg);\n }\n ...
[ "0.5713045", "0.5620165", "0.5588433", "0.5523104", "0.542933", "0.54095674", "0.53839123", "0.53734213", "0.53592426", "0.53532094", "0.5303328", "0.53022563", "0.5277356", "0.52544516", "0.52543753", "0.52487147", "0.5244851", "0.5233731", "0.5207546", "0.51993275", "0.5186...
0.0
-1
If the value of any provided exp has changed, calls the pure function to return an updated value. Or if no values have changed, returns cached value.
function pureFunction8(slotOffset,pureFn,exp1,exp2,exp3,exp4,exp5,exp6,exp7,exp8,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var bindingIndex=getBindingRoot()+slotOffset;var lView=getLView();var different=bindingUpdated4(lView,bindingIndex,exp1,exp2,exp3,exp4);re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoize(fn) {\n var cache = {};\n return function (arg) {\n var cachedValue = cache[arg];\n\n // when value is not present in cache, compute it\n if (cachedValue === undefined) {\n cachedValue = cache[arg] = fn(arg);\n }\n ...
[ "0.5716262", "0.5618272", "0.5590361", "0.5526291", "0.5432642", "0.5411501", "0.53811085", "0.5376802", "0.53628606", "0.5355594", "0.5303628", "0.530154", "0.5274799", "0.52579737", "0.5252148", "0.5248532", "0.52453864", "0.52305645", "0.5208712", "0.5202276", "0.51892245"...
0.0
-1
pureFunction instruction that can support any number of bindings. If the value of any provided exp has changed, calls the pure function to return an updated value. Or if no values have changed, returns cached value.
function pureFunctionV(slotOffset,pureFn,exps,thisArg){// TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings var bindingIndex=getBindingRoot()+slotOffset;var different=false;var lView=getLView();for(var i=0;i<exps.length;i++){bindingUpdated(lView,bindingIndex++,exps[i])&&(different...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pureFunction1(slotOffset, pureFn, exp, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n return bindingUpdated(bindingIndex, exp) ?\n updateBinding(bindingIndex + 1, thisArg ? pureF...
[ "0.667442", "0.6586808", "0.6586808", "0.6459076", "0.64487505", "0.64487505", "0.64487505", "0.64487505", "0.64487505", "0.64487505", "0.6407775", "0.63926244", "0.62673295", "0.625535", "0.62370086", "0.62202036", "0.62202036", "0.61482644", "0.613099", "0.6115497", "0.6087...
0.59744036
48
Searches the pipe registry for a pipe with the given name. If one is found, returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.
function getPipeDef$1(name,registry){if(registry){for(var i=registry.length-1;i>=0;i--){var pipeDef=registry[i];if(name===pipeDef.name){return pipeDef;}}}throw new Error("The pipe '"+name+"' could not be found!");}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPipeDef$1(name, registry) {\n if (registry) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new Error(\"The pipe '\" + name + \"'...
[ "0.78239965", "0.78239965", "0.78239965", "0.7777397", "0.7750683", "0.7750683", "0.7750683", "0.7750683", "0.7750683", "0.7743123", "0.75736314", "0.6974486", "0.56888634", "0.5036722", "0.47212765", "0.47212765", "0.47212765", "0.47212765", "0.47212765", "0.46806735", "0.46...
0.75518745
11
Unwrap the output of a pipe transformation. In order to trick change detection into considering that the new value is always different from the old one, the old value is overwritten by NO_CHANGE.
function unwrapValue(newValue){if(WrappedValue.isWrapped(newValue)){newValue=WrappedValue.unwrap(newValue);getLView()[getBindingRoot()]=NO_CHANGE;}return newValue;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unwrapValue(newValue) {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = WrappedValue.unwrap(newValue);\n getLView()[getBindingRoot()] = NO_CHANGE;\n }\n return newValue;\n}", "function unwrapValue(newValue) {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = ...
[ "0.5726334", "0.5726334", "0.56929505", "0.5519142", "0.540408", "0.540408", "0.540408", "0.540408", "0.540408", "0.53582835", "0.522651", "0.5141447", "0.5033902", "0.5017124", "0.5000172", "0.4962486", "0.48938748", "0.4866634", "0.48576632", "0.48473755", "0.4833829", "0...
0.55179423
4
Creates an instance of this class that can deliver events synchronously or asynchronously.
function EventEmitter(isAsync){if(isAsync===void 0){isAsync=false;}var _this=_super.call(this)||this;_this.__isAsync=isAsync;return _this;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AsyncEmitter() {\n if (!(this instanceof AsyncEmitter))\n return new AsyncEmitter();\n\n this._events = Object.create(null);\n}", "function createEvent () {\n var emit\n var prom = new Promise(function (resolve) {\n emit = resolve\n })\n prom.emit = emit\n return prom\n}", "...
[ "0.5886089", "0.58849126", "0.5816427", "0.56822044", "0.56822044", "0.56171477", "0.5562964", "0.5562964", "0.5485738", "0.54545546", "0.54447895", "0.54016346", "0.54016346", "0.54016346", "0.53328574", "0.53328574", "0.53328574", "0.5324943", "0.5305845", "0.530348", "0.52...
0.55410564
8
Iterates over local names for a given node and returns directive index (or 1 if a local name points to an element).
function getIdxOfMatchingSelector(tNode,selector){var localNames=tNode.localNames;if(localNames){for(var i=0;i<localNames.length;i+=2){if(localNames[i]===selector){return localNames[i+1];}}}return null;}// TODO: "read" should be an AbstractType (FW-486)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIdxOfMatchingDirective(tNode, currentView, type) {\n var defs = currentView[TVIEW].data;\n if (defs) {\n var flags = tNode.flags;\n var count = flags & 4095 /* DirectiveCountMask */;\n var start = flags >> 15 /* DirectiveStartingIndexShift */;\n var end = start + count...
[ "0.6435016", "0.6363322", "0.6229591", "0.62184757", "0.6182419", "0.61492854", "0.61492854", "0.61492854", "0.61492854", "0.61492854", "0.61492854", "0.61059874", "0.6102515", "0.6102515", "0.6101732", "0.6101246", "0.60988224", "0.60988224", "0.60988224", "0.60988224", "0.6...
0.56102896
36
Creates and returns a QueryList.
function query(memoryIndex,predicate,descend,// TODO: "read" should be an AbstractType (FW-486) read){ngDevMode&&assertPreviousIsParent(getIsParent());var queryList=new QueryList();var queries=getOrCreateCurrentQueries(LQueries_);queries.track(queryList,predicate,descend,read);storeCleanupWithContext(getLView(),queryLi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createQueryListInLView(\n// TODO: \"read\" should be an AbstractType (FW-486)\nlView, predicate, descend, read, isStatic, nodeIndex) {\n ngDevMode && assertPreviousIsParent(getIsParent());\n var queryList = new QueryList();\n var queries = lView[QUERIES] || (lView[QUERIES] = new LQueries_(null, n...
[ "0.7020796", "0.5769624", "0.5585688", "0.55428547", "0.5507347", "0.54969466", "0.5495491", "0.5495491", "0.5495491", "0.5462297", "0.5462297", "0.5462297", "0.53840244", "0.53780997", "0.53780997", "0.537295", "0.53725517", "0.5340895", "0.53092444", "0.5303435", "0.5299936...
0.54665303
9
Refreshes a query by combining matches from all active views and removing matches from deleted views. Returns true if a query got dirty during change detection, false otherwise.
function queryRefresh(queryList){var queryListImpl=queryList;if(queryList.dirty){queryList.reset(queryListImpl._valuesTree);queryList.notifyOnChanges();return true;}return false;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queryRefresh(queryList) {\n var queryListImpl = queryList;\n if (queryList.dirty) {\n queryList.reset(queryListImpl._valuesTree);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}", "function queryRefresh(queryList) {\n var queryListImpl = queryList...
[ "0.64075005", "0.64075005", "0.64075005", "0.6356463", "0.63474166", "0.61641127", "0.61641127", "0.61641127", "0.61641127", "0.61641127", "0.6158622", "0.593556", "0.56238294", "0.55697095", "0.5566232", "0.5566232", "0.5566232", "0.5566232", "0.5566232", "0.5566232", "0.552...
0.5918986
12
Checks that quotes (" and ') are properly balanced inside a string. Assumes that neither escape (\) nor any other character that could result in breaking out of a string parsing context are allowed; see This code was taken from the Closure sanitization library.
function hasBalancedQuotes(value){var outsideSingle=true;var outsideDouble=true;for(var i=0;i<value.length;i++){var c=value.charAt(i);if(c==='\''&&outsideDouble){outsideSingle=!outsideSingle;}else if(c==='"'&&outsideSingle){outsideDouble=!outsideDouble;}}return outsideSingle&&outsideDouble;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasBalancedQuotes(value) {\n var outsideSingle = true;\n var outsideDouble = true;\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n if (c === '\\'' && outsideDouble) {\n outsideSingle = !outsideSingle;\n }\n else if (c === '\"' && outs...
[ "0.7176864", "0.7176864", "0.7176864", "0.7176864", "0.7176864", "0.6995315", "0.677742", "0.656735", "0.6539491", "0.6361752", "0.6295806", "0.62737954", "0.61822903", "0.61754555", "0.61484915", "0.61484915", "0.61484915", "0.61484915", "0.61484915", "0.61484915", "0.614849...
0.7400988
0
Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single value) and returns a value that is safe to use in a browser environment.
function _sanitizeStyle(value){value=String(value).trim();// Make sure it's actually a string. if(!value)return'';// Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for // reasoning behind this. var urlMatch=value.match(URL_RE);if(urlMatch&&_sanitizeUrl(urlMatch[1])===urlMatch[1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n...
[ "0.79338783", "0.7911295", "0.7911295", "0.7911295", "0.7911295", "0.64939", "0.6461528", "0.6461528", "0.642035", "0.642035", "0.642035", "0.6308375", "0.6124967", "0.6124967", "0.60430604", "0.6006184", "0.6006184", "0.6006184", "0.6006184", "0.6006184", "0.5962639", "0.5...
0.7913347
1
Registers a loaded module. Should only be called from generated NgModuleFactory code.
function registerModuleFactory(id,factory){var existing=modules.get(id);assertNotExisting(id,existing&&existing.moduleType);modules.set(id,factory);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerModule({id, name, dependencies=[], init=function(){}, getTransferables=null}, callback) {\n // Only register once\n if (modules[id]) return\n\n try {\n // If any dependencies are modules, ensure they're registered and grab their value\n dependencies = dependencies.map(dep => {\n...
[ "0.6233194", "0.6201128", "0.61042005", "0.61042005", "0.6067266", "0.6005739", "0.59522927", "0.59437025", "0.5925993", "0.5925993", "0.5925993", "0.5925993", "0.5925993", "0.5925993", "0.5914597", "0.5743548", "0.5623067", "0.5623067", "0.561538", "0.561538", "0.5594472", ...
0.618257
2
Enqueues moduleDef to be checked later to see if scope can be set on its component declarations.
function enqueueModuleForDelayedScoping(moduleType,ngModule){moduleQueue.push({moduleType:moduleType,ngModule:ngModule});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n\n try {\n for (var i = moduleQueue.length - 1; i >= 0; i--) {\n var _moduleQueue$i = moduleQueue[i],\n moduleType = _moduleQueue$i.mod...
[ "0.6208693", "0.6158556", "0.6158556", "0.6158556", "0.6158556", "0.6158556", "0.6158556", "0.61271894", "0.61271894", "0.61271894", "0.61117506", "0.6080311", "0.57853615", "0.5723358", "0.5723358", "0.5723358", "0.5722299", "0.57202196", "0.57202196", "0.57202196", "0.57202...
0.59805614
12
Loops over queued module definitions, if a given module definition has all of its declarations resolved, it dequeues that module definition and sets the scope on its declarations.
function flushModuleScopingQueueAsMuchAsPossible(){if(!flushingModuleQueue){flushingModuleQueue=true;try{for(var i=moduleQueue.length-1;i>=0;i--){var _a=moduleQueue[i],moduleType=_a.moduleType,ngModule=_a.ngModule;if(ngModule.declarations&&ngModule.declarations.every(isResolvedDeclaration)){// dequeue moduleQueue.splic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n\n try {\n for (var i = moduleQueue.length - 1; i >= 0; i--) {\n var _moduleQueue$i = moduleQueue[i],\n moduleType = _moduleQueue$i.mod...
[ "0.7636576", "0.756845", "0.756845", "0.756845", "0.7535795", "0.7513265", "0.7513265", "0.7513265", "0.7513265", "0.7513265", "0.7513265", "0.5804141", "0.5765401", "0.5765401", "0.5765401", "0.5765401", "0.5765401", "0.5765401", "0.56798255", "0.56686985", "0.56686985", "...
0.7150777
11
Returns truthy if a declaration has resolved. If the declaration happens to be an array of declarations, it will recurse to check each declaration in that array (which may also be arrays).
function isResolvedDeclaration(declaration){if(Array.isArray(declaration)){return declaration.every(isResolvedDeclaration);}return!!resolveForwardRef(declaration);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isResolvedDeclaration(declaration) {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n\n return !!resolveForwardRef(declaration);\n }", "function isResolvedDeclaration(declaration) {\n if (Array.isArray(declaration)) {\n ...
[ "0.8402238", "0.83835095", "0.83835095", "0.83835095", "0.83835095", "0.83835095", "0.83835095", "0.83835095", "0.83835095", "0.83835095", "0.83447576", "0.63850135", "0.6349696", "0.62993616", "0.59292346", "0.5772615", "0.5731379", "0.5538035", "0.55292964", "0.5456911", "0...
0.83682173
10
Compiles a module in JIT mode.
function compileNgModule(moduleType,ngModule){if(ngModule===void 0){ngModule={};}compileNgModuleDefs(moduleType,ngModule);// Because we don't know if all declarations have resolved yet at the moment the // NgModule decorator is executing, we're enqueueing the setting of module scope // on its declarations to be run at ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeJITCompiledFunction() {\n\tfunction target(x) {\n\t\treturn x;\n\t}\n\tfor (var i = 0; i < 1000; i++) {\n\t\ttarget(i);\n\t}\n\treturn target;\n}", "function jitExpression(def,context,sourceUrl,preStatements){// The ConstantPool may contain Statements which declare variables used in the final expres...
[ "0.70798236", "0.6420616", "0.6236794", "0.617833", "0.61269355", "0.60450524", "0.6020358", "0.60000384", "0.60000384", "0.5951454", "0.5773423", "0.56374216", "0.5570174", "0.55605775", "0.5559489", "0.5559489", "0.5551015", "0.5551015", "0.5551015", "0.5548955", "0.5548249...
0.5069199
67
Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.
function compileNgModuleDefs(moduleType,ngModule){ngDevMode&&assertDefined(moduleType,'Required value moduleType');ngDevMode&&assertDefined(ngModule,'Required value ngModule');var declarations=flatten$1(ngModule.declarations||EMPTY_ARRAY$2);var ngModuleDef=null;Object.defineProperty(moduleType,NG_MODULE_DEF,{configurab...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileNgModuleDefs(moduleType, ngModule) {\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n var declarations = flatten$1(ngModule.declarations || EMPTY_ARRAY$2);\n var ngModuleDef = null;\n Object.de...
[ "0.6229283", "0.6229283", "0.6091688", "0.6051972", "0.5948557", "0.58393943", "0.58393943", "0.581938", "0.581938", "0.581938", "0.58180684", "0.5748222", "0.5748222", "0.5654073", "0.5654073", "0.5654073", "0.5654073", "0.5654073", "0.5654073", "0.5633226", "0.5617772", "...
0.6322393
0
Computes the combined declarations of explicit declarations, as well as declarations inherited by traversing the exports of imported modules.
function computeCombinedExports(type){type=resolveForwardRef(type);var ngModuleDef=getNgModuleDef(type,true);return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(flatten$1(ngModuleDef.exports.map(function(type){var ngModuleDef=getNgModuleDef(type);if(ngModuleDef){verifySemanticsOfNgModuleDef(type);return compu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDeclarationDeps($ast, declaration, scope) {\n if (scope !== SCOPE_EXPLICIT) {\n return {};\n }\n\n var depParentNodes = $ast(declaration).parents(function (node) {\n if (node.node.type === 'mixin') {\n return true;\n } else if (node.node.type === 'atrule') {\n var atruleIdentNode ...
[ "0.55521184", "0.5551595", "0.5243871", "0.52296835", "0.5200036", "0.51839316", "0.5130466", "0.5130466", "0.51268095", "0.5120468", "0.50568885", "0.49947575", "0.49438852", "0.4938732", "0.4936767", "0.49181843", "0.48934022", "0.4874131", "0.4869379", "0.4867596", "0.4850...
0.46626753
32
Some declared components may be compiled asynchronously, and thus may not have their ngComponentDef set yet. If this is the case, then a reference to the module is written into the `ngSelectorScope` property of the declared type.
function setScopeOnDeclaredComponents(moduleType,ngModule){var declarations=flatten$1(ngModule.declarations||EMPTY_ARRAY$2);var transitiveScopes=transitiveScopesFor(moduleType);declarations.forEach(function(declaration){if(declaration.hasOwnProperty(NG_COMPONENT_DEF)){// An `ngComponentDef` field exists - go ahead and ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setScopeOnDeclaredComponents(moduleType, ngModule) {\n var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$4);\n var transitiveScopes = transitiveScopesFor(moduleType);\n declarations.forEach(function (declaration) {\n if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) {\n ...
[ "0.6473398", "0.6462879", "0.6462879", "0.6462879", "0.5983678", "0.5570908", "0.53961784", "0.5394741", "0.5394741", "0.5394741", "0.5394741", "0.5394741", "0.5394741", "0.5391269", "0.5391269", "0.5391269", "0.5391269", "0.53864825", "0.53573436", "0.5357243", "0.5337292", ...
0.70945466
0
Patch the definition of a component with directives and pipes from the compilation scope of a given module.
function patchComponentDefWithScope(componentDef,transitiveScopes){componentDef.directiveDefs=function(){return Array.from(transitiveScopes.compilation.directives).map(function(dir){return getDirectiveDef(dir)||getComponentDef(dir);}).filter(function(def){return!!def;});};componentDef.pipeDefs=function(){return Array.f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function patchComponentDefWithScope(componentDef, transitiveScopes) {\n componentDef.directiveDefs = function () { return Array.from(transitiveScopes.compilation.directives)\n .map(function (dir) { return getDirectiveDef(dir) || getComponentDef(dir); })\n .filter(function (def) { return !!def; });...
[ "0.68635684", "0.68635684", "0.68306375", "0.6679971", "0.6676434", "0.6676434", "0.6676434", "0.6676434", "0.6676434", "0.66623956", "0.6611085", "0.6575613", "0.5687222", "0.56739616", "0.5654153", "0.5654153", "0.5654153", "0.5654153", "0.5654153", "0.5654153", "0.55736613...
0.7423104
0
Compute the pair of transitive scopes (compilation scope and exported scope) for a given module. This operation is memoized and the result is cached on the module's definition. It can be called on modules with components that have not fully compiled yet, but the result should not be used until they have.
function transitiveScopesFor(moduleType){if(!isNgModule(moduleType)){throw new Error(moduleType.name+" does not have an ngModuleDef");}var def=getNgModuleDef(moduleType);if(def.transitiveCompileScopes!==null){return def.transitiveCompileScopes;}var scopes={compilation:{directives:new Set(),pipes:new Set()},exported:{di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transitiveScopesFor(moduleType) {\n if (!isNgModule(moduleType)) {\n throw new Error(`${moduleType.name} does not have a module def (ɵmod property)`);\n }\n const def = getNgModuleDef(moduleType);\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;...
[ "0.7482386", "0.7482386", "0.7482386", "0.7482386", "0.7482386", "0.7461527", "0.7455648", "0.7433014", "0.7274906", "0.7274906", "0.7274906", "0.7100453", "0.53271747", "0.5113632", "0.5100095", "0.5037129", "0.5029253", "0.5029253", "0.5029253", "0.50103486", "0.4960473", ...
0.7068521
12
Compile an Angular directive according to its decorator metadata, and patch the resulting ngDirectiveDef onto the component type. In the event that compilation is not immediate, `compileDirective` will return a `Promise` which will resolve when compilation completes and the directive becomes usable.
function compileDirective(type,directive){var ngDirectiveDef=null;Object.defineProperty(type,NG_DIRECTIVE_DEF,{get:function get(){if(ngDirectiveDef===null){var facade=directiveMetadata(type,directive);ngDirectiveDef=getCompilerFacade().compileDirective(angularCoreEnv,"ng://"+(type&&type.name)+"/ngDirectiveDef.js",facad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compileDirective(type, directive) {\n var ngDirectiveDef = null;\n addDirectiveFactoryDef(type, directive || {});\n Object.defineProperty(type, NG_DIR_DEF, {\n get: function get() {\n if (ngDirectiveDef === null) {\n // `directive` can be null in the c...
[ "0.6931219", "0.69021213", "0.6885134", "0.6885134", "0.6885134", "0.6816536", "0.6816536", "0.6816536", "0.6816536", "0.6816536", "0.6789771", "0.677218", "0.67663354", "0.65042496", "0.6495426", "0.6420852", "0.6420852", "0.6394089", "0.63812363", "0.63812363", "0.63812363"...
0.71186644
0
Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a `Component`).
function directiveMetadata(type,metadata){// Reflect inputs and outputs. var propMetadata=getReflect().propMetadata(type);return{name:type.name,type:type,typeArgumentCount:0,selector:metadata.selector,deps:reflectDependencies(type),host:metadata.host||EMPTY_OBJ,propMetadata:propMetadata,inputs:metadata.inputs||EMPTY_AR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function directiveMetadataFromGlobalMetadata(directive,outputCtx,reflector){var summary=directive.toSummary();var name=identifierName(directive.type);name||error(\"Cannot resolver the name of \"+directive.type);return{name:name,type:outputCtx.importExpr(directive.type.reference),typeArgumentCount:0,typeSourceSpan:...
[ "0.70407254", "0.6948651", "0.68726957", "0.68726957", "0.6628714", "0.6628714", "0.6628714", "0.6628714", "0.6628714", "0.64832914", "0.6296018", "0.61318237", "0.6113916", "0.6066965", "0.604301", "0.604301", "0.60334337", "0.6020023", "0.6008215", "0.60045844", "0.60045844...
0.645712
10
Resolve a single provider.
function resolveReflectiveFactory(provider){var factoryFn;var resolvedDeps;if(provider.useClass){var useClass=resolveForwardRef(provider.useClass);factoryFn=reflector.factory(useClass);resolvedDeps=_dependenciesFor(useClass);}else if(provider.useExisting){factoryFn=function factoryFn(aliasInstance){return aliasInstance...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n }", "function resolveReflectiveProvider(provider){return new ResolvedReflectiveProvider_(ReflectiveKey.get(pro...
[ "0.6399551", "0.62974715", "0.6161233", "0.6161233", "0.6161233", "0.6161233", "0.6161233", "0.6161233", "0.6161233", "0.6161233", "0.6161233", "0.6161233", "0.61507875", "0.61293703", "0.605685", "0.60162646", "0.59961504", "0.5920786", "0.5918238", "0.575645", "0.57207185",...
0.54089206
37
Converts the `Provider` into `ResolvedProvider`. `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider syntax.
function resolveReflectiveProvider(provider){return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide),[resolveReflectiveFactory(provider)],provider.multi||false);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n }", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey....
[ "0.73905593", "0.71897537", "0.71897537", "0.71897537", "0.71897537", "0.71897537", "0.71897537", "0.71897537", "0.71897537", "0.71897537", "0.71897537", "0.71841556", "0.6439354", "0.640443", "0.6294317", "0.6281105", "0.6204747", "0.61921436", "0.61660206", "0.6163713", "0....
0.70801866
12
Resolve a list of Providers.
function resolveReflectiveProviders(providers){var normalized=_normalizeProviders(providers,[]);var resolved=normalized.map(resolveReflectiveProvider);var resolvedProviderMap=mergeResolvedReflectiveProviders(resolved,new Map());return Array.from(resolvedProviderMap.values());}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n var resolved = normalized.map(resolveProvider);\n return collection_1.MapWrapper.values(mergeResolvedProviders(resolved, new Map()));\n}", "findProviders(using, provider, exactMatch) {\n // TODO(juliem...
[ "0.705974", "0.6869712", "0.6869712", "0.6869712", "0.6869712", "0.6869712", "0.6869712", "0.67564523", "0.66221553", "0.6610255", "0.656353", "0.6540267", "0.65152085", "0.65152085", "0.65152085", "0.65152085", "0.65152085", "0.65152085", "0.65152085", "0.65152085", "0.65152...
0.68829495
1
Merges a list of ResolvedProviders into a list where each key is contained exactly once and multi providers have been merged.
function mergeResolvedReflectiveProviders(providers,normalizedProvidersMap){for(var i=0;i<providers.length;i++){var provider=providers[i];var existing=normalizedProvidersMap.get(provider.key.id);if(existing){if(provider.multiProvider!==existing.multiProvider){throw mixingMultiProvidersWithRegularProvidersError(existing...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeResolvedProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (lang_1.isPresent(existing)) {\n if (provider.multiProvider !== ex...
[ "0.7158285", "0.67578614", "0.6662975", "0.6609911", "0.64130205", "0.63986236", "0.63986236", "0.63986236", "0.63986236", "0.638434", "0.63528484", "0.63528484", "0.63528484", "0.63528484", "0.63528484", "0.63528484", "0.63180345", "0.55839604", "0.5430521", "0.5351575", "0....
0.6256451
17
Determine if the argument is an Observable
function isObservable(obj){// TODO: use isObservable once we update pass rxjs 6.1 // https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#610-2018-05-03 return!!obj&&typeof obj.subscribe==='function';}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObservable(obj) {\n\t return !!obj && (obj instanceof Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));\n\t}", "function isObservable(obj) {\n return !!obj && (obj instanceof Observable/* Observable */.y || (typeof obj.lift === 'function' && typeof obj.subsc...
[ "0.751229", "0.745194", "0.7387419", "0.7351151", "0.71971625", "0.70355874", "0.69410545", "0.69410545", "0.69410545", "0.69410545", "0.69410545", "0.69410545", "0.69410545", "0.6940868", "0.6940868", "0.6940868", "0.6707264", "0.6672077", "0.66311044", "0.65245867", "0.6517...
0.71598566
5
Creates a platform. Platforms have to be eagerly created via this function.
function createPlatform(injector){if(_platform&&!_platform.destroyed&&!_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS,false)){throw new Error('There can be only one platform. Destroy the previous one to create a new one.');}_platform=injector.get(PlatformRef);var inits=injector.get(PLATFORM_INITIALIZER,null);if(inits)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_platform(x, y) {\n platform = new sprite(texture_cache['platform.png']);\n platform.name = 'platform';\n platform.position.set(x, y);\n platform.worldy = y - cam_y;\n platform.worldx = x - cam_x;\n environment.addChild(platform);\n platforms.push(pla...
[ "0.7524722", "0.7009235", "0.69556266", "0.6940566", "0.6857968", "0.6845005", "0.6845005", "0.6845005", "0.6845005", "0.68174964", "0.68174964", "0.68174964", "0.68174964", "0.68174964", "0.68038726", "0.6680785", "0.652279", "0.6471343", "0.62857175", "0.6228981", "0.620901...
0.7010018
1
Creates a factory for a platform
function createPlatformFactory(parentPlatformFactory,name,providers){if(providers===void 0){providers=[];}var desc="Platform: "+name;var marker=new InjectionToken(desc);return function(extraProviders){if(extraProviders===void 0){extraProviders=[];}var platform=getPlatform();if(!platform||platform.injector.get(ALLOW_MUL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPlatform(injector){if(_platform&&!_platform.destroyed&&!_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS,false)){throw new Error('There can be only one platform. Destroy the previous one to create a new one.');}_platform=injector.get(PlatformRef);var inits=injector.get(PLATFORM_INITIALIZER,null);if(i...
[ "0.73687166", "0.7326028", "0.728343", "0.7025169", "0.7025169", "0.7025169", "0.7025169", "0.7011126", "0.70107806", "0.69912165", "0.69912165", "0.69912165", "0.69912165", "0.69912165", "0.69912165", "0.69715285", "0.6931349", "0.6931349", "0.6931349", "0.6931349", "0.69313...
0.7466288
0
Checks that there currently is a platform which contains the given token as a provider.
function assertPlatform(requiredToken){var platform=getPlatform();if(!platform){throw new Error('No platform exists!');}if(!platform.injector.get(requiredToken,null)){throw new Error('A platform with a different configuration has been created. Please destroy it first.');}return platform;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertPlatform(requiredToken) {\n var platform = getPlatform();\n if (lang_1.isBlank(platform)) {\n throw new exceptions_1.BaseException('Not platform exists!');\n }\n if (lang_1.isPresent(platform) && lang_1.isBlank(platform.injector.get(requiredToken, null))) {\n throw new exce...
[ "0.7050297", "0.69440156", "0.6936168", "0.6936168", "0.6936168", "0.6936168", "0.6936168", "0.69177586", "0.6911317", "0.6911317", "0.6911317", "0.6911317", "0.6911317", "0.6837384", "0.68311656", "0.59620935", "0.58987933", "0.5872922", "0.58686435", "0.58077127", "0.575270...
0.70320404
1
Destroy the existing platform.
function destroyPlatform(){if(_platform&&!_platform.destroyed){_platform.destroy();}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n }", "function destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}", "function destroyPlatform() {\n if (_platform && !_platform.destr...
[ "0.8485649", "0.8351763", "0.83358216", "0.83358216", "0.83358216", "0.83358216", "0.83358216", "0.83358216", "0.83358216", "0.83358216", "0.83358216", "0.83358216", "0.83358216", "0.7892039", "0.7892039", "0.7892039", "0.7892039", "0.7892039", "0.73468226", "0.6658576", "0.6...
0.82062775
13
Returns the current platform.
function getPlatform(){return _platform&&!_platform.destroyed?_platform:null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function platform() {\r\n return os.platform();\r\n}", "function getPlatform() {\n return lang_1.isPresent(_platform) && !_platform.disposed ? _platform : null;\n}", "get platform() {\n return this.getStringAttribute('platform');\n }", "static get platform() {\n if (!HostPlatform.platf...
[ "0.8425077", "0.8014393", "0.79789823", "0.7974635", "0.78733444", "0.7741412", "0.76731783", "0.76425385", "0.76388735", "0.7614275", "0.7614275", "0.7614275", "0.7614275", "0.7614275", "0.7614275", "0.7614275", "0.7614275", "0.7614275", "0.7614275", "0.7614275", "0.75254846...
0.7305213
22
Inject ApplicationRef to make it eager...
function ApplicationModule(appRef){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(appRef) { }", "constructor(appRef) { }", "constructor(appRef) { }", "constructor(appRef) { }", "constructor(appRef) { }", "constructor(appRef) { }", "function ApplicationModule(appRef) {\n }", "function ApplicationModule(appRef) {\n }", "function ApplicationModule(appRef) {\n }...
[ "0.664862", "0.664862", "0.664862", "0.664862", "0.664862", "0.664862", "0.6447674", "0.6447674", "0.6447674", "0.6447674", "0.6447674", "0.6447674", "0.6447674", "0.6447674", "0.6447674", "0.53735095", "0.5352725", "0.52820146", "0.52737254", "0.526597", "0.5261244", "0.52...
0.6726909
0
the given init index.
function shouldCallLifecycleInitHook(view,initState,index){if((view.state&1792/* InitState_Mask */)===initState&&view.initIndex<=index){view.initIndex=index+1;return true;}return false;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gotStartIndex(err, index){\n var count = opts.count;\n var multi = c.multi();\n if(count > 0){\n for(var i = 0; i < count - 1 || i < 0; i++){\n indexes.push(+ index + i);\n multi.hgetall('c:r:' + room.id + ':m:' + (+index + i));\n...
[ "0.61370397", "0.60548866", "0.60100573", "0.58894175", "0.5876644", "0.5801283", "0.57668483", "0.5750413", "0.5749867", "0.5742932", "0.5652528", "0.56258464", "0.5618867", "0.5608234", "0.5601953", "0.5596224", "0.55916923", "0.55770135", "0.55660325", "0.5563099", "0.5548...
0.5336279
52
Accessor for view.nodes, enforcing that every usage site stays monomorphic.
function asTextData(view,index){return view.nodes[index];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNodes() {\n return this.nodes;\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n ...
[ "0.6780295", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6554378", "0.63385445", "0.6270806", "0.62060523", "0.6147122", "0.60325724", "0.60239846", "0.5993022", "0.5986965", "0.5981136", "0.59221745", "0.5896933", "0.57495445", "0.5643390...
0.0
-1
Accessor for view.nodes, enforcing that every usage site stays monomorphic.
function asElementData(view,index){return view.nodes[index];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNodes() {\n return this.nodes;\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n ...
[ "0.6780295", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6554378", "0.63385445", "0.6270806", "0.62060523", "0.6147122", "0.60325724", "0.60239846", "0.5993022", "0.5986965", "0.5981136", "0.59221745", "0.5896933", "0.57495445", "0.5643390...
0.0
-1
Accessor for view.nodes, enforcing that every usage site stays monomorphic.
function asProviderData(view,index){return view.nodes[index];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNodes() {\n return this.nodes;\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n ...
[ "0.67797655", "0.6736749", "0.6736749", "0.6736749", "0.6736749", "0.6736749", "0.6736749", "0.6554727", "0.6338266", "0.6271329", "0.62066376", "0.6147728", "0.6032697", "0.6023367", "0.59916914", "0.5985413", "0.5980452", "0.592303", "0.5896754", "0.575076", "0.5643284", ...
0.0
-1
Accessor for view.nodes, enforcing that every usage site stays monomorphic.
function asPureExpressionData(view,index){return view.nodes[index];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNodes() {\n return this.nodes;\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n ...
[ "0.67803806", "0.6737178", "0.6737178", "0.6737178", "0.6737178", "0.6737178", "0.6737178", "0.6554823", "0.63388336", "0.6272535", "0.6206628", "0.6148735", "0.60327977", "0.6024413", "0.599307", "0.59872216", "0.5981008", "0.592417", "0.5896835", "0.57507956", "0.56441724",...
0.5111813
64
Accessor for view.nodes, enforcing that every usage site stays monomorphic.
function asQueryList(view,index){return view.nodes[index];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNodes() {\n return this.nodes;\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n }", "get nodes() {\n const lView = this._raw_lView;\n const tNode = lView[TVIEW].firstChild;\n ...
[ "0.6780295", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6736528", "0.6554378", "0.63385445", "0.6270806", "0.62060523", "0.6147122", "0.60325724", "0.60239846", "0.5993022", "0.5986965", "0.5981136", "0.59221745", "0.5896933", "0.57495445", "0.5643390...
0.0
-1
Attention: this function is called as top level function. Putting any logic in here will destroy closure tree shaking!
function createRendererType2(values){return{id:UNDEFINED_RENDERER_TYPE_ID,styles:values.styles,encapsulation:values.encapsulation,data:values.data};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Closure() {\r\n}", "cleanUpDeadCreeps () {\n }", "function StupidBug() {}", "function g(){return function(){}}", "hacky(){\n return\n }", "function foo(){\n foo();\n}", "internalCleanup() {\n\n }", "function foo (){\n foo()\n}", "addClosureInformation (f) {\n f.hasLivelyClosur...
[ "0.6189564", "0.61802006", "0.5763304", "0.5729751", "0.5728672", "0.55918896", "0.5576427", "0.5506978", "0.5492881", "0.5485871", "0.54690593", "0.54642665", "0.54623985", "0.54395103", "0.5434761", "0.54254806", "0.5422401", "0.5410556", "0.5407028", "0.5403418", "0.538811...
0.0
-1
for component views, this is the host element. for embedded views, this is the index of the parent node that contains the view container.
function viewParentEl(view){var parentView=view.parent;if(parentView){return view.parentNodeDef.parent;}else{return null;}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getContainerNode() {\n return this._appContainerNode || this._viewContainerNode;\n }", "function viewParentEl(view) {\n var parentView = view.parent;\n\n if (parentView) {\n return view.parentNodeDef.parent;\n } else {\n return null;\n }\n }", "getParentEl...
[ "0.6842954", "0.67773485", "0.66639173", "0.661259", "0.661259", "0.661259", "0.661259", "0.6611863", "0.6611863", "0.6611863", "0.6611863", "0.6611863", "0.65912884", "0.6465535", "0.624691", "0.6191231", "0.61536473", "0.6121604", "0.6083449", "0.6083449", "0.60696113", "...
0.68366814
1
Attention: this function is called as top level function. Putting any logic in here will destroy closure tree shaking!
function createComponentFactory(selector,componentType,viewDefFactory,inputs,outputs,ngContentSelectors){return new ComponentFactory_(selector,componentType,viewDefFactory,inputs,outputs,ngContentSelectors);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Closure() {\r\n}", "cleanUpDeadCreeps () {\n }", "function StupidBug() {}", "hacky(){\n return\n }", "function g(){return function(){}}", "function foo(){\n foo();\n}", "internalCleanup() {\n\n }", "function foo (){\n foo()\n}", "addClosureInformation (f) {\n f.hasLivelyClosur...
[ "0.6188319", "0.61818874", "0.57641906", "0.57298315", "0.57288736", "0.5592014", "0.5577328", "0.5507052", "0.5491516", "0.54888475", "0.5468111", "0.5464349", "0.54610467", "0.5437761", "0.54347", "0.5425158", "0.542134", "0.5412074", "0.5407586", "0.5405249", "0.53882384",...
0.0
-1
ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are called during a preorder traversal of the view tree (that is calling the parent hooks before the child hooks) these events are sent in using a postorder traversal of th...
function callLifecycleHooksChildrenFirst(view,lifecycles){if(!(view.def.nodeFlags&lifecycles)){return;}var nodes=view.def.nodes;var initIndex=0;for(var i=0;i<nodes.length;i++){var nodeDef=nodes[i];var parent_1=nodeDef.parent;if(!parent_1&&nodeDef.flags&lifecycles){// matching root node (e.g. a pipe) callProviderLifecyc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode && assertNotEqual(initPhase, 3\n /* InitPhaseCompleted */\n , 'Init pre-order hooks should not be called more than once');\n\n if ((lView[FLAGS] & 3\n /* InitPhaseStateMask */\n ) === initPhase) {\n callHooks(lView, hooks,...
[ "0.6047118", "0.6034731", "0.60301197", "0.60301197", "0.60301197", "0.60301197", "0.60301197", "0.60301197", "0.58929145", "0.58527225", "0.58527225", "0.58527225", "0.58527225", "0.58527225", "0.58527225", "0.58527225", "0.58527225", "0.58527225", "0.57850313", "0.57509035", ...
0.5321298
23
1) Locate the providers of an element and check if one of them was overwritten 2) Change the providers of that element We only create new datastructures if we need to, to keep perf impact reasonable.
function applyProviderOverridesToView(def){if(providerOverrides.size===0){return def;}var elementIndicesWithOverwrittenProviders=findElementIndicesWithOverwrittenProviders(def);if(elementIndicesWithOverwrittenProviders.length===0){return def;}// clone the whole view definition, // as it maintains references between the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "processProvider(provider, ngModuleType, providers) {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && ...
[ "0.5436355", "0.5436355", "0.5436355", "0.5436355", "0.5436355", "0.5436355", "0.541271", "0.5389575", "0.53686595", "0.53686595", "0.53686595", "0.53686595", "0.53686595", "0.5362688", "0.5326884", "0.53062767", "0.53062767", "0.53062767", "0.52804065", "0.52171606", "0.5186...
0.5125048
23
We only create new datastructures if we need to, to keep perf impact reasonable.
function applyProviderOverridesToNgModule(def){var _a=calcHasOverrides(def),hasOverrides=_a.hasOverrides,hasDeprecatedOverrides=_a.hasDeprecatedOverrides;if(!hasOverrides){return def;}// clone the whole view definition, // as it maintains references between the nodes that are hard to update. def=def.factory(function(){...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createStructure() {\n\tlet map = [];\n\tfor (let collection in schema) {\n\t\tmap.push(collection, mori.hashMap());\n\t}\n\tmap.push('_syncQueue', mori.vector());\n\treturn mori.hashMap(...map);\n}", "function createDataCollections() {\n _dataCreator.initialize();\n\n _peopleSourceData = ...
[ "0.6093335", "0.5796243", "0.5592174", "0.5504415", "0.5328623", "0.5271759", "0.5270164", "0.525621", "0.5246549", "0.52319705", "0.5225388", "0.5215476", "0.52118313", "0.51850694", "0.5162572", "0.515884", "0.5121505", "0.5115973", "0.5090752", "0.50650156", "0.5044701", ...
0.0
-1
Putting any logic in here will destroy closure tree shaking!
function createNgModuleFactory(ngModuleType,bootstrapComponents,defFactory){return new NgModuleFactory_(ngModuleType,bootstrapComponents,defFactory);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cleanUpDeadCreeps () {\n }", "function willCleanupTree(env, morph, destroySelf) {}", "function didCleanupTree(env, morph, destroySelf) {}", "cleanup() {\n\n\t}", "internalCleanup() {\n\n }", "cleanup() {}", "cleanup() {}", "_destroy() {}", "static cleanup() {\n Utils.clearSomeControlValueC...
[ "0.6954027", "0.64525825", "0.6283895", "0.6283158", "0.6277119", "0.6045005", "0.6045005", "0.5975431", "0.5828608", "0.5825775", "0.57927763", "0.5755664", "0.5755664", "0.5755664", "0.5755664", "0.57457316", "0.5722779", "0.571166", "0.56970936", "0.56940484", "0.5692925",...
0.0
-1
Initializes an instance of the eventmanager service.
function EventManager(plugins,_zone){var _this=this;this._zone=_zone;this._eventNameToPlugin=new Map();plugins.forEach(function(p){return p.manager=_this;});this._plugins=plugins.slice().reverse();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventManager() {\n}", "function init () {\n\t\t//Get the unique [charity] userId so we know \n\t\t//which url to used for the server-side API\n\t\tvar userId = $('[data-event-config=\"userId\"]').val();\n\t\t\n\t\t//Initialise events collection\n\t\tfunction initCollection () {\n\t\t\tvar evts = new Evt...
[ "0.70541984", "0.6591364", "0.65209", "0.648583", "0.63880414", "0.63327664", "0.6194365", "0.6191064", "0.611336", "0.6076842", "0.60354036", "0.60332805", "0.60072875", "0.5998057", "0.59633034", "0.5886834", "0.5886295", "0.5878215", "0.58427685", "0.5826305", "0.5824904",...
0.54238117
59
Initializes an instance of the browser plugin.
function KeyEventsPlugin(doc){return _super.call(this,doc)||this;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initialize() {\n this.settings = {};\n this.scripts = [];\n }", "init () {\n }", "async init(){\r\n try{\r\n this.browser = await pptrFirefox.launch();\r\n this.page = await this.browser.newPage();\r\n await this.setName(this.page);\r\n awa...
[ "0.64737964", "0.64410406", "0.6425322", "0.6379656", "0.637845", "0.637845", "0.637845", "0.637845", "0.637845", "0.6370997", "0.6342431", "0.6335496", "0.6321558", "0.6321512", "0.6319105", "0.6319105", "0.6319105", "0.63128936", "0.63128936", "0.63128936", "0.63128936", ...
0.0
-1
Factory to create Meta service.
function createMeta(){return new Meta(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["inject"])(DOCUMENT$1));}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMeta() {\n return new Meta(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__[\"ɵɵinject\"])(_angular_common__WEBPACK_IMPORTED_MODULE_1__[\"DOCUMENT\"]));\n}", "function createMeta() {\n return new Meta(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__[\"inject\"])(DOCUMENT$1));\n}", "funct...
[ "0.72353613", "0.70924675", "0.70924675", "0.70924675", "0.62759614", "0.62759614", "0.62759614", "0.62759614", "0.6225078", "0.62026745", "0.618008", "0.6075828", "0.6058649", "0.60567224", "0.5952179", "0.5907204", "0.57916427", "0.57708013", "0.57708013", "0.5764161", "0.5...
0.6351227
4
Factory to create Title service.
function createTitle(){return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["inject"])(DOCUMENT$1));}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTitle() {\n return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__[\"inject\"])(DOCUMENT$1));\n}", "function createTitle() {\n return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__[\"inject\"])(DOCUMENT$1));\n}", "function createTitle() {\n return new Title(Obje...
[ "0.81745565", "0.81745565", "0.81745565", "0.816023", "0.6613757", "0.64764446", "0.6411467", "0.6367662", "0.6217106", "0.6154221", "0.6107594", "0.6077435", "0.6050107", "0.6041712", "0.5991935", "0.5972088", "0.58805835", "0.58747864", "0.5851707", "0.5844486", "0.58107567...
0.7959069
4
Enabled Angular debug tools that are accessible via your browser's developer console. Usage: 1. Open developer console (e.g. in Chrome Ctrl + Shift + j) 1. Type `ng.` (usually the console will show autocomplete suggestion) 1. Try the change detection profiler `ng.profiler.timeChangeDetection()` then hit Enter.
function enableDebugTools(ref){exportNgVar(PROFILER_GLOBAL_NAME,new AngularProfiler(ref));return ref;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enableDebugTools(ref) {\n exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n return ref;\n}", "function enableDebugTools(ref) {\n exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n return ref;\n}", "function enableDebugTools(ref) {\n exportNgVar(PROFILER_GLOBAL_N...
[ "0.67449236", "0.67449236", "0.67449236", "0.67449236", "0.67449236", "0.67449236", "0.67449236", "0.67449236", "0.67449236", "0.66968876", "0.668831", "0.668831", "0.6303814", "0.6253611", "0.60803026", "0.6046581", "0.5914195", "0.586731", "0.56374854", "0.5476895", "0.5476...
0.7173427
0
Create a `StateKey` that can be used to store value of type T with `TransferState`. Example: ``` const COUNTER_KEY = makeStateKey('counter'); let value = 10; transferState.set(COUNTER_KEY, value); ```
function makeStateKey(key){return key;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeStateKey(key) {\n return key;\n }", "function makeStateKey(key) {\n return key;\n}", "function makeStateKey(key) {\n return key;\n}", "function makeStateKey(key) {\n return key;\n}", "function makeStateKey(key) {\n return key;\n}", "function makeStateKey(key) {\n retur...
[ "0.6945237", "0.6910161", "0.6910161", "0.6870353", "0.6870353", "0.6870353", "0.6870353", "0.6870353", "0.6870353", "0.6870353", "0.6870353", "0.6870353", "0.5788753", "0.5552273", "0.5475032", "0.53701085", "0.53701085", "0.53701085", "0.53701085", "0.53701085", "0.53701085...
0.67895895
12
Convert a `Params` instance to a `ParamMap`.
function convertToParamMap(params){return new ParamsAsMap(params);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertToParamMap(params) {\n return new ParamsAsMap(params);\n }", "function convertToParamMap(params) {\n return new ParamsAsMap(params);\n}", "function convertToParamMap(params) {\n return new ParamsAsMap(params);\n}", "function convertToParamMap(params) {\n return new ParamsAsMa...
[ "0.8767768", "0.8692703", "0.8692703", "0.8690492", "0.8690492", "0.8690492", "0.8690492", "0.8690492", "0.8690492", "0.8690492", "0.8690492", "0.8690492", "0.66753244", "0.66753244", "0.66753244", "0.66753244", "0.66753244", "0.66135585", "0.65928024", "0.65494484", "0.65494...
0.86888677
12
Makes a copy of the config and adds any default required properties.
function standardizeConfig(r){var children=r.children&&r.children.map(standardizeConfig);var c=children?Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({},r,{children:children}):Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({},r);if(!c.component&&(children||c.loadChildren)&&c.outlet&&c.outlet!==PRIMARY_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shallowCopy$() {\n const ret = super.shallowCopy$();\n return new ExtConfig(ret);\n }", "defaultConfig(config) {\n // If it's not an object, we discard the information\n if (!(config instanceof Object)) {\n return;\n }\n\n // We use lodash to perform a deep...
[ "0.65086746", "0.6489934", "0.6486341", "0.6308881", "0.6300526", "0.6262916", "0.623834", "0.6195864", "0.611964", "0.61075246", "0.6083836", "0.6083836", "0.6082634", "0.6080428", "0.60530394", "0.5980271", "0.592991", "0.5915081", "0.5889631", "0.5858241", "0.5852204", "...
0.0
-1
Flattens singlelevel nested arrays.
function flatten(arr){return Array.prototype.concat.apply([],arr);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flat(array) {\n array.forEach((element) => {\n if (!Array.isArray(element)) {\n newArr.push(element);\n } else {\n flat(element);\n }\n });\n }", "function flatten(array) {\n var finalArray = [];\n for (var i = 0; i < array.length; i++) {\n if (typeof array[i] ==...
[ "0.78636956", "0.76872367", "0.7683974", "0.76136535", "0.7606954", "0.7572093", "0.7572093", "0.7572093", "0.7572093", "0.7572093", "0.7572093", "0.7572093", "0.7572093", "0.7572093", "0.75421673", "0.75397164", "0.7515587", "0.7494667", "0.7490955", "0.7467597", "0.74655837...
0.7238769
50
Return the last element of an array.
function last$1(a){return a.length>0?a[a.length-1]:null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function last(array) {\n return (array[array.length -1]);\n }", "function last(array) {\n return array[array.length - 1];\n}", "function last(array) {\n var length = array.length;\n return length ? array[length - 1] : undefined;\n}", "function lastOfArray(array){\n return array[array.length-1];...
[ "0.8989696", "0.89055586", "0.88916445", "0.8870187", "0.88322973", "0.88322973", "0.88224953", "0.88160795", "0.8722929", "0.869856", "0.8683251", "0.8674373", "0.8654382", "0.86504346", "0.8575264", "0.8569752", "0.8535378", "0.8525707", "0.8518361", "0.8518361", "0.8518361...
0.7897336
59
Encodes a URI string with the default encoding. This function will only ever be called from `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be encoded per
function encodeUriString(s){return encodeURIComponent(s).replace(/%40/g,'@').replace(/%3A/gi,':').replace(/%24/g,'$').replace(/%2C/gi,',');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uriEncodeString( text ){\n return encodeURIComponent(text).replace( /[\\!\\*\\'\\(\\)]/g, function( chr ){\n chr = chr.charCodeAt(0).toString(16);\n while( chr.length < 2 ){\n chr = '0'+hex;\n }\n return '%'+chr;\n } )\n}", "function encode(uri)\n{\nif (encod...
[ "0.71761155", "0.7115903", "0.70205104", "0.69156516", "0.69130987", "0.6860494", "0.6786916", "0.6777453", "0.6777453", "0.6777453", "0.6777453", "0.6764896", "0.6764896", "0.6764896", "0.6764896", "0.6764896", "0.6764896", "0.6764896", "0.6764896", "0.6764896", "0.67500067"...
0.69362104
3
This function should be used to encode both keys and values in a query string key/value. In the following URL, you need to call encodeUriQuery on "k" and "v":
function encodeUriQuery(s){return encodeUriString(s).replace(/%3B/gi,';');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toQueryString() {\n return this.inject([], function(results, pair) {\n var key = encodeURIComponent(pair.key), values = pair.value;\n \n if (values && typeof values == 'object') {\n if (Object.isArray(values))\n return results.concat(values.map(toQueryPair.curry(key)));\n...
[ "0.742166", "0.72701865", "0.7260132", "0.71999884", "0.71999884", "0.7185975", "0.7185975", "0.71727467", "0.71646947", "0.7097978", "0.7097978", "0.70645976", "0.7057926", "0.7042623", "0.7041758", "0.703124", "0.7019126", "0.69747275", "0.69119936", "0.68832564", "0.687987...
0.7224728
3
This function should be used to encode a URL fragment. In the following URL, you need to call encodeUriFragment on "f":
function encodeUriFragment(s){return encodeURI(s);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodeUriFragment(s) {\n return encodeURI(s);\n }", "function encodeUriFragment(s) {\n return encodeURI(s);\n}", "function encodeUriFragment(s) {\n return encodeURI(s);\n}", "function encodeUriFragment(s) {\n return encodeURI(s);\n}", "function encodeUriFragment(s) {\n return e...
[ "0.806989", "0.8044083", "0.8044083", "0.80368274", "0.80368274", "0.80368274", "0.80368274", "0.80368274", "0.80368274", "0.80368274", "0.80368274", "0.80368274", "0.7239324", "0.71271515", "0.7097472", "0.7097472", "0.70231974", "0.6958889", "0.6911075", "0.6911075", "0.691...
0.8335771
0
This function should be run on any URI segment as well as the key and value in a key/value pair for matrix params. In the following URL, you need to call encodeUriSegment on "html", "mk", and "mv":
function encodeUriSegment(s){return encodeUriString(s).replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/%26/gi,'&');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,'&').replace(/%3D/gi,'=').replace(/%2B/gi,'+');}", "function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,'&').replace(/%3D/gi,'=').replace(/%2B/gi,'+');}", "function encodeUriSegment(val) {\n\t retur...
[ "0.5996278", "0.5996278", "0.5818978", "0.57745993", "0.57512933", "0.56521755", "0.5574199", "0.5567552", "0.5567552", "0.5567552", "0.5567552", "0.5567552", "0.5567552", "0.5567552", "0.556179", "0.5545054", "0.5545054", "0.55261886", "0.54801977", "0.546624", "0.546624", ...
0.5554764
15
decodeURIComponent function will not decode "+" as a space.
function decodeQuery(s){return decode(s.replace(/\+/g,'%20'));}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decode(str) {\r\n return decodeURIComponent((str+'').replace(/\\+/g, '%20'));\r\n //return unescape(str.replace(/\\+/g, \" \"));\r\n}", "function urldecode(str) {\r\n\treturn decodeURIComponent((str + '').replace(/\\+/g, '%20'));\r\n}", "function uri_decodeThatWorks_(s) {\n return decodeURIComp...
[ "0.81148505", "0.79721224", "0.7825322", "0.78154624", "0.77875674", "0.7780827", "0.7379063", "0.7379063", "0.7379063", "0.7379063", "0.7379063", "0.7379063", "0.7379063", "0.7379063", "0.7379063", "0.73436266", "0.73436266", "0.7341079", "0.728387", "0.72807515", "0.7188688...
0.78128743
4
Return the name of the query param at the start of the string or an empty string
function matchQueryParams(str){var match=str.match(QUERY_PARAM_RE);return match?match[0]:'';}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchUrlQueryParamValue(str) {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}", "function matchUrlQueryParamValue(str) {\n var match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n }", "function matchUrlQueryParamValue(str)...
[ "0.73265016", "0.7325849", "0.7316063", "0.7316063", "0.7316063", "0.7316063", "0.7316063", "0.72860956", "0.7279859", "0.7279859", "0.7279859", "0.7279859", "0.71738005", "0.7100177", "0.7093434", "0.7093434", "0.7093434", "0.7093434", "0.7093434", "0.7075677", "0.70566845",...
0.69829446
25
Return the value of the query param at the start of the string or an empty string
function matchUrlQueryParamValue(str){var match=str.match(QUERY_PARAM_VALUE_RE);return match?match[0]:'';}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchUrlQueryParamValue(str) {\n var match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n }", "function matchUrlQueryParamValue(str) {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}", "function matchUrlQueryParamValue(str)...
[ "0.7831922", "0.780176", "0.7777546", "0.7774297", "0.7774297", "0.7774297", "0.7774297", "0.7774297", "0.77539885", "0.77539885", "0.77539885", "0.77539885", "0.72814465", "0.7242373", "0.7231848", "0.7231848", "0.7231848", "0.7231848", "0.7231848", "0.7222071", "0.7216476",...
0.7767624
8
DFS for the node matching the value
function findNode(value,node){var e_1,_a;if(value===node.value)return node;try{for(var _b=Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(node.children),_c=_b.next();!_c.done;_c=_b.next()){var child=_c.value;var node_1=findNode(value,child);if(node_1)return node_1;}}catch(e_1_1){e_1={error:e_1_1};}finally{try{if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dfs(node, searchVal) {}", "function depthFirst(node, visited = new Set()) {\n if (visited.has(node.val)) return; //base case\n visited.add(node.val);\n console.log(node.val);\n node.neighbors.forEach((neighbor) => depthFirst(neighbor, visted));\n}", "function findNode(value, node) {\n if (value =...
[ "0.79748", "0.7125143", "0.700725", "0.67971647", "0.6773086", "0.6729649", "0.67289937", "0.6673315", "0.6652792", "0.6598716", "0.65897053", "0.64888805", "0.64252377", "0.6423743", "0.64166176", "0.635354", "0.6343988", "0.632959", "0.6318171", "0.62965274", "0.62958145", ...
0.7277016
1
Return the list of T indexed by outlet name
function nodeChildrenAsMap(node){var map$$1={};if(node){node.children.forEach(function(child){return map$$1[child.value.outlet]=child;});}return map$$1;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAssociatedElements({ object, propertyName }) {\n const elements = [];\n for (let [binding, { target }] of Array.from(this.bindings)) {\n const propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source);\n if (propertyInfo && propertyInfo.object === object && pro...
[ "0.55013967", "0.53679895", "0.5195255", "0.5189665", "0.5090589", "0.5068238", "0.5047446", "0.5043258", "0.5041775", "0.5011409", "0.5009973", "0.4985902", "0.49768096", "0.4974486", "0.49693963", "0.49364334", "0.49321967", "0.49199846", "0.4918918", "0.49019858", "0.48992...
0.0
-1
Returns the inherited params, data, and resolve for a given route. By default, this only inherits values up to the nearest pathless or componentless route.
function inheritedParamsDataResolve(route,paramsInheritanceStrategy){if(paramsInheritanceStrategy===void 0){paramsInheritanceStrategy='emptyOnly';}var pathFromRoot=route.pathFromRoot;var inheritingStartingFrom=0;if(paramsInheritanceStrategy!=='always'){inheritingStartingFrom=pathFromRoot.length-1;while(inheritingStarti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inheritedParamsDataResolve(route) {\n var paramsInheritanceStrategy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'emptyOnly';\n var pathFromRoot = route.pathFromRoot;\n var inheritingStartingFrom = 0;\n\n if (paramsInheritanceStrategy !== 'always') {\n ...
[ "0.80669755", "0.80011845", "0.76745343", "0.76268655", "0.76268655", "0.76268655", "0.76268655", "0.76268655", "0.7587776", "0.7587776", "0.7587776", "0.75790673", "0.6015506", "0.5893183", "0.57392144", "0.5708138", "0.5627657", "0.5627657", "0.5627657", "0.56257415", "0.56...
0.78190595
2
The expectation is that the activate route is created with the right set of parameters. So we push new values into the observables only when they are not the initial values. And we detect that by checking if the snapshot field is set.
function advanceActivatedRoute(route){if(route.snapshot){var currentSnapshot=route.snapshot;var nextSnapshot=route._futureSnapshot;route.snapshot=nextSnapshot;if(!shallowEqual(currentSnapshot.queryParams,nextSnapshot.queryParams)){route.queryParams.next(nextSnapshot.queryParams);}if(currentSnapshot.fragment!==nextSnaps...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function advanceActivatedRoute(route) {\n if (route.snapshot) {\n var currentSnapshot = route.snapshot;\n var nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n ...
[ "0.5772768", "0.57660425", "0.5619549", "0.55737764", "0.5494506", "0.5494506", "0.5494506", "0.5494506", "0.5464296", "0.5464296", "0.5464296", "0.5464296", "0.5464296", "0.5445762", "0.5431237", "0.53048164", "0.5160776", "0.5096296", "0.5084753", "0.50268954", "0.50255597"...
0.54516315
13
Transforms commands to a normalized `Navigation`
function computeNavigation(commands){if(typeof commands[0]==='string'&&commands.length===1&&commands[0]==='/'){return new Navigation(true,0,commands);}var numberOfDoubleDots=0;var isAbsolute=false;var res=commands.reduce(function(res,cmd,cmdIdx){if(_typeof(cmd)==='object'&&cmd!=null){if(cmd.outlets){var outlets_1={};fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeNavigation(commands) {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n var numberOfDoubleDots = 0;\n var isAbsolute = false;\n var res = commands.reduce(function (res, cmd, cmdIdx) {\n...
[ "0.73979723", "0.73979723", "0.73979723", "0.7390436", "0.7339299", "0.7339299", "0.7339299", "0.7339299", "0.7339299", "0.73301554", "0.73278576", "0.718332", "0.5528664", "0.54823786", "0.5441873", "0.5306118", "0.5292404", "0.51031685", "0.5034254", "0.49537832", "0.490494...
0.7666475
0
Returns the `UrlTree` with the redirection applied. Lazy modules are loaded along the way.
function applyRedirects(moduleInjector,configLoader,urlSerializer,urlTree,config){return new ApplyRedirects(moduleInjector,configLoader,urlSerializer,urlTree,config).apply();}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n }", "function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n return new App...
[ "0.6612284", "0.65012705", "0.65012705", "0.65012705", "0.65012705", "0.65012705", "0.65012705", "0.65012705", "0.65012705", "0.65012705", "0.6486197", "0.64067876", "0.51661915", "0.51318175", "0.50947934", "0.5043386", "0.50098485", "0.4975964", "0.49438936", "0.49438936", ...
0.698927
0
This should fire off `ActivationStart` events for each route being activated at this level. In other words, if you're activating `a` and `b` below, `path` will contain the `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always return `true` so checks continue to run.
function fireActivationStart(snapshot,forwardEvent){if(snapshot!==null&&forwardEvent){forwardEvent(new ActivationStart(snapshot));}return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["of"])(true);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function routeIsActive(pathname,routes,params){var remainingPathname=pathname,paramNames=[],paramValues=[]; // for...of would work here but it's probably slower post-transpilation.\nfor(var i=0,len=routes.length;i<len;++i){var route=routes[i];var pattern=route.path||'';if(pattern.charAt(0)==='/'){remainingPathname...
[ "0.5608406", "0.5586934", "0.5586934", "0.55545485", "0.5531058", "0.5523751", "0.55186117", "0.55186117", "0.55186117", "0.551568", "0.551568", "0.551568", "0.551568", "0.551568", "0.5513266", "0.5513266", "0.5513266", "0.55110955", "0.55110955", "0.55110955", "0.55110955", ...
0.5211138
65
This should fire off `ChildActivationStart` events for each route being activated at this level. In other words, if you're activating `a` and `b` below, `path` will contain the `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always return `true` so checks continue to run.
function fireChildActivationStart(snapshot,forwardEvent){if(snapshot!==null&&forwardEvent){forwardEvent(new ChildActivationStart(snapshot));}return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["of"])(true);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fireChildActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n\n return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__[\"of\"])(true);\n }", "function fireChildActivationStart(snapshot, ...
[ "0.5955108", "0.57144964", "0.5570744", "0.5544119", "0.5544119", "0.5544119", "0.5544119", "0.5544119", "0.5544119", "0.5541296", "0.5541296", "0.5541296", "0.54824555", "0.5319245", "0.5297613", "0.5297613", "0.5295707", "0.5204651", "0.5204651", "0.5204651", "0.5204651", ...
0.58323866
1
Creates the router service. TODO: vsavkin make internal after the final is out.
function Router(rootComponentType,urlSerializer,rootContexts,location,injector,loader,compiler,config){var _this=this;this.rootComponentType=rootComponentType;this.urlSerializer=urlSerializer;this.rootContexts=rootContexts;this.location=location;this.config=config;this.lastSuccessfulNavigation=null;this.currentNavigati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createServiceRouter() {\n const router = express.Router();\n router.post('/service', this._onBrokerRequest.bind(this));\n return router;\n }", "createRouter() {\n const router = express.Router();\n // API calls for users to manage streamers\n router.post('/shutdown', ...
[ "0.71652865", "0.685452", "0.6404946", "0.637409", "0.62583286", "0.6177529", "0.6017944", "0.5954687", "0.59528667", "0.59519035", "0.5939149", "0.5902895", "0.5827756", "0.582296", "0.582296", "0.582296", "0.582296", "0.582296", "0.5780483", "0.5780483", "0.5780483", "0.5...
0.0
-1
Note: We are injecting the Router so it gets created eagerly...
function RouterModule(guard,router){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n this.router.get(this.path, this.process);\n }", "registerRouter() {\n this.application.container.singleton('Adonis/Core/Route', () => {\n return this.application.container.resolveBinding('Adonis/Core/Server').router;\n });\n }", "constructor(router) {\n t...
[ "0.7372703", "0.73116446", "0.7301056", "0.7242748", "0.7230012", "0.711507", "0.7092562", "0.7043444", "0.70245796", "0.70225054", "0.6994472", "0.6994472", "0.6994472", "0.6994472", "0.6994472", "0.69914836", "0.69767743", "0.6957357", "0.69377136", "0.6923254", "0.6912978"...
0.73287654
1
! 2. constructor function (AVOID)
function Person(id, name){ this.id = id; this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "constructor (){}", "constructor( ) {}", "function _construct()\n\t\t{;\n\t\t}", "function _ctor() {\n\t}", "function construct() { }", "constructor(){}", "constructor(){}", "constructor(...
[ "0.82514334", "0.8101558", "0.8101558", "0.8101558", "0.7985773", "0.79507095", "0.79365385", "0.78503054", "0.7822749", "0.7765839", "0.7765839", "0.7765839", "0.7765839", "0.7765839", "0.7765839", "0.7765839", "0.7636964", "0.7559549", "0.7559549", "0.7559549", "0.7559549",...
0.0
-1
reset all conditions except keyword
function resetAllExceptKeywordRequest() { $('#catId').val(0); $('#order').val(4); $('#brands').val(''); $('#pageIndex').val(1); $('#keyWord').blur(); hideBrandsBox(); appui.showHUD('正在加载'); requestGoodList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n if (this._queryStartKey) {\n this._queryStartKey = undefined;\n }\n if (this._querySkip) {\n this._querySkip = undefined;\n }\n if (this.isSearch) {\n this.isSearch = false;\n }\n if (this.querying) {\n this._querying = false;\n }\n if (this.requests) {\n ...
[ "0.64933926", "0.63287", "0.6318971", "0.6145491", "0.5969533", "0.59613585", "0.57795817", "0.57795817", "0.55870765", "0.5563179", "0.5543389", "0.5534006", "0.5519431", "0.5505052", "0.5504688", "0.55020046", "0.54689354", "0.54686165", "0.545133", "0.5451226", "0.5442642"...
0.6338125
1
Shows/hides the "more options" part of the UI.
function toggleOptions(){ var icon = $('toggleIcon'); var link = $('toggleLink'); var imageOptions = $('tr_imageoptions'); if (icon && link) { showOptions = Element.visible(imageOptions); if (!showOptions) { icon.src = '../images/collapse.gif'; icon.alt = link.innerHTML = '隐藏图片选项'; Element.show(imageOp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showMoreHighScores() {\n\n // Remove the See More Option\n UI.displaySeeMore(false);\n\n // Show all the high scores \n UI.displayHighScores(highScoreConfig.total);\n\n // Add the See Less Option\n UI.displaySeeLess(true);\n}", "function viewMoreFalcon() {\n var moreInfo = docum...
[ "0.7057219", "0.68762267", "0.68488795", "0.67720073", "0.6764929", "0.6762994", "0.6667525", "0.6649415", "0.6641328", "0.65919656", "0.65881103", "0.65851766", "0.65738875", "0.6499744", "0.6402188", "0.6382221", "0.63300705", "0.6303802", "0.62742716", "0.62656724", "0.625...
0.0
-1
private variables private functions
function isString(obj) { return ( typeof obj == "string" || obj instanceof String); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "private internal function m248() {}", "transient private internal function m185() {}", "protected internal function m252() {}", "transient final protected i...
[ "0.73019516", "0.73018384", "0.729594", "0.7179002", "0.6990413", "0.6912844", "0.68071103", "0.67877597", "0.6634323", "0.66205895", "0.66195583", "0.65434927", "0.65125936", "0.649179", "0.6410612", "0.63922703", "0.6388312", "0.6362155", "0.6345923", "0.63416374", "0.62911...
0.0
-1
vuex v3.1.1 (c) 2019 Evan You
function i(t){function e(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{var i=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFieldVuex() {\n return store.getters.dataField;\n }", "function vuexInit(){var options=this.$options;// store injection\n\tif(options.store){this.$store=options.store;}else if(options.parent&&options.parent.$store){this.$store=options.parent.$store;}}", "function U(He){Le&&(He._devtoolHook=Le,Le.emit('v...
[ "0.7111765", "0.70074075", "0.67470235", "0.6745943", "0.6623475", "0.6623475", "0.6623475", "0.6619513", "0.6594352", "0.6488856", "0.6359365", "0.6353934", "0.6352718", "0.6352718", "0.6352718", "0.6352718", "0.6352718", "0.63413787", "0.63218755", "0.62849313", "0.62817574...
0.0
-1
of consecutive integer values (a subarray) in linear time:
function maxSum(array) { var negatives = 0; var sum = 0; for (var i = 0; i < array.length; i++) { if (negatives < 0 && array[i] > 0) { var priorSum = (negatives + array[i]); if (array[i] > (priorSum + sum)) { sum = array[i]; negatives = 0; } else if ((priorSum + sum) > sum) { sum += priorSum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contiguousSeq(arr) {\n\n}", "function subarray(sum) {\n\n}", "function completeSeries(arr) {\n\tlet output = [];\n\tconst max = Math.max(...arr);\n\tconst set = [...new Set(arr)];\n\tif (set.length !== arr.length) {\n\t\treturn [0];\n\t} else {\n\t\tlet i = 0;\n\t\twhile (i <= max) {\n\t\t\toutput.pus...
[ "0.640873", "0.60649955", "0.6002768", "0.59999", "0.5985558", "0.59810287", "0.5837964", "0.58089864", "0.5776135", "0.577435", "0.5739272", "0.57231015", "0.5722638", "0.5722638", "0.5717415", "0.56714463", "0.5667553", "0.56496954", "0.5619812", "0.56165594", "0.5601706", ...
0.0
-1
Creates record in record collection w/o assaigning it to any store
function createRecord(req, res) { const newRecord = new RecordModel(req.body); newRecord.save(); return res.json(newRecord); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "create(newRecord: Object) {\n // Asserting all values in record are valid\n if (!this._assertRecordValid(newRecord)) {\n return\n }\n\n // Asserting store is a server store\n if (this.crudStore.type === 'server') {\n // Executing record create action to server\n this.crudStore.execute...
[ "0.7329481", "0.70661896", "0.70462656", "0.6927039", "0.6879418", "0.68118846", "0.6750622", "0.6733107", "0.6716747", "0.6712382", "0.66624004", "0.66280484", "0.66270876", "0.65940684", "0.6575179", "0.657072", "0.65239245", "0.6515884", "0.65047795", "0.6470229", "0.64621...
0.64023584
26
Fetch all records data w/o populate
function getData(req, res) { const query = {}; RecordModel.find(query, (findError, recordsArray) => { if (findError) { res.status(500); res.send('City Records says: Error finding records'); } else { res.json(recordsArray); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetchInitialData(){\n\t\tModel.prototype.fetch.apply(this, arguments)\n\t\tthis.collect.fetch()\n\t}", "static fetchAll() {\n return db.execute('SELECT * FROM products');\n }", "static fetchAll(cb) {\n getProductsFromFile(cb);\n }", "static fetchAll(cb) {\n getProductsFromFile(cb);\n }", ...
[ "0.699418", "0.66968966", "0.66831976", "0.6678468", "0.667182", "0.65988", "0.6571557", "0.65283614", "0.6516551", "0.6445907", "0.6407382", "0.63821006", "0.6373058", "0.63271403", "0.6303842", "0.6297522", "0.627801", "0.62271225", "0.62035507", "0.61967885", "0.6170001", ...
0.0
-1
Fetch one record populating it's stores
function getRecordsWithStores(req, res) { return RecordModel.findById(req.params.recordId) .populate('shops').exec((err, record) => { if (err) { res.status(500); res.send('Error found by finding records'); } else { res.json(record); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async fetchOne () {\n\t\tconst document = await this.databaseCollection.getById(\n\t\t\tthis.notFound[0],\n\t\t\tthis.options\n\t\t);\n\t\tif (document) {\n\t\t\tthis.fetchedDocuments = [document];\n\t\t}\n\t}", "findRecord(store, type, id) {\n let collection = this.collectionForType(type.modelName);\n\n r...
[ "0.6364678", "0.6315057", "0.62066424", "0.60969275", "0.6089495", "0.60468996", "0.60213834", "0.6006819", "0.59965146", "0.5946807", "0.57392603", "0.57266825", "0.57059073", "0.56871694", "0.5660087", "0.56494606", "0.5646486", "0.5624275", "0.5599372", "0.5585507", "0.558...
0.5597805
19
Get only the last record added to data base
function getLastRecord(req, res) { return RecordModel.find().sort({ $natural: -1 }).limit(1) .exec((err, record) => { if (err) { res.status(500); res.send('Error found'); } else { res.json(record); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "lastInsert() {\n return this._lastInsert;\n }", "last() {\n this._followRelService(\"last\", \"List\");\n }", "async lastItem() {\n if (this.response.length <= 0) {\n await this.executeQuery();\n }\n\n return this.response[this.response.length - 1];\n }", "function getInfofromDB(){\n\t...
[ "0.68766266", "0.6599612", "0.656748", "0.6455441", "0.6285291", "0.6257375", "0.62538123", "0.6193943", "0.6132224", "0.6036839", "0.5998328", "0.59177583", "0.59035623", "0.5891378", "0.5891378", "0.58853847", "0.5883108", "0.581674", "0.5806558", "0.57923555", "0.5785211",...
0.65386623
3