问:
How do I fix this Gradle Build Error while building my flutter app
I am trying to build my flutter apk with the command

```<code>flutter build apk --split-per-abi
</code>```

But I get the following error:

```<code> Building with sound null safety

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':path_provider_android'.
> Could not resolve all files for configuration ':path_provider_android:classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:repository:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.ddms:ddmlib:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:aaptcompiler:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.analytics-library:shared:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.lint:lint-model:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > androidx.databinding:databinding-compiler-common:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder-model:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:gradle-api:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1 > com.android.tools:common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.analytics-library:tracker:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.build:manifest-merger:30.3.1
  > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.31/kotlin-stdlib-jdk8-1.5.31.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.31/kotlin-stdlib-jdk8-1.5.31.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve org.bouncycastle:bcpkix-jdk15on:1.67.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.build:apkzlib:7.3.1
  > Could not resolve org.bouncycastle:bcpkix-jdk15on:1.67.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.67/bcpkix-jdk15on-1.67.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.67/bcpkix-jdk15on-1.67.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve com.google.protobuf:protobuf-java:3.17.2.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.ddms:ddmlib:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:aapt2-proto:7.3.1-8691043
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:aaptcompiler:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-device-provider-ddmlib-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-device-provider-gradle-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-host-coverage-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.analytics-library:shared:30.3.1 > com.android.tools.analytics-library:protos:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.analytics-library:tracker:30.3.1
      > Could not resolve com.google.protobuf:protobuf-java:3.17.2.
     > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve com.google.protobuf:protobuf-java-util:3.17.2.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
  > Could not resolve com.google.protobuf:protobuf-java-util:3.17.2.
     > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.17.2/protobuf-java-util-3.17.2.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.17.2/protobuf-java-util-3.17.2.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve io.grpc:grpc-core:1.39.0.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
  > Could not resolve io.grpc:grpc-core:1.39.0.
     > Could not get resource 'https://repo.maven.apache.org/maven2/io/grpc/grpc-core/1.39.0/grpc-core-1.39.0.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/io/grpc/grpc-core/1.39.0/grpc-core-1.39.0.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve io.grpc:grpc-netty:1.39.0.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
  > Could not resolve io.grpc:grpc-netty:1.39.0.
     > Could not get resource 'https://repo.maven.apache.org/maven2/io/grpc/grpc-netty/1.39.0/grpc-netty-1.39.0.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/io/grpc/grpc-netty/1.39.0/grpc-netty-1.39.0.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve io.grpc:grpc-protobuf:1.39.0.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
  > Could not resolve io.grpc:grpc-protobuf:1.39.0.
     > Could not get resource 'https://repo.maven.apache.org/maven2/io/grpc/grpc-protobuf/1.39.0/grpc-protobuf-1.39.0.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/io/grpc/grpc-protobuf/1.39.0/grpc-protobuf-1.39.0.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve io.grpc:grpc-stub:1.39.0.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
  > Could not resolve io.grpc:grpc-stub:1.39.0.
     > Could not get resource 'https://repo.maven.apache.org/maven2/io/grpc/grpc-stub/1.39.0/grpc-stub-1.39.0.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/io/grpc/grpc-stub/1.39.0/grpc-stub-1.39.0.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
    > Could not resolve org.bouncycastle:bcprov-jdk15on:1.67.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.build:apkzlib:7.3.1
  > Could not resolve org.bouncycastle:bcprov-jdk15on:1.67.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.67/bcprov-jdk15on-1.67.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.67/bcprov-jdk15on-1.67.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
    > Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.5.31.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
  > Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.5.31.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.5.31/kotlin-reflect-1.5.31.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.5.31/kotlin-reflect-1.5.31.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve org.apache.httpcomponents:httpcore:4.4.13.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdklib:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.analytics-library:crash:30.3.1
  > Could not resolve org.apache.httpcomponents:httpcore:4.4.13.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
</code>```

Could not resolve org.apache.httpcomponents:httpclient:4.5.13.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.analytics-library:crash:30.3.1
> Could not resolve org.apache.httpcomponents:httpclient:4.5.13.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve javax.annotation:javax.annotation-api:1.3.2.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
> Could not resolve javax.annotation:javax.annotation-api:1.3.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve org.apache.httpcomponents:httpclient:4.5.13.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > org.apache.httpcomponents:httpmime:4.5.6
> Could not resolve org.apache.httpcomponents:httpclient:4.5.13.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve com.google.protobuf:protobuf-java:3.17.2.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:bundletool:1.9.0
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.google.crypto.tink:tink:1.3.0-rc2
> Could not resolve com.google.protobuf:protobuf-java:3.17.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve com.google.protobuf:protobuf-java-util:3.17.2.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:bundletool:1.9.0
> Could not resolve com.google.protobuf:protobuf-java-util:3.17.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.17.2/protobuf-java-util-3.17.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.17.2/protobuf-java-util-3.17.2.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.71.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build.jetifier:jetifier-core:1.0.0-beta10
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.71.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.71/kotlin-stdlib-1.3.71.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.71/kotlin-stdlib-1.3.71.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Failed to notify project evaluation listener.
Could not get unknown property 'android' for project ':path_provider_android' of type org.gradle.api.Project.
Could not get unknown property 'android' for project ':path_provider_android' of type org.gradle.api.Project.

```<code>* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 59s
Running Gradle task 'assembleRelease'...                           61.1s
[!] Gradle threw an error while downloading artifacts from the network.
</code>```

NOTE: When I last time built another app, it built correctly but with a warning about something jdk version mismatch i dont remember exactly...

Here is my build.gradle file:

```<code>buildscript {
ext.kotlin_version = '1.6.10'
repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }
}

dependencies {
    classpath 'com.android.tools.build:gradle:7.1.2'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
delete rootProject.buildDir
}
</code>```

Body:
I am trying to build my flutter apk with the command

flutter build apk --split-per-abi

But I get the following error:

 Building with sound null safety

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':path_provider_android'.
> Could not resolve all files for configuration ':path_provider_android:classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:repository:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.ddms:ddmlib:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:aaptcompiler:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.analytics-library:shared:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.lint:lint-model:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > androidx.databinding:databinding-compiler-common:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder-model:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:gradle-api:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1 > com.android.tools:common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.analytics-library:tracker:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.build:manifest-merger:30.3.1
  > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.31/kotlin-stdlib-jdk8-1.5.31.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.31/kotlin-stdlib-jdk8-1.5.31.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve org.bouncycastle:bcpkix-jdk15on:1.67.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.build:apkzlib:7.3.1
  > Could not resolve org.bouncycastle:bcpkix-jdk15on:1.67.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.67/bcpkix-jdk15on-1.67.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.67/bcpkix-jdk15on-1.67.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve com.google.protobuf:protobuf-java:3.17.2.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.ddms:ddmlib:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:aapt2-proto:7.3.1-8691043
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:aaptcompiler:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-device-provider-ddmlib-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-device-provider-gradle-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-host-coverage-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.analytics-library:shared:30.3.1 > com.android.tools.analytics-library:protos:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.analytics-library:tracker:30.3.1
      > Could not resolve com.google.protobuf:protobuf-java:3.17.2.
     > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve com.google.protobuf:protobuf-java-util:3.17.2.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
  > Could not resolve com.google.protobuf:protobuf-java-util:3.17.2.
     > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.17.2/protobuf-java-util-3.17.2.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.17.2/protobuf-java-util-3.17.2.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve io.grpc:grpc-core:1.39.0.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
  > Could not resolve io.grpc:grpc-core:1.39.0.
     > Could not get resource 'https://repo.maven.apache.org/maven2/io/grpc/grpc-core/1.39.0/grpc-core-1.39.0.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/io/grpc/grpc-core/1.39.0/grpc-core-1.39.0.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve io.grpc:grpc-netty:1.39.0.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
  > Could not resolve io.grpc:grpc-netty:1.39.0.
     > Could not get resource 'https://repo.maven.apache.org/maven2/io/grpc/grpc-netty/1.39.0/grpc-netty-1.39.0.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/io/grpc/grpc-netty/1.39.0/grpc-netty-1.39.0.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve io.grpc:grpc-protobuf:1.39.0.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
  > Could not resolve io.grpc:grpc-protobuf:1.39.0.
     > Could not get resource 'https://repo.maven.apache.org/maven2/io/grpc/grpc-protobuf/1.39.0/grpc-protobuf-1.39.0.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/io/grpc/grpc-protobuf/1.39.0/grpc-protobuf-1.39.0.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve io.grpc:grpc-stub:1.39.0.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
  > Could not resolve io.grpc:grpc-stub:1.39.0.
     > Could not get resource 'https://repo.maven.apache.org/maven2/io/grpc/grpc-stub/1.39.0/grpc-stub-1.39.0.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/io/grpc/grpc-stub/1.39.0/grpc-stub-1.39.0.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
    > Could not resolve org.bouncycastle:bcprov-jdk15on:1.67.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:builder:7.3.1 > com.android.tools.build:apkzlib:7.3.1
  > Could not resolve org.bouncycastle:bcprov-jdk15on:1.67.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.67/bcprov-jdk15on-1.67.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.67/bcprov-jdk15on-1.67.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
    > Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.5.31.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdk-common:30.3.1
  > Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.5.31.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.5.31/kotlin-reflect-1.5.31.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-reflect/1.5.31/kotlin-reflect-1.5.31.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
   > Could not resolve org.apache.httpcomponents:httpcore:4.4.13.
 Required by:
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools:sdklib:30.3.1
     project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.analytics-library:crash:30.3.1
  > Could not resolve org.apache.httpcomponents:httpcore:4.4.13.
     > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.pom'.
        > Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.pom'.
           > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)

