Store the vertical centering VCENTER BIFF record.
510690
private function _writeVcenter()
	{
		$record   = 0x0084;			  // Record identifier
		$length   = 0x0002;			  // Bytes to follow

		$fVCenter = $this->_phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0;	 // Horizontal centering

		$header	= pack("vv", $record, $length);
		$data	  = pack("v",  $fVCenter);
		$this->_append($header . $data);
	}
843022
private function _readVcenter()
	{
		$length = self::_GetInt2d($this->_data, $this->_pos + 2);
		$recordData = substr($this->_data, $this->_pos + 4, $length);

		// move stream pointer to next record
		$this->_pos += 4 + $length;

		if (!$this->_readDataOnly) {
			// offset: 0; size: 2; 0 = print sheet aligned at top page border, 1 = print sheet vertically centered
			$isVerticalCentered = (bool) self::_GetInt2d($recordData, 0);

			$this->_phpSheet->getPageSetup()->setVerticalCentered($isVerticalCentered);
		}
	}
1048982
function _storeGuts()
    {
        $record      = 0x0080;   // Record identifier
        $length      = 0x0008;   // Bytes to follow

        $dxRwGut     = 0x0000;   // Size of row gutter
        $dxColGut    = 0x0000;   // Size of col gutter

        $row_level   = $this->_outline_row_level;
        $col_level   = 0;

        // Calculate the maximum column outline level. The equivalent calculation
        // for the row outline level is carried out in setRow().
        $colcount = count($this->_colinfo);
        for ($i = 0; $i < $colcount; $i++) {
           // Skip cols without outline level info.
           if (count($this->_colinfo[$i]) >= 6) {
              $col_level = max($this->_colinfo[$i][5], $col_level);
           }
        }

        // Set the limits for the outline levels (0 <= x <= 7).
        $col_level = max(0, min($col_level, 7));

        // The displayed level is one greater than the max outline levels
        if ($row_level) {
            $row_level++;
        }
        if ($col_level) {
            $col_level++;
        }

        $header = pack("vv",   $record, $length);
        $data   = pack("vvvv", $dxRwGut, $dxColGut, $row_level, $col_level);

        $this->_prepend($header.$data);
    }
461735
def _coord_vertical_alignment(self):
        
        dirh,dirv = self.dirh,self.dirv
        g = self.grx
        for l in self.layers[::-dirv]:
            if not l.prevlayer(): continue
            r=None
            for vk in l[::dirh]:
                for m in l._medianindex(vk):
                    # take the median node in dirv layer:
                    um = l.prevlayer()[m]
                    # if vk is "free" align it with um's root
                    if g[vk].align is vk:
                        if dirv==1: vpair = (vk,um)
                        else:       vpair = (um,vk)
                        # if vk<->um link is used for alignment
                        if (vpair not in self.conflicts) and \
                           (r==None or dirh*r<dirh*m):
                            g[um].align = vk
                            g[vk].root = g[um].root
                            g[vk].align = g[vk].root
                            r = m
877752
def vertically(value, num_blocks, val_min, color, args):
    """"""
    global maxi, value_list

    value_list.append(str(value))

    # In case the number of blocks at the end of the normalization is less
    # than the default number, use the maxi variable to escape.
    if maxi < num_blocks:
        maxi = num_blocks

    if num_blocks > 0:
        vertical_list.append((TICK * num_blocks))
    else:
        vertical_list.append(SM_TICK)

    # Zip_longest method in order to turn them vertically.
    for row in zip_longest(*vertical_list, fillvalue='  '):
        zipped_list.append(row)

    counter, result_list = 0, []

    # Combined with the maxi variable, escapes the appending method at
    # the correct point or the default one (width).
    for i in reversed(zipped_list):
        result_list.append(i)
        counter += 1

        if maxi == args['width']:
            if counter == (args['width']):
                break
        else:
            if counter == maxi:
                break

    # Return a list of rows which will be used to print the result vertically.
    return result_list
800946
function _storeSupbookInternal()
    {
        $record    = 0x01AE;   // Record identifier
        $length    = 0x0004;   // Bytes to follow

        $header    = pack("vv", $record, $length);
        $data      = pack("vv", count($this->_worksheets), 0x0104);
        $this->_append($header . $data);
    }
1307500
def _prep_priority_filter_vcfanno(in_vcf, data):
    
    pops = ['af_adj_exac_afr', 'af_adj_exac_amr', 'af_adj_exac_eas',
            'af_adj_exac_fin', 'af_adj_exac_nfe', 'af_adj_exac_oth', 'af_adj_exac_sas',
            'af_exac_all', 'max_aaf_all',
            "af_esp_ea", "af_esp_aa", "af_esp_all", "af_1kg_amr", "af_1kg_eas",
            "af_1kg_sas", "af_1kg_afr", "af_1kg_eur", "af_1kg_all"]
    known = ["cosmic_ids", "cosmic_id", "clinvar_sig"]
    out_file = "%s-priority.tsv" % utils.splitext_plus(in_vcf)[0]
    if not utils.file_exists(out_file) and not utils.file_exists(out_file + ".gz"):
        with file_transaction(data, out_file) as tx_out_file:
            with open(tx_out_file, "w") as out_handle:
                writer = csv.writer(out_handle, dialect="excel-tab")
                header = ["#chrom", "start", "end", "ref", "alt", "filter"]
                writer.writerow(header)
                vcf_reader = cyvcf2.VCF(in_vcf)
                impact_info = _get_impact_info(vcf_reader)
                for rec in vcf_reader:
                    row = _prepare_vcf_rec(rec, pops, known, impact_info)
                    cur_filter = _calc_priority_filter(row, pops)
                    writer.writerow([rec.CHROM, rec.start, rec.end, rec.REF, ",".join(rec.ALT), cur_filter])
    return vcfutils.bgzip_and_index(out_file, data["config"],
                                    tabix_args="-0 -c '#' -s 1 -b 2 -e 3")
1252815
private function _readHcenter()
	{
		$length = self::_GetInt2d($this->_data, $this->_pos + 2);
		$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);

		// move stream pointer to next record
		$this->_pos += 4 + $length;

		if (!$this->_readDataOnly) {
			// offset: 0; size: 2; 0 = print sheet left aligned, 1 = print sheet centered horizontally
			$isHorizontalCentered = (bool) self::_GetInt2d($recordData, 0);

			$this->_phpSheet->getPageSetup()->setHorizontalCentered($isHorizontalCentered);
		}
	}
335253
function _storeMarginBottom()
    {
        $record  = 0x0029;                   // Record identifier
        $length  = 0x0008;                   // Bytes to follow

        $margin  = $this->_margin_bottom;     // Margin in inches

        $header    = pack("vv",  $record, $length);
        $data      = pack("d",   $margin);
        if ($this->_byte_order) { // if it's Big Endian
            $data = strrev($data);
        }

        $this->_prepend($header . $data);
    }
1121267
def store_areaformat(rgbFore, rgbBack, pattern, grbit, indexFore, indexBack)  # :nodoc:
    record    = 0x100A     # Record identifier.
    length    = 0x0010     # Number of bytes to follow.
    # rgbFore              # Foreground RGB colour.
    # rgbBack              # Background RGB colour.
    # pattern              # Pattern.
    # grbit                # Option flags.
    # indexFore            # Index to Foreground colour.
    # indexBack            # Index to Background colour.

    header = [record, length].pack('vv')
    data  = [rgbFore].pack('V')
    data += [rgbBack].pack('V')
    data += [pattern].pack('v')
    data += [grbit].pack('v')
    data += [indexFore].pack('v')
    data += [indexBack].pack('v')

    append(header, data)
  end
388972
def center_middle(r, window_size):
  
  res = copy.copy(r)
  mid = res.start + (len(res) / 2)
  res.start = mid - (window_size / 2)
  res.end = res.start + window_size
  return res
1247218
def store_frame(frame_type, grbit)   # :nodoc:
    record     = 0x1032     # Record identifier.
    length     = 0x0004     # Number of bytes to follow.
    # frame_type            # Frame type.
    # grbit                 # Option flags.

    store_simple(record, length, frame_type, grbit)
  end
332050
def value_to_position(self, y):
        """"""
        vsb = self.editor.verticalScrollBar()
        return (y-vsb.minimum())*self.get_scale_factor()+self.offset
1227917
def store_defcol   #:nodoc:
    record   = 0x0055      # Record identifier
    length   = 0x0002      # Number of bytes to follow
    colwidth = 0x0008      # Default column width

    header   = [record, length].pack("vv")
    data     = [colwidth].pack("v")

    prepend(header, data)
  end
808021
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Anchor Volume Descriptor not initialized')

        rec = struct.pack(self.FMT, b'\x00' * 16, self.main_vd_length,
                          self.main_vd_extent, self.reserve_vd_length,
                          self.reserve_vd_extent)[16:] + b'\x00' * 480

        return self.desc_tag.record(rec) + rec
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
272318
function _storeHeader()
    {
        $record  = 0x0014;               // Record identifier

        $str      = $this->_header;       // header string
        $cch      = strlen($str);         // Length of header string
        if ($this->_BIFF_version == 0x0600) {
            $encoding = 0x0;                  // TODO: Unicode support
            $length   = 3 + $cch;             // Bytes to follow
        } else {
            $length  = 1 + $cch;             // Bytes to follow
        }

        $header   = pack("vv", $record, $length);
        if ($this->_BIFF_version == 0x0600) {
            $data     = pack("vC",  $cch, $encoding);
        } else {
            $data      = pack("C",  $cch);
        }

        $this->_prepend($header.$data.$str);
    }