问:
Exception in server initialization. FusekiConfigException. Failed to create directory
I was trying to open Jena Fuseki through cmd and it throw the exception, but said the server is running in the server. But in the localhost port 3030 it showed 503 Service unavailable error.

503 error image

In the video I watched in Jena Fuseki downloading and running it has stated to create a "data" folder. I tried starting the server both after creating and without creating the 'data' folder.

```<code>C:\Program Files\Fuseki>fuseki-server --update --mem /ds
16:27:57 INFO  Server          :: Apache Jena Fuseki 4.6.1
16:27:57 INFO  Config          :: FUSEKI_HOME=C:\Program Files\Fuseki\.
16:27:57 INFO  Config          :: FUSEKI_BASE=C:\Program Files\Fuseki\run
16:27:57 ERROR Server          :: Exception in server initialization
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: C:\Program Files\Fuseki\run
        at org.apache.jena.fuseki.webapp.FusekiWebapp.ensureDir(FusekiWebapp.java:373) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.FusekiWebapp.formatBaseArea(FusekiWebapp.java:146) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.ShiroEnvironmentLoader.contextInitialized(ShiroEnvironmentLoader.java:48) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.start(Server.java:469) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:121) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:391) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:375) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:102) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) ~[fuseki-server.jar:4.6.1]
16:27:57 WARN  WebAppContext   :: Failed startup of context o.e.j.w.WebAppContext@131fcb6f{Apache Jena Fuseki Server,/,file:///C:/Program%20Files/Fuseki/webapp/,UNAVAILABLE}
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: C:\Program Files\Fuseki\run
        at org.apache.jena.fuseki.webapp.FusekiWebapp.ensureDir(FusekiWebapp.java:373) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.FusekiWebapp.formatBaseArea(FusekiWebapp.java:146) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.ShiroEnvironmentLoader.contextInitialized(ShiroEnvironmentLoader.java:48) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.start(Server.java:469) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:121) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:391) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:375) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:102) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) ~[fuseki-server.jar:4.6.1]
16:27:57 INFO  Server          :: Started 2022/12/25 16:27:57 IST on port 3030
</code>```

I tried to starting the server from another port(4040)

```<code>C:\Program Files\apache-jena-fuseki-4.6.1>fuseki-server --port=4040
16:36:07 INFO  Server          :: Apache Jena Fuseki 4.6.1
16:36:07 INFO  Config          :: FUSEKI_HOME=C:\Program Files\apache-jena-fuseki-4.6.1\.
16:36:07 INFO  Config          :: FUSEKI_BASE=C:\Program Files\apache-jena-fuseki-4.6.1\run
16:36:07 ERROR Server          :: Exception in server initialization
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: C:\Program Files\apache-jena-fuseki-4.6.1\run
        at org.apache.jena.fuseki.webapp.FusekiWebapp.ensureDir(FusekiWebapp.java:373) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.FusekiWebapp.formatBaseArea(FusekiWebapp.java:146) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.ShiroEnvironmentLoader.contextInitialized(ShiroEnvironmentLoader.java:48) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.start(Server.java:469) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:121) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:391) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:375) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:102) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) ~[fuseki-server.jar:4.6.1]
16:36:07 WARN  WebAppContext   :: Failed startup of context o.e.j.w.WebAppContext@131fcb6f{Apache Jena Fuseki Server,/,file:///C:/Program%20Files/apache-jena-fuseki-4.6.1/webapp/,UNAVAILABLE}
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: C:\Program Files\apache-jena-fuseki-4.6.1\run
        at org.apache.jena.fuseki.webapp.FusekiWebapp.ensureDir(FusekiWebapp.java:373) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.FusekiWebapp.formatBaseArea(FusekiWebapp.java:146) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.ShiroEnvironmentLoader.contextInitialized(ShiroEnvironmentLoader.java:48) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.start(Server.java:469) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:121) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:391) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:375) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:102) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) ~[fuseki-server.jar:4.6.1]
16:36:07 INFO  Server          :: Started 2022/12/25 16:36:07 IST on port 4040
</code>```

Body:
I was trying to open Jena Fuseki through cmd and it throw the exception, but said the server is running in the server. But in the localhost port 3030 it showed 503 Service unavailable error.

503 error image

In the video I watched in Jena Fuseki downloading and running it has stated to create a "data" folder. I tried starting the server both after creating and without creating the 'data' folder.

C:\Program Files\Fuseki>fuseki-server --update --mem /ds
16:27:57 INFO  Server          :: Apache Jena Fuseki 4.6.1
16:27:57 INFO  Config          :: FUSEKI_HOME=C:\Program Files\Fuseki\.
16:27:57 INFO  Config          :: FUSEKI_BASE=C:\Program Files\Fuseki\run
16:27:57 ERROR Server          :: Exception in server initialization
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: C:\Program Files\Fuseki\run
        at org.apache.jena.fuseki.webapp.FusekiWebapp.ensureDir(FusekiWebapp.java:373) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.FusekiWebapp.formatBaseArea(FusekiWebapp.java:146) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.ShiroEnvironmentLoader.contextInitialized(ShiroEnvironmentLoader.java:48) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.start(Server.java:469) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:121) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:391) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:375) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:102) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) ~[fuseki-server.jar:4.6.1]
16:27:57 WARN  WebAppContext   :: Failed startup of context o.e.j.w.WebAppContext@131fcb6f{Apache Jena Fuseki Server,/,file:///C:/Program%20Files/Fuseki/webapp/,UNAVAILABLE}
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: C:\Program Files\Fuseki\run
        at org.apache.jena.fuseki.webapp.FusekiWebapp.ensureDir(FusekiWebapp.java:373) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.FusekiWebapp.formatBaseArea(FusekiWebapp.java:146) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.ShiroEnvironmentLoader.contextInitialized(ShiroEnvironmentLoader.java:48) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.start(Server.java:469) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:121) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:391) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:375) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:102) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) ~[fuseki-server.jar:4.6.1]
16:27:57 INFO  Server          :: Started 2022/12/25 16:27:57 IST on port 3030

I tried to starting the server from another port(4040)

C:\Program Files\apache-jena-fuseki-4.6.1>fuseki-server --port=4040
16:36:07 INFO  Server          :: Apache Jena Fuseki 4.6.1
16:36:07 INFO  Config          :: FUSEKI_HOME=C:\Program Files\apache-jena-fuseki-4.6.1\.
16:36:07 INFO  Config          :: FUSEKI_BASE=C:\Program Files\apache-jena-fuseki-4.6.1\run
16:36:07 ERROR Server          :: Exception in server initialization
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: C:\Program Files\apache-jena-fuseki-4.6.1\run
        at org.apache.jena.fuseki.webapp.FusekiWebapp.ensureDir(FusekiWebapp.java:373) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.FusekiWebapp.formatBaseArea(FusekiWebapp.java:146) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.ShiroEnvironmentLoader.contextInitialized(ShiroEnvironmentLoader.java:48) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.start(Server.java:469) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:121) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:391) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:375) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:102) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) ~[fuseki-server.jar:4.6.1]
