Retrieves useful information for the origin of this action
197639
def getOriginTrackedDeviceInfo(self, origin, unOriginInfoSize):
        """"""

        fn = self.function_table.getOriginTrackedDeviceInfo
        pOriginInfo = InputOriginInfo_t()
        result = fn(origin, byref(pOriginInfo), unOriginInfoSize)
        return result, pOriginInfo
1126505
def getPoseActionData(self, action, eOrigin, fPredictedSecondsFromNow, unActionDataSize, ulRestrictToDevice):
        """"""

        fn = self.function_table.getPoseActionData
        pActionData = InputPoseActionData_t()
        result = fn(action, eOrigin, fPredictedSecondsFromNow, byref(pActionData), unActionDataSize, ulRestrictToDevice)
        return result, pActionData
171152
function () {
        var location = this._location;
        var origin = location.origin;

        // Older browsers, especially IE, don't have origin
        if (!origin) {
          origin = location.protocol + '//' + location.hostname;

          if (location.port) {
            origin += ':' + location.port;
          }
        }

        return origin;
      }
136409
def getResponseAction(self, ps, action):
        '''
        '''
        opName = self.getOperationName(ps, action)
        if self.wsAction.has_key(opName) is False:
            raise WSActionNotSpecified, 'wsAction dictionary missing key(%s)' %opName
        return self.wsAction[opName]
1222557
def getOperation(self, ps, action):
        '''
        '''
        opName = self.getOperationName(ps, action)
        return getattr(self, opName)
1272309
def context(self):
        
        parent = _ACTION_CONTEXT.set(self)
        try:
            yield self
        finally:
            _ACTION_CONTEXT.reset(parent)
1296524
def get_origins(self, modpath, name):
        """"""
        return self.map.get(modpath, {}).get(name, set())
418491
function _getOrigin(event){
        if (event.origin) {
            // This is the HTML5 property
            return getLocation(event.origin);
        }
        if (event.uri) {
            // From earlier implementations 
            return getLocation(event.uri);
        }
        if (event.domain) {
            // This is the last option and will fail if the 
            // origin is not using the same schema as we are
            return location.protocol + "//" + event.domain;
        }
        throw "Unable to retrieve the origin of the event";
    }
762047
def _description(self):
        """"""

        inst = self.timemachine.presently

        if self.action_type == "dl":
            return "Deleted %s" % inst.content_type.name
        elif self.action_type == "cr":
            return "Created %s" % inst._object_type_html()
        else:
            return "Modified %s" % inst._object_type_html()
54623
def _source_info():
    
    ofi = inspect.getouterframes(inspect.currentframe())[2]
    try:
        calling_class = ofi[0].f_locals['self'].__class__
    except KeyError:
        calling_class = None
    # Tuple of file,line,calling_class,function_name
    return ofi[1], ofi[2], calling_class, ofi[3]
501612
def get_contents(self, origin):
        
        try:
            path = self.get_app_template_path(
                origin.app_name, origin.template_name)
            with io.open(path, encoding=self.engine.file_charset) as fp:
                return fp.read()
        except KeyError:
            raise TemplateDoesNotExist(origin)
        except IOError as error:
            if error.errno == errno.ENOENT:
                raise TemplateDoesNotExist(origin)
            raise
1222382
def create_information(self):
        """"""
        info = self._info_type()(origin=self, contents=self._contents())
        return info
670728
function getOriginalPositionDetailsFor(
  lineNumber,
  columnNumber,
  moduleIds,
  context,
) {
  var moduleLineOffset = 0;
  var metadata = context.segments[moduleIds.segmentId];
  const {localId} = moduleIds;
  if (localId != null) {
    const {moduleOffsets} = metadata;
    if (!moduleOffsets) {
      throw new Error(
        'Module ID given for a source map that does not have ' +
          'an x_facebook_offsets field',
      );
    }
    if (moduleOffsets[localId] == null) {
      throw new Error('Unknown module ID: ' + localId);
    }
    moduleLineOffset = moduleOffsets[localId];
  }
  const original = metadata.consumer.originalPositionFor({
    line: Number(lineNumber) + moduleLineOffset,
    column: Number(columnNumber),
  });
  if (metadata.sourceFunctionsConsumer) {
    original.functionName =
      metadata.sourceFunctionsConsumer.functionNameFor(original) || null;
  } else {
    original.functionName = null;
  }
  return original;
}
991754
def get_es_action_item(data_item, action_settings, es_type, id_field=None):
    '''  '''

    action_item = dict.copy(action_settings)
    if id_field is not None:
        id_val = first(list(get_dict_key(data_item, id_field)))
        if id_val is not None:
            action_item['_id'] = id_val
    elif data_item.get('id'):
        if data_item['id'].startswith("%s/" % action_settings['_index']):
            action_item['_id'] = "/".join(data_item['id'].split("/")[2:])
        else:
            action_item['_id'] = data_item['id']
    if data_item.get('data'):
        action_item['_source'] = data_item['data']
    else:
        action_item['_source'] = data_item
    action_item['_type'] = es_type
    return action_item
338070
def currentAction( self ):
        
        if ( not self._actionGroup ):
            return None
            
        for act in self._actionGroup.actions():
            if ( act.isChecked() ):
                return act
        return None
613132
private function findOrigin()
    {
        $origin = array();

        if (function_exists('debug_backtrace')) {
            $trace = debug_backtrace();
            $prevHop = null;
            // make a downsearch to identify the caller
            $hop = array_pop($trace);

            while ($hop !== null) {
                if (isset($hop['class'])) {
                    // we are sometimes in functions = no class available: avoid php warning here
                    $className = $hop['class'];

                    if (! empty($className) && ($className == ltrim(__CLASS__, '\\') || strtolower(get_parent_class($className)) == ltrim(__CLASS__, '\\'))) {
                        $origin['line'] = $hop['line'];
                        $origin['file'] = $hop['file'];
                        break;
                    }
                }
                $prevHop = $hop;
                $hop = array_pop($trace);
            }

            $origin['class'] = isset($prevHop['class']) ? $prevHop['class'] : 'main';

            if (isset($prevHop['function']) &&
                $prevHop['function'] !== 'include' &&
                $prevHop['function'] !== 'include_once' &&
                $prevHop['function'] !== 'require' &&
                $prevHop['function'] !== 'require_once') {
                $origin['function'] = $prevHop['function'];
            } else {
                $origin['function'] = 'main';
            }
        }

        return $origin;
    }
1144627
def info(self):
        
        if self._resources is None:
            self.__init()
        url = self._url + "/info"
        return _info.Info(url=url,
                          securityHandler=self._securityHandler,
                          proxy_url=self._proxy_url,
                          proxy_port=self._proxy_port,
                          initialize=True)