Tells it to switch again to the current algorithm.  Useful if the input has changed and information
needs to be rendered again.
550262
public void refreshAlgorithm() {
		Object cookie = algCookies.get(algBox.getSelectedIndex());
		String name = (String)algBox.getSelectedItem();
		performSetAlgorithm(name, cookie);
	}
1085414
private void resetInternal() {
    mTransitionState = TRANSITION_NONE;
    Arrays.fill(mStartAlphas, mDefaultLayerAlpha);
    mStartAlphas[0] = 255;
    Arrays.fill(mAlphas, mDefaultLayerAlpha);
    mAlphas[0] = 255;
    Arrays.fill(mIsLayerOn, mDefaultLayerIsOn);
    mIsLayerOn[0] = true;
  }
54264
private synchronized void refreshFlow()
   {
      try
      {
         initialize();
      }
      catch (Exception e)
      {
         throw new IllegalStateException("Error while initializing wizard", e);
      }
      int currentFlowPointer = this.flowPointer;
      try
      {
         this.flowPointer = 0;
         while (canMoveToNextStep())
         {
            try
            {
               next().initialize();
            }
            catch (Exception e)
            {
               throw new IllegalStateException("Error while moving to the next wizard step", e);
            }
         }
         cleanSubsequentStalePages();
      }
      finally
      {
         this.flowPointer = currentFlowPointer;
      }
   }
753957
def setLastArgs(self, args):
        ''
        # only set if not already set (second input usually confirmation)
        if self.currentActiveRow is not None:
            if not self.currentActiveRow.input:
                self.currentActiveRow.input = args
725521
public void refreshCallback(ClientMapInfo info) {
		if (info != null) {
			// must be called before anything else !
			unitLength = info.getUnitLength();
			pixelLength = info.getPixelLength();
			graphics.setBackgroundColor(info.getBackgroundColor());
			featurePainter.setPointSelectStyle(new ShapeStyle(info.getPointSelectStyle()));
			featurePainter.setLineSelectStyle(new ShapeStyle(info.getLineSelectStyle()));
			featurePainter.setPolygonSelectStyle(new ShapeStyle(info.getPolygonSelectStyle()));
			if (graphics.isReady()) {
				setAddons();
			}

			for (final Layer<?> layer : mapModel.getLayers()) {
				layer.addLayerChangedHandler(new LayerChangedHandler() {

					public void onLabelChange(LayerLabeledEvent event) {
						render(layer, null, RenderStatus.ALL);
					}

					public void onVisibleChange(LayerShownEvent event) {
						render(layer, null, RenderStatus.ALL);
					}

				});

				layer.addLayerStyleChangedHandler(new LayerStyleChangedHandler() {

					public void onLayerStyleChange(LayerStyleChangeEvent event) {
						render(layer, null, RenderStatus.ALL);
					}
				});
			}
			for (final VectorLayer layer : mapModel.getVectorLayers()) {
				layer.addLayerFilteredHandler(new LayerFilteredHandler() {

					public void onFilterChange(LayerFilteredEvent event) {
						render(layer, null, RenderStatus.ALL);
					}
				});
			}
		}
	}
1255315
def setCurrentIndex(self, index):
        
        if self._currentIndex == index:
            return

        self._currentIndex = index
        self.currentIndexChanged.emit(index)

        for i, item in enumerate(self.items()):
            item.setMenuEnabled(i == index)
        self.repaint()
1167720
def change_t(self, t):
        '''
        
        '''
        t = super().change_t(t)
        self.__now_cycles += 1
        if self.__now_cycles % self.__reannealing_per == 0:
            t = t * self.__thermostat
            
            if t < self.__t_min:
                t = self.__t_default
        return t
593852
void switchTwoRows(int rowIndex, int rowToIndex) {
        checkForInit();
        int cellData = mRowHeights[rowToIndex];
        mRowHeights[rowToIndex] = mRowHeights[rowIndex];
        mRowHeights[rowIndex] = cellData;
    }
1290822
def switch(self, payload):
        """"""
        first = payload['first']
        second = payload['second']
        running = self.process_handler.is_running(first) or self.process_handler.is_running(second)
        if running:
            answer = {
                'message': "Can't switch running processes, "
                "please stop the processes before switching them.",
                'status': 'error'
            }

        else:
            switched = self.queue.switch(first, second)
            if switched:
                answer = {
                    'message': 'Entries #{} and #{} switched'.format(first, second),
                    'status': 'success'
                }
            else:
                answer = {'message': "One or both entries do not exist or are not queued/stashed.",
                          'status': 'error'}
        return answer
