问:
jpms + cdi (weld): WELD-ENV-000033: Invalid bean archive scanning result - found multiple results with the same reference
I'm new to jpms and try to setup a simple environment (java 19, graalvm, latest maven) to start a project with jpms + cdi (weld). My problem is: As soon as I create a(n even empty) module-info.java in my project weld produces an exception like below for a primitive cdi test. As soon as I remove module-info.java it disappears again and the test succeeds.

I found one potential candidate for the "multiple results" from the exception. There is a beans.xml in src/main/resources/META-INF and in src/test/resources/META-INF but as I said it is no problem if I remove module-info.java from src/main/java. I also tried with only one beans.xml in both locations but that did not change the behaviour.

I could not find any hint for the reason of my problem. So any ideas are appreciated.

Here comes the exception:

```<code>java.lang.IllegalStateException: WELD-ENV-000033: Invalid bean archive scanning result - found multiple results with the same reference: ...\jpms\common\target\test-classes

    at org.jboss.weld.environment.deployment.discovery.AbstractDiscoveryStrategy.performDiscovery(AbstractDiscoveryStrategy.java:124)
    at org.jboss.weld.environment.se.Weld.createDeployment(Weld.java:979)
    at org.jboss.weld.environment.se.Weld.initialize(Weld.java:796)
    at org.jboss.weld.environment.se.Weld.initialize(Weld.java:177)
    at de.ruu.lab.modules.jpms.common/de.ruu.lab.modules.jpms.common.CDITest.beforeAll(CDITest.java:29)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
    at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
    at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:70)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$13(ClassBasedTestDescriptor.java:411)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:409)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:215)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
    at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
    at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
    Suppressed: java.lang.NullPointerException: Cannot invoke "jakarta.enterprise.inject.se.SeContainer.close()" because "de.ruu.lab.modules.jpms.common.CDITest.seContainer" is null
        at de.ruu.lab.modules.jpms.common/de.ruu.lab.modules.jpms.common.CDITest.afterAll(CDITest.java:36)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
        at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
        at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterAllMethod(TimeoutExtension.java:118)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$15(ClassBasedTestDescriptor.java:439)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$16(ClassBasedTestDescriptor.java:437)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllMethods(ClassBasedTestDescriptor.java:437)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:231)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:84)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:161)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:161)
        ... 34 more
</code>```

I prepared a minimal reproducer that shows this effect. From the reproducer you can see, that in the end I also want to work with jpa (hibernate), but for now everything jpa/hibernate is commented out in the reproducer.

Body:
I'm new to jpms and try to setup a simple environment (java 19, graalvm, latest maven) to start a project with jpms + cdi (weld). My problem is: As soon as I create a(n even empty) module-info.java in my project weld produces an exception like below for a primitive cdi test. As soon as I remove module-info.java it disappears again and the test succeeds.

I found one potential candidate for the "multiple results" from the exception. There is a beans.xml in src/main/resources/META-INF and in src/test/resources/META-INF but as I said it is no problem if I remove module-info.java from src/main/java. I also tried with only one beans.xml in both locations but that did not change the behaviour.

I could not find any hint for the reason of my problem. So any ideas are appreciated.

Here comes the exception:

java.lang.IllegalStateException: WELD-ENV-000033: Invalid bean archive scanning result - found multiple results with the same reference: ...\jpms\common\target\test-classes

    at org.jboss.weld.environment.deployment.discovery.AbstractDiscoveryStrategy.performDiscovery(AbstractDiscoveryStrategy.java:124)
    at org.jboss.weld.environment.se.Weld.createDeployment(Weld.java:979)
    at org.jboss.weld.environment.se.Weld.initialize(Weld.java:796)
    at org.jboss.weld.environment.se.Weld.initialize(Weld.java:177)
    at de.ruu.lab.modules.jpms.common/de.ruu.lab.modules.jpms.common.CDITest.beforeAll(CDITest.java:29)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
    at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
    at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128)
    at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:70)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
    at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
    at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$13(ClassBasedTestDescriptor.java:411)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:409)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:215)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
    at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
    at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
    Suppressed: java.lang.NullPointerException: Cannot invoke "jakarta.enterprise.inject.se.SeContainer.close()" because "de.ruu.lab.modules.jpms.common.CDITest.seContainer" is null
        at de.ruu.lab.modules.jpms.common/de.ruu.lab.modules.jpms.common.CDITest.afterAll(CDITest.java:36)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
        at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
        at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterAllMethod(TimeoutExtension.java:118)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$15(ClassBasedTestDescriptor.java:439)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$16(ClassBasedTestDescriptor.java:437)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllMethods(ClassBasedTestDescriptor.java:437)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:231)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:84)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:161)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:161)
        ... 34 more

I prepared a minimal reproducer that shows this effect. From the reproducer you can see, that in the end I also want to work with jpa (hibernate), but for now everything jpa/hibernate is commented out in the reproducer.


来源: stackexchange

问:
Postgres/Prisma - How to reorder records or add number index field
I am creating an application which will allow the user to reorder items in a list. These items are represented as records in a Postgres DB. I am using Prisma ORM.

My brute solution is to manually create an orderIndex field on each record. The problem is that when the field is updated in one, I will need to update the orderIndex of each other record.

Is there an easy way to change the order that records are stored? Or is there a field I can create that auto-increments a count of each record, changing each number as the others change, so there is a maintained sequence with no gaps starting from 0?

ContentLicense: CC BY-SA 4.0


问:
Ajax call not fetching data for get request
SO, I'm trying fetch list of data post button click using ajax call in view, from controller action method that returns partial view.
For some reason the ajax call is not working and I'm not able to find the cause.

Here is my controller action method:

```<code> public PartialViewResult getCategories(int BrandId)
        {
            List<CategoryModel> categories = new List<CategoryModel>();
            categories.Add(new CategoryModel() { BrandId = 100, Name = "Jeans", DisplayOrder = 2, CreatedDateTime = DateTime.Now });
            categories.Add(new CategoryModel() { BrandId = 200, Name = "Shirts", DisplayOrder = 3, CreatedDateTime = DateTime.Now });

            return PartialView("getCategories",categories);
        }
</code>```

Below is the view I have considered.

```<code><script type="text/javascript">

        function loadCat(){
            var selectedBrandId = $("#selectBrand").val(); //To get the value for selected Brand
            var selectedBrandName = $("#selectBrand option:selected").text(); //To get the selected Brand name displayed in the drop down

            if(selectedBrandId != "" && selectedBrandName!="" ){
                console.log('inside if')
                alert(`You Have Selected ${selectedBrandName} with ID ${selectedBrandId}`);

                $.ajax({
                        url: "/BulkyBookProcess/getCategories",
                        method:"GET",
                        success: function(data){
                        console.log('inisde success')
                            console.log(data);
                        },
                        error:function(err){
                            console.log(err);
                        }
                    })
                console.log ('if ending')
            }
            else
            {
                alert("Please select a Brand");
            }

        }

</script>

<form>

  <div class="mb-3">

     <label for="brand" class="form-label">Select A Brand</label>

     @Html.DropDownList("Brand", new SelectList(ViewBag.BrandList,"BrandId","BrandName"),"Select A Brand",new{@id = "selectBrand",@class="form-select"})

  </div>

   <button type="submit" class="btn btn-primary" id="search" onClick="loadCat()">Search</button>

   <div id="partial-load">

   </div>
</form>
</code>```

Upon button click the alert messages are being displayed but the ajax call return data is not getting logged in console.

Below is my partial view:

```<code>@model IEnumerable<BulkyBookWeb.DataModels.CategoryModel>

<p>
    <a asp-action="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.CategoryId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.DisplayOrder)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CreatedDateTime)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.BrandId)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.CategoryId)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DisplayOrder)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CreatedDateTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.BrandId)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
                @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
                @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
            </td>
        </tr>
}
    </tbody>
</table>
</code>```

I'm new to MVC, any help would be much appreciated.

Body:
SO, I'm trying fetch list of data post button click using ajax call in view, from controller action method that returns partial view.
For some reason the ajax call is not working and I'm not able to find the cause.

