r"""
        Activates a display page. Content of the active page is shown in the display.

        :param page_id:  Id of page to activate
        :type page_id: ``str``
968412
def activate_page(self, page_id):
        

        """
        if page_id == "next":
            page_keys = list(self._pages.keys())
            key_count = len(page_keys)
            if key_count > 0:
                idx = page_keys.index(self._active_page.page_id)
                if idx >= key_count-1:
                    idx = 0
                else:
                    idx += 1
                self._active_page = self._pages[page_keys[idx]]
                self._active_page._render()
                self._page_changed(self._active_page)

        elif page_id in self._pages:
            self._active_page = self._pages[page_id]
            self._page_changed(self._active_page)
        else:
            raise ValueError("Page with {page_id} not found in page list".format(page_id = page_id))
1221638
def active?(current_page)
      if current_page
        if id == current_page.id
          true
        elsif parent_of?(current_page)
          true
        else
          false
        end
      end
    end
1062201
def delete_page_property(self, page_id, page_property):
        
        url = 'rest/api/content/{page_id}/property/{page_property}'.format(page_id=page_id,
                                                                           page_property=str(page_property))
        return self.delete(path=url)
350491
public function pageAction()
    {
        if (!$this->action) {
            return;
        }

        $this->suppressView = true;
        $this->execPageAction($this->action, $this->params);
    }
346070
public function deletePage($page_id)
    {
        $url = "https://api.weixin.qq.com/shakearound/page/delete?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['page_id' => $page_id]);
    }
818166
function( id ) {
			var tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ];
			if ( !tab || this._.pageCount == 1 || !tab.isVisible() )
				return;
			// Switch to other tab first when we're hiding the active tab.
			else if ( id == this._.currentTabId )
				this.selectPage( getPreviousVisibleTab.call( this ) );

			tab.hide();
			this._.pageCount--;
			this.updateStyle();
		}
618067
def pages_admin_menu(context, page):
    """"""
    request = context.get('request', None)

    expanded = False
    if request and "tree_expanded" in request.COOKIES:
        cookie_string = urllib.unquote(request.COOKIES['tree_expanded'])
        if cookie_string:
            ids = [int(id) for id in
                urllib.unquote(request.COOKIES['tree_expanded']).split(',')]
            if page.id in ids:
                expanded = True
    context.update({'expanded': expanded, 'page': page})
    return context
717159
protected void setActivePage(ApplicationPage page) {
    	getPage().getControl();
    	loadLayoutData(page.getId());
    	((JideApplicationPage)getPage()).updateShowViewCommands();
	}
1263149
public void activateView(){
		if(SwingUtilities.isEventDispatchThread()){
			ValkyrieRepository.getInstance().getApplicationConfig().windowManager().getActiveWindow().getPage().showView(getId());
		}
		else{
			SwingUtilities.invokeLater(new Runnable(){
				public void run() {
                    ValkyrieRepository.getInstance().getApplicationConfig().windowManager().getActiveWindow().getPage().showView(getId());
				}
				
			});
		}
	}
281864
def get_page_by_id(self, page_id, expand=None):
        
        url = 'rest/api/content/{page_id}?expand={expand}'.format(page_id=page_id, expand=expand)
        return self.get(url)
469855
public static function view_page($pageid) {
        global $DB, $CFG;
        require_once($CFG->dirroot . "/mod/page/lib.php");

        $params = self::validate_parameters(self::view_page_parameters(),
                                            array(
                                                'pageid' => $pageid
                                            ));
        $warnings = array();

        // Request and permission validation.
        $page = $DB->get_record('page', array('id' => $params['pageid']), '*', MUST_EXIST);
        list($course, $cm) = get_course_and_cm_from_instance($page, 'page');

        $context = context_module::instance($cm->id);
        self::validate_context($context);

        require_capability('mod/page:view', $context);

        // Call the page/lib API.
        page_view($page, $course, $cm, $context);

        $result = array();
        $result['status'] = true;
        $result['warnings'] = $warnings;
        return $result;
    }
1335173
def page_up(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.page_up_key, n, interval)
        self.delay(post_dl)
210060
def get_page_as_pdf(self, page_id):
        
        headers = self.form_token_headers
        url = 'spaces/flyingpdf/pdfpageexport.action?pageId={pageId}'.format(pageId=page_id)
        return self.get(url, headers=headers, not_json_response=True)
1168464
public function actionView ($id)
		{
			$page = Page::find()->where([ 'id' => $id ])->orWhere([ 'guid' => $id ])->one();
			if ($page === null)
			{
				Yii::$app->notification->errorToSession(Yii::tr('Given page does not exist.', [], 'page'));
				$this->redirect(Url::toRoute([ '/page/index' ]));
			}
			$this->setTitle(Yii::tr('View page', [], 'page'));
			$this->data('page', $page);
			$this->data('useMenu', $this->module->useMenu);
			$this->_tpl = '@pageViews/view';
		}
1350974
def page(self, *args):
        
        for arg in args:
            self.__pages__.append(arg)
        return self
1014665
public void displayPage (final int page, boolean forceRefresh)
    {
        if (_page == page && !forceRefresh) {
            return; // NOOP!
        }

        // Display the now loading widget, if necessary.
        configureLoadingNavi(_controls, 0, _infoCol);

        _page = Math.max(page, 0);

        final boolean overQuery = (_model.getItemCount() < 0);
        final int count = _resultsPerPage;
        final int start = _resultsPerPage * page;
        _model.doFetchRows(start, overQuery ? (count + 1) : count, new AsyncCallback<List<T>>() {
            public void onSuccess (List<T> result) {
                if (overQuery) {
                    // if we requested 1 item too many, see if we got it
                    if (result.size() < (count + 1)) {
                        // no: this is the last batch of items, woohoo
                        _lastItem = start + result.size();
                    } else {
                        // yes: strip it before anybody else gets to see it
                        result.remove(count);
                        _lastItem = -1;
                    }
                } else {
                    // a valid item count should be available at this point
                    _lastItem = _model.getItemCount();
                }
                displayResults(start, count, result);
            }
            public void onFailure (Throwable caught) {
                reportFailure(caught);
            }
        });
    }
592177
def add_page(self, title=None, content=None, old_url=None,
                 tags=None, old_id=None, old_parent_id=None):
        
        if not title:
            text = decode_entities(strip_tags(content)).replace("\n", " ")
            title = text.split(". ")[0]
        if tags is None:
            tags = []
        self.pages.append({
            "title": title,
            "content": content,
            "tags": tags,
            "old_url": old_url,
            "old_id": old_id,
            "old_parent_id": old_parent_id,
        })