16:36:07 WARN  WebAppContext   :: Failed startup of context o.e.j.w.WebAppContext@131fcb6f{Apache Jena Fuseki Server,/,file:///C:/Program%20Files/apache-jena-fuseki-4.6.1/webapp/,UNAVAILABLE}
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: C:\Program Files\apache-jena-fuseki-4.6.1\run
        at org.apache.jena.fuseki.webapp.FusekiWebapp.ensureDir(FusekiWebapp.java:373) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.FusekiWebapp.formatBaseArea(FusekiWebapp.java:146) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.webapp.ShiroEnvironmentLoader.contextInitialized(ShiroEnvironmentLoader.java:48) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1043) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:978) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.start(Server.java:469) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.server.Server.doStart(Server.java:414) ~[fuseki-server.jar:4.6.1]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:121) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:391) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:375) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:87) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:56) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:43) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:102) ~[fuseki-server.jar:4.6.1]
        at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67) ~[fuseki-server.jar:4.6.1]
16:36:07 INFO  Server          :: Started 2022/12/25 16:36:07 IST on port 4040


来源: stackexchange

问:
W2ui Grid Adding new empty row and editing all cells one by one
I am adding a new row to the grid and then using grid.editField(newRecId, 1) to edit the cell after the recid (recid is hidden) so that the user can begin to enter data into the new row. I want to be able to allow the user to enter data into the first cell and then, when they press the Enter key, move on to edit the next cell and so on until the last cell. The editField function does not seem to work after the Enter key is pressed. If the new row is added at the top, it moves to the row below, but if it is added at the bottom, it remains in place. I have managed to detect that the key pressed is 'Enter', but I can't seem to move to the second cell. How can I achieve this?</p>
```<code>let grid = new w2grid({
    .....
    .....
    , onChange: function (event) {
        // et the Enter key
        let basilanTus = event.detail.originalEvent.key;

        event.onComplete = function () {
            .....
            .....

            //this is working
            if (basilanTus === 'Enter') {
                grid.editField(recid, 2);
            }
            .....
            .....
        }
    }
    .....
    .....

});

grid.hideColumn('recid');

function addNewEmptyRow() {
    yeniKayit = true;

    const now = new Date();
    const year = now.getFullYear();
    const month = now.getMonth();
    const day = now.getDate();
    const hours = now.getHours();
    const minutes = now.getMinutes();
    const seconds = now.getSeconds();

    let yeniRecId = year + '' + month + '' + day + '' + hours + '' + minutes + '' + seconds;

    let yeniRowJson = {
        recid: yeniRecId
    };

    var columns = grid.columns;

    for (var i = 1; i < columns.length; i++) {

        yeniRowJson[columns[i].field] = ''
    }

    grid.add(yeniRowJson);

    //this is working
    grid.editField(yeniRecId, 1);
}
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I am adding a new row to the grid and then using grid.editField(newRecId, 1) to edit the cell after the recid (recid is hidden) so that the user can begin to enter data into the new row. I want to be able to allow the user to enter data into the first cell and then, when they press the Enter key, move on to edit the next cell and so on until the last cell. The editField function does not seem to work after the Enter key is pressed. If the new row is added at the top, it moves to the row below, but if it is added at the bottom, it remains in place. I have managed to detect that the key pressed is 'Enter', but I can't seem to move to the second cell. How can I achieve this?

let grid = new w2grid({
    .....
    .....
    , onChange: function (event) {
        // et the Enter key
        let basilanTus = event.detail.originalEvent.key;

        event.onComplete = function () {
            .....
            .....

            //this is working
            if (basilanTus === 'Enter') {
                grid.editField(recid, 2);
            }
            .....
            .....
        }
    }
    .....
    .....

});

grid.hideColumn('recid');

function addNewEmptyRow() {
    yeniKayit = true;

    const now = new Date();
    const year = now.getFullYear();
    const month = now.getMonth();
    const day = now.getDate();
    const hours = now.getHours();
    const minutes = now.getMinutes();
    const seconds = now.getSeconds();

    let yeniRecId = year + '' + month + '' + day + '' + hours + '' + minutes + '' + seconds;

    let yeniRowJson = {
        recid: yeniRecId
    };

    var columns = grid.columns;

    for (var i = 1; i < columns.length; i++) {

        yeniRowJson[columns[i].field] = ''
    }

    grid.add(yeniRowJson);

    //this is working
    grid.editField(yeniRecId, 1);
}


问:
Code to get s3 path of tables in Athena database
Hi so there 1000 athena tables whoose s3 path has to be noted.Getting s3 location from ddl for individual tables is a monotonous job. So ,I was looking for a code to get s3 path of the athena table. The tables belong to a specific database in athena.</p>


问:
Multiple Calls to RecyclerView Adapter notifyItemRangeChanged
I have a standard recyclerview that is split up into sections.
For simplicity, let's call them:

Section A

Section B

Section C

When the recyclerview is loaded, I make network requests to fetch data. These network requests are triggered by the user reaching the first item in each section. Meaning, that there aren't three network requests triggered when the recyclerview is loaded, but rather only one.

Once I receive a response with data, I update the recyclerview using the notifyItemRangeChanged method.

When the user scrolls normally, this works flawlessly and I don't see any visible UI issues.

When the user scrolls really fast, from top to bottom, passing all the sections, the UI sometimes freezes all together. When looking at the code and narrowing down the problematic area, I found out that notifyItemRangeChanged is being called three times (as expected) in a very short time interval.

The calls themselves are at most 600 ms apart.

(When I remove the calls to notifyItemRangeChanged, the UI doesn't get stuck)

I understand that calling notifyItemRangeChanged has a costly impact on the UI due to it's inner logic and that is also why I am not calling notifyDataSetChanged.

But since I have not found a viable solution that listens in on when the recyclerview finishes updating the UI, I am wondering what I should be doing.

Nothing relevant or remotely close has come up in my searches.

How can I sync multiple calls to notifyItemRangeChanged? Or should I be using something else?


问:
Error table was mutated after iterator created, although iterator and mutation are on different tables
```<code>error: {ballerina}IteratorMutabilityError {"message":"Table was mutated after the iterator was created"}
        at ballerina.lang.table.0:externNext(internal.bal:42)
           ballerina.lang.table.0.TableIterator:next(internal.bal:39)
           cygni.app.0:solutionPart1(app.bal:88)

