Returns the index of column 0 of the current item in the underlying model.
            See also the notes at the top of this module on current item vs selected item(s).
556174
def getRowCurrentIndex(self):
        
        curIndex = self.currentIndex()
        col0Index = curIndex.sibling(curIndex.row(), 0)
        return col0Index
60606
public int getIndex(T value) {
        int count = getItemCount();
        for (int i = 0; i < count; i++) {
            if (Objects.equals(getValue(i), value)) {
                return i;
            }
        }
        return -1;
    }
819723
def columnCount(self, index=QModelIndex()):
        """"""
        if self.axis == 0:
            if self.total_cols <= self.cols_loaded:
                return self.total_cols
            else:
                return self.cols_loaded
        else:
            return max(1, self._shape[1])
205663
private int itemToIndex(I i) {
		Integer r = allItems.absoluteIndexOf(i);
		return r == null ? -1 : r.intValue();
	}
1082333
def rowCount(self, parent):
        

        if parent.column() > 0:
            return 0

        if not parent.isValid():
            parentItem = self.root
        else:
            parentItem = parent.internalPointer()

        return parentItem.childCount()
836403
def _selectItem(self, index):
        
        self._selectedIndex = index
        self.setCurrentIndex(self.model().createIndex(index, 0))
631935
def index(self, item):
        
        for i, x in enumerate(self.iter()):
            if x == item:
                return i
        return None
1139150
def index_of_item(self, item):
        
        # root has an invalid index
        if item == self._root:
            return QtCore.QModelIndex()
        # find all parents to get their index
        parents = [item]
        i = item
        while True:
            parent = i.parent()
            # break if parent is root because we got all parents we need
            if parent == self._root:
                break
            if parent is None:
                # No new parent but last parent wasn't root!
                # This means that the item was not in the model!
                return QtCore.QModelIndex()
            # a new parent was found and we are still not at root
            # search further until we get to root
            i = parent
            parents.append(parent)

        # get the parent indexes until
        index = QtCore.QModelIndex()
        for treeitem in reversed(parents):
            parent = treeitem.parent()
            row = parent.childItems.index(treeitem)
            index = self.index(row, 0, index)
        return index
1000540
function getIndexOfColumn(tableStructure, column) {
  for (var i = 0; i < tableStructure.columns.length; i++) {
    if (tableStructure.columns[i] === column) {
      return i;
    }
  }
}
273246
def get_column_at_index(self, index):
        
        if index is None:
            return None

        url = self.build_url(self._endpoints.get('get_column_index'))
        response = self.session.post(url, data={'index': index})

        if not response:
            return None

        return self.column_constructor(parent=self, **{self._cloud_data_key: response.json()})
354483
def _index(self, item):
        ''''''
        index = bisect.bisect_left(self._members, item)
        if index != len(self) and self._members[index] == item:
            return index

        return -1
712567
def columns(self):
        
        return Index(np.array(self._gather_column_names(), dtype=np.bytes_), np.dtype(np.bytes_))
621698
public int columnIndex(Column<?> column) {
        int columnIndex = -1;
        for (int i = 0; i < columnList.size(); i++) {
            if (columnList.get(i).equals(column)) {
                columnIndex = i;
                break;
            }
        }
        if (columnIndex == -1) {
            throw new IllegalArgumentException(
                    String.format("Column %s is not present in table %s", column.name(), name));
        }
        return columnIndex;
    }
1013490
def index data
      current = @first
      i = 0
      while !current.nil?
        return i if current.data == data
        current = current.next
        i += 1
      end
      nil
    end
911140
def indexXY(self, index):
        
        # just want the top left of row selected
        row = index.row()
        if row == -1:
            row = self.model().rowCount()
        y = self.rowHeight(0)*row
        return 0, y
465160
def currentSchema( self ):
        
        index = self.currentIndex()
        if ( 0 <= index and index < len(self._schemas) ):
            return self._schemas[index]
        return None
546991
def current_item(self):
        """"""
        if self._history and self._index >= 0:
            self._check_index()
            return self._history[self._index]