Here is my controller action method:

 public PartialViewResult getCategories(int BrandId)
        {
            List<CategoryModel> categories = new List<CategoryModel>();
            categories.Add(new CategoryModel() { BrandId = 100, Name = "Jeans", DisplayOrder = 2, CreatedDateTime = DateTime.Now });
            categories.Add(new CategoryModel() { BrandId = 200, Name = "Shirts", DisplayOrder = 3, CreatedDateTime = DateTime.Now });

            return PartialView("getCategories",categories);
        }

Below is the view I have considered.

<form>

     Select A Brand

     @Html.DropDownList("Brand", new SelectList(ViewBag.BrandList,"BrandId","BrandName"),"Select A Brand",new{@id = "selectBrand",@class="form-select"})

   <button type="submit" class="btn btn-primary" id="search" onClick="loadCat()">Search</button>

</form>

Upon button click the alert messages are being displayed but the ajax call return data is not getting logged in console.

Below is my partial view:

@model IEnumerable<BulkyBookWeb.DataModels.CategoryModel>

    Create New

                @Html.DisplayNameFor(model => model.CategoryId)

                @Html.DisplayNameFor(model => model.Name)

                @Html.DisplayNameFor(model => model.DisplayOrder)

                @Html.DisplayNameFor(model => model.CreatedDateTime)

                @Html.DisplayNameFor(model => model.BrandId)

@foreach (var item in Model) {

                @Html.DisplayFor(modelItem => item.CategoryId)

                @Html.DisplayFor(modelItem => item.Name)

                @Html.DisplayFor(modelItem => item.DisplayOrder)

                @Html.DisplayFor(modelItem => item.CreatedDateTime)

                @Html.DisplayFor(modelItem => item.BrandId)

                @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
                @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
                @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })

}

I'm new to MVC, any help would be much appreciated.


问:
How to retrieve live data autogenerate id
This is my ViewModel where i try to return autogenerated id but i can't get it. Help me to resolve this issues.

`

```<code>public class RecognizedViewModel extends AndroidViewModel {
    private RecognizedRepository mRepository;

    private final LiveData<List<Recognized>> mAllRecognized;
    private int _recognizedIdLiveData = -1;

    public final int getRecognizedIdLiveData() {
        return _recognizedIdLiveData;
    }

    public RecognizedViewModel(Application application) {
        super(application);
        mRepository = new RecognizedRepository(application);
        mAllRecognized = mRepository.getAllRecognized();
    }

    public LiveData<List<Recognized>> geAllRecognized() {
        return mAllRecognized;
    }

    public void insert(Recognized recognized) {
        _recognizedIdLiveData = recognized.getUid();
        mRepository.insert(recognized);
    }

}
</code>```

`

I tried to retrieve autogenerated id in ViewModel and return it to my main activity but i can't get it

Body:
This is my ViewModel where i try to return autogenerated id but i can't get it. Help me to resolve this issues.

`

public class RecognizedViewModel extends AndroidViewModel {
    private RecognizedRepository mRepository;

    private final LiveData<List<Recognized>> mAllRecognized;
    private int _recognizedIdLiveData = -1;

    public final int getRecognizedIdLiveData() {
        return _recognizedIdLiveData;
    }

    public RecognizedViewModel(Application application) {
        super(application);
        mRepository = new RecognizedRepository(application);
        mAllRecognized = mRepository.getAllRecognized();
    }

    public LiveData<List<Recognized>> geAllRecognized() {
        return mAllRecognized;
    }

    public void insert(Recognized recognized) {
        _recognizedIdLiveData = recognized.getUid();
        mRepository.insert(recognized);
    }

}

`

I tried to retrieve autogenerated id in ViewModel and return it to my main activity but i can't get it


问:
nginx dynamic access_log and error_log path
If i have many hosts, it is easy to define document_root for every host dynamically like this:

```<code>server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name _;
    root /app/sites/$host;
    ...
}
</code>```

I tried similar for acces_log and error_log, but it doesn't works:

```<code>    access_log /logs/$host
    error_log /logs/$host
</code>```

How can I solve this?

Body:
If i have many hosts, it is easy to define document_root for every host dynamically like this:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name _;
    root /app/sites/$host;
    ...
}

I tried similar for acces_log and error_log, but it doesn't works:

    access_log /logs/$host
    error_log /logs/$host

How can I solve this?


问:
react-select select z-index how to change
I used almost all solutions, but cannot solve my problem
I have two selectors from react-select and when the first dropdown the second interrupt it
I thought to change their z-index, but I cannot change or It doesn't help I don't know

It is the first

```<code><Select
  menuPortalTarget={document.body}
  menuPosition="fixed"
  defaultValue={selectedRegion}
  value={selectedRegion}
  options={regions}
  ref={regionSelector}
  className={"buyurtma_select_new"}
  styles={{
    menuPortal: (provided) => ({ ...provided, zIndex: 9999 }),
    menu: (provided) => ({ ...provided, zIndex: 9999 })
  }}
  theme={(theme) => ({
    ...theme,
    borderRadius: 12,
    colors: {
      ...theme.colors,
      primary25: "#7828c8",
      primary: "#7828c8"
    },
    menuPortal: (provided) => ({ ...provided, zIndex: 9999 }),
    menu: (provided) => ({ ...provided, zIndex: 9999 })
  })}
  onChange={(event) => {
    setSelectedRegion(event);
  }}
/>
</code>```

It is the sen

```<code><Select
  menuPortalTarget={document.body}
  menuPosition="fixed"
  defaultValue={selectedDistrict}
  value={selectedDistrict}
  options={districts}
  className="buyurtma_select_new"
  styles={{
    menuPortal: (provided) => ({ ...provided, zIndex: 9998 }),
    menu: (provided) => ({ ...provided, zIndex: 9998 })
  }}
  theme={(theme) => ({
    ...theme,
    borderRadius: 12,
    colors: {
      ...theme.colors,
      primary25: "#7828c8",
      primary: "#7828c8"
    }
  })}
  maxMenuHeight={50}
  onChange={(event) => {
    setSelectedDistrict(event);
  }}
/>
</code>```

I tried this method too

Body:
I used almost all solutions, but cannot solve my problem
I have two selectors from react-select and when the first dropdown the second interrupt it
I thought to change their z-index, but I cannot change or It doesn't help I don't know

It is the first

<Select
  menuPortalTarget={document.body}
  menuPosition="fixed"
  defaultValue={selectedRegion}
  value={selectedRegion}
  options={regions}
  ref={regionSelector}
  className={"buyurtma_select_new"}
  styles={{
    menuPortal: (provided) => ({ ...provided, zIndex: 9999 }),
    menu: (provided) => ({ ...provided, zIndex: 9999 })
  }}
  theme={(theme) => ({
    ...theme,
    borderRadius: 12,
    colors: {
      ...theme.colors,
      primary25: "#7828c8",
      primary: "#7828c8"
    },
    menuPortal: (provided) => ({ ...provided, zIndex: 9999 }),
    menu: (provided) => ({ ...provided, zIndex: 9999 })
  })}
  onChange={(event) => {
    setSelectedRegion(event);
  }}
/>

It is the sen

<Select
  menuPortalTarget={document.body}
  menuPosition="fixed"
  defaultValue={selectedDistrict}
  value={selectedDistrict}
  options={districts}
  className="buyurtma_select_new"
  styles={{
    menuPortal: (provided) => ({ ...provided, zIndex: 9998 }),
    menu: (provided) => ({ ...provided, zIndex: 9998 })
  }}
  theme={(theme) => ({
    ...theme,
    borderRadius: 12,
    colors: {
      ...theme.colors,
      primary25: "#7828c8",
      primary: "#7828c8"
    }
  })}
  maxMenuHeight={50}
  onChange={(event) => {
    setSelectedDistrict(event);
  }}
/>

I tried this method too


问:
what type of function are used to find the index of element
I would like to know real-life examples/use cases for Azure Data Factory(ADF) with below configurations:

Azure Integration Runtime(AIR) default
Self-Hosted Integration Runtime(SHIR)
Additional questions:

Are there any additional costs associated with either of these configurations(AIR & SHIR)?
If I need to connect to a private network/on-prem system from ADF, would SHIR be suffice and serve the need?
By having AIR as an additional configuration, does it bother you? If it is not needed, just don’t configure AIR.
Please share your thoughts/suggestions. Thanks!


