Renumber the violation row number from a list of actual row numbers The list of indices is
0-indexed and the rownnr are 1-indexed
519681
public void renumberRowIndex(List<Integer> indices) {
    this.rowNr = this.rowNr != null ? Long.valueOf(indices.get(toIntExact(this.rowNr - 1))) : null;
  }
45190
int getRealIndex(int index) throws HpackException {
        //the index is one based, but our table is zero based, hence -1
        //also because of our ring buffer setup the indexes are reversed
        //index = 1 is at position firstSlotPosition + filledSlots
        int newIndex = (firstSlotPosition + (filledTableSlots - index)) % headerTable.length;
        if(newIndex < 0) {
            throw UndertowMessages.MESSAGES.invalidHpackIndex(index);
        }
        return newIndex;
    }
353480
def rowcount(self):
        
        if (self._closed or not self._result or "rows" not in self._result):
            return -1
        return self._result.get("rowcount", -1)
272757
@Override
  public IndexedInts getRow()
  {
    final IndexedInts row = selector.getRow();

    if (row.size() == 1) {
      if (nullAdjustment == 0) {
        return row;
      } else {
        nullAdjustedRow.setValue(row.get(0) + nullAdjustment);
        return nullAdjustedRow;
      }
    } else {
      // Can't handle non-singly-valued rows in expressions.
      // Treat them as nulls until we think of something better to do.
      return ZeroIndexedInts.instance();
    }
  }
964233
def trim_empty_rows(self):
    """"""
    if self.nrows != 0:
      row_index = 0
      for row_index, row in enumerate(reversed(self.rows)):
        if not self.is_row_empty(row):
          break
      self.nrows = len(self.rows) - row_index
      self.rows = self.rows[:self.nrows]
    return self
556010
def process_nbcrow(self):
        
        self.log_response_message("got NBCROW message")
        r = self._reader
        info = self.res_info
        if not info:
            self.bad_stream('got row without info')
        assert len(info.columns) > 0
        info.row_count += 1

        # reading bitarray for nulls, 1 represent null values for
        # corresponding fields
        nbc = readall(r, (len(info.columns) + 7) // 8)
        for i, curcol in enumerate(info.columns):
            if tds_base.my_ord(nbc[i // 8]) & (1 << (i % 8)):
                value = None
            else:
                value = curcol.serializer.read(r)
            self.row[i] = value
551837
private int readCorner1(int numRows, int numColumns) {
    int currentByte = 0;
    if (readModule(numRows - 1, 0, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(numRows - 1, 1, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(numRows - 1, 2, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(0, numColumns - 2, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(0, numColumns - 1, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(1, numColumns - 1, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(2, numColumns - 1, numRows, numColumns)) {
      currentByte |= 1;
    }
    currentByte <<= 1;
    if (readModule(3, numColumns - 1, numRows, numColumns)) {
      currentByte |= 1;
    }
    return currentByte;
  }
556174
def getRowCurrentIndex(self):
        
        curIndex = self.currentIndex()
        col0Index = curIndex.sibling(curIndex.row(), 0)
        return col0Index
912602
def row_content_length(row):
    '''
    
    '''
    if not row:
        return 0
    try:
        return (index + 1 for index, cell in reversed(list(enumerate(row))) if not is_empty_cell(cell)).next()
    except StopIteration:
        return len(row)
109502
def get_index_line(self,lnum):
    
    if lnum < 1:
      sys.stderr.write("ERROR: line number should be greater than zero\n")
      sys.exit()
    elif lnum > len(self._lines):
      sys.stderr.write("ERROR: too far this line nuber is not in index\n")
      sys.exit()
    return self._lines[lnum-1]
98794
def index(self, value, start=None, stop=None):
        
        if start is None:
            start = 0
        if stop is None:
            stop = len(self._col_list)
        return self._col_list.index(value, start, stop)
1318787
private void checkIndices(int row, int col) {
        if (row < 0 || row >= rows)
            throw new ArrayIndexOutOfBoundsException("row: " + row);
        else if (col < 0 || col >= cols)
            throw new ArrayIndexOutOfBoundsException("column: " + col);
    }
58151
int getIndex(int row, int column) {
        check(row, column);
        return ku + row - column + column * (kl + ku + 1);
    }
680417
public void setRow(RowVector rv, int r) throws MatrixException
    {
        if ((r < 0) || (r >= nRows)) {
            throw new MatrixException(MatrixException.INVALID_INDEX);
        }
        if (nCols != rv.nCols) {
            throw new MatrixException(
                                MatrixException.INVALID_DIMENSIONS);
        }

        for (int c = 0; c < nCols; ++c) {
            this.values[r][c] = rv.values[0][c];
        }
    }
508465
@Override
    public FloatMatrix repelem(final int rowRepeats, final int colRepeats) {
        N.checkArgument(rowRepeats > 0 && colRepeats > 0, "rowRepeats=%s and colRepeats=%s must be bigger than 0", rowRepeats, colRepeats);

        final float[][] c = new float[rows * rowRepeats][cols * colRepeats];

        for (int i = 0; i < rows; i++) {
            final float[] fr = c[i * rowRepeats];

            for (int j = 0; j < cols; j++) {
                N.copy(Array.repeat(a[i][j], colRepeats), 0, fr, j * colRepeats, colRepeats);
            }

            for (int k = 1; k < rowRepeats; k++) {
                N.copy(fr, 0, c[i * rowRepeats + k], 0, fr.length);
            }
        }

        return new FloatMatrix(c);
    }
398193
public int nz_index( int row , int col ) {
        int col0 = col_idx[col];
        int col1 = col_idx[col+1];

        for (int i = col0; i < col1; i++) {
            if( nz_rows[i] == row ) {
                return i;
            }
        }
        return -1;
    }
1363428
def last(self, rows: List[Row]) -> List[Row]:
        
        if not rows:
            logger.warning("Trying to get last row from an empty list")
            return []
        return [rows[-1]]