Dismiss (click 'Cancel' on) a confirmation box
965817
public void dismissConfirmation() {
        String action = "Clicking 'Cancel' on a confirmation";
        String expected = "Confirmation is present to be clicked";
        if (isNotConfirmation(action, expected)) {
            return;
        }
        dismiss(action, expected, "confirmation");
    }
1103408
def cancel(self, event=None):
        

        if self.parent != None:
            self.parent.focus_set()

        self.destroy()
850984
function off(input, state, keep) {
    var node = input[0],
      parent = input.parent(),
      checked = state == _checked,
      indeterminate = state == _indeterminate,
      disabled = state == _disabled,
      callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
      regular = option(input, callback + capitalize(node[_type])),
      specific = option(input, state + capitalize(node[_type]));

    // Prevent unnecessary actions
    if (node[state] !== false) {

      // Toggle state
      if (indeterminate || !keep || keep == 'force') {
        node[state] = false;
      };

      // Trigger callbacks
      callbacks(input, checked, callback, keep);
    };

    // Add proper cursor
    if (!node[_disabled] && !!option(input, _cursor, true)) {
      parent.find('.' + _iCheckHelper).css(_cursor, 'pointer');
    };

    // Remove state class
    parent[_remove](specific || option(input, state) || '');

    // Set ARIA attribute
    disabled ? parent.attr('aria-disabled', 'false') : parent.attr('aria-checked', 'false');

    // Add regular state class
    parent[_add](regular || option(input, callback) || '');
  }
1347422
def confirm(text='', title='', buttons=['OK', 'Cancel']):
    """"""
    retVal = messageBoxFunc(0, text, title, MB_OKCANCEL | MB_ICONQUESTION | MB_SETFOREGROUND | MB_TOPMOST)
    if retVal == 1 or len(buttons) == 1:
        return buttons[0]
    elif retVal == 2:
        return buttons[1]
    else:
        assert False, 'Unexpected return value from MessageBox: %s' % (retVal)
684028
def cancel(self):
        
        target_url = self._client.get_url('PUBLISH', 'DELETE', 'single', {'id': self.id})
        r = self._client.request('DELETE', target_url)
        logger.info("cancel(): %s", r.status_code)
91920
def cancel(id)
      have_key?
      address = @url_privat + "/api/exchange/orders/" + id
      body = { }
      h = delete_ssl_with_sign(address, body)
      {
        "success" => h["success"],
      }
    end
404308
def switch_off(self):
        """"""
        success = self.set_status(CONST.STATUS_CLOSED_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_CLOSED

        return success
1019217
def confirm(text='', title='', buttons=[OK_TEXT, CANCEL_TEXT], root=None, timeout=None):
    """"""
    assert TKINTER_IMPORT_SUCCEEDED, 'Tkinter is required for pymsgbox'
    return _buttonbox(msg=text, title=title, choices=[str(b) for b in buttons], root=root, timeout=timeout)
59533
def switch_off(self):
        """"""
        success = self.set_status(CONST.STATUS_OFF_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_CLOSED

        return success
618313
function(cancel) {
        var key = cancel ? "cancel" : "done";
        this.mouseDown = false;
        this.lastDown = null;
        this.lastUp = null;
        this.lastTouchPx = null;
        this.callback(key, [this.geometryClone()]);
        this.destroyFeature(cancel);
    }
793331
def cancel(task_id, secret_key=None, url=None):
  """"""
  if not secret_key:
    secret_key = default_key()
  if not url:
    url = default_url()

  url = '%s/cancel' % url
  values = {
    'id': task_id,
  }
  return _send_with_auth(values, secret_key, url)
702714
public function cancel()
    {
        $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/cancel/');
        $this->deserialize($data);
    }
1177181
function cancel(opt_reason) {
    if (!isPending()) {
      return;
    }

    if (opt_canceller) {
      opt_reason = opt_canceller(opt_reason) || opt_reason;
    }

    reject(opt_reason);
  }
758241
def cancel(self, msg='', exc_type=CancelledError):
        
        _ret = False
        if not self.is_done():
            self.notify_cancelled(msg, True)
            _ret = True

        return _ret
43757
def cancel_order(self, order_id, _async=False):
        
        params = {}
        path = f'/v1/order/orders/{order_id}/submitcancel'
        return api_key_post(params, path, _async=_async)
842438
public function cancel_process() {
        global $PAGE;
        // Determine the appropriate URL to redirect the user to.
        if ($PAGE->context->contextlevel == CONTEXT_MODULE && $PAGE->cm !== null) {
            $relevanturl = new moodle_url('/mod/'.$PAGE->cm->modname.'/view.php', array('id' => $PAGE->cm->id));
        } else {
            $relevanturl = new moodle_url('/course/view.php', array('id' => $PAGE->course->id));
        }
        redirect($relevanturl);
    }
828601
def _on_cancel_button_clicked(self, *args):
        
        self.core_config_model.preliminary_config.clear()
        self.gui_config_model.preliminary_config.clear()
        self.__destroy()