Changes the percentage of cells that are now considered dead. The first
    time you call this method a permutation list is set up. Calls change the
    number of cells considered dead.
761000
def killCells(self, percent=0.05):
    
    numColumns = numpy.prod(self.getColumnDimensions())

    if self.zombiePermutation is None:
      self.zombiePermutation = numpy.random.permutation(numColumns)

    self.numDead = int(round(percent * numColumns))

    if self.numDead > 0:
      self.deadCols = self.zombiePermutation[0:self.numDead]
    else:
      self.deadCols = numpy.array([])

    self.deadColumnInputSpan = self.getConnectedSpan(self.deadCols)
    self.removeDeadColumns()
755294
def __clear
      old_size = @array.size

      deps        = @array_deps
      @array_deps = []

      # Trigger remove for each cell
      old_size.times do |index|
        trigger_removed!(old_size - index - 1)
      end

      # Trigger on each cell since we are clearing out the array
      if deps
        deps.each do |dep|
          dep.changed! if dep
        end
      end

      # clear the array
      @array = []
    end
910969
private void update(List<LimitOrder> asks, LimitOrder limitOrder) {

    int idx = Collections.binarySearch(asks, limitOrder);
    if (idx >= 0) {
      asks.remove(idx);
      asks.add(idx, limitOrder);
    } else {
      asks.add(-idx - 1, limitOrder);
    }
  }
1056752
def OnTableChanged(self, event):
        """"""

        if hasattr(event, 'updated_cell'):
            # Event posted by cell edit widget.  Even more up to date
            #  than the current cell's contents
            self.ignore_changes = True
            try:
                self.SetValue(event.updated_cell)

            except TypeError:
                # None instead of string present
                pass
            self.ignore_changes = False

        else:
            current_cell = self.main_window.grid.actions.cursor
            current_cell_code = self.main_window.grid.code_array(current_cell)

            if current_cell_code is None:
                self.SetValue(u"")
            else:
                self.SetValue(current_cell_code)

        event.Skip()
1268618
function _handleSingleMutation(mutation) {
  var addedNodes = _toArray(mutation.addedNodes);
  var addedRefs = addedNodes.filter(_isRefNode);

  // assign added nodes
  addedRefs.map(_assignRef.bind(this));

  var removedNodes = _toArray(mutation.removedNodes);
  var removedRefs = removedNodes.filter(_isRefNode);

  // assign removed nodes
  removedRefs.map(_deleteRef.bind(this));
}
1138517
def set_dead(self):
        
        was_alive = self.alive
        self.alive = False
        self.reachable = False
        self.attempt = 0
        # We will have to create a new connection...
        self.con = None

        # We are dead now! We must propagate the sad news...
        if was_alive and not self.stopping:
            logger.warning("Setting the satellite %s as dead :(", self.name)
            self.broks.append(self.get_update_status_brok())
1020232
def disable_by_count(self):
        
        if self.enable_count > 0:
            self.enable_count -= 1
            if self.enable_count == 0:
                self.disable()
191865
public function change()
    {
        $table = $this->table('widgets');
        $table->changeColumn('trashed', 'datetime', [
            'default' => null,
            'null' => true,
        ]);
        $table->update();

        // Update existing records to set null for non-deleted ones
        // NOTE: cast to char is needed for the mysql 5.7*!
        $count = $this->execute('UPDATE widgets SET trashed=NULL WHERE CAST(trashed AS CHAR(20)) = "0000-00-00 00:00:00"');
    }
