问:
Collection has more than one element (error), React-native, Andorid-studio
I'm trying to open a brand new rn project in android studio, and getting Collection has more than one element. error on Gradle build every time.
Running ./gradle clean or npm run android or any other command via the terminal works without any issue.

Relevant info:

```<code>package.json

   "react": "18.1.0",
   "react-native": "0.70.4",
</code>```
```<code>build.gradle

    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        googlePlayServicesVersion = "17.0.0"

        if (System.properties['os.arch'] == "aarch64") {
            // For M1 Users we need to use the NDK 24 which added support for aarch64
            ndkVersion = "24.0.8215888"
        } else {
            // Otherwise we default to the side-by-side NDK version from AGP.
            ndkVersion = "21.4.7075529"
        }
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:7.2.1")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("de.undercouch:gradle-download-task:5.0.1")
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:4.3.14'
    }
</code>```
```<code>gradle-wrapper.properties

   distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
</code>```

What I've tried:

delete the build and .idea folders and invalidate the cache

change version to distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip and classpath("com.android.tools.build:gradle:7.1.1")

add the following to gradle.properties

```<code>    org.gradle.daemon=true
    org.gradle.parallel=true
    org.gradle.configureondemand=true
</code>```

In the full log file, this error occurs no less than 178 (!!) times, so adding the first one but feel free to ask for more parts of this file

```<code>org.gradle.tooling.BuildActionFailureException: The supplied phased action failed with an exception.
    at org.gradle.tooling.internal.consumer.connection.PhasedActionAwareConsumerConnection.run(PhasedActionAwareConsumerConnection.java:58)
    at org.gradle.tooling.internal.consumer.connection.ParameterValidatingConsumerConnection.run(ParameterValidatingConsumerConnection.java:62)
    at org.gradle.tooling.internal.consumer.DefaultPhasedBuildActionExecuter$1.run(DefaultPhasedBuildActionExecuter.java:78)
    at org.gradle.tooling.internal.consumer.DefaultPhasedBuildActionExecuter$1.run(DefaultPhasedBuildActionExecuter.java:70)
    at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:143)
    at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
    at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61)
    at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
    at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:67)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.intellij.openapi.externalSystem.model.ExternalSystemException: Collection has more than one element.
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.addBuildModels(ProjectImportAction.java:346)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.access$500(ProjectImportAction.java:42)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction$1.accept(ProjectImportAction.java:137)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.forEachNestedBuild(ProjectImportAction.java:192)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:130)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
    at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:64)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.runAction(AbstractClientProvidedBuildActionRunner.java:131)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:104)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:84)
    at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator.fromBuildModel(DefaultBuildTreeModelCreator.java:57)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$1(DefaultBuildTreeLifecycleController.java:82)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:106)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$5(StateTransitionController.java:166)
    at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:166)
    at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
    at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:166)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:103)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:74)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:43)
    at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
    at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
    at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:136)
    at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:122)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65)
    at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
    at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
    at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88)
    at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:52)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:40)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
    at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
</code>```

Any help will be very appreciated! Thanks in advance :)

Body:
I'm trying to open a brand new rn project in android studio, and getting Collection has more than one element. error on Gradle build every time.
Running ./gradle clean or npm run android or any other command via the terminal works without any issue.

Relevant info:

package.json

   "react": "18.1.0",
   "react-native": "0.70.4",

build.gradle

    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        googlePlayServicesVersion = "17.0.0"

        if (System.properties['os.arch'] == "aarch64") {
            // For M1 Users we need to use the NDK 24 which added support for aarch64
            ndkVersion = "24.0.8215888"
        } else {
            // Otherwise we default to the side-by-side NDK version from AGP.
            ndkVersion = "21.4.7075529"
        }
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:7.2.1")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("de.undercouch:gradle-download-task:5.0.1")
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:4.3.14'
    }

gradle-wrapper.properties

   distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip

What I've tried:

delete the build and .idea folders and invalidate the cache

change version to distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip and classpath("com.android.tools.build:gradle:7.1.1")

add the following to gradle.properties

    org.gradle.daemon=true
    org.gradle.parallel=true
    org.gradle.configureondemand=true

In the full log file, this error occurs no less than 178 (!!) times, so adding the first one but feel free to ask for more parts of this file

org.gradle.tooling.BuildActionFailureException: The supplied phased action failed with an exception.
    at org.gradle.tooling.internal.consumer.connection.PhasedActionAwareConsumerConnection.run(PhasedActionAwareConsumerConnection.java:58)
    at org.gradle.tooling.internal.consumer.connection.ParameterValidatingConsumerConnection.run(ParameterValidatingConsumerConnection.java:62)
    at org.gradle.tooling.internal.consumer.DefaultPhasedBuildActionExecuter$1.run(DefaultPhasedBuildActionExecuter.java:78)
    at org.gradle.tooling.internal.consumer.DefaultPhasedBuildActionExecuter$1.run(DefaultPhasedBuildActionExecuter.java:70)
    at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:143)
    at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
    at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61)
    at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
    at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:67)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.intellij.openapi.externalSystem.model.ExternalSystemException: Collection has more than one element.
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.addBuildModels(ProjectImportAction.java:346)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.access$500(ProjectImportAction.java:42)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction$1.accept(ProjectImportAction.java:137)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.forEachNestedBuild(ProjectImportAction.java:192)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:130)
    at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
    at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:64)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.runAction(AbstractClientProvidedBuildActionRunner.java:131)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:104)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:84)
    at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator.fromBuildModel(DefaultBuildTreeModelCreator.java:57)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$1(DefaultBuildTreeLifecycleController.java:82)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:106)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$5(StateTransitionController.java:166)
    at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:247)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:166)
    at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
    at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:166)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:103)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:74)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:43)
    at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
    at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
    at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:136)
    at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:122)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65)
    at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
    at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
    at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88)
    at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:52)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:40)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
    at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)

Any help will be very appreciated! Thanks in advance :)


来源: stackexchange

问:
XCode – Stuck on "Performing install actions"
Sigh. It started around 6 months ago and happened from time to time. For last 2-3 days I completely lost opportunity to debug on device. Whenever I'm trying it, I get infinite stuck on "Performing install actions" step. Sometimes, it ends with "unknown error occurred", sometimes with "Could not launch", sometimes it just stuck without any error.

I know the problem is in my specific iPhone, because it doesn't happen with another iPhones and it does happen with my iPhone on different machines.

What I've already tried and it sometimes helped me, but now it doesn't help at all:

restart XCode

restart Macbook

clean build folder/derived data (yeah, I'm an experienced iOS developer, so I've tried that)

unpair device and pair it once again (I should say, that previously I thought that was a silver bullet)

reinstall XCode

reinstall iOS Device Support

turn on/turn off Wi-Fi/Bluetooth

reboot iPhone

reset iPhone

reinstall provisioning profiles

pray

unpair Apple Watch

turn off Apple Watch

My setup: XCode 14.2 (tried different versions too, for example, XCode 13), iPhone 11 (iOS 16.2, started when I was on iOS 15)

Once again, I don't have any problems when I debug on Simulator on different device.

Any recommendations would be really appreciated, cause I'm already starting to lose my mind.

ContentLicense: CC BY-SA 4.0


问:
Specifying figure size in print_figure function in Matplotlib.FigureCanvasBase
I have a Canvas class that inherits from the FigureCanvas class in Matplotlib.

```<code>from matplotlib.backends.backend_qt5agg import FigureCanvas
class Canvas(FigureCanvas):
    def __init__(self):
        fig = Figure(figsize=(5, 3))
        super().__init__(fig)
</code>```