Could not resolve org.apache.httpcomponents:httpclient:4.5.13.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.analytics-library:crash:30.3.1
> Could not resolve org.apache.httpcomponents:httpclient:4.5.13.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve javax.annotation:javax.annotation-api:1.3.2.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.3.1
> Could not resolve javax.annotation:javax.annotation-api:1.3.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve org.apache.httpcomponents:httpclient:4.5.13.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > org.apache.httpcomponents:httpmime:4.5.6
> Could not resolve org.apache.httpcomponents:httpclient:4.5.13.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve com.google.protobuf:protobuf-java:3.17.2.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:bundletool:1.9.0
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.google.crypto.tink:tink:1.3.0-rc2
> Could not resolve com.google.protobuf:protobuf-java:3.17.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.17.2/protobuf-java-3.17.2.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve com.google.protobuf:protobuf-java-util:3.17.2.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build:bundletool:1.9.0
> Could not resolve com.google.protobuf:protobuf-java-util:3.17.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.17.2/protobuf-java-util-3.17.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.17.2/protobuf-java-util-3.17.2.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.71.
Required by:
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build.jetifier:jetifier-core:1.0.0-beta10
project :path_provider_android > com.android.tools.build:gradle:7.3.1 > com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.3.71.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.71/kotlin-stdlib-1.3.71.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.71/kotlin-stdlib-1.3.71.pom'.
> Connect to repo.maven.apache.org:443 [repo.maven.apache.org/192.168.1.1] failed: Connection refused (Connection refused)
Failed to notify project evaluation listener.
Could not get unknown property 'android' for project ':path_provider_android' of type org.gradle.api.Project.
Could not get unknown property 'android' for project ':path_provider_android' of type org.gradle.api.Project.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 59s
Running Gradle task 'assembleRelease'...                           61.1s
[!] Gradle threw an error while downloading artifacts from the network.

NOTE: When I last time built another app, it built correctly but with a warning about something jdk version mismatch i dont remember exactly...

Here is my build.gradle file:

buildscript {
ext.kotlin_version = '1.6.10'
repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }
}

dependencies {
    classpath 'com.android.tools.build:gradle:7.1.2'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
delete rootProject.buildDir
}


来源: stackexchange

问:
Type of connection and communication between a client, load balancer and backend server
When a load balancer/reverse proxy balances load between server and client, does the server after processing responds back to the load balancer or it can communicate directly with client?
In the later case the load balancer must be forwarding the connection object to the server, using which the server can directly communicate with the client.

Questions:

I need a light on the above statement, as what happens and if it is scenario based.

In case, the server send response to load balancer, what is the type of connection between a load balancer and backend server? I hope the connection should not be closed soon. The connection should be consistent.

In case the connection is not consistent, the load balancer creates new connection with the server every time? Seems expensive!
Even if thats the case, does that mean that the load balancer is limited to 65535 number of connections with the backend servers. It cannot handle more than these number at a time!!

These questions are just out of curiosity! Any relevant documents/blogs are really appreciated!!

Thanks!

ContentLicense: CC BY-SA 4.0


问:
Java floating point computations behavior differences
In the context of a scientific computing pipeline implemented in Java, we are using a LeastSquare optimizer from Apache Commons math 3.6.1 and experience strange numerical differences between Java 8 (jdk8u322-b06), Java and Java 17.

We noticed differences after migration to Java 17 (currently using 17.0.5.)

I can reproduce the different behavior between Java 8 and Java 17 in a "simple" unit test without involving the full computing pipeline so all problems that could come from the data loading  or multi threading part are excluded.

In JDK 17 the strict floating point semantics has been restored but the results is fully different compared to Java 8 compiled or interpreted. In this case actually the least square optimizer does not converge while it does in the Java 8 case.

An important point is that all these results are fully reproducible to the last digit, they are fully predictable on each platform configuration.

I also but this time in the full pipeline execution observed that I can reproduce numerical difference on Java 8 itself depending if the code is interpreted or compiled (at C2 level or C1 I did not investigated yet)

I am really puzzled and would like to know if this are known/documented behaviors or if this is a bug in the JDK 8 platform or JDK 17 ?
Does anyone observed such issues ?

Thanks for any hints !

EDIT

I cannot provide here a simple code snippet to reproduce the issue. But I extracted the necessary part of the code to reproduce the behavior in a GitHub repository. Disclaimer : I'am not the original author of the code.

Steps to reproduce:

git clone https://github.com/gjevardat/ReproduceFloatingPointBug

Run the unit test named TimeSeriesModelFitterBugTest
I ran it in eclipse as a Junit5 test.

To see the difference of behavior just switch the java.version property from 1.8 to 17 in the pom.xml.

I can pinpoint the location in Apache math commons were the code diverge:
In the class LevenbergMarquardtOptimizer of Apache Math commmons 3.6.1 (line 453)

```<code>  double actRed = -1.0;
      if (0.1 * currentCost < previousCost) {
          double r = currentCost / previousCost;
          actRed = 1.0 - r * r;
      }
</code>```

At iteration 17 actRed becomes 0 because r==1 in Java 17 while it is slightly positive in Java 8
Because of the value being 0, later (line 533) the non convergenceException is thrown

```<code> if (FastMath.abs(actRed) <= TWO_EPS &&
     preRed <= TWO_EPS && ratio <= 2.0) {
         throw new ConvergenceException(LocalizedFormats.TOO_SMALL_COST_RELATIVE_TOLERANCE,
                                               costRelativeTolerance);
            }
</code>```

Body:
In the context of a scientific computing pipeline implemented in Java, we are using a LeastSquare optimizer from Apache Commons math 3.6.1 and experience strange numerical differences between Java 8 (jdk8u322-b06), Java and Java 17.

We noticed differences after migration to Java 17 (currently using 17.0.5.)

I can reproduce the different behavior between Java 8 and Java 17 in a "simple" unit test without involving the full computing pipeline so all problems that could come from the data loading  or multi threading part are excluded.

In JDK 17 the strict floating point semantics has been restored but the results is fully different compared to Java 8 compiled or interpreted. In this case actually the least square optimizer does not converge while it does in the Java 8 case.

An important point is that all these results are fully reproducible to the last digit, they are fully predictable on each platform configuration.

I also but this time in the full pipeline execution observed that I can reproduce numerical difference on Java 8 itself depending if the code is interpreted or compiled (at C2 level or C1 I did not investigated yet)

I am really puzzled and would like to know if this are known/documented behaviors or if this is a bug in the JDK 8 platform or JDK 17 ?
Does anyone observed such issues ?

Thanks for any hints !

EDIT

I cannot provide here a simple code snippet to reproduce the issue. But I extracted the necessary part of the code to reproduce the behavior in a GitHub repository. Disclaimer : I'am not the original author of the code.

Steps to reproduce:

git clone https://github.com/gjevardat/ReproduceFloatingPointBug

Run the unit test named TimeSeriesModelFitterBugTest
I ran it in eclipse as a Junit5 test.

To see the difference of behavior just switch the java.version property from 1.8 to 17 in the pom.xml.

I can pinpoint the location in Apache math commons were the code diverge:
In the class LevenbergMarquardtOptimizer of Apache Math commmons 3.6.1 (line 453)

  double actRed = -1.0;
      if (0.1 * currentCost < previousCost) {
          double r = currentCost / previousCost;
          actRed = 1.0 - r * r;
      }

