Сообщения

Сообщения за 2021

Clean Architecture another аля дядя Боб

Clean Architecture : Layers ( from the most abstract to the most concrete ) : domain : abstract data structures uc : "use cases", the pure business logic implem : implementations of the interfaces used in the business logic (uc layer) infra : setup/configuration of the implementation Golden rules : a layer never imports something from a layer below it 3rd-party libraries are forbidden in the 2 topmost layers  

kafka конспект однако

------------------------ part 1 ---------------------  schema evolution 1: avro - в сообщении содержится схема данных. предоставляет API для сериализации данных соответственно схеме и десериализации по схеме. exactly once processing: тут проблема в том что нет контроля над тем какой partition будет назначен. есть две стратегии: range: round robin: rebalance listener: случай когда consumer group coordinator запустил rebalance и consumer, обработавший часть сообщений хочет commit offset. чтобы это сделать надо знать: how to commit a particular offset? how to know that a rebalance is triggered? ConsumerRebalanceListener onPartitionsRevoked - будет вызван перед переключением partition. onPartitionsAssigned - будет вызвано после назначения partition и перед передачей сообщений. offset management: current offset: kafka broker у себя хранит указатель на на отправленные сообщения клонкретному consumer. maintain offset from which send next banch of mess

java serialize object for json

commonlang 3  //      var cloneDto = SerializationUtils.clone(puvMv26InfoPaymentDto); //      cloneDto.setReportingPeriod("3");

totp 2fa c# net core reactjs

 https://deblokt.com/2020/01/24/07-identityserver4-mfa-totp-net-core-3-1/ рабочая версия https://github.com/kspearrin/Otp.NET <img src="data:image/png;base64, ..." /> https://github.com/esp0/googleAuthNet.git тут старая версия. it appears for google auth app its need to be used special algo  this lib uses different algo so it's not work with google auth app : https://github.com/brandonpotter/GoogleAuthenticator

entity framework create entities from existed db

 dotnet ef dbcontext scaffold "server=localhost;user=user;password=1234;persistsecurityinfo=True;database=osa_market_8;port=3308;" MySql.Data.EntityFrameworkCore -o Model -c "AdventureContext" -f -d -v 

jetbrains rider bug xaml preview

 https://youtrack.jetbrains.com/issue/RIDER-33531?_ga=2.108087554.126173708.1615651299-1522781369.1608814403

xaml list view items interaction

 https://stackoverflow.com/questions/40796022/how-to-get-the-index-of-listview-row-on-button-click https://stackoverflow.com/questions/3600801/wpf-listview-getting-row-values https://stackoverflow.com/questions/47548061/get-content-of-textbox-which-is-located-in-listview-wpf