Check for required popup output.
323136
private function checkRequestParams() {
    $show_popup = TRUE;
    if (!empty($_REQUEST['location'])) {
      $show_popup = FALSE;
    }
    if (!empty($node = \Drupal::routeMatch()->getParameter('node')) && in_array($node->bundle(), ['branch', 'camp'])) {
      $show_popup = FALSE;
    }
    return $show_popup;
  }
110188
private String showPrompt(String prompt) {
        verifySystemOut();
        cursorMove = 0;
        if (!userInputActive) {
            return readLine(prompt, false);
        }

        out.print(prompt);
        out.flush();
        return null;
    }
130814
def check_entry(*entry):
    """"""
    whitelist = read_whitelist()
    if not check_allow_prompt(entry, whitelist):
        whitelist.append(entry)
        write_whitelist(whitelist)
637279
def _show_popup(self, index=0):
        
        full_prefix = self._helper.word_under_cursor(
            select_whole_word=False).selectedText()
        if self._case_sensitive:
            self._completer.setCaseSensitivity(QtCore.Qt.CaseSensitive)
        else:
            self._completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
        # set prefix
        self._completer.setCompletionPrefix(self.completion_prefix)
        cnt = self._completer.completionCount()
        selected = self._completer.currentCompletion()
        if (full_prefix == selected) and cnt == 1:
            debug('user already typed the only completion that we '
                            'have')
            self._hide_popup()
        else:
            # show the completion list
            if self.editor.isVisible():
                if self._completer.widget() != self.editor:
                    self._completer.setWidget(self.editor)
                self._completer.complete(self._get_popup_rect())
                self._completer.popup().setCurrentIndex(
                    self._completer.completionModel().index(index, 0))
                debug(
                    "popup shown: %r" % self._completer.popup().isVisible())
            else:
                debug('cannot show popup, editor is not visible')
1338271
def show_warning(message):
    """"""
    try:
        # If Tkinter is installed (highly probable), showing an error pop-up
        import Tkinter, tkMessageBox
        root = Tkinter.Tk()
        root.withdraw()
        tkMessageBox.showerror("Spyder", message)
    except ImportError:
        pass
    raise RuntimeError(message)
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;
    }
634425
public static void showAbout() {

        final CmsPopup popup = new CmsPopup(Messages.get().key(Messages.GUI_ABOUT_DIALOG_TITLE_0));
        FlowPanel container = new FlowPanel();
        int height = 450;
        if (Window.getClientHeight() < height) {
            height = Math.max(300, Window.getClientHeight() - 50);
        }
        container.setHeight(height + "px");
        Frame frame = new Frame();

        frame.setWidth("100%");
        frame.setHeight("100%");
        frame.setUrl(CmsCoreProvider.get().getAboutLink());
        container.add(frame);
        popup.setMainContent(container);
        popup.center();
        popup.addDialogClose(null);
        CmsPushButton closeButton = new CmsPushButton();
        closeButton.setText(Messages.get().key(Messages.GUI_CLOSE_0));
        closeButton.setUseMinWidth(true);

        closeButton.setButtonStyle(ButtonStyle.TEXT, ButtonColor.BLUE);
        closeButton.addClickHandler(new ClickHandler() {

            /**
             * @see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent)
             */
            public void onClick(ClickEvent event) {

                popup.hide();
            }
        });
        popup.addButton(closeButton);
        popup.addDialogClose(null);
    }
955338
function popOutReq() {
        if (called) {
            return;
        }

        called = true;
        self.ops.popOutReq(res.id, res);
    }