At iteration 17 actRed becomes 0 because r==1 in Java 17 while it is slightly positive in Java 8
Because of the value being 0, later (line 533) the non convergenceException is thrown

 if (FastMath.abs(actRed) <= TWO_EPS &&
     preRed <= TWO_EPS && ratio <= 2.0) {
         throw new ConvergenceException(LocalizedFormats.TOO_SMALL_COST_RELATIVE_TOLERANCE,
                                               costRelativeTolerance);
            }


问:
Server stops working if an error comes - Laravel
I have just installed Laravel 9.43.0 . It stops server each time an error comes and doesn't show error, although my APP_DEBUG=true . I have to run php artisan serve again and again to start server. I am using xampp (PHP version: 8.1.12) and windows 10 Pro. If I try to hit an API route it gives "Connection was forcibly closed by a peer." . Also I want to add that I only configured Laravel Sanctum in my project.


问:
NextJS API doesn't perform Firestore operations after sending response back ONLY IN PRODUCTION
I have a NextJS API endpoint which receives requests from a WordPress site. If the request doesn't resolve in 5000ms then WordPress cURL error appears and WordPress doesn't receive my response.

That is why I send a response immediately after security checks and the things I need to store in the Firestore database I do after that response.

The thing is, Firestore doesn't immediately store that information to the database. It will not store it in the database until the API is called again. It is like it stops somewhere and when a new request comes it pushes the old one out and the old one resolves.

This only happens in production. While in development everything is okay.

Here is an example snippet of code to better show the problem

```<code>export default async function handler(req, res){
  const {variable1, variable2} = req.body;

  //Performing checks if all necessary variables are there
  if(!variable1){
    res.status(401).json({msg: "Error"});
    return 0;
  }
  // ... Same for variable 2 ...

  //Checking if variable1 has can be used to access this api
  const exampleData = await firebaseAdminSDK.firestore().doc("access").get();

  if(exampleData.data().access !== variable1){
    res.status(401).json({msg: "Error"});
    return 0;
  }

  //Here is where I send a response back and some data so the request doesn't take over 5000ms

  res.status(200).json({responseSuccess: true, responseData: exampleData.data().someData});

  //Then I store variable2 in the database. Here is where the problem comes.
  //This will not be stored until another API request is made.
  //It doesn't matter if the API request is to the different endpoint

  await firebaseAdminSDK.firestore().doc("storing").set({exampleVariable: variable2});
  return 0;
}
</code>```

I tried putting the response at the end but I get cURL error.

Body:
I have a NextJS API endpoint which receives requests from a WordPress site. If the request doesn't resolve in 5000ms then WordPress cURL error appears and WordPress doesn't receive my response.

That is why I send a response immediately after security checks and the things I need to store in the Firestore database I do after that response.

The thing is, Firestore doesn't immediately store that information to the database. It will not store it in the database until the API is called again. It is like it stops somewhere and when a new request comes it pushes the old one out and the old one resolves.

This only happens in production. While in development everything is okay.

Here is an example snippet of code to better show the problem

export default async function handler(req, res){
  const {variable1, variable2} = req.body;

  //Performing checks if all necessary variables are there
  if(!variable1){
    res.status(401).json({msg: "Error"});
    return 0;
  }
  // ... Same for variable 2 ...

  //Checking if variable1 has can be used to access this api
  const exampleData = await firebaseAdminSDK.firestore().doc("access").get();

  if(exampleData.data().access !== variable1){
    res.status(401).json({msg: "Error"});
    return 0;
  }

  //Here is where I send a response back and some data so the request doesn't take over 5000ms

  res.status(200).json({responseSuccess: true, responseData: exampleData.data().someData});

  //Then I store variable2 in the database. Here is where the problem comes.
  //This will not be stored until another API request is made.
  //It doesn't matter if the API request is to the different endpoint

  await firebaseAdminSDK.firestore().doc("storing").set({exampleVariable: variable2});
  return 0;
}

I tried putting the response at the end but I get cURL error.


问:
One variable that each object (with this script) has its own value in unity?
I have a problem. I'm creating NPCs with dialogs. And I need one variable that each object has its own value. Example: 2 NPCs with quests, one of you completed the quest and he wrote in the variable what you did. You didn't do the task for the second npc, but the same script and the same variable are hanging on it, but the object is different and for him this variable has a value as not done. Help please.

I was thinking of making an array of type public int[] QuestAccept; but I realized that even with such an array of strings there will be a lot and you can get confused because they are of the same type.


问:
How to get list of AWS users in EKS Cluster using SDK?
How do I get list of users in AWS EKS Cluster using Node AWS SDK?

```<code>async function userHasAccessToEksCluster(user, clusterArn) {

// Get the list of IAM policies that are attached to the user
  const policiesResult = await iam.listAttachedUserPolicies({ UserName: user.UserName }).promise();
  const policies = policiesResult.AttachedPolicies;
  // Get the policy document
  return policies.some(async (policy) => {
    const policyDocument = await iam.getPolicy({ PolicyArn: policy.PolicyArn }).promise();
    console.log(policyDocument);
  });

  // Check if any of the policies grant the user permission to access the EKS cluster
}
</code>```

how can I check from users list to check if they have EKS permissions?

Body:
How do I get list of users in AWS EKS Cluster using Node AWS SDK?

async function userHasAccessToEksCluster(user, clusterArn) {

// Get the list of IAM policies that are attached to the user
  const policiesResult = await iam.listAttachedUserPolicies({ UserName: user.UserName }).promise();
  const policies = policiesResult.AttachedPolicies;
  // Get the policy document
  return policies.some(async (policy) => {
    const policyDocument = await iam.getPolicy({ PolicyArn: policy.PolicyArn }).promise();
    console.log(policyDocument);
  });

  // Check if any of the policies grant the user permission to access the EKS cluster
}

how can I check from users list to check if they have EKS permissions?


问:
Cant get the program to let me input or display output properly
```<code>def decrypt(cipheredtext, key):

  deciphered = ""

  for i in range (0, len(cipheredtext), key):
    decipheredchar = cipheredtext[i]
    deciphered = deciphered + decipheredchar
  return deciphered

cipheredtext = input("Type in your cipheredtext: (cipheredtext)")
key = int(input("Type in the key: ")

print(deciphered)

</code>```

For some reason this is not working and I cannot figure out what it is.

I expected the program to simply take my input and use it in the function to give me the deciphered string. The length of the key is the count of random characters in between two characters, which are part of the message.

Body:
def decrypt(cipheredtext, key):

  deciphered = ""

  for i in range (0, len(cipheredtext), key):
    decipheredchar = cipheredtext[i]
    deciphered = deciphered + decipheredchar
  return deciphered

