Move file pointer to the packet with given index.
176410
def seek_to_packet(self, index):
        """"""
        pointer_position = self.packet_positions[index]
        self.blob_file.seek(pointer_position, 0)
984160
private void moveFromTempToPerm() throws IOException {
    try {
      FileStatus[] fileStatus =
          localFs.listStatus(temp, LuceneIndexFileNameFilter.getFilter());
      Path segmentsPath = null;
      Path segmentsGenPath = null;

      // move the files created in temp dir except segments_N and segments.gen
      for (int i = 0; i < fileStatus.length; i++) {
        Path path = fileStatus[i].getPath();
        String name = path.getName();

        if (LuceneUtil.isSegmentsGenFile(name)) {
          assert (segmentsGenPath == null);
          segmentsGenPath = path;
        } else if (LuceneUtil.isSegmentsFile(name)) {
          assert (segmentsPath == null);
          segmentsPath = path;
        } else {
          fs.completeLocalOutput(new Path(perm, name), path);
        }
      }

      // move the segments_N file
      if (segmentsPath != null) {
        fs.completeLocalOutput(new Path(perm, segmentsPath.getName()),
            segmentsPath);
      }

      // move the segments.gen file
      if (segmentsGenPath != null) {
        fs.completeLocalOutput(new Path(perm, segmentsGenPath.getName()),
            segmentsGenPath);
      }
    } finally {
      // finally delete the temp dir (files should have been deleted)
      localFs.delete(temp);
    }
  }
1105186
function move(file, targetDirectory) {
  return new Promise((resolve, reject) => {
    const unLink = promisify(fs.unlink);
    const inputStream = fs.createReadStream(file);
    const outputStream = fs.createWriteStream(targetDirectory);

    inputStream.pipe(outputStream);
    inputStream.on('end', (err) => {
      if(err) {
        reject(err);
      } else {
        unLink(file);
        resolve(true);
      }
    });
  });
}
1142487
private void moveDataAfterIndex(int index, int length) {
		ensureCapacity(Math.max(this.position, index) + length);
		if (index < this.position) {
			// 插入位置在已有数据范围内，后移插入位置之后的数据
			System.arraycopy(this.value, index, this.value, index + length, this.position - index);
		} else if (index > this.position) {
			// 插入位置超出范围，则当前位置到index清除为空格
			Arrays.fill(this.value, this.position, index, StrUtil.C_SPACE);
		}
		// 不位移
	}
220523
function(segmentIndex, index, obj) {
      var file = obj;

      if (file.type === 'VIDEO' || file.type === 'AUDIO') {
        file = findSupportedSource(file);
      }

      if (file) {
        _bytesTotal += file.size;
        _files[segmentIndex].push(file);
      }
    }
802331
public FloatBuffer getTransposed(int index, FloatBuffer buffer) {
        MemUtil.INSTANCE.putfTransposed(this, index, buffer);
        return buffer;
    }
792845
function moveModuleUp(source, target, module) {
  const targetZip = new JSZip();

  return fse
    .readFileAsync(source)
    .then(buffer => JSZip.loadAsync(buffer))
    .then(sourceZip => sourceZip.filter(file => file.startsWith(module + '/')))
    .map(srcZipObj =>
      zipFile(
        targetZip,
        srcZipObj.name.replace(module + '/', ''),
        srcZipObj.async('nodebuffer')
      )
    )
    .then(() => writeZip(targetZip, target));
}
963100
private void moveToNext(final int i) {
    final HistogramSeekableView it = iterators[i];
    if (it.hasNext()) {
      putDataPoint(i, it.next());
    } else {
      endReached(i);
    }
  }
12622
public int moveToIndex(int index)
    {
        int index2 = index;
        int iErrorCode = DBConstants.NORMAL_RETURN;
        if (m_bIncludeBlankOption)
        {
            if (index == 0)
                iErrorCode = DBConstants.ERROR_RETURN;
            index2--; // Offset by one
        }
        if (index == -1)
            iErrorCode = DBConstants.ERROR_RETURN;
        if (iErrorCode == DBConstants.NORMAL_RETURN)
        {
            if (index2 != -1)
            {
                try
                {
                    Record record = (Record)m_gridTable.get(index2);    //?, DONT_DISPLAY);   // DON'T Display, or you will be caught in a loop
                    if (record == null)
                        iErrorCode = DBConstants.END_OF_FILE;
                }
                catch( DBException e )
                {
                    iErrorCode = e.getErrorCode();
                }
            }
            else
                iErrorCode = DBConstants.ERROR_RETURN;  // Do an addNew
        }
        else        // This is usually selecting index 0 or -1!
        {
            m_record.initRecord(DBConstants.DISPLAY);  // Clear the fields!
            iErrorCode = DBConstants.NORMAL_RETURN;   // Clear fields = record 0
        }
        return iErrorCode;
    }
