return Objects.compare(o1, o2,
Comparator.<Worker, String>comparing(key -> key.fio().surname())
.thenComparing(key -> key.fio().name())
.thenComparing(Worker::salary)
.thenComparing(Worker::hiredOn));
class WorkerComparator implements Comparator<Worker> {
final static Comparator<String> safeString = Comparator.nullsFirst(Comparator.naturalOrder());
final static Comparator<Integer> safeInteger = Comparator.nullsFirst(Comparator.naturalOrder());
final static Comparator<LocalDateTime> safeLocalDateTime = Comparator.nullsFirst(Comparator.naturalOrder());
@Override
public int compare(Worker o1, Worker o2) {
return Objects.compare(o1, o2,
Comparator.<Worker, String>comparing(key -> key.fio().surname(), safeString)
.thenComparing(key -> key.fio().name(), safeString)
.thenComparing(Worker::salary, safeInteger)
.thenComparing(Worker::hiredOn, safeLocalDateTime));
}
}
psql -h %DBHOST% -p %DBPORT% -U %USERNAME% -d %DBNAME% -a -n ^
-c "\copy (select * from part_manager.deltaresultstart) to '%CSVDIR%\part_manager.deltaresultstart.dump' with (format binary);" ^
-c "\copy (select * from part_manager.vehicledataresult) to '%CSVDIR%\part_manager.vehicledataresult.dump' with (format binary);"
modelMapper.addMappings(new PropertyMap<Segment, SegmentEntity>() {
@Override
protected void configure() {
skip(destination.getStartNode());
skip(destination.getTargetNode());
}
});
@Bean(name = "dwhTransactionManager")
@Primary
public PlatformTransactionManager dwhTransactionManager(@Qualifier("dwhDatasource") DataSource ds) {
return new DataSourceTransactionManager(ds);
}
работать то здесь совсем невозможно(непонятно как создавать автоинкрементирование, внешние ключи, отсутствие некоторых типов и многое другое).
<div class="content">
готовить скриптом и добавлять на страницу целиком. import { useEffect, useState } from "react";
export default function MyComponent() {
const [val1, setVal1] = useState();
const [val2, setVal2] = useState();
useEffect(() => setVal2(val1),[val1]);
return <>
<input type="text" value={val1} onChange={(ev) => setVal1(ev.target.value)} />
<input type="text" value={val2} onChange={(ev) => setVal2(ev.target.value)}/>
<div>{val2}</div>
</>
}
useEffect(() => {
setIsOpen(false);
setUpImg(null);
setCompletedCrop(null);
},[uploaded])