Injects missing to prefixes expected by chai-should transformer.
TODO: not sure if this is even required for chai...
551452
function injectMissingPrefix() {
        const injector = p => {
            const { property } = p.parentPath.value;
            if (property && property.type === j.Identifier.name) {
                if (property.name !== 'to') {
                    const newPath = j.memberExpression(p.value, j.identifier('to'));
                    p.replace(newPath);
                }
            }
        };

        root
            .find(j.CallExpression, {
                callee: {
                    name: name => ['expect', 'should'].indexOf(name) >= 0,
                },
            })
            .forEach(injector);

        root
            .find(j.MemberExpression, {
                property: {
                    type: j.Identifier.name,
                    name: 'should',
                },
            })
            .forEach(injector);
    }
953454
function shouldIgnore(word, matchs, n) {
    if (word[0] === '"' || word[0] === "'" || /^\d+$/.test(word)) return true;
    let w = getFirstWord(word);
    if (ignores.hasOwnProperty(w) || (matchs && inText(matchs, n))) {
      return true;
    }
    if (['state', 'props'].indexOf(w) < 0) {
      console.error(`'${from.fromSrc}' 中发现无效变量引用 '${word}'，XML模板中只能引用组件'props'和'state'中的数据。`.red);
      console.error('如果您的项目基于Labrador 0.5.x，请按照升级指南升级到0.6.x版本 https://github.com/maichong/labrador');
    }

    return false;
  }
657471
function needFix (stylecowSupport, task, method) {
    const taskSupport = task[method];

    if (!taskSupport || !stylecowSupport) {
        return true;
    }

    for (let browser in taskSupport) {
        if (stylecowSupport[browser] === false) {
            continue;
        }

        if (method === 'forBrowsersLowerThan' && (taskSupport[browser] === false || stylecowSupport[browser] < taskSupport[browser])) {
            return true;
        }

        if (method === 'forBrowsersUpperOrEqualTo') {
            if (taskSupport[browser] === false) {
                return false;
            }

            if (stylecowSupport[browser] >= taskSupport[browser]) {
                return true;
            }
        }
    }

    return false;
}
325095
def set_prefix(self, elt, pyobj):
        '''
        '''
        if isinstance(pyobj, tuple):
            namespaceURI,localName = pyobj
            self.prefix = elt.getPrefix(namespaceURI)
207871
def expect_token(lexer: Lexer, kind: TokenKind) -> Token:
    
    token = lexer.token
    if token.kind == kind:
        lexer.advance()
        return token

    raise GraphQLSyntaxError(
        lexer.source, token.start, f"Expected {kind.value}, found {token.kind.value}"
    )
1288695
public void startPrefixMapping(String prefix, String uri)
          throws SAXException
  {

    if (DEBUG)
      System.out.println("TransformerHandlerImpl#startPrefixMapping: "
                         + prefix + ", " + uri);

    if (m_contentHandler != null)
    {
      m_contentHandler.startPrefixMapping(prefix, uri);
    }
  }
1185544
def custom_prefix_lax(instance):
    
    for error in chain(custom_object_prefix_lax(instance),
                       custom_property_prefix_lax(instance),
                       custom_observable_object_prefix_lax(instance),
                       custom_object_extension_prefix_lax(instance),
                       custom_observable_properties_prefix_lax(instance)):
        yield error
439958
def enable_aliases_autocomplete(_, **kwargs):
    
    external_completions = kwargs.get('external_completions', [])
    prefix = kwargs.get('cword_prefix', [])
    cur_commands = kwargs.get('comp_words', [])
    alias_table = get_alias_table()
    # Transform aliases if they are in current commands,
    # so parser can get the correct subparser when chaining aliases
    _transform_cur_commands(cur_commands, alias_table=alias_table)

    for alias, alias_command in filter_aliases(alias_table):
        if alias.startswith(prefix) and alias.strip() != prefix and _is_autocomplete_valid(cur_commands, alias_command):
            # Only autocomplete the first word because alias is space-delimited
            external_completions.append(alias)

    # Append spaces if necessary (https://github.com/kislyuk/argcomplete/blob/master/argcomplete/__init__.py#L552-L559)
    prequote = kwargs.get('cword_prequote', '')
    continuation_chars = "=/:"
    if len(external_completions) == 1 and external_completions[0][-1] not in continuation_chars and not prequote:
        external_completions[0] += ' '
