Go to home screen
174114
function(moveBack) {
        return new Promise(function(resolve, reject) {
            exec(resolve, reject, APP_PLUGIN_NAME, "minimizeApp", [moveBack || false]);
        });
    }
1184066
def cmd_set_home(self, args):
        ''''''
        (lat, lon) = (self.click_position[0], self.click_position[1])
        alt = self.ElevationMap.GetElevation(lat, lon)
        print("Setting home to: ", lat, lon, alt)
        self.master.mav.command_long_send(
            self.settings.target_system, self.settings.target_component,
            mavutil.mavlink.MAV_CMD_DO_SET_HOME,
            1, # set position
            0, # param1
            0, # param2
            0, # param3
            0, # param4
            lat, # lat
            lon, # lon
            alt)
123384
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties)
    {
        ScreenParent screen = null;
        if ((iDocMode & ProjectTask.PROJECT_TASK_CALENDAR_MODE) == ProjectTask.PROJECT_TASK_CALENDAR_MODE)
            screen = Record.makeNewScreen(PROJECT_TASK_CALENDAR_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ProjectTask.PROJECT_PREDECESSOR_DETAIL_MODE) == ProjectTask.PROJECT_PREDECESSOR_DETAIL_MODE)
            screen = Record.makeNewScreen(PROJECT_TASK_PREDECESSOR_GRID_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.DETAIL_MODE) == ScreenConstants.DETAIL_MODE)
            screen = Record.makeNewScreen(PROJECT_TASK_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE)
            screen = Record.makeNewScreen(PROJECT_TASK_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.DISPLAY_MODE) != 0)
            screen = Record.makeNewScreen(PROJECT_TASK_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MENU_MODE) != 0)
            screen = Record.makeNewScreen(PROJECT_TASK_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else
            screen = super.makeScreen(itsLocation, parentScreen, iDocMode, properties);
        return screen;
    }
527729
function home(context, cb) {
  var viewModel = _.extend(
    {
      package: helper.find(context.data, {kind: 'package'})[0]
    }, util.docletChildren(context, null, util.mainDocletKinds),
    util.docletChildren(context, null, util.subDocletKinds),
    util.rstMixin,
    _.pick(context, ['readme'])
  );

  logger.debug('home namespaces', viewModel.namespaces);

  util.view('home.rst', viewModel, cb);
}
1286595
def on_graphs_menu_open(self, widget):
        """"""
        self.original_widget = urwid.Overlay(
            self.graphs_menu.main_window,
            self.original_widget,
            ('relative', self.left_margin),
            self.graphs_menu.get_size()[1],
            ('relative', self.top_margin),
            self.graphs_menu.get_size()[0])
614486
protected void enterOrtho() {
		GL11.glMatrixMode(GL11.GL_PROJECTION);
		GL11.glLoadIdentity();
		GL11.glOrtho(0, screenWidth, 0, screenHeight, 1, -1);
		GL11.glMatrixMode(GL11.GL_MODELVIEW);
	}
916798
def fullscreen(self):
        ''' 
        '''
        stream = self._stream
        stream.write(self.alt_screen_enable)
        stream.write(str(self.save_title(0)))     # 0 = both icon, title
        stream.flush()
        try:
            yield self
        finally:
            stream.write(self.alt_screen_disable)
            stream.write(str(self.restore_title(0)))  # 0 = icon & title
            stream.flush()
682941
def home(self):
        
        self._log.debug("home")
        self._location_cache = None
        self._hw_manager.hardware.home()
204327
function toggleFullscreen(element, callback) {
    if (callback && typeof callback === 'function') {
        if (!isFullscreen()) {
            var fn = function (e) {
                if (isFullscreen()) {
                    callback(true);
                }
                else {
                    callback(false);
                }
            };
            fullscreenChange(fn);
            enterFullscreen(element);
        }
        else {
            exitFullscreen();
            callback(false);
        }
        return Promise.resolve();
    }
    return new Promise(function (resolve) {
        if (!isFullscreen()) {
            enterFullscreen(element);
        }
        else {
            exitFullscreen();
        }
        resolve();
    });
    /**
     * enter fullscreen mode.
     * @param {Element} element
     */
    function enterFullscreen(element) {
        var userAgent = navigator.userAgent.toLowerCase();
        if (element.requestFullscreen) {
            element.requestFullscreen();
        }
        else if (element.msRequestFullscreen) {
            element.msRequestFullscreen();
        }
        else if (element.mozRequestFullScreen) {
            element.parentElement.mozRequestFullScreen();
        }
        else if (userAgent.indexOf('edge') != -1) {
            element.parentElement.webkitRequestFullscreen();
        }
        else if (element.webkitRequestFullscreen) {
            element.webkitRequestFullscreen();
        }
    }
    /**
     * exit fullscreen mode.
     */
    function exitFullscreen() {
        var _doument = document;
        if (document.exitFullscreen) {
            document.exitFullscreen();
        }
        else if (_doument.msExitFullscreen) {
            _doument.msExitFullscreen();
        }
        else if (_doument.mozCancelFullScreen) {
            _doument.mozCancelFullScreen();
        }
        else if (_doument.webkitExitFullscreen) {
            _doument.webkitExitFullscreen();
        }
    }
}
1226337
def quit_alternate_screen(self):
        
        if self._in_alternate_screen:
            stdout = self._winapi(windll.kernel32.GetStdHandle, STD_OUTPUT_HANDLE)
            self._winapi(windll.kernel32.SetConsoleActiveScreenBuffer, stdout)
            self._winapi(windll.kernel32.CloseHandle, self.hconsole)
            self.hconsole = stdout
            self._in_alternate_screen = False
