see parent docstring
509172
def __parse(self, tokenlist):
        """"""
        #empty stack
        #iterate over symbollist
        tokenlist = [x for x in tokenlist]
        if not isinstance(tokenlist, list):
            raise TypeError("Expected list, got %s" % tokenlist.__class__.__name__)
        LOG.debug("get_trees: checking list: " + str(tokenlist))
        stack = [(0, Extended_S)]
        while True:
            state = stack[-1][0]
            if len(tokenlist):#FIXME: tokenlist with one element is reported as false
                token = tokenlist[0]
            else:
                token = EndSymbol()
            newdic = self.__parsertable.insert(state, token)
            action = newdic["action"]
            if action == "Fail":
                return False
            elif action == "Accept":
                return True
            if action == "Reduce":
                reductionrule = newdic["rule"]
                #TODO extract len(right side) of the rule and insert left side
                for rsymbol in reversed(reductionrule.rightside):
                    state, symbol = stack.pop() # TODO: check
                state = stack[-1][0]
                state = self.__parsertable.goto(state,reductionrule.leftside[0])
                stack.append((state, reductionrule.leftside[0]))
            elif action == "Shift":
                stack.append((newdic['dest'], tokenlist.pop(0)))
            else:
                raise ValueError("Unknown action")
        return False
107487
def _module_parents(module_name):
        '''
        
        '''
        spl = module_name.split('.')
        for i in range(len(spl), 0, -1):
            yield '.'.join(spl[0:i])
        if module_name:
            yield ''
526137
void showParentFolder() {

        CmsUUID parentId = (CmsUUID)m_treeContainer.getParent(m_currentFolder);
        if (parentId != null) {
            Item resourceItem = m_treeContainer.getItem(parentId);
            if ((resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_DISABLED).getValue() == null)
                || !((Boolean)resourceItem.getItemProperty(
                    CmsResourceTableProperty.PROPERTY_DISABLED).getValue()).booleanValue()) {
                // don't open disabled parent folders
                try {
                    readFolder(parentId);
                    m_fileTree.select(parentId);
                } catch (CmsException e) {
                    CmsErrorDialog.showErrorDialog(
                        CmsVaadinUtils.getMessageText(Messages.ERR_EXPLORER_CAN_NOT_READ_RESOURCE_1, parentId),
                        e);
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }
        }
    }
165071
function(path, data) {
        var normalized = normalizePath(null, path, data);
        if (normalized.isKeyword) {
          return 'templateData.keywords.' + path;
        } else if (isGlobalPath(path)) {
          return null;
        } else if (path === 'this' || path === '') {
          return '_parentView.context';
        } else {
          return '_parentView.context.' + path;
        }
      }
1251255
def get_parent(self):
        """"""
        return None if self.zoom == 0 else self.tile_pyramid.tile(
            self.zoom - 1, self.row // 2, self.col // 2
        )
456092
function getParams(spec_c, details, method, parent) {
  var spec_js = {};
  _.each(spec_c, function(param) {
    try {
      var paramType = getType(getText(getChild(param, 'type'), 'type'), parent);
      var paramName = getText(getChild(param, 'declname'), 'name');
      spec_js[paramName] = { type: paramType };
    } catch(e) {
      if (paramType == '...') {
        spec_js['arguments'] = { type: paramType };
      } else {
        throw e;
      }
    }
  });
  _.each(details, function(param) {
    var getParamName = function(p) { return getText(getChild(getChild(p, 'parameternamelist'), 'parametername'), 'name'); }
    var paramName = getParamName(param);
    var paramDescription = getText(getChild(param, 'parameterdescription'), 'description');
    if (_.has(spec_js, paramName)) {
      spec_js[paramName].description = paramDescription;
    } else {
      var msg = ' has documentation for an unknown parameter: ' + paramName + '. ';
      var suggestions = _.difference(_.keys(spec_js), _.map(details, getParamName));
      var msgAddendum = (!_.isEmpty(suggestions) ? ('Did you mean ' + suggestions.join(', or ') + '?') : '');
      console.log('Warning: ' + (parent ? (parent + '.') : '') + method + msg + msgAddendum);
    }
  });
  return spec_js;
}
3273
function getScrollParent(parent, child) {
  let element = child;
  let scrollTop = 0;

  while (element && element !== parent) {
    element = element.parentNode;
    scrollTop += element.scrollTop;
  }
  return scrollTop;
}
260845
def data_parent(self) -> Optional["InternalNode"]:
        """"""
        parent = self.parent
        while parent:
            if isinstance(parent, DataNode):
                return parent
            parent = parent.parent