592348
private void switchToForward() {
        assert((checkDir < 0 && seq == rawSeq) || (checkDir == 0 && pos == limit));
        if(checkDir < 0) {
            // Turn around from backward checking.
            start = segmentStart = pos;
            if(pos == segmentLimit) {
                limit = rawLimit;
                checkDir = 1;  // Check forward.
            } else {  // pos < segmentLimit
                checkDir = 0;  // Stay in FCD segment.
            }
        } else {
            // Reached the end of the FCD segment.
            if(seq == rawSeq) {
                // The input text segment is FCD, extend it forward.
            } else {
                // The input text segment needed to be normalized.
                // Switch to checking forward from it.
                seq = rawSeq;
                pos = start = segmentStart = segmentLimit;
                // Note: If this segment is at the end of the input text,
                // then it might help to return false to indicate that, so that
                // we do not have to re-check and normalize when we turn around and go backwards.
                // However, that would complicate the call sites for an optimization of an unusual case.
            }
            limit = rawLimit;
            checkDir = 1;
        }
    }
670732
public void valueChanged(ListSelectionEvent lse) {
        if (!lse.getValueIsAdjusting()) {
            removeListSelectionListener(this);

            // remember everything selected as a result of this action
            HashSet<Integer> newSelections = new HashSet<>();
            int size = getModel().getSize();
            for (int i = 0; i < size; i++) {
                if (getSelectionModel().isSelectedIndex(i)) {
                    newSelections.add(i);
                }
            }

            // turn on everything that was previously selected
            Iterator<Integer> it = selectionCache.iterator();
            while (it.hasNext()) {
                int index = it.next();
                getSelectionModel().addSelectionInterval(index, index);
            }

            // add or remove the delta
            it = newSelections.iterator();
            while (it.hasNext()) {
                Integer nextInt = it.next();
                int index = nextInt;
                if (selectionCache.contains(nextInt)) {
                    getSelectionModel().removeSelectionInterval(index, index);
                } else {
                    getSelectionModel().addSelectionInterval(index, index);
                }
            }

            // save selections for next time
            selectionCache.clear();
            for (int i = 0; i < size; i++) {
                if (getSelectionModel().isSelectedIndex(i)) {
                    selectionCache.add(i);
                }
            }

            addListSelectionListener(this);

        }
    }
930609
def reset(self):
        
        [a().remove_observer(self, self.on_cache_changed) if (a() is not None) else None for [a, _] in self.cached_input_ids.values()]

        self.order = collections.deque()
        self.cached_inputs = {}  # point from cache_ids to a list of [ind_ids], which where used in cache cache_id

        #=======================================================================
        # point from each ind_id to [ref(obj), cache_ids]
        # 0: a weak reference to the object itself
        # 1: the cache_ids in which this ind_id is used (len will be how many times we have seen this ind_id)
        self.cached_input_ids = {}
        #=======================================================================

        self.cached_outputs = {}  # point from cache_ids to outputs
        self.inputs_changed = {}
341022
public void prevStep() {
        if (currentStepIndex > 0) {
            Widget w = getWidget(currentStepIndex);
            if (w instanceof MaterialStep) {
                MaterialStep step = (MaterialStep) w;
                step.setActive(false);

                // prev step
                int prevStepIndex = getWidgetIndex(step) - 1;
                if (prevStepIndex >= 0) {
                    for (int i = prevStepIndex; i >= 0; i--) {
                        w = getWidget(i);
                        if (!(w instanceof MaterialStep)) {
                            continue;
                        }
                        MaterialStep prevStep = (MaterialStep) w;
                        if (prevStep.isEnabled() && prevStep.isVisible()) {
                            prevStep.setActive(true);
                            setCurrentStepIndex(i);
                            PreviousEvent.fire(MaterialStepper.this);
                            break;
                        }
                    }
                }
            }
        } else {
            GWT.log("You have reached the minimum step.");
        }
    }
736056
def reset(self, mode=InputMode.INSERT):
        
        # Go back to insert mode.
        self.input_mode = mode

        self.waiting_for_digraph = False
        self.operator_func = None
        self.operator_arg = None
490833
function ( direction ) {
			var current = F.current;

			if (current) {
				if (!isString(direction)) {
					direction = current.direction.next;
				}

				F.jumpto(current.index + 1, direction, 'next');
			}
		}
391652
def switch(self, first, second):
        """"""
        allowed_states = ['queued', 'stashed']
        if first in self.queue and second in self.queue \
                and self.queue[first]['status'] in allowed_states\
                and self.queue[second]['status'] in allowed_states:

            tmp = self.queue[second].copy()
            self.queue[second] = self.queue[first].copy()
            self.queue[first] = tmp
            self.write()
            return True
        return False
386568
private Environment switchEnvironment(Environment env) {
    Environment prev = currentEnvironment;
    currentEnvironment = env;
    return prev;
  }