Moves the selection to the given offset.
963814
public void select(int pos) {
        if (pos >= 0) {
            try {
                int line = getLineOfOffset(pos);
                Rectangle rect = modelToView(pos);
                if (rect == null) {
                    select(pos, pos);
                } else {
                    try {
                        Rectangle nrect =
                            modelToView(getLineStartOffset(line + 1));
                        if (nrect != null) {
                            rect = nrect;
                        }
                    } catch (Exception exc) {
                    }
                    JViewport vp = (JViewport)getParent();
                    Rectangle viewRect = vp.getViewRect();
                    if (viewRect.y + viewRect.height > rect.y) {
                        // need to scroll up
                        select(pos, pos);
                    } else {
                        // need to scroll down
                        rect.y += (viewRect.height - rect.height)/2;
                        scrollRectToVisible(rect);
                        select(pos, pos);
                    }
                }
            } catch (BadLocationException exc) {
                select(pos, pos);
                //exc.printStackTrace();
            }
        }
    }
1238106
private void moveElements(int i)
    {
        if (i >= size)
            return;

        System.arraycopy(starts, i, starts, i+1, size - i);
        System.arraycopy(ends, i, ends, i+1, size - i);
        System.arraycopy(markedAts, i, markedAts, i+1, size - i);
        System.arraycopy(delTimes, i, delTimes, i+1, size - i);
        // we set starts[i] to null to indicate the position is now empty, so that we update boundaryHeapSize
        // when we set it
        starts[i] = null;
    }
279617
protected void moveSelectionTop() {
		final IStructuredSelection selection = this.list.getStructuredSelection();
		final int index = this.conversions.indexOf(selection.getFirstElement());
		if (index > 0) {
			final int endIndex = index + selection.size() - 1;
			for (int i = 0; i < selection.size(); ++i) {
				final ConversionMapping next = this.conversions.remove(endIndex);
				this.conversions.addFirst(next);
			}
			refreshListUI();
			this.list.refresh(true);
			enableButtons();
			preferenceValueChanged();
		}
	}
896793
def move(self):
        """"""
        k = random.choice(self.keys)
        multiplier = random.choice((0.95, 1.05))

        invalid_key = True
        while invalid_key:
            # make sure bias doesn't exceed 1.0
            if k == "bias":
                if self.state[k] > 0.909:
                    k = random.choice(self.keys)
                    continue

            invalid_key = False

        newval = self.state[k] * multiplier
        self.state[k] = newval
164880
private void positionX(int secondX) {

        if (secondX < m_firstX) {
            setSelectPositionX(secondX, m_firstX - secondX);
        } else {
            setSelectWidth(secondX - m_firstX);
        }
    }
1199390
private void moveTo(int position) {
    while (position >= currentPosition) {
      try {
        currentPosition = ignoreSpans.nextStartPosition();
        if (currentPosition != Spans.NO_MORE_POSITIONS
            && currentPosition >= minimumPosition) {
          if (!baseEndPositionList.containsKey(currentPosition)) {
            baseEndPositionList.put(currentPosition, new HashSet<Integer>());
            maxBaseEndPosition.put(currentPosition, currentPosition);
          } else {
            maxBaseEndPosition.put(currentPosition,
                Math.max(maxBaseEndPosition.get(currentPosition),
                    ignoreSpans.endPosition()));
          }
          if (!baseStartPositionList.containsKey(ignoreSpans.endPosition())) {
            baseStartPositionList.put(ignoreSpans.endPosition(),
                new HashSet<Integer>());
            minBaseStartPosition.put(ignoreSpans.endPosition(),
                ignoreSpans.endPosition());
          } else {
            minBaseStartPosition.put(ignoreSpans.endPosition(),
                Math.min(minBaseStartPosition.get(ignoreSpans.endPosition()),
                    currentPosition));
          }
          baseStartPositionList.get(ignoreSpans.endPosition())
              .add(currentPosition);
          baseEndPositionList.get(currentPosition)
              .add(ignoreSpans.endPosition());
        }
      } catch (IOException e) {
        log.debug(e);
        currentPosition = Spans.NO_MORE_POSITIONS;
        break;
      }
    }
  }