问:
How can I figuraout the data type save in to base64 format?
Just try to convert Base64 string format to readable string at https://base64.guru/converter/decode/text and got this result.

Base64

```<code>vmIfvkDbkz9u25aIfN7bXIR0...dJGyMdaQ34zT51ogj6in
</code>```

Output

The base64 data should be search results from some service, but I don't know whitch data type was used to store the data.  Have someone an idea how can I figuraout  this?

Body:
Just try to convert Base64 string format to readable string at https://base64.guru/converter/decode/text and got this result.

Base64

vmIfvkDbkz9u25aIfN7bXIR0...dJGyMdaQ34zT51ogj6in

Output

The base64 data should be search results from some service, but I don't know whitch data type was used to store the data.  Have someone an idea how can I figuraout  this?


问:
SwiftUI: @main method should not be called on the main thread
I'm running into this warning but I'm not sure whether it's valid or not, and if it is, how to fix it.

This is the warning that appears in my main class:

These are options in my schema:

Thanks a lot!


问:
Is there an R function to split column from a txt file containing 20,000 columns by half so it can be used in excel
I cannot open a txt data file as it is 8 gb size with around 20,000 columns so I want to separate the columns so I can use it as 2 files. I split the file using Gsplits but it splits only by rows. So if I open the split txt file in excel, it cannot load some data as it exceeds the number of column.

I tried using -contains() function as I wanted to remove some columns containing text TARGET. Even though the script is not showing any error codes, there is  no change in total number of columns.

```<code>df_sub <- select(disk1, -contains("TARGET-20-PANGDN-09"))
</code>```

I want to remove all the variables starting with the text "TARGET-....", like the one shown above.

Body:
I cannot open a txt data file as it is 8 gb size with around 20,000 columns so I want to separate the columns so I can use it as 2 files. I split the file using Gsplits but it splits only by rows. So if I open the split txt file in excel, it cannot load some data as it exceeds the number of column.

I tried using -contains() function as I wanted to remove some columns containing text TARGET. Even though the script is not showing any error codes, there is  no change in total number of columns.

df_sub <- select(disk1, -contains("TARGET-20-PANGDN-09"))

I want to remove all the variables starting with the text "TARGET-....", like the one shown above.


问:
Is it possible to list members who have joined a server at a certain date?
So I'm just wondering if this is possible. Like, list all the members who joined your server before/after/at a certain date?</p>


问:
How to implement "debounce" with Azure Service Bus?
In our application we have a lot of AutoSave - meaning every change a user makes things are being automatically saved within 300 milliseconds.

Also we have a lot of extreme caching, because the application has a lot of peak loads.

Usually we use Azure ServiceBus to send messages to all instances to invalidate a certain "group" - meaning it will get a fresh copy from the database.

Invalidating cache and getting a fresh copy is a relative expensive operation, so we don't want to do this every 300ms.

There is no big need for emptying the cache instant, but it would be great if we can do this i.e. a minute after the last change.

So I'm looking for a debounce concept.

Preferably on the Azure Service side so I don't have to think about it on the client side

And to severely limit the amount of messages that are being sent to all instances.

Preferably not with extra stuff that needs to be maintained - like an extra web app that does the debouncing logic

What is the best solution? Or do I need to write something myself?


问:
Notifications reminder using lambda and firebase
We already have a solution to send a notifications to Mobile users using lambda and firebase ..
For example , If the mobile user created an appointment on the mobile app, Lambda function will be triggered to send Notification using firebase instantly to another mobile user .

The question is ,How to setup scheduled reminder using firebase ,
For example:
If the mobile user created appointment to be done at 8:00 AM on the mobile app ,Lambda function sends to Firebase that appointment created and to be done at 8:00AM , Send reminder 15 minutes before .
.Then firebase schedules to send reminder 15 minutes before 8:00AM .
The same for overdue..etc .
How this can be done on firebase

We tried to use another AWS service to trigger the lambda function and manage notifications , but this is not accepted as we already have firebase mobile platform and no need for additional costs , also we are not confident that the solution will work as expected .


问:
UPDATE transaction crashes using sqlite3 python
I am trying to update values in sqlite3 database file. I run the following code:

```<code>import sqlite3
import pandas as pd

con = sqlite3.connect(r'test.db')
sql = con.cursor()

general = pd.DataFrame(columns=['isin', 'issued_volume', 'amt_out', 'res_nominal_value', 'next_offer_date', 'offer_price', 'option_type'])
general.loc[len(general)] = ['test_isin', 200000, 200000, 500, np.nan, 100, 'put']
general.to_sql(name='general', con=con, index=False)

flds = ('issued_volume', 'amt_out', 'res_nominal_value', 'next_offer_date', 'offer_price', 'option_type')
update_values = (200000, 200000, 1000, '10.02.2022', 100, 'call', 'test_isin')
sql.execute(f"""UPDATE general SET {flds} = (?, ?, ?, ?, ?, ?)  WHERE isin = (?);""", update_values)
con.commit()
</code>```

But the OperationalError occurs:

```<code>OperationalError                          Traceback (most recent call last)
<ipython-input-5-ca5d6f2301b7> in <module>()
      1 flds = ('issued_volume', 'amt_out', 'res_nominal_value', 'next_offer_date', 'offer_price', 'option_type')
      2 update_values = (200000, 200000, 1000, '10.02.2022', 100, 'call', 'test_isin')
----> 3 sql.execute(f"""UPDATE general SET {flds} = (?, ?, ?, ?, ?, ?)  WHERE isin = (?);""", update_values)
      4 con.commit()

OperationalError: near "(": syntax error
</code>```

What am I doing wrong?

For the note, this code works flawlessly on another machine. So I figure the difference in outputs might be in library versions. I made sure the sqlite3 library was the same, but copying the folder "sqlite3" to the Anaconda3 -> Lib directory. I am running the code in Jupiter notebook.

Body:
I am trying to update values in sqlite3 database file. I run the following code:

import sqlite3
import pandas as pd

con = sqlite3.connect(r'test.db')
sql = con.cursor()

general = pd.DataFrame(columns=['isin', 'issued_volume', 'amt_out', 'res_nominal_value', 'next_offer_date', 'offer_price', 'option_type'])
general.loc[len(general)] = ['test_isin', 200000, 200000, 500, np.nan, 100, 'put']
general.to_sql(name='general', con=con, index=False)

flds = ('issued_volume', 'amt_out', 'res_nominal_value', 'next_offer_date', 'offer_price', 'option_type')
update_values = (200000, 200000, 1000, '10.02.2022', 100, 'call', 'test_isin')
sql.execute(f"""UPDATE general SET {flds} = (?, ?, ?, ?, ?, ?)  WHERE isin = (?);""", update_values)
con.commit()

But the OperationalError occurs:

OperationalError                          Traceback (most recent call last)
<ipython-input-5-ca5d6f2301b7> in <module>()
      1 flds = ('issued_volume', 'amt_out', 'res_nominal_value', 'next_offer_date', 'offer_price', 'option_type')
      2 update_values = (200000, 200000, 1000, '10.02.2022', 100, 'call', 'test_isin')
----> 3 sql.execute(f"""UPDATE general SET {flds} = (?, ?, ?, ?, ?, ?)  WHERE isin = (?);""", update_values)
      4 con.commit()

OperationalError: near "(": syntax error

What am I doing wrong?

For the note, this code works flawlessly on another machine. So I figure the difference in outputs might be in library versions. I made sure the sqlite3 library was the same, but copying the folder "sqlite3" to the Anaconda3 -> Lib directory. I am running the code in Jupiter notebook.


问:
How to show youtube.com within an iframe?
I am trying to put youtube.com into an iframe on my website.

I tried doing it like you would with any other site.

```<code><iframe
width="400" height="320" style="visibility:visible" src="https://www.youtube.com">
</iframe>
</code>```

It works fine with other sites but not with youtube.com. It only shows a blank page that says youtube.com denied the connection. Is there anything I am doing wrong?

Body:
I am trying to put youtube.com into an iframe on my website.

I tried doing it like you would with any other site.

It works fine with other sites but not with youtube.com. It only shows a blank page that says youtube.com denied the connection. Is there anything I am doing wrong?


