Cancels and removes all pending and/or showing SuperToasts and SuperActivityToasts.
978649
void cancelAllSuperToasts() {
        removeMessages(Messages.SHOW_NEXT);
        removeMessages(Messages.DISPLAY_SUPERTOAST);
        removeMessages(Messages.REMOVE_SUPERTOAST);

        // Iterate through the Queue, polling and removing everything
        for (SuperToast superToast : superToastPriorityQueue) {
            if (superToast instanceof SuperActivityToast) {
                if (superToast.isShowing()) {
                    try{
                        ((SuperActivityToast) superToast).getViewGroup().removeView(superToast.getView());
                        ((SuperActivityToast) superToast).getViewGroup().invalidate();
                    } catch (NullPointerException|IllegalStateException exception) {
                        Log.e(getClass().getName(), exception.toString());
                    }
                }
            } else {
                final WindowManager windowManager = (WindowManager) superToast.getContext()
                        .getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
                if (superToast.isShowing()) {
                    try{
                        windowManager.removeView(superToast.getView());
                    } catch (NullPointerException|IllegalArgumentException exception) {
                        Log.e(getClass().getName(), exception.toString());
                    }
                }
            }
        }
        superToastPriorityQueue.clear();
    }
1013302
public <T extends Widget & Checkable> void clearChecks() {
        List<T> children = getCheckableChildren();
        for (T c : children) {
            c.setChecked(false);
        }
    }
953282
public void removeAll() {
        int size = size();
        if (size == 0) {
            return;
        }
        for (int i = 0, listSize = lists.size(); i < listSize; i++) {
            List<? extends T> list = lists.get(i);
            if (list instanceof ObservableList) {
                ((ObservableList) list).removeOnListChangedCallback(callback);
            }
        }
        lists.clear();
        modCount += 1;
        listeners.notifyRemoved(this, 0, size);
    }
152702
private void cleanup() {
        if ((++counter & 0xFF) != 0) { // (++counter % 256) != 0
            return;
        }

        final long currentTimeNanos = System.nanoTime();
        if (currentTimeNanos - lastCleanupTimeNanos < CLEANUP_INTERVAL_NANOS) {
            return;
        }

        for (final Iterator<State> i = map.values().iterator(); i.hasNext();) {
            final State state = i.next();
            final boolean remove;

            synchronized (state) {
                remove = state.allActiveRequests == 0 &&
                         currentTimeNanos - state.lastActivityTimeNanos >= CLEANUP_INTERVAL_NANOS;
            }

            if (remove) {
                i.remove();
            }
        }

        lastCleanupTimeNanos = System.nanoTime();
    }
695159
@Override
    public boolean cancel(boolean mayInterruptIfRunning) {
        if (RESULT_UPDATER.compareAndSet(this, null, CANCELLATION_CAUSE_HOLDER)) {
            if (checkNotifyWaiters()) {
                notifyListeners();
            }
            return true;
        }
        return false;
    }
627263
public void cancel() {
        mActivePointerId = INVALID_POINTER;
        clearMotionHistory();

        if (mVelocityTracker != null) {
            mVelocityTracker.recycle();
            mVelocityTracker = null;
        }
    }
326736
private void cancelTimers(
			List<org.mobicents.slee.example.sjr.data.RegistrationBinding> removedContacts) {
		for (RegistrationBinding binding : removedContacts) {
			ActivityContextInterfaceExt aci = (ActivityContextInterfaceExt) this.activityContextNamingFacility
					.lookup(getACIName(binding.getContactAddress(),
							binding.getSipAddress()));
			// IF exists end the activity, SLEE will cancel timers, remove aci
			// names, etc.
			if (aci != null) {
				((NullActivity) aci.getActivity()).endActivity();
			}
		}
	}
1242454
public synchronized void cancelAll() {
		if (activeRequests.size() > 0) {
			List<HttpRequest> temp = new ArrayList<>(activeRequests);
			for (HttpRequest request : temp) {
				request.cancel();
			}
		}
		notifyCancelledAllRequests();
	}
629439
public void clear() {
        @SuppressWarnings("unchecked") SparseArray<BaseNotificationItem> cloneArray =
                (SparseArray<BaseNotificationItem>) notificationArray.clone();
        notificationArray.clear();

        for (int i = 0; i < cloneArray.size(); i++) {
            final BaseNotificationItem n = cloneArray.get(cloneArray.keyAt(i));
            n.cancel();
        }

    }
1127132
@Override
    public boolean cancel(boolean mayInterruptIfRunning) {
        if (!isInitialized()) {
            return internalFuture.cancel(mayInterruptIfRunning);
        }
        return synchronisationFuture.cancel(mayInterruptIfRunning) && internalFuture.cancel(mayInterruptIfRunning);
    }
184835
private void removeActivityFromStack(Activity activity){

		Iterator<WeakReference<Activity>> activityStackIterator = activityStack.iterator();
		while(activityStackIterator.hasNext()){
			Activity activityFromWeakReference = activityStackIterator.next().get();

			if(activityFromWeakReference == null){
				activityStackIterator.remove();
			}

			if(activity != null && activityFromWeakReference != null && activityFromWeakReference.equals(activity)){
				activityStackIterator.remove();
			}
		}
	}
89287
@Override
    public boolean cancel(boolean mayInterruptIfRunning) {

        if (m_isDone == true) {
            return false;
        }
        m_isDone = true;

        try {
            m_cancelResult = m_schedFuture.cancel(mayInterruptIfRunning);

            m_pendingException = new CancellationException();
        } finally {
            // Let get() finish
            this.m_coordinationLatch.countDown();
        }

        return m_cancelResult;
    }
993640
def cancelAllPendingResults( self ):
        """"""

        # grab all the pending job ids
        jobs = self.pendingResults()
        
        if len(jobs) > 0:
            # abort in the cluster
            self._abortJobs(jobs)
            
            # cancel in the notebook                  
            self.notebook().cancelAllPendingResults()
1233504
def cancel_pending_tasks(self):
        """"""
        for task in self._pending_tasks:
            task.cancel()
            if not self._loop.is_running():
                try:
                    self._loop.run_until_complete(task)
                except asyncio.CancelledError:
                    pass
                except Exception: # pylint: disable=broad-except
                    _LOGGER.error("Unhandled exception from async task",
                                  exc_info=True)
635254
def cancelOperation(self):
        '''
        
        '''
        if self.isLongTouchingPoint:
            self.toggleLongTouchPoint()
        elif self.isTouchingPoint:
            self.toggleTouchPoint()
        elif self.isGeneratingTestCondition:
            self.toggleGenerateTestCondition()
246228
def cancel(self, cancel_running=True, mark_completed_as_cancelled=False):
    

    with self._lock:
      for future in self._queue:
        future.cancel(mark_completed_as_cancelled)
      if cancel_running:
        for future in self._running:
          future.cancel(mark_completed_as_cancelled)
      self._queue.clear()
172185
function () {
            // cancel any sort operation
            if (this.pendingSort) {
                clearTimeout(this.pendingSort);
                this.pendingSort = null;
            }

            // delete all children
            for (var i = this.children.length, obj; i >= 0; (obj = this.children[--i])) {
                // don't remove it if a persistent object
                if (obj && !obj.isPersistent) {
                    this.removeChildNow(obj);
                }
            }

            if (typeof this.currentTransform !== "undefined") {
                // just reset some variables
                this.currentTransform.identity();
            }
        }