1136223
function (parentScope, parentElement, data) {
/*Line 114 - 'AtomMultiButtonList.js' */                var span = document.createElement("SPAN");
/*Line 115 - 'AtomMultiButtonList.js' */                parentElement.appendChild(span);

/*Line 117 - 'AtomMultiButtonList.js' */                parentElement = span;
/*Line 118 - 'AtomMultiButtonList.js' */                span = document.createElement("SPAN");
/*Line 119 - 'AtomMultiButtonList.js' */                var lp = this.get_labelPath();
/*Line 120 - 'AtomMultiButtonList.js' */                var vp = this.get_valuePath();
/*Line 121 - 'AtomMultiButtonList.js' */                l = data;
/*Line 122 - 'AtomMultiButtonList.js' */                v = data;
/*Line 123 - 'AtomMultiButtonList.js' */                if (lp)
/*Line 124 - 'AtomMultiButtonList.js' */                    l = data[lp];
/*Line 125 - 'AtomMultiButtonList.js' */                if (vp)
/*Line 126 - 'AtomMultiButtonList.js' */                    v = data[vp];


/*Line 129 - 'AtomMultiButtonList.js' */                var gpName = null;
/*Line 130 - 'AtomMultiButtonList.js' */                if (this._isRadio) {
/*Line 131 - 'AtomMultiButtonList.js' */                    gpName = "_g" + AtomUI.getNewIndex();
/*Line 132 - 'AtomMultiButtonList.js' */                }

/*Line 134 - 'AtomMultiButtonList.js' */                parentElement.appendChild(span);

/*Line 136 - 'AtomMultiButtonList.js' */                var options = new AtomEnumerator(this._options);
/*Line 137 - 'AtomMultiButtonList.js' */                while (options.next()) {
/*Line 138 - 'AtomMultiButtonList.js' */                    var op = options.current();
/*Line 139 - 'AtomMultiButtonList.js' */                    if (vp) {
/*Line 140 - 'AtomMultiButtonList.js' */                        op = op[vp];
/*Line 141 - 'AtomMultiButtonList.js' */                    }

/*Line 143 - 'AtomMultiButtonList.js' */                    var val = v + "." + op;

/*Line 145 - 'AtomMultiButtonList.js' */                    var cb = document.createElement("INPUT");
/*Line 146 - 'AtomMultiButtonList.js' */                    if (this._isRadio) {
/*Line 147 - 'AtomMultiButtonList.js' */                        AtomUI.attr(cb, "type", "radio");
/*Line 148 - 'AtomMultiButtonList.js' */                        AtomUI.attr(cb, "name", gpName);
/*Line 149 - 'AtomMultiButtonList.js' */                    } else {
/*Line 150 - 'AtomMultiButtonList.js' */                        AtomUI.attr(cb, "type", "checkbox");
/*Line 151 - 'AtomMultiButtonList.js' */                    }
/*Line 152 - 'AtomMultiButtonList.js' */                    $(cb).val(val);
/*Line 153 - 'AtomMultiButtonList.js' */                    span.appendChild(cb);
/*Line 154 - 'AtomMultiButtonList.js' */                    this.bindEvent(cb, "change", "onDataChange");
/*Line 155 - 'AtomMultiButtonList.js' */                    this._dataElements.push(cb);
/*Line 156 - 'AtomMultiButtonList.js' */                }

/*Line 158 - 'AtomMultiButtonList.js' */                span = document.createElement("SPAN");
/*Line 159 - 'AtomMultiButtonList.js' */                parentElement.appendChild(span);
/*Line 160 - 'AtomMultiButtonList.js' */                // Create Label First..
/*Line 161 - 'AtomMultiButtonList.js' */                var txt = document.createTextNode(l);
/*Line 162 - 'AtomMultiButtonList.js' */                span.appendChild(txt);
/*Line 163 - 'AtomMultiButtonList.js' */                //span.style.float = "left";

/*Line 165 - 'AtomMultiButtonList.js' */            }
422279
def GetParentFileEntry(self):
    
    location = getattr(self.path_spec, 'location', None)
    if location is not None:
      parent_location = self._file_system.DirnamePath(location)
      if parent_location == '':
        parent_location = self._file_system.PATH_SEPARATOR

    parent_file_reference = None
    mft_attribute = getattr(self.path_spec, 'mft_attribute', None)
    if mft_attribute is not None:
      parent_file_reference = (
          self._fsntfs_file_entry.get_parent_file_reference_by_attribute_index(
              mft_attribute))
    else:
      parent_file_reference = (
          self._fsntfs_file_entry.get_parent_file_reference())

    if parent_file_reference is None:
      return None

    parent_mft_entry = (
        parent_file_reference & _FILE_REFERENCE_MFT_ENTRY_BITMASK)

    parent_path_spec = getattr(self.path_spec, 'parent', None)
    # TODO: determine and pass the mft_attribute of the parent
    # for a faster resolve of the file entry.
    path_spec = ntfs_path_spec.NTFSPathSpec(
        location=parent_location, mft_entry=parent_mft_entry,
        parent=parent_path_spec)

    # TODO: handle parent correctly use attribute index?
    is_root = bool(
        parent_location == self._file_system.LOCATION_ROOT or
        parent_mft_entry == self._file_system.MFT_ENTRY_ROOT_DIRECTORY)

    return NTFSFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root)