问:
Backup of QuestDB failing
After having failed doing a 'backup database' in QuestDB because of storage shortage I am not able to run backups at all anymore, despite now having enough storage for it.

Logfile shows this:

```<code>2022-12-11T17:36:21.193819Z C i.q.c.h.p.JsonQueryProcessorState [120] Uh-oh. Error!^M
java.lang.AssertionError^M
    at io.questdb.std.ObjList.getQuick(ObjList.java:173)^M
    at io.questdb.cairo.AbstractRecordMetadata.getColumnMetadata(AbstractRecordMetadata.java:78)^M
    at io.questdb.cairo.AbstractRecordMetadata.getColumnType(AbstractRecordMetadata.java:88)^M
    at io.questdb.griffin.RecordToRowCopierUtils.generateCopier(RecordToRowCopierUtils.java:138)^M
    at io.questdb.griffin.SqlCompiler$DatabaseBackupAgent.backupTable(SqlCompiler.java:2798)^M
    at io.questdb.griffin.SqlCompiler$DatabaseBackupAgent.lambda$new$1(SqlCompiler.java:2738)^M
    at io.questdb.std.FilesFacadeImpl.iterateDir(FilesFacadeImpl.java:190)^M
    at io.questdb.griffin.SqlCompiler$DatabaseBackupAgent.sqlDatabaseBackup(SqlCompiler.java:2938)^M
    at io.questdb.griffin.SqlCompiler$DatabaseBackupAgent.sqlBackup(SqlCompiler.java:2927)^M
    at io.questdb.griffin.SqlCompiler.lambda$new$0(SqlCompiler.java:162)^M
    at io.questdb.griffin.SqlCompiler.compileInner(SqlCompiler.java:1146)^M
    at io.questdb.griffin.SqlCompiler.compile(SqlCompiler.java:265)^M
    at io.questdb.cutlass.http.processors.JsonQueryProcessor.compileQuery(JsonQueryProcessor.java:348)^M
    at io.questdb.cutlass.http.processors.JsonQueryProcessor.execute0(JsonQueryProcessor.java:182)^M
    at io.questdb.cutlass.http.processors.JsonQueryProcessor.onRequestComplete(JsonQueryProcessor.java:229)^M
    at io.questdb.cutlass.http.HttpConnectionContext.handleClientRecv(HttpConnectionContext.java:574)^M
    at io.questdb.cutlass.http.HttpConnectionContext.handleClientOperation(HttpConnectionContext.java:192)^M
    at io.questdb.cutlass.http.HttpServer$1.lambda$$0(HttpServer.java:85)^M
    at io.questdb.network.AbstractIODispatcher.processIOQueue(AbstractIODispatcher.java:169)^M
    at io.questdb.cutlass.http.HttpServer$1.run(HttpServer.java:100)^M
    at io.questdb.mp.Worker.run(Worker.java:118)^M

</code>```

I also have restarted QuestDB process, removed all backups in destination directory and retried.

Title: Backup of QuestDB failing

Body:
After having failed doing a 'backup database' in QuestDB because of storage shortage I am not able to run backups at all anymore, despite now having enough storage for it.

Logfile shows this:

2022-12-11T17:36:21.193819Z C i.q.c.h.p.JsonQueryProcessorState [120] Uh-oh. Error!^M
java.lang.AssertionError^M
    at io.questdb.std.ObjList.getQuick(ObjList.java:173)^M
    at io.questdb.cairo.AbstractRecordMetadata.getColumnMetadata(AbstractRecordMetadata.java:78)^M
    at io.questdb.cairo.AbstractRecordMetadata.getColumnType(AbstractRecordMetadata.java:88)^M
    at io.questdb.griffin.RecordToRowCopierUtils.generateCopier(RecordToRowCopierUtils.java:138)^M
    at io.questdb.griffin.SqlCompiler$DatabaseBackupAgent.backupTable(SqlCompiler.java:2798)^M
    at io.questdb.griffin.SqlCompiler$DatabaseBackupAgent.lambda$new$1(SqlCompiler.java:2738)^M
    at io.questdb.std.FilesFacadeImpl.iterateDir(FilesFacadeImpl.java:190)^M
    at io.questdb.griffin.SqlCompiler$DatabaseBackupAgent.sqlDatabaseBackup(SqlCompiler.java:2938)^M
    at io.questdb.griffin.SqlCompiler$DatabaseBackupAgent.sqlBackup(SqlCompiler.java:2927)^M
    at io.questdb.griffin.SqlCompiler.lambda$new$0(SqlCompiler.java:162)^M
    at io.questdb.griffin.SqlCompiler.compileInner(SqlCompiler.java:1146)^M
    at io.questdb.griffin.SqlCompiler.compile(SqlCompiler.java:265)^M
    at io.questdb.cutlass.http.processors.JsonQueryProcessor.compileQuery(JsonQueryProcessor.java:348)^M
    at io.questdb.cutlass.http.processors.JsonQueryProcessor.execute0(JsonQueryProcessor.java:182)^M
    at io.questdb.cutlass.http.processors.JsonQueryProcessor.onRequestComplete(JsonQueryProcessor.java:229)^M
    at io.questdb.cutlass.http.HttpConnectionContext.handleClientRecv(HttpConnectionContext.java:574)^M
    at io.questdb.cutlass.http.HttpConnectionContext.handleClientOperation(HttpConnectionContext.java:192)^M
    at io.questdb.cutlass.http.HttpServer$1.lambda$$0(HttpServer.java:85)^M
    at io.questdb.network.AbstractIODispatcher.processIOQueue(AbstractIODispatcher.java:169)^M
    at io.questdb.cutlass.http.HttpServer$1.run(HttpServer.java:100)^M
    at io.questdb.mp.Worker.run(Worker.java:118)^M

I also have restarted QuestDB process, removed all backups in destination directory and retried.


问:
Google Nearby implementation in react-native
I'm trying to implement the Google Nearby library in a react-native project. However, the only package I could find (react-native-google-nearby-messages) seems to be out of date.
Are there any other ways to implement this service? Thank you.</p>


问:
Nginx (1.14) ssl installation on port 3443 not working
Here is my nginx /etc/nginx/conf.d/my_domain-ssl.conf file.

```<code>server {

listen 3443;

ssl on;

ssl_certificate /home/ubuntu/my_domain_chain.crt;

ssl_certificate_key /home/ubuntu/ssl/mydomain.co.key;

root /var/www/html;

server_name mydomain.co www.mydomain.co;

}
</code>```

So this way I am trying to install ssl on port 3443(instead of 443). My ssl is all fine. But I still get this "Your connection is not private" error (NET::ERR_CERT_DATE_INVALID). This means its still using the old(expired) ssl certificate.
Clearly the file above is not being respected(nginx is reading the ssl certificate from configuration specified in some other file).

So how do I resolve this?

Body:
Here is my nginx /etc/nginx/conf.d/my_domain-ssl.conf file.

server {

listen 3443;

ssl on;

ssl_certificate /home/ubuntu/my_domain_chain.crt;

ssl_certificate_key /home/ubuntu/ssl/mydomain.co.key;

root /var/www/html;

server_name mydomain.co www.mydomain.co;

}

So this way I am trying to install ssl on port 3443(instead of 443). My ssl is all fine. But I still get this "Your connection is not private" error (NET::ERR_CERT_DATE_INVALID). This means its still using the old(expired) ssl certificate.
Clearly the file above is not being respected(nginx is reading the ssl certificate from configuration specified in some other file).

So how do I resolve this?


问:
Refresh viewcontroller and change values in eureka form from button press in an alert
Using Swift/UIKit, I have a Eureka form that is completed by the user. The values are saved using Realm.

I have a bar button that brings up an alert. The alert asks if the user would like to replace the data in the Eureka form with another saved data value. When I click "yes," the Realm instance saves the new value, but it does not update the Eureka form on the viewcontroller. When I leave the page and come back to the page, the new value is displayed.

How can I get the Eureka form to update / viewcontroller to immediately refresh when I click the alert "save" button in the alert?

This is what the Eureka row looks like:

