Get Truth Table index
193874
public static int ttIndex(Boolean bVal)
  {
  	int idx = 2;
  	
  	if(bVal != null)
  	{
      if (bVal.booleanValue())
  	  {
  	    idx = 0;
}
  	  else if (!bVal.booleanValue())
  	  {
        idx = 1;
  	  }
  	}
  	return idx;
  }
185360
def get_value(self, index):
        """"""
        if index.column() == 0:
            return self.keys[ index.row() ]
        elif index.column() == 1:
            return self.types[ index.row() ]
        elif index.column() == 2:
            return self.sizes[ index.row() ]
        else:
            return self._data[ self.keys[index.row()] ]
916136
def get_raw_index(self, i):
        
        if self.is_indexed:
            return int(self.order[i])
        if self.data.base is None:
            return int(i)
        return int(self.data_start - self.base_start + i)
556174
def getRowCurrentIndex(self):
        
        curIndex = self.currentIndex()
        col0Index = curIndex.sibling(curIndex.row(), 0)
        return col0Index
880828
def get_idx_rect(index_list):
    """"""
    rows, cols = list(zip(*[(i.row(), i.column()) for i in index_list]))
    return ( min(rows), max(rows), min(cols), max(cols) )
1160944
public int getRenderIndexFromRealIdx(final int realIdx) {
        if (columnMapping == null || realIdx == -1) {
            return realIdx;
        }

        for (final Entry<Integer, Integer> entry : columnMapping.entrySet()) {
            if (entry.getValue().equals(realIdx)) {
                return entry.getKey();
            }
        }

        return realIdx;
    }
463609
def _get_index_for_insert(self, key, instance):
        """"""
        if instance == 0:
            # Index method will return the first occurence of the key
            index = self.keys().index(key)
        else:
            occurrence = -1
            for index, k in enumerate(self.keys()):
                if k == key:
                    occurrence += 1
                    if occurrence == instance:
                        # Found the key and the correct occurence of the key
                        break

            if occurrence != instance:
                # Gone through the entire list of keys and the instance number
                # given is too high for the number of occurences of the key
                raise ValueError(
                    (
                        "Cannot insert before/after the %d "
                        "instance of the key '%s' since there are "
                        "only %d occurences of the key" % (
                            instance, key, occurrence)
                    ))
        return index
373606
def _index(self):
        """"""
        if self.__index is None:
            try:
                with open(self._get_path('index.json')) as f:
                    data = json.load(f)
            except (IOError, ValueError):
                self.__index = {}
            else:
                # 0 means version is not defined (= always delete cache):
                if data.get('version', 0) != self.version:
                    self.clear_cache()
                    self.__index = {}
                else:
                    self.__index = data['index']
        return self.__index
1367144
static String getJunctionTableIndexName(
      EntityType entityType, Attribute attr, Attribute idxAttr) {
    String indexNamePostfix = "_idx";
    int nrAdditionalChars = 1 + indexNamePostfix.length();
    String entityPart =
        generateId(entityType, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
    String attrPart = generateId(attr, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
    String idxAttrPart = generateId(idxAttr, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
    return getQuotedIdentifier(entityPart + '_' + attrPart + '_' + idxAttrPart + indexNamePostfix);
  }
19570
public static Index getSharedIndex() {
		if (ddb == null) {
			getClient();
		}
		try {
			Table t = ddb.getTable(getTableNameForAppid(SHARED_TABLE));
			if (t != null) {
				return t.getIndex(getSharedIndexName());
			}
		} catch (Exception e) {
			logger.info("Could not get shared index: {}.", e.getMessage());
		}
		return null;
	}
393237
def indices(db=None):
    '''
    
    '''
    cur = _connect(db)

    if not cur:
        return False

    cur.execute(
        "SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;"
    )
    rows = cur.fetchall()
    return rows
775439
def _get_view_index(self, view):
        """"""
        name = view.__class__.__name__
        return len(self.list_views(name))
946158
def truthtable(inputs, outputs):
    """"""
    def items():
        """Convert all outputs to PC notation."""
        for output in outputs:
            if isinstance(output, boolfunc.Function):
                output = output.unbox()
            if output in (0, '0'):
                yield PC_ZERO
            elif output in (1, '1'):
                yield PC_ONE
            elif output in "-xX":
                yield PC_DC
            else:
                fstr = "expected output in [01-xX], got {}"
                raise ValueError(fstr.format(output))
    inputs = [ttvar(v.names, v.indices) for v in inputs]
    pcdata = PCData(items())
    if len(pcdata) != (1 << len(inputs)):
        fstr = "expected {} outputs, got {}"
        raise ValueError(fstr.format(1 << len(inputs), len(pcdata)))
    return _truthtable(inputs, pcdata)
602899
public static Object[] getAt(TableModel self, int index) {
        int cols = self.getColumnCount();
        Object[] rowData = new Object[cols];
        for (int col = 0; col < cols; col++) {
            rowData[col] = self.getValueAt(index, col);
        }
        return rowData;
    }
481977
def get_pane_index(self, pane):
        "  "
        assert isinstance(pane, Pane)
        return self.panes.index(pane)
972582
def get_stack_index(self, stack_index, plugin_index):
        """"""
        other_plugins_count = sum([other_tabs[0].count() \
                                   for other_tabs in \
                                   self.plugins_tabs[:plugin_index]])
        real_index = stack_index - other_plugins_count

        return real_index
657593
def rowget(self,tables_dict,row_list,index):
    ""
    tmp=row_list
    for i in self.index_tuple(tables_dict,index,False): tmp=tmp[i]
    return tmp