</code>```

in code where line 88 is foreach var p in possible

```<code>function solutionPart1() returns int|error {
  int time = 0;
  table<Position> key(x,y) possible = table [];
  possible.add('start);
  while !possible.hasKey([end.x, end.y]) {
    time = time + 1;
    table<Position> key(x,y) next = table [];
    foreach var p in possible {
      next.put({x: p.x, y: p.y});
      next.put({x: p.x + 1, y: p.y});
      next.put({x: p.x - 1, y: p.y});
      next.put({x: p.x, y: p.y + 1});
      next.put({x: p.x, y: p.y - 1});
    }
    var _ = next.removeIfHasKey(['start.x, 'start.y - 1]);
    foreach var w in winds {
      var _ = next.removeIfHasKey(check windAtTime(time, w));
    }
    foreach var r in rocks {
      var _ = next.removeIfHasKey([r.x, r.y]);
    }
    possible = next;
  }
  return time;
}

</code>```

I expect this code to work, or if it is wrong, to blow up immediately. When I put in debug printouts, I see the while loop being executed several times before the error occurs.

I think this is an implementation bug in Ballerina. If not, please explain how to correct this problem.

Body:
error: {ballerina}IteratorMutabilityError {"message":"Table was mutated after the iterator was created"}
        at ballerina.lang.table.0:externNext(internal.bal:42)
           ballerina.lang.table.0.TableIterator:next(internal.bal:39)
           cygni.app.0:solutionPart1(app.bal:88)

in code where line 88 is foreach var p in possible

function solutionPart1() returns int|error {
  int time = 0;
  table<Position> key(x,y) possible = table [];
  possible.add('start);
  while !possible.hasKey([end.x, end.y]) {
    time = time + 1;
    table<Position> key(x,y) next = table [];
    foreach var p in possible {
      next.put({x: p.x, y: p.y});
      next.put({x: p.x + 1, y: p.y});
      next.put({x: p.x - 1, y: p.y});
      next.put({x: p.x, y: p.y + 1});
      next.put({x: p.x, y: p.y - 1});
    }
    var _ = next.removeIfHasKey(['start.x, 'start.y - 1]);
    foreach var w in winds {
      var _ = next.removeIfHasKey(check windAtTime(time, w));
    }
    foreach var r in rocks {
      var _ = next.removeIfHasKey([r.x, r.y]);
    }
    possible = next;
  }
  return time;
}

I expect this code to work, or if it is wrong, to blow up immediately. When I put in debug printouts, I see the while loop being executed several times before the error occurs.

I think this is an implementation bug in Ballerina. If not, please explain how to correct this problem.


问:
I'm trying to run a line of code that imports the function to read a csv file as a functional dataframe but i'm getting an error
I'm trying to load a functional dataset about weather and run the MFPCA method on it.

This is my code:

```<code>from FDApy.misc.loader import read_csv
</code>```

And the error is:

```<code>No module named 'sktime.utils.load_data'
</code>```

Body:
I'm trying to load a functional dataset about weather and run the MFPCA method on it.

This is my code:

from FDApy.misc.loader import read_csv

And the error is:

No module named 'sktime.utils.load_data'


问:
How can I let CMake find an external package?
I tried to build Qv2ray with CMake and Visual Studio on Windows and got the error:

```<code>CMake Error at cmake/backend.cmake:9 (message):
  gRPC Not Found
Call Stack (most recent call first):
  CMakeLists.txt:257 (include)
</code>```

Check backend.cmake:

```<code>find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin)

find_package(gRPC CONFIG QUIET)

# Debian, for example, cannot find gRPC in a proper way.
# This is used as a fallback searching method
if(NOT gRPC_FOUND)
    if(WIN32)
        message(FATAL_ERROR "gRPC Not Found")
    else()
    ......
</code>```

I've built gRPC and installed it to C:\gRPC. How can I let CMake find it?
If I add

```<code>SET(gRPC_DIR "C:/gRPC/lib/cmake/grpc")
</code>```

before find_package, I got this error:

```<code>-- Could NOT find absl (missing: absl_DIR)
CMake Error at cmake/backend.cmake:9 (message):
  gRPC Not Found
Call Stack (most recent call first):
  CMakeLists.txt:257 (include)
</code>```

If I also set absl_DIR, I got another error:

```<code>    Performing C SOURCE FILE Test UV_LINT_NO_UNUSED_PARAMETER failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-ixqh17

Run Build Command(s):C:/ninja/ninja.exe cmTC_cc832 && [1/2] Building C object CMakeFiles\cmTC_cc832.dir\src.c.obj
FAILED: CMakeFiles/cmTC_cc832.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_NO_UNUSED_PARAMETER  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wno-unused-parameter /showIncludes /FoCMakeFiles\cmTC_cc832.dir\src.c.obj /FdCMakeFiles\cmTC_cc832.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-ixqh17\src.c
cl : Command line error D8021 : invalid numeric argument '/Wno-unused-parameter'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test UV_LINT_STRICT_PROTOTYPES failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-ckl2px

Run Build Command(s):C:/ninja/ninja.exe cmTC_54f78 && [1/2] Building C object CMakeFiles\cmTC_54f78.dir\src.c.obj
FAILED: CMakeFiles/cmTC_54f78.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_STRICT_PROTOTYPES  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wstrict-prototypes /showIncludes /FoCMakeFiles\cmTC_54f78.dir\src.c.obj /FdCMakeFiles\cmTC_54f78.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-ckl2px\src.c
cl : Command line error D8021 : invalid numeric argument '/Wstrict-prototypes'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test UV_LINT_EXTRA failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-oz29mu

Run Build Command(s):C:/ninja/ninja.exe cmTC_c075b && [1/2] Building C object CMakeFiles\cmTC_c075b.dir\src.c.obj
FAILED: CMakeFiles/cmTC_c075b.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_EXTRA  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wextra /showIncludes /FoCMakeFiles\cmTC_c075b.dir\src.c.obj /FdCMakeFiles\cmTC_c075b.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-oz29mu\src.c
cl : Command line error D8021 : invalid numeric argument '/Wextra'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-d5iufb

Run Build Command(s):C:/ninja/ninja.exe cmTC_b1e72 && [1/2] Building C object CMakeFiles\cmTC_b1e72.dir\src.c.obj
FAILED: CMakeFiles/cmTC_b1e72.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DCMAKE_HAVE_LIBC_PTHREAD  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_b1e72.dir\src.c.obj /FdCMakeFiles\cmTC_b1e72.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-d5iufb\src.c
C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-d5iufb\src.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

ninja: build stopped: subcommand failed.

Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-cyjamz

Run Build Command(s):C:/ninja/ninja.exe cmTC_863f5 && [1/2] Building C object CMakeFiles\cmTC_863f5.dir\CheckFunctionExists.c.obj

[2/2] Linking C executable cmTC_863f5.exe

FAILED: cmTC_863f5.exe

cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_863f5.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_863f5.dir\CheckFunctionExists.c.obj  /out:cmTC_863f5.exe /implib:cmTC_863f5.lib /pdb:cmTC_863f5.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  pthreads.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_863f5.dir\CheckFunctionExists.c.obj /out:cmTC_863f5.exe /implib:cmTC_863f5.lib /pdb:cmTC_863f5.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console pthreads.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_863f5.dir/intermediate.manifest CMakeFiles\cmTC_863f5.dir/manifest.res" failed (exit code 1104) with the following output:

LINK : fatal error LNK1104: cannot open file 'pthreads.lib'

ninja: build stopped: subcommand failed.

Determining if the function pthread_create exists in the pthread failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-ymkre8

Run Build Command(s):C:/ninja/ninja.exe cmTC_2ac36 && [1/2] Building C object CMakeFiles\cmTC_2ac36.dir\CheckFunctionExists.c.obj

[2/2] Linking C executable cmTC_2ac36.exe

FAILED: cmTC_2ac36.exe

cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_2ac36.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_2ac36.dir\CheckFunctionExists.c.obj  /out:cmTC_2ac36.exe /implib:cmTC_2ac36.lib /pdb:cmTC_2ac36.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  pthread.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_2ac36.dir\CheckFunctionExists.c.obj /out:cmTC_2ac36.exe /implib:cmTC_2ac36.lib /pdb:cmTC_2ac36.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console pthread.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_2ac36.dir/intermediate.manifest CMakeFiles\cmTC_2ac36.dir/manifest.res" failed (exit code 1104) with the following output:

