问:
Unable to upgrade apache poi dependency in jboss server
I was trying to upgrade apache poi dependency from 3.13 to 5.2.2 in jboss server. I am getting following error. Can someone help on this?</p>
```<code>ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
10:07:23,359 ERROR [stderr] (EJB default - 9) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
10:07:24,902 ERROR [org.jboss.as.ejb3.invocation] (EJB default - 9) JBAS014134: EJB Invocation failed on component ContainerManagerEJB for method public void org.kie.server.jms.ContainerManagerEJB.installContainers(org.kie.server.services.impl.KieServerImpl,java.util.Set,org.kie.server.services.impl.storage.KieServerState,org.kie.server.controller.api.model.KieServerSetup): javax.ejb.EJBException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()I
        at org.jboss.as.ejb3.tx.BMTInterceptor.handleException(BMTInterceptor.java:87) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ejb3.tx.EjbBMTInterceptor.checkStatelessDone(EjbBMTInterceptor.java:92) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:107) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:60) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:93) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.AsyncFutureInterceptorFactory$1$1.runInvocation(AsyncFutureInterceptorFactory.java:89) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:73) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_352]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_352]
        at java.lang.Thread.run(Thread.java:750) [rt.jar:1.8.0_352]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()I
        ... 38 more
Caused by: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()I
        at org.drools.decisiontable.parser.xls.ExcelParser.processSheet(ExcelParser.java:168) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.parser.xls.ExcelParser.parseWorkbook(ExcelParser.java:109) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:83) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.SpreadsheetCompiler.parseResource(SpreadsheetCompiler.java:126) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:110) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:83) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.DecisionTableProviderImpl.compileResource(DecisionTableProviderImpl.java:78) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource(DecisionTableProviderImpl.java:44) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.compiler.DecisionTableFactory.loadFromResource(DecisionTableFactory.java:37) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.decisionTableToPackageDescr(KnowledgeBuilderImpl.java:404) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl$12.map(CompositeKnowledgeBuilderImpl.java:441) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResource(CompositeKnowledgeBuilderImpl.java:326) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackageDescr(CompositeKnowledgeBuilderImpl.java:311) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:115) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:105) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:244) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:64) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:230) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieModule(KieBuilderImpl.java:222) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.scanner.KieRepositoryScannerImpl.build(KieRepositoryScannerImpl.java:221) [kie-ci-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.scanner.KieRepositoryScannerImpl.buildArtifact(KieRepositoryScannerImpl.java:171) [kie-ci-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:127) [kie-ci-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:122) [kie-ci-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:154) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:140) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:117) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:184) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:244) [kie-server-services-common-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.server.services.impl.ContainerManager.installContainersSync(ContainerManager.java:43) [kie-server-services-common-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.server.services.impl.ContainerManager.installContainers(ContainerManager.java:33) [kie-server-services-common-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.server.jms.ContainerManagerEJB.installContainers(ContainerManagerEJB.java:38) [kie-server-jms-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_352]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_352]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_352]
        at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_352]
        at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:86) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:97) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:104) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:104) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        ... 35 more
</code>```

Body:
I was trying to upgrade apache poi dependency from 3.13 to 5.2.2 in jboss server. I am getting following error. Can someone help on this?

ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
10:07:23,359 ERROR [stderr] (EJB default - 9) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
10:07:24,902 ERROR [org.jboss.as.ejb3.invocation] (EJB default - 9) JBAS014134: EJB Invocation failed on component ContainerManagerEJB for method public void org.kie.server.jms.ContainerManagerEJB.installContainers(org.kie.server.services.impl.KieServerImpl,java.util.Set,org.kie.server.services.impl.storage.KieServerState,org.kie.server.controller.api.model.KieServerSetup): javax.ejb.EJBException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()I
        at org.jboss.as.ejb3.tx.BMTInterceptor.handleException(BMTInterceptor.java:87) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ejb3.tx.EjbBMTInterceptor.checkStatelessDone(EjbBMTInterceptor.java:92) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:107) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:60) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:93) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.interceptors.AsyncFutureInterceptorFactory$1$1.runInvocation(AsyncFutureInterceptorFactory.java:89) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:73) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_352]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_352]
        at java.lang.Thread.run(Thread.java:750) [rt.jar:1.8.0_352]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()I
        ... 38 more