And I display canvas figures in the PyQt5 window. The canvas size changes depending on the size of the window. When I print these canvases, it always prints at the current size of the canvas (solutions in How do I change the size of figures drawn with Matplotlib? and Specify figure size in centimeter in matplotlib do not work).

However, I would like to print them in a fixed size, no matter what the current size is. As far as I could tell from the internet, I cannot specify size in print_figure() function. How can I print all the figures at the fixed size?

Body:
I have a Canvas class that inherits from the FigureCanvas class in Matplotlib.

from matplotlib.backends.backend_qt5agg import FigureCanvas
class Canvas(FigureCanvas):
    def __init__(self):
        fig = Figure(figsize=(5, 3))
        super().__init__(fig)

And I display canvas figures in the PyQt5 window. The canvas size changes depending on the size of the window. When I print these canvases, it always prints at the current size of the canvas (solutions in How do I change the size of figures drawn with Matplotlib? and Specify figure size in centimeter in matplotlib do not work).

However, I would like to print them in a fixed size, no matter what the current size is. As far as I could tell from the internet, I cannot specify size in print_figure() function. How can I print all the figures at the fixed size?


问:
NextJS Api node modules path on Vercel deployment
I am generating a file inside nextJs api function and I format it there with prettier.
Everything works fine when hosted locally but on Vercel the plugin I load cannot be found.

I use:

```<code>  const formattedContract = prettier.format(newContract, {
    parser: "solidity-parse",
    pluginSearchDirs: ["node_modules"],
    plugins: ["prettier-plugin-solidity"],
  });

  fs.writeFileSync(`/tmp/${contractId}.sol`, formattedContract);
</code>```

Error I am getting (from Vercel logs):

```<code>[POST] /api/generateContract
14:03:48:05
2023-01-06T13:03:53.774Z    4a4f5046-e8e7-4f0c-8f28-514637b2accb    ERROR   Error: Cannot find module 'prettier-plugin-solidity'
Require stack:
- /var/task/node_modules/prettier/index.js
- /var/task/.next/server/pages/api/generateContract.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:23:32)
    at resolve (node:internal/modules/cjs/helpers:109:19)
    at /var/task/node_modules/prettier/index.js:37772:25
    at Array.map (<anonymous>)
    at Object.load (/var/task/node_modules/prettier/index.js:37767:65)
    at Object.load [as loadPlugins] (/var/task/node_modules/prettier/index.js:15932:23)
    at /var/task/node_modules/prettier/index.js:37834:24
    at Object.format (/var/task/node_modules/prettier/index.js:37850:12)
    at handler (/var/task/.next/server/pages/api/generateContract.js:72:79) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/var/task/node_modules/prettier/index.js',
    '/var/task/.next/server/pages/api/generateContract.js',
    '/var/task/node_modules/next/dist/server/next-server.js',
    '/var/task/___next_launcher.cjs'
  ]
}
</code>```

What is the correct path to node modules on Vercel?

I have tried putting it on the default path / and node_modules.

EDIT: For some reason the plugin was not imported into the server node-modules. I have added
import 'prettier-plugin-solidity'; on top of the file for it to be included.

Body:
I am generating a file inside nextJs api function and I format it there with prettier.
Everything works fine when hosted locally but on Vercel the plugin I load cannot be found.

I use:

  const formattedContract = prettier.format(newContract, {
    parser: "solidity-parse",
    pluginSearchDirs: ["node_modules"],
    plugins: ["prettier-plugin-solidity"],
  });

  fs.writeFileSync(`/tmp/${contractId}.sol`, formattedContract);

Error I am getting (from Vercel logs):

[POST] /api/generateContract
14:03:48:05
2023-01-06T13:03:53.774Z    4a4f5046-e8e7-4f0c-8f28-514637b2accb    ERROR   Error: Cannot find module 'prettier-plugin-solidity'
Require stack:
- /var/task/node_modules/prettier/index.js
- /var/task/.next/server/pages/api/generateContract.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:23:32)
    at resolve (node:internal/modules/cjs/helpers:109:19)
    at /var/task/node_modules/prettier/index.js:37772:25
    at Array.map (<anonymous>)
    at Object.load (/var/task/node_modules/prettier/index.js:37767:65)
    at Object.load [as loadPlugins] (/var/task/node_modules/prettier/index.js:15932:23)
    at /var/task/node_modules/prettier/index.js:37834:24
    at Object.format (/var/task/node_modules/prettier/index.js:37850:12)
    at handler (/var/task/.next/server/pages/api/generateContract.js:72:79) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/var/task/node_modules/prettier/index.js',
    '/var/task/.next/server/pages/api/generateContract.js',
    '/var/task/node_modules/next/dist/server/next-server.js',
    '/var/task/___next_launcher.cjs'
  ]
}

What is the correct path to node modules on Vercel?

I have tried putting it on the default path / and node_modules.

EDIT: For some reason the plugin was not imported into the server node-modules. I have added
import 'prettier-plugin-solidity'; on top of the file for it to be included.


问:
Simple query taking 160+ seconds on android device when it takes 0.2 seconds from Unity3d editor
```<code>var coll = await _firestore
   .Collection("Collection")
   .Document("RsthH7NhZoNVBMG4g979")
   .GetSnapshotAsync();
</code>```

this simple query take 160+ seconds to execute on android device.
And it is working fine from Unity3d editor (PC) taking only 0.2 seconds to execute.

I try to load collection that contain one document with list of 200 simple elements total size 8KB.
And it load to long.

Body:
var coll = await _firestore
   .Collection("Collection")
   .Document("RsthH7NhZoNVBMG4g979")
   .GetSnapshotAsync();

this simple query take 160+ seconds to execute on android device.
And it is working fine from Unity3d editor (PC) taking only 0.2 seconds to execute.

I try to load collection that contain one document with list of 200 simple elements total size 8KB.
And it load to long.


问:
NLog directory per date with limit of directories
I have an NLog target set up like this.

```<code><target xsi:type="File"
        name="fileTarget"
        fileName="${basedir}/logs/${date:format=dd.MM.yyyy}/${session_id}.log" />
</code>```

This generates the log files like this:

```<code>- 01.01.2058
  - {session_id_1}.log
  - {session_id_2}.log
  - ...
- 02.01.2058
  - {session_id_1}.log
  - {session_id_2}.log
  - ...
- ...
</code>```

How do I make it so after X amount of days, the date folder will get deleted automatically?

Body:
I have an NLog target set up like this.

<target xsi:type="File"
        name="fileTarget"
        fileName="${basedir}/logs/${date:format=dd.MM.yyyy}/${session_id}.log" />

This generates the log files like this:

- 01.01.2058
  - {session_id_1}.log
  - {session_id_2}.log
  - ...
- 02.01.2058
  - {session_id_1}.log
  - {session_id_2}.log
  - ...
- ...

How do I make it so after X amount of days, the date folder will get deleted automatically?


问:
How to define base function in Kotlin for coroutine actor builder that supports passing ActorScoped lambdas
I am attempting to refactor my android applications kotlin code as follows.

I have a multi module android project each having a viewmodel

currently each viewmodel has this send channel defined

```<code>val mySendChannel: SendChannel<Action> = viewModelScope.actor(start = CoroutineStart.LAZY, context = actorJob, capacity = Channel.UNLIMITED) {
        for (action in channel) {
            when (action) {
                is FirstActionType -> doFirstAction()
                is SecondActionType -> doASecondAction()
                is ...
            }
        }
    }
</code>```

I do not like that I have to repeat viewModelScope.actor(start = CoroutineStart.LAZY, context = actorJob, capacity = Channel.UNLIMITED) in each viewmodel

what I would like is to specify this once in my base ViewModel and simply pass a specific block/lambda to this super class function from each of my modules actual viewmodels

