Set media position.
358336
def set_position(self, position):
        """"""
        if position > self._duration():
            return
        position_ns = position * _NANOSEC_MULT
        self._manager[ATTR_POSITION] = position
        self._player.seek_simple(_FORMAT_TIME, Gst.SeekFlags.FLUSH, position_ns)
1228820
private void setSelectPosition(int posX, int posY, int height, int width) {

        setSelectPositionX(posX, width);
        setSelectPositionY(posY, height);
    }
1276848
private void setContentOffset(int startX, int startY, Translation translation, int movementAmount) {

        if (translation == Translation.VERTICAL) {

            // center the X around the start point
            int originalStartX = startX;
            startX -= contentParams.width / 2;

            // if Y is in the lower half, we want it to go up, otherwise, leave it the same
            boolean moveDown = true;
            if (startY + contentParams.height + FINGER_SIZE > screenHeight) {
                startY -= contentParams.height;
                moveDown = false;

                if (movementAmount > 0) {
                    movementAmount *= -1;
                }
            }

            // when moving the peek view below the finger location, we want to offset it a bit to the right
            // or left as well, just so the hand doesn't cover it up.
            int extraXOffset = 0;
            if (moveDown) {
                extraXOffset = DensityUtils.toPx(getContext(), 200);
                if (originalStartX > screenWidth / 2) {
                    extraXOffset = extraXOffset * -1; // move it a bit to the left
                }
            }

            // make sure they aren't outside of the layout bounds and move them with the movementAmount
            // I move the x just a bit to the right or left here as well, because it just makes things look better
            startX = ensureWithinBounds(startX + extraXOffset, screenWidth, contentParams.width);
            startY = ensureWithinBounds(startY + movementAmount, screenHeight, contentParams.height);

        } else {

            // center the Y around the start point
            startY -= contentParams.height / 2;

            // if X is in the right half, we want it to go left
            if (startX + contentParams.width + FINGER_SIZE > screenWidth) {
                startX -= contentParams.width;
                if (movementAmount > 0) {
                    movementAmount *= -1;
                }
            }

            // make sure they aren't outside of the layout bounds and move them with the movementAmount
            startX = ensureWithinBounds(startX + movementAmount, screenWidth, contentParams.width);
            startY = ensureWithinBounds(startY, screenHeight, contentParams.height);
        }

        // check to see if the system bars are covering anything

        int statusBar = NavigationUtils.getStatusBarHeight(getContext());
        if (startY < statusBar) { // if it is above the status bar and action bar
            startY = statusBar + 10;
        } else if (NavigationUtils.hasNavBar(getContext()) &&
                startY + contentParams.height > screenHeight - NavigationUtils.getNavBarHeight(getContext())) {
            // if there is a nav bar and the popup is underneath it
            startY = screenHeight - contentParams.height - NavigationUtils.getNavBarHeight(getContext()) - DensityUtils.toDp(getContext(), 10);
        } else if (!NavigationUtils.hasNavBar(getContext()) && startY + contentParams.height > screenHeight) {
            startY = screenHeight - contentParams.height - DensityUtils.toDp(getContext(), 10);
        }

        // set the newly computed distances from the start and top sides
        setDistanceFromLeft(startX);
        setDistanceFromTop(startY);
    }
297185
def set_position(self, point, reset=False):
        
        if isinstance(point, np.ndarray):
            if point.ndim != 1:
                point = point.ravel()
        self.camera.SetPosition(point)
        if reset:
            self.reset_camera()
        self.camera_set = True
        self._render()
448042
def set_row_positions(self):
        """"""
        self.row_positions = [i * self.row_height for i in range(len(self.rows))]
        self.set_size_request(0, self.row_positions[-1] + self.row_height if self.row_positions else 0)
770706
def Reposition(self):
        """"""

        rect = self.GetFieldRect(1)
        self.safemode_staticbmp.SetPosition((rect.x, rect.y))
        self.size_changed = False
571107
def set_position(self, key, latlon, layer=None, rotation=0):
        ''''''
        self.object_queue.put(SlipPosition(key, latlon, layer, rotation))
44700
public void setCamera() {
		glu.gluLookAt(width / 2.0, height / 2.0,
				(height / 2.0) / Math.tan(Math.PI * 60.0 / 360.0), width / 2.0,
				height / 2.0, 0, 0, 1, 0);
	}
51619
function (oldData) {

    this.position_control_from_camera();

    this.bar.setAttribute("height", this.data.size/4.0);
    this.bar.setAttribute("width", this.data.size);
    this.bar.setAttribute("position", "0.0 0.0 0");


    this.play_image.setAttribute("height", this.data.size/4.0);
    this.play_image.setAttribute("width", this.data.size/4.0);
    this.play_image.setAttribute("position", ((-this.data.size/2.0) * 1.4) + " 0 0");


  }
