! @brief Tests an endpoint type and direction.
547178
def _check_ep(interface, ep_index, ep_dir, ep_type):
    """"""
    ep = interface[ep_index]
    return (usb.util.endpoint_direction(ep.bEndpointAddress) == ep_dir) \
        and (usb.util.endpoint_type(ep.bmAttributes) == ep_type)
1012371
function calculateDistance(startPoint, endPoint) {
			return Math.round(Math.sqrt(Math.pow(endPoint.x - startPoint.x, 2) + Math.pow(endPoint.y - startPoint.y, 2)));
		}
276684
@Override
    public boolean areEndPointsEqual(Object ep1, Object ep2)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "areEndPointsEqual", new Object[] { ep1, ep2 });

        boolean isEqual = false;

        if (ep1 instanceof CFEndPoint && ep2 instanceof CFEndPoint)
        {
            CFEndPoint cfEp1 = (CFEndPoint) ep1;
            CFEndPoint cfEp2 = (CFEndPoint) ep2;

            // The CFW does not provide an equals method for its endpoints.
            // We need to manually equals the important bits up
            isEqual = isEqual(cfEp1.getAddress(), cfEp2.getAddress()) &&
                      isEqual(cfEp1.getName(), cfEp2.getName()) &&
                      cfEp1.getPort() == cfEp2.getPort() &&
                      cfEp1.isLocal() == cfEp2.isLocal() &&
                      cfEp1.isSSLEnabled() == cfEp2.isSSLEnabled();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "areEndPointsEqual", Boolean.valueOf(isEqual));
        return isEqual;
    }
270070
def endpoint_parameter(name, description, how_to_pass, required, type, params = {})
      parameters = settings.swagger_current_endpoint_parameters
      check_if_not_duplicate(name, parameters, 'Parameter')
      parameters[name] = Sinatra::SwaggerExposer::Configuration::SwaggerEndpointParameter.new(
        name,
        description,
        how_to_pass,
        required,
        type,
        params,
        settings.swagger_types.types_names)
    end
272619
function loadEndpoints() {
  // Shortcut if endpoints already have been loaded
  if (endpoints !== undefined) {
    return Promise.resolve(endpoints);
  }

  const endpointSpecsPath = path.join(process.cwd(), plugin.config.endpointsPath);

  return plugin.myrmex.fire('beforeEndpointsLoad')
  .spread(() => {
    const endpointPromises = [];
    file.walkSync(endpointSpecsPath, (dirPath, dirs, files) => {
      // We are looking for directories that have the name of an HTTP method
      const subPath = dirPath.substr(endpointSpecsPath.length);
      const resourcePathParts = subPath.split(path.sep);
      const method = resourcePathParts.pop();
      if (plugin.httpMethods.indexOf(method) === -1) { return; }

      // We construct the path to the resource
      const resourcePath = resourcePathParts.join('/');

      endpointPromises.push(loadEndpoint(endpointSpecsPath, resourcePath, method));
    });
    return Promise.all(endpointPromises);
  })
  .then(endpoints => {
    return plugin.myrmex.fire('afterEndpointsLoad', endpoints);
  })
  .spread(loadedEndpoints => {
    endpoints = loadedEndpoints;
    return Promise.resolve(endpoints);
  })
  .catch(e => {
    if (e.code === 'ENOENT' && path.basename(e.path) === path.basename(plugin.config.endpointsPath)) {
      return Promise.resolve([]);
    }
    Promise.reject(e);
  });
}
1358733
def matches? meth
      directions.include?(directionize(meth)) && (method("#{directionize(meth)}_formats").call.include?(formatize(meth)) || Citero.citation_styles.include?(formatize(meth)))
    end
695656
def check_collision!
      paths = self.routes.map(&:path)
      collision = Jets::Resource::ApiGateway::RestApi::Routes::Collision.new
      collide = collision.collision?(paths)
      raise collision.exception if collide
    end