```<code><<< DecimalRow(){
        $0.useFormatterDuringInput = true
        $0.title = "Gross Income"
        $0.value = 0
        let formatter = CurrencyFormatter()
        formatter.maximumFractionDigits = 0;
        formatter.locale = .current
        formatter.numberStyle = .currency
        $0.formatter = formatter
        let x = String(format: "%.0f", $0.value!)
        print(x)
        $0.onCellHighlightChanged({ (cell, row) in
            if row.isHighlighted == false {
                self.pastGrossIncome = String(row.value ?? 0)
                saveNow()
            }
        }).cellSetup() {cell, row in
            cell.titleLabel?.font = UIFont(name:"Noto Sans Kannada", size:15)
            cell.textField.keyboardType = .numberPad
            if self.plan?.last?.pastGrossIncome != nil {
                row.value = Double(self.plan!.last!.pastGrossIncome)
                self.pastGrossIncome = String(row.value ?? 0)
            } else {
                self.pastGrossIncome = ""
            }
            cell.textLabel?.font = UIFont(name:"Noto Sans Kannada", size:15)
        }

    }
</code>```

When I click "save" on the alert, the "plan?.last?.pastGrossIncome" is saved as a new value in Realm, but the viewcontroller does not refresh. How can I display this new value in the viewcontroller immediately upon hitting save?

Thank you.

Body:
Using Swift/UIKit, I have a Eureka form that is completed by the user. The values are saved using Realm.

I have a bar button that brings up an alert. The alert asks if the user would like to replace the data in the Eureka form with another saved data value. When I click "yes," the Realm instance saves the new value, but it does not update the Eureka form on the viewcontroller. When I leave the page and come back to the page, the new value is displayed.

How can I get the Eureka form to update / viewcontroller to immediately refresh when I click the alert "save" button in the alert?

This is what the Eureka row looks like:

<<< DecimalRow(){
        $0.useFormatterDuringInput = true
        $0.title = "Gross Income"
        $0.value = 0
        let formatter = CurrencyFormatter()
        formatter.maximumFractionDigits = 0;
        formatter.locale = .current
        formatter.numberStyle = .currency
        $0.formatter = formatter
        let x = String(format: "%.0f", $0.value!)
        print(x)
        $0.onCellHighlightChanged({ (cell, row) in
            if row.isHighlighted == false {
                self.pastGrossIncome = String(row.value ?? 0)
                saveNow()
            }
        }).cellSetup() {cell, row in
            cell.titleLabel?.font = UIFont(name:"Noto Sans Kannada", size:15)
            cell.textField.keyboardType = .numberPad
            if self.plan?.last?.pastGrossIncome != nil {
                row.value = Double(self.plan!.last!.pastGrossIncome)
                self.pastGrossIncome = String(row.value ?? 0)
            } else {
                self.pastGrossIncome = ""
            }
            cell.textLabel?.font = UIFont(name:"Noto Sans Kannada", size:15)
        }

    }

When I click "save" on the alert, the "plan?.last?.pastGrossIncome" is saved as a new value in Realm, but the viewcontroller does not refresh. How can I display this new value in the viewcontroller immediately upon hitting save?

Thank you.


问:
quirky border input field when i type a text
i dont know why when i try to type in the field input i get a quirky border

Take a look in this image

any one know is there a solution to fix that.

i just try to type a text without border input

my html code :

```<code><label class="form-element__label">Portefeuille</label>
              <input

                type="text"
                placeholder="Portefeuille"
                formControlName="wallet"
              />
              <small  [ngClass]="{'error' :formError.wallet !== ''}">{{ formError.wallet }}</small>

css code :
.error {
  color: rgb(243, 96, 96);
}
</code>```

Body:
i dont know why when i try to type in the field input i get a quirky border

Take a look in this image

any one know is there a solution to fix that.

i just try to type a text without border input

my html code :

Portefeuille
              <input

                type="text"
                placeholder="Portefeuille"
                formControlName="wallet"
              />
              {{ formError.wallet }}

css code :
.error {
  color: rgb(243, 96, 96);
}


问:
Image won't fill the div container
I have a sidebar with cards I want the images to fill it's container I used

```<code>object-fit cover and contain
</code>```

the first one will cut part of my image and it won't look nice  object fit contain is resizing my image and it's too small it won't  take the free space in this div

I tried object-fit property with contain and cover values

Title: Image won't fill the div container

Body:
I have a sidebar with cards I want the images to fill it's container I used

object-fit cover and contain

the first one will cut part of my image and it won't look nice  object fit contain is resizing my image and it's too small it won't  take the free space in this div

I tried object-fit property with contain and cover values


问:
IPMI Tool - deleting file
Iam trying to create a file using ipmi tool by ssh from machine A , but noted that the file created via ssh doesnt get deleted from machine B, instead i have to create 1 more file  manually from machine B and delete it. Have any one got some insights on this</p>

Title: IPMI Tool - deleting file


问:
PYTHON MYSQL TABLE PRINTING: different results from printing the fetchall() and actual data in the table
I am constantly updating my anime datascraping program and now I have run in another issue.

What I am trying to do is: print the Mysql table but in a "prettier" and "tabular" way.

I found a good answer on this site that involved the "tabulate" library and I wrote this function:

```<code>def table_print():                                                                                #Stampa table in un modo "più bello"

    mycursor.execute("SELECT name, voti, ranks, popolarità, membri, 'voto_NIK', 'voto_ANDY', 'voto_utente' FROM animus_list")
    myresult = mycursor.fetchall()
    print("myresults! %s" % myresult)
    #result = mycursor.execute("SELECT * FROM animus_list")
    result = mycursor.fetchall()
    mycursor.execute("SELECT * FROM animus_list")

    for x in mycursor:
        print(x)

    print(tabulate(myresult, headers=['nome', 'voto', 'rank', 'popolarità', 'membri', 'voto_NIK', 'voto_ANDY', 'voto_utente'], tablefmt='psql'))
</code>```

What this function does is: print the Mysql table in a prettified way and the issue is:

The last 3 columns are not printed correctly and their cells contain the column name instead of their actual data.

This happens even when I update the contents of the cells themselves.

THE PROBLEM THOUGH, IS NOT THE TABULATE PRINTING BUT IN THE "mycursor.fetchall()" THAT GIVES IT THE WRONG DATA.

EX. of program execution:

enter image description here

AS you can see, the content of the last 3 columns is different between Table and fetchall (the table is the one in the () while fetchall gets printed in []).

The last part of useful info I can provide is how I have created the table:

```<code>mycursor.execute("CREATE TABLE animus_list (name VARCHAR(255), voti VARCHAR(10), ranks VARCHAR(50), popolarità VARCHAR(50), membri VARCHAR(50), voto_NIK VARCHAR(10), voto_ANDY VARCHAR(10), voto_utente VARCHAR(10), CONSTRAINT uc UNIQUE(name))")
</code>```

Can you help me fix this issue? I would like one of these 2 options:

Fix this "fetchall" difference situation or;

Find another way to print the "prettified table"

Thanks in advance for your patience and help

What I tried is:

Tried to find other methods to print the database but they wouldn't work as I hoped

Deleted table and created it again

Changed the 3 column's definitions from VARCHAR(5) to (10)

Created function to edit the data inside of the table

Insert different animes in the table rows

Body:
I am constantly updating my anime datascraping program and now I have run in another issue.

What I am trying to do is: print the Mysql table but in a "prettier" and "tabular" way.

I found a good answer on this site that involved the "tabulate" library and I wrote this function:

def table_print():                                                                                #Stampa table in un modo "più bello"

    mycursor.execute("SELECT name, voti, ranks, popolarità, membri, 'voto_NIK', 'voto_ANDY', 'voto_utente' FROM animus_list")
    myresult = mycursor.fetchall()
    print("myresults! %s" % myresult)
    #result = mycursor.execute("SELECT * FROM animus_list")
    result = mycursor.fetchall()
    mycursor.execute("SELECT * FROM animus_list")

    for x in mycursor:
        print(x)

    print(tabulate(myresult, headers=['nome', 'voto', 'rank', 'popolarità', 'membri', 'voto_NIK', 'voto_ANDY', 'voto_utente'], tablefmt='psql'))

What this function does is: print the Mysql table in a prettified way and the issue is:

The last 3 columns are not printed correctly and their cells contain the column name instead of their actual data.

This happens even when I update the contents of the cells themselves.

THE PROBLEM THOUGH, IS NOT THE TABULATE PRINTING BUT IN THE "mycursor.fetchall()" THAT GIVES IT THE WRONG DATA.

