user

スポンサーリンク
Java

【Java】配列操作

Javaで配列を使用するのは、よっぽど性能が求められる場面に限られており、むしろ型安全が保障されない場合があるので基本的にListを使用した方がいいです。そもそも配列の標準ライブラリが貧弱で、Listでは簡単に実現できるような操作をするの...
Java

【Java】Genericsまとめ

何度か書籍で読んで、何度か作成したこともあって分かった気になっていたが、全然細かいところまで理解できていなかったので、自分でまとめてみる 総論 単語 単語説明 例Generic Type Genericな型 List...
Java

【Lombok】@Accessorsではなく、lombok.configを使う

Lombok Javaに使用される汎用ライブラリで、@Getter, @Setter等のannotationを使用することで、getter/setterをコンパイル時に自動生成してくれるので、コードベースが非常にシンプルになります。...
Android

【Kotlin】init内での非同期処理ミスケース

①init内で発火するCoroutineでasyncして、他のsuspend関数でawaitする場合の実装ミス タイミング問題で表面化しない可能性があるので厄介です。 initはsuspend関数ではないため、coroutin...
Android

SharedFlow(StateFlow)かObserverパターンか

SharedFlow, StateFlowの違いについて StateFlowはSharedFlowの特殊版。 初期値を有する新しいSubscriberには最新の値をemit最新値以外のCacheはしないresetReplayC...
Android

Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used

原因 Main Threadでの実行が必要なAPIを使用している。 対策 公式の回答がこちら DispatcherをMainに置き換える 基本的にこちらの方法で問題ありません。ベストプラクティスで...
Android

Method parse in android.net.Uri not mocked【Kotlin】【Unit Test】【Android】

UriがMockされていない UnitTestでAndroid frameworkとして定義されているUriをそのまま用いると上記のようなErrorを発報します。構成はKotlin + JUnit5 + Androidです。 ...
Android

【Jetpack Compose】Listの変更をRecompose起点にする

mutableStateListOf ListをStateとしてComposeのrecompose起点としたい場合にはmutableStateListOf()関数を用いてListを作成すればよい。 viewmodel層に作成し...
Android

java.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed. One of the common reasons is nesting layouts like LazyColumn and Column(Modifier.verticalScroll()). If you want to add a header before the list of items please add a header as a separate item() before the main items() inside the LazyColumn scope. There are could be other reasons for this to happen: your ComposeView was added into a LinearLayout with some weight, you applied Modifier.wrapContentSize(unbounded = true) or wrote a custom layout. Please try to remove the source of infinite constraints in the hierarchy above the scrolling container.

タイトルのエラーはLazyColumnやColumn(Modifier.verticalScroll())等がネストしている時に発生します。 2つネストすると確かにスクロール入力がどちらになるか分からないし、高さが決められないですね...
ネットワーク

iBGPとIGPの違い

以下のページが分かりやすい。 iBGPとIGPはAS内のルーティングに使用される点は同一だが、根本的にiBGPはAS間のルーティングを目的とし、IGPはAS内のルーティングにのみ注目し、iBGPルータまでの経路を作成することが目的と...
スポンサーリンク
タイトルとURLをコピーしました