LINK : fatal error LNK1104: cannot open file 'pthread.lib'

ninja: build stopped: subcommand failed.
</code>```

I downloaded pthread-win32, copied pthreadVC2.lib to pthread.lib and added the following line to CMakeLists.txt,

```<code>    set (CMAKE_EXE_LINKER_FLAGS  "/LIBPATH:\"C:\\pthreads-w32-2-9-1-release\\Pre-built.2\\lib\\x64\\\"")

then rebuilt but still got the error:

Performing C SOURCE FILE Test UV_LINT_NO_UNUSED_PARAMETER failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-wqbrhl

Run Build Command(s):C:/ninja/ninja.exe cmTC_7b6af && [1/2] Building C object CMakeFiles\cmTC_7b6af.dir\src.c.obj
FAILED: CMakeFiles/cmTC_7b6af.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_NO_UNUSED_PARAMETER  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wno-unused-parameter /showIncludes /FoCMakeFiles\cmTC_7b6af.dir\src.c.obj /FdCMakeFiles\cmTC_7b6af.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-wqbrhl\src.c
cl : Command line error D8021 : invalid numeric argument '/Wno-unused-parameter'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test UV_LINT_STRICT_PROTOTYPES failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-e8xc9e

Run Build Command(s):C:/ninja/ninja.exe cmTC_f19a7 && [1/2] Building C object CMakeFiles\cmTC_f19a7.dir\src.c.obj
FAILED: CMakeFiles/cmTC_f19a7.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_STRICT_PROTOTYPES  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wstrict-prototypes /showIncludes /FoCMakeFiles\cmTC_f19a7.dir\src.c.obj /FdCMakeFiles\cmTC_f19a7.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-e8xc9e\src.c
cl : Command line error D8021 : invalid numeric argument '/Wstrict-prototypes'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test UV_LINT_EXTRA failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-0dci1s

Run Build Command(s):C:/ninja/ninja.exe cmTC_33837 && [1/2] Building C object CMakeFiles\cmTC_33837.dir\src.c.obj
FAILED: CMakeFiles/cmTC_33837.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_EXTRA  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wextra /showIncludes /FoCMakeFiles\cmTC_33837.dir\src.c.obj /FdCMakeFiles\cmTC_33837.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-0dci1s\src.c
cl : Command line error D8021 : invalid numeric argument '/Wextra'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-fxbu04

Run Build Command(s):C:/ninja/ninja.exe cmTC_79d11 && [1/2] Building C object CMakeFiles\cmTC_79d11.dir\src.c.obj
FAILED: CMakeFiles/cmTC_79d11.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DCMAKE_HAVE_LIBC_PTHREAD  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_79d11.dir\src.c.obj /FdCMakeFiles\cmTC_79d11.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-fxbu04\src.c
C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-fxbu04\src.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

ninja: build stopped: subcommand failed.

Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-nnzju3

Run Build Command(s):C:/ninja/ninja.exe cmTC_1b1f1 && [1/2] Building C object CMakeFiles\cmTC_1b1f1.dir\CheckFunctionExists.c.obj

[2/2] Linking C executable cmTC_1b1f1.exe

FAILED: cmTC_1b1f1.exe

cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_1b1f1.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_1b1f1.dir\CheckFunctionExists.c.obj  /out:cmTC_1b1f1.exe /implib:cmTC_1b1f1.lib /pdb:cmTC_1b1f1.pdb /version:0.0 /LIBPATH:"C:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64\"  /debug /INCREMENTAL /subsystem:console  pthreads.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK: command "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_1b1f1.dir\CheckFunctionExists.c.obj /out:cmTC_1b1f1.exe /implib:cmTC_1b1f1.lib /pdb:cmTC_1b1f1.pdb /version:0.0 /LIBPATH:C:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64"  /debug /INCREMENTAL /subsystem:console  pthreads.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  /MANIFEST /MANIFESTFILE:cmTC_1b1f1.exe.manifest" failed (exit code 1120) with the following output:
CheckFunctionExists.c.obj : error LNK2019: unresolved external symbol pthread_create referenced in function main

cmTC_1b1f1.exe : fatal error LNK1120: 1 unresolved externals

ninja: build stopped: subcommand failed.

Determining if the function pthread_create exists in the pthread failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-4uqkdk

Run Build Command(s):C:/ninja/ninja.exe cmTC_12c03 && [1/2] Building C object CMakeFiles\cmTC_12c03.dir\CheckFunctionExists.c.obj

[2/2] Linking C executable cmTC_12c03.exe

FAILED: cmTC_12c03.exe

cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_12c03.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_12c03.dir\CheckFunctionExists.c.obj  /out:cmTC_12c03.exe /implib:cmTC_12c03.lib /pdb:cmTC_12c03.pdb /version:0.0 /LIBPATH:"C:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64\"  /debug /INCREMENTAL /subsystem:console  pthread.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK: command "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_12c03.dir\CheckFunctionExists.c.obj /out:cmTC_12c03.exe /implib:cmTC_12c03.lib /pdb:cmTC_12c03.pdb /version:0.0 /LIBPATH:C:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64"  /debug /INCREMENTAL /subsystem:console  pthread.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  /MANIFEST /MANIFESTFILE:cmTC_12c03.exe.manifest" failed (exit code 1120) with the following output:
CheckFunctionExists.c.obj : error LNK2019: unresolved external symbol pthread_create referenced in function main

cmTC_12c03.exe : fatal error LNK1120: 1 unresolved externals

ninja: build stopped: subcommand failed.
</code>```

The error messages in cmake build window are:

```<code>-- Found CURL: C:\curl-7.87.0-win64-mingw\lib (found version "7.87.0")
-- Found Protobuf: C:\protobuf-21.12\lib (found version "3.21.12")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
CMake Error at cmake/backend.cmake:16 (message):
  gRPC Not Found
Call Stack (most recent call first):
  CMakeLists.txt:257 (include)

