Get all data and display the page
423642
def page(self, course):
        
        if not self.webdav_host:
            raise web.notfound()

        url = self.webdav_host + "/" + course.get_id()
        username = self.user_manager.session_username()
        apikey = self.user_manager.session_api_key()
        return self.template_helper.get_renderer().course_admin.webdav(course, url, username, apikey)
980848
def all(self):
        
        return self.pages(self.url.page, self.url.max_page)
883827
def homepage(request):
    '''
    
    '''
    all_metadata = db.metadata.find()

    return render(request, templatename('homepage'),
                  dict(all_metadata=all_metadata))
1169901
function getdata($page = 1, $length = 10, $ano = false, $mes = false, $dia = false)
    {
        
        $dt = [];
        $where = '';
        
        if ($ano !== false) {
            $where .= ' AND YEAR(data) = :ano ';
            $dt[':ano'] = $ano;
        }
        
        if ($mes !== false) {
            $where .= ' AND MONTH(data) = :mes ';
            $dt[':mes'] = $mes;
        }

        if ($dia !== false) {
            $where .= ' AND DAY(data) = :dia ';
            $dt[':dia'] = $dia;
        }

        //Calculando a página
        $data = $this->calculate($page, $length,
                                'SELECT id								 
								 FROM access								 
								 WHERE (uri LIKE "/a/%" 
								 OR uri = "/")
								 '.$where.'								 
								 GROUP BY uri, MONTH(data), DAY(data)', $dt);

        return $this->execute($data,
                                'SELECT data, COUNT(id)qt, uri AS Link 
								 FROM access
     							 WHERE (uri LIKE "/a/%" 
								 OR uri = "/")
								 '.$where.'
								 GROUP BY uri, MONTH(data), DAY(data)
								 ORDER BY DAY(data), uri
								 LIMIT '.$data['init'].', '.$data['length'], $dt);
    }
767697
def show(self):
        
        if not self.data:
            return

        if self.data.get('continue'):
            return

        ptitle = self.params.get('title')
        dtitle = self.data.get('title')
        pageid = self.params.get('pageid')

        seed = dtitle or ptitle or pageid
        if utils.is_text(seed):
            seed = seed.replace('_', ' ')

        prettyprint(self._build_showstr(seed))
1354392
public function fetch($page = 1) {
    $params = $this->params;
    if ($this->paginate) {
      $params = array_merge($params, array('page' => $page));
    }

    $response = $this->client->get($this->path(), $params);
    $data = $response->json();

    if ($this->paginate) {
      $this->total = $data['total'];
      $this->pages = $data['pages'];
      $this->limit = $data['limit'];
      $this->currentPage = $data['current_page'];
      foreach ($data[static::$name] as $i => $deviceData) {
        $position = $i + ($this->currentPage - 1) * $this->limit;
        $this->setResource($position, $deviceData);
      }
    } else {
      $data = current($data);
      $this->total = count($data);
      foreach ($data as $i => $deviceData) {
        $this->setResource($i, $deviceData);
      }
    }
  }
517045
def _get_page_data(self, pno, zoom=0):
        
        dlist = self.dlist_tab[pno]  # get display list
        if not dlist:  # create if not yet there
            self.dlist_tab[pno] = self.doc[pno].getDisplayList()
            dlist = self.dlist_tab[pno]
        r = dlist.rect  # page rectangle
        mp = r.tl + (r.br - r.tl) * 0.5  # rect middle point
        mt = r.tl + (r.tr - r.tl) * 0.5  # middle of top edge
        ml = r.tl + (r.bl - r.tl) * 0.5  # middle of left edge
        mr = r.tr + (r.br - r.tr) * 0.5  # middle of right egde
        mb = r.bl + (r.br - r.bl) * 0.5  # middle of bottom edge
        mat = fitz.Matrix(2, 2)  # zoom matrix
        if zoom == 1:  # top-left quadrant
            clip = fitz.Rect(r.tl, mp)
        elif zoom == 4:  # bot-right quadrant
            clip = fitz.Rect(mp, r.br)
        elif zoom == 2:  # top-right
            clip = fitz.Rect(mt, mr)
        elif zoom == 3:  # bot-left
            clip = fitz.Rect(ml, mb)
        if zoom == 0:  # total page
            pix = dlist.getPixmap(alpha=False)
        else:
            pix = dlist.getPixmap(alpha=False, matrix=mat, clip=clip)
        return pix.getPNGData()
1161552
def values(self, limit=None, page=None):
        
        return self.get(limit=limit, page=page).values()
1138973
public function all() {
        $size = $this->maxPageSize();

        $firstPageResponse = $this->request( $this->createPaginatedRequestQuery( 0, $size ) );
        $header_values = $firstPageResponse->getResponse()->getHeader('X-Result-Total');
        $total = array_shift($header_values);

        $result = $firstPageResponse->json();

        if( $total <= $size ) {
            return $result;
        }

        $requests = [];
        for( $page = 1; $page < ceil( $total / $size ); $page++ ) {
            $requests[] = $this->createPaginatedRequestQuery( $page, $size );
        }

        $responses = $this->requestMany( $requests );

        foreach( $responses as $response ) {
            $result = array_merge( $result, $response->json() );
        }

        return $result;
    }
3880
def get(self):
        """"""
        return self.render(
            'index.html',
            databench_version=DATABENCH_VERSION,
            meta_infos=self.meta_infos(),
            **self.info
        )
353789
async def get_data(self):
        """"""
        url = '{}/{}'.format(self.url, 'all')

        try:
            with async_timeout.timeout(5, loop=self._loop):
                if self.password is None:
                    response = await self._session.get(url)
                else:
                    auth = aiohttp.BasicAuth(self.username, self.password)
                    response = await self._session.get(url, auth=auth)

            _LOGGER.debug("Response from Glances API: %s", response.status)
            print(response.status)
            print(response.text)
            self.data = await response.json()
            _LOGGER.debug(self.data)
        except (asyncio.TimeoutError, aiohttp.ClientError):
            _LOGGER.error("Can not load data from Glances API")
            raise exceptions.GlancesApiConnectionError()
686656
def index(request, page):
    """"""
    days = []
    days_found = set()
    query = Entry.query.order_by(Entry.pub_date.desc())
    pagination = Pagination(query, PER_PAGE, page, "index")
    for entry in pagination.entries:
        day = date(*entry.pub_date.timetuple()[:3])
        if day not in days_found:
            days_found.add(day)
            days.append({"date": day, "entries": []})
        days[-1]["entries"].append(entry)
    return render_template("index.html", days=days, pagination=pagination)
82301
public function display() {
        $source = str_replace(['{VENDOR}', '{APP_ROOT}'], [LIBS_FOLDER, APP_ROOT], $this->jsSource);
        $url = AssetsPublisher::get()->publishFolder($source);
        $events = $this->getJSEvents();
        $r = Form::get()->input($this->name . '[]', 'file', null, [
                'id' => $this->id,
                'data-url' => $this->dataUrl,
                'multiple' => 'multiple',
            ])
            . Html::get()->scriptFile($url . "js/vendor/jquery.ui.widget.js")
            . Html::get()->scriptFile($url . "js/jquery.iframe-transport.js")
            . Html::get()->scriptFile($url . "js/jquery.fileupload.js")
            . Html::get()->script("\$(function () {
    \$('#{$this->id}').fileupload({
        dataType: 'json' " . (isset($this->jsEventsHandlers['fileuploaddone'])?'': ",
        done: function (e, data) {
            $.each(data.result.files, function (index, file) {
                $('<p/>').text(file.name).appendTo($(\"#{$this->resultsId}\"));
            });
        }") . "
    })$events;
});");
        if ($this->generateResultsDiv) {
            $r .= Html::get()->tag("div", "", ["id" => $this->resultsId]);
        }
        return $r;
    }
839975
def to_find(self):
        '''
        
        '''
        kwd = {'pager': ''}
        self.render('user/info_list/most.html',
                    topmenu='',
                    userinfo=self.userinfo,
                    kwd=kwd)
718559
def get_all(self, qry, tpl):
        '''  '''
        self.cur.execute(qry, tpl)
        result = self.cur.fetchall()
        return result
113563
def query_all_issues(after):
    """"""
    page = count(1)
    data = []
    while True:
        page_data = query_issues(next(page), after)
        if not page_data:
            break
        data.extend(page_data)
    return data
466664
protected function getPaginationData()
	{
		// Choose page range ( window ) and set start/end page range.
		$this->setPageRange();

		// Set previous/next page number.
		$this->setPrevNumPage();
		$this->setNextNumPage();

		$pagination['template']		= $this->layout_template;
		$pagination['items_total'] 	= $this->getNumTotalResults();
		$pagination['item_start']		= ( ( $this->prev_num_page * $this->items_per_page ) + 1 );
		$pagination['item_end']		= ( $this->current_page_number * $this->items_per_page );
		$pagination['params']			= $this->params_template;
		if ( $pagination['item_end'] > $this->getNumTotalResults() )
		{
			$pagination['item_end'] = $this->getNumTotalResults();
		}
		$pagination['num_pages']		= $this->num_pages;
		$pagination['current_page']	= $this->current_page_number;

		// Links.
		for ( $i = $this->start_page_range; $i<= $this->end_page_range; $i++ )
		{
			$pagination['pages'][$i]['number']		= (int)$i;
		 	$pagination['pages'][$i]['is_current'] 	= ( $i == $this->current_page_number );

		 	$pagination['pages'][$i]['link'] 		= $this->url_base;
		 	if ( 1 != $i )
		 	{
		 		$pagination['pages'][$i]['link'] 	= $this->url_base . $this->separator_link_page . $i;
		 	}

		}

		if ( $this->prev_num_page > 0 )
		{
			$pagination['previous_page']['number'] 	= $this->prev_num_page;

			$pagination['previous_page']['link'] 		= $this->url_base;
			if ( 1 != $this->prev_num_page )
			{
				$pagination['previous_page']['link'] = $this->url_base . $this->separator_link_page . $this->prev_num_page;
			}
		}

		if ( $this->next_num_page > 0 )
		{
			$pagination['next_page']['number'] 		= $this->next_num_page;
			$pagination['next_page']['link'] 			= $this->url_base . $this->separator_link_page . $this->next_num_page;;
		}

		if ( 1 != $this->current_page_number )
		{
			$pagination['first_page']['number'] 		= 1;
			$pagination['first_page']['link'] 		= $this->url_base;
		}

		if ( $this->num_pages != $this->current_page_number )
		{
			$pagination['last_page']['number']	 	= $this->num_pages;
			$pagination['last_page']['link'] 			= $this->url_base . $this->separator_link_page . $this->num_pages;
		}

		$pagination['items_per_page'] 		= $this->items_per_page;
		$pagination['display_items_per_page'] = $this->display_items_per_page;

		return $pagination;
	}