352443
private void updateLimits(List<S> solutionList) {
    for (int obj = 0; obj < numberOfObjectives; obj++) {
      gridLowerLimits[obj] = Double.MAX_VALUE;
      gridUpperLimits[obj] = Double.MIN_VALUE;
    }

    //Find the max and min limits of objetives into the population
    for (int ind = 0; ind < solutionList.size(); ind++) {
      Solution<?> tmpIndividual = solutionList.get(ind);
      for (int obj = 0; obj < numberOfObjectives; obj++) {
        if (tmpIndividual.getObjective(obj) < gridLowerLimits[obj]) {
          gridLowerLimits[obj] = tmpIndividual.getObjective(obj);
        }
        if (tmpIndividual.getObjective(obj) > gridUpperLimits[obj]) {
          gridUpperLimits[obj] = tmpIndividual.getObjective(obj);
        }
      }
    }
  }
792175
void setRecentInvalTable() {
        int tableSize = _smc.getInMemorySize();
        if (tableSize > 1)
            recentInvalidIds = new LRUHashMap(tableSize / 2);
        else
            _smc.setCheckRecentlyInvalidList(false);
    }
394167
def update_cell(self, row, col):
        
        # compute number of living neighbors
        neighbors = self.eight_neighbors(row, col)
        living_neighbors = 0
        for neighbor in neighbors:
            if not self.is_empty(neighbor[0], neighbor[1]):
                living_neighbors += 1
            
        # logic for Game of life        
        if (living_neighbors == 3) or (living_neighbors == 2 and not self.is_empty(row, col)):
            return mod_grid.FULL
        else:
            return mod_grid.EMPTY
966190
protected function adjustForExistingOnlyRange()
    {
        if ($this->onlyExistingCells) {
            while ((!$this->subject->cellExistsByColumnAndRow($this->columnIndex, $this->startRow)) &&
                ($this->startRow <= $this->endRow)) {
                ++$this->startRow;
            }
            if ($this->startRow > $this->endRow) {
                throw new PHPExcel_Exception('No cells exist within the specified range');
            }
            while ((!$this->subject->cellExistsByColumnAndRow($this->columnIndex, $this->endRow)) &&
                ($this->endRow >= $this->startRow)) {
                --$this->endRow;
            }
            if ($this->endRow < $this->startRow) {
                throw new PHPExcel_Exception('No cells exist within the specified range');
            }
        }
    }
273547
private void adjustOptionsColumn(
        CmsMessageBundleEditorTypes.EditMode oldMode,
        CmsMessageBundleEditorTypes.EditMode newMode) {

        if (m_model.isShowOptionsColumn(oldMode) != m_model.isShowOptionsColumn(newMode)) {
            m_table.removeGeneratedColumn(TableProperty.OPTIONS);
            if (m_model.isShowOptionsColumn(newMode)) {
                // Don't know why exactly setting the filter field invisible is necessary here,
                // it should be already set invisible - but apparently not setting it invisible again
                // will result in the field being visible.
                m_table.setFilterFieldVisible(TableProperty.OPTIONS, false);
                m_table.addGeneratedColumn(TableProperty.OPTIONS, m_optionsColumn);
            }
        }
    }
894831
private void editCell( Cell cell )
	{
		if( cell == null || cell == editedCell )
			return;
		
		T record = getRecordForRow( cell.getParentRow() );
		if( record == null )
			return;
		
		registerCurrentEdition( cell, record );
	}
279557
protected void updateFromSelection() {
    DBIDSelection sel = context.getSelection();
    if(sel != null) {
      this.dbids = DBIDUtil.newArray(sel.getSelectedIds());
      this.dbids.sort();
    }
    else {
      this.dbids = DBIDUtil.newArray();
    }
  }
974850
public void fillReleaseMutation(MutationBatch m, boolean excludeCurrentLock) {
        // Add the deletes to the end of the mutation
        ColumnListMutation<C> row = m.withRow(columnFamily, key);
        for (C c : locksToDelete) {
            row.deleteColumn(c);
        }
        if (!excludeCurrentLock && lockColumn != null) 
            row.deleteColumn(lockColumn);
        locksToDelete.clear();
        lockColumn = null;
    }
148898
def reset(self):
        """"""
        self._init_counter = -1
        self._counter = -1
        for cell in self._children.values():
            cell.reset()