-- Configuring incomplete, errors occurred!
See also "C:/v2ray/qv2ray/build/CMakeFiles/CMakeOutput.log".
See also "C:/v2ray/qv2ray/build/CMakeFiles/CMakeError.log".
</code>```

Probably, absl_DIR and pthread are both required by gRPC. But I don't think this is the correct way to let CMake find gRPC since I can run the executables in C:\gRPC\bin\ without problem so gRPC should be able to find the components it depends automatically. What is the correct way to let CMake find gRPC?

Body:
I tried to build Qv2ray with CMake and Visual Studio on Windows and got the error:

CMake Error at cmake/backend.cmake:9 (message):
  gRPC Not Found
Call Stack (most recent call first):
  CMakeLists.txt:257 (include)

Check backend.cmake:

find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin)

find_package(gRPC CONFIG QUIET)

# Debian, for example, cannot find gRPC in a proper way.
# This is used as a fallback searching method
if(NOT gRPC_FOUND)
    if(WIN32)
        message(FATAL_ERROR "gRPC Not Found")
    else()
    ......

I've built gRPC and installed it to C:\gRPC. How can I let CMake find it?
If I add

SET(gRPC_DIR "C:/gRPC/lib/cmake/grpc")

before find_package, I got this error:

-- Could NOT find absl (missing: absl_DIR)
CMake Error at cmake/backend.cmake:9 (message):
  gRPC Not Found
Call Stack (most recent call first):
  CMakeLists.txt:257 (include)

If I also set absl_DIR, I got another error:

    Performing C SOURCE FILE Test UV_LINT_NO_UNUSED_PARAMETER failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-ixqh17

Run Build Command(s):C:/ninja/ninja.exe cmTC_cc832 && [1/2] Building C object CMakeFiles\cmTC_cc832.dir\src.c.obj
FAILED: CMakeFiles/cmTC_cc832.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_NO_UNUSED_PARAMETER  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wno-unused-parameter /showIncludes /FoCMakeFiles\cmTC_cc832.dir\src.c.obj /FdCMakeFiles\cmTC_cc832.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-ixqh17\src.c
cl : Command line error D8021 : invalid numeric argument '/Wno-unused-parameter'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test UV_LINT_STRICT_PROTOTYPES failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-ckl2px

Run Build Command(s):C:/ninja/ninja.exe cmTC_54f78 && [1/2] Building C object CMakeFiles\cmTC_54f78.dir\src.c.obj
FAILED: CMakeFiles/cmTC_54f78.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_STRICT_PROTOTYPES  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wstrict-prototypes /showIncludes /FoCMakeFiles\cmTC_54f78.dir\src.c.obj /FdCMakeFiles\cmTC_54f78.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-ckl2px\src.c
cl : Command line error D8021 : invalid numeric argument '/Wstrict-prototypes'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test UV_LINT_EXTRA failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-oz29mu

Run Build Command(s):C:/ninja/ninja.exe cmTC_c075b && [1/2] Building C object CMakeFiles\cmTC_c075b.dir\src.c.obj
FAILED: CMakeFiles/cmTC_c075b.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_EXTRA  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wextra /showIncludes /FoCMakeFiles\cmTC_c075b.dir\src.c.obj /FdCMakeFiles\cmTC_c075b.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-oz29mu\src.c
cl : Command line error D8021 : invalid numeric argument '/Wextra'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-d5iufb

Run Build Command(s):C:/ninja/ninja.exe cmTC_b1e72 && [1/2] Building C object CMakeFiles\cmTC_b1e72.dir\src.c.obj
FAILED: CMakeFiles/cmTC_b1e72.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DCMAKE_HAVE_LIBC_PTHREAD  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_b1e72.dir\src.c.obj /FdCMakeFiles\cmTC_b1e72.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-d5iufb\src.c
C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-d5iufb\src.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

ninja: build stopped: subcommand failed.

Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-cyjamz

Run Build Command(s):C:/ninja/ninja.exe cmTC_863f5 && [1/2] Building C object CMakeFiles\cmTC_863f5.dir\CheckFunctionExists.c.obj

[2/2] Linking C executable cmTC_863f5.exe

FAILED: cmTC_863f5.exe

cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_863f5.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_863f5.dir\CheckFunctionExists.c.obj  /out:cmTC_863f5.exe /implib:cmTC_863f5.lib /pdb:cmTC_863f5.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  pthreads.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_863f5.dir\CheckFunctionExists.c.obj /out:cmTC_863f5.exe /implib:cmTC_863f5.lib /pdb:cmTC_863f5.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console pthreads.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_863f5.dir/intermediate.manifest CMakeFiles\cmTC_863f5.dir/manifest.res" failed (exit code 1104) with the following output:

LINK : fatal error LNK1104: cannot open file 'pthreads.lib'

ninja: build stopped: subcommand failed.

Determining if the function pthread_create exists in the pthread failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-ymkre8

Run Build Command(s):C:/ninja/ninja.exe cmTC_2ac36 && [1/2] Building C object CMakeFiles\cmTC_2ac36.dir\CheckFunctionExists.c.obj

[2/2] Linking C executable cmTC_2ac36.exe

FAILED: cmTC_2ac36.exe

cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_2ac36.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_2ac36.dir\CheckFunctionExists.c.obj  /out:cmTC_2ac36.exe /implib:cmTC_2ac36.lib /pdb:cmTC_2ac36.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  pthread.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_2ac36.dir\CheckFunctionExists.c.obj /out:cmTC_2ac36.exe /implib:cmTC_2ac36.lib /pdb:cmTC_2ac36.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console pthread.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_2ac36.dir/intermediate.manifest CMakeFiles\cmTC_2ac36.dir/manifest.res" failed (exit code 1104) with the following output:

LINK : fatal error LNK1104: cannot open file 'pthread.lib'

ninja: build stopped: subcommand failed.

I downloaded pthread-win32, copied pthreadVC2.lib to pthread.lib and added the following line to CMakeLists.txt,

    set (CMAKE_EXE_LINKER_FLAGS  "/LIBPATH:\"C:\\pthreads-w32-2-9-1-release\\Pre-built.2\\lib\\x64\\\"")

then rebuilt but still got the error:

Performing C SOURCE FILE Test UV_LINT_NO_UNUSED_PARAMETER failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-wqbrhl

Run Build Command(s):C:/ninja/ninja.exe cmTC_7b6af && [1/2] Building C object CMakeFiles\cmTC_7b6af.dir\src.c.obj
FAILED: CMakeFiles/cmTC_7b6af.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_NO_UNUSED_PARAMETER  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wno-unused-parameter /showIncludes /FoCMakeFiles\cmTC_7b6af.dir\src.c.obj /FdCMakeFiles\cmTC_7b6af.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-wqbrhl\src.c
cl : Command line error D8021 : invalid numeric argument '/Wno-unused-parameter'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test UV_LINT_STRICT_PROTOTYPES failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-e8xc9e

Run Build Command(s):C:/ninja/ninja.exe cmTC_f19a7 && [1/2] Building C object CMakeFiles\cmTC_f19a7.dir\src.c.obj
FAILED: CMakeFiles/cmTC_f19a7.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_STRICT_PROTOTYPES  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wstrict-prototypes /showIncludes /FoCMakeFiles\cmTC_f19a7.dir\src.c.obj /FdCMakeFiles\cmTC_f19a7.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-e8xc9e\src.c
cl : Command line error D8021 : invalid numeric argument '/Wstrict-prototypes'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test UV_LINT_EXTRA failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-0dci1s

Run Build Command(s):C:/ninja/ninja.exe cmTC_33837 && [1/2] Building C object CMakeFiles\cmTC_33837.dir\src.c.obj
FAILED: CMakeFiles/cmTC_33837.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DUV_LINT_EXTRA  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1   -Wextra /showIncludes /FoCMakeFiles\cmTC_33837.dir\src.c.obj /FdCMakeFiles\cmTC_33837.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-0dci1s\src.c
cl : Command line error D8021 : invalid numeric argument '/Wextra'

ninja: build stopped: subcommand failed.

Source file was:
int main(void) { return 0; }

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-fxbu04

Run Build Command(s):C:/ninja/ninja.exe cmTC_79d11 && [1/2] Building C object CMakeFiles\cmTC_79d11.dir\src.c.obj
FAILED: CMakeFiles/cmTC_79d11.dir/src.c.obj
"C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\cl.exe"  /nologo -DCMAKE_HAVE_LIBC_PTHREAD  /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_79d11.dir\src.c.obj /FdCMakeFiles\cmTC_79d11.dir\ /FS -c C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-fxbu04\src.c
C:\v2ray\qv2ray\build\CMakeFiles\CMakeScratch\TryCompile-fxbu04\src.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

ninja: build stopped: subcommand failed.

Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-nnzju3

Run Build Command(s):C:/ninja/ninja.exe cmTC_1b1f1 && [1/2] Building C object CMakeFiles\cmTC_1b1f1.dir\CheckFunctionExists.c.obj

[2/2] Linking C executable cmTC_1b1f1.exe

FAILED: cmTC_1b1f1.exe

cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_1b1f1.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_1b1f1.dir\CheckFunctionExists.c.obj  /out:cmTC_1b1f1.exe /implib:cmTC_1b1f1.lib /pdb:cmTC_1b1f1.pdb /version:0.0 /LIBPATH:"C:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64\"  /debug /INCREMENTAL /subsystem:console  pthreads.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK: command "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_1b1f1.dir\CheckFunctionExists.c.obj /out:cmTC_1b1f1.exe /implib:cmTC_1b1f1.lib /pdb:cmTC_1b1f1.pdb /version:0.0 /LIBPATH:C:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64"  /debug /INCREMENTAL /subsystem:console  pthreads.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  /MANIFEST /MANIFESTFILE:cmTC_1b1f1.exe.manifest" failed (exit code 1120) with the following output:
CheckFunctionExists.c.obj : error LNK2019: unresolved external symbol pthread_create referenced in function main

cmTC_1b1f1.exe : fatal error LNK1120: 1 unresolved externals

ninja: build stopped: subcommand failed.

Determining if the function pthread_create exists in the pthread failed with the following output:
Change Dir: C:/v2ray/qv2ray/build/CMakeFiles/CMakeScratch/TryCompile-4uqkdk

Run Build Command(s):C:/ninja/ninja.exe cmTC_12c03 && [1/2] Building C object CMakeFiles\cmTC_12c03.dir\CheckFunctionExists.c.obj

[2/2] Linking C executable cmTC_12c03.exe

FAILED: cmTC_12c03.exe

cmd.exe /C "cd . && C:\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_12c03.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_12c03.dir\CheckFunctionExists.c.obj  /out:cmTC_12c03.exe /implib:cmTC_12c03.lib /pdb:cmTC_12c03.pdb /version:0.0 /LIBPATH:"C:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64\"  /debug /INCREMENTAL /subsystem:console  pthread.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK: command "C:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_12c03.dir\CheckFunctionExists.c.obj /out:cmTC_12c03.exe /implib:cmTC_12c03.lib /pdb:cmTC_12c03.pdb /version:0.0 /LIBPATH:C:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64"  /debug /INCREMENTAL /subsystem:console  pthread.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  /MANIFEST /MANIFESTFILE:cmTC_12c03.exe.manifest" failed (exit code 1120) with the following output:
CheckFunctionExists.c.obj : error LNK2019: unresolved external symbol pthread_create referenced in function main

cmTC_12c03.exe : fatal error LNK1120: 1 unresolved externals

ninja: build stopped: subcommand failed.

The error messages in cmake build window are:

-- Found CURL: C:\curl-7.87.0-win64-mingw\lib (found version "7.87.0")
-- Found Protobuf: C:\protobuf-21.12\lib (found version "3.21.12")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
CMake Error at cmake/backend.cmake:16 (message):
  gRPC Not Found
Call Stack (most recent call first):
  CMakeLists.txt:257 (include)

-- Configuring incomplete, errors occurred!
See also "C:/v2ray/qv2ray/build/CMakeFiles/CMakeOutput.log".
See also "C:/v2ray/qv2ray/build/CMakeFiles/CMakeError.log".

Probably, absl_DIR and pthread are both required by gRPC. But I don't think this is the correct way to let CMake find gRPC since I can run the executables in C:\gRPC\bin\ without problem so gRPC should be able to find the components it depends automatically. What is the correct way to let CMake find gRPC?


问:
FLUTTER: Long press and try to move or resize item using two finger make copy of feedback:
FLUTTER: Long press and try to move or resize the item using two fingers to make a copy of the feedback:

Code to set an image on my screen

```<code>Stack(
      children: editingVideoController.overlays.value
          .map((overlay) => Positioned(
          top: overlay.offset?.dy,
          left: overlay.offset?.dx,
          child: Draggable(
            data: overlay,
            onDraggableCanceled: (_, offset) {
              setState(() => overlay.offset = offset);
            },
            childWhenDragging: const SizedBox.shrink(),
            feedback: Image.network(
              "https://media1.giphy.com/media/cJDu4CaMmWGCJK1enx/giphy.gif?cid=ecf05e472dfxdpoycxodctep7wf73xh1rm9d2dbb6hgxkoi1&rid=giphy.gif&ct=g",
              height: overlay.height,
              fit: BoxFit.scaleDown,
            ),
            child: Image.network(
              "https://media1.giphy.com/media/cJDu4CaMmWGCJK1enx/giphy.gif?cid=ecf05e472dfxdpoycxodctep7wf73xh1rm9d2dbb6hgxkoi1&rid=giphy.gif&ct=g",
              height: overlay.height,
              fit: BoxFit.scaleDown,
            ),
          )))
          .toList(),
    )