1318967
public function parent()
    {
        $p = $this->_parent();
        return $p ? new self($this->doc, $p) : null;
    }
120378
def check_docstring(self, method):
        ''''''
        mn = method.__name__
        if method.__doc__ is None:
            return ['Missing docstring for method "{}"'.format(mn)]
21966
function showDoc (ddoc, viewName, docName, qs, callback) {
      return view(ddoc, viewName + '/' + docName, { type: 'show' }, qs, callback)
    }
1105241
def _closure_parent_pk(self):
        """"""
        if hasattr(self, "%s_id" % self._closure_parent_attr):
            return getattr(self, "%s_id" % self._closure_parent_attr)
        else:
            parent = getattr(self, self._closure_parent_attr)
            return parent.pk if parent else None
919654
def get_parent_element(self):
        """"""
        return {AUDIT_REF_STATE: self.context.audit_record,
                SIGNATURE_REF_STATE: self.context.signature}[self.ref_state]
672086
function read_parent_directory_data(error, parentDirectoryNode) {
    if(error) {
      callback(error);
    } else if(parentDirectoryNode.type !== NODE_TYPE_DIRECTORY || !parentDirectoryNode.data) {
      callback(new Errors.ENOTDIR('a component of the path prefix is not a directory', path));
    } else {
      context.getObject(parentDirectoryNode.data, get_node_from_parent_directory_data);
    }
  }
71079
static void parse(String inString, IContext context, INode parent) {
        List<String> tokens = getCommaTokens(inString);
        for (String token : tokens) {
            int isFunction = token.indexOf(OPEN_PARENTHESIS);
            if (isFunction >= 0) {
                String funcName = token.substring(0, isFunction);
                INode newParent = addChild(parent, context, funcName);
                String arguments = token.substring(isFunction + 1, token.length() - 1);
                parse(arguments, context, newParent);
            } else {
                addChild(parent, context, token);
            }
        }
    }