update the number of rows when the table change
325805
@Override
	public void tableChanged(TableModelEvent e) {
		int rows = ((TableModel) e.getSource()).getRowCount();
		updateStatus(rows);
	}
962527
def update_changes_after_row_delete(self, row_num):
        
        if row_num in self.changes.copy():
            self.changes.remove(row_num)
        updated_rows = []
        for changed_row in self.changes:
            if changed_row == -1:
                updated_rows.append(-1)
            if changed_row > row_num:
                updated_rows.append(changed_row - 1)
            if changed_row < row_num:
                updated_rows.append(changed_row)
        self.changes = set(updated_rows)
1221613
public function change()
    {
        $tableName = 'language_translations';
        if (!$this->hasTable($tableName)) {
            $tableName = 'translations';
        }

        $table = $this->table($tableName);
        if (!$table->hasColumn('is_active')) {
            $table->addColumn('is_active', 'boolean', [
                'default' => 0,
                'null' => false,
            ]);
        }
        $table->update();
    }
701399
public function change()
    {
        $table = $this->table('calendar_events');
        $hasSource = $table->hasColumn('event_source');
        $hasSourceId = $table->hasColumn('event_source_id');

        if ($hasSource) {
            $table->renameColumn('event_source', 'source');
        }

        if ($hasSourceId) {
            $table->renameColumn('event_source_id', 'source_id');
        }
    }
890689
void updateCount() {
		if (this.hasChanged) {
			this.countArray = ArrayUtils.toPrimitive(getCountList().toArray(
					new Long[0]));
			this.hasChanged = false;
		}
	}
611280
def update(self,record,**kw):
        """"""
        vals = self._make_sql_params(kw)
        sql = "UPDATE %s SET %s WHERE rowid=?" %(self.name,
            ",".join(vals))
        self.cursor.execute(sql,kw.values()+[record['__id__']])
1333044
function _updateRowspan(tableData, startRowIndex, endRowIndex) {
  util.range(startRowIndex, endRowIndex + 1).forEach(rowIndex => {
    tableData[rowIndex].forEach((cell, cellIndex) => {
      if (util.isExisty(cell.rowMergeWith)) {
        const merger = tableData[cell.rowMergeWith][cellIndex];

        if (merger.rowspan) {
          merger.rowspan -= 1;
        }
      } else if (cell.rowspan > 1) {
        const lastMergedRowIndex = rowIndex + cell.rowspan - 1;

        cell.rowspan -= (endRowIndex - rowIndex + 1);

        if (lastMergedRowIndex > endRowIndex) {
          tableData[endRowIndex + 1][cellIndex] = util.extend({}, cell);
        }
      }
    });
  });
}
213664
protected void updateTables()
   {
      byte[] data = m_model.getData();
      int columns = m_model.getColumns();
      int rows = (data.length / columns) + 1;
      int offset = m_model.getOffset();

      String[][] hexData = new String[rows][columns];
      String[][] asciiData = new String[rows][columns];

      int row = 0;
      int column = 0;
      StringBuilder hexValue = new StringBuilder();
      for (int index = offset; index < data.length; index++)
      {
         int value = data[index];
         hexValue.setLength(0);
         hexValue.append(HEX_DIGITS[(value & 0xF0) >> 4]);
         hexValue.append(HEX_DIGITS[value & 0x0F]);

         char c = (char) value;
         if ((c > 200) || (c < 27))
         {
            c = ' ';
         }

         hexData[row][column] = hexValue.toString();
         asciiData[row][column] = Character.toString(c);

         ++column;
         if (column == columns)
         {
            column = 0;
            ++row;
         }
      }

      String[] columnHeadings = new String[columns];
      TableModel hexTableModel = new DefaultTableModel(hexData, columnHeadings)
      {
         @Override public boolean isCellEditable(int r, int c)
         {
            return false;
         }
      };

      TableModel asciiTableModel = new DefaultTableModel(asciiData, columnHeadings)
      {
         @Override public boolean isCellEditable(int r, int c)
         {
            return false;
         }
      };

      m_model.setSizeValueLabel(Integer.toString(data.length));
      m_model.setHexTableModel(hexTableModel);
      m_model.setAsciiTableModel(asciiTableModel);
      m_model.setCurrentSelectionIndex(0);
      m_model.setPreviousSelectionIndex(0);
   }
127840
function updateDataTable() {
      var self = this;

      // Remove all data from the datatable.
      self.dataTable.removeRows(0, self.dataTable.getNumberOfRows());
      self.dataTable.removeColumns(0, self.dataTable.getNumberOfColumns());

      // Add
      _.each(self.columns, function (value) {
        self.dataTable.addColumn(value);
      });

      if (!_.isEmpty(self.rows)) {
        self.dataTable.addRows(self.rows);
      }
    }
1159148
function syncTableData () {

    var tableData = getTableData();

    for ( var i = 1, row; row = editorTable.rows[ i ]; i++ ) {

        for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {

            cell.innerHTML = tableData[ i ] [ j ];

        }

    }

}
495088
def update_table_row(self, table, row_idx):
        
        try:
            table[row_idx]['timestamp'] = self.timestamp
            table[row_idx]['status'] = self.status
        except IndexError:
            print("Index error", len(table), row_idx)
681965
def __update(self, row):
        
        expr = self.__table.update().values(row)
        for key in self.__update_keys:
            expr = expr.where(getattr(self.__table.c, key) == row[key])
        if self.__autoincrement:
            expr = expr.returning(getattr(self.__table.c, self.__autoincrement))
        res = expr.execute()
        if res.rowcount > 0:
            if self.__autoincrement:
                first = next(iter(res))
                last_row_id = first[0]
                return last_row_id
            return 0
        return None
1331057
function updateColsCount()
	{
		$this->_colsCount = sizeof($this->flds);
		foreach($this->_belongsTo as $foreignTable)
			$this->_colsCount += sizeof($foreignTable->TableInfo()->flds);
		foreach($this->_hasMany as $foreignTable)
			$this->_colsCount += sizeof($foreignTable->TableInfo()->flds);
	}
436408
def count_rows(self, table, cols='*'):
        """"""
        query = 'SELECT COUNT({0}) FROM {1}'.format(join_cols(cols), wrap(table))
        result = self.fetch(query)
        return result if result is not None else 0
703121
def OnTableChanged(self, event):
        """"""

        if hasattr(event, 'table'):
            self.Select(event.table)
            self.EnsureVisible(event.table)

        event.Skip()
540498
function setTableSelection(table, rowData) {
      if (table.isPanel) {
        table = table.getView();
      }
      var model = this.findRecord(table.getStore(), rowData);

      table.setSelection(model);
    }
572398
def update(table, values, where=(), **kwargs):
    """"""
    where = dict(where, **kwargs).items()
    sql, args = makeSQL("UPDATE", table, values=values, where=where)
    return execute(sql, args).rowcount