Common mechanism to convert Synchro commentary recorss into notes.

@param rows commentary table rows
@return note text
975929
private String getNotes(List<MapRow> rows)
   {
      String result = null;
      if (rows != null && !rows.isEmpty())
      {
         StringBuilder sb = new StringBuilder();
         for (MapRow row : rows)
         {
            sb.append(row.getString("TITLE"));
            sb.append('\n');
            sb.append(row.getString("TEXT"));
            sb.append("\n\n");
         }
         result = sb.toString();
      }
      return result;
   }
296455
def __rowResultToQuote(self, row):
        ''' '''
        keyValues = row.columns
        for field in QUOTE_FIELDS:
            key = "%s:%s" % (HBaseDAM.QUOTE, field)
            if 'time' != field and keyValues[key].value:
                keyValues[key].value = float(keyValues[key].value)

        return Quote(*[keyValues["%s:%s" % (HBaseDAM.QUOTE, field)].value for field in QUOTE_FIELDS])
1264269
public Collection<Note> notes(NoteFilter filter) {
        return get(Note.class, (filter != null) ? filter : new NoteFilter());
    }
724101
public Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows)
   {
      Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
      for (Row row : rows)
      {
         Integer workPatternID = row.getInteger("TIME_ENTRYID");
         List<Row> list = map.get(workPatternID);
         if (list == null)
         {
            list = new LinkedList<Row>();
            map.put(workPatternID, list);
         }
         list.add(row);
      }
      return map;
   }
716173
function(rows){
			if (rows.length === 0)
				return onDone();
			db.takeConnectionFromPool(function (conn) {
				async.eachSeries(
					rows,
					function (row, cb) {
						breadcrumbs.add("--------------- archiving uncovered unit " + row.unit);
						storage.readJoint(conn, row.unit, {
							ifNotFound: function () {
								throw Error("nonserial unit not found?");
							},
							ifFound: function (objJoint) {
								mutex.lock(["write"], function(unlock){
									var arrQueries = [];
									conn.addQuery(arrQueries, "BEGIN");
									archiving.generateQueriesToArchiveJoint(conn, objJoint, 'uncovered', arrQueries, function(){
										conn.addQuery(arrQueries, "COMMIT");
										async.series(arrQueries, function(){
											breadcrumbs.add("------- done archiving "+row.unit);
											var parent_units = storage.assocUnstableUnits[row.unit].parent_units;
											storage.forgetUnit(row.unit);
											parent_units.forEach(function(parent_unit){
												if (!storage.assocUnstableUnits[parent_unit]) // the parent is already stable
													return;
												var bHasChildren = false;
												for (var unit in storage.assocUnstableUnits){
													var o = storage.assocUnstableUnits[unit];
													if (o.parent_units.indexOf(parent_unit) >= 0)
														bHasChildren = true;
												}
												if (!bHasChildren)
													storage.assocUnstableUnits[parent_unit].is_free = 1;
											});
											unlock();
											cb();
										});
									});
								});
							}
						});
					},
					function () {
						conn.query(
							"UPDATE units SET is_free=1 WHERE is_free=0 AND is_stable=0 \n\
							AND (SELECT 1 FROM parenthoods WHERE parent_unit=unit LIMIT 1) IS NULL",
							function () {
								conn.release();
								if (rows.length > 0)
									return purgeUncoveredNonserialJoints(false, onDone); // to clean chains of bad units
								onDone();
							}
						);
					}
				);
			});
		}
510266
private ObjectNode convertRow(ObjectNode reuse, RowTypeInfo info, Row row) {
		if (reuse == null) {
			reuse = mapper.createObjectNode();
		}
		final String[] fieldNames = info.getFieldNames();
		final TypeInformation<?>[] fieldTypes = info.getFieldTypes();

		// validate the row
		if (row.getArity() != fieldNames.length) {
			throw new IllegalStateException(String.format(
				"Number of elements in the row '%s' is different from number of field names: %d", row, fieldNames.length));
		}

		for (int i = 0; i < fieldNames.length; i++) {
			final String name = fieldNames[i];

			final JsonNode fieldConverted = convert(reuse, reuse.get(name), fieldTypes[i], row.getField(i));
			reuse.set(name, fieldConverted);
		}

		return reuse;
	}