Caused by: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()I
        at org.drools.decisiontable.parser.xls.ExcelParser.processSheet(ExcelParser.java:168) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.parser.xls.ExcelParser.parseWorkbook(ExcelParser.java:109) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:83) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.SpreadsheetCompiler.parseResource(SpreadsheetCompiler.java:126) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:110) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:83) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.DecisionTableProviderImpl.compileResource(DecisionTableProviderImpl.java:78) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource(DecisionTableProviderImpl.java:44) [drools-decisiontables-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.compiler.DecisionTableFactory.loadFromResource(DecisionTableFactory.java:37) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.decisionTableToPackageDescr(KnowledgeBuilderImpl.java:404) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl$12.map(CompositeKnowledgeBuilderImpl.java:441) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildResource(CompositeKnowledgeBuilderImpl.java:326) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackageDescr(CompositeKnowledgeBuilderImpl.java:311) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:115) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:105) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:244) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:64) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:230) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieModule(KieBuilderImpl.java:222) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.scanner.KieRepositoryScannerImpl.build(KieRepositoryScannerImpl.java:221) [kie-ci-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.scanner.KieRepositoryScannerImpl.buildArtifact(KieRepositoryScannerImpl.java:171) [kie-ci-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:127) [kie-ci-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.scanner.KieRepositoryScannerImpl.loadArtifact(KieRepositoryScannerImpl.java:122) [kie-ci-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.loadKieModuleFromMavenRepo(KieRepositoryImpl.java:154) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:140) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieRepositoryImpl.getKieModule(KieRepositoryImpl.java:117) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:184) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176) [drools-compiler-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:244) [kie-server-services-common-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.server.services.impl.ContainerManager.installContainersSync(ContainerManager.java:43) [kie-server-services-common-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.server.services.impl.ContainerManager.installContainers(ContainerManager.java:33) [kie-server-services-common-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at org.kie.server.jms.ContainerManagerEJB.installContainers(ContainerManagerEJB.java:38) [kie-server-jms-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_352]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_352]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_352]
        at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_352]
        at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:86) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:97) [jboss-as-weld-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) [jboss-as-ee-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:104) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
        at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:104) [jboss-as-ejb3-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
        ... 35 more


来源: stackexchange

问:
The data exists in the array using push, but I cannot access it JavaScript
I am encountering a rather strange problem on the javascript side.
I'm trying to put information about the media device in an array, but they appear in the array but with length 0 and I can't even access them

```<code>const enumerateDevicesKey = () => {
        const enumerateDevices = [];
        if (! isEnumerateDevicesSupported) return;
        let test = '';

        navigator.mediaDevices.enumerateDevices()
        .then((devices) => {
            setTimeout(() => {
                devices.forEach((device) => {
                    enumerateDevices.push(`${device.kind}:${device.label}id=${device.groupId}`)
                });
            }, 200)
        })
        .catch((err) => {
            console.error(`${err.name}: ${err.message}`);
        });

        return enumerateDevices;
    }
</code>```
```<code>const enumerateAudioSupport = enumerateDevicesKey();
        console.log("enumerateaudioSupport", enumerateAudioSupport);
</code>```
```<code>enumerateaudioSupport
[]
0
:
"audioinput:id=eb6591fd602ceec2096231b64673e7d98019182aabc63227f6bab6631af6356f"
1
:
"videoinput:id=deabb3ff8ee9f2c30471c0c55db96870fcaaae418a5a2fcc122ff2adc057b486"
2
:
"audiooutput:id=5f6c43c9d678b329b136e33fd1900b2ed17377fe95bbf1305a548c2e6d76e600"
length
:
3
[[Prototype]]
:
Array(0)
</code>```

How could I solve the problem? I also tried with snooze or async functions, but in vain

ContentLicense: CC BY-SA 4.0

Body:
I am encountering a rather strange problem on the javascript side.
I'm trying to put information about the media device in an array, but they appear in the array but with length 0 and I can't even access them

const enumerateDevicesKey = () => {
        const enumerateDevices = [];
        if (! isEnumerateDevicesSupported) return;
        let test = '';

        navigator.mediaDevices.enumerateDevices()
        .then((devices) => {
            setTimeout(() => {
                devices.forEach((device) => {
                    enumerateDevices.push(`${device.kind}:${device.label}id=${device.groupId}`)
                });
            }, 200)
        })
        .catch((err) => {
            console.error(`${err.name}: ${err.message}`);
        });

        return enumerateDevices;
    }

const enumerateAudioSupport = enumerateDevicesKey();
        console.log("enumerateaudioSupport", enumerateAudioSupport);

enumerateaudioSupport
[]
0
:
"audioinput:id=eb6591fd602ceec2096231b64673e7d98019182aabc63227f6bab6631af6356f"
1
:
"videoinput:id=deabb3ff8ee9f2c30471c0c55db96870fcaaae418a5a2fcc122ff2adc057b486"
2
:
"audiooutput:id=5f6c43c9d678b329b136e33fd1900b2ed17377fe95bbf1305a548c2e6d76e600"
length
:
3
[[Prototype]]
:
Array(0)

How could I solve the problem? I also tried with snooze or async functions, but in vain


问:
Unable to process mailchimp status code using node and express
```<code>const { response } = require("express");
const express = require("express");
const https = require("https");
const bodyParser = require("body-parser");
const { url } = require("inspector");
const e = require("express");
const app = express();
const port = 3000;

//To use css or images we need to use a express static fucntion
//For this we will create a folder named public and add all our images and css files into that folder.
app.use(express.static("public"));
app.use(bodyParser.urlencoded({ extended: true }));

app.get("/", (req, res) => {
  res.sendFile(__dirname + "/signup.html");
});
app.post("/", function (req, res) {
  var firstName = req.body.fName;
  var lastName = req.body.lName;
  var email = req.body.email;
  console.log(firstName, lastName, email);
  const mailchimp = require("@mailchimp/mailchimp_marketing");

  mailchimp.setConfig({
    apiKey: "XXXX-us21",
    server: "us21",
  });

  async function run() {
    const response = await mailchimp.lists.batchListMembers("XXXX", {
      members: [
        {
          email_address: email,
          status: "subscribed",
          merge_fields: {
            FNAME: firstName,
            LNAME: lastName,
          },
        },
      ],
    });
    console.log("response.status: ", res.statusCode); //  200
    if (res.statusCode === 200) {
      res.send("Added Successfully");
    } else {
      res.send("Error signing up");
    }
  }
  run();
</code>```

I am unable to process the mail chimp status code while running this code, regardless if the connection was successful or not. I want to display a message indicating whether or not the data entered by the user into the html form was properly submitted. Therefore, when I use the response(res) method, I can process the success message, but it does not work if it has errors.

Body:
const { response } = require("express");
const express = require("express");
const https = require("https");
const bodyParser = require("body-parser");
const { url } = require("inspector");
const e = require("express");
const app = express();
const port = 3000;

//To use css or images we need to use a express static fucntion
//For this we will create a folder named public and add all our images and css files into that folder.
app.use(express.static("public"));
app.use(bodyParser.urlencoded({ extended: true }));

app.get("/", (req, res) => {
  res.sendFile(__dirname + "/signup.html");
});
app.post("/", function (req, res) {
  var firstName = req.body.fName;
  var lastName = req.body.lName;
  var email = req.body.email;
  console.log(firstName, lastName, email);
  const mailchimp = require("@mailchimp/mailchimp_marketing");

  mailchimp.setConfig({
    apiKey: "XXXX-us21",
    server: "us21",
  });

  async function run() {
    const response = await mailchimp.lists.batchListMembers("XXXX", {
      members: [
        {
          email_address: email,
          status: "subscribed",
          merge_fields: {
            FNAME: firstName,
            LNAME: lastName,
          },
        },
      ],
    });
    console.log("response.status: ", res.statusCode); //  200
    if (res.statusCode === 200) {
      res.send("Added Successfully");
    } else {
      res.send("Error signing up");
    }
  }
  run();

I am unable to process the mail chimp status code while running this code, regardless if the connection was successful or not. I want to display a message indicating whether or not the data entered by the user into the html form was properly submitted. Therefore, when I use the response(res) method, I can process the success message, but it does not work if it has errors.


问:
How can i make an integration test out of this code?
I try to make an integration test from this code.

```<code>func GetBlockByNumberMainnet(blocknumber uint64) (string, error) {
    h := fmt.Sprintf("0x%x", blocknumber)

    group := models.JsonRPC{
        Jsonrpc: "2.0",
        Method:  "zond_getBlockByNumber",
        Params:  []interface{}{h, true},
        ID:      1,
    }
    b, err := json.Marshal(group)
    if err != nil {
        fmt.Println("error:", err)
    }

    req, err := http.NewRequest("POST", configs.Url, bytes.NewBuffer([]byte(b)))
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        fmt.Printf("%v", err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)

    return string(body), nil
}
</code>```

this is what i got so far

```<code>func TestGetBlockByNumberMainnet(t *testing.T) {
    var zond models.Zond
    // Call the GetLatestBlock function and verify the response
    expectedBlockNumber := "0x1f4"
    actualOutput, err := GetBlockByNumberMainnet(500)
    json.Unmarshal([]byte(actualOutput), &zond)
    if err != nil {
        t.Errorf("Unexpected error: %v", err)
    }
    if expectedBlockNumber != zond.ResultOld.Number {
        t.Errorf("Expected block number %s, got %s", expectedBlockNumber, zond.ResultOld.Number)
    }
}
</code>```

The url is

```<code>"http://45.76.43.83:4545"
</code>```

Am i doing this right? What could be improved? I'm sending an actual HTTP RPC POST request to the real server and then i'm comparing the output to the expected output.

Body:
I try to make an integration test from this code.

func GetBlockByNumberMainnet(blocknumber uint64) (string, error) {
    h := fmt.Sprintf("0x%x", blocknumber)

    group := models.JsonRPC{
        Jsonrpc: "2.0",
        Method:  "zond_getBlockByNumber",
        Params:  []interface{}{h, true},
        ID:      1,
    }
    b, err := json.Marshal(group)
    if err != nil {
        fmt.Println("error:", err)
    }

    req, err := http.NewRequest("POST", configs.Url, bytes.NewBuffer([]byte(b)))
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        fmt.Printf("%v", err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)

    return string(body), nil
}

this is what i got so far

func TestGetBlockByNumberMainnet(t *testing.T) {
    var zond models.Zond
    // Call the GetLatestBlock function and verify the response
    expectedBlockNumber := "0x1f4"
    actualOutput, err := GetBlockByNumberMainnet(500)
    json.Unmarshal([]byte(actualOutput), &zond)
    if err != nil {
        t.Errorf("Unexpected error: %v", err)
    }
    if expectedBlockNumber != zond.ResultOld.Number {
        t.Errorf("Expected block number %s, got %s", expectedBlockNumber, zond.ResultOld.Number)
    }
}

The url is

"http://45.76.43.83:4545"

Am i doing this right? What could be improved? I'm sending an actual HTTP RPC POST request to the real server and then i'm comparing the output to the expected output.


问:
App Store connect don't see +build icon button while I already uploaded build by xcode
Hello everyone I got a problem while I uploaded the build version from xcode and then I need to add build for submit to review my but it's not show me the button +(add) for add build version. it's the first upload to App Store connect for review and above is the capture on App Store connect that in possible it should have the add icon button.
Please answer and correct me if you know. thanks


问:
Unit Test vs. Integration Test HTTP redirect
I am wondering if the following test would be considered a unit test or an integration test.

```<code>const supertest = require('supertest')
const app = require('../app')

describe('When the redirect works', () => {
  it('The response includes "myapp" and status code 301', () => {
    return supertest(app)
      .get('/app/vacation')
      .set('host', 'myapp.app')
      .then((response) => {
        expect(response.headers.location).toBe(
          'https://www.myapp.app' + response.request.req.path
        )
        expect(response.statusCode).toBe(301)
      })
  })
})
</code>```

The app code looks like this:

```<code>const express = require("express");
const app = express();

app.get('/*',(req, res) => {
    let destinationUrl ='https://www.' + req.get('host') + req.originalUrl;
    res.redirect(301,destinationUrl)
})

module.exports = app;
</code>```

Since only one endpoint is tested, this could be a unit test.
What speaks against a unit test but for an integration is that this is black box testing and a HTTP request is included.

Body:
I am wondering if the following test would be considered a unit test or an integration test.

const supertest = require('supertest')
const app = require('../app')

describe('When the redirect works', () => {
  it('The response includes "myapp" and status code 301', () => {
    return supertest(app)
      .get('/app/vacation')
      .set('host', 'myapp.app')
      .then((response) => {
        expect(response.headers.location).toBe(
          'https://www.myapp.app' + response.request.req.path
        )
        expect(response.statusCode).toBe(301)
      })
  })
})

The app code looks like this:

const express = require("express");
const app = express();

app.get('/*',(req, res) => {
    let destinationUrl ='https://www.' + req.get('host') + req.originalUrl;
    res.redirect(301,destinationUrl)
})

module.exports = app;

Since only one endpoint is tested, this could be a unit test.
What speaks against a unit test but for an integration is that this is black box testing and a HTTP request is included.


问:
EF Core 6 Group By Issue For Multi table join
So in our project targeting old .net framework 4.7.1 we have a query like this :

```<code>var query = from c in context.Table1 join d in context.Table2 on c.enId=d.enId
            join v in context.Table3 on d.sId = v.sId
            group new {c,Name=d.Name,Email=d.Name,v=v.DocumentId} by new{c.enId,CDate=c.DialledDateTime} into grp
ordeby grp.Key.CDate select grp;
</code>```

which was running without issue

now the same query when we upgraded our project to dotnet 6 and ef core 6 is giving below exception

could not be translated. Additional information: Translation of 'Select' which contains grouping parameter without composition is not supported. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'.

How to solve this , so the same result as earlier can be obtained in dotnet 6 efcore 6 ?

Body:
So in our project targeting old .net framework 4.7.1 we have a query like this :

var query = from c in context.Table1 join d in context.Table2 on c.enId=d.enId
            join v in context.Table3 on d.sId = v.sId
            group new {c,Name=d.Name,Email=d.Name,v=v.DocumentId} by new{c.enId,CDate=c.DialledDateTime} into grp
ordeby grp.Key.CDate select grp;

which was running without issue

now the same query when we upgraded our project to dotnet 6 and ef core 6 is giving below exception

could not be translated. Additional information: Translation of 'Select' which contains grouping parameter without composition is not supported. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'.

How to solve this , so the same result as earlier can be obtained in dotnet 6 efcore 6 ?


问:
Hibernate Validator: How to get the message ID's for any given error?
In some cases I get an unexpected error message (I missed a message for some condition that Hibernate Validator checks for).

In trying to debug which message I need to update, how do I find the message codes that Hibernate is looking up?

This is usually around 4 codes, something like: MyObject.field, Size, etc.

ContentLicense: CC BY-SA 3.0


问:
Visible layout after a list scroll
I need help figuring out the type of view  for my app.

We have new design here, but I stuck and do not know what kind of view.

enter image description here

The view will visible after the list stop scrolling.
Please give me name of view in this case, thank a lot!

Title: Visible layout after a list scroll


问:
React DND Nested Drag and Drop (From parent to child and vice versa)
As I am working on a project where I want Nested Drag and Drop, in which we can Drag and Drop elements from parent to child and vice versa.

I have tried using this:
https://codesandbox.io/s/react-beautiful-dnd-nested-example-forked-3o0i1i?file=/src/NestedListComponent.js

This almost works fine but as my requirement, I am not able to drop from another list to this one.


问:
Nginx self-signed certificate
Here's my question, If I want to transport the self-signed certificate from another server to the Nginx server, do I have to choose the public certificate or the encrypted one with a key?
I mean when I export the certificate there was 2 options
1- key pair < after I enter the key then it’s looks like this self-signed_cert.p12
2- public certificate < no key to enter and looks like this self-signed_cert.crt

Which one is the correct one to use? I tried both and I got this error

```<code>failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
</code>```

I edit the second one .crt to look like this

```<code>-----BEGIN TRUSTED CERTIFICATE-----
         cert
-----END TRUSTED CERTIFICATE-----

</code>```

The one that ends with .p12 looks so different to me so I didn’t change anything

And the second question, if the public certificate was exported without entering any key then how can I create the file .key?

I tried to use the self.signed.p12 certificate with key TEST the I used

```<code>openssl genrsa -des3 -out self.signed.key 2048
</code>```

And enter TEST
But didn’t work with me

Title: Nginx self-signed certificate

Body:
Here's my question, If I want to transport the self-signed certificate from another server to the Nginx server, do I have to choose the public certificate or the encrypted one with a key?
I mean when I export the certificate there was 2 options
1- key pair < after I enter the key then it’s looks like this self-signed_cert.p12
2- public certificate < no key to enter and looks like this self-signed_cert.crt

Which one is the correct one to use? I tried both and I got this error

failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)

I edit the second one .crt to look like this

-----BEGIN TRUSTED CERTIFICATE-----
         cert
-----END TRUSTED CERTIFICATE-----

The one that ends with .p12 looks so different to me so I didn’t change anything

And the second question, if the public certificate was exported without entering any key then how can I create the file .key?

I tried to use the self.signed.p12 certificate with key TEST the I used

openssl genrsa -des3 -out self.signed.key 2048

And enter TEST
But didn’t work with me


问:
behaviour of char to ASCII code conversion
I know that char can be converted to int simply assigning it to an int variable or by explicit casting, but I can't figure it out the behaviour of this code:

```<code>char tmp;

tmp = 'A' + 'A';

cout << (int) 'A' + 'A' << endl; //Prints 130

cout << (int) tmp << endl; //Prints -126

cout << tmp; //Prints �
</code>```

According to this ASCII table I was expecting the cout << (int) tmp; line to print 130 just like the line before, but it prints -126 instead.
Also it doesn't print the é character which I find in the table, but it prints � instead.

It is because we've "landed" in the extended ASCII part of the table? Am I missing anythin else here?

Body:
I know that char can be converted to int simply assigning it to an int variable or by explicit casting, but I can't figure it out the behaviour of this code:

char tmp;

tmp = 'A' + 'A';

cout << (int) 'A' + 'A' << endl; //Prints 130

cout << (int) tmp << endl; //Prints -126

cout << tmp; //Prints �

According to this ASCII table I was expecting the cout << (int) tmp; line to print 130 just like the line before, but it prints -126 instead.
Also it doesn't print the é character which I find in the table, but it prints � instead.

It is because we've "landed" in the extended ASCII part of the table? Am I missing anythin else here?


问:
LottieAnimation with compose not restarting when the animation is changed
I have currently building a Composable-component with an animation that should change based on some state delivered from the ViewModel as a Flow. For the animation I am using LottieCompose v.5.2.0.

My requirements are that the running animation should run indefinite, and when the animation is swapped the new one starts from the beginning.

My problem now is that when the animation is changed the new animation seems to inherit the progress from the previous animation.

```<code>{
    val composition by rememberLottieComposition(spec = LottieCompositionSpec.Asset(state.animation))

    LottieAnimation(
        composition = composition,
        restartOnPlay = true,
        iterations = LottieConstants.IterateForever,
    )
}
</code>```

state.animation is a string that is referencing to a animation-asset.

From the source-code I can see that this logic beneath is applied, so with that in mind I assumed that the animation would restart whenever I swapped out the animation.

```<code>{
    if (isPlaying && !wasPlaying && restartOnPlay) {
        animatable.resetToBeginning()
    }

</code>```

Any help is much appreciated.

Body:
I have currently building a Composable-component with an animation that should change based on some state delivered from the ViewModel as a Flow. For the animation I am using LottieCompose v.5.2.0.

My requirements are that the running animation should run indefinite, and when the animation is swapped the new one starts from the beginning.

My problem now is that when the animation is changed the new animation seems to inherit the progress from the previous animation.

{
    val composition by rememberLottieComposition(spec = LottieCompositionSpec.Asset(state.animation))

    LottieAnimation(
        composition = composition,
        restartOnPlay = true,
        iterations = LottieConstants.IterateForever,
    )
}

state.animation is a string that is referencing to a animation-asset.

From the source-code I can see that this logic beneath is applied, so with that in mind I assumed that the animation would restart whenever I swapped out the animation.

{
    if (isPlaying && !wasPlaying && restartOnPlay) {
        animatable.resetToBeginning()
    }

Any help is much appreciated.


问:
useSubscription skip some of new data
I have a state and useSubscription like code below :

```<code>  const [liveOrderData, setLiveOrderData] = useState(null)

  useSubscription(traderSubscriptions.FIND_LIVE_ORDER_UPDATES, {
    variables: { ...myVariables },

    onData: (res) => {
      setLiveOrderData(res.data.data.findLiveOrderUpdates)
    }
  })
</code>```

but when i try logging result in useEffect I don't get all the results that has been logged in Apollo Studio !

```<code>  useEffect(() => {
    console.log(liveOrderData)
  }, [liveOrderData])
</code>```

usually after each mutation call 5 new data gets logged in Apollo Studio but I only get 3 of them in Client.

Title: useSubscription skip some of new data

Body:
I have a state and useSubscription like code below :

  const [liveOrderData, setLiveOrderData] = useState(null)

  useSubscription(traderSubscriptions.FIND_LIVE_ORDER_UPDATES, {
    variables: { ...myVariables },

    onData: (res) => {
      setLiveOrderData(res.data.data.findLiveOrderUpdates)
    }
  })

but when i try logging result in useEffect I don't get all the results that has been logged in Apollo Studio !

  useEffect(() => {
    console.log(liveOrderData)
  }, [liveOrderData])

usually after each mutation call 5 new data gets logged in Apollo Studio but I only get 3 of them in Client.


问:
Trying to implement Brainshop.ai's wechat into google sites
I have tried using the widget but this didn't seem to work. I also tried using '  ' before the widget but that didn't work either. Any help?

I tried putting '  ' before. I expected that was the problem but i was wrong.


问:
How to set up multiple residential proxies using a Raspberry Pi with Squid
I recently followed the guide as shown below on how to create residential proxy using a Raspberry Pi with Squid. Guide

I set it up, and it works well, but I want to scale up and was wondering how to set up lets say a block of 10 Public IPs (from ISP’s business plan) into a set of 10 proxies on just 1 Pi device instead of repating this guide 10 times on 10 Pi devices.

Is this doable?

I am not sure if it's the right direction, but I thought I need to first assign multiple IPs on 1 device as a start.  I went to router setting and tried to assign multiple plubic IPs on 1 Pi, but I got error.

Is this the right direction?


问:
How to clear the SSL state in modern Chrome and Fire Fox browser
I need to clear the SSL state when the user clicks logout, I see some older method like

```<code>document.execCommand("ClearAuthenticationCache", false);
</code>```

and

```<code>window.crypto.logout();
</code>```

But when I use this in the modern browser it is not working.

So how to achieve this functionality in modern browser

Any suggestion is appreciated.

Body:
I need to clear the SSL state when the user clicks logout, I see some older method like

document.execCommand("ClearAuthenticationCache", false);

and

window.crypto.logout();

But when I use this in the modern browser it is not working.

So how to achieve this functionality in modern browser

Any suggestion is appreciated.


问:
How can we use Mapbox JS to filter unclassified raster using image service?
I want to filter the unclassified raster using image services based on the Legend Value of Raster(Image Service)

I have tried the map.setFilter to filter the class value (Legend) of the raster using image service. But, it's not working properly.


问:
fitsSystemWindows=true cracks select dropdown design in Android WebView
When I set fitsSystemWindows to true, dividers of select tag's options becomes weird like below screenshot.

My code is simple. From default new project...

MainActivity.kt

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)

    findViewById<WebView>(R.id.web_view).apply {
        loadData("""

                    <meta charset="utf-8">
                    <meta name="viewport" content="width=device-width,initial-scale=1">
                    <title>Sandbox</title>

                    <select>
                        <option value="Red">Red</option>
                        <option value="Blue">Blue</option>
                        <option value="Black">Black</option>
                        <option value="Green">Green</option>
                        <option value="Yellow">Yellow</option>
                    </select>

        """.trimIndent(), "text/html", "utf-8")
    }
}
```
<p><strong>themes.xml</strong></p>
<pre class="lang-xml prettyprint-override"><code>(others are default values)
<item name="android:fitsSystemWindows">true</item>
</code>```

The only fitsSystemWindows=true makes difference.

PS 1. This only happens on tablet, since phone shows dialog instead of dropdown.

PS 2. I tested on WebView both versions of 97, 99 and 108(which is latest).

Body:
When I set fitsSystemWindows to true, dividers of select tag's options becomes weird like below screenshot.

My code is simple. From default new project...

MainActivity.kt

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_main)

    findViewById<WebView>(R.id.web_view).apply {
        loadData("""

                    <meta charset="utf-8">
                    <meta name="viewport" content="width=device-width,initial-scale=1">
                    <title>Sandbox</title>

                    <select>
                        <option value="Red">Red</option>
                        <option value="Blue">Blue</option>
                        <option value="Black">Black</option>
                        <option value="Green">Green</option>
                        <option value="Yellow">Yellow</option>
                    </select>

        """.trimIndent(), "text/html", "utf-8")
    }
}