cipheredtext = input("Type in your cipheredtext: (cipheredtext)")
key = int(input("Type in the key: ")

print(deciphered)

For some reason this is not working and I cannot figure out what it is.

I expected the program to simply take my input and use it in the function to give me the deciphered string. The length of the key is the count of random characters in between two characters, which are part of the message.


问:
is there a gcc alternative to icc's -ax flag
I know icc/icpc can compile and optimize for multiple architectures using the -ax flag (ex -axsavx,sse2 compiles for both avx and sse2 extensions)

Is there something similar to that with gcc/g++?


问:
google geospatial inaccuracy
I've been working with Google Geospatial for a while now, I have two problems,

1- It doesn't work as accurately as it is shown in the videos, it sometimes shows inaccuracy up to 10 meters.

2- We don't know exactly what  Where does vps work, is there a list of cities where vps works completely and correctly?

Title: google geospatial inaccuracy


问:
Handling message deletion events in Telegram chat
Good day. I am writing a bot for Telegram in PHP. I need to write deleted messages to a separate file. Is there any way to get information when a message is deleted from a chat?

I tried to write all events to a variable, and then read from it, but nothing came of it. When a message is deleted, the variable is em
pty.


问:
Writing Avro with Dynamic Schema in Apache Beam
I need to write GenericRecords into several Avro files with different Schemas.

What are the possible approaches besides AvroIO.writeCustomTypeToGenericRecords() with custom class that expands DynamicAvroDestinations? I followed more or less the same procedure from "Writing data to multiple destinations" paragraph but the documentation says that the .to(DynamicAvroDestinations<UserT,NewDestinationT,OutputT> dynamicDestinations) method is already deprecated suggesting to use FileIO.write() or FileIO.writeDynamic() without any further documentation or code examples.


问:
How to deploy a Python selenium script on a server where I can send the input via API and it returns the output via API?
I have a python selenium script that takes an input URL, scrapes a specific website, and generates an output. I want to deploy that selenium script on a server so that I can use an API to send input, and the script will use that input to scrape the website and return the output via API. I am building a web app where users can come and give their input, and the script will scrape the data and return the output to users.

I have used the script on Heroku and several VPSs but haven't figured out how to call the script via API and then return the data. I need to deploy it on a server so I can use the script whenever I want by sending the input, and the input will start the scraper, scrape the data, and returns the output. Following is the generalized form of script I am looking to be deployed:

```<code>from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

# this function is used to setup the bot
def bot_setup(headless=False):
    # options to be used
    options = webdriver.ChromeOptions()
    options.add_argument("--no-sandbox")
    options.add_argument("--disable-dev-shm-usage")
    options.add_argument("--disable-blink-features=AutomationControlled")
    options.add_experimental_option("useAutomationExtension", False)
    options.add_experimental_option("excludeSwitches", ["enable-automation"])
    options.add_experimental_option("excludeSwitches", ["enable-logging"])
    options.add_argument("disable-infobars")
    if headless:
        options.add_argument("--headless")

    driver = webdriver.Chrome(
        service=Service(ChromeDriverManager().install()),
        options=options,
    )
    # setup implicit wait
    driver.implicitly_wait(10)
    return driver

def scrape(url):
    driver = bot_setup()
    driver.get(url)
    results = {}
    # all the scraping logic
    return results # need to return these results via API to frontend or to a database

url = "https://example.com"
scrape(url) # I want this url to come from an API
</code>```

Body:
I have a python selenium script that takes an input URL, scrapes a specific website, and generates an output. I want to deploy that selenium script on a server so that I can use an API to send input, and the script will use that input to scrape the website and return the output via API. I am building a web app where users can come and give their input, and the script will scrape the data and return the output to users.

I have used the script on Heroku and several VPSs but haven't figured out how to call the script via API and then return the data. I need to deploy it on a server so I can use the script whenever I want by sending the input, and the input will start the scraper, scrape the data, and returns the output. Following is the generalized form of script I am looking to be deployed:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

# this function is used to setup the bot
def bot_setup(headless=False):
    # options to be used
    options = webdriver.ChromeOptions()
    options.add_argument("--no-sandbox")
    options.add_argument("--disable-dev-shm-usage")
    options.add_argument("--disable-blink-features=AutomationControlled")
    options.add_experimental_option("useAutomationExtension", False)
    options.add_experimental_option("excludeSwitches", ["enable-automation"])
    options.add_experimental_option("excludeSwitches", ["enable-logging"])
    options.add_argument("disable-infobars")
    if headless:
        options.add_argument("--headless")

    driver = webdriver.Chrome(
        service=Service(ChromeDriverManager().install()),
        options=options,
    )
    # setup implicit wait
    driver.implicitly_wait(10)
    return driver

def scrape(url):
    driver = bot_setup()
    driver.get(url)
    results = {}
    # all the scraping logic
    return results # need to return these results via API to frontend or to a database

url = "https://example.com"
scrape(url) # I want this url to come from an API


问:
How to Setup Paypal in a marketplace application
I am building a marketplace application for providing services- and I am confused how to add/configure PayPal in it. As I want the payment from the buyer/customer to remain hold in the system until the Service Provider/Seller Completes the Service. Same as the system of Upwork holds the payment of the seller.

The Tech stack  is **MERN **and I am confused about the workflow in the app.

Any Help would be appreciated.

I tried to setup PayPal sandbox account and all the test payments are collected in the Administrators Account and I cant find a way how to release it to sellers. I think this approach is wrong.


问:
How to get around long integer error when doing value comparison
I have never come across this error before. From research it seems that it can happen when integers are too large and the result ends up in a notation of sorts.

My setup:

```<code>The inputs are the following two sets of json objects:

* def actual = {
  "Name": "Roger",
  "Number": 567553218,
  "Date": "2022-12-09"}
* def expected = {
  "Name": "Roger",
  "Number": 567553218,
  "Date": "2022-12-09"}

The method I am using for the above:

            function(actual, expected) {
                var temp = [];
                var now = new Date();
                var dateNow = new Date(now.getTime() + now.getTimezoneOffset() * 60000);

                for (key in actual) {
                    if (typeof actual[key] === 'number') {
                        actual[key] = new java.math.BigDecimal(actual[key]);
                    }
                    var matchCheck = false;
                    var dateActual = Date.parse(actual[key]);
                    if (isNaN(dateActual) || !(isNaN(actual[key]))) {
                        if (expected.hasOwnProperty(key)){
                            var tempMatch = karate.match(actual[key],expected[key]);
                            matchCheck = tempMatch.pass;
                        }
                        else {
                            continue;
                        }
                    }
</code>```

When the method executes, the following error is displayed:

org.graalvm.polyglot.PolyglotException: java.lang.ArithmeticException: long overflow

The error is likely happening on the "567553218" under the Number key. As you can see, I tried to use BigDecimal Java method as highlighted in Karate documentation. However, that does not work. I may have made a mistake in the JavaScript, I am still a big newbie in it. Please let me know if that is the case.

Body:
I have never come across this error before. From research it seems that it can happen when integers are too large and the result ends up in a notation of sorts.

My setup:

The inputs are the following two sets of json objects:

* def actual = {
  "Name": "Roger",
  "Number": 567553218,
  "Date": "2022-12-09"}
* def expected = {
  "Name": "Roger",
  "Number": 567553218,
  "Date": "2022-12-09"}

The method I am using for the above:

            function(actual, expected) {
                var temp = [];
                var now = new Date();
                var dateNow = new Date(now.getTime() + now.getTimezoneOffset() * 60000);

                for (key in actual) {
                    if (typeof actual[key] === 'number') {
                        actual[key] = new java.math.BigDecimal(actual[key]);
                    }
                    var matchCheck = false;
                    var dateActual = Date.parse(actual[key]);
                    if (isNaN(dateActual) || !(isNaN(actual[key]))) {
                        if (expected.hasOwnProperty(key)){
                            var tempMatch = karate.match(actual[key],expected[key]);
                            matchCheck = tempMatch.pass;
                        }
                        else {
                            continue;
                        }
                    }

When the method executes, the following error is displayed:

org.graalvm.polyglot.PolyglotException: java.lang.ArithmeticException: long overflow

The error is likely happening on the "567553218" under the Number key. As you can see, I tried to use BigDecimal Java method as highlighted in Karate documentation. However, that does not work. I may have made a mistake in the JavaScript, I am still a big newbie in it. Please let me know if that is the case.


问:
Login validation and how to make sure an email that is entered is in a database
So I was looking up ways to validate a field when the user was inputting information. I found a way where I can actually validate the email, but it wasn't enough because there was still ways to bypass it.

```<code>@Composable
fun LoginField(
    loading: Boolean = false,
    onDone: (String) -> Unit = {email ->}
){
    val email = rememberSaveable { mutableStateOf("") }
    val keyboardController = LocalSoftwareKeyboardController.current
    val valid = remember(email.value){
        email.value.trim().isNotEmpty()
    }
    val context = LocalContext.current

    Column(
        modifier = Modifier,
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        EmailInput(
            emailState = email,
        )

        SubmitButton(
            textId = "Login",
            loading = loading,
            validInputs = valid
        ){
            //The change needs to happen below
            if (!Patterns.EMAIL_ADDRESS.matcher(email.value).matches()){
                Toast.makeText(context, "Please enter a valid email", Toast.LENGTH_LONG).show()
            }
            else{
                onDone(email.value.trim())
                keyboardController?.hide()
            }
        }
    }
}
</code>```

Since the database stores emails that is authorize to use the app, How can I compare the user input to those entries in the database, to validate the email input. Any suggestion is welcomed. Thanks.

P.S. Just want to check if the email is inside the database.

Body:
So I was looking up ways to validate a field when the user was inputting information. I found a way where I can actually validate the email, but it wasn't enough because there was still ways to bypass it.

@Composable
fun LoginField(
    loading: Boolean = false,
    onDone: (String) -> Unit = {email ->}
){
    val email = rememberSaveable { mutableStateOf("") }
    val keyboardController = LocalSoftwareKeyboardController.current
    val valid = remember(email.value){
        email.value.trim().isNotEmpty()
    }
    val context = LocalContext.current

    Column(
        modifier = Modifier,
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        EmailInput(
            emailState = email,
        )

        SubmitButton(
            textId = "Login",
            loading = loading,
            validInputs = valid
        ){
            //The change needs to happen below
            if (!Patterns.EMAIL_ADDRESS.matcher(email.value).matches()){
                Toast.makeText(context, "Please enter a valid email", Toast.LENGTH_LONG).show()
            }
            else{
                onDone(email.value.trim())
                keyboardController?.hide()
            }
        }
    }
}

Since the database stores emails that is authorize to use the app, How can I compare the user input to those entries in the database, to validate the email input. Any suggestion is welcomed. Thanks.

P.S. Just want to check if the email is inside the database.


问:
Messages get lost when rabbitmq publish occurs
I am using rust lapin (rabbitmq library) and I am simply trying to create a basic logging library to send any logs to rabbitmq. However I have noticed, that if I quickly send multiple messages, they tend to get lost. After doing some digging, I have found that it's due to rabbitmq taking some time to send the messages. On the next iteration, rx.recv() doesn't have any message. I have decided to put the sending process on a new thread, but I feel like that is unsafe and stupid. Any ideas?

```<code>use lapin::{Channel, options::{ExchangeDeclareOptions, BasicPublishOptions}, types::FieldTable, BasicProperties};

use serde::{Serialize, Deserialize};

#[derive(Clone, Serialize, Deserialize, Debug)]
struct Log {
    message: String,
    category: String,
}

pub async fn setup_logger(channel: Channel) -> Result<(), fern::InitError> {
    channel.exchange_declare("gqlizer.logs", lapin::ExchangeKind::Fanout, ExchangeDeclareOptions { passive: false, durable: true, auto_delete: false, internal: false, nowait: false }, FieldTable::default()).await.unwrap();
    let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel();

    tokio::spawn(async move {
        loop {
            let msg: Log = rx.recv().await.unwrap();
            let chan = channel.clone();

            tokio::spawn(async move {

                println!("here {}", msg.message);
            let res = chan.basic_publish("gqlizer.logs", &msg.category, BasicPublishOptions { mandatory: false, immediate: false }, msg.message.as_bytes(), BasicProperties::default()).await;
            match res {

                Ok(x) => {
                    println!("x {:?}", x);
                }
                Err(x) => {
                    println!("x {:?}", x);
                }
            }
            });

        }
    });

    // for n in 1..10 {
    //     println!("sending {}", n.to_string());
    //
    //     tx.send(Log{
    //         category: "#".to_string(),
    //         message: n.to_string()
    //     }).unwrap();
    // }

    fern::Dispatch::new()
        .format(|out, message, record| {
            out.finish(format_args!(
                "{}[{}][{}] {}",
                chrono::Local::now().format("[%Y-%m-%d][%H:%M:%S]"),
                record.target(),
                record.level(),
                message
            ))
        })
        .level(log::LevelFilter::Info)
        .chain(fern::Output::call(move |record| {
            let log_to_send;
            if record.key_values().get("log_category".into()).is_some() {
                log_to_send = Log {
                    message: record.args().to_string().clone().to_owned(),
                    category: record.key_values().get("log_category".into()).unwrap().to_string().clone().to_owned(),

                };

            } else {
                log_to_send = Log {
                    message: record.args().to_string().to_owned(),
                    category: "#".to_string(),
                };
            }

            // println!("sending");

            tx.send(log_to_send).unwrap();
        }))
        .chain(std::io::stdout())
        .chain(fern::log_file("output.log")?)
        .apply()?;
    Ok(())
}
</code>```

edit:

even when spawning a new thread, the messages disappear. Here is an example output.

```<code>[2022-12-09][15:29:08][base_utils][INFO] hello
[2022-12-09][15:29:08][base_utils][INFO] hello2
[2022-12-09][15:29:08][base_utils][INFO] hello3
[2022-12-09][15:29:08][base_utils][INFO] hello4
[2022-12-09][15:29:08][base_utils][INFO] hello5
x PublisherConfirm
[2022-12-09][15:29:08][base_utils][INFO] hello6
x PublisherConfirm
x PublisherConfirm
x PublisherConfirm
x PublisherConfirm
[2022-12-09][15:29:08][base_utils][INFO] hello7
[2022-12-09][15:29:08][base_utils][INFO] hello8
[2022-12-09][15:29:08][base_utils][INFO] hello9
[2022-12-09][15:29:08][base_utils][INFO] hello10
[2022-12-09][15:29:08][base_utils][INFO] hello11
[2022-12-09][15:29:08][base_utils][INFO] hello12
</code>```

message 6 to 12 never appear.

Body:
I am using rust lapin (rabbitmq library) and I am simply trying to create a basic logging library to send any logs to rabbitmq. However I have noticed, that if I quickly send multiple messages, they tend to get lost. After doing some digging, I have found that it's due to rabbitmq taking some time to send the messages. On the next iteration, rx.recv() doesn't have any message. I have decided to put the sending process on a new thread, but I feel like that is unsafe and stupid. Any ideas?

use lapin::{Channel, options::{ExchangeDeclareOptions, BasicPublishOptions}, types::FieldTable, BasicProperties};

use serde::{Serialize, Deserialize};

#[derive(Clone, Serialize, Deserialize, Debug)]
struct Log {
    message: String,
    category: String,
}

pub async fn setup_logger(channel: Channel) -> Result<(), fern::InitError> {
    channel.exchange_declare("gqlizer.logs", lapin::ExchangeKind::Fanout, ExchangeDeclareOptions { passive: false, durable: true, auto_delete: false, internal: false, nowait: false }, FieldTable::default()).await.unwrap();
    let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel();

    tokio::spawn(async move {
        loop {
            let msg: Log = rx.recv().await.unwrap();
            let chan = channel.clone();

            tokio::spawn(async move {

                println!("here {}", msg.message);
            let res = chan.basic_publish("gqlizer.logs", &msg.category, BasicPublishOptions { mandatory: false, immediate: false }, msg.message.as_bytes(), BasicProperties::default()).await;
            match res {

                Ok(x) => {
                    println!("x {:?}", x);
                }
                Err(x) => {
                    println!("x {:?}", x);
                }
            }
            });

        }
    });

    // for n in 1..10 {
    //     println!("sending {}", n.to_string());
    //
    //     tx.send(Log{
    //         category: "#".to_string(),
    //         message: n.to_string()
    //     }).unwrap();
    // }

    fern::Dispatch::new()
        .format(|out, message, record| {
            out.finish(format_args!(
                "{}[{}][{}] {}",
                chrono::Local::now().format("[%Y-%m-%d][%H:%M:%S]"),
                record.target(),
                record.level(),
                message
            ))
        })
        .level(log::LevelFilter::Info)
        .chain(fern::Output::call(move |record| {
            let log_to_send;
            if record.key_values().get("log_category".into()).is_some() {
                log_to_send = Log {
                    message: record.args().to_string().clone().to_owned(),
                    category: record.key_values().get("log_category".into()).unwrap().to_string().clone().to_owned(),

                };

            } else {
                log_to_send = Log {
                    message: record.args().to_string().to_owned(),
                    category: "#".to_string(),
                };
            }

            // println!("sending");

            tx.send(log_to_send).unwrap();
        }))
        .chain(std::io::stdout())
        .chain(fern::log_file("output.log")?)
        .apply()?;
    Ok(())
}

edit:

even when spawning a new thread, the messages disappear. Here is an example output.

[2022-12-09][15:29:08][base_utils][INFO] hello
[2022-12-09][15:29:08][base_utils][INFO] hello2
[2022-12-09][15:29:08][base_utils][INFO] hello3
[2022-12-09][15:29:08][base_utils][INFO] hello4
[2022-12-09][15:29:08][base_utils][INFO] hello5
x PublisherConfirm
[2022-12-09][15:29:08][base_utils][INFO] hello6
x PublisherConfirm
x PublisherConfirm
x PublisherConfirm
x PublisherConfirm
[2022-12-09][15:29:08][base_utils][INFO] hello7
[2022-12-09][15:29:08][base_utils][INFO] hello8
[2022-12-09][15:29:08][base_utils][INFO] hello9
[2022-12-09][15:29:08][base_utils][INFO] hello10
[2022-12-09][15:29:08][base_utils][INFO] hello11
[2022-12-09][15:29:08][base_utils][INFO] hello12

message 6 to 12 never appear.


问:
Mongodb Replicaset Kuberenetes High memory

Issue

I have a mongoDB replica set in openshift. It's using about 4GB memory per pod. I only have one collection in the DB that's rather small. I also don't have many active connections. Why is it using so much memory? It started at about 1GB but has slowly grown to 4.3 GB over 2 weeks and then tapered off since then

Current connections

```<code>rs0:SECONDARY> db.serverStatus().connections
{
        "current" : 15,
        "available" : 838845,
        "totalCreated" : 9872,
        "active" : 7,
        "exhaustIsMaster" : 3,
        "exhaustHello" : 2,
        "awaitingTopologyChanges" : 47
}
</code>```

Collection Stats

```<code>{
        "ns" : "atlas.alerts",
        "size" : 2296148,
        "count" : 3298,
        "avgObjSize" : 696,
        "storageSize" : 1085440,
        "freeStorageSize" : 491520,
        "capped" : false,
        "creationString" : "access_pattern_hint=none,allocation_size=4KB,app_metadata=(formatVersion=8),assert=(commit_timestamp=none,durable_timestamp=none,read_timestamp=none,write_timestamp=off),block_allocation=best,block_compressor=,cache_resident=false,checksum=on,colgroups=,collator=,columns=,dictionary=0,encryption=(keyid=,name=),exclusive=false,extractor=,format=btree,huffman_key=,huffman_value=,ignore_in_memory_cache_size=false,immutable=false,import=(enabled=false,file_metadata=,repair=false),internal_item_max=0,internal_key_max=0,internal_key_truncate=true,internal_page_max=16k,key_format=u,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=16k,leaf_value_max=0,log=(enabled=false),lsm=(auto_throttle=true,bloom=true,bloom_bit_count=16,bloom_config=,bloom_hash_count=8,bloom_oldest=false,chunk_count_limit=0,chunk_max=5GB,chunk_size=10MB,merge_custom=(prefix=,start_generation=0,suffix=),merge_max=15,merge_min=0),memory_page_image_max=0,memory_page_max=5MB,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=true,prefix_compression_min=4,readonly=false,source=,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,tiered_object=false,tiered_storage=(auth_token=,bucket=,bucket_prefix=,cache_directory=,local_retention=300,name=,object_target_size=10M),type=file,value_format=u,verbose=[],write_timestamp_usage=none",
                        "cache" : {
                                "bytes currently in the cache" : 135557,
                                "bytes dirty in the cache cumulative" : 26974050,
                                "bytes read into cache" : 124234,
                                "bytes written from cache" : 6920554,
}
}
</code>```

Body:
Issue

I have a mongoDB replica set in openshift. It's using about 4GB memory per pod. I only have one collection in the DB that's rather small. I also don't have many active connections. Why is it using so much memory? It started at about 1GB but has slowly grown to 4.3 GB over 2 weeks and then tapered off since then

Current connections

rs0:SECONDARY> db.serverStatus().connections
{
        "current" : 15,
        "available" : 838845,
        "totalCreated" : 9872,
        "active" : 7,
        "exhaustIsMaster" : 3,
        "exhaustHello" : 2,
        "awaitingTopologyChanges" : 47
}

Collection Stats

{
        "ns" : "atlas.alerts",
        "size" : 2296148,
        "count" : 3298,
        "avgObjSize" : 696,
        "storageSize" : 1085440,
        "freeStorageSize" : 491520,
        "capped" : false,
        "creationString" : "access_pattern_hint=none,allocation_size=4KB,app_metadata=(formatVersion=8),assert=(commit_timestamp=none,durable_timestamp=none,read_timestamp=none,write_timestamp=off),block_allocation=best,block_compressor=,cache_resident=false,checksum=on,colgroups=,collator=,columns=,dictionary=0,encryption=(keyid=,name=),exclusive=false,extractor=,format=btree,huffman_key=,huffman_value=,ignore_in_memory_cache_size=false,immutable=false,import=(enabled=false,file_metadata=,repair=false),internal_item_max=0,internal_key_max=0,internal_key_truncate=true,internal_page_max=16k,key_format=u,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=16k,leaf_value_max=0,log=(enabled=false),lsm=(auto_throttle=true,bloom=true,bloom_bit_count=16,bloom_config=,bloom_hash_count=8,bloom_oldest=false,chunk_count_limit=0,chunk_max=5GB,chunk_size=10MB,merge_custom=(prefix=,start_generation=0,suffix=),merge_max=15,merge_min=0),memory_page_image_max=0,memory_page_max=5MB,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=true,prefix_compression_min=4,readonly=false,source=,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,tiered_object=false,tiered_storage=(auth_token=,bucket=,bucket_prefix=,cache_directory=,local_retention=300,name=,object_target_size=10M),type=file,value_format=u,verbose=[],write_timestamp_usage=none",
                        "cache" : {
                                "bytes currently in the cache" : 135557,
                                "bytes dirty in the cache cumulative" : 26974050,
                                "bytes read into cache" : 124234,
                                "bytes written from cache" : 6920554,
}
}


问:
Whats the right approach for making .Net Framework library project compatible with both .Net Framework Rest App and .Net Core Rest App
I have library project build in .Net Framework 4.8(eg. CoreRetailLibrary)  , with lots of references to System.Web package.
Our plan is to modernize the Rest API's that are referencing CoreRetailLibrary , from  .Net Framework to .Net Core.
After reading lots of blogs , I had a painful realization that it is not possible in the the normal way unless we continue to use .Net Framework for the API.
I would love to move to .Net Core so that I can use the Microservice, Cloud and Docker  capability.

Is there anything apart from rewriting oe duplicating the entire CoreRetailLibrary to .Net Core , which is still referenced by other Projects using .Net Framework.

Is there a middle ground where I can make CoreRetailLibrary compatible with both .Net Core and .Net Framework.

Please provide some guidance .


问:
how to count the total number of facebook groups of a certain topic?
looking to count the total number of facebook groups of a certain topic.

there doesn't seem to be a total count number in the facebook app so curious if there is another way to get that info.


问:
Getting "Errno Extra data" while self.wfile.write in Python HTTP server
I am new to python. In HTTP server, I am getting "Errno Extra data" while writing data. The code is below

```<code>class handler(BaseHTTPRequestHandler):
    def do_GET(self):
        global data, payload0
        if self.path.endswith("/get_timeseries_data"):
            username = "abcd"
            password = "test123"
            server_token = base64.b64encode(bytes(f'{username}:{password}', 'utf-8')).decode('utf-8')
            client_token = self.headers['Authorization'].strip('Basic ')
            self.send_response(200)
            self.send_header('Content-type', 'text/html')
            self.end_headers()
            try:
                if server_token == client_token:
                    param = self.headers.items()
                    length = int(self.headers.get('Content-length', 0))
                    if length > 0:
                        data = self.rfile.read(length).decode()
                        # msg = parse_qs(data)['data']
                        msg = ['temp', 'temp1']
                        for x in msg:
                            time.sleep(5)
                            time1 = datetime.now().isoformat(" ")
                            payload = {"ts": time1, "telemetry": {"values": {x: 100}}}
                            self.wfile.write(json.dumps(payload).encode("utf8"))
</code>```

The data written fine when the msg = ['temp'] but getting "[Errno Extra data] {"ts": "2022-12-10 01:43:36.788130", "telemetry": {"values": {"temp": 100}}}{"ts": "2022-12-10 01:43:39.791309", "telemetry": {"values": {"temp1": 100}}}: 76" when it is msg = ['temp', 'temp1']
Also I am not sure how the ": 76" is getting added at the end.

It would be great if you can share why i am getting error when passed more than one value for
msg = ['temp', 'temp1']. Any input will help. Thanks

Body:
I am new to python. In HTTP server, I am getting "Errno Extra data" while writing data. The code is below

class handler(BaseHTTPRequestHandler):
    def do_GET(self):
        global data, payload0
        if self.path.endswith("/get_timeseries_data"):
            username = "abcd"
            password = "test123"
            server_token = base64.b64encode(bytes(f'{username}:{password}', 'utf-8')).decode('utf-8')
            client_token = self.headers['Authorization'].strip('Basic ')
            self.send_response(200)
            self.send_header('Content-type', 'text/html')
            self.end_headers()
            try:
                if server_token == client_token:
                    param = self.headers.items()
                    length = int(self.headers.get('Content-length', 0))
                    if length > 0:
                        data = self.rfile.read(length).decode()
                        # msg = parse_qs(data)['data']
                        msg = ['temp', 'temp1']
                        for x in msg:
                            time.sleep(5)
                            time1 = datetime.now().isoformat(" ")
                            payload = {"ts": time1, "telemetry": {"values": {x: 100}}}
                            self.wfile.write(json.dumps(payload).encode("utf8"))

The data written fine when the msg = ['temp'] but getting "[Errno Extra data] {"ts": "2022-12-10 01:43:36.788130", "telemetry": {"values": {"temp": 100}}}{"ts": "2022-12-10 01:43:39.791309", "telemetry": {"values": {"temp1": 100}}}: 76" when it is msg = ['temp', 'temp1']
Also I am not sure how the ": 76" is getting added at the end.

It would be great if you can share why i am getting error when passed more than one value for
msg = ['temp', 'temp1']. Any input will help. Thanks


问:
I want to display one item per column in a table with a c# splitstring
I display the data coming from an excel table and I separate them with a splitstring and I want each item to be displayed in cells separated horizontally rather than separated vertically

here is my code to display the data :

```<code>    private void btnExcelReader_Click(object sender, EventArgs e)
    {
        long lastRow = excelRange.Rows.Count;
        long lastCol = excelRange.Columns.Count;

        int rowTotal = 0;
        for (int i = 1; i < lastRow; i++)
        {
            if (excelRange.Cells[i, 1].Value2 != null)
            {
                rowTotal++;
            }
        }
        for (int i = 1; i < rowTotal; i += 4)
        {
            char[] separator = new char[] { ' ' };
            string current = excelRange.Cells[i, 1].Value2;
            string[] splitCurrent = current.Split(separator,
            StringSplitOptions.RemoveEmptyEntries);

            for (int j = 0; j < splitCurrent.Length; j++)
            {
                lvName.Items.Add(splitCurrent[j]);
            }
        }
        lvName.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
        lvName.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
    }
</code>```

I try with columns.add, i create list and after that put my item in subitems.. nothing work.

Here is the image of the result in my ListView :

Body:
I display the data coming from an excel table and I separate them with a splitstring and I want each item to be displayed in cells separated horizontally rather than separated vertically

here is my code to display the data :

    private void btnExcelReader_Click(object sender, EventArgs e)
    {
        long lastRow = excelRange.Rows.Count;
        long lastCol = excelRange.Columns.Count;

        int rowTotal = 0;
        for (int i = 1; i < lastRow; i++)
        {
            if (excelRange.Cells[i, 1].Value2 != null)
            {
                rowTotal++;
            }
        }
        for (int i = 1; i < rowTotal; i += 4)
        {
            char[] separator = new char[] { ' ' };
            string current = excelRange.Cells[i, 1].Value2;
            string[] splitCurrent = current.Split(separator,
            StringSplitOptions.RemoveEmptyEntries);

            for (int j = 0; j < splitCurrent.Length; j++)
            {
                lvName.Items.Add(splitCurrent[j]);
            }
        }
        lvName.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
        lvName.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
    }

I try with columns.add, i create list and after that put my item in subitems.. nothing work.

Here is the image of the result in my ListView :


问:
Combining multiple columns to one column in python
My dataset

I have this dataset that contains the comments with their detected emotions among six emotions. The detected emotions are declared with 'x' in the table. Each comment has zero, one, two, or more emotions. I want to transfer this dataset to a dataset with two columns "label, comment". The label column contains just the emotion detected, and write NAN if the comment has no emotions "neutral". I tried to do this, but I couldn't :( can you help me with the code, please?

The desired look of the data

The required result is presented in the 2nd picture


问:
How to write idiomatic interruptible code
How can I write idiomatic code that is potentially used in a Thread and thus needs/should support interruption?

Thread.close() is deprecated. My understanding is, that any code that might be relied on from within a thread consequently needs to support/check the interrupt() flag of the Thread object to allow the thread creator to stop a thread proper at a time of their choosing. However, it seems rather silly and non idiomatic to write code such as:

```<code>def interruptibleFunction() {
   doSmth()
   if (Thread.interrupted())
      throw new InterruptedException();
   doSmth()
   if (Thread.interrupted())
      throw new InterruptedException();
   doSmth()
   if (Thread.interrupted())
      throw new InterruptedException();
   //... and so on and so forth
}
</code>```

I want my code to terminate as soon as (or as timely as possible as) the corresponding thread has been interrupted/is supposed to stop. Each of the doSmth() might take a long time, which could be the actual reason for the interrupt in the first place. Consequently, it would be rather rude by the function to proceed even if an interrupt has been called.

Is this the only way to write interruptible code or is there another more idiomatic way?

Body:
How can I write idiomatic code that is potentially used in a Thread and thus needs/should support interruption?

Thread.close() is deprecated. My understanding is, that any code that might be relied on from within a thread consequently needs to support/check the interrupt() flag of the Thread object to allow the thread creator to stop a thread proper at a time of their choosing. However, it seems rather silly and non idiomatic to write code such as:

def interruptibleFunction() {
   doSmth()
   if (Thread.interrupted())
      throw new InterruptedException();
   doSmth()
   if (Thread.interrupted())
      throw new InterruptedException();
   doSmth()
   if (Thread.interrupted())
      throw new InterruptedException();
   //... and so on and so forth
}

I want my code to terminate as soon as (or as timely as possible as) the corresponding thread has been interrupted/is supposed to stop. Each of the doSmth() might take a long time, which could be the actual reason for the interrupt in the first place. Consequently, it would be rather rude by the function to proceed even if an interrupt has been called.

Is this the only way to write interruptible code or is there another more idiomatic way?


问:
How to microbenchmark an algorithm on an ARM laptop?
On a servers or a desktops it's reasonable to just disable frequency scaling and then one can run microbenchmarks.

But how do you meaningfully run microbenchmarks on a arm? (Given different cores and energy efficiency)

Specific context:
Processor: M2
Microbenchmakrs for basic algorithms (think sort, strlen - a long those lines).
I am interested in measuring both energy efficient and high-performance cores.

UPD: to avoid confusion: I'm pretty sure the library (GoogleBenchmark) can measure the time correctly. I just want to run the binary correctly


问:
How can I create a personalized method using JPA?
I've been trying to create a personalized get request to find an user by email using Jpa Repository and a Controller class but it doesn't seem to work. Everytime I make a request using an email that exists (!!!!) on the database my method can't find it!
this is my interface:

```<code>@Repository
@Transactional
public interface TheUserRepository extends JpaRepository<User, Integer> {

    User findByEmail(@Param("email") String email);

}
</code>```

this is the controllers method:

```<code>@GetMapping(value="emails/{email}")
    public ResponseEntity<User> findByEmail(String email){
        User entity=repo.findByEmail(email);
        if(entity!=null) {
            return ResponseEntity.ok().body(entity);
        }
        else {
            return ResponseEntity.noContent().build();
        }
    }
</code>```

I have tried many other combinations but none of them are working, if anyone has any idea of how to do this request I would appreciate it so much!

Body:
I've been trying to create a personalized get request to find an user by email using Jpa Repository and a Controller class but it doesn't seem to work. Everytime I make a request using an email that exists (!!!!) on the database my method can't find it!
this is my interface:

@Repository
@Transactional
public interface TheUserRepository extends JpaRepository<User, Integer> {

    User findByEmail(@Param("email") String email);

}

this is the controllers method:

@GetMapping(value="emails/{email}")
    public ResponseEntity<User> findByEmail(String email){
        User entity=repo.findByEmail(email);
        if(entity!=null) {
            return ResponseEntity.ok().body(entity);
        }
        else {
            return ResponseEntity.noContent().build();
        }
    }

I have tried many other combinations but none of them are working, if anyone has any idea of how to do this request I would appreciate it so much!


问:
Error for predict using svm in R: test data does not match model
I am trying to do support vector machine regression in R, using e1071 library.

the model is: model = svm(deflated_price~year+month+beds+room_in_apt+nhood, data = train_sample)

The model seems to fit:

```<code> summary(model)
</code>```

Call:

```<code>svm(formula = deflated_price ~ year + month + beds + room_in_apt + nhood,
      data = train_sample)

Parameters:
   SVM-Type:  eps-regression
 SVM-Kernel:  radial
       cost:  1
      gamma:  0.01149425
    epsilon:  0.1

Number of Support Vectors:  48744
</code>```

And I try to do: y_hat = predict(model, newdata = test_sample)

but I get the error: test data does not match model !

Here is the result of do str(train_sample) and str(test_sample)

```<code>str(train_sample)
'data.frame':   48752 obs. of  6 variables:
 $ year          : Factor w/ 19 levels "2000","2001",..: 5 17 5 17 14 13 16 6 7 17 ...
 $ nhood         : chr  "sea cliff" "hayes valley" "pacific heights" "noe valley" ...
 $ beds          : chr  "2" "1" "3" "1" ...
 $ room_in_apt   : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
 $ month         : Factor w/ 12 levels "1","2","3","4",..: 9 2 10 10 12 3 11 1 2 3 ...
 $ deflated_price: num  565 920 3055 616 1399 ...

str(test_sample)
'data.frame':   5000 obs. of  5 variables:
 $ year       : Factor w/ 19 levels "2000","2001",..: 5 5 5 5 5 6 5 6 8 5 ...
 $ nhood      : chr  "alamo square" "alamo square" "alamo square" "alamo square" ...
 $ beds       : chr  "0" "2" "1" "1" ...
 $ room_in_apt: Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
 $ month      : Factor w/ 12 levels "1","2","3","4",..: 6 6 11 8 7 1 8 3 9 9 ...
</code>```

The variables seem to match, so what's causing the problem?

I tried adding deflated_price to test_sample, but that didn't work either.

Body:
I am trying to do support vector machine regression in R, using e1071 library.

the model is: model = svm(deflated_price~year+month+beds+room_in_apt+nhood, data = train_sample)

The model seems to fit:

 summary(model)

Call:

svm(formula = deflated_price ~ year + month + beds + room_in_apt + nhood,
      data = train_sample)

Parameters:
   SVM-Type:  eps-regression
 SVM-Kernel:  radial
       cost:  1
      gamma:  0.01149425
    epsilon:  0.1

Number of Support Vectors:  48744

And I try to do: y_hat = predict(model, newdata = test_sample)

but I get the error: test data does not match model !

Here is the result of do str(train_sample) and str(test_sample)

str(train_sample)
'data.frame':   48752 obs. of  6 variables:
 $ year          : Factor w/ 19 levels "2000","2001",..: 5 17 5 17 14 13 16 6 7 17 ...
 $ nhood         : chr  "sea cliff" "hayes valley" "pacific heights" "noe valley" ...
 $ beds          : chr  "2" "1" "3" "1" ...
 $ room_in_apt   : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
 $ month         : Factor w/ 12 levels "1","2","3","4",..: 9 2 10 10 12 3 11 1 2 3 ...
 $ deflated_price: num  565 920 3055 616 1399 ...

str(test_sample)
'data.frame':   5000 obs. of  5 variables:
 $ year       : Factor w/ 19 levels "2000","2001",..: 5 5 5 5 5 6 5 6 8 5 ...
 $ nhood      : chr  "alamo square" "alamo square" "alamo square" "alamo square" ...
 $ beds       : chr  "0" "2" "1" "1" ...
 $ room_in_apt: Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
 $ month      : Factor w/ 12 levels "1","2","3","4",..: 6 6 11 8 7 1 8 3 9 9 ...

The variables seem to match, so what's causing the problem?

I tried adding deflated_price to test_sample, but that didn't work either.


问:
Hurdle model: In sqrt(diag(object$vcov)) : NaNs produced with no data for some levels
Good afternoon, I am trying to run a hurdle model with two dependent variables: probability of disease persistence (0 or 1; the 'hurdle') and disease prevalence rate given there was disease persistence. My response variable is number of infected individuals, which I offset by total population, instead of prevalence rate because negative binomial distributions require count data.

I am assessing two covariates: removal rate and land access rate. There are 7 levels for each variable and the levels are the same for both: 10, 20, 30, 40, 50, 70, and 100. I do not have scenarios where both rates are 100% because this would cause population and disease extinction in the model. Therefore, I have 48 combinations of rates (7x7=49-1=48 scenarios) and 100 repetitions per scenario (n=4800).
For example:

hurdle_data <- data.frame(Remove_Rate = c(10,20,30,40,50,70),
   Land_Access= c(20,30,40,50,70,100),
   Persistence= c(1,1,1,0,0,0),
   Num_Infected= c(77,71,74,0,0,0),
   Total_pop= c(200,198,187,191,170,165))
```
<p>With the model:</p>
<pre class="lang-r prettyprint-override"><code>library(pscl)
hurdle(formula = Num_Infected ~ Land_Access * Remove_Rate * offset(log(Total_pop)) | Land_Access * Remove_Rate, data = hurdle_data, dist = "negbin")
</code>```

I am getting the error: Warning message: In sqrt(diag(object$vcov)) : NaNs produced.
I believe it is because I do not have the 100x100 scenario to complete the 7 by 7 matrix of rate combinations. See the results here:

```<code>Count model coefficients (truncated negbin with log link):
                          Estimate Std. Error
(Intercept)             -0.9756389  0.0230297
Land_Access             -0.0002008        NaN
Remove_Rate             -0.0005532        NaN
Land_Access:Remove_Rate -0.0002561        NaN
Log(theta)               0.4061206  0.0058463
                        z value Pr(>|z|)
(Intercept)              -42.36   <2e-16 ***
Land_Access                 NaN      NaN
Remove_Rate                 NaN      NaN
Land_Access:Remove_Rate     NaN      NaN
Log(theta)                69.47   <2e-16 ***
Zero hurdle model coefficients (binomial with logit link):
                          Estimate Std. Error
(Intercept)              1.0087696  0.0596136
Land_Access              0.0027399        NaN
Remove_Rate              0.0000686        NaN
Land_Access:Remove_Rate -0.0003203        NaN
                        z value Pr(>|z|)
(Intercept)               16.92   <2e-16 ***
Land_Access                 NaN      NaN
Remove_Rate                 NaN      NaN
Land_Access:Remove_Rate     NaN      NaN
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Theta: count = 1.501
Number of iterations in BFGS optimization: 12
Log-likelihood: -1.965e+04 on 9 Df
</code>```

I would like to use this output as a prior for a Bayesian conditional model, and these issues are affecting that model's output so I cannot just ignore this (as I saw others have suggested with this issue).

I should mention that this model worked great with a similar set up but three categorical covariates instead of the above two. For example:

```<code>hurdle_data <- data.frame(Study_Area = c('Urban','Urban','Urban','Rural','Rural','Rural'),
Density= c(1,2,3,1,2,3),
Removal_Method=c('Ring','Parcel','Habitat','Ring','Parcel','Habitat')
Persistence= c(1,1,1,0,0,0)
Num_Infected= c(77,71,74,0,0,0),
Total_pop= c(200,198,187,191,170,165))
</code>```

Any suggestions on how to get around this issue would be really appreciated. Thank you.

Body:
Good afternoon, I am trying to run a hurdle model with two dependent variables: probability of disease persistence (0 or 1; the 'hurdle') and disease prevalence rate given there was disease persistence. My response variable is number of infected individuals, which I offset by total population, instead of prevalence rate because negative binomial distributions require count data.

I am assessing two covariates: removal rate and land access rate. There are 7 levels for each variable and the levels are the same for both: 10, 20, 30, 40, 50, 70, and 100. I do not have scenarios where both rates are 100% because this would cause population and disease extinction in the model. Therefore, I have 48 combinations of rates (7x7=49-1=48 scenarios) and 100 repetitions per scenario (n=4800).
For example:

hurdle_data <- data.frame(Remove_Rate = c(10,20,30,40,50,70),
   Land_Access= c(20,30,40,50,70,100),
   Persistence= c(1,1,1,0,0,0),
   Num_Infected= c(77,71,74,0,0,0),
   Total_pop= c(200,198,187,191,170,165))

With the model:

library(pscl)
hurdle(formula = Num_Infected ~ Land_Access * Remove_Rate * offset(log(Total_pop)) | Land_Access * Remove_Rate, data = hurdle_data, dist = "negbin")

I am getting the error: Warning message: In sqrt(diag(object$vcov)) : NaNs produced.
I believe it is because I do not have the 100x100 scenario to complete the 7 by 7 matrix of rate combinations. See the results here:

Count model coefficients (truncated negbin with log link):
                          Estimate Std. Error
(Intercept)             -0.9756389  0.0230297
Land_Access             -0.0002008        NaN
Remove_Rate             -0.0005532        NaN
Land_Access:Remove_Rate -0.0002561        NaN
Log(theta)               0.4061206  0.0058463
                        z value Pr(>|z|)
(Intercept)              -42.36   <2e-16 ***
Land_Access                 NaN      NaN
Remove_Rate                 NaN      NaN
Land_Access:Remove_Rate     NaN      NaN
Log(theta)                69.47   <2e-16 ***
Zero hurdle model coefficients (binomial with logit link):
                          Estimate Std. Error
(Intercept)              1.0087696  0.0596136
Land_Access              0.0027399        NaN
Remove_Rate              0.0000686        NaN
Land_Access:Remove_Rate -0.0003203        NaN
                        z value Pr(>|z|)
(Intercept)               16.92   <2e-16 ***
Land_Access                 NaN      NaN
Remove_Rate                 NaN      NaN
Land_Access:Remove_Rate     NaN      NaN
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Theta: count = 1.501
Number of iterations in BFGS optimization: 12
Log-likelihood: -1.965e+04 on 9 Df

I would like to use this output as a prior for a Bayesian conditional model, and these issues are affecting that model's output so I cannot just ignore this (as I saw others have suggested with this issue).

I should mention that this model worked great with a similar set up but three categorical covariates instead of the above two. For example:

hurdle_data <- data.frame(Study_Area = c('Urban','Urban','Urban','Rural','Rural','Rural'),
Density= c(1,2,3,1,2,3),
Removal_Method=c('Ring','Parcel','Habitat','Ring','Parcel','Habitat')
Persistence= c(1,1,1,0,0,0)
Num_Infected= c(77,71,74,0,0,0),
Total_pop= c(200,198,187,191,170,165))

Any suggestions on how to get around this issue would be really appreciated. Thank you.