7585
function isValidScalar(context: ValidationContext, node: ValueNode): void {
  // Report any error at the full type expected by the location.
  const locationType = context.getInputType();
  if (!locationType) {
    return;
  }

  const type = getNamedType(locationType);

  if (!isScalarType(type)) {
    context.reportError(
      new GraphQLError(
        badValueMessage(
          inspect(locationType),
          print(node),
          enumTypeSuggestion(type, node),
        ),
        node,
      ),
    );
    return;
  }

  // Scalars determine if a literal value is valid via parseLiteral() which
  // may throw or return an invalid value to indicate failure.
  try {
    const parseResult = type.parseLiteral(node, undefined /* variables */);
    if (isInvalid(parseResult)) {
      context.reportError(
        new GraphQLError(
          badValueMessage(inspect(locationType), print(node)),
          node,
        ),
      );
    }
  } catch (error) {
    // Ensure a reference to the original error is maintained.
    context.reportError(
      new GraphQLError(
        badValueMessage(inspect(locationType), print(node), error.message),
        node,
        undefined,
        undefined,
        undefined,
        error,
      ),
    );
  }
}
693967
def locate_endpoint_function(self, name=None):
        ''
        if name is not None:
            ep = "%s_%s" %(self._base_pathname,
                           name)
        else:
            ep = self._base_pathname
        return self._notflask.endpoints[ep]['view_func']
24346
function verifyEndpoint(request, respond)
{
  var challenge;

  if (typeof request.query == 'string')
  {
    request.query = qs.parse(request.query);
  }

  if (typeof request.query == 'object'
    && ((request.query['hub.verify_token'] === this.credentials.secret)
        // for hapi@10 and restify/express with queryParser check for `hub` object
    || (typeof request.query.hub == 'object' && request.query.hub['verify_token'] === this.credentials.secret)
    )
  )
  {
    challenge = request.query['hub.challenge'] || (request.query.hub ? request.query.hub.challenge : null);

    this.logger.debug({message: 'Successfully verified', challenge: challenge});
    respond(challenge);
    return;
  }

  this.logger.error({message: 'Unable to verify endpoint', query: request.query});
  respond(400, 'Error, wrong validation token');
}
582962
def determine_end_point(http_request, url):
    
    if url.endswith('aggregates') or url.endswith('aggregates/'):
        return 'aggregates'
    else:
        return 'detail' if is_detail_url(http_request, url) else 'list'
1331340
def detectType(option, urlOrPaths, serverEndpoint=ServerEndpoint, verbose=Verbose, tikaServerJar=TikaServerJar, 
               responseMimeType='text/plain',
               services={'type': '/detect/stream'}):
    '''
    
    '''
    paths = getPaths(urlOrPaths)
    return [detectType1(option, path, serverEndpoint, verbose, tikaServerJar, responseMimeType, services)
             for path in paths]
526261
def handle_type_inspect(self, call_id, payload):
        """"""
        style = 'fullName' if self.full_types_enabled else 'name'
        interfaces = payload.get("interfaces")
        ts = [i["type"][style] for i in interfaces]
        prefix = "( " + ", ".join(ts) + " ) => "
        self.editor.raw_message(prefix + payload["type"][style])
1040009
public function hasEndpoint($endpoint)
    {
        $retVal = false;
        if (isset($this->endpoints)) {
            $retVal = in_array($endpoint, $this->endpoints);
        }

        return $retVal;
    }
415284
function(request, data){
  request.source_endpoint = data[1];
  request.type = data[2];
  parseType(request, data);
}
526543
def endpoint(ctx, config, verbose):
    """"""
    if ctx.invoked_subcommand is None:
        # TODO default_endpoint = config.get('core', {}).get('default')
        for endpoint, values in config.get('endpoints', {}).items():
            # TODO is_default = default_endpoint == endpoint
            if not verbose:
                click.echo(endpoint)
            else:
                click.echo(
                    '{endpoint}\t{url}'.format(
                        endpoint=endpoint, url=values.get('url', '')
                    )
                )
121196
def from_inline(cls: Type[ESCoreEndpointType], inline: str) -> ESCoreEndpointType:
        
        m = ESCoreEndpoint.re_inline.match(inline)
        if m is None:
            raise MalformedDocumentError(ESCoreEndpoint.API)
        server = m.group(1)
        port = int(m.group(2))
        return cls(server, port)