972776
String tableToString(Table table)
    {
    	StringBuilder strb = new StringBuilder();
    	for(int row = 0; row < table.getRowCount(); row++)
    	{
    		for(int col = 0; col < table.getColumnCount(); col++)
    		{
    			strb.append(table.get(row, col));
    			strb.append(" ");
    		}
    		strb.append("\n");
    	}
    	
    	return strb.toString();
    }
1358643
public static INDArray toMatrix(List<Row> rows) {
        INDArray ret = Nd4j.create(rows.size(), rows.get(0).size());
        for (int i = 0; i < ret.rows(); i++) {
            for (int j = 0; j < ret.columns(); j++) {
                ret.putScalar(i, j, rows.get(i).getDouble(j));
            }
        }
        return ret;
    }
1087721
public Map<Integer, List<Row>> createWorkPatternAssignmentMap(List<Row> rows)
   {
      Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
      for (Row row : rows)
      {
         Integer calendarID = row.getInteger("WORK_PATTERN_ASSIGNMENTID");
         List<Row> list = map.get(calendarID);
         if (list == null)
         {
            list = new LinkedList<Row>();
            map.put(calendarID, list);
         }
         list.add(row);
      }
      return map;
   }
495880
private RowSet prepareFromRow(List<Object> rows, RowSet rowSet) throws Exception {
    for (Object row : rows) {
      rowSet.addRow((Object[]) row);
    }
    return rowSet;
  }
58486
public function extractBookmarksFromRows(array $rows): array
    {
        $bookmarks = [];
        foreach ($rows as $row) {
            $bookmarks[] = $this->extractBookmarkFromRow($row);
        }

        return $bookmarks;
    }
70693
public static function createFromArray(array $rows)
    {
        $logs = [];

        foreach ($rows as $row) {
            $logs[] = TaskLogEntity::createFromArray($row);
        }

        return new static($logs);
    }
347866
def to_s
      rendered_rows = [separator] + text_table_rows.map(&:to_s) + [separator]
      rendered_rows.unshift [separator, text_table_head.to_s] if head
      rendered_rows << [text_table_foot.to_s, separator] if foot
      rendered_rows.join
    end
558414
private static byte[] writeCsv(String[] columnHeaders, List<String[]> rows) throws IOException {
    return writeCsv(columnHeaders, rows.stream().toArray(String[][]::new));
  }
464510
private void importRow(Row row) {
        this.cells = new ArrayList();
        this.width = this.document.getDocumentHeader().getPageSetting().getPageWidth() - this.document.getDocumentHeader().getPageSetting().getMarginLeft() - this.document.getDocumentHeader().getPageSetting().getMarginRight();
        this.width = (int) (this.width * this.parentTable.getTableWidthPercent() / 100);
        
        int cellRight = 0;
        int cellWidth = 0;
        for(int i = 0; i < row.getColumns(); i++) {
            cellWidth = (int) (this.width * this.parentTable.getProportionalWidths()[i] / 100);
            cellRight = cellRight + cellWidth;
            
            Cell cell = (Cell) row.getCell(i);
            RtfCell rtfCell = new RtfCell(this.document, this, cell);
            rtfCell.setCellRight(cellRight);
            rtfCell.setCellWidth(cellWidth);
            this.cells.add(rtfCell);
        }
    }
900847
public ENTITY mapFromRow(Row row) {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug(format("Map row %s back to entity of type %s", row, entityClass.getCanonicalName()));
        }

        validateNotNull(row, "Row object should not be null");
        final String tableName = row.getColumnDefinitions().asList().get(0).getTable();
        final String entityTableName = meta_internal.getTableOrViewName();
        validateTableTrue(entityTableName.equals(tableName),
                "CQL row is from table '%s', it cannot be mapped to entity '%s' associated to table '%s'",
                tableName, entityClass.getCanonicalName(), entityTableName);
        return meta_internal.createEntityFrom(row);
    }
1287403
public static RowMajorSparseMatrix from1DArray(int rows, int columns, double[] array) {
        return CRSMatrix.from1DArray(rows, columns, array);
    }