1179501
def on_ok(self):
        
        def popup(thr, add_type, title):
            """
            Start the thread and display a popup of the plugin being cloned
            until the thread is finished
            """
            thr.start()
            tool_str = 'Cloning repository...'
            if add_type == 'image':
                tool_str = 'Pulling image...'
            npyscreen.notify_wait(tool_str, title=title)
            while thr.is_alive():
                time.sleep(1)
            return

        if self.image.value and self.link_name.value:
            api_action = Tools()
            api_image = Image(System().manifest)
            api_system = System()
            thr = threading.Thread(target=api_image.add, args=(),
                                   kwargs={'image': self.image.value,
                                           'link_name': self.link_name.value,
                                           'tag': self.tag.value,
                                           'registry': self.registry.value,
                                           'groups': self.groups.value})
            popup(thr, 'image', 'Please wait, adding image...')
            npyscreen.notify_confirm('Done adding image.', title='Added image')
            editor_args = {'tool_name': self.image.value,
                           'version': self.tag.value,
                           'get_configure': api_system.get_configure,
                           'save_configure': api_system.save_configure,
                           'restart_tools': api_system.restart_tools,
                           'start_tools': api_action.start,
                           'from_registry': True,
                           'just_downloaded': True,
                           'link_name': self.link_name.value,
                           'groups': self.groups.value}
            self.parentApp.addForm('CONFIGUREIMAGE', EditorForm,
                                   name='Specify vent.template settings for '
                                   'image pulled (optional)', **editor_args)
            self.parentApp.change_form('CONFIGUREIMAGE')
        elif self.image.value:
            npyscreen.notify_confirm('A name needs to be supplied for '
                                     'the image being added!',
                                     title='Specify a name for the image',
                                     form_color='CAUTION')
        elif self.repo.value:
            self.parentApp.repo_value['repo'] = self.repo.value.lower()
            api_repo = Repository(System().manifest)
            api_repo.repo = self.repo.value.lower()
            thr = threading.Thread(target=api_repo._clone, args=(),
                                   kwargs={'user': self.user.value,
                                           'pw': self.pw.value})
            popup(thr, 'repository', 'Please wait, adding repository...')
            self.parentApp.addForm('ADDOPTIONS',
                                   AddOptionsForm,
                                   name='Set options for new plugin'
                                        '\t\t\t\t\t\t^Q to quit',
                                   color='CONTROL')
            self.parentApp.change_form('ADDOPTIONS')
        else:
            npyscreen.notify_confirm('Either a repository or an image '
                                     'name must be specified!',
                                     title='Specify plugin to add',
                                     form_color='CAUTION')
        return
474286
def _check_result(self):
        '''
        
        '''
        if not self.__call_result:
            raise CommandExecutionError('No output result from Zypper?')

        self.exit_code = self.__call_result['retcode']
        if self._is_lock():
            return False

        if self._is_error():
            _error_msg = list()
            if not self._is_xml_mode():
                msg = self.__call_result['stderr'] and self.__call_result['stderr'].strip() or ""
                if msg:
                    _error_msg.append(msg)
            else:
                try:
                    doc = dom.parseString(self.__call_result['stdout'])
                except ExpatError as err:
                    log.error(err)
                    doc = None
                if doc:
                    msg_nodes = doc.getElementsByTagName('message')
                    for node in msg_nodes:
                        if node.getAttribute('type') == 'error':
                            _error_msg.append(node.childNodes[0].nodeValue)
                elif self.__call_result['stderr'].strip():
                    _error_msg.append(self.__call_result['stderr'].strip())
            self.error_msg = _error_msg
        return True
728738
public function checkInstallInput()
    {
       
        $defaults = array('extension' => null,
                          'data' => true);
                          
        $this->options = array_merge($defaults, $this->options);
        
        if ($this->options['extension'] == null){
            $this->error("Please provide the 'extension' parameter.", true);
        }
       
    }
137981
private Appendable popOutputBuf() {
    Appendable poppedOutputBuf = outputBufStack.pop();
    currOutputBuf = outputBufStack.peek();
    return poppedOutputBuf;
  }
319345
def check_required(config):
    """"""
    if config.get('domain_key') is None:
        raise CfgError("The domain_key option is required")
    if config.get('remote_loc') is None:
        raise CfgError("The remote_location option is required")
    if config.get('gpg_keyid') is None:
        raise CfgError("The gpg_keyid option is required")
1220889
def check_output(*args, **kwargs):
    ''''''
    if hasattr(subprocess, 'check_output'):
        return subprocess.check_output(stderr=subprocess.STDOUT, universal_newlines=True,
                                       *args, **kwargs)
    else:
        process = subprocess.Popen(*args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
                                   universal_newlines=True, **kwargs)
        output, _ = process.communicate()
        retcode = process.poll()
        if retcode:
            error = subprocess.CalledProcessError(retcode, args[0])
            error.output = output
            raise error
        return output
179813
def _confirm_dialog(self, prompt):
        '''  '''
        response = raw_input(prompt).strip().lower()
        valid = {'y': True, 'ye': True, 'yes': True, 'n': False, 'no': False}
        while True:
            try:
                return valid[response]
            except:
                response = raw_input("Please respond 'y' or 'n': ").strip().lower()
838220
function showTooltipBind() {
            if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {
              return;
            }
            if ( scope.tt_popupDelay ) {
              popupTimeout = $timeout( show, scope.tt_popupDelay );
            } else {
              scope.$apply( show );
            }
          }
27943
private void prepareAndShowPopup(MouseEvent e)
    {
        prepareMenu(popupMenu, e.getComponent(), e.getX(), e.getY());
        popupMenu.show(e.getComponent(), e.getX(), e.getY());
    }