1279113
function move(offsetX, offsetY) {
    var imageData = this.imageData;


    this.moveTo(isUndefined(offsetX) ? offsetX : imageData.left + Number(offsetX), isUndefined(offsetY) ? offsetY : imageData.top + Number(offsetY));

    return this;
  }
68659
def move_selection(reverse=False):
    
    global selected_pid
    if selected_pid not in gunicorns:
        selected_pid = None
    found = False
    pids = sorted(gunicorns.keys(), reverse=reverse)
    # Iterate items twice to enable wrapping.
    for pid in pids + pids:
        if selected_pid is None or found:
            selected_pid = pid
            return
        found = pid == selected_pid
58501
public Range move(int offset) {
        if (offset == 0)
            return this;
        return new Range(lower + offset, upper + offset, reversed);
    }
984985
private void moveHorizontally(int offset) {
        if (offset < 0) {
            moveLeft(Math.abs(offset));
        } else if (offset > 0) {
            moveRight(offset);
        }
    }
186453
private void moveIndex() {
		int i = rightmostIndexBelowMax();
		if (i >= 0) {
			index[i] = index[i]+1; 
			for (int j = i+1; j<r; j++)
				index[j] = index[j-1] + 1;
		}
		else hasNext = false;
	}
931612
function moveSelection(forward, reset) {
		var p, _p, cur;
		
		if (!$('[key]', self.cwd).length) {
			return;
		}
		
		if (self.fm.selected.length == 0) {
			p = $('[key]:'+(forward ? 'first' : 'last'), self.cwd);
			self.fm.select(p);
		} else if (reset) {
			p  = $('.ui-selected:'+(forward ? 'last' : 'first'), self.cwd);
			_p = p[forward ? 'next' : 'prev']('[key]');
			if (_p.length) {
				p = _p;
			}
			self.fm.select(p, true);
		} else {
			if (self.pointer) {
				cur = $('[key="'+self.pointer+'"].ui-selected', self.cwd);
			}
			if (!cur || !cur.length) {
				cur = $('.ui-selected:'+(forward ? 'last' : 'first'), self.cwd);
			}
			p = cur[forward ? 'next' : 'prev']('[key]');

			if (!p.length) {
				p = cur;
			} else {
				if (!p.hasClass('ui-selected')) {
					self.fm.select(p);
				} else {
					if (!cur.hasClass('ui-selected')) {
						self.fm.unselect(p);
					} else {
						_p = cur[forward ? 'prev' : 'next']('[key]')
						if (!_p.length || !_p.hasClass('ui-selected')) {
							self.fm.unselect(cur);
						} else {
							while ((_p = forward ? p.next('[key]') : p.prev('[key]')) && p.hasClass('ui-selected')) {
								p = _p;
							}
							self.fm.select(p);
						}
					}
				}
			} 
		}
		self.pointer = p.attr('key');
		self.fm.checkSelectedPos(forward);
	}
128809
def _offset(self, x, y):
        """"""
        x, y = force_int(x, y)
        return y * self.width * 4 + x * 4