themes.xml

(others are default values)
<item name="android:fitsSystemWindows">true</item>

The only fitsSystemWindows=true makes difference.

PS 1. This only happens on tablet, since phone shows dialog instead of dropdown.

PS 2. I tested on WebView both versions of 97, 99 and 108(which is latest).


问:
DockerHub builds on Slack notification
How can I add dockerhub repo builds trigger on slack notification?

I have tried from link https://docs.docker.com/docker-hub/slack_integration/
but my docker hub page don't have slack integration feature.

Title: DockerHub builds on Slack notification


问:
How to make s3fuse audit logs?
On our ubuntu server we have mounted an S3 object storage using s3fs. As Scaleway does not have native logging of their s3 object storage, we would like to do the logging on the ubuntu server instead. Does anyone have experience doing this, and thus can recommend how this is best done?

In short we would like to log the following for each user:

Which files have they read from the s3 storage

Title: How to make s3fuse audit logs?


问:
Python IRC Bot Non-Responsive
First a bit of code.

```<code>#!/usr/bin/env python
import sys
import socket
import string

HOST='irc.ircnetworkbotison.net' #The server we want to connect to
PORT=6666 #The connection port which is usually 6667
NICK='RandomBot' #The bot's nickname
IDENT='RandomBot'
REALNAME='Random Bot'
OWNER='RandomBot' #The bot owner's nick
CHAN='#botchannel' #The default channel for the bot
readbuffer='' #Here we store all the messages from server

s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) #Create the socket
s.connect((HOST, PORT)) #Connect to server
s.send('USER '+IDENT+' 0 * :'+REALNAME+'\r\n') #Identify to server
s.send('NICK '+NICK+'\r\n') #Send the nick to server
s.send('JOIN '+CHAN+'\r\n')
s.send('PRIVMSG '+CHAN+' :The Tutor is here. Lesson\'s may begin.'+'\r\n')
</code>```