</code>```

Body:
FLUTTER: Long press and try to move or resize the item using two fingers to make a copy of the feedback:

Code to set an image on my screen

Stack(
      children: editingVideoController.overlays.value
          .map((overlay) => Positioned(
          top: overlay.offset?.dy,
          left: overlay.offset?.dx,
          child: Draggable(
            data: overlay,
            onDraggableCanceled: (_, offset) {
              setState(() => overlay.offset = offset);
            },
            childWhenDragging: const SizedBox.shrink(),
            feedback: Image.network(
              "https://media1.giphy.com/media/cJDu4CaMmWGCJK1enx/giphy.gif?cid=ecf05e472dfxdpoycxodctep7wf73xh1rm9d2dbb6hgxkoi1&rid=giphy.gif&ct=g",
              height: overlay.height,
              fit: BoxFit.scaleDown,
            ),
            child: Image.network(
              "https://media1.giphy.com/media/cJDu4CaMmWGCJK1enx/giphy.gif?cid=ecf05e472dfxdpoycxodctep7wf73xh1rm9d2dbb6hgxkoi1&rid=giphy.gif&ct=g",
              height: overlay.height,
              fit: BoxFit.scaleDown,
            ),
          )))
          .toList(),
    )


问:
Get the product_retailer_id / Content ID for a specific product
I'm trying to get the product_retailer_id (or as it's displayed in the catalog - Content ID) but it is not showing when I use the product_endpoint

I've used the graph API explorer and included all items that can be included for a specific product:

there's retailer_id

But that returns a null

I used the graph api explorer and included all potential fields for a product but none of the results return the field I'm looking for.


问:
Why does git diff output show only names of changed files?
I am facing a strange issue with git diff. The output of the command shows the files that were changed but does not show the exact change in the lines. It happens for both commands:

```<code>git diff
</code>```

and

```<code>git diff --staged
</code>```

Could anyone please suggest why this could be happening? Thanks!

I tried searching online but apparently, this is not a common issue and --name-only is the option to display only file names. In my case, the default output shows only modified file names.

Body:
I am facing a strange issue with git diff. The output of the command shows the files that were changed but does not show the exact change in the lines. It happens for both commands:

git diff

and

git diff --staged

Could anyone please suggest why this could be happening? Thanks!

I tried searching online but apparently, this is not a common issue and --name-only is the option to display only file names. In my case, the default output shows only modified file names.


问:
Mongoose gives error on insertOne() on NodeJS
```<code>`C:\code\WebApp\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:158
          const err = new MongooseError(message);
                      ^
MongooseError: Operation `posts.insertOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (C:\code\WebApp\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:158:23)
    at listOnTimeout (node:internal/timers:564:17)
    at process.processTimers (node:internal/timers:507:7)