So far I have this in my base viewModel

```<code>fun frank(block: suspend ActorScope<Actionable>.(Actionable) -> Unit): SendChannel<Actionable> =
    viewModelScope.actor(start = CoroutineStart.LAZY, context = actorJob, capacity = Channel.UNLIMITED) {
        for (action in channel) {
            block(action)
        }
    }
</code>```

however when I call frank as follows:-

```<code>    fun stuff() {
    frank { action ->
        when (action) {
            when (action) {
            is Module#_FirstActionType -> doFirstAction()
            is Module#_SecondActionType -> doASecondAction()
            is ...
        }
    }
}
</code>```

This compiles however i cannot see how to return the SendChannel from my stuff fun

Is it possible to achieve the desired result?

how can I specify the actor args once in my Base ViewModel and simply pass the specific when Sub Function from each of my module viewmodels

UPDATE

Kotlin actors have this comment

```<code>Note: This API will become obsolete in future updates with introduction of complex actors. See issue #87 .
</code>```

Body:
I am attempting to refactor my android applications kotlin code as follows.

I have a multi module android project each having a viewmodel

currently each viewmodel has this send channel defined

val mySendChannel: SendChannel<Action> = viewModelScope.actor(start = CoroutineStart.LAZY, context = actorJob, capacity = Channel.UNLIMITED) {
        for (action in channel) {
            when (action) {
                is FirstActionType -> doFirstAction()
                is SecondActionType -> doASecondAction()
                is ...
            }
        }
    }

I do not like that I have to repeat viewModelScope.actor(start = CoroutineStart.LAZY, context = actorJob, capacity = Channel.UNLIMITED) in each viewmodel

what I would like is to specify this once in my base ViewModel and simply pass a specific block/lambda to this super class function from each of my modules actual viewmodels

So far I have this in my base viewModel

fun frank(block: suspend ActorScope<Actionable>.(Actionable) -> Unit): SendChannel<Actionable> =
    viewModelScope.actor(start = CoroutineStart.LAZY, context = actorJob, capacity = Channel.UNLIMITED) {
        for (action in channel) {
            block(action)
        }
    }

however when I call frank as follows:-

    fun stuff() {
    frank { action ->
        when (action) {
            when (action) {
            is Module#_FirstActionType -> doFirstAction()
            is Module#_SecondActionType -> doASecondAction()
            is ...
        }
    }
}

This compiles however i cannot see how to return the SendChannel from my stuff fun

Is it possible to achieve the desired result?

how can I specify the actor args once in my Base ViewModel and simply pass the specific when Sub Function from each of my module viewmodels

UPDATE

Kotlin actors have this comment

Note: This API will become obsolete in future updates with introduction of complex actors. See issue #87 .


问:
Trigger another jenkins Pipeline B after success of jenkins pipeline A
I am using Scripted pipeline. I want to trigger pipeline B after the success of Pipeline A, so I added this bit of code to do that

```<code>  stage('Invoke Another Pipeline'){
            steps {
                script{
                    if (params.name == value1 && params.env==prod ){
                        build job: pipelineB-name, propagate: true, wait: true, parameters: [                 string(name: 'param1', value: 'value1')]
                    }
                }
            }
        }

</code>```

But its not working I am getting this error. Could someone guide where I am wrong in that stage step

```<code>
    `groovy.lang.MissingPropertyException: No such property: value1 for class: groovy.lang.Binding
    at groovy.lang.Binding.getVariable(Binding.java:63)
    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:270)
    at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:291)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:295)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:271)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:271)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:271)
    at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:29)
    at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
    at WorkflowScript.run(WorkflowScript:192)
    at ___cps.transform___(Native Method)
    at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
    at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
    at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
    at jdk.internal.reflect.GeneratedMethodAccessor433.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
    at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
    at com.cloudbees.groovy.cps.Next.step(Next.java:83)
    at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
    at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
    at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
    at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
    at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
    at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
    at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
    at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:405)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:317)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:281)
    at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Finished: FAILURE
`
</code>```

I was expecting Pipeline B to get trigger

Body:
I am using Scripted pipeline. I want to trigger pipeline B after the success of Pipeline A, so I added this bit of code to do that

  stage('Invoke Another Pipeline'){
            steps {
                script{
                    if (params.name == value1 && params.env==prod ){
                        build job: pipelineB-name, propagate: true, wait: true, parameters: [                 string(name: 'param1', value: 'value1')]
                    }
                }
            }
        }

But its not working I am getting this error. Could someone guide where I am wrong in that stage step

    `groovy.lang.MissingPropertyException: No such property: value1 for class: groovy.lang.Binding
    at groovy.lang.Binding.getVariable(Binding.java:63)
    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:270)
    at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:291)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:295)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:271)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:271)
    at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:271)
    at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:29)
    at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
    at WorkflowScript.run(WorkflowScript:192)
    at ___cps.transform___(Native Method)
    at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
    at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
    at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
    at jdk.internal.reflect.GeneratedMethodAccessor433.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
    at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
    at com.cloudbees.groovy.cps.Next.step(Next.java:83)
    at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
    at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
    at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
    at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
    at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
    at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
    at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
    at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:405)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:317)
    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:281)
    at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Finished: FAILURE
`

I was expecting Pipeline B to get trigger


问:
What are the minimal permissions required to use a Vertex AI Workbench
I would like to limit the permissions of the service account that is used inside a Vertex AI workbench. I know that I can choose a custom service account instead of the default compute service account when creating the workbench. But the documentation says that whichever account I use that account needs to have the Editor role. I need to set up some workbenches for my colleagues but I don't want to give them Editor rights on the project (which they would effectively have since they would act as the service account when using the workbench). If I remove the Editor role from the service account the workbench won't start. What are the minimal permissions that the service account must have so that another user can start and use the workbench?</p>


问:
jpaquery not returning any result list on calling the method, but generated hibernate query returns result when run manually in MSSQL
When I'm making the call to JpaRepository findByOrderTrackingNumber method, it is not returning any result. I enabled the jpa-sql/hibernate logging and got the underlying query which is being generated, after running the same query manually in MSSQL server is returning the result, I am not able to understand where the issue is, Attaching the example code snippets.

Am using oneToMany bidirectional mapping between my entity classes
Order Entity

```<code>
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Getter
@Setter
@Table(name="orders")
public class Order {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @GenericGenerator(name = SequentialUUIDGenerator.ID, strategy = SequentialUUIDGenerator.CLASS_NAME)
    @Type(type = EntityConstants.UUID_CHAR)
    @Column
    private UUID id;

    @Column(name = "order_tracking_number")
    private String orderTrackingNumber;

    @Column(name = "total_quantity")
    private int totalQuantity;

    @Column(name = "total_price")
    private BigDecimal totalPrice;

    @Column(name = "status")
    private String status;

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "order")
    private List<OrderItem> orderItems ;
}

</code>```

Order Items Entity

```<code>@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Getter
@Setter
@Table(name="order_items",schema = "ecommerce")
public class OrderItem {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @GenericGenerator(name = SequentialUUIDGenerator.ID, strategy = SequentialUUIDGenerator.CLASS_NAME)
    @Type(type = EntityConstants.UUID_CHAR)
    @Column
    private UUID id;

    @Column(name="image_url")
    private String imageUrl;

    @Column(name = "price")
    private BigDecimal price;

    @Column(name="quantity")
    private int quantity;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "order_id")
    private Order order;
}
</code>```

OrderRepository class

```<code>@Repository
@YardAuthorized
public interface OrderRepository extends JpaRepository<Order, UUID> {
    List<Order> findByOrderTrackingNumber(String orderTrackingNumber);
}
</code>```