I've got two functions. One that Parses PRIVMSG, and one that greets new users.
The problem is here:

```<code>while True:
    try:
        line=s.recv(4096)
    except:
        break
    #Yes, I'm aware I'm not buffering input
    #readbuffer=readbuffer+s.recv(4096)
    #temp=string.split(readbuffer, "\n")
    #readbuffer=temp.pop( )
    #for line in temp:
    if not line:
        break
    line=string.rstrip(line)
    print line+'\r\n'
    if line.find('PRIVMSG')!=-1: #Call a parsing function
        parsemsg(line)
        continue
    if line.find('JOIN')!=-1: #Call a parsing function
        greetmsg(line)
        continue
    if line.find('PING') !=-1: #If server pings then pong
        line=string.split(line," ")
        s.send('PONG '+line[1]+'\r\n')
        print "PONG "+line[1]+'\r\n'
    #line=None

s.close()
</code>```

For whatever reason after about an hour or so in IRC, the bot will stop responding or registering any messages. The only work around I've found thus far is to open up a private dialog with the bot, message it a command, and then go back to main chat. At which point it will function normally again for about another hour.

The question(s):

Why does it timeout the way it does?

How do I make it stop?

Title: Python IRC Bot Non-Responsive

Body:
First a bit of code.

#!/usr/bin/env python
import sys
import socket
import string