1139425
protected void updateSelection()
   {
      byte[] data = m_model.getData();
      int offset = m_model.getOffset();
      Point selectedCell = m_model.getSelectedCell();

      DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
      DateFormat timeFormat = new SimpleDateFormat("HH:mm");
      DateFormat timestampFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm");

      int selectionIndex = (selectedCell.y * m_model.getColumns()) + selectedCell.x;
      String selectionLabel = selectedCell.y + "," + selectedCell.x;
      String differenceLabel = Integer.toString(Math.abs(m_model.getCurrentSelectionIndex() - selectionIndex));

      String shortValueLabel = "";
      String longSixValueLabel = "";
      String longValueLabel = "";
      String doubleValueLabel = "";
      String durationValueLabel = "";
      String timeUnitsValueLabel = "";
      String guidValueLabel = "";
      String percentageValueLabel = "";
      String dateValueLabel = "";
      String timeValueLabel = "";
      String timestampValueLabel = "";
      String workUnitsValueLabel = "";

      if (selectionIndex + offset + 2 <= data.length)
      {
         shortValueLabel = Integer.toString(MPPUtility.getShort(data, selectionIndex + offset));
         timeUnitsValueLabel = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(data, selectionIndex + offset)).toString();

         Double value = MPPUtility.getPercentage(data, selectionIndex + offset);
         if (value != null)
         {
            percentageValueLabel = value.toString();
         }

         Date date = MPPUtility.getDate(data, selectionIndex + offset);
         if (date != null)
         {
            dateValueLabel = dateFormat.format(date);
         }

         timeValueLabel = timeFormat.format(MPPUtility.getTime(data, selectionIndex + offset));
      }

      //
      // 1 byte
      //
      workUnitsValueLabel = MPPUtility.getWorkTimeUnits(MPPUtility.getByte(data, selectionIndex + offset)).toString();

      //
      // 4 bytes
      //
      if (selectionIndex + offset + 4 <= data.length)
      {
         Date timestamp = MPPUtility.getTimestamp(data, selectionIndex + offset);
         if (timestamp != null)
         {
            timestampValueLabel = timestampFormat.format(timestamp);
         }
      }

      //
      // 6 bytes
      //
      if (selectionIndex + offset + 6 <= data.length)
      {
         longSixValueLabel = Long.toString(MPPUtility.getLong6(data, selectionIndex + offset));
      }

      //
      // 8 bytes
      //
      if (selectionIndex + offset + 8 <= data.length)
      {
         longValueLabel = Long.toString(MPPUtility.getLong(data, selectionIndex + offset));
         doubleValueLabel = Double.toString(MPPUtility.getDouble(data, selectionIndex + offset));
         durationValueLabel = Duration.getInstance(MPPUtility.getDouble(data, selectionIndex + offset) / 60000, TimeUnit.HOURS).toString();
      }

      //
      // 16 bytes
      //
      if (selectionIndex + offset + 16 <= data.length)
      {
         guidValueLabel = MPPUtility.getGUID(data, selectionIndex + offset).toString().toUpperCase();
      }

      m_model.setPreviousSelectionIndex(m_model.getCurrentSelectionIndex());
      m_model.setCurrentSelectionIndex(selectionIndex);
      m_model.setPreviousSelectionValueLabel(m_model.getCurrentSelectionValueLabel());
      m_model.setCurrentSelectionValueLabel(selectionLabel);
      m_model.setSelectionDifferenceValueLabel(differenceLabel);
      m_model.setShortValueLabel(shortValueLabel);
      m_model.setLongSixValueLabel(longSixValueLabel);
      m_model.setLongValueLabel(longValueLabel);
      m_model.setDoubleValueLabel(doubleValueLabel);
      m_model.setDurationValueLabel(durationValueLabel);
      m_model.setTimeUnitsValueLabel(timeUnitsValueLabel);
      m_model.setGuidValueLabel(guidValueLabel);
      m_model.setPercentageValueLabel(percentageValueLabel);
      m_model.setDateValueLabel(dateValueLabel);
      m_model.setTimeValueLabel(timeValueLabel);
      m_model.setTimestampValueLabel(timestampValueLabel);
      m_model.setWorkUnitsValueLabel(workUnitsValueLabel);
   }
365268
def move_up(self):
        
        old_index = self.current_index
        self.current_index -= 1
        self.__wrap_index()
        self.__handle_selections(old_index, self.current_index)
671134
public Alignment<S> move(int offset) {
        return new Alignment<>(sequence1, mutations, sequence1Range, sequence2Range.move(offset), score);
    }
614553
def SetSelected( self, node, point=None, propagate=True ):
        """"""
        if node == self.selectedNode:
            return
        self.selectedNode = node
        self.UpdateDrawing()
        if node:
            wx.PostEvent( self, SquareSelectionEvent( node=node, point=point, map=self ) )