https://kotlinlang.org
Join Slack
How can I achieve `UNION` operator with Exposed DSL? I want to execute something like: ```SELECT MAX...
l

lenqnr

over 6 years ago
How can I achieve
UNION
operator with Exposed DSL? I want to execute something like:
SELECT MAX(views) FROM (
    SELECT views FROM articles WHERE user_id = 1
    UNION ALL
    SELECT views FROM comments WHERE user_id = 1
) as writings
l
t
  • 2
  • 2
  • 305
Is there any example out there using iOS/macOS `NSNotificationCenter` with Kotlin/Native?
l

louiscad

over 6 years ago
Is there any example out there using iOS/macOS
NSNotificationCenter
with Kotlin/Native?
☝️ 1
l
r
+2
  • 4
  • 12
  • 305
Why `RoomDatabase.withTransaction` is defined in `RoomDatabase.android.kt` and not available commonl...
o

Olivier Patry

about 1 year ago
Why
RoomDatabase.withTransaction
is defined in
RoomDatabase.android.kt
and not available commonly? Is the
db.useWriterConnection { it.immediateTransaction }
the way to go in shared code? It feels like a workaround, right?
o
p
  • 2
  • 4
  • 304
Is there any way to ask run-time permissions for KMP projects ?
h

Harshad Pawar

about 1 year ago
Is there any way to ask run-time permissions for KMP projects ?
h
f
t
  • 3
  • 6
  • 304
Why does `runTest` automatically advance until idle instead of pausing and letting the test advance ...
l

Lukasz Kalnik

over 1 year ago
Why does
runTest
automatically advance until idle instead of pausing and letting the test advance the coroutine?
l
j
+2
  • 4
  • 75
  • 304
How to clean up data store after each test in unit tests? Using ``` @After fun tearDown() = ...
a

Abhimanyu

about 2 years ago
How to clean up data store after each test in unit tests? Using
@After
    fun tearDown() = testScope.runTest {
        testDataStore.edit {
            it.clear()
        }
        testScope.cancel()
    }
Getting error
Only a single call to
runTest
can be performed during one test.
As both the
test
method and
tearDown()
uses
runTest
Stackoverflow question - https://stackoverflow.com/questions/77025162/data-store-clean-up-in-unit-test-error-only-a-single-call-to-runtest-can-be Please help. Thanks
a
s
p
  • 3
  • 3
  • 304
I have an expectation for `Parcelable` and `Parcelize` in my KMP module defined like so: ```expect i...
f

Fabio

over 2 years ago
I have an expectation for
Parcelable
and
Parcelize
in my KMP module defined like so:
expect interface Parcelable

@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
expect annotation class Parcelize()
and fulfilled on Android like so:
actual typealias Parcelable = android.os.Parcelable

actual typealias Parcelize = kotlinx.parcelize.Parcelize
This works well at runtime, however classes in the Android module that are themselves annotated with
kotlinx.parcelize.Parcelize
and have properties with types from the KMP module which are Parcelable/Parcelize cause an error to be shown in the IDE:
Type is not directly supported by 'Parcelize'. Annotate the parameter type with '@RawValue' if you want it to be serialized using 'writeValue()'
Does anyone know of a way to silence or suppress these errors? Or am I doing something wrong?
f
z
a
  • 3
  • 3
  • 304
I have a question regarding how compose ios renders. Does it use its own rendering engine or does it...
c

Cezar Olteanu

over 2 years ago
I have a question regarding how compose ios renders. Does it use its own rendering engine or does it compile to native SwiftUI elements? And what is the performance hit regarding compose ios? I imagine it does not have native performance, but how far from native it is?
👍 2
c
m
+3
  • 5
  • 5
  • 304
I’m trying to send a broadcast command with `ProcessBuilder`. It “works”, but the output is differen...
g

Guilherme Delgado

almost 3 years ago
I’m trying to send a broadcast command with
ProcessBuilder
. It “works”, but the output is different if I run the same command via terminal:
~ adb shell am broadcast -p com.sample -a sample.action -e "extra" "bla bla"
produces (correctly):
Broadcasting: Intent { act=sample.action flg=0x400000 pkg=com.sample (has extras) }
Broadcast completed: result=0
but the same command via
ProcessBuilder
produces:
Broadcasting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x400000 pkg= -p }
Broadcast completed: result=0
any idea why? 🤔
😶 6
g
d
+3
  • 5
  • 11
  • 304
Does anyone know if there's a way to link a cinterop dynamic .so library from a relative path within...
j

Jeff Lockhart

about 3 years ago
Does anyone know if there's a way to link a cinterop dynamic .so library from a relative path within the project? This workaround seems to only work for static libraries.
j
t
+2
  • 4
  • 4
  • 304
Previous231232233Next

kotlinlang

A modern programming language that makes developers happier.

Powered by