HOST='irc.ircnetworkbotison.net' #The server we want to connect to
PORT=6666 #The connection port which is usually 6667
NICK='RandomBot' #The bot's nickname
IDENT='RandomBot'
REALNAME='Random Bot'
OWNER='RandomBot' #The bot owner's nick
CHAN='#botchannel' #The default channel for the bot
readbuffer='' #Here we store all the messages from server

s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) #Create the socket
s.connect((HOST, PORT)) #Connect to server
s.send('USER '+IDENT+' 0 * :'+REALNAME+'\r\n') #Identify to server
s.send('NICK '+NICK+'\r\n') #Send the nick to server
s.send('JOIN '+CHAN+'\r\n')
s.send('PRIVMSG '+CHAN+' :The Tutor is here. Lesson\'s may begin.'+'\r\n')

I've got two functions. One that Parses PRIVMSG, and one that greets new users.
The problem is here:

while True:
    try:
        line=s.recv(4096)
    except:
        break
    #Yes, I'm aware I'm not buffering input
    #readbuffer=readbuffer+s.recv(4096)
    #temp=string.split(readbuffer, "\n")
    #readbuffer=temp.pop( )
    #for line in temp:
    if not line:
        break
    line=string.rstrip(line)
    print line+'\r\n'
    if line.find('PRIVMSG')!=-1: #Call a parsing function
        parsemsg(line)
        continue
    if line.find('JOIN')!=-1: #Call a parsing function
        greetmsg(line)
        continue
    if line.find('PING') !=-1: #If server pings then pong
        line=string.split(line," ")
        s.send('PONG '+line[1]+'\r\n')
        print "PONG "+line[1]+'\r\n'
    #line=None

s.close()

For whatever reason after about an hour or so in IRC, the bot will stop responding or registering any messages. The only work around I've found thus far is to open up a private dialog with the bot, message it a command, and then go back to main chat. At which point it will function normally again for about another hour.

The question(s):

Why does it timeout the way it does?

How do I make it stop?


问:
Unable to upload my application to Meta Quest (App Lab)
I developed an app and wanted to upload it to the facebook Quest(App Lab) platform, but I tried many methods and failed to upload it

Here's what I've tried and failed

The upload button in the app is grayed out, and the MQDH cannot be uploaded

Using the drag and drop upload function of the latest version of MQDH, it prompts that the CLI tool does not exist or has no permission

Using the ovr-platform-util command line upload method, it prompts "An unexpected error occurred"

Here is the log content:

