Return true if already contains the described PagePart
186670
public boolean containsThumbnail(int userPage, int page, float width, float height, RectF pageRelativeBounds) {
        PagePart fakePart = new PagePart(userPage, page, null, width, height, pageRelativeBounds, true, 0);
        for (PagePart part : thumbnails) {
            if (part.equals(fakePart)) {
                return true;
            }
        }
        return false;
    }
188262
function containsDotFile (parts) {
  for (var i = 0; i < parts.length; i++) {
    var part = parts[i]
    if (part.length > 1 && part[0] === '.') {
      return true
    }
  }

  return false
}
135035
private Boolean existsPage(String page) throws MalformedURLException {
        // Searching the page...
        LOGGER.debug("Searching page [{}]...", page);
        LOGGER.debug("Page's real path is [{}]", this.context.getRealPath(page));
        File file = new File(this.context.getRealPath(page));
        Boolean exists = file.exists();
        LOGGER.debug("Page [{}]{}found", page, (exists ? " " : " not "));
        return exists;
    }
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
819395
def has_source_contents(self, src_id):
        """"""
        return bool(rustcall(_lib.lsm_view_has_source_contents,
                             self._get_ptr(), src_id))
669688
def has_page?(url)
      schemes = %w(http https)
      if schemes.include? url.scheme
        u = url.dup
        return schemes.any? { |s| u.scheme = s; has_key?(u) }
      end

      has_key? url
    end
812418
def contains(self, url: str):
        ''''''

        try:
            self.get_one(url)
        except NotFound:
            return False
        else:
            return True
164032
def search_for(self, query, include_draft=False):
        
        query = query.lower()
        if not query:
            return []

        def contains_query_keyword(post_or_page):
            contains = query in post_or_page.title.lower() \
                       or query in Markup(
                get_parser(post_or_page.format).parse_whole(
                    post_or_page.raw_content)
            ).striptags().lower()
            return contains

        return filter(contains_query_keyword,
                      chain(self.get_posts(include_draft=include_draft),
                            self.get_pages(include_draft=include_draft)
                            if current_app.config[
                                'ALLOW_SEARCH_PAGES'] else []))
1030076
private function isCurrentlyLastPage()
    {
        if ($this->page_number_type === 'start_num') {
            if ($this->page_number_value >= ($this->total_pages*$this->items_per_page)-$this->items_per_page) {
                return true;
            }
            return false;
        } elseif ($this->page_number_type === 'page_num') {
            if ($this->page_number_value >= $this->total_pages) {
                return true;
            }
            return false;
        }
        return false;
    }
1319347
def has_more_pages(self):
        

        # if has_next property exists, it represents whether more pages exist
        if self.has_next is not None:
            return self.has_next

        # otherwise, try to compute whether or not more pages exist
        total_pages = self.get_total_pages()
        if self.page_number is None or total_pages is None:
            return None
        else:
            return self.page_number + 1 < total_pages
1001598
def _has_next_page(self):
        
        if self.page_number == 0:
            return True

        if self.max_results is not None:
            if self.num_results >= self.max_results:
                return False

        # Note: intentionally a falsy check instead of a None check. The RPC
        # can return an empty string indicating no more pages.
        return True if self.next_page_token else False
451843
function contains(container, maybe) {
  // 16 is for a nodeType constant: window.Node.DOCUMENT_POSITION_CONTAINED_BY,
  // but the window.Node object is not available in IE8
  return container.contains ? container.contains(maybe) :
    !!(container.compareDocumentPosition(maybe) & 16);
}
251434
def _contains(self, item):
        
        if self is item:
            return True
        for m in self.modules:
            if item in m:
                return True
        for p in self.packages:
            if item in p:
                return True
        return False
682203
def contains_list(longer, shorter):
    """"""
    if len(longer) <= len(shorter):
        return False
    for a, b in zip(shorter, longer):
        if a != b:
            return False
    return True
1082812
public boolean contains(int xp, int yp) {
		if (xp < x) {
			return false;
		}
		if (yp < y) {
			return false;
		}
		if (xp >= x+width) {
			return false;
		}
		if (yp >= y+height) {
			return false;
		}
		
		return true;
	}
1038570
def next_page(self):
        
        if self.is_last_page():
            return False

        self.page += 1
        self.items = self.fetch_items()
        return True
1172034
function checkForDuplicateIds( page ) {
      const idCount = {};
      forEachArea( page, items => {
         items.forEach( ({ id }) => {
            idCount[ id ] = idCount[ id ] ? idCount[ id ] + 1 : 1;
         } );
      } );

      const duplicates = Object.keys( idCount ).filter( id => idCount[ id ] > 1 );
      if( duplicates.length ) {
         throw formatError( page, `Duplicate widget/composition/layout ID(s): ${duplicates.join( ', ' )}` );
      }
   }