/*
Peter can you document this method? TODO

@param moved
@param fixed
@return
550069
public static Matrix formMatrix(Point3d[] a, Point3d[] b) {
		double xx = 0.0, xy = 0.0, xz = 0.0;
		double yx = 0.0, yy = 0.0, yz = 0.0;
		double zx = 0.0, zy = 0.0, zz = 0.0;

		for (int i = 0; i < a.length; i++) {
			xx += a[i].x * b[i].x;
			xy += a[i].x * b[i].y;
			xz += a[i].x * b[i].z;
			yx += a[i].y * b[i].x;
			yy += a[i].y * b[i].y;
			yz += a[i].y * b[i].z;
			zx += a[i].z * b[i].x;
			zy += a[i].z * b[i].y;
			zz += a[i].z * b[i].z;
		}

		double[][] f = new double[4][4];
		f[0][0] = xx + yy + zz;
		f[0][1] = zy - yz;
		f[1][0] = f[0][1];
		f[1][1] = xx - yy - zz;
		f[0][2] = xz - zx;
		f[2][0] = f[0][2];
		f[1][2] = xy + yx;
		f[2][1] = f[1][2];
		f[2][2] = yy - zz - xx;
		f[0][3] = yx - xy;
		f[3][0] = f[0][3];
		f[1][3] = zx + xz;
		f[3][1] = f[1][3];
		f[2][3] = yz + zy;
		f[3][2] = f[2][3];
		f[3][3] = zz - xx - yy;

		return new Matrix(f);
	}
967592
function moveBindingIndexToReservedSlot(offset) {
    var currentSlot = viewData[BINDING_INDEX];
    viewData[BINDING_INDEX] = tView.bindingStartIndex - offset;
    return currentSlot;
}
255314
int reallocate(int offset) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "reallocate", new Object[]{Integer.valueOf(offset)});

    byte[] oldContents = contents;
    int oldMessageOffset = messageOffset;
    contents = new byte[length];
    System.arraycopy(oldContents, messageOffset, contents, 0, length);
    tableOffset -= messageOffset;
    dataOffset -= messageOffset;
    messageOffset = 0;
    reallocated = true;
    reallocated(contents, -1);

    int result = offset - oldMessageOffset;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "reallocate", Integer.valueOf(result));
    return result;
  }
55035
public static void redirect(HttpServletResponse response, String url,
                                boolean movePermanently) throws IOException {
        if (!movePermanently) {
            response.sendRedirect(url);
        } else {
            response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
            response.setHeader("Location", url);
        }
    }
1042253
@Override
	public void move(List<GeometryIndex> indices, List<List<Coordinate>> coordinates)
			throws GeometryOperationFailedException {
		if (indices == null || coordinates == null || indices.size() == 0 || coordinates.size() == 0) {
			throw new GeometryOperationFailedException("Illegal arguments passed; nothing to move.");
		}

		Geometry geometry = service.getGeometry();
		OperationSequence seq = null;
		if (isOperationSequenceActive()) {
			seq = current;
		} else {
			seq = new OperationSequence();
			redoQueue.clear();
		}
		for (int i = 0; i < indices.size(); i++) {
			if (indexService.getType(indices.get(i)) == GeometryIndexType.TYPE_VERTEX) {
				GeometryIndexOperation op = new MoveVertexOperation(indexService, coordinates.get(i).get(0));
				executeOperation(op, indices.get(i));
				seq.addOperation(op);
			} else {
				throw new GeometryOperationFailedException("Can only move vertices. Other types not suported.");
			}
		}
		if (!isOperationSequenceActive()) {
			undoQueue.add(seq);
		}
		eventBus.fireEvent(new GeometryEditMoveEvent(geometry, indices));
		if (!isOperationSequenceActive()) {
			eventBus.fireEvent(new GeometryEditShapeChangedEvent(service.getGeometry()));
		}
	}
580135
public static final int move(byte[] buf, int offset, int length, ByteBuffer bb)
    {
        int count = Math.min(length, bb.remaining());
        bb.put(buf, offset, count);
        return count;
    }
1120985
@Override
    public T move(String source, String target) throws IllegalArgumentException, IllegalArchivePathException {
        this.getArchive().move(source, target);
        return covarientReturn();
    }
1250659
def do_move_to(self, element, decl, pseudo):
        """"""
        target = serialize(decl.value).strip()
        step = self.state[self.state['current_step']]
        elem = self.current_target().tree

        #  Find if the current node already has a move, and remove it.
        actions = step['actions']
        for pos, action in enumerate(reversed(actions)):
            if action[0] == 'move' and action[1] == elem:
                target_index = - pos - 1
                actions[target_index:] = actions[target_index+1:]
                break

        _, valstep = self.lookup('pending', target)
        if not valstep:
            step['pending'][target] = [('move', elem)]
        else:
            self.state[valstep]['pending'][target].append(('move', elem))
740547
@Override
    public void registerVisitedSolution(SolutionType visitedSolution, Move<? super SolutionType> appliedMove) {
        // store deep copy of newly visited solution
        memory.add(Solution.checkedCopy(visitedSolution));
    }
765010
@Override
    public String moveAsync(String apiKey, String from, String to) {
        checkNotNull(from, "from");
        checkNotNull(to, "to");
        try {
            URI uri = _databus.clone()
                    .segment("_move")
                    .queryParam("from", from)
                    .queryParam("to", to)
                    .build();
            Map<String, Object> response = _client.resource(uri)
                    .header(ApiKeyRequest.AUTHENTICATION_HEADER, apiKey)
                    .post(new TypeReference<Map<String, Object>>(){}, null);
            return response.get("id").toString();
        } catch (EmoClientException e) {
            throw convertException(e);
        }
    }
246365
private Node<T> moveRedLeft(Node<T> h) {
        // assert (h != null);
        // assert isRed(h) && !isRed(h.left) && !isRed(h.left.left);

        flipColors(h);
        if (h.right.left != null && h.right.left.red) { 
            h.right = rotateRight(h.right);
            h = rotateLeft(h);
            flipColors(h);
        }
        return h;
    }
390992
boolean checkUpdate(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx) throws TTIOException {
        assert paramNewRtx != null;
        assert paramOldRtx != null;
        boolean updated = false;
        final long newKey = paramNewRtx.getNode().getDataKey();
        boolean movedNewRtx = paramNewRtx.moveTo(((ITreeStructData)paramNewRtx.getNode()).getRightSiblingKey());
        final long oldKey = paramOldRtx.getNode().getDataKey();
        boolean movedOldRtx = paramOldRtx.moveTo(((ITreeStructData)paramOldRtx.getNode()).getRightSiblingKey());
        if (movedNewRtx && movedOldRtx && checkNodes(paramNewRtx, paramOldRtx)) {
            updated = true;
        } else if (!movedNewRtx && !movedOldRtx) {
            movedNewRtx = paramNewRtx.moveTo(paramNewRtx.getNode().getParentKey());
            movedOldRtx = paramOldRtx.moveTo(paramOldRtx.getNode().getParentKey());

            if (movedNewRtx && movedOldRtx && checkNodes(paramNewRtx, paramOldRtx)) {
                updated = true;
            }
        }
        paramNewRtx.moveTo(newKey);
        paramOldRtx.moveTo(oldKey);
        if (!updated) {
            updated = paramNewRtx.getNode().getDataKey() == paramOldRtx.getNode().getDataKey();
        }
        return updated;
    }
1252341
function getAllowedMovesFromArray(moves) {
    var from = Position.getPositionFromArray(_ramda2.default.head(moves));
    return _ramda2.default.tail(moves).map(function (to) {
        return { from: from, to: Position.getPositionFromArray(to) };
    });
}
1103078
private static LocalDate _moveDate (final MovingCondition aMoveCond, final LocalDate aDate)
  {
    final DayOfWeek nWeekday = XMLHolidayHelper.getWeekday (aMoveCond.getWeekday ());
    final int nDirection = aMoveCond.getWith () == With.NEXT ? 1 : -1;

    LocalDate aMovedDate = aDate;
    while (aMovedDate.getDayOfWeek () != nWeekday)
    {
      aMovedDate = aMovedDate.plusDays (nDirection);
    }
    return aMovedDate;
  }
212992
def apply_move(grid, move):
    ""
    p, q = grid
    bit = 1 << move
    return (q, p | bit) if 0 == (bit & (p | q)) else None
392734
public ModelAdapter<Model, Item> move(int fromPosition, int toPosition) {
        mItems.move(fromPosition, toPosition, getFastAdapter().getPreItemCount(fromPosition));
        return this;
    }
206273
@Override
    protected boolean accept(Move<? super SolutionType> move){
        // call super
        if(super.accept(move)){
            // update tabu memory
            tabuMemory.registerVisitedSolution(getCurrentSolution(), move);
            // update successful
            return true;
        } else {
            return false;
        }
    }