Server log: {
    "app_id": 8618231871550973,
    "client": "COMMAND_LINE",
    "log_level": "ERROR",
    "event_name": "UNEXPECTED_ERROR",
    "stack_trace": "RangeError [ERR_OUT_OF_RANGE]: The value of \"offset\" is out of range. It must be >= 0 and <= 1. Received 2\n    at new NodeError (node:internal/errors:371:5)\n    at boundsError (node:internal/buffer:86:9)\n    at Buffer.readUInt16LE (node:internal/buffer:243:5)\n    at /snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js\n    at Object.set extra [as extra] (/snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js)\n    at p (/snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js)\n    at Object.get entries [as entries] (/snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js)\n    at Object.getEntries (/snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js)\n    at /snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js\n    at /snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js",
    "extra": "{\"caught\":true,\"os\":\"{\\\"platform\\\":\\\"darwin\\\",\\\"arch\\\":\\\"x64\\\",\\\"type\\\":\\\"Darwin\\\"}\",\"cli_version\":\"1.81.0.000001\",\"compatibility_version\":2,\"session_id\":\"8618231871550973_2022-12-13T07:26:42.217Z\",\"command\":\"upload-quest-build\",\"app_id\":8618231871550973,\"platform\":\"ANDROID_6DOF\"}",
    "platform": "ANDROID_6DOF",
    "cli_version": "1.81.0.000001",
    "session_id": "8618231871550973_2022-12-13T07:26:42.217Z",
    "binary_id": ""
}
Server log: {
    "app_id": 8618231871550973,
    "client": "COMMAND_LINE",
    "log_level": "DEBUG",
    "event_name": "COMMAND_FAILED",
    "stack_trace": "at Object._log (/snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js)\nat Object.debug (/snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js)\nat /snapshot/Users/facebook/.scratch/dataZsandcastleZboxesZeden-trunk-hg-full-fbsource/edenfsZredirectionsZarvrZjsZtemp/build-ovr-platform-util/lib/ovr_platform_util.js\nat processTicksAndRejections (node:internal/process/task_queues:96:5)",
    "extra": "{\"code\":\"ERR_OUT_OF_RANGE\",\"os\":\"{\\\"platform\\\":\\\"darwin\\\",\\\"arch\\\":\\\"x64\\\",\\\"type\\\":\\\"Darwin\\\"}\",\"cli_version\":\"1.81.0.000001\",\"compatibility_version\":2,\"session_id\":\"8618231871550973_2022-12-13T07:26:42.217Z\",\"command\":\"upload-quest-build\",\"app_id\":8618231871550973,\"platform\":\"ANDROID_6DOF\"}",
    "platform": "ANDROID_6DOF",
    "cli_version": "1.81.0.000001",
    "session_id": "8618231871550973_2022-12-13T07:26:42.217Z",
    "binary_id": ""
}

```


问:
How do I manage services based on a license in my API Gateway ( Microservices NodeJs )
I'm trying to create a microservices web service with nodejs, and what I need to do is manage the services based on subscription type, it will be like a license file in my gateway api and it will manage the services, for example depending on the subscription, the user will have serviceA and serviceB, in this case I only have to activate these two services..
Am I in the right way? if so how to do it, or if there is any documentation or something i will be grateful.


问:
CoinMarketCapApi get all coins with their logos
I want to display a list of all cryptocurrencies with their logos.
I tried to call CoinMarketCap API to get these informations.
I found this endpoint /v1/cryptocurrency/listings/latest that return all coins but without logos.
https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyListingsLatest

There is another endpoint /v2/cryptocurrency/info that return the logo, but not for all coins.
I should specify a list of coins to get their logos.
https://coinmarketcap.com/api/documentation/v1/#operation/getV2CryptocurrencyInfo

I think that getting all coins from the first endpoint, and pass them as parameters in the second endpoint is not a good idea.

My questions are:
is there another way to get coins with their logo without making two API calls?
is the CoinMarketCap API, the best api to get these informations or I should search for another API?


问:
Sending a string to REACT server from a client in python. How can I send a String from python to a React server?
I already send String to a server with Sockect library in python but I would like to try and send it to a React Server

this is the client code in python

```<code>from email import message
from http import client
import socket

HEADER = 64
PORT = 5050
FORMAT = 'utf-8'
DISCONNECT_MESSAGE= "!DISCONNECT"
SERVER = socket.gethostbyname(socket.gethostname())
ADDR= (SERVER, PORT)

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(ADDR)
# listmsg=[1,2,3,4]
# listmsg = str(listmsg)
def send(msg):
    message = msg.encode(FORMAT)
    msg_length = len(message)
    send_length = str(msg_length).encode(FORMAT)
    send_length += b' ' * (HEADER - len(send_length))
    client.send(send_length)
    client.send(message)
# send(listmsg)

#send(DISCONNECT_MESSAGE)
</code>```

Body:
I already send String to a server with Sockect library in python but I would like to try and send it to a React Server

this is the client code in python

from email import message
from http import client
import socket

HEADER = 64
PORT = 5050
FORMAT = 'utf-8'
DISCONNECT_MESSAGE= "!DISCONNECT"
SERVER = socket.gethostbyname(socket.gethostname())
ADDR= (SERVER, PORT)

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(ADDR)
# listmsg=[1,2,3,4]
# listmsg = str(listmsg)
def send(msg):
    message = msg.encode(FORMAT)
    msg_length = len(message)
    send_length = str(msg_length).encode(FORMAT)
    send_length += b' ' * (HEADER - len(send_length))
    client.send(send_length)
    client.send(message)
# send(listmsg)

#send(DISCONNECT_MESSAGE)


问:
Detect command line misentries in Ansible terminal plugin
We've created a custom terminal_plugin for Ansible to be able to support our storage devices. Although it's working as expected for correctly typed commands, it's having issues when a command is being misentered. We would prefer to handle command line misentries as errors, because the storage device will start the new prompt with the misentered command.

We're currently using the following regular expressions as terminal_stdout_re and terminal_stderr_re:

terminal_stdout_re = [
    re.compile(br"[\r\n]?.+>(?:\s*)$"),
    re.compile(br"[\r\n]?.+>(?:\s*.*)$"),
]

terminal_stderr_re = [
    re.compile(br"\^"),
    re.compile(br"error:", re.I),
]
```
<p>Example of a command line misentry on the storage device:</p>
```admin:/>add part
             ^
port               port_group

admin:/>add part
```

Even though we've included the \^ expression in the terminal_stderr_re list, it's not detecting the command line misentry as an error. Any idea what's going wrong?

Body:
We've created a custom terminal_plugin for Ansible to be able to support our storage devices. Although it's working as expected for correctly typed commands, it's having issues when a command is being misentered. We would prefer to handle command line misentries as errors, because the storage device will start the new prompt with the misentered command.

We're currently using the following regular expressions as terminal_stdout_re and terminal_stderr_re:

terminal_stdout_re = [
    re.compile(br"[\r\n]?.+>(?:\s*)$"),
    re.compile(br"[\r\n]?.+>(?:\s*.*)$"),
]

terminal_stderr_re = [
    re.compile(br"\^"),
    re.compile(br"error:", re.I),
]

Example of a command line misentry on the storage device:

admin:/>add part
             ^
port               port_group

admin:/>add part

Even though we've included the \^ expression in the terminal_stderr_re list, it's not detecting the command line misentry as an error. Any idea what's going wrong?


问:
Mikro-ORM relation to table without entity
I have very weird case to deal with.

I have NestJs microservice which handles 3 entities related to each other.

In database there're bunch of other tables generated by other entities from other microservices (I don't have access on their codebase).

The problem is that, one of my entities is related to other table from other microservice, is there any way to create a relation between my entity and table property?

My entities: user.entity.ts:

```<code>@Entity({ tableName: 'users' })
export class UserEntity {
    @PrimaryKey()
    id: number;

    @Property()
    firstName: string;

    @Property()
    companyId: number;

    ...
}
</code>```

I need to make a relation between user.companyId and companies.id, but I don't have entity for Companies, it's from another project.

Any ideas?