EX. of program execution:

enter image description here

AS you can see, the content of the last 3 columns is different between Table and fetchall (the table is the one in the () while fetchall gets printed in []).

The last part of useful info I can provide is how I have created the table:

mycursor.execute("CREATE TABLE animus_list (name VARCHAR(255), voti VARCHAR(10), ranks VARCHAR(50), popolarità VARCHAR(50), membri VARCHAR(50), voto_NIK VARCHAR(10), voto_ANDY VARCHAR(10), voto_utente VARCHAR(10), CONSTRAINT uc UNIQUE(name))")

Can you help me fix this issue? I would like one of these 2 options:

Fix this "fetchall" difference situation or;

Find another way to print the "prettified table"

Thanks in advance for your patience and help

What I tried is:

Tried to find other methods to print the database but they wouldn't work as I hoped

Deleted table and created it again

Changed the 3 column's definitions from VARCHAR(5) to (10)

Created function to edit the data inside of the table

Insert different animes in the table rows


问:
trying to scrape website using scrapy-splash
I am trying to scrape javascript website using scrapy-splash but it give me nothing they show these  <GET https://www.askgamblers.com/online-casinos/countries/uk via http://localhost:8050/render.html> (referer: None)  these is the page link https://www.askgamblers.com/online-casinos/countries/uk

```<code>import scrapy
from scrapy_splash import SplashRequest

class TestSpider(scrapy.Spider):
    name = 'test'

    def start_requests(self):
        url='https://www.askgamblers.com/online-casinos/countries/uk'
        yield SplashRequest(url)

    def parse(self, response):
            books = response.xpath( "//div[@class='card__desc']//a[starts-with(@href, '/online')]//@href").extract()
            for book in books:
                    url = response.urljoin(book)
                    yield{
                        'url':url,
                    }
</code>```

Body:
I am trying to scrape javascript website using scrapy-splash but it give me nothing they show these  <GET https://www.askgamblers.com/online-casinos/countries/uk via http://localhost:8050/render.html> (referer: None)  these is the page link https://www.askgamblers.com/online-casinos/countries/uk

import scrapy
from scrapy_splash import SplashRequest

class TestSpider(scrapy.Spider):
    name = 'test'

    def start_requests(self):
        url='https://www.askgamblers.com/online-casinos/countries/uk'
        yield SplashRequest(url)

    def parse(self, response):
            books = response.xpath( "//div[@class='card__desc']//a[starts-with(@href, '/online')]//@href").extract()
            for book in books:
                    url = response.urljoin(book)
                    yield{
                        'url':url,
                    }


问:
Raspberry PI 4: cannot install and use npm package set-interval
I have referred this page https://www.npmjs.com/package/set-interval and installed the package. In my Raspberry Pi terminal, I tried many commands all for installing the package.

```<code>>> npm -i set-interval
>> sudo npm -i set-interval
>> sudo npm install set-interval
>> sudo npm install --save set-interval
</code>```

Response:

I am getting error while importing the package:

```<code> // import the package for time based execution
 import SetInterval from 'set-interval'
</code>```

Response:

Body:
I have referred this page https://www.npmjs.com/package/set-interval and installed the package. In my Raspberry Pi terminal, I tried many commands all for installing the package.

>> npm -i set-interval
>> sudo npm -i set-interval
>> sudo npm install set-interval
>> sudo npm install --save set-interval

Response:

I am getting error while importing the package:

 // import the package for time based execution
 import SetInterval from 'set-interval'

Response:


问:
Reverse Engineer API Call
I would like to reverse engineer an API Call of an android app.
It's a POST request, octet-stream.
The issue is that the content is binary but mixed with clear text.
Here's a little snippet of the start of an API call content (got it using MITM proxy):

```<code>'\x12\xf3\x01\
x09\xb4\xda\xc3^(mH@\
x11y\xe9&1\x08L\
x02@\x1a\
x05helix2$30 Rue N\xc3\xa9laton, 75015 Paris, FranceJ\x0f30 Rue N\xc3\xa9latonR\x02enZ\x0f30 Rue N\xc3\xa9latonb\
</code>```

As you can see, clear text is mixed with hex code, and all those calls contents always start with \x12. I would like to understand how this app generates this api call. I decompile it using jadx, but it was just too complicated with the thousands of classes and obfuscation.
Is there any way to do this without going through the actual apk code? I'm afraid that this is just some type of encoding and that you don't need all the hassle of reverse engineering the actual app code

Thank you

Title: Reverse Engineer API Call

Body:
I would like to reverse engineer an API Call of an android app.
It's a POST request, octet-stream.
The issue is that the content is binary but mixed with clear text.
Here's a little snippet of the start of an API call content (got it using MITM proxy):

'\x12\xf3\x01\
x09\xb4\xda\xc3^(mH@\
x11y\xe9&1\x08L\
x02@\x1a\
x05helix2$30 Rue N\xc3\xa9laton, 75015 Paris, FranceJ\x0f30 Rue N\xc3\xa9latonR\x02enZ\x0f30 Rue N\xc3\xa9latonb\

As you can see, clear text is mixed with hex code, and all those calls contents always start with \x12. I would like to understand how this app generates this api call. I decompile it using jadx, but it was just too complicated with the thousands of classes and obfuscation.
Is there any way to do this without going through the actual apk code? I'm afraid that this is just some type of encoding and that you don't need all the hassle of reverse engineering the actual app code

Thank you


问:
Looker Case Study
I have a google survey with multiple answers that resulted in data on a google sheet to have columns with comma-separated values

col1

A

A,B

A,C

B,C

C,D

I want one chart on google looker studio that turns counts of A, count of B count of C and count of D.

I have tried this solution already and it didn't not work
CASE
WHEN CONTAINS_TEXT(col1, "A") THEN "A"
WHEN CONTAINS_TEXT(col1, "B") THEN "B"
WHEN CONTAINS_TEXT(col1, "C") THEN "C"
WHEN CONTAINS_TEXT(col1, "D") THEN "D"
END

The chart is to be controlled by other demographic columns, like gender, age group, Location, etc..

Title: Looker Case Study


问:
auto join/include a view in ef core through navigation property
In an asp.net core app with ef core and identity, i have multiple different user types, each having their own entity and pointing to the identity user model. In this example these are Panelist and SystemUser.

Quite often you want the contact data for either the SystemUser or the Panelist, but joining on AppUser (i.e. Panelist.Include(p => p.AppUser)) is something i'd like to avoid, since this also joins a lot of unwanted columns, especially various security related hashes. Things i'd like not to expose. Everytime you would return such a user from a controller route you would need to ensure that either AutoMapper was applied or you manually selected the necessary properties.

class AppUser : IdentityUser
{
    public string LastName {get;set;}
    public string FirstName {get;set;}
    // inherited from IdentityUser: Email,
    // PhoneNumber
}

class SystemUser
{
    public AppUser AppUser {get;set;}
    public string AppUserId {get;set;}
    // more properties
}

class Panelist
{
    public AppUser AppUser {get;set;}
    public string AppUserId {get;set;}
    // more properties
}

```
<p>As a way out, i created a view:</p>
<pre class="lang-sql prettyprint-override"><code>-- as part of a migration in ef core
drop view if exists dbo.ContactDataView

create view dbo.ContactDataView as
    select user.Id, user.FullName, user.FirstName, user.LastName, user.PhoneNumber, user.Email
    from dbo.AppUser
</code>```

and the matching c# side

public class ContactData
{
    ///
    /// user id from app user
    ///
    public string Id { get; set; }
    public string LastName { get; set; }
    public string FirstName { get; set; }
    public string PhoneNumber { get; set; }
    public string Email { get; set; }
}
```
<p>in <code>DbContext.OnModelCreating(ModelBuilder builder)</code></p>
<pre class="lang-cs prettyprint-override"><code>        builder.Entity<Models.Views.ContactData>()
            .ToView("ContactDataView")
            .HasKey(contactData => contactData.Id);
</code>```

The view works fine and as expected, but now i'd like to include it in one query to either of the user types through a navigation property. I am aware you could just manually join the contact data view in, but the goal (if that is possible within ef core) is to just write dataContext.SystemUusers.Include(su => su.ContactData). In addition, ef core recently also supports auto includes, which would make this even more elegant.