When am making a call to findByOrderTrackingNumber method it is not returning any result.
But when I run the underlying hibernate query generated in MSSQL server it returns proper result.

Here am only expecting the result only from **orders **table, not from **order_items **table.
Am not able to understand why the result is empty, is OneToMany relation in my entity causing the issue?

I tried to find the solution but could not find any existing answer for the same, redirect me if there in one.

Body:
When I'm making the call to JpaRepository findByOrderTrackingNumber method, it is not returning any result. I enabled the jpa-sql/hibernate logging and got the underlying query which is being generated, after running the same query manually in MSSQL server is returning the result, I am not able to understand where the issue is, Attaching the example code snippets.

Am using oneToMany bidirectional mapping between my entity classes
Order Entity

@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Getter
@Setter
@Table(name="orders")
public class Order {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @GenericGenerator(name = SequentialUUIDGenerator.ID, strategy = SequentialUUIDGenerator.CLASS_NAME)
    @Type(type = EntityConstants.UUID_CHAR)
    @Column
    private UUID id;

    @Column(name = "order_tracking_number")
    private String orderTrackingNumber;

    @Column(name = "total_quantity")
    private int totalQuantity;

    @Column(name = "total_price")
    private BigDecimal totalPrice;

    @Column(name = "status")
    private String status;

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "order")
    private List<OrderItem> orderItems ;
}

Order Items Entity

@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Getter
@Setter
@Table(name="order_items",schema = "ecommerce")
public class OrderItem {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @GenericGenerator(name = SequentialUUIDGenerator.ID, strategy = SequentialUUIDGenerator.CLASS_NAME)
    @Type(type = EntityConstants.UUID_CHAR)
    @Column
    private UUID id;

    @Column(name="image_url")
    private String imageUrl;

    @Column(name = "price")
    private BigDecimal price;

    @Column(name="quantity")
    private int quantity;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "order_id")
    private Order order;
}

OrderRepository class

@Repository
@YardAuthorized
public interface OrderRepository extends JpaRepository<Order, UUID> {
    List<Order> findByOrderTrackingNumber(String orderTrackingNumber);
}

When am making a call to findByOrderTrackingNumber method it is not returning any result.
But when I run the underlying hibernate query generated in MSSQL server it returns proper result.

Here am only expecting the result only from **orders **table, not from **order_items **table.
Am not able to understand why the result is empty, is OneToMany relation in my entity causing the issue?

I tried to find the solution but could not find any existing answer for the same, redirect me if there in one.


问:
Display a copy password button only when the generate password button has been clicked and a password has been generated
I have 2 buttons for my password generator a 'Generate Password' button and a 'Copy Password' button.

Both work as they should but I would like the 'Copy Password' button to only be displayed when the 'Generate Password' button has been clicked and a new password has been generated

// Assignment Code
// HTML elements
const generateBtn = document.querySelector("#generate");
const characterID = document.getElementById('characters')
const passwordText = document.querySelector("#password");
const numberID = document.getElementById('numbers')
const upperID = document.getElementById('uppercase')
const lowerID = document.getElementById('lowercase')
const specialID = document.getElementById('special-characters')

// Variables
let validCharacters
let password

// character types
const numberCharacters = '0123456789'
const upperCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
const lowerCharacters = 'abcdefghijklmnopqrstuvwxyz'
const specialCharacters = '!@#$%^&*()-_=+<>'

// All logic for generating password

function createPassword() {
  let password = ''

  // Additional variables
  let characterTotal = parseInt(characterID.value)
  let passwordLength

  // Function determining password length
  if (characterTotal >= 7 && characterTotal <= 128) {
    passwordLength = characterTotal
  } else {
    document.getElementById("errorMessage").innerHTML = "Please select a valid range of characters between 8 and 128"
  }
  validCharacters = ''

  // Check to see if numbers are accepted
  if (numberID.checked) {
    validCharacters += numberCharacters
  }
  // Check to see if uppercase is accepted
  if (upperID.checked) {
    validCharacters += upperCharacters
  }
  //Check to see if lowercase is accepted
  if (lowerID.checked) {
    validCharacters += lowerCharacters
  }
  //Check to see if special characters are accepted
  if (specialID.checked) {
    validCharacters += specialCharacters
  }

  //Alert if no checkboxes are selected
  if (numberID.checked === false && upperID.checked === false && lowerID.checked === false && specialID.checked === false) {
    document.getElementById("errorMessage").innerHTML = "Please select at least one character type"
  }

  //For loop to generate password
  for (let i = 0; i <= passwordLength; i++) {
    let randomNumber = Math.floor(Math.random() * validCharacters.length - 1)
    password += validCharacters.substring(randomNumber, randomNumber + 1)
  }

  passwordText.value = password
}

//Run event for generating password on click or "Enter" events
const btnClick = generateBtn.addEventListener('click', function() {
  createPassword()
});

const enterBtn = document.addEventListener('keypress', function(e) {
  if (e.key === "Enter") {
    createPassword()
  }
})