1266008
def seek( self, offset, whence=0 ):
        
        # Determine absolute target position
        if whence == 0:
            target_pos = offset
        elif whence == 1:
            target_pos = self.file_pos + offset
        elif whence == 2:
            target_pos = self.size - offset
        else:
            raise Exception( "Invalid `whence` argument: %r", whence )
        # Check if this is a noop
        if target_pos == self.file_pos:
            return    
        # Verify it is valid
        assert 0 <= target_pos < self.size, "Attempt to seek outside file"
        # Move the position
        self.file_pos = target_pos
        # Mark as dirty, the next time a read is done we need to actually
        # move the position in the bzip2 file
        self.dirty = True
660897
public void processPacketAESCM(RawPacket pkt, int index) {
        long ssrc = pkt.getRTCPSSRC();

        /* Compute the CM IV (refer to chapter 4.1.1 in RFC 3711):
        *
        * k_s   XX XX XX XX XX XX XX XX XX XX XX XX XX XX
        * SSRC              XX XX XX XX
        * index                               XX XX XX XX
        * ------------------------------------------------------XOR
        * IV    XX XX XX XX XX XX XX XX XX XX XX XX XX XX 00 00
        *        0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
        */
        ivStore[0] = saltKey[0];
        ivStore[1] = saltKey[1];
        ivStore[2] = saltKey[2];
        ivStore[3] = saltKey[3];

        // The shifts transform the ssrc and index into network order
        ivStore[4] = (byte) (((ssrc >> 24) & 0xff) ^ this.saltKey[4]);
        ivStore[5] = (byte) (((ssrc >> 16) & 0xff) ^ this.saltKey[5]);
        ivStore[6] = (byte) (((ssrc >> 8) & 0xff) ^ this.saltKey[6]);
        ivStore[7] = (byte) ((ssrc & 0xff) ^ this.saltKey[7]);

        ivStore[8] = saltKey[8];
        ivStore[9] = saltKey[9];

        ivStore[10] = (byte) (((index >> 24) & 0xff) ^ this.saltKey[10]);
        ivStore[11] = (byte) (((index >> 16) & 0xff) ^ this.saltKey[11]);
        ivStore[12] = (byte) (((index >> 8) & 0xff) ^ this.saltKey[12]);
        ivStore[13] = (byte) ((index & 0xff) ^ this.saltKey[13]);

        ivStore[14] = ivStore[15] = 0;

        // Encrypted part excludes fixed header (8 bytes)  
        final int payloadOffset = 8;
        final int payloadLength = pkt.getLength() - payloadOffset;
        cipherCtr.process(cipher, pkt.getBuffer(), payloadOffset, payloadLength, ivStore);
    }
722140
def write(self, i, value):
        
        # Current byte position - (n * data_size)
        offset = i * self.__strct.size

        # Set file pointer to -(#data)
        self.__file.seek(offset)

        # Pack value
        data = self.pack(value)

        # Write packed value
        self.__file.write(data)
689521
public function replacePacket( $index, $packet )
	{
		if( !isset( $this->packetList[$index] ) )
			throw new OutOfRangeException( 'Invalid Packet Index.' );
		$this->packetList[$index]	= $packet;
	}
1028491
def insert(self, index, filename):
        """"""
        base = self._base
        dct = {'__module__': base.__module__, 'filename': filename, '_stack': self}
        cls = type(base.__name__, (base,), dct)

        self._map[cls.filename] = cls
        self._classes.insert(index, cls)
82486
private void mapAndRememberIndexFile(File index) {
        MappedFileReader idxFileReader = null;
        try {
            idxFileReader = new MappedFileReader(index);
            mappedIndexFileReader.add(idxFileReader);
            indexFiles.add(idxFileReader.map());
        } catch(IOException e) {
            logger.error("Error mmapping " + index, e);
        }
    }
1374702
private void moveBufferTo(byte[] dest) {
    int size = endIndex - index;
    System.arraycopy(buffer, index, dest, 0, size);
    index = 0;
    endIndex = size;
  }
1130156
def move_tab(self, index_from, index_to):
        
        filename = self.filenames.pop(index_from)
        editor = self.editors.pop(index_from)

        self.filenames.insert(index_to, filename)
        self.editors.insert(index_to, editor)