Just adding a navigation property (which is only meant for tables, not views as far as i understand things) fails, since this will either generate an additional foreign key or complain about using AppUserId twice.

I am aware that AutoMapper might be a solution, but it's not an option for design reasons as this would introduce mapping logic right into your domain models. This project uses AutoMapper already though, but at a much later stage.

So long story short.

was the view the right idea to begin with?

is this possible in a somewhat clean way (i.e. auto joining it), if at all

or, bite the bullet and query the view separately?

Other possible solutions all have various drawbacks. You could add computed columns for all contact data, that is very much overkill squared imho. You could duplicate the data in both user types, also not ideal. Creating two different views which does the join is also not an option, since i need these entities writable. Finally you could inherit from AppUser, but that would just shift the problem.

Thanks in advance

Body:
In an asp.net core app with ef core and identity, i have multiple different user types, each having their own entity and pointing to the identity user model. In this example these are Panelist and SystemUser.

Quite often you want the contact data for either the SystemUser or the Panelist, but joining on AppUser (i.e. Panelist.Include(p => p.AppUser)) is something i'd like to avoid, since this also joins a lot of unwanted columns, especially various security related hashes. Things i'd like not to expose. Everytime you would return such a user from a controller route you would need to ensure that either AutoMapper was applied or you manually selected the necessary properties.

class AppUser : IdentityUser
{
    public string LastName {get;set;}
    public string FirstName {get;set;}
    // inherited from IdentityUser: Email,
    // PhoneNumber
}

class SystemUser
{
    public AppUser AppUser {get;set;}
    public string AppUserId {get;set;}
    // more properties
}

class Panelist
{
    public AppUser AppUser {get;set;}
    public string AppUserId {get;set;}
    // more properties
}

As a way out, i created a view:

-- as part of a migration in ef core
drop view if exists dbo.ContactDataView

create view dbo.ContactDataView as
    select user.Id, user.FullName, user.FirstName, user.LastName, user.PhoneNumber, user.Email
    from dbo.AppUser

and the matching c# side

public class ContactData
{
    ///
    /// user id from app user
    ///
    public string Id { get; set; }
    public string LastName { get; set; }
    public string FirstName { get; set; }
    public string PhoneNumber { get; set; }
    public string Email { get; set; }
}

in DbContext.OnModelCreating(ModelBuilder builder)

        builder.Entity<Models.Views.ContactData>()
            .ToView("ContactDataView")
            .HasKey(contactData => contactData.Id);

The view works fine and as expected, but now i'd like to include it in one query to either of the user types through a navigation property. I am aware you could just manually join the contact data view in, but the goal (if that is possible within ef core) is to just write dataContext.SystemUusers.Include(su => su.ContactData). In addition, ef core recently also supports auto includes, which would make this even more elegant.

Just adding a navigation property (which is only meant for tables, not views as far as i understand things) fails, since this will either generate an additional foreign key or complain about using AppUserId twice.

I am aware that AutoMapper might be a solution, but it's not an option for design reasons as this would introduce mapping logic right into your domain models. This project uses AutoMapper already though, but at a much later stage.

So long story short.

was the view the right idea to begin with?

is this possible in a somewhat clean way (i.e. auto joining it), if at all

or, bite the bullet and query the view separately?

Other possible solutions all have various drawbacks. You could add computed columns for all contact data, that is very much overkill squared imho. You could duplicate the data in both user types, also not ideal. Creating two different views which does the join is also not an option, since i need these entities writable. Finally you could inherit from AppUser, but that would just shift the problem.

Thanks in advance


问:
Karate CLI Testing - Execute Command within context of another Command
I'm currently testing a CLI app written by a developer in my team - specifically this command:

```<code>./mycli init
</code>```

After entering this command, it responds with this:

```<code>Enter endpoint:
</code>```

As suggested, I need to provide the target URL, then hit enter.
I'll then be asked 2 more questions which require input.

For example, let's say I have this:

```<code>* def listener =
    """
    function(line) {
      if (line.contains('Enter endpoint')) {
        //input the answer
      }
    }
    """

* def initCmd = karate.fork({ args: ['sh','mycli','init'], listener: listener })
* print initCmd.sysOut
</code>```