//Copy password to clipboard
function myFunction() {
  // Get the text field
  var copyText = document.getElementById("password");

  //Select the text field
  copyText.select();
  copyText.setSelectionRange(0, 99999); // For mobile devices

  //Copy the text inside the text field
  navigator.clipboard.writeText(copyText.value);

  // Alert the copied text
  document.getElementById("errorMessage").innerHTML = "Password copied to clipboard"
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><section class="card-footer">
  <button id="generate" class="btn">Generate Password</button>
  <button class="btn" onclick="myFunction()">Copy Password</button>
</section></code>```

Body:
I have 2 buttons for my password generator a 'Generate Password' button and a 'Copy Password' button.

Both work as they should but I would like the 'Copy Password' button to only be displayed when the 'Generate Password' button has been clicked and a new password has been generated

// Assignment Code
// HTML elements
const generateBtn = document.querySelector("#generate");
const characterID = document.getElementById('characters')
const passwordText = document.querySelector("#password");
const numberID = document.getElementById('numbers')
const upperID = document.getElementById('uppercase')
const lowerID = document.getElementById('lowercase')
const specialID = document.getElementById('special-characters')

// Variables
let validCharacters
let password

// character types
const numberCharacters = '0123456789'
const upperCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
const lowerCharacters = 'abcdefghijklmnopqrstuvwxyz'
const specialCharacters = '!@#$%^&*()-_=+<>'

// All logic for generating password

function createPassword() {
  let password = ''

  // Additional variables
  let characterTotal = parseInt(characterID.value)
  let passwordLength

  // Function determining password length
  if (characterTotal >= 7 && characterTotal <= 128) {
    passwordLength = characterTotal
  } else {
    document.getElementById("errorMessage").innerHTML = "Please select a valid range of characters between 8 and 128"
  }
  validCharacters = ''

  // Check to see if numbers are accepted
  if (numberID.checked) {
    validCharacters += numberCharacters
  }
  // Check to see if uppercase is accepted
  if (upperID.checked) {
    validCharacters += upperCharacters
  }
  //Check to see if lowercase is accepted
  if (lowerID.checked) {
    validCharacters += lowerCharacters
  }
  //Check to see if special characters are accepted
  if (specialID.checked) {
    validCharacters += specialCharacters
  }

  //Alert if no checkboxes are selected
  if (numberID.checked === false && upperID.checked === false && lowerID.checked === false && specialID.checked === false) {
    document.getElementById("errorMessage").innerHTML = "Please select at least one character type"
  }

  //For loop to generate password
  for (let i = 0; i <= passwordLength; i++) {
    let randomNumber = Math.floor(Math.random() * validCharacters.length - 1)
    password += validCharacters.substring(randomNumber, randomNumber + 1)
  }

  passwordText.value = password
}

//Run event for generating password on click or "Enter" events
const btnClick = generateBtn.addEventListener('click', function() {
  createPassword()
});

const enterBtn = document.addEventListener('keypress', function(e) {
  if (e.key === "Enter") {
    createPassword()
  }
})

//Copy password to clipboard
function myFunction() {
  // Get the text field
  var copyText = document.getElementById("password");

  //Select the text field
  copyText.select();
  copyText.setSelectionRange(0, 99999); // For mobile devices

  //Copy the text inside the text field
  navigator.clipboard.writeText(copyText.value);

  // Alert the copied text
  document.getElementById("errorMessage").innerHTML = "Password copied to clipboard"
}

  <button id="generate" class="btn">Generate Password</button>
  <button class="btn" onclick="myFunction()">Copy Password</button>


问:
Does Artifactory 7.x auto-upgrade minor versions, and if yes, how do I prevent it?
I have an Artifactory Pro server running on an EC2 instance. Up until this morning, it was running version 7.41.13 and worked just fine.

It has a bunch of repositories that are hosted in the local Derby database with the blobs stored in S3.

This morning around 8:20 UTC, it crashed and rebooted. After the reboot, something was wrong. I can still see all packages under the "Artifactory -> Packages" in the UI, but there are no repositories under "Artifactory -> Artifacts", and I can't download the packages that I find in packages.

I restored some of the earlier hourly backups, and noticed that right as they boot, everything is fine, but after about 30-60 seconds, the Artifactory service restarts, and now the repos are gone.

Looking in the logs, I can see that the server starts up running v. 7.41.13, then restarts the service as version 7.49.3 and runs a lot of DB migration steps. After this, it says that there were no remote or local repos to map, corresponding to the missing repos in the UI.

I've looked through the documentation, logs, and config files, and I can't find anything about automatic upgrades so I'm very confused.

The server has been running fine for about 6 months prior to this, and nothing has changed in its configuration between now and yester day (AFAICT).

Has anyone seen this behaviour before, and do you have any suggestions as to how to fix the issue? Even stopping the upgrade and reboot would allow my users to extricate their packages long enough for me to do a full reinstall, but I can't see how to that either.


问:
Adding an app to iOS simulator to access from Xamarin.Forms app
I have a Xamarin.Forms app that needs to launch a second app (TeamViewer). In order to test this, I need to add TeamViewer to the simulator that XF attaches to. The simulator runs on my Mac. Is there a way to get TeamViewer onto the simulator so that my app can launch it?

Thanks!


问:
I need to several celery projects configured on a single server
On a machine, I want to configure celery beat and celery worker.

test environment beat
celery -A test_project.celery -Q test -n test beat -l info
test environment worker
celery -A test_project.celery worker -Q test -n test -l info
dev environment beat
celery -A dev_project.celery -Q dev -n dev beat -l info
dev environment worker
celery -A test_project.celery worker -Q dev -n dev -l info
production environment beat
celery -A prod_project.celery -Q prod -n prod beat -l info
production environment worker

celery -A prod_project.celery worker -Q prod -n prod -l info


问:
AppleScript does not run from Automator
I try to implement a folder action with Automator.
So i use the module "folder action" and there defining the folder.
The only action module in there is "Execute AppleScript" with this code inside:

```<code>on run {input, parameters}
    set fileName to name of (item 1 of input)
    display dialog fileName
end run
</code>```

I simply want to know, if the file dropped into the folder will be transfered!

No dialog is showing up!

The workflow is connected to the folder, because when i insert an action module like "Delete file" it works!

Is there a permission problem?

I tried now the following (without Automator):

```<code>on adding folder items to this_folder after receiving these_items
        display dialog (item 1 of these_items) as text
  end adding folder items to
</code>```

This works fine and shows me that the binding to my folder works and these_items will be passed as a text to the dialog!

But this does not work!?:

```<code>    on adding folder items to this_folder after receiving these_items
    tell application "Finder"
        set fileName to name of (item 1 of input)
        display dialog fileName
    end tell
end adding folder items to
</code>```

Strange: I tried with Automator again:

```<code>on run {input, parameters}
    tell application "Finder"
        set fileName to name of (item 1 of input)
    end tell
    display dialog fileName
end run
</code>```

and it WORKS!

What is the difference to the example directly with an AppleScript as above?

Ah, i made a mistake! it should be "these_items" not "input"!
Both versions work!
Thank you all!

Title: AppleScript does not run from Automator

Body:
I try to implement a folder action with Automator.
So i use the module "folder action" and there defining the folder.
The only action module in there is "Execute AppleScript" with this code inside:

on run {input, parameters}
    set fileName to name of (item 1 of input)
    display dialog fileName
end run

I simply want to know, if the file dropped into the folder will be transfered!

No dialog is showing up!

The workflow is connected to the folder, because when i insert an action module like "Delete file" it works!

Is there a permission problem?

I tried now the following (without Automator):

on adding folder items to this_folder after receiving these_items
        display dialog (item 1 of these_items) as text
  end adding folder items to

This works fine and shows me that the binding to my folder works and these_items will be passed as a text to the dialog!

But this does not work!?:

    on adding folder items to this_folder after receiving these_items
    tell application "Finder"
        set fileName to name of (item 1 of input)
        display dialog fileName
    end tell
end adding folder items to

Strange: I tried with Automator again:

on run {input, parameters}
    tell application "Finder"
        set fileName to name of (item 1 of input)
    end tell
    display dialog fileName
end run

and it WORKS!

What is the difference to the example directly with an AppleScript as above?

Ah, i made a mistake! it should be "these_items" not "input"!
Both versions work!
Thank you all!


问:
How to Redirect a Page on Old Domain to a New Page on a Different Domain URL
Can someone please tell me why this code does not work correctly?  The redirect is simply ignored and the old page remains displayed</p>
```<code> <rule name="test" stopProcessing="true">
 <match url="(.*)" />
 <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
    <add input="{HTTP_HOST}{REQUEST_URI}" pattern="https://old-site.com/contact.php" />
    <add input="{HTTP_HOST}{REQUEST_URI}" pattern="https://www.old-site.com/contact.php" />
 </conditions>
 <action type="Redirect" url="https://www.new-site.com/pages/contact" redirectType="Permanent"/>
 </rule>
</code>```

Body:
Can someone please tell me why this code does not work correctly?  The redirect is simply ignored and the old page remains displayed

 <rule name="test" stopProcessing="true">
 <match url="(.*)" />
 <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
    <add input="{HTTP_HOST}{REQUEST_URI}" pattern="https://old-site.com/contact.php" />
    <add input="{HTTP_HOST}{REQUEST_URI}" pattern="https://www.old-site.com/contact.php" />
 </conditions>
 <action type="Redirect" url="https://www.new-site.com/pages/contact" redirectType="Permanent"/>
 </rule>


问:
Where do I import linkage from in numba-scipy
```<code>import numpy as np
import pandas as pd
from scipy.cluster.hierarchy import dendrogram, linkage, cut_tree
>>> "WHAT TO PUT HERE"   from numba_scipy.special.overloads import linkage "?"

X = [[1.0,2.0,3.0,4.0,5.0],
     [1.0,3.0,4.0,5.0,6.0],
     [1.0,2.0,5.0,6.0,7.0],
     [2.0,3.0,5.0,4.0,3.0]]

Xdf = pd.DataFrame(data=X).transpose()

Zf = linkage(Xdf.transpose(), 'single', 'correlation')
</code>```

I want to change this to use numba-scipy, but there is no documentation (Yes there is a site but there is no actual documentation).

What do I need to put on the import line?

Body:
import numpy as np
import pandas as pd
from scipy.cluster.hierarchy import dendrogram, linkage, cut_tree
>>> "WHAT TO PUT HERE"   from numba_scipy.special.overloads import linkage "?"

X = [[1.0,2.0,3.0,4.0,5.0],
     [1.0,3.0,4.0,5.0,6.0],
     [1.0,2.0,5.0,6.0,7.0],
     [2.0,3.0,5.0,4.0,3.0]]

Xdf = pd.DataFrame(data=X).transpose()

Zf = linkage(Xdf.transpose(), 'single', 'correlation')

I want to change this to use numba-scipy, but there is no documentation (Yes there is a site but there is no actual documentation).

What do I need to put on the import line?


问:
Can I Ignore specific elements within draggable items in vue-draggable?
I have nested draggable which I am using as a form builder.

```<code><draggable>
     <parent_item>
        <draggable>
           <child_item>
               <input>
           </child_item>
        </draggable>
     </parent_item>
</draggable>
</code>```

It all works fine but I can't click and highlight text in the input field. I can double click to highlight all but not drag select (expected behaviour I know).
Is there a way to tell draggable to to ignore drag events on a specific element within a child?

I've seen a similar question but that referred to making child_items not draggable. However, what I want to is prevent the draggable event firing on the text input but still allow the child_item that is around it to be draggable.

I've tried making the handle only specific areas of the element but this seems a bit clunky. Would be some much easier if there was an ignore element option. Is this possible?

Body:
I have nested draggable which I am using as a form builder.

<draggable>
     <parent_item>
        <draggable>
           <child_item>
               <input>
           </child_item>
        </draggable>
     </parent_item>
</draggable>

It all works fine but I can't click and highlight text in the input field. I can double click to highlight all but not drag select (expected behaviour I know).
Is there a way to tell draggable to to ignore drag events on a specific element within a child?

I've seen a similar question but that referred to making child_items not draggable. However, what I want to is prevent the draggable event firing on the text input but still allow the child_item that is around it to be draggable.

I've tried making the handle only specific areas of the element but this seems a bit clunky. Would be some much easier if there was an ignore element option. Is this possible?


问:
How to store a list of types using a Rust macro?
I am using some macros that look like this:

macro_rules! deserialize_individually {
  ($ecs:expr, $de_ser:expr, $data:expr, $( $type:ty),*) => {
      $(
          // *** omitted ***
      )*
  };
}
```
<p>They take a long list of <code>$type</code> and are used in a few places with the same list of <code>$type</code> arguments, so it would be nice to store the list of types in another (unevaluated) macro:</p>
<pre class="lang-rust prettyprint-override"><code>// This should basically be right, but need to
// delay type checking, as this would not generate a
//valid rust expression on its own.

macro_rules! type_list {
  ($( $type:ty),*) => {
    $(
      $type,
    )*
  };
}
</code>```

I suspect there is no way to do this with declarative macros, and I may need to look to procedural macros to achieve this.

Body:
I am using some macros that look like this:

macro_rules! deserialize_individually {
  ($ecs:expr, $de_ser:expr, $data:expr, $( $type:ty),*) => {
      $(
          // *** omitted ***
      )*
  };
}

They take a long list of $type and are used in a few places with the same list of $type arguments, so it would be nice to store the list of types in another (unevaluated) macro:

// This should basically be right, but need to
// delay type checking, as this would not generate a
//valid rust expression on its own.

macro_rules! type_list {
  ($( $type:ty),*) => {
    $(
      $type,
    )*
  };
}

I suspect there is no way to do this with declarative macros, and I may need to look to procedural macros to achieve this.


问:
Angular js output event emitter method not getting called
The method triggered through output event emitter is not getting called.
This is my output event emitter:

```<code> @Output() onEditTask: EventEmitter<Task> = new EventEmitter();
</code>```

This is my view:

```<code><app-add-task (onAddTask)="addTask($event)" (onEditTask)="editTask($event)"></app-add-task>
</code>```

This method doesnt get called:

```<code>  editTask(task: Task) {
    debugger;
  }
</code>```

Body:
The method triggered through output event emitter is not getting called.
This is my output event emitter:

 @Output() onEditTask: EventEmitter<Task> = new EventEmitter();

This is my view:

<app-add-task (onAddTask)="addTask($event)" (onEditTask)="editTask($event)"></app-add-task>

This method doesnt get called:

  editTask(task: Task) {
    debugger;
  }


问:
Tabulator - Multiple Row Selection is Highlighting the Text on Shift click
Tabulator Version: 5.4.2

Currently trying to resolve an issue while using the multiple row selection option: selectableRangeMode:"click"

It's currently highlighting the data contents within my table while clicking a start and end row.

Reference image:

I'm trying to make it so it doesn't highlight the data content when only using the shift click option.
I'd still like to give the user the option to highlight the text if they are not using shift click functionality.

Anyone know of any solutions?


问:
How to correlate overall error in LPA using R?
I am trying to analyze dyadic data using LPA in R. On Mplus, there’s a way to correlate “overall error” of dyadic data to account for the dyadic nature in the model.

However, I cannot find how to perform this overall error correlation in R to account for the dyadic data. Is there R code to perform this overall error correlation?

The syntax in Mplus looks like this

Model:
%Overall%


问:
ACF Relationship field store custom values in an array
I am working on a ACF Block that uses the relationship field to choose posts in a CPT, this then displays content, the issue I am having is that we export pages etc to the live site and as the relationship field stores post IDs these are not the same on the live site. We use a custom field to store an unique number for every post.

So is there a way of storing the custom field values into the code of the page? One thought I had was to somehow loop through the post ids of the chosen posts and save the custom field value into an array stored in a text field - but I have no idea to how to achieve this or if this is the right way to go.

Any help would be appreciated.


问:
Hangfire BackgroundJobs are unique over multiple instances?
I have a project where background recurring jobs are started like this:

            RecurringJob.RemoveIfExists(nameof(CheckTransactionsJob));
            RecurringJob.AddOrUpdate<CheckTransactionsJob>(
                nameof(CheckTransactionsJob),
                x => x.RunAsync(),
                $"*/* {config.RestartFrequencyInHours} * * *",
                TimeZoneInfo.Utc);
```

(I'm not sure if the call to RemoveIfExists is required but that is our current code base)

If the job run goes over the scheduler time (for example it runs for 5 minutes but the cron scheduler is every minute) static variable _isRunning impedees the new Job to be executed.

We have multiple instances of the service (Kubernetes pods), and despite this check, Hangfire IS NOT avoiding to run only one Job at a time.

I read the documentation but wasn't able to be assured multiple instances does not run multiple jobs.

Adding the "DisableConcurrentExecution" Attribute to the Jobs is actually making them to not start on any of the service instances, unless I start a single instance and wait it to trigger the jobs (and then start the other instances).

Body:
I have a project where background recurring jobs are started like this:

            RecurringJob.RemoveIfExists(nameof(CheckTransactionsJob));
            RecurringJob.AddOrUpdate<CheckTransactionsJob>(
                nameof(CheckTransactionsJob),
                x => x.RunAsync(),
                $"*/* {config.RestartFrequencyInHours} * * *",
                TimeZoneInfo.Utc);

(I'm not sure if the call to RemoveIfExists is required but that is our current code base)

If the job run goes over the scheduler time (for example it runs for 5 minutes but the cron scheduler is every minute) static variable _isRunning impedees the new Job to be executed.

We have multiple instances of the service (Kubernetes pods), and despite this check, Hangfire IS NOT avoiding to run only one Job at a time.

I read the documentation but wasn't able to be assured multiple instances does not run multiple jobs.

Adding the "DisableConcurrentExecution" Attribute to the Jobs is actually making them to not start on any of the service instances, unless I start a single instance and wait it to trigger the jobs (and then start the other instances).


问:
How to reduce swipe sensitivity in the carousel view
I have a carousel view in Xamarin forms project. Inside I use Collection view. When I scrolling collection I can by accident swiping tab. I think that a good solution would be to reduce the sensitivity of the swipe in the carousel but I donʼt know how I can do it. I have this problem on android.

I tried to fix it with the standard properties and events. But I failed.


问:
Mongo auth but for only specific document
I have a monogo DB which I made an admin with

```<code>db.createUser(
  {
    user: "myusename",
    pwd: "password",
    roles: [ { role: "userAdminAnyDatabase", db: "admin" },{ role: "readWrite", db: "MYDB" }]
  }
)
</code>```

But  I want to do authentication only when I want to connect to MYDB. Assume that I want to have other documents line SECONDDOC in MongoDB that it does not need authentication ( or even it could have another type of username and password if it needs to be authenticated to connect to mongo). How could I do it?

My mongo version is 3.6.3

Body:
I have a monogo DB which I made an admin with

db.createUser(
  {
    user: "myusename",
    pwd: "password",
    roles: [ { role: "userAdminAnyDatabase", db: "admin" },{ role: "readWrite", db: "MYDB" }]
  }
)

But  I want to do authentication only when I want to connect to MYDB. Assume that I want to have other documents line SECONDDOC in MongoDB that it does not need authentication ( or even it could have another type of username and password if it needs to be authenticated to connect to mongo). How could I do it?

My mongo version is 3.6.3


问:
SpringBoot Kafka -> org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-my-test-1, groupId=my-test] Node -1 disconnected
Small question regarding consuming Kafka messages from a Spring Boot Kafka consumer please.

I am following this well written tutorial (literally just copy pasting the consumer part code)

https://www.baeldung.com/spring-kafka

And my code looks like:

```<code>@Configuration
public class KafkaConfiguration {

    @Bean
    public ConsumerFactory<String, String> consumerFactory() {
        final Map<String, Object> props = new HashMap<>();
        props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "kafka-host.com:9093");
        props.put(ConsumerConfig.GROUP_ID_CONFIG, "my-test");
        props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
        props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
        return new DefaultKafkaConsumerFactory<>(props);
    }

    @Bean
    public ConcurrentKafkaListenerContainerFactory<String, String> kafkaListenerContainerFactory() {
        final ConcurrentKafkaListenerContainerFactory<String, String> factory = new ConcurrentKafkaListenerContainerFactory<>();
        factory.setConsumerFactory(consumerFactory());
        return factory;
    }

}
</code>```
```<code>@Service
public class LoganConsumer {

    @KafkaListener(topics = "the_topic")
    public void listenGroupFoo(String message) {
        System.out.println("Received Message : " + message);
    }

}
</code>```

When I start my application, however, I do see those WARN:

```<code>2023-01-06T13:15:19.028Z  INFO 1 --- [           main] o.a.k.clients.consumer.ConsumerConfig    : ConsumerConfig values:

        allow.auto.create.topics = true
        auto.commit.interval.ms = 5000
        auto.offset.reset = latest
        bootstrap.servers = [kafka-host.com:9093]
        check.crcs = true
        client.dns.lookup = use_all_dns_ips
        client.id = consumer-my-test-1
        client.rack =
        connections.max.idle.ms = 540000
        default.api.timeout.ms = 60000
        enable.auto.commit = false
        exclude.internal.topics = true
        fetch.max.bytes = 52428800
        fetch.max.wait.ms = 500
        fetch.min.bytes = 1
        group.id = my-test
        group.instance.id = null
        heartbeat.interval.ms = 3000
        interceptor.classes = []
        internal.leave.group.on.close = true
        internal.throw.on.fetch.stable.offset.unsupported = false
        isolation.level = read_uncommitted
        key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer
        max.partition.fetch.bytes = 1048576
        max.poll.interval.ms = 300000
        max.poll.records = 500
        metadata.max.age.ms = 300000
        metric.reporters = []
        metrics.num.samples = 2
        metrics.recording.level = INFO
        metrics.sample.window.ms = 30000
        partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor, class org.apache.kafka.clients.consumer.CooperativeStickyAssignor]
        receive.buffer.bytes = 65536
        reconnect.backoff.max.ms = 1000
        reconnect.backoff.ms = 50
        request.timeout.ms = 30000
        retry.backoff.ms = 100
        sasl.client.callback.handler.class = null
        sasl.jaas.config = null
        sasl.kerberos.kinit.cmd = /usr/bin/kinit
        sasl.kerberos.min.time.before.relogin = 60000
        sasl.kerberos.service.name = null
        sasl.kerberos.ticket.renew.jitter = 0.05
        sasl.kerberos.ticket.renew.window.factor = 0.8
        sasl.login.callback.handler.class = null
        sasl.login.class = null
        sasl.login.connect.timeout.ms = null
        sasl.login.read.timeout.ms = null
        sasl.login.refresh.buffer.seconds = 300
        sasl.login.refresh.min.period.seconds = 60
        sasl.login.refresh.window.factor = 0.8
        sasl.login.refresh.window.jitter = 0.05
        sasl.login.retry.backoff.max.ms = 10000
        sasl.login.retry.backoff.ms = 100
        sasl.mechanism = GSSAPI
        sasl.oauthbearer.clock.skew.seconds = 30
        sasl.oauthbearer.expected.audience = null
        sasl.oauthbearer.expected.issuer = null
        sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000
        sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000
        sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100
        sasl.oauthbearer.jwks.endpoint.url = null
        sasl.oauthbearer.scope.claim.name = scope
        sasl.oauthbearer.sub.claim.name = sub
        sasl.oauthbearer.token.endpoint.url = null
        security.protocol = PLAINTEXT
        security.providers = null
        send.buffer.bytes = 131072
        session.timeout.ms = 45000
        socket.connection.setup.timeout.max.ms = 30000
        socket.connection.setup.timeout.ms = 10000
        ssl.cipher.suites = null
        ssl.enabled.protocols = [TLSv1.2, TLSv1.3]
        ssl.endpoint.identification.algorithm = https
        ssl.engine.factory.class = null
        ssl.key.password = null
        ssl.keymanager.algorithm = SunX509
        ssl.keystore.certificate.chain = null
        ssl.keystore.key = null
        ssl.keystore.location = null
        ssl.keystore.password = null
        ssl.keystore.type = JKS
        ssl.protocol = TLSv1.3
        ssl.provider = null
        ssl.secure.random.implementation = null
        ssl.trustmanager.algorithm = PKIX
        ssl.truststore.certificates = null
        ssl.truststore.location = null
        ssl.truststore.password = null
        ssl.truststore.type = JKS
        value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer

2023-01-06T13:15:19.185Z  INFO 1 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka version: 3.3.1
2023-01-06T13:15:19.186Z  INFO 1 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka commitId: e23c59d00e687ff5
2023-01-06T13:15:19.187Z  INFO 1 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka startTimeMs: 1673010919184
2023-01-06T13:15:19.189Z  INFO 1 --- [           main] o.a.k.clients.consumer.KafkaConsumer     : [Consumer clientId=consumer-my-test-1, groupId=my-test] Subscribed to topic(s): the_topic
2023-01-06T13:15:19.205Z  INFO 1 --- [           main]  in 2.752 seconds (process running for 3.23)
2023-01-06T13:15:19.966Z  INFO 1 --- [ntainer#0-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Node -1 disconnected.
2023-01-06T13:15:19.968Z  INFO 1 --- [ntainer#0-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Cancelled in-flight API_VERSIONS request with correlation id 1 due to node -1 being disconnected (elapsed time since creation: 491ms, elapsed time since send: 491ms, request timeout: 30000ms)
2023-01-06T13:15:19.968Z  WARN 1 --- [ntainer#0-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Bootstrap broker kafka-host.com:9093 (id: -1 rack: null) disconnected
2
</code>```

To avoid confusion, I am not seeing any Broker may not be available

But in loop, I am seeing those:

```<code> org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Node -1 disconnected.

 org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Cancelled in-flight API_VERSIONS request with correlation id 28 due to node -1 being disconnected (elapsed time since creation: 59ms, elapsed time since send: 59ms, request timeout: 30000ms)
</code>```

Those Node -1 disconnected. are quite confusing, especially I am seeing  Subscribed to topic(s): the_topic

I am a bit puzzled about what does this mean, and how to fix this please.

Thank you

Body:
Small question regarding consuming Kafka messages from a Spring Boot Kafka consumer please.

I am following this well written tutorial (literally just copy pasting the consumer part code)

https://www.baeldung.com/spring-kafka

And my code looks like:

@Configuration
public class KafkaConfiguration {

    @Bean
    public ConsumerFactory<String, String> consumerFactory() {
        final Map<String, Object> props = new HashMap<>();
        props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "kafka-host.com:9093");
        props.put(ConsumerConfig.GROUP_ID_CONFIG, "my-test");
        props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
        props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
        return new DefaultKafkaConsumerFactory<>(props);
    }

    @Bean
    public ConcurrentKafkaListenerContainerFactory<String, String> kafkaListenerContainerFactory() {
        final ConcurrentKafkaListenerContainerFactory<String, String> factory = new ConcurrentKafkaListenerContainerFactory<>();
        factory.setConsumerFactory(consumerFactory());
        return factory;
    }

}

@Service
public class LoganConsumer {

    @KafkaListener(topics = "the_topic")
    public void listenGroupFoo(String message) {
        System.out.println("Received Message : " + message);
    }

}

When I start my application, however, I do see those WARN:

2023-01-06T13:15:19.028Z  INFO 1 --- [           main] o.a.k.clients.consumer.ConsumerConfig    : ConsumerConfig values:

        allow.auto.create.topics = true
        auto.commit.interval.ms = 5000
        auto.offset.reset = latest
        bootstrap.servers = [kafka-host.com:9093]
        check.crcs = true
        client.dns.lookup = use_all_dns_ips
        client.id = consumer-my-test-1
        client.rack =
        connections.max.idle.ms = 540000
        default.api.timeout.ms = 60000
        enable.auto.commit = false
        exclude.internal.topics = true
        fetch.max.bytes = 52428800
        fetch.max.wait.ms = 500
        fetch.min.bytes = 1
        group.id = my-test
        group.instance.id = null
        heartbeat.interval.ms = 3000
        interceptor.classes = []
        internal.leave.group.on.close = true
        internal.throw.on.fetch.stable.offset.unsupported = false
        isolation.level = read_uncommitted
        key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer
        max.partition.fetch.bytes = 1048576
        max.poll.interval.ms = 300000
        max.poll.records = 500
        metadata.max.age.ms = 300000
        metric.reporters = []
        metrics.num.samples = 2
        metrics.recording.level = INFO
        metrics.sample.window.ms = 30000
        partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor, class org.apache.kafka.clients.consumer.CooperativeStickyAssignor]
        receive.buffer.bytes = 65536
        reconnect.backoff.max.ms = 1000
        reconnect.backoff.ms = 50
        request.timeout.ms = 30000
        retry.backoff.ms = 100
        sasl.client.callback.handler.class = null
        sasl.jaas.config = null
        sasl.kerberos.kinit.cmd = /usr/bin/kinit
        sasl.kerberos.min.time.before.relogin = 60000
        sasl.kerberos.service.name = null
        sasl.kerberos.ticket.renew.jitter = 0.05
        sasl.kerberos.ticket.renew.window.factor = 0.8
        sasl.login.callback.handler.class = null
        sasl.login.class = null
        sasl.login.connect.timeout.ms = null
        sasl.login.read.timeout.ms = null
        sasl.login.refresh.buffer.seconds = 300
        sasl.login.refresh.min.period.seconds = 60
        sasl.login.refresh.window.factor = 0.8
        sasl.login.refresh.window.jitter = 0.05
        sasl.login.retry.backoff.max.ms = 10000
        sasl.login.retry.backoff.ms = 100
        sasl.mechanism = GSSAPI
        sasl.oauthbearer.clock.skew.seconds = 30
        sasl.oauthbearer.expected.audience = null
        sasl.oauthbearer.expected.issuer = null
        sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000
        sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000
        sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100
        sasl.oauthbearer.jwks.endpoint.url = null
        sasl.oauthbearer.scope.claim.name = scope
        sasl.oauthbearer.sub.claim.name = sub
        sasl.oauthbearer.token.endpoint.url = null
        security.protocol = PLAINTEXT
        security.providers = null
        send.buffer.bytes = 131072
        session.timeout.ms = 45000
        socket.connection.setup.timeout.max.ms = 30000
        socket.connection.setup.timeout.ms = 10000
        ssl.cipher.suites = null
        ssl.enabled.protocols = [TLSv1.2, TLSv1.3]
        ssl.endpoint.identification.algorithm = https
        ssl.engine.factory.class = null
        ssl.key.password = null
        ssl.keymanager.algorithm = SunX509
        ssl.keystore.certificate.chain = null
        ssl.keystore.key = null
        ssl.keystore.location = null
        ssl.keystore.password = null
        ssl.keystore.type = JKS
        ssl.protocol = TLSv1.3
        ssl.provider = null
        ssl.secure.random.implementation = null
        ssl.trustmanager.algorithm = PKIX
        ssl.truststore.certificates = null
        ssl.truststore.location = null
        ssl.truststore.password = null
        ssl.truststore.type = JKS
        value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer

2023-01-06T13:15:19.185Z  INFO 1 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka version: 3.3.1
2023-01-06T13:15:19.186Z  INFO 1 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka commitId: e23c59d00e687ff5
2023-01-06T13:15:19.187Z  INFO 1 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka startTimeMs: 1673010919184
2023-01-06T13:15:19.189Z  INFO 1 --- [           main] o.a.k.clients.consumer.KafkaConsumer     : [Consumer clientId=consumer-my-test-1, groupId=my-test] Subscribed to topic(s): the_topic
2023-01-06T13:15:19.205Z  INFO 1 --- [           main]  in 2.752 seconds (process running for 3.23)
2023-01-06T13:15:19.966Z  INFO 1 --- [ntainer#0-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Node -1 disconnected.
2023-01-06T13:15:19.968Z  INFO 1 --- [ntainer#0-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Cancelled in-flight API_VERSIONS request with correlation id 1 due to node -1 being disconnected (elapsed time since creation: 491ms, elapsed time since send: 491ms, request timeout: 30000ms)
2023-01-06T13:15:19.968Z  WARN 1 --- [ntainer#0-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Bootstrap broker kafka-host.com:9093 (id: -1 rack: null) disconnected
2

To avoid confusion, I am not seeing any Broker may not be available

But in loop, I am seeing those:

 org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Node -1 disconnected.

 org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-my-test-1, groupId=my-test] Cancelled in-flight API_VERSIONS request with correlation id 28 due to node -1 being disconnected (elapsed time since creation: 59ms, elapsed time since send: 59ms, request timeout: 30000ms)

Those Node -1 disconnected. are quite confusing, especially I am seeing  Subscribed to topic(s): the_topic

I am a bit puzzled about what does this mean, and how to fix this please.

Thank you