Christian Sousa
05/28/2020, 11:36 AMclass LeftAlignedCollectionViewFlowLayout: UICollectionViewFlowLayout {
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
let attributes = super.layoutAttributesForElements(in: rect)
var leftMargin = sectionInset.left
var maxY: CGFloat = -1.0
attributes?.forEach { layoutAttribute in
if layoutAttribute.frame.origin.y >= maxY {
leftMargin = sectionInset.left
}
layoutAttribute.frame.origin.x = leftMargin
leftMargin += layoutAttribute.frame.width + minimumInteritemSpacing
maxY = max(layoutAttribute.frame.maxY , maxY)
}
return attributes
}
}
Asking this because if I try to do:
class LeftLayout: UICollectionViewFlowLayout {
constructor(): super()
override fun layoutAttributesForElementsInRect(rect: CGSize){
}
}
It simply tells me that theres nothing to override..Luigi Scarminio
05/28/2020, 1:13 PMmingwX86("mingw"){
compilations["main"].cinterops{
val scape2 by creating {
val cafmSrc = "C:/Software/SCAP E2/CAFM_src"
val scapSrc = "C:/Software/SCAP E2/TO/ETME2"
val modifiedSrc = "C:/Software/SCAP E2/Modified CAFM files"
includeDirs.headerFilterOnly(cafmSrc, scapSrc, modifiedSrc)
extraOpts.add("-verbose")
}
}
binaries {
executable()
}
}
This is my scape2.def file:
headers = scape2.h
headerFilter = scape2.h \ GEO_API_SCAPTO.h
linkerOpts.mingw = -LC:/Users/lscarmin/git/calculation-module4 -lscape2
I was expecting that the dll name to be scape2.dll.
But when I run the executable, it asks for ETME2.dll!
If I rename scape2.dll to ETME2.dll, the code works.Kweku
05/29/2020, 2:30 AMaleksey.tomin
05/29/2020, 3:45 AMreturn runBlocking {
<http://client.post|client.post><String>(url) {
contentType(ContentType.Application.Json)
body = json
}
}
When server response 200 it’s OK
But when I make wrong request and server response 400 Bad Request
I have got error on <http://client.post|client.post><String>(url)
line
kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlin.collections.HashMap@d7847578
at 0 xpoint-sdk.kexe 0x0000000103325b07 kfun:kotlin.Throwable.<init>(kotlin.String?)kotlin.Throwable + 87 (/Users/teamcity3/buildAgent/work/4d622a065c544371/runtime/src/main/kotlin/kotlin/Throwable.kt:22:37)
at 1 xpoint-sdk.kexe 0x000000010331efb5 kfun:kotlin.Exception.<init>(kotlin.String?)kotlin.Exception + 85 (/Users/teamcity3/buildAgent/work/4d622a065c544371/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:44)
at 2 xpoint-sdk.kexe 0x000000010331f155 kfun:kotlin.RuntimeException.<init>(kotlin.String?)kotlin.RuntimeException + 85 (/Users/teamcity3/buildAgent/work/4d622a065c544371/runtime/src/main/kotlin/kotlin/Exceptions.kt:34:44)
at 3 xpoint-sdk.kexe 0x0000000103353d75 kfun:kotlin.native.concurrent.InvalidMutabilityException.<init>(kotlin.String)kotlin.native.concurrent.InvalidMutabilityException + 85 (/Users/teamcity3/buildAgent/work/4d622a065c544371/runtime/src/main/kotlin/kotlin/native/concurrent/Freezing.kt:22:60)
at 4 xpoint-sdk.kexe 0x00000001033555f8 ThrowInvalidMutabilityException + 680 (/Users/teamcity3/buildAgent/work/4d622a065c544371/runtime/src/main/kotlin/kotlin/native/concurrent/Internal.kt:90:11)
...
What have I done wrong?saket
05/29/2020, 4:24 AMPatrick
05/29/2020, 12:19 PMdlltool.exe -d test.def -l test.lib.a
This gives me a static lib loader (as far as I can understand)
Now I need to compile it using gcc:
gcc main.c -o main -L. -ltest
This works and returns main.exe. However when I execute it I get this error:
---------------------------
main.exe - System Error
---------------------------
The code execution cannot proceed because (null).DLL was not found. Reinstalling the program may fix this problem.
---------------------------
OK
---------------------------
Ken Gilmer
05/29/2020, 5:47 PMhannesstruss
06/01/2020, 11:35 AMapi
dependency on module B. Module B contains some utilities. Only classes/functions from module B that are used in module A end up in my iOS framework, the rest seem to be excluded. How can I make sure they're included in the framework? Should I declare module B to be a framework on its own?serebit
06/02/2020, 5:32 PMaleksey.tomin
06/03/2020, 7:40 PMDiscarding message for event 0 because of too many unprocessed messages
How can I process messages from OS?Omar Mainegra
06/04/2020, 2:42 PMMKPolyline
aleksey.tomin
06/04/2020, 4:03 PMOmar Mainegra
06/04/2020, 5:39 PMNSData().initWithBase64EncodedString(str, 0)
, but the function is deprecated and doesn't compile, the error says: Use factory method instead
, but I can't find the equivalentserebit
06/04/2020, 6:32 PMyigit
06/05/2020, 2:22 AMaleksey.tomin
06/05/2020, 9:55 AMmemScoped {
val locator = alloc<IWbemLocator>()
val pointer: CValuesRef<LPVOIDVar> = locator.???
I try val pointer: CValuesRef<LPVOIDVar> = CPointerVarOf<LPVOID>(locator.ptr.rawValue).ptr
but it leads compile-time internal error.
If I create pointer by
val ptr = alloc<COpaquePointerVar>()
How I can get IWbemLocator
?Mananpoddarm
06/05/2020, 7:43 PMnapperley
06/08/2020, 2:02 AMgildor
06/08/2020, 3:05 AMMananpoddarm
06/08/2020, 10:01 AMaleksey.tomin
06/09/2020, 4:48 AMWorker
and executeAfter
but have not understood how I have to do this.aleksey.tomin
06/09/2020, 9:11 AMfunc
inline fun javaClassName(noinline func: () -> Unit) = func.javaClass.name
aleksey.tomin
06/09/2020, 10:31 AMif (isDebug) println("we a here")
Maybe write something in build.gradle.kts
?sena
06/09/2020, 2:13 PM> Could not resolve all files for configuration ':self-common:androidNativeArm32CompileKlibraries'.
> Could not resolve org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0-1.4-M2.
Required by:
project :self-common
> Unable to find a matching variant of org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0-1.4-M2:
- Variant 'iosArm32-api' capability org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0-1.4-M2:
- Incompatible attribute:
- Required org.jetbrains.kotlin.native.target 'android_arm32' and found incompatible value 'ios_arm32'.
- Other attributes:
- Found org.gradle.status 'release' but wasn't required.
- Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'.
- Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'.
- Variant 'iosArm32-iosArm32MetadataElements' capability org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0-1.4-M2:
If this is is stated somewhere obvious apologies as I haven’t seen it.Nico Buescher
06/09/2020, 8:22 PMbasher
06/10/2020, 2:18 AMhmole
06/10/2020, 9:58 PMhmole
06/10/2020, 10:40 PM@Deprecated("Unable to import this declaration"
. Is there any way to generate "unsafe" bindings or something like that?
The header in question is sqlite3ext.h
and targets are Android NDKSamyak Jain
06/12/2020, 8:41 AMtasks {
withType<KotlinCompile> {
kotlinOptions.jdkHome = rootProject.extra["JDK_18"] as String
kotlinOptions.languageVersion = "1.2"
kotlinOptions.apiVersion = "1.2"
kotlinOptions.freeCompilerArgs += listOf("-Xskip-metadata-version-check")
}
named<ProcessResources>("processResources") {
val propertiesToExpand = mapOf("projectVersion" to project.version)
for ((name, value) in propertiesToExpand) {
inputs.property(name, value)
}
filesMatching("project.properties") {
expand("projectVersion" to project.version)
}
}
named<Jar>("jar") {
callGroovy("manifestAttributes", manifest, project)
}
named<ValidateTaskProperties>("validateTaskProperties") {
failOnWarning = true
}
named<DokkaTask>("dokka") {
outputFormat = "markdown"
includes = listOf("$projectDir/Module.md")
}
}
I wanted it to convert it Groovy: tasks {
withType(KotlinCompile) {
kotlinOptions.jdkHome = rootProject.ext["JDK_18"] as String
kotlinOptions.languageVersion = "1.2"
kotlinOptions.apiVersion = "1.2"
kotlinOptions.freeCompilerArgs += ["-Xskip-metadata-version-check"]
}
processResources {
val propertiesToExpand = {"projectVersion" = project.version}
for ((name, value) in propertiesToExpand) {
inputs.property(name, value)
}
filesMatching("project.properties") {
expand("projectVersion" to project.version)
}
}
jar {
callGroovy("manifestAttributes", manifest, project)
}
validateTaskProperties {
failOnWarning = true
}
dokka {
outputFormat = "markdown"
includes = ["$projectDir/Module.md"]
}
}
katokay
06/12/2020, 5:56 PM