</code>```

Here's my app.js.

```<code>const express = require('express');
const app=express();
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
require('dotenv/config');

app.use(bodyParser.json());

const postRoutes = require('./routes/posts');

app.use('/posts',postRoutes);

app.get('/',(req,res)=>{
    res.send('we are at home');
});

mongoose.set('strictQuery', true);

mongoose.connect(
    process.env.DB_CONNECT,
    { newURLParser : true,
    useUnifiedTopology : true,
    useCreateIndex: true,
    },
    () =>
    console.log('Connected to DB')
);
app.listen(3000);
</code>```

Here I have already tried to reset my whitelisted IP on MongoAtlas & using try-catch block also didn't help. Can someone please help me to solve this problem?

Body:
`C:\code\WebApp\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:158
          const err = new MongooseError(message);
                      ^
MongooseError: Operation `posts.insertOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (C:\code\WebApp\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:158:23)
    at listOnTimeout (node:internal/timers:564:17)
    at process.processTimers (node:internal/timers:507:7)

Here's my app.js.

const express = require('express');
const app=express();
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
require('dotenv/config');

app.use(bodyParser.json());

const postRoutes = require('./routes/posts');

app.use('/posts',postRoutes);

app.get('/',(req,res)=>{
    res.send('we are at home');
});

mongoose.set('strictQuery', true);

mongoose.connect(
    process.env.DB_CONNECT,
    { newURLParser : true,
    useUnifiedTopology : true,
    useCreateIndex: true,
    },
    () =>
    console.log('Connected to DB')
);
app.listen(3000);

Here I have already tried to reset my whitelisted IP on MongoAtlas & using try-catch block also didn't help. Can someone please help me to solve this problem?


问:
Angular how run a pipeable operator before all the subscriptions to the queryParams observable in the entire app?
I want to run a pipeable operator before all the subscriptions in my Angular app!

I'm trying to reach that because I'm encrypting the queryParams in the URL so I want to run this pipeable operator to decrypt the queryParams that way I'm making sure that all the subscriptions to the queryParams observable will get decrypted queryParams!

many thanks for considering my request.

by CoderNadir

I've tried to pipe that operator in the app.component file, but it's not working for some reason! even I knew that it was not going to work...


问:
PowerMockito.doNothing() does not suppress a call to a private void method
I need to use a partial mock to test a class, and I want to suppress a call to a private void method. I tried to use doNothing().when(...) to stub the relevant method before it is called. However, when I run the test the real method is called nevertheless.

This is a simplified structure of the class under test:

```<code>public class MyObject {
    public MyObject() {
        // constructor
    }

    private void methodToSuppress(List<String> list, SomeObjectType object1, AnotherObjectType object2) {
        // lots of stuff going on
    }

    public void methodUnderTest(String strArg, SomeObjectType entity, Map<String, String> map) {
        // lots of stuff going on
        // then a call to methodToSuppress

        this.methodToSuppress(list, object1, null)

        // more stuff going on
    }
}
</code>```

And this is how I suppress the call to methodToSuppress:

```<code>@PrepareForTest({MyObject.class})
@PowerMockIgnore({"javax.management.*"})
public class MyObjectTest extends PowerMockTestCase {

    MyObject myObjectSpy;

    @BeforeMethod
    private void setup() {
        myObjectSpy = PowerMockito.spy(new MyObject());
    }

    @Test
    public void testLogAuditUpdate_no_changed_attributes() {
        try {
            PowerMockito.doNothing().when(myObjectSpy, "methodToSuppress",
                            Matchers.anyList(),
                            Matchers.any(SomeObjectType.class),
                            Matchers.isNull(AnotherObjectType.class)
                    );
            .
            .
            .
            myObjectSpy.methodUnderTest(txtString, someObjectType, map);
        } catch (Exception e) {
            Assert.fail(e.getMessage(), e);
        }
    }
}
</code>```

For some reason, when the test executes, the call to methodToSuppress is not suppressed, and we enter the real method. Why is that?

Edit: Apparently, there is no problem with the code. It is the debugger that screws it up. When I run the code without the debugger, the method is suppressed as expected. However, if I run the code with the debugger, and put a breakpoint on the line PowerMockito.doNothing().when(myObjectSpy, "methodToSuppress",...); the program would enter the method.

Body:
I need to use a partial mock to test a class, and I want to suppress a call to a private void method. I tried to use doNothing().when(...) to stub the relevant method before it is called. However, when I run the test the real method is called nevertheless.

This is a simplified structure of the class under test:

public class MyObject {
    public MyObject() {
        // constructor
    }

    private void methodToSuppress(List<String> list, SomeObjectType object1, AnotherObjectType object2) {
        // lots of stuff going on
    }

    public void methodUnderTest(String strArg, SomeObjectType entity, Map<String, String> map) {
        // lots of stuff going on
        // then a call to methodToSuppress

        this.methodToSuppress(list, object1, null)

        // more stuff going on
    }
}

And this is how I suppress the call to methodToSuppress:

@PrepareForTest({MyObject.class})
@PowerMockIgnore({"javax.management.*"})
public class MyObjectTest extends PowerMockTestCase {

    MyObject myObjectSpy;

    @BeforeMethod
    private void setup() {
        myObjectSpy = PowerMockito.spy(new MyObject());
    }

    @Test
    public void testLogAuditUpdate_no_changed_attributes() {
        try {
            PowerMockito.doNothing().when(myObjectSpy, "methodToSuppress",
                            Matchers.anyList(),
                            Matchers.any(SomeObjectType.class),
                            Matchers.isNull(AnotherObjectType.class)
                    );
            .
            .
            .
            myObjectSpy.methodUnderTest(txtString, someObjectType, map);
        } catch (Exception e) {
            Assert.fail(e.getMessage(), e);
        }
    }
}

For some reason, when the test executes, the call to methodToSuppress is not suppressed, and we enter the real method. Why is that?

Edit: Apparently, there is no problem with the code. It is the debugger that screws it up. When I run the code without the debugger, the method is suppressed as expected. However, if I run the code with the debugger, and put a breakpoint on the line PowerMockito.doNothing().when(myObjectSpy, "methodToSuppress",...); the program would enter the method.


问:
I linked my custom domain name to Netlify but it throws error: "Failed to load resource: net::ERR_BLOCKED_BY_CLIENT"
I added the netlify nameservers from dns settings but I got the error "Failed to load resource: net::ERR_BLOCKED_BY_CLIENT"!!
http://mjshubham21.live/
I bought the domain from name.com .
Help.

I want to link my domain name to my Vite react app deployed on Netlify.


问:
How does one use memit magic?
I'm trying to run the following code in a jupyter notebook:

```<code>%%memit
list1 = [i*i for i in range(100_000)]
lista2 = list1
</code>```

However, I get the following error message:

```<code>UsageError: Cell magic `%%memit` not found.
</code>```

If instead of memit, I use timeit, everything works.

Title: How does one use memit magic?

Body:
I'm trying to run the following code in a jupyter notebook:

%%memit
list1 = [i*i for i in range(100_000)]
lista2 = list1

However, I get the following error message:

UsageError: Cell magic `%%memit` not found.

If instead of memit, I use timeit, everything works.


问:
numpy array dtype is coming as int32 by default in a windows 11 64 bit machine
Snippet of the problem

Necessary details:

```<code>'3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)]'
</code>```

I found similar type of question for Windows 10 OS and it has been solved by update as per the answers given by community experts. Then, why am I facing the issue?

Body:
Snippet of the problem

Necessary details:

'3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)]'

I found similar type of question for Windows 10 OS and it has been solved by update as per the answers given by community experts. Then, why am I facing the issue?


问:
Dynamic Linq custom type conversion for query
I'm trying to use dynamic Linq (System.Linq.Dynamic.Core) to query
data from MongoDB, based on a SQL-like string query I get from Excel.
This
works, but I'm trying to change the semantics of date - long
comparisons.

I'm trying to enable queries where I compare an ISODate field with a
double representing the Excel datetime (OLE automation date, number of
days since 1899-12-30), but any parsed long gets cast into a DateTime
based on the number of 100ns intervals since 0001-01-01T00:00.000
Gregorian via this overload of the datetime
constructor.

I want to somehow change this, so that an integer/double in a
comparison gets
cast into a DateTime for comparison via the
DateTime.FromOADate(Double)
function.

The official MongoDB driver supports the IQueryable interface, and
I'm using
it directly.

Here's the base for what I'm trying to accomplish:

MongoClientSettings settings =
MongoClientSettings.FromConnectionString(
 "mongodb://my-mongo.local"
);
settings.LinqProvider = LinqProvider.V2;
MongoClient client = new MongoClient(settings);

var database = client.GetDatabase("my_db");
var collection = database.GetCollection<BsonDocument>("colls.my_coll");

/* colls.my_colls consists of members like this:
{
 "_id" : ObjectID,
 "name": string,
 "numeric": double,
 "date": ISODate
}
*/

// in the query, 44920 is the OLE automation date representation of
2022-12-25
var results = collection
 .AsQueryable<BsonDocument>()
 .AsQueryable()
 .Where("date < 44920 and name != \"badname\" and numeric >= 520");
```