496167
def OnToggleFullscreen(self, event):
        """"""

        is_full_screen = self.main_window.IsFullScreen()

        # Make sure that only the grid is shown in fullscreen mode
        if is_full_screen:
            try:
                self.main_window.grid.SetRowLabelSize(self.row_label_size)
                self.main_window.grid.SetColLabelSize(self.col_label_size)
            except AttributeError:
                pass

            # Restore toolbars from before fullscreen mode
            try:
                self.main_window._mgr.LoadPerspective(self.aui_windowed)
            except AttributeError:
                pass

        else:
            # Save the perspective of the AUI manager
            self.aui_windowed = self.main_window._mgr.SavePerspective()

            # Hide toolbars
            for pane in self.main_window._mgr.GetAllPanes():
                if pane.name != "grid":
                    pane.Hide()

            self.main_window._mgr.Update()

            self.row_label_size = self.main_window.grid.GetRowLabelSize()
            self.col_label_size = self.main_window.grid.GetColLabelSize()

            self.main_window.grid.SetRowLabelSize(0)
            self.main_window.grid.SetColLabelSize(0)

        self.main_window.ShowFullScreen(not is_full_screen)
457106
def on_stress_menu_open(self, widget):
        """"""
        self.original_widget = urwid.Overlay(self.stress_menu.main_window,
                                             self.original_widget,
                                             ('relative', self.left_margin),
                                             self.stress_menu.get_size()[1],
                                             ('relative', self.top_margin),
                                             self.stress_menu.get_size()[0])
134445
public void scrollTo() {
        String action = "Scrolling screen to " + prettyOutput();
        String expected = prettyOutputStart() + " is now within the current viewport";
        try {
            // wait for element to be present
            if (isNotPresent(action, expected, CANT_SCROLL)) {
                return;
            }
            // perform the move action
            WebElement webElement = getWebElement();
            Actions builder = new Actions(driver);
            builder.moveToElement(webElement);
        } catch (Exception e) {
            cantScroll(e, action, expected);
            return;
        }
        isScrolledTo(action, expected);
    }
1174293
public boolean onHome()
    {
        if (!(this instanceof BaseScreen))
            return false;   // This can only be called from the main screen
        BasePanel screenParent = this.getParentScreen();
        
		int count = 0;
		while (screenParent.popHistory(1, false) != null)
		{	// Pop all the history.
			count++;
		}
		count--;	// Want to move back to the first one
		if (count > 0)
			screenParent.popHistory(count, true);		// Dump all browser history
        String strLastCommand = Utility.addURLParam(null, Params.MENU, Constant.BLANK);  //"?menu="; // Blank command = home
        this.handleCommand(strLastCommand, this, ScreenConstants.USE_SAME_WINDOW | ScreenConstants.DONT_PUSH_TO_BROWSER);     // Process the last command in this window
        return true;    // Handled
    }
1090950
def chooser_menu():
    
    title = TITLE + "The" + Colors.ORANGE + " Metal" + Colors.RESET + TITLE + " Menu" + RESET
    menu = """
        ________________________________________________________________

            """ + title + """
        ________________________________________________________________


                ( """ + TITLE + "a" + RESET + """ ) :  Install RKhunter Rootkit Scanner (v1.6)

                ( """ + TITLE + "b" + RESET + """ ) :  Install Chkrootkit Rootkit Scanner (latest)

                ( """ + TITLE + "c" + RESET + """ ) :  Run RKhunter Scan of Local Machine

                ( """ + TITLE + "d" + RESET + """ ) :  Run Chkrootkit Scan of Local Machine

    """
    print(menu)
    answer: str = input("\t\tEnter Choice [quit]:  ") or ''

    if answer == 'a':
        return rkhunter()

    elif answer == 'b':
        print('\t\nrun chkrootkit installer\n')
        return chkrootkit.main()

    elif answer == 'c':
        print('\t\nrun rkhunter scan of local machine\n')

    elif answer == 'd':
        return chkrootkit_exec()
    return True
99022
def _clear_screen():
    
    if platform.system() == "Windows":
        tmp = os.system('cls')  #for window
    else:
        tmp = os.system('clear')  #for Linux
    return True
33649
def app_state(self, app):
        """"""
        if not self.available or not self.screen_on:
            return STATE_OFF
        if self.current_app["package"] == app:
            return STATE_ON
        return STATE_OFF