891850
def method_missing(sym, *args, &block) # :nodoc:\
      matchers = natural_language.keywords['matchers']
      be_word = matchers['be'] if matchers
      sym = be_to_english(sym, be_word)
      return Matchers::BePredicate.new(sym, *args, &block) if be_predicate?(sym)
      return Matchers::Has.new(sym, *args, &block) if have_predicate?(sym)
    end
25914
def step_impl2(context, first, second, prefix):
    
    context.first = first
    context.second = second
1163765
boolean needToCheckExclude()
  {
    if (null == m_excludeResultPrefixes && null == getPrefixTable()
                && m_ExtensionElementURIs==null     // JJK Bugzilla 1133
                )
      return false;
    else
    {

      // Create a new prefix table if one has not already been created.
      if (null == getPrefixTable())
        setPrefixTable(new java.util.ArrayList());

      return true;
    }
  }
1193479
def inject(span_context, format, carrier)
      case format
      when OpenTracing::FORMAT_TEXT_MAP, OpenTracing::FORMAT_BINARY
        ::Instana.logger.debug 'Unsupported inject format'
      when OpenTracing::FORMAT_RACK
        carrier['X-Instana-T'] = ::Instana::Util.id_to_header(span_context.trace_id)
        carrier['X-Instana-S'] = ::Instana::Util.id_to_header(span_context.span_id)
      else
        ::Instana.logger.debug 'Unknown inject format'
      end
    end
558903
def unexpected(parser, at_token=None):
    # type: (Parser, Optional[Any]) -> GraphQLSyntaxError
    """"""
    token = at_token or parser.token
    return GraphQLSyntaxError(
        parser.source, token.start, u"Unexpected {}".format(get_token_desc(token))
    )
1084046
private boolean appendIn(StringBuilder builder, CQLTranslator translator, String columnName) {
        boolean isPresent;
        isPresent = true;
        translator.ensureCase(builder, columnName, false);
        builder.append(" IN ");
        return isPresent;
    }
1063216
function( actual, expected, prefix ) {
		var self = this, keys, expectedKeys;
		prefix = prefix || '';

		if ( munit.isArray( actual ) && munit.isArray( expected ) ) {
			if ( actual.length !== expected.length ) {
				throw "\nActual: actual" + prefix + ".length = " + actual.length +
					"\nExpected: expected" + prefix + ".length = " + expected.length;
			}

			munit.each( actual, function( item, i ) {
				if ( munit.isArray( item ) || munit.isObject( item ) ) {
					self._objectMatch( item, expected[ i ], prefix + "[" + i + "]" );
				}
				else if ( item !== expected[ i ] ) {
					throw "\nActual: actual" + prefix + "[" + i + "] = " + item +
						"\nExpected: expected" + prefix + "[" + i + "] = " + expected[ i ];
				}
			});
		}
		else if ( munit.isObject( actual ) && munit.isObject( expected ) ) {
			keys = Object.keys( actual );
			expectedKeys = Object.keys( expected );

			if ( keys.length !== expectedKeys.length ) {
				throw "\nActual: actual" + prefix + ".length = " + keys.length +
					"\nExpected: expected" + prefix + ".length = " + expectedKeys.length;
			}

			munit.each( keys, function( key ) {
				var item = actual[ key ];

				if ( munit.isArray( item ) || munit.isObject( item ) ) {
					self._objectMatch( item, expected[ key ], prefix + "[" + key + "]" );
				}
				else if ( item !== expected[ key ] ) {
					throw "\nActual: actual" + prefix + "[" + key + "] = " + item +
						"\nExpected: expected" + prefix + "[" + key + "] = " + expected[ key ];
				}
			});
		}
		else if ( actual !== expected ) {
			throw "\nActual: actual" + prefix + " = " + actual +
				"\nExpected: expected" + prefix + " = " + expected;
		}
	}