972531
private function setYPosition()
	{
		#	Calculate Y position on Image
	
		# Height Difference Between Image and CopyRight text box
		$heights_difference = $this->_image_info[1] - $this->_copyright['text_box_dimensions']['height'];
		
		if( $heights_difference > 0 )
		{
			if( $this->_copyright['vertical_location'] < $this->_copyright['text_box_dimensions']['draw_y_center'] ) 				
				
				# so un complete text (Cropped ) from top ===> align text to top
				$this->_copyright['y_position'] = $this->_copyright['text_box_dimensions']['height'];
			
			else if( ( $this->_copyright['vertical_location'] + $this->_copyright['text_box_dimensions']['draw_y_center'] ) > $this->_image_info[1] )
				
				# align text to bottom
				$this->_copyright['y_position'] = $this->_image_info[1];
			
			else
				
				# align text to the specified percentage location
				$this->_copyright['y_position'] =  $this->_copyright['vertical_location'] + ( $this->_copyright['text_box_dimensions']['draw_y_center'] );
		}
		else
		
			# align text to bottom
			$this->_copyright['y_position'] = $this->_image_info[1];



		// Check to Subtract or add Value, of drawing offset Mechanism, ( itis y cordinate of first point )
		// -1, 15, -18
		if( $this->_copyright['text_box_dimensions']['points'][1] >= -1 )
		{
			if( $this->_copyright['text_box_dimensions']['points'][1] > 0 || $this->_copyright['text_angle'] > 180 )
				// +ve values and angles more than 180
				$this->_copyright['y_position'] += $this->_copyright['text_box_dimensions']['points'][1] * -1;
			else
				$this->_copyright['y_position'] += $this->_copyright['text_box_dimensions']['points'][1];

		}
		
		else
			// < -1 
			$this->_copyright['y_position'] -= $this->_copyright['text_box_dimensions']['points'][1];

		
		// Alwayes Minus Offset Y that will have value because Rotation
		$this->_copyright['y_position'] -= $this->_copyright['text_box_dimensions']['offset_y'];


		
		# Method End
	}
1228827
def randpos(self):
        ''''''
        self.setpos(gen_settings.home_lat, gen_settings.home_lon)
        self.move(random.uniform(0, 360), random.uniform(0, gen_settings.region_width))
945716
def place_visual(self):
        """"""
        index = 0
        bin_pos = string_to_array(self.bin2_body.get("pos"))
        bin_size = self.bin_size

        for _, obj_mjcf in self.visual_objects:

            bin_x_low = bin_pos[0]
            bin_y_low = bin_pos[1]
            if index == 0 or index == 2:
                bin_x_low -= bin_size[0] / 2
            if index < 2:
                bin_y_low -= bin_size[1] / 2

            bin_x_high = bin_x_low + bin_size[0] / 2
            bin_y_high = bin_y_low + bin_size[1] / 2
            bottom_offset = obj_mjcf.get_bottom_offset()

            bin_range = [bin_x_low + bin_x_high, bin_y_low + bin_y_high, 2 * bin_pos[2]]
            bin_center = np.array(bin_range) / 2.0

            pos = bin_center - bottom_offset
            self.visual_obj_mjcf[index].set("pos", array_to_string(pos))
            index += 1
1369739
def seek_to_position(position):
    """"""
    message = command(protobuf.CommandInfo_pb2.SeekToPlaybackPosition)
    send_command = message.inner()
    send_command.options.playbackPosition = position
    return message
335069
def set_volume(self, mute=False, volume=50):
        """"""
        self.publish(
            action='set',
            resource='cameras/{}'.format(self.device_id),
            publish_response=False,
            properties={'speaker': {'mute': mute, 'volume': volume}}
        )
631555
public void setContent(IContent content)
	{
		this.content = content;
		content.setParent(this);
		content.setPosition(Position.middleCenter(content).plus(offsetPosition));
	}
1159317
public void setPosition(int position) {

        switch (position) {
            case Simapi.POS_DOWN_LEFT:
            case Simapi.POS_DOWN_RIGHT:
            case Simapi.POS_STRAIGHT_DOWN:
            case Simapi.POS_STRAIGHT_LEFT:
            case Simapi.POS_STRAIGHT_RIGHT:
            case Simapi.POS_STRAIGHT_UP:
            case Simapi.POS_UP_LEFT:
            case Simapi.POS_UP_RIGHT:
                // position is fine
                m_position = position;
                break;
            default:
                m_position = Simapi.POS_CENTER;
        }
    }
757221
def reset_position(self):
        """"""
        self.pos = 0
        self.col = 0
        self.row = 1
        self.eos = 0