verify according to the down-looking taxonomy hash.
 @param [Taxonomite::Node] parent the proposed parent node
 @param [Taxonomite::Node] child the proposed child node
 @return [Boolean] whether the child appropriate for the parent, default true
348669
def is_valid_up_relation?(parent, child)
      [self.up_taxonomy[child.entity_type]].flatten.map { |t| return true if [parent.entity_type, "*"].include?(t) }
      false
    end
718883
def parent=(parent)
      if @rank.nil?
        raise Taxonifi::NameError, "Parent of name can not be set if rank of child is not set." 
      end

      # TODO: ICZN class over-ride
      if parent.class != Taxonifi::Model::Name
        raise NameError, "Parent is not a Taxonifi::Model::Name."
      end

      if (RANKS.index(parent.rank) >= RANKS.index(self.rank))
        #  warn "WARNING:: Assigning parent to Name at same or lower rank than self (#{rank})."
        raise NameError, "Parent is same or lower rank than self (#{rank})."
      end

      @parent = parent
    end
289519
def smart_merge(parent, child)
      parent.merge(child) do |_key, old, new|
        case old
        when Hash
          smart_merge(old, new)
        else
          new
        end
      end
    end
821108
function isKindOf(child, parent) {
        if (!_global.meta[child]) {
            return false;
        } else if (_global.meta[child] === _global.meta[parent]) {
            return true;
        } else {
            return isKindOf(_global.meta[child].super, parent);
        }
    }
68431
def has_children?(check = nil)
      post = obtain_record(check)
      post.blank? ? false : post.has_children?
    end
702618
function( ancestor, descendant, within )
    {
        var node = within ? descendant.parentNode : descendant;
        while( node )
        {
            if( node === ancestor )
                return true;
            node = node.parentNode;
        }
        return false;
    }
201969
def is_recursive(self, child_item):
        """"""
        ancestor = child_item.parent()
        # FIXME: indexes to data should be defined by a dictionary on init
        while ancestor:
            if (child_item.data(0, Qt.DisplayRole
                                ) == ancestor.data(0, Qt.DisplayRole) and
                child_item.data(7, Qt.DisplayRole
                                ) == ancestor.data(7, Qt.DisplayRole)):
                return True
            else:
                ancestor = ancestor.parent()
        return False
1044344
static boolean isTryFinallyNode(Node parent, Node child) {
    return parent.isTry() && parent.hasXChildren(3)
        && child == parent.getLastChild();
  }
5568
def is_child_of(self, node):
        
        return node.get_children().filter(pk=self.pk).exists()
761504
function (node) {
        var parent = node.parentNode;
        while (parent) {
            if (parent === this) {
                return true;
            }
            parent = parent.parentNode;
        }
        return false;
    }
446531
def only_child(of_type)
      lambda do |element|
        # Element must be inside parent element.
        return false unless element.parent and element.parent.tag?
        name = of_type ? element.name : nil
        other = false
        for child in element.parent.children
          # Skip text nodes/comments.
          if child.tag? and (name == nil or child.name == name)
            unless child.equal?(element)
              other = true
              break
            end
          end
        end
        !other
      end
    end
1281475
function(parent) {
            var clazzParent = this;

            while (clazzParent) {
                if (clazzParent === parent || clazzParent.__name === parent) {
                    return true;
                }
                clazzParent = clazzParent.__parent;
            }

            return false;
        }
932258
def parent(id)
      hash = http_get(url('/resources/%s/parent', id))
      Resource.new(hash) if hash
    end
893094
function(parent, field, options) {  
  options = options || {};
  // Unique id for this node's generated method
  this.id = utils.generateId();
  // Link to parent node
  this.parent = parent;
  // The field related to this node
  this.field = field;
  // Perform type check or not on generation
  this.typeCheck = typeof options.typeCheck == 'boolean' ? options.typeCheck : false;
  // Validation language
  this.validation = options.validation ? options.validation : null;
  // Any options
  this.options = options;
  // All children attached to this node
  this.children = [];
  // Just some metadata
  this.type = 'enum';
}
384682
function (node) {
        var parent = node._parent;
        while(parent) {
            if (parent === this) {
                return true;
            }
            parent = parent._parent;
        }
        return false;
    }
474686
function isParent(possibleParent, elem) {
    if(!elem || elem.nodeName === 'HTML') {
      return false;
    }

    if(elem.parentNode === possibleParent) {
      return true;
    }

    return isParent(possibleParent, elem.parentNode);
  }
607078
def get_child(parent, child_index):
    
    if child_index < 0 or child_index >= len(parent.childNodes):
        return None
    return parent.childNodes[child_index]