634270
function getVerbHelp(verb, output) {
    let targets = [];
    let options = {
        head: `Available resources for ${chalk.bold(verb)}:`,
        table: []
    };

    // special verbs

    let sections = [];

    switch (verb) {
    case "query":
        output.write(chalk.cyan.bold("luis query --query <querytext> [--appId | --endpoint | --nologging | --region | --spellCheck | --staging | --subscriptionKey | --timezoneOffset | --timing |  --verbose]\n\n"))
        options.table.push([chalk.cyan.bold("--query <query>"), "Query to analyze with LUIS prediction."]);
        options.table.push([chalk.cyan.bold("--endpoint <endpointUrl>"), "Endpoint to use for query like https://westus.api.cognitive.microsoft.com/luis/v2.0/apps, overrides region."]);
        options.table.push([chalk.cyan.bold("--nologging"), "Turn off query logging in LUIS."]);
        options.table.push([chalk.cyan.bold("--spellCheck <key>"), "Check spelling using your Bing spelling key."]);
        options.table.push([chalk.cyan.bold("--staging"), "Use the staging environtment rather than production."]);
        options.table.push([chalk.cyan.bold("--timezoneOffset <minutes>"), "Specify the timezone offset in minutes used for resolving data time."]);
        options.table.push([chalk.cyan.bold("--timing [iterations]"), "Perform timings on query, default is 5 iterations."]);
        options.table.push([chalk.cyan.bold("--verbose"), "Include scores for all intents."]);
        sections.push(options);
        sections.push(configSection);
        sections.push(globalArgs);
        return sections;

    case "set":
        output.write(chalk.cyan.bold("luis set <appIdOrName> [--appId|--versionId|--authoringKey|--endpoint] <value>\n\n"))
        options.table.push([chalk.cyan.bold("<appIdOrName>"), "change the active application by looking it up by name or id"]);
        options.table.push([chalk.cyan.bold("--appId <appId>"), "change the active application id "]);
        options.table.push([chalk.cyan.bold("--versionId <version>"), "change the active version id "]);
        options.table.push([chalk.cyan.bold("--authoringKey <authoringKey>"), "change the active authoringKey◘"]);
        options.table.push([chalk.cyan.bold("--endpoint <endpointUrl>"), "change the active endpointBasePath url"]);
        sections.push(options);
        sections.push(configSection);
        sections.push(globalArgs);
        return sections;
    }

    for (let iOperation in operations) {
        let operation = operations[iOperation];
        if (operation.methodAlias == verb) {
            let target = operation.target[0];
            if (targets.indexOf(target) < 0) {
                targets.push(target);
            }
        }
    }


    if (targets.length == 0)
        return getGeneralHelpContents(output);

    targets.sort();
    for (let target of targets) {
        options.table.push([chalk.cyan.bold(target), '']);
    }
    sections.push(options);
    sections.push(configSection);
    sections.push(globalArgs);
    return sections;
}
147226
void declarePrefix (String prefix, String uri)
    {
                                // Lazy processing...
        if (!tablesDirty) {
            copyTables();
        }
        if (declarations == null) {
            declarations = new Vector();
        }
            
        prefix = prefix.intern();
        uri = uri.intern();
        if ("".equals(prefix)) {
            if ("".equals(uri)) {
                defaultNS = null;
            } else {
                defaultNS = uri;
            }
        } else {
            prefixTable.put(prefix, uri);
            uriTable.put(uri, prefix); // may wipe out another prefix
        }
        declarations.addElement(prefix);
    }