Body:
I have very weird case to deal with.

I have NestJs microservice which handles 3 entities related to each other.

In database there're bunch of other tables generated by other entities from other microservices (I don't have access on their codebase).

The problem is that, one of my entities is related to other table from other microservice, is there any way to create a relation between my entity and table property?

My entities: user.entity.ts:

@Entity({ tableName: 'users' })
export class UserEntity {
    @PrimaryKey()
    id: number;

    @Property()
    firstName: string;

    @Property()
    companyId: number;

    ...
}

I need to make a relation between user.companyId and companies.id, but I don't have entity for Companies, it's from another project.

Any ideas?


问:
Repainting script even after using barstate.isconfirmed
Below script is firing multiple alerts and I have tried using barstate.isconfirmed but still firing sometimes up to 6 alerts together. I am a beginner to this.

```<code>//@version=5
strategy('STG1', overlay=true, calc_on_order_fills = true)
start = timestamp(2022, 12,01,0, 0)
end = timestamp(2022, 12,30,0, 0)
length = input(title='Length', defval=1)
phase = input(title='Phase', defval=50)
power = input(title='Power', defval=2)
src = input(title='Source', defval=close)
highlightMovements = input.bool(title='Highlight Movements ?', defval=true)
phaseRatio = phase < -100 ? 0.45 : phase > 100 ? 2.5 : phase / 100 + 1.5
beta = 0.45 * (length - 1) / (0.5 * (length - 1) + 2)
alpha = math.pow(beta, power)
jma = 0.0
e0 = 0.0
e0 := (1 - alpha) * src + alpha * nz(e0[1])
e1 = 0.0
e1 := (src - e0) * (1 - beta) + beta * nz(e1[1])
e2 = 0.0
e2 := (e0 + phaseRatio * e1 - nz(jma[1])) * math.pow(1 - alpha, 2) + math.pow(alpha, 2) * nz(e2[1])
jma := e2 + nz(jma[1])

jmaColor = highlightMovements ? (jma > jma[1] ? color.green : color.red) : #e615e6

EnterLong = jma > jma[1]  and strategy.opentrades == 0
ExitLong = jma < jma[1]  and strategy.opentrades > 0
EnterShort = jma < jma[1] and strategy.opentrades == 0
ExitShort = jma > jma[1] and strategy.opentrades > 0

if time >= start and time < end
    strategy.entry('Long', strategy.long, 1, when=EnterLong and barstate.isconfirmed, comment= 'LE')
    strategy.close('Long', when=ExitLong and barstate.isconfirmed, comment= 'LX')
    strategy.entry('short', strategy.short, 1, when=EnterShort and barstate.isconfirmed, comment= 'SE' )
    strategy.close('short', when=ExitShort and barstate.isconfirmed, comment='SX')
</code>```

I have tried barstate.isconfirmed in declaration as well as long and short entry position but it still firing multiple alerts to my trading platform within a fraction of seconds.

Body:
Below script is firing multiple alerts and I have tried using barstate.isconfirmed but still firing sometimes up to 6 alerts together. I am a beginner to this.

//@version=5
strategy('STG1', overlay=true, calc_on_order_fills = true)
start = timestamp(2022, 12,01,0, 0)
end = timestamp(2022, 12,30,0, 0)
length = input(title='Length', defval=1)
phase = input(title='Phase', defval=50)
power = input(title='Power', defval=2)
src = input(title='Source', defval=close)
highlightMovements = input.bool(title='Highlight Movements ?', defval=true)
phaseRatio = phase < -100 ? 0.45 : phase > 100 ? 2.5 : phase / 100 + 1.5
beta = 0.45 * (length - 1) / (0.5 * (length - 1) + 2)
alpha = math.pow(beta, power)
jma = 0.0
e0 = 0.0
e0 := (1 - alpha) * src + alpha * nz(e0[1])
e1 = 0.0
e1 := (src - e0) * (1 - beta) + beta * nz(e1[1])
e2 = 0.0
e2 := (e0 + phaseRatio * e1 - nz(jma[1])) * math.pow(1 - alpha, 2) + math.pow(alpha, 2) * nz(e2[1])
jma := e2 + nz(jma[1])

jmaColor = highlightMovements ? (jma > jma[1] ? color.green : color.red) : #e615e6

EnterLong = jma > jma[1]  and strategy.opentrades == 0
ExitLong = jma < jma[1]  and strategy.opentrades > 0
EnterShort = jma < jma[1] and strategy.opentrades == 0
ExitShort = jma > jma[1] and strategy.opentrades > 0

if time >= start and time < end
    strategy.entry('Long', strategy.long, 1, when=EnterLong and barstate.isconfirmed, comment= 'LE')
    strategy.close('Long', when=ExitLong and barstate.isconfirmed, comment= 'LX')
    strategy.entry('short', strategy.short, 1, when=EnterShort and barstate.isconfirmed, comment= 'SE' )
    strategy.close('short', when=ExitShort and barstate.isconfirmed, comment='SX')

I have tried barstate.isconfirmed in declaration as well as long and short entry position but it still firing multiple alerts to my trading platform within a fraction of seconds.


问:
How to close program from python script
(Sorry for my English)
I am making simple program to manage other programs. I can open scripts using

```<code>os.startfile(self.path)
</code>```

But I anyways can't close my program. I tried many ways, but still can't do it.
I even tried `

```<code>subprocess.call("TASKKILL /F /IM firefox.exe", shell=True)
</code>```

` but it closes only exe files, i also need to close py files

For example, i have program named 'notion.exe' and i can open it using

```<code>os.startfile('notion.exe')
</code>```

Now, i want to close it using script 'handler.py', but i didn't find os method that closes file.
Can anyone tell me which library may I use to close 'notion.exe'?

Title: How to close program from python script

Body:
(Sorry for my English)
I am making simple program to manage other programs. I can open scripts using

os.startfile(self.path)

But I anyways can't close my program. I tried many ways, but still can't do it.
I even tried `

subprocess.call("TASKKILL /F /IM firefox.exe", shell=True)

` but it closes only exe files, i also need to close py files

For example, i have program named 'notion.exe' and i can open it using

os.startfile('notion.exe')

Now, i want to close it using script 'handler.py', but i didn't find os method that closes file.
Can anyone tell me which library may I use to close 'notion.exe'?


问:
Log config is not working with NLog 5 in Avalonia Android
Recently I update NLog version from 4 to 5 and I have an issue now.

Originally I put my NLog.config in asset folder and NLog would auto scan and load it.

But after I upgrade to 5 and follow the way in the document, it's not working anymore.

I set my NLog.config to be embedded resource and call LogManager.Setup().LoadConfigurationFromAssemblyResource(typeof(MainActivity).GetTypeInfo().Assembly); in OnCreate()

How do I make it work correctly?


问:
i18n legacy-migrate missing IDs in mapping
I am in the middle of migrating a bunch of angular apps from v11 to v14/15, but I hit a problem when running ng extract-i18n --format=legacy-migrate (with enableI18nLegacyMessageIdFormat=true in tsconfig) to migrate the legacy i18n IDs.

A lot of tags with the i18n attribute are missing from the generated messages.json file containing the mapping of the old and new IDs.

E.g in one of my modals if have

Terms & Conditions
 which is getting mapped, but a few lines lower I got

