Returns the position of the specified field.
962386
public int fieldIndex(String field) {
    Integer ret = mIndex.get(field);
    if (ret == null) {
      throw new IllegalArgumentException(field + " does not exist");
    }
    return ret;
  }
994316
public String getValue(final String field)
    {
        FieldValue fieldValue = Iterables.find
        (
            fieldValues,
            new Predicate<FieldValue>()
            {
                @Override
                public boolean apply(FieldValue fv)
                {
                    return fv.getField().equals(field);
                }
            },
            null
        );
        return (fieldValue != null) ? fieldValue.getValue() : null;
    }
27268
public int getPosition(Item item) {
        if (item.getIdentifier() == -1) {
            Log.e("FastAdapter", "You have to define an identifier for your item to retrieve the position via this method");
            return -1;
        }
        return getPosition(item.getIdentifier());
    }
1047115
def flag_field(self, move_x, move_y):
        """"""
        field_status = self.info_map[move_y, move_x]

        # a questioned or undiscovered field
        if field_status != 9 and (field_status == 10 or field_status == 11):
            self.info_map[move_y, move_x] = 9
1372955
def get_position(self, subject):
        """"""
        cursor = self.textCursor()
        if subject == 'cursor':
            pass
        elif subject == 'sol':
            cursor.movePosition(QTextCursor.StartOfBlock)
        elif subject == 'eol':
            cursor.movePosition(QTextCursor.EndOfBlock)
        elif subject == 'eof':
            cursor.movePosition(QTextCursor.End)
        elif subject == 'sof':
            cursor.movePosition(QTextCursor.Start)
        else:
            # Assuming that input argument was already a position
            return subject
        return cursor.position()
387099
public int positionFor(int line, int column) {
        if (lines.size() < line)
            return -1;

        return lines.get(line - 1) + column - 1;
    }
887061
public static int getLineAtPosition( JTextComponent editor, int position )
  {
    if( position <= 0 )
    {
      return 1;
    }

    String s = editor.getText();
    if( position > s.length() )
    {
      position = s.length();
    }

    try
    {
      return GosuStringUtil.countMatches( editor.getText( 0, position ), "\n" ) + 1;
    }
    catch( BadLocationException e )
    {
      throw new RuntimeException( e );
    }
  }
553673
private long getCurrentPosition() {
        long pos;
        if (!useLoadBuf) {
            return in.position();
        }
        try {
            if (in != null) {
                pos = (channel.position() - in.remaining());
            } else {
                pos = channel.position();
            }
            return pos;
        } catch (Exception e) {
            log.error("Error getCurrentPosition", e);
            return 0;
        }
    }
694
def map_position(pos):
    """"""

    posiction_dict = dict(zip(range(1, 17), [i for i in range(30, 62) if i % 2]))
    return posiction_dict[pos]
98524
@Nonnull
  public Query orderBy(@Nonnull String field) {
    return orderBy(FieldPath.fromDotSeparatedString(field), Direction.ASCENDING);
  }
446758
public String getPrefixStatsSetPositionPrefixAttribute(String field) {
    return String.join(MtasToken.DELIMITER, setPositionPrefix.get(field));
  }
1159514
public function getFilePositionLink($field = null, $position = 0)
    {
        $list = array_values($this->getFileList($field));
        return isset($list[$position])
            ? $this->getFileLink($field, $list[$position])
            : null;
    }
342482
def current_position(self):
        """"""
        token = self.tokenizer.peek(0)
        if token:
            return token.start, token.end

        return self.tokenizer.position, self.tokenizer.position + 1
692951
@SuppressWarnings("unchecked")
	public <T> T getOne(String field) {
		return (T) get(field).get(field);
	}
319533
public Object getFieldValue(final String field) {
        
        final FieldError error = getFirstFieldError(field).orElse(null);
        if(error != null && !error.isConversionFailure()) {
            return error.getRejectedValue();
        } else {
            return getFieldActualValue(field);
        }
        
    }
1032974
def get_position(self):
        ''' '''
        reply = self._intf.query('ReadChuckPosition Y H')[2:]
        return [float(i) for i in reply.split()]
459505
def x(self, position=None):
        """"""
        p = self.GetPosition()
        if position is None:
            return p[0]
        self.SetPosition(position, p[1], p[2])
        if self.trail:
            self.updateTrail()
        return self