This doesn't work because the integer gets interpreted in the 'wrong'
way.

One potential solution that came to my mind was to
map
the MongoDB result to a custom class, and use a custom (DateTime-
wrapping)
class for the date field in it, which has the proper conversion
constructor
for int/double. I would then have to use a custom TypeConvertor to
implement
an automatic conversion (I found
this
in the tests), but I don't fully understand how TypeConvertors work
(I'm a
recent C++ to C# convert).

Am I on the right track? Am I missing something? Is there a better way?

Body:
I'm trying to use dynamic Linq (System.Linq.Dynamic.Core) to query
data from MongoDB, based on a SQL-like string query I get from Excel.
This
works, but I'm trying to change the semantics of date - long
comparisons.

I'm trying to enable queries where I compare an ISODate field with a
double representing the Excel datetime (OLE automation date, number of
days since 1899-12-30), but any parsed long gets cast into a DateTime
based on the number of 100ns intervals since 0001-01-01T00:00.000
Gregorian via this overload of the datetime
constructor.

I want to somehow change this, so that an integer/double in a
comparison gets
cast into a DateTime for comparison via the
DateTime.FromOADate(Double)
function.

The official MongoDB driver supports the IQueryable interface, and
I'm using
it directly.

Here's the base for what I'm trying to accomplish:

MongoClientSettings settings =
MongoClientSettings.FromConnectionString(
 "mongodb://my-mongo.local"
);
settings.LinqProvider = LinqProvider.V2;
MongoClient client = new MongoClient(settings);

var database = client.GetDatabase("my_db");
var collection = database.GetCollection<BsonDocument>("colls.my_coll");

/* colls.my_colls consists of members like this:
{
 "_id" : ObjectID,
 "name": string,
 "numeric": double,
 "date": ISODate
}
*/

// in the query, 44920 is the OLE automation date representation of
2022-12-25
var results = collection
 .AsQueryable<BsonDocument>()
 .AsQueryable()
 .Where("date < 44920 and name != \"badname\" and numeric >= 520");

This doesn't work because the integer gets interpreted in the 'wrong'
way.

One potential solution that came to my mind was to
map
the MongoDB result to a custom class, and use a custom (DateTime-
wrapping)
class for the date field in it, which has the proper conversion
constructor
for int/double. I would then have to use a custom TypeConvertor to
implement
an automatic conversion (I found
this
in the tests), but I don't fully understand how TypeConvertors work
(I'm a
recent C++ to C# convert).

Am I on the right track? Am I missing something? Is there a better way?


问:
error in importing Rating model from star_rating.models
I am trying to use django_ratings but when i try to import it and i fail.

I tried to just include {% ratings object %} in templates after configuring settings but i got an error 'str' object has no attribute '_meta'.
Here is the settings

```<code>#star rating settings
STAR_RATINGS_RERATE_SAME_DELETE = True
STAR_RATINGS_RERATE = True
STAR_RATINGS_ANONYMOUS = True
STAR_RATINGS_OBJECT_ID_PATTERN = '[a-z0-9]{32}'
</code>```

Templates context processor

```<code>'django.template.context_processors.request'
</code>```

Any help will be much appreciated

Error!

Body:
I am trying to use django_ratings but when i try to import it and i fail.

I tried to just include {% ratings object %} in templates after configuring settings but i got an error 'str' object has no attribute '_meta'.
Here is the settings

#star rating settings
STAR_RATINGS_RERATE_SAME_DELETE = True
STAR_RATINGS_RERATE = True
STAR_RATINGS_ANONYMOUS = True
STAR_RATINGS_OBJECT_ID_PATTERN = '[a-z0-9]{32}'

Templates context processor

'django.template.context_processors.request'

Any help will be much appreciated

Error!


问:
How to replace scanned text in a pdf from real text
I have a scanned pdf and using Python I have already converted it to a searchable pdf but that's not exactly what I want.

It is well-known fact that in a scanned pdf comprising of images of text, pixelation occurs at some point of zooming in, whereas it doesn't in a text pdf. And that's somewhat I want. I want to replace all of the text in my scanned pdf from real text same as a typed pdf. Or possibly create a new one with all the contents of the old pdf.

Actually, I am writing this post after searching well on the internet and due to the fact that I didn't find anywhere to start from. I went through the libraries such as pytesseract and reportlab but couldn't find anything promising. And this is the reason for no code posted in this question.

Hence, I want to know a way to possibly replace all of the text from the scanned pdf with a real text at exactly those positions.

Note: In the pdf, I am working on, there are images as well and I want everything to be exactly at its original place with only the text replaced.

Also, I have already mentioned the reason for giving no code in this post as I haven't found a starting point yet.