清空该层画布
@param {boolean} [clearAll]=false Clear all with out motion blur
@param {Color} [clearColor]
353607
function (clearAll, clearColor) {
        var dom = this.dom;
        var ctx = this.ctx;
        var width = dom.width;
        var height = dom.height;

        var clearColor = clearColor || this.clearColor;
        var haveMotionBLur = this.motionBlur && !clearAll;
        var lastFrameAlpha = this.lastFrameAlpha;

        var dpr = this.dpr;

        if (haveMotionBLur) {
            if (!this.domBack) {
                this.createBackBuffer();
            }

            this.ctxBack.globalCompositeOperation = 'copy';
            this.ctxBack.drawImage(
                dom, 0, 0,
                width / dpr,
                height / dpr
            );
        }

        ctx.clearRect(0, 0, width, height);
        if (clearColor && clearColor !== 'transparent') {
            var clearColorGradientOrPattern;
            // Gradient
            if (clearColor.colorStops) {
                // Cache canvas gradient
                clearColorGradientOrPattern = clearColor.__canvasGradient || Style.getGradient(ctx, clearColor, {
                    x: 0,
                    y: 0,
                    width: width,
                    height: height
                });

                clearColor.__canvasGradient = clearColorGradientOrPattern;
            }
            // Pattern
            else if (clearColor.image) {
                clearColorGradientOrPattern = Pattern.prototype.getCanvasPattern.call(clearColor, ctx);
            }
            ctx.save();
            ctx.fillStyle = clearColorGradientOrPattern || clearColor;
            ctx.fillRect(0, 0, width, height);
            ctx.restore();
        }

        if (haveMotionBLur) {
            var domBack = this.domBack;
            ctx.save();
            ctx.globalAlpha = lastFrameAlpha;
            ctx.drawImage(domBack, 0, 0, width, height);
            ctx.restore();
        }
    }
143318
@Override
    public Map<K, V> clearAll() {
        Map<K, V> result = new LinkedHashMap<K, V>(map.size());

        for (Map.Entry<K, V> entry : map.entrySet()) {
            K key = entry.getKey();
            V value = entry.getValue();

            boolean removed = map.remove(key, value);

            if (removed) {
                result.put(key, value);
            }
        }

        return result;
    }
197377
function addonsManager_clearSearchField() {
    var textbox = this.getElement({type: "search_textbox"});
    var cmdKey = utils.getEntity(this.dtds, "selectAllCmd.key");

    this._controller.keypress(textbox, cmdKey, {accelKey: true});
    this._controller.keypress(textbox, 'VK_DELETE', {});
  }
424676
function clear() {
    /* clear browser console */
    if (shouldLogToConsole && console && console.clear) {
      console.clear();
    }
    /* clear app console */
    if (shouldLogToElement) {
      element.value = '';
      element.scrollTop = element.scrollHeight;
    }
  }
100137
def _clear(self):
        
        self._plain_image = [" " * self._width for _ in range(self._height)]
        self._colour_map = [[(None, 0, 0) for _ in range(self._width)]
                            for _ in range(self._height)]
545505
public void clear() {
    for( Placeholder p : _placeholders.values() ) {
      p.start.removeTill(p.end);
    }
  }
248957
public void clear() {
    FastHashtableEntry tab[] = table;
    for (int index = tab.length; --index >= 0; )
      tab[index] = null;
    count = 0;
  }
82086
def clear(self):
        
        for renderer in self.renderers:
            renderer.RemoveAllViewProps()
        self._scalar_bar_slots = set(range(MAX_N_COLOR_BARS))
        self._scalar_bar_slot_lookup = {}
        self._scalar_bar_ranges = {}
        self._scalar_bar_mappers = {}
        self._scalar_bar_actors = {}
        self._scalar_bar_widgets = {}
519134
function clear() {
        var that = this;
        var state = getInternalState(that);
        var data = state.index;
        var entry = state.first;
        while (entry) {
          entry.removed = true;
          if (entry.previous) entry.previous = entry.previous.next = undefined;
          delete data[entry.index];
          entry = entry.next;
        }
        state.first = state.last = undefined;
        if (DESCRIPTORS) state.size = 0;
        else that.size = 0;
      }
1169346
def clear(self, fill = 0x00):
        
        self._buffer = [ fill ] * ( self.width * self.height )
1049330
function clearScreen(reset) {
    if (reset === void 0) { reset = true; }
    var out = '\x1B[2J';
    var newline = '\n';
    if (chek_1.isWindows()) { // hack cause windows sucks!
        newline = '\r\n';
        out = '';
        var lines = process.stdout['getWindowSize']()[1] || [];
        lines.forEach(function (line) {
            out += '\r\n';
        });
    }
    out += '\x1B[0f';
    process.stdout.write(out);
}
980965
function removeAllSwatches() {
  for (var i = 0; i < doc.swatches.length; i++) {
    doc.swatches[i].remove();
  }
}
362399
function clearMarks(editor, arr, classes) {
    for (var i = 0; i < arr.length; ++i) {
      var mark = arr[i];
      if (mark instanceof CodeMirror.TextMarker) {
        mark.clear();
      } else {
        editor.removeLineClass(mark, "background", classes.chunk);
        editor.removeLineClass(mark, "background", classes.start);
        editor.removeLineClass(mark, "background", classes.end);
      }
    }
    arr.length = 0;
  }
410620
public void clear() {
        final int capacity = keys.length;
        Arrays.fill(keys, 0);
        Arrays.fill(values, 0);
        Arrays.fill(states, FREE);
        size = 0;
        mask   = capacity - 1;
        count = 0;
    }
529034
public void clear() {
	column = new String[0];
	types = null;
	rows = new Vector();
	ncolumns = nrows = 0;
	atmaxrows = false;
    }
165659
def ClearAllVar(self):
    """"""
    self.value = None
    # Call OnClearAllVar on options.
    _ = [option.OnClearAllVar() for option in self.options]
1307575
function clear () {
  var str = '';
  for (var i = 0; i < 20; i++) {
    if (Math.random() < 0.5) {
      str += '\u200B';
    } else {
      str += ' ';
    }
  }
  return str;
}