All content included on this site, ...
 which is not getting mapped for some reason.

In my message.xlf I see that all some strings are pointing to .ts file some to the .html, seemingly without any logic I can makke out.

<context context-type="sourcefile">src/app/view/shared/item-actions/item-actions.component.ts</context>

Also I realize that I cannot have line-breaks or nested tags in the to-translate string, else the command skips it as well.

Anyone knows how to resolve the issue ?


问:
Combine two video and get new output in flutter app
I want to combine two videos that user uploads from gallery and combine them as one in flutter app, Can anyone help me in this issue?

I tried FFmpeg and FFmpeg cli but both of the packages doesn't have complete implementation for this issue.


问:
I want to konw how to use DTrace module to trace "D_BEST_MODE and D_MODE_COST" channel in Versital Video Coding
I have read the dtrace_next.h file in VTM10 and wrote the configuration command according to the manual, but it doesn't work,The command in debug mode is as follows

```<code>-c encoder_randomaccess_vtm.cfg -c RaceHorses.cfg --InputFile=RaceHorses_416x240_30.yuv --TraceFile=EncTrace.txt --TraceRule=D_BEST_MODE,D_MODE_COST:poc>=0,poc>=0 >out.txt
</code>```

the process is running successfully ,but there is nothing in the EncTrace.txt file.

is there anyone know how to figure out?

the channel with "D_BLOCK_STATISTICS_ALL" is works, the command as follows:

```<code>EncoderApp.exe -c encoder_randomaccess_vtm.cfg -c RaceHorses.cfg --InputFile=RaceHorses_416x240_30.yuv --TraceFile="ppap.vtmbmsstats" --TraceRule="D_BLOCK_STATISTICS_ALL:poc>=0" >out.txt
</code>```

the content in "ppap.vtmbmsstats"

Body:
I have read the dtrace_next.h file in VTM10 and wrote the configuration command according to the manual, but it doesn't work,The command in debug mode is as follows

-c encoder_randomaccess_vtm.cfg -c RaceHorses.cfg --InputFile=RaceHorses_416x240_30.yuv --TraceFile=EncTrace.txt --TraceRule=D_BEST_MODE,D_MODE_COST:poc>=0,poc>=0 >out.txt

the process is running successfully ,but there is nothing in the EncTrace.txt file.

is there anyone know how to figure out?

the channel with "D_BLOCK_STATISTICS_ALL" is works, the command as follows:

EncoderApp.exe -c encoder_randomaccess_vtm.cfg -c RaceHorses.cfg --InputFile=RaceHorses_416x240_30.yuv --TraceFile="ppap.vtmbmsstats" --TraceRule="D_BLOCK_STATISTICS_ALL:poc>=0" >out.txt

the content in "ppap.vtmbmsstats"


问:
attempting to "change source" via "edit links"
attempting to "change source" via "edit links".... i am able to select a file via "change source" without getting an error prompt.

however, the linked file name does not change.... in other words, the linked file never changes...

issue started today as i frequently "change source".

after running in to this issue, i successfully "change source" on another file...

not sure what the issue is with the file in question


问:
taking mean in trees predictions
How to change class vote in tree_vote from taking the majority to taking mean (average) in trees predictions?</p>
```<code>def tree_vote(forest, data):

    # add all predictions in the list
    predictions = []
    for tree in forest:
        predictions.append(predict(data, tree))

    # create the list of predictions for each object
    predictions_per_object = list(zip(*predictions))

    # The final prediction for each object is the one voted for by the majority of the trees
    voted_predictions = []
    for obj in predictions_per_object:
        voted_predictions.append(max(set(obj), key=obj.count))
    return voted_predictions

train_answers = tree_vote(my_forest_1, train_data)
test_answers = tree_vote(my_forest_1, test_data)
</code>```

Title: taking mean in trees predictions

Body:
How to change class vote in tree_vote from taking the majority to taking mean (average) in trees predictions?

def tree_vote(forest, data):

    # add all predictions in the list
    predictions = []
    for tree in forest:
        predictions.append(predict(data, tree))

    # create the list of predictions for each object
    predictions_per_object = list(zip(*predictions))

    # The final prediction for each object is the one voted for by the majority of the trees
    voted_predictions = []
    for obj in predictions_per_object:
        voted_predictions.append(max(set(obj), key=obj.count))
    return voted_predictions

train_answers = tree_vote(my_forest_1, train_data)
test_answers = tree_vote(my_forest_1, test_data)


问:
my mui dataTable in not responsive yet iam using FLEX 1;
```<code>const columns = [
    { field: 'id', headerName: 'ID',  },
    {
      field: 'moduleName',
      headerName: 'Module Name',
      flex: 1,
      editable: false,
      sortable: false,
      filter: false,
      hideable: false
    },
    {
      field: 'moduleCode',
      headerName: 'Module Code',
      flex:1,
      align: "left",
      editable: false,
      sortable: false,
    },
    {
      field: 'moduleType',
      headerName: 'Module Type',
      type: 'number',
      flex: 1,
      sortable: false,
      editable: false,
      align: "left",
      headerAlign: 'left'
    },
    {
      field: 'yearOfStudy',
      headerName: 'Year of Study',
      type: 'number',
      flrx: 1,
      sortable: false,
      editable: false,
      align: "left",
      headerAlign: 'left'
    },
    {
      field: 'program',
      headerName: 'program',
      type: 'number',
      flex: 1,
      sortable: false,
      editable: false,
      align: "left",
      headerAlign: 'left'
    },
    {
      field: 'programCode',
      headerName: 'Program Code',
      type: 'number',
      flex: 1,
      sortable: false,
      editable: false,
      align: "left",
      headerAlign: 'left'
    },

  ];
</code>```

this is how it looks on the pc

enter image description here

now this is on mobile it is not responsive

enter image description here this mobile it is not responsive

mui datagrid by setting columns to

flex it is not responsive on mobiles phones it is just truncating the text instead of flex

Body:
const columns = [
    { field: 'id', headerName: 'ID',  },
    {
      field: 'moduleName',
      headerName: 'Module Name',
      flex: 1,
      editable: false,
      sortable: false,
      filter: false,
      hideable: false
    },
    {
      field: 'moduleCode',
      headerName: 'Module Code',
      flex:1,
      align: "left",
      editable: false,
      sortable: false,
    },
    {
      field: 'moduleType',
      headerName: 'Module Type',
      type: 'number',
      flex: 1,
      sortable: false,
      editable: false,
      align: "left",
      headerAlign: 'left'
    },
    {
      field: 'yearOfStudy',
      headerName: 'Year of Study',
      type: 'number',
      flrx: 1,
      sortable: false,
      editable: false,
      align: "left",
      headerAlign: 'left'
    },
    {
      field: 'program',
      headerName: 'program',
      type: 'number',
      flex: 1,
      sortable: false,
      editable: false,
      align: "left",
      headerAlign: 'left'
    },
    {
      field: 'programCode',
      headerName: 'Program Code',
      type: 'number',
      flex: 1,
      sortable: false,
      editable: false,
      align: "left",
      headerAlign: 'left'
    },

  ];

this is how it looks on the pc

enter image description here

now this is on mobile it is not responsive

enter image description here this mobile it is not responsive

mui datagrid by setting columns to

flex it is not responsive on mobiles phones it is just truncating the text instead of flex