Reset all instance variables to their original state. This method might be useful in cases where a new camera is available, and the application needs to force the plugin to chooseCameras() again.
6070
function destroy(success, error){
    error = null; // should never error
    cancelScan();
    if(mediaStreamIsActive()){
      killActiveMediaStream();
    }
    backCamera = null;
    frontCamera = null;
    var preview = getVideoPreview();
    var still = getImg();
    if(preview){
      preview.remove();
    }
    if(still){
      still.remove();
    }
    success(calcStatus());
  }
1090798
private void reset() {
    elements.clear();
    for(ImageElement e : elementsToTrack) 
      elements.put(e, null);
    
  }
  
  @Override
  void leaveEnclosingElement() throws IOException {
    ImageElement elem = elemQ.pop();
    // If we're done with a block, write out our results and start over
    if (elem == ImageElement.BLOCK) {
      writeLine();
      reset();
    } else if (elem == ImageElement.INODE) {
      super.rollIfNeeded();
    }
  }

  /**
   * Iterate through all the elements we're tracking and, if a value was
   * recorded for it, write it out.
   */
  private void writeLine() throws IOException {
    Iterator<ImageElement> it = elementsToTrack.iterator();
    
    while(it.hasNext()) {
      ImageElement e = it.next();
      String v = elements.get(e);
      if(v != null)
        write(v);
      else 
        write(defaultValue);
      if(it.hasNext())
        write(delimiter);
    }
    write("\n");
  }

  @Override
  void visit(ImageElement element, String value) throws IOException {
    if(elements.containsKey(element))
      elements.put(element, value);
    if (element.equals(ImageElement.GENERATION_STAMP)
        && (elemQ.element() == null ||
            !elemQ.element().equals(ImageElement.BLOCK))) {
      // Write fake block with current namenode generation stamp
      writeLine();
    }
  }

  @Override
  void visitEnclosingElement(ImageElement element) throws IOException {
    elemQ.push(element);
  }

  @Override
  void visitEnclosingElement(ImageElement element, ImageElement key,
      String value) throws IOException {
    elemQ.push(element);
  }
  
  @Override
  void start() throws IOException { /* Nothing to do */ }
}
758624
def reset(cls):
        
        cls.hide()

        cls.values = None
        cls.filename = "fn"
        cls.dc_out_el.text = ""
        cls.oai_out_el.text = ""
        cls.mrc_out_el.text = ""
178898
public function reset()
  {
      $this->values[self::URL] = null;
      $this->values[self::MIMETYPE] = null;
      $this->values[self::CAPTION] = null;
      $this->values[self::SHA256] = null;
      $this->values[self::LENGTH] = null;
      $this->values[self::HEIGHT] = null;
      $this->values[self::WIDTH] = null;
      $this->values[self::REFKEY] = null;
      $this->values[self::KEY] = null;
      $this->values[self::IV] = null;
      $this->values[self::THUMBNAIL] = null;
  }
969796
public function resetDefault()
    {
        if ($record = $this->getSettingsRecord()) {
            $record->delete();
            unset(self::$instances[$this->recordCode]);
            Cache::forget($this->getCacheKey());
        }
    }
452438
function (x, y) {
            // reset the initial camera position to 0,0
            this.pos.x = x || 0;
            this.pos.y = y || 0;

            // reset the target
            this.unfollow();

            // damping default value
            this.smoothFollow = true;
            this.damping = 1.0;

            // reset the transformation matrix
            this.currentTransform.identity();
        }
1073761
public void reset() {
        iZone = iDefaultZone;
        iOffset = null;
        iPivotYear = iDefaultPivotYear;
        iSavedFieldsCount = 0;
        iSavedFieldsShared = false;
        iSavedState = null;
    }
917799
def reset!
      self.base_url = nil
      self.secure_base_url = nil
      self.backdrop_sizes = []
      self.logo_sizes = []
      self.logo_sizes = []
      self.poster_sizes = []
      self.profile_sizes = []
      self.still_sizes = []
      self.include_image_language = "en"
      self
    end
8092
function Reset () {
  log.info('Reseting environment...')
  for (let m in motionDetectors) {
    RemoveDetector(motionDetectors[m])
  }
  for (let n in em.GetNotifiers()) {
    RemoveNotifier(em.GetNotifiers()[n], true)
  }
  em.SetNotifiers([])
  if (em.GetEnvironment()) {
    em.GetEnvironment().removeAllListeners('changedState')
    em.GetEnvironment().exit()
    em.SetEnvironment(undefined)
  }
  motionDetectors = []
  Object.keys(pm.GetPlugins()).forEach(function (key) {
    let p = pm.GetPlugins()[key]
    console.log(`  Attempting to reset plugin ${p.id} with key ${key}...`)
    if (p.Reset) {
      p.Reset()
      log.info('ok.')
    }
  })
  pm.ResetPlugins()
  config = {}
  log.info('Done Reseting environment.')
}
500194
def _reset(self):
        
        log.debug("Reset all variables")

        self._attachments = []
        self._text_plain = []
        self._text_html = []
        self._defects = []
        self._defects_categories = set()
        self._has_defects = False
540176
public void reset() {
		Double[] init = null;
		if(resetIndex>-1) init = Arrays.copyOfRange(insertSeq.toArray(new Double[resetIndex+1]), 0, resetIndex);
		insertSeq.clear();
		insertStat.clear();
		observationCount = 0.0;
		average = 0.0;
		minimum = Double.MAX_VALUE;
		maximum = Double.MIN_VALUE;
		expectation = null;
		moments.clear();
		if(init != null)
			for(Double value: init) {
				addValue(value);
			}
	}
236451
def reset(self):
        """"""
        self.filename = None
        self.dataset = None

        # about the recordings
        self.idx_filename.setText('Open Recordings...')
        self.idx_s_freq.setText('')
        self.idx_n_chan.setText('')
        self.idx_start_time.setText('')
        self.idx_end_time.setText('')

        # about the visualization
        self.idx_scaling.setText('')
        self.idx_distance.setText('')
        self.idx_length.setText('')
        self.idx_start.setText('')
942207
def reset
      RR.trim_backtrace = false
      RR.overridden_error_class = nil
      reset_ordered_doubles
      Injections::DoubleInjection.reset
      reset_method_missing_injections
      reset_singleton_method_added_injections
      reset_recorded_calls
      reset_bound_objects
    end
837225
function reset()
    {
        $this->resetVariables();
        $this->resetElements();
        $this->IsCachingAllowed = true;

        $this->resetErrorLog();

        $this->TemplatesUsageStatistics = array();
        $this->TemplateFetchList = array();
    }
945185
public void reset() {
		featsLeft0.reset();
		featsLeft1.reset();
		featsRight0.reset();
		featsRight1.reset();
		for( SetMatches m : setMatches )
			m.reset();
		newToOld.reset();
		leftCamToWorld.reset();
		first = true;
	}
720424
private function resetVars()
    {
        $this->response = $this->calls = [];
        $this->hasCalls = $this->isBatchCall = false;
    }
901407
def _reset(self, **kwargs):
        
        # set object attributes from params
        for key in kwargs:
            setattr(self, key, kwargs[key])

        # set defaults (if need be) where the default is not None
        for attr in self.ATTRIBUTES:
            if not hasattr(self, attr) and self.ATTRIBUTES[attr] is not None:
                setattr(self, attr, self.ATTRIBUTES[attr])