(NB: This snippet was inspired by fork-listener.feature and this interesting thread with jbang team https://github.com/karatelabs/karate/issues/1191)

Karate is working really well for all the other tests I need to do for this CLI - is there something I can put in the IF statement for this particular use case?

Body:
I'm currently testing a CLI app written by a developer in my team - specifically this command:

./mycli init

After entering this command, it responds with this:

Enter endpoint:

As suggested, I need to provide the target URL, then hit enter.
I'll then be asked 2 more questions which require input.

For example, let's say I have this:

* def listener =
    """
    function(line) {
      if (line.contains('Enter endpoint')) {
        //input the answer
      }
    }
    """

* def initCmd = karate.fork({ args: ['sh','mycli','init'], listener: listener })
* print initCmd.sysOut

(NB: This snippet was inspired by fork-listener.feature and this interesting thread with jbang team https://github.com/karatelabs/karate/issues/1191)

Karate is working really well for all the other tests I need to do for this CLI - is there something I can put in the IF statement for this particular use case?


问:
Django toggle yes and no
I am having difficulty creating a toggle for Django.  This Django is a Chores table listed from the description, category, and is_complete. The is_complete is what I am having trouble with. The toggle should be a href that when you click "yes" it will change to "no"

Model.py

```<code>class ChoresCategory(models.Model):
    category = models.CharField(max_length=128)
    def __str__(self):
        return self.category
class Chores(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    description = models.CharField(max_length=128)
    category = models.ForeignKey(TaskCategory, on_delete=models.CASCADE)
    is_completed = models.BooleanField(default=False)
</code>```

I tried creating a view.py

def toggle(request):

Title: Django toggle yes and no

Body:
I am having difficulty creating a toggle for Django.  This Django is a Chores table listed from the description, category, and is_complete. The is_complete is what I am having trouble with. The toggle should be a href that when you click "yes" it will change to "no"

Model.py

class ChoresCategory(models.Model):
    category = models.CharField(max_length=128)
    def __str__(self):
        return self.category
class Chores(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    description = models.CharField(max_length=128)
    category = models.ForeignKey(TaskCategory, on_delete=models.CASCADE)
    is_completed = models.BooleanField(default=False)

I tried creating a view.py

def toggle(request):


问:
Finding out which type of booking a customer has the biggest average of people booked for
I have the following table called 'BookingsAverage':

```<code>email       | average_amount  | type
============+=================+==================
A@gmail.com |  8              | gym
A@gmail.com |  7              | pool
B@gmail.com |  2              | gym
B@gmail.com |  10             | pool
B@gmail.com |  25             | other
C@gmail.com |  3              | other
</code>```

I am trying to make a query that returns if either gym or pool have the most average_amount for every email. So this data would result in:

```<code>email       |  biggest
============+=================
A@gmail.com |  gym
B@gmail.com |  pool
C@gmail.com |  both
</code>```

If an email doesn't have a row for both types and thus only has a row with type 'other' than the average_amount of type 'gym' and 'pool' are assumed to be 0 and equal. This results in the column 'biggest' having the value "both".

If an email has a row with type 'pool' or 'gym' but not with the other, than the biggest will be the type that's present.

How could I accomplish this?

I looked at how to find the row with the biggest value for an email, but this returns the 'other' row when it has the highest average_amount (even though there is a row for an email containing the type 'gym' or 'pool') and also returns two rows if two types have the same average_amount for an email, instead of returning 1 row containing the string 'both'

```<code>SELECT a.email, a.average_amount, a.type
FROM BookingsAverage a
INNER JOIN (
    SELECT email, MAX(average_amount) average_amount
    FROM BookingsAverage
    GROUP BY email
) b ON a.email = b.email AND a.average_amount = b.average_amount
</code>```

Body:
I have the following table called 'BookingsAverage':

email       | average_amount  | type
============+=================+==================
A@gmail.com |  8              | gym
A@gmail.com |  7              | pool
B@gmail.com |  2              | gym
B@gmail.com |  10             | pool
B@gmail.com |  25             | other
C@gmail.com |  3              | other

I am trying to make a query that returns if either gym or pool have the most average_amount for every email. So this data would result in:

email       |  biggest
============+=================
A@gmail.com |  gym
B@gmail.com |  pool
C@gmail.com |  both

If an email doesn't have a row for both types and thus only has a row with type 'other' than the average_amount of type 'gym' and 'pool' are assumed to be 0 and equal. This results in the column 'biggest' having the value "both".

If an email has a row with type 'pool' or 'gym' but not with the other, than the biggest will be the type that's present.

How could I accomplish this?

I looked at how to find the row with the biggest value for an email, but this returns the 'other' row when it has the highest average_amount (even though there is a row for an email containing the type 'gym' or 'pool') and also returns two rows if two types have the same average_amount for an email, instead of returning 1 row containing the string 'both'

SELECT a.email, a.average_amount, a.type
FROM BookingsAverage a
INNER JOIN (
    SELECT email, MAX(average_amount) average_amount
    FROM BookingsAverage
    GROUP BY email
) b ON a.email = b.email AND a.average_amount = b.average_amount


问:
Primeng chart - how to remove the color square from label?
I'm using PrimeNg chart.

```<code>this.chartData = {
        labels: [1, 2, 3, 4, 5,6]
        datasets: [
          {
            label: 'CHARTS TITLE - HOW TO REMOVE THE ORANGE BLOCK HERE?',
            backgroundColor: ['#FF9900', '#FF3300', '#DDDDDD', '#474747', '#777777', '#CC3300'],
            data: [29, 29, 26, 11, 18, 12]
          }
        ]
      }; ....
</code>```

I'm trying to remove the orange square next to title or change it to white. See the image of my chart here
The title (lable) must stay.
Is it possible?
(The graph columns must stay as in the picture.)

Body:
I'm using PrimeNg chart.

this.chartData = {
        labels: [1, 2, 3, 4, 5,6]
        datasets: [
          {
            label: 'CHARTS TITLE - HOW TO REMOVE THE ORANGE BLOCK HERE?',
            backgroundColor: ['#FF9900', '#FF3300', '#DDDDDD', '#474747', '#777777', '#CC3300'],
            data: [29, 29, 26, 11, 18, 12]
          }
        ]
      }; ....

I'm trying to remove the orange square next to title or change it to white. See the image of my chart here
The title (lable) must stay.
Is it possible?
(The graph columns must stay as in the picture.)


问:
JavaFX project works in IntelliJ, but not when I clone from a git remote repository and run 'gradle wrapper' and './gradlew run'
all! Three other people and I have recently completed a Java project, which is a recreation of the game Pokemon. Here is a link to the project:
https://github.com/Pirate-Hunter-Zoro/Pokemon

The following screen recording should show that the project runs successfully on IntelliJ: https://screencast-o-matic.com/watch/c3lXbNVvrqX

However, when I try to clone this project from Git, and run 'gradle wrapper' and then './gradlew run', while the application does launch, I cannot make it past the intro screen, as this video shows:
https://somup.com/c3lXbRww2Y

Finally, here is the resulting error message:

```<code>Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at javafx.fxml@19/javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1857)
        at javafx.fxml@19/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1724)
        at javafx.base@19/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
        at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at javafx.base@19/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@19/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at javafx.base@19/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.base@19/javafx.event.Event.fireEvent(Event.java:198)
        at javafx.graphics@19/javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3599)
        at javafx.graphics@19/javafx.scene.Scene$MouseHandler.process(Scene.java:3903)
        at javafx.graphics@19/javafx.scene.Scene.processMouseEvent(Scene.java:1887)
        at javafx.graphics@19/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2620)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
        at javafx.graphics@19/com.sun.glass.ui.View.handleMouseEvent(View.java:551)
        at javafx.graphics@19/com.sun.glass.ui.View.notifyMouse(View.java:937)
        at javafx.graphics@19/com.sun.glass.ui.mac.MacView.notifyMouse(MacView.java:127)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:77)
        at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at javafx.base@19/com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:275)
        at javafx.fxml@19/com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:84)
        at javafx.fxml@19/javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1852)
        ... 27 more
Caused by: java.lang.IllegalArgumentException: Invalid URL: Invalid URL or resource not found
        at javafx.graphics@19/javafx.scene.image.Image.validateUrl(Image.java:1138)
        at javafx.graphics@19/javafx.scene.image.Image.<init>(Image.java:628)
        at csci205_final_project@0.1-SNAPSHOT/org.Fearsome_Foursome.Application.Controllers.ArenaController.setUpNameSpriteHealth(ArenaController.java:190)
        at csci205_final_project@0.1-SNAPSHOT/org.Fearsome_Foursome.Application.HelloPokemon.loadScene(HelloPokemon.java:102)
        at csci205_final_project@0.1-SNAPSHOT/org.Fearsome_Foursome.Application.Controllers.MenuController.showArena(MenuController.java:108)
        at csci205_final_project@0.1-SNAPSHOT/org.Fearsome_Foursome.Application.Controllers.MenuController.setHard(MenuController.java:132)
        ... 38 more
Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found
        at javafx.graphics@19/javafx.scene.image.Image.validateUrl(Image.java:1123)
</code>```

Please let me know if there is any more information I should get a hold of and share!

Many thanks for any help anyone could offer!

I tried to clone a repository and use 'gradle wrapper' and './gradlew run', expecting the application to work. The application launches, but does not work.

Body:
all! Three other people and I have recently completed a Java project, which is a recreation of the game Pokemon. Here is a link to the project:
https://github.com/Pirate-Hunter-Zoro/Pokemon

The following screen recording should show that the project runs successfully on IntelliJ: https://screencast-o-matic.com/watch/c3lXbNVvrqX

However, when I try to clone this project from Git, and run 'gradle wrapper' and then './gradlew run', while the application does launch, I cannot make it past the intro screen, as this video shows:
https://somup.com/c3lXbRww2Y

Finally, here is the resulting error message:

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at javafx.fxml@19/javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1857)
        at javafx.fxml@19/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1724)
        at javafx.base@19/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
        at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at javafx.base@19/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@19/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at javafx.base@19/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.base@19/javafx.event.Event.fireEvent(Event.java:198)
        at javafx.graphics@19/javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3599)
        at javafx.graphics@19/javafx.scene.Scene$MouseHandler.process(Scene.java:3903)
        at javafx.graphics@19/javafx.scene.Scene.processMouseEvent(Scene.java:1887)
        at javafx.graphics@19/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2620)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
        at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
        at javafx.graphics@19/com.sun.glass.ui.View.handleMouseEvent(View.java:551)
        at javafx.graphics@19/com.sun.glass.ui.View.notifyMouse(View.java:937)
        at javafx.graphics@19/com.sun.glass.ui.mac.MacView.notifyMouse(MacView.java:127)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:77)
        at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at javafx.base@19/com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:275)
        at javafx.fxml@19/com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:84)
        at javafx.fxml@19/javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1852)
        ... 27 more
Caused by: java.lang.IllegalArgumentException: Invalid URL: Invalid URL or resource not found
        at javafx.graphics@19/javafx.scene.image.Image.validateUrl(Image.java:1138)
        at javafx.graphics@19/javafx.scene.image.Image.<init>(Image.java:628)
        at csci205_final_project@0.1-SNAPSHOT/org.Fearsome_Foursome.Application.Controllers.ArenaController.setUpNameSpriteHealth(ArenaController.java:190)
        at csci205_final_project@0.1-SNAPSHOT/org.Fearsome_Foursome.Application.HelloPokemon.loadScene(HelloPokemon.java:102)
        at csci205_final_project@0.1-SNAPSHOT/org.Fearsome_Foursome.Application.Controllers.MenuController.showArena(MenuController.java:108)
        at csci205_final_project@0.1-SNAPSHOT/org.Fearsome_Foursome.Application.Controllers.MenuController.setHard(MenuController.java:132)
        ... 38 more
Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found
        at javafx.graphics@19/javafx.scene.image.Image.validateUrl(Image.java:1123)

Please let me know if there is any more information I should get a hold of and share!

Many thanks for any help anyone could offer!

I tried to clone a repository and use 'gradle wrapper' and './gradlew run', expecting the application to work. The application launches, but does not work.