Returns true if the element displays at least something
973428
@Override
    public boolean affectsDisplay()
    {
        boolean ret = containsFlow();
        //non-zero top or left border
        if (border.top > 0 || border.bottom > 0)
            ret = true;
        //the same with padding
        if (padding.top > 0 || padding.bottom > 0)
            ret = true;
        
        return ret;
    }
354436
private boolean displayAbove() {

        int popupHeight = m_choices.getOffsetHeight();
        // Calculate top position for the choice select
        int top = m_buttonIcon.getAbsoluteTop();

        // Make sure scrolling is taken into account, since
        // box.getAbsoluteTop() takes scrolling into account.
        int windowTop = Window.getScrollTop();
        int windowBottom = Window.getScrollTop() + Window.getClientHeight();

        // Distance from the top edge of the window to the top edge of the
        // text box
        int distanceFromWindowTop = top - windowTop;

        // Distance from the bottom edge of the window to the bottom edge of
        // the text box
        int distanceToWindowBottom = windowBottom - (top + m_buttonIcon.getOffsetHeight());

        // If there is not enough space for the popup's height below the button
        // and there IS enough space for the popup's height above the button,
        // then then position the popup above the button. However, if there
        // is not enough space on either side, then stick with displaying the
        // popup below the button.
        boolean displayAbove = (distanceFromWindowTop > distanceToWindowBottom)
            && (distanceToWindowBottom < popupHeight);
        return displayAbove;
    }
354641
function _has_item(in_arg_key){
	var retval = false;
	if( typeof anchor.current_data[in_arg_key] != 'undefined' ){
	    retval = true;
	}
	return retval;
    }
1192814
public function display()
    {
        if (!$this->visible) {
            return;
        }

        // Do not have a maxlength on the XHTML input tag. This relies on
        // internal knowledge of the parent::display() method.
        $old_maxlength = $this->maxlength;
        $this->maxlength = null;

        parent::display();

        $this->maxlength = $old_maxlength;
    }
1127825
public boolean hasNext() {
        if (currentIndex == endIndex) {
            return false;
        }
              
        // Otherwise, see if nextElement is null. If so, try to load the next
        // element to make sure it exists.
        if (nextElement == null) {
            nextElement = getNextElement();
            if (nextElement == null) {
                return false;
            }
        }
        return true;
    }
1019521
def has_style(node):    
    

    elements = ['b', 'i', 'u', 'strike', 'color', 'jc', 'sz', 'ind', 'superscript', 'subscript', 'small_caps']

    return any([True for elem in elements if elem in node.rpr])
888765
public boolean contains(T element) {
    if (element == null) { return false; }
    return comparator.compare(element, min) > -1 && comparator.compare(element, max) < 1;
  }
767872
def visible?(page)
      # outer
      if outer > 0
        return true if outer >= page
        return true if (pages - outer) < page
      end

      # current page
      return true if current_page == page

      # inner
      return true if inner_range.include? page

      false
    end
991010
public function shouldDisplay(): bool
    {
        if ($this->before || $this->after) {
            return true;
        }

        return (bool) count($this->children);
    }
22668
def has_element(self, dat, skip_log=False):
        
        try:
            if self.get_elements(dat, skip_log=skip_log):
                return True
        except Exception as _:
            if not skip_log:
                log.error(_)
            return False
453623
public boolean hasNotes() {
        for (Object m_staffElement : m_staffElements) {
            JScoreElement element = (JScoreElement) m_staffElement;
            if ((element instanceof JNoteElementAbstract)
                    || (element instanceof JGroupOfNotes))
                return true;
        }
		return false;
	}
1206663
function isNested(obj) {
    if (getType(obj)==='object') {
        for (let tag in obj) {
            if (tag != TEXT && !ATTRTAG.test(tag)) {
                return true;
            }
        }
    }
}
166421
private static boolean isAvailable(WebElement element) {
        return element.isDisplayed() || isElementHiddenUnderScroll(element)
                && !element.getCssValue("visibility").equals("hidden");
    }
928401
def _is_inline(self, element):
        """"""
        if element.tag not in {etree.Comment, etree.ProcessingInstruction} and element.tag.lower() in self.inline_elements:
            return True
        return False
1171630
def contains_element(self, element):
        
        return (element in self.element_finder) and \
            (self.element_finder[element][1] != self.INVALID)
452649
function (el, className) {
        if (className && isElement(el)) {
            return el.classList.contains(className)
        }

        return false
    }
1192254
def is_displayed(self):
        
        t = self.wait_timeout
        self.wait_timeout = 0
        try:
            self.reload()
            return any(e.is_displayed() for e in self)
        finally:
            self.wait_timeout = t