/*
prepares map of excel header row and the the excel data row

@param header the excel header row

@param rowData row data to be used for preparing the return value

@return map of the header row and data row
966477
private Map<String, String> prepareHeaderRowDataMap(List<String> header, List<String> rowData) {
        Map<String, String> headerRowDataMap = new HashMap<>();
        if (header.size() == rowData.size()) {
            for (int i = 0; i < header.size(); i++) {
                if (null != header.get(i)) {
                    headerRowDataMap.put(header.get(i).toLowerCase(), rowData.get(i));
                }
            }
        } else {
            logger.warning("header and columns are not of same size");
        }
        return headerRowDataMap;
    }
477482
@Override
  public void readHeader(byte[] data) {
    if(ByteArrayUtil.readInt(data, 0) != FILE_VERSION) {
      throw new RuntimeException("PersistentPageFile version does not match!");
    }

    this.pageSize = ByteArrayUtil.readInt(data, 4);
  }
1066058
@Override
    public List<Map<String, String>> getTableDataInMap() throws WidgetException {
        try {
            List<Map<String, String>> tableDataInMap = new ArrayList<Map<String, String>>();

            List<String> headers = getTableHeaders();
            List<String[]> tableData = getTableDataInArray();

            for (String[] rowData : tableData) {
                Map<String, String> rowDataMap = new HashMap<String, String>();
                for (int i = 0; i < rowData.length; i++) {
                    rowDataMap.put(headers.get(i), rowData[i]);
                }

                tableDataInMap.add(rowDataMap);
            }

            return tableDataInMap;
        } catch (Exception e) {
            throw new WidgetException("Error while getting table data in map", generateXPathLocator(), e);
        }
    }
1214791
def rowgroupmap(table, key, mapper, header=None, presorted=False,
                buffersize=None, tempdir=None, cache=True):
    

    return RowGroupMapView(table, key, mapper, header=header,
                           presorted=presorted,
                           buffersize=buffersize, tempdir=tempdir, cache=cache)
921127
def get_row_headers(rows, row_headers_count_value=0, column_headers_count=1):
    
    # TODO: REFACTOR ALGORITHM NEEDED
    partial_headers = []

    if row_headers_count_value:

        # Take partial data
        for k_index in range(0, len(rows) - column_headers_count):
            header = rows[k_index + column_headers_count][
                :row_headers_count_value]
            partial_headers.append(remove_list_duplicates(force_list(header)))

        # Populate headers
        populated_headers = populate_csv_headers(
            rows,
            partial_headers,
            column_headers_count)

        return populated_headers
1254315
private function getDataCellContent($column, $data, $row)
	{
		if ($column->value !== null) {
			$value = $column->evaluateExpression($column->value, array('data' => $data, 'row' => $row));
		} else if ($column->name !== null) {
			$value = CHtml::value($data, $column->name);
		}

		return !isset($value)
			? $column->grid->nullDisplay
			: $column->grid->getFormatter()->format(
				$value,
				$column->type
			);
	}
59311
private void getMapRow( int currentrow, ByteBuffer rowdata, boolean iscompressed ) throws IOException, DataFormatException {
        // if (logger.isDebugEnabled())
        // {
        // logger.debug("ACCESSING THE FILE at row: " + currentrow +
        // ", rasterMapType = " + rasterMapType +
        // ", numberOfBytesPerValue = " + numberOfBytesPerValue +
        // ", iscompressed = " + iscompressed);
        // }

        if (iscompressed) {
            /* Compressed maps */
            if (rasterMapType == -2) {
                /* Compressed double map */
                readCompressedFPRowByNumber(rowdata, currentrow, addressesofrows, cellFile, numberOfBytesPerValue);
            } else if (rasterMapType == -1) {
                /* Compressed floating point map */
                readCompressedFPRowByNumber(rowdata, currentrow, addressesofrows, cellFile, numberOfBytesPerValue);
            } else if (rasterMapType > 0) {
                /* Compressed integer map */
                readCompressedIntegerRowByNumber(rowdata, currentrow, addressesofrows, cellFile);
            } else {
                // if (logger.isDebugEnabled())
                // logger.error("format not double nor float");
            }
        } else {
            if (rasterMapType < 0) {
                /* Uncompressed floating point map */
                readUncompressedFPRowByNumber(rowdata, currentrow, cellFile, numberOfBytesPerValue);
            } else if (rasterMapType > 0) {
                /* Uncompressed integer map */
                readUncompressedIntegerRowByNumber(rowdata, currentrow, cellFile);
            } else {
                // if (logger.isDebugEnabled())
                // logger.error("Unknown case, iscompressed=" + iscompressed
                // + ", compressed=" + compressed + ", rasterMapType="
                // + rasterMapType);
            }
        }
        return;
    }
1096087
public void exportObjects2Excel(List<?> data, List<String> header, OutputStream os)
            throws IOException {

        try (Workbook workbook = exportExcelBySimpleHandler(data, header, null, true)) {
            workbook.write(os);
        }
    }
413443
@Override
    public Row prepareDelete(Object rowKey)
    {
        byte[] rowBytes = HBaseUtils.getBytes(rowKey);
        return new Delete(rowBytes);
    }
122457
protected function _prepareRowForDb(array $rowData)
    {
        $rowData = parent::_prepareRowForDb($rowData);
        if (Import::BEHAVIOR_DELETE == $this->getBehavior()) {
            return $rowData;
        }

        if (self::SCOPE_DEFAULT == $this->getRowScope($rowData)) {
            $rowData[CategoryModel::KEY_NAME] = $this->getCategoryName($rowData);

            if (!isset($rowData[CategoryModel::KEY_POSITION])) {
                // diglin - prevent warning message
                $rowData[CategoryModel::KEY_POSITION] = 10000;
            }
        }

        return $rowData;
    }
290431
public static void feedTableDataFromHeader(DbaseFileHeader header, CreateTableData data) throws IOException {
        for (int i = 0; i < header.getNumFields(); i++) {
            String fieldsName = header.getFieldName(i);
            final int type = dbfTypeToH2Type(header,i);
            Column column = new Column(fieldsName.toUpperCase(), type);
            column.setPrecision(header.getFieldLength(i)); // set string length
            data.columns.add(column);
        }
    }
956810
function makeHeader(col, data) {
  let header = '<thead><tr>';
  let index = 0;

  while (col) {
    header += '<th>';

    if (data) {
      header += data[index];
      index += 1;
    }

    header += '</th>';
    col -= 1;
  }

  header += '</tr></thead>';

  return header;
}
691004
def headers(self, serialize_cell=None):
    """"""
    if serialize_cell is None:
      serialize_cell = self.get_cell_value
    return [serialize_cell(cell) for cell in self.rows[0]]
429735
public double[] map( Map<String, Double> row, double data[] ) {
    String[] colNames = getNames();
    for( int i=0; i<colNames.length-1; i++ ) {
      Double d = row.get(colNames[i]);
      data[i] = d==null ? Double.NaN : d;
    }
    return data;
  }
819900
protected static Map<String, String> getHeadersAsMap(ResponseEntity response) {

        Map<String, List<String>> headers = new HashMap<>(response.getHeaders());
        Map<String, String> map = new HashMap<>();

        for ( Map.Entry<String, List<String>> header :headers.entrySet() ) {
            String headerValue = Joiner.on(",").join(header.getValue());
            map.put(header.getKey(), headerValue);
        }

        return map;
    }
1330131
@Override
    public List<Values> mapToValues(String rowKey, Map<String, String> columns, Tuple input) {
        List<Values> values = new ArrayList<Values>();
        Set<String> vals = columns.keySet();
        for(String columnName : vals){
            if(this.isDrpc){
                values.add(new Values(input.getValue(0), rowKey, columnName));
            } else {
                values.add(new Values(rowKey, columnName));
            }
        }
        return values;
    }
794106
public ExcelWriter writeRow(Map<?, ?> rowMap, boolean isWriteKeyAsHead) {
		Assert.isFalse(this.isClosed, "ExcelWriter has been closed!");
		if (MapUtil.isEmpty(rowMap)) {
			// 如果写出数据为null或空，跳过当前行
			return passCurrentRow();
		}

		final Map<?, ?> aliasMap = aliasMap(rowMap);

		if (isWriteKeyAsHead) {
			writeHeadRow(aliasMap.keySet());
		}
		writeRow(aliasMap.values());
		return this;
	}