Carries out the action associated with Verify button
190411
def act(self):
        
        tname = self.val.get()
        g = get_root(self).globals
        g.clog.info('Checking ' + tname + ' in simbad')
        try:
            ret = checkSimbad(g, tname)
            if len(ret) == 0:
                self.verify.config(bg=g.COL['stop'])
                g.clog.warn('No matches to "' + tname + '" found.')
                if tname not in self.failures:
                    self.failures.append(tname)
            elif len(ret) == 1:
                self.verify.config(bg=g.COL['start'])
                g.clog.info(tname + ' verified OK in simbad')
                g.clog.info('Primary simbad name = ' + ret[0]['Name'])
                if tname not in self.successes:
                    self.successes.append(tname)
            else:
                g.clog.warn('More than one match to "' + tname + '" found')
                self.verify.config(bg=g.COL['stop'])
                if tname not in self.failures:
                    self.failures.append(tname)
        except urllib.error.URLError:
            g.clog.warn('Simbad lookup timed out')
        except socket.timeout:
            g.clog.warn('Simbad lookup timed out')
1072607
def register_action(self, action):
        
        assert action.value not in self.actions
        self.actions[action.value] = action
1343931
def perform_action(
            self, action, machines, params, progress_title, success_title):
        """"""
        if len(machines) == 0:
            return 0
        with utils.Spinner() as context:
            return self._async_perform_action(
                context, action, list(machines), params,
                progress_title, success_title)
1309095
public function verifyAction()
    {
        $server = $this->get('oauth2.server');

        if (!$server->verifyResourceRequest($this->get('oauth2.request'), $this->get('oauth2.response'))) {
            return $server->getResponse();
        }

        $tokenData = $server->getAccessTokenData($this->get('oauth2.request'), $this->get('oauth2.response'));

        return new JsonResponse($tokenData);
    }
1174328
@UnstableApi
    public void verify(MockedMethod method, VerificationMode mode) {
        verify((MockedVoidMethod) method::get, mode);
    }
943438
def _sign_button_press(self):
        """"""
        user_id = self.ent_id.text().strip()

        try:
            status = controller.sign(user_id)

        # ERROR: User type is unknown (!student and !tutor)
        except ValueError as e:
            logger.error(e, exc_info=True)
            QMessageBox.critical(
                self,
                __title__ + ' Error',
                str(e),
                buttons=QMessageBox.Ok,
                defaultButton=QMessageBox.Ok,
            )

        # ERROR: User is unregistered
        except controller.UnregisteredUser as e:
            logger.debug(e)
            QMessageBox.warning(
                self,
                'Unregistered User',
                str(e),
                buttons=QMessageBox.Ok,
                defaultButton=QMessageBox.Ok,
            )

        # User needs to select type
        except controller.AmbiguousUserType as e:
            logger.debug(e)
            u = QtUserTypeSelectionDialog('Select User Type: ', self)
            if u.exec_() == QDialog.Accepted:
                status = controller.sign(user_id, user_type=u.user_type)
                self._show_feedback_label(
                    'Signed {}: {} ({})'.format(
                        status.in_or_out, status.user_name, status.user_type
                    )
                )

        # User has signed in or out normally
        else:
            sign_choice_confirmed = QMessageBox.question(
                self,
                'Confirm Sign-{}'.format(status.in_or_out),
                'Sign {}: {}?'.format(status.in_or_out, status.user_name),
                buttons=QMessageBox.Yes | QMessageBox.No,
                defaultButton=QMessageBox.Yes,
            )

            logger.debug('Sign {} confirmed: {}'.format(
                status.in_or_out, sign_choice_confirmed
            ))

            if sign_choice_confirmed == QMessageBox.No:
                # Undo sign-in or sign-out
                if status.in_or_out == 'in':
                    controller.undo_sign_in(status.entry)
                elif status.in_or_out == 'out':
                    controller.undo_sign_out(status.entry)
            else:
                self._show_feedback_label(
                    'Signed {}: {}'.format(status.in_or_out, status.user_name)
                )

        finally:
            self._set_signed_in()
            self.ent_id.clear()
            self.ent_id.setFocus()
527455
def confirm(*args, **kwargs):
    """"""
    try:
        return click.confirm(*args, **kwargs)
    except click.Abort:
        return False
1024958
def devise_verification_code(mapping, controllers)
      resource :paranoid_verification_code, only: [:show, :update], path: mapping.path_names[:verification_code], controller: controllers[:paranoid_verification_code]
    end
679971
def check(self, action, page=None, lang=None, method=None):
        """"""
        if self.user.is_superuser:
            return True

        if action == 'change':
            return self.has_change_permission(page, lang, method)

        if action == 'delete':
            if not self.delete_page():
                return False
            return True
        if action == 'add':
            if not self.add_page():
                return False
            return True
        if action == 'freeze':
            perm = self.user.has_perm('pages.can_freeze')
            if perm:
                return True
            return False
        if action == 'publish':
            perm = self.user.has_perm('pages.can_publish')
            if perm:
                return True
            return False

        return False
1215345
private void initializeValidateButton() {
        Button button = (Button) findViewById(R.id.validate_button);
        button.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(final View v) {
                usernameEditText.validate();
                passwordEditText.validate();
                passwordRepetitionEditText.validate();
                genderSpinner.validate();
                firstNameEditText.validate();
                lastNameEditText.validate();
                additionalInformationEditText.validate();
            }

        });
    }
1060787
def check_for_valid_postback_actions(self, required_keys, post_params):
        
        for key in required_keys:
            if key not in post_params:
                return False
        return True
1263484
function(action) {
			var list = this._trackedtypes[action.type];
			if (list) {
				list.forEach(function(checks) {
					var handler = checks[0];
					var matches = checks[1] === action.global;
					var hacking = handler === this.spirit && this.$handleownaction;
					if (matches && (handler !== action.target || hacking)) {
						handler.onaction(action);
					}
				}, this);
			}
		}
1281513
def verify(self):
        
        pb = self._get_ansible_playbook(self.playbooks.verify)
        pb.execute()
1259218
public void check() {
        getDispatcher().beforeCheck(this);
        
        RemoteWebElement e = (RemoteWebElement) getElement();
        while (!e.isSelected()) {
            e.click();
        }
        if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
            logUIAction(UIActions.CHECKED);
        }
        
        getDispatcher().afterCheck(this);
    }
625712
public void executeNext() {

        if (!m_idle) {
            if (m_actions.isEmpty()) {
                m_idle = true;
            } else {
                CmsValidationController action = m_actions.removeFirst();
                action.internalStartValidation();
            }
        } else {
            assert false; // this shouldn't happen
        }
    }
499668
def before(self):
        """"""
        user = self.request.user()

        if user and user.verified_at is None:
            self.request.redirect('/email/verify')
59792
def confirm_registration(request, key, template="locksmith/confirmed.html"):
    '''
        
    '''
    context = {'LOCKSMITH_BASE_TEMPLATE': settings.LOCKSMITH_BASE_TEMPLATE}
    try:
        context['key'] = key_obj = Key.objects.get(key=key)
        if key_obj.status != 'U':
            context['error'] = 'Key Already Activated'
        else:
            key_obj.status = 'A'
            key_obj.save()
            key_obj.mark_for_update()
    except Key.DoesNotExist:
        context['error'] = 'Invalid Key'
    return render_to_response(template, context,
                              context_instance=RequestContext(request))