问:
Exc after update dependencies pom.xm Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplicationAotProcessor
Error:

```<code>Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplicationAotProcessor
    at org.springframework.boot.devtools.system.DevToolsEnablementDeducer.<clinit>(DevToolsEnablementDeducer.java:40)
    at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:39)
    at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:140)
    at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:534)
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:90)
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:50)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
    at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:74)
    at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:47)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236)
    at com.inventoryweb.InventoryWebApplication.main(InventoryWebApplication.java:24)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplicationAotProcessor
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 16 more

Process finished with exit code 1
</code>```

Very thankful for your time.

This is my pom.xml

```<code><project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <!-- Run specific spring boot profile through command line -->
    <!-- ./mvnw spring-boot:run -Dspring-boot.run.profiles={profile_name} -->

    <!-- Run integration tests -->
    <!-- ./mvnw verify -P integration-test -->

    <!-- Run unit tests -->
    <!-- ./mvnw clean install -DskipITs -->

    <!-- Build specific war profiles without running IT -->
    <!-- ./mvnw clean install -P<profile> package -DskipTests -->

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.inventoryweb</groupId>
    <artifactId>inventoryweb</artifactId>
    <version>SNAPSHOT.0.1</version>
    <packaging>war</packaging>
    <properties>
        <!-- Test -->
        <skip.integration.tests>true</skip.integration.tests>
        <skip.unit.tests>false</skip.unit.tests>
        <project.finalName>${project.artifactId}-${env.name}-${project.version}</project.finalName>
        <!-- Tomcat -->
        <tomcat.version>9.0.40</tomcat.version>
        <!-- Spring Framework -->
        <springframework.version>5.3.9</springframework.version>
    </properties>
    <build>
        <finalName>${project.finalName}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>build-info</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <addResources>true</addResources>
                </configuration>
            </plugin>

            <!-- Used for unit tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>${skip.unit.tests}</skipTests>
                    <excludes>
                        <exclude>**/IT*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- Integration tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M7</version>
                <executions>
                    <!-- States that both integration-test and verify goals of the Failsafe
                        Maven plugin are executed. -->
                    <execution>
                        <id>integration-tests</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                        <configuration>
                            <!-- Skips integration tests if the value of skip.integration.tests
                                property is true -->
                            <skipTests>${skip.integration.tests}</skipTests>
                            <includes>
                                <include>**/*.java</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-integration-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/integration-test/java</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-integration-test-resources</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>add-test-resource</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>src/integration-test/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Provides commit hash -->
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>4.9.10</version>
                <executions>
                    <execution>
                        <id>get-the-git-infos</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>initialize</phase>
                    </execution>
                </executions>
                <configuration>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
                    </generateGitPropertiesFilename>
                    <verbose>true</verbose>
                    <includeOnlyProperties>
                        <includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
                        <includeOnlyProperty>^git.branch$</includeOnlyProperty>
                    </includeOnlyProperties>
                </configuration>
            </plugin>

            <!-- Data base migration -->
            <plugin>
                <groupId>org.flywaydb</groupId>
                <artifactId>flyway-maven-plugin</artifactId>
                <version>9.8.2</version>
            </plugin>
        </plugins>
    </build>

    <!-- Inherit defaults from Spring Boot -->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.12.RELEASE</version>
    </parent>

    <dependencies>
        <!-- Add typical dependencies for a web application -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>2.5.0</version>
        </dependency>

        <!-- Allow custom validation messages for annotations -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
            <version>2.3.12.RELEASE</version>
        </dependency>

        <!-- Web server -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>2.3.12.RELEASE</version>
            <scope>provided</scope>
        </dependency>

<!--        <!– To compile JSP files –>-->
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Provides configuration tools for lifecycle application events -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

        <!-- Useful dependency to restart and quick pick up configuration changes
            (Server (Domain) and Client side - JSP) -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <version>3.0.0</version>
        </dependency>

        <!-- Provides proper dependencies for DB interaction -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <!-- JDBC connection -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.30</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
        <!--Auto generate property setters and getters together with constructors-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <scope>provided</scope>
        </dependency>

        <!-- Mail -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>

        <!-- Templates este-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-freemarker</artifactId>
            <version>3.0.0</version>
        </dependency>

        <!-- Runtime data base access for test -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Db migrations -->
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
            <version>9.8.3</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Conditional Logging -->
        <dependency>
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
        </dependency>

        <!-- ASI-Graylog Server -->
        <dependency>
            <groupId>de.siegmar</groupId>
            <artifactId>logback-gelf</artifactId>
            <version>3.0.0</version>
        </dependency>

        <!-- Encrypt properties sensitive information -->
        <dependency>
            <groupId>com.github.ulisesbocchio</groupId>
            <artifactId>jasypt-spring-boot-starter</artifactId>
            <version>3.0.3</version>
        </dependency>

        <!-- Spring Security -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <!-- Allows testing security configuration -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <version>5.7.3</version>
            <scope>test</scope>
        </dependency>

        <!-- Allows toString by reflection which is useful on logging -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.11</version>
        </dependency>

        <!-- Password validation rules -->
        <dependency>
            <groupId>org.passay</groupId>
            <artifactId>passay</artifactId>
            <version>1.6.0</version>
        </dependency>

        <!-- Messages joiner (Consider implementing project utility instead of adding another library) -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>31.1-jre</version>
        </dependency>

        <!-- Thymeleaf -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
            <version>3.0.0</version>
        </dependency>

        <!-- Thymeleaf security -->
        <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity5</artifactId>
        </dependency>

        <!--        Allow to work whit json-->
        <dependency>
            <groupId>com.vaadin.external.google</groupId>
            <artifactId>android-json</artifactId>
            <version>0.0.20131108.vaadin1</version>
            <scope>compile</scope>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>ittest</id>
            <properties>
                <build.profile.id>ittest</build.profile.id>
                <skip.integration.tests>false</skip.integration.tests>
                <skip.unit.tests>true</skip.unit.tests>
            </properties>
        </profile>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <spring.profiles.active>dev</spring.profiles.active>
                <env.name>dev</env.name>
            </properties>
        </profile>
        <profile>
            <id>qa</id>
            <properties>
                <spring.profiles.active>qa</spring.profiles.active>
                <env.name>qa</env.name>
            </properties>
        </profile>
        <profile>
            <id>prod</id>
            <properties>
                <spring.profiles.active>prod</spring.profiles.active>
                <env.name>prod</env.name>
            </properties>
        </profile>
    </profiles>
</project>
</code>```

Body:
Error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplicationAotProcessor
    at org.springframework.boot.devtools.system.DevToolsEnablementDeducer.<clinit>(DevToolsEnablementDeducer.java:40)
    at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:39)
    at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:140)
    at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:534)
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:90)
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:50)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
    at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:74)
    at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:47)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236)
    at com.inventoryweb.InventoryWebApplication.main(InventoryWebApplication.java:24)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplicationAotProcessor
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 16 more

Process finished with exit code 1

Very thankful for your time.

This is my pom.xml

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.inventoryweb</groupId>
    <artifactId>inventoryweb</artifactId>
    <version>SNAPSHOT.0.1</version>
    <packaging>war</packaging>
    <properties>

        <skip.integration.tests>true</skip.integration.tests>
        <skip.unit.tests>false</skip.unit.tests>
        <project.finalName>${project.artifactId}-${env.name}-${project.version}</project.finalName>

        <tomcat.version>9.0.40</tomcat.version>

        <springframework.version>5.3.9</springframework.version>
    </properties>
    <build>
        <finalName>${project.finalName}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>build-info</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <addResources>true</addResources>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>${skip.unit.tests}</skipTests>
                    <excludes>
                        <exclude>**/IT*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M7</version>
                <executions>

                    <execution>
                        <id>integration-tests</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                        <configuration>

                            <skipTests>${skip.integration.tests}</skipTests>
                            <includes>
                                <include>**/*.java</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-integration-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/integration-test/java</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-integration-test-resources</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>add-test-resource</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>src/integration-test/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>4.9.10</version>
                <executions>
                    <execution>
                        <id>get-the-git-infos</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>initialize</phase>
                    </execution>
                </executions>
                <configuration>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
                    </generateGitPropertiesFilename>
                    <verbose>true</verbose>
                    <includeOnlyProperties>
                        <includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
                        <includeOnlyProperty>^git.branch$</includeOnlyProperty>
                    </includeOnlyProperties>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.flywaydb</groupId>
                <artifactId>flyway-maven-plugin</artifactId>
                <version>9.8.2</version>
            </plugin>
        </plugins>
    </build>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.12.RELEASE</version>
    </parent>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>2.5.0</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
            <version>2.3.12.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>2.3.12.RELEASE</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.30</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-freemarker</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
            <version>9.8.3</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
        </dependency>

        <dependency>
            <groupId>de.siegmar</groupId>
            <artifactId>logback-gelf</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.github.ulisesbocchio</groupId>
            <artifactId>jasypt-spring-boot-starter</artifactId>
            <version>3.0.3</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <version>5.7.3</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.11</version>
        </dependency>

        <dependency>
            <groupId>org.passay</groupId>
            <artifactId>passay</artifactId>
            <version>1.6.0</version>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>31.1-jre</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity5</artifactId>
        </dependency>

        <dependency>
            <groupId>com.vaadin.external.google</groupId>
            <artifactId>android-json</artifactId>
            <version>0.0.20131108.vaadin1</version>
            <scope>compile</scope>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>ittest</id>
            <properties>
                <build.profile.id>ittest</build.profile.id>
                <skip.integration.tests>false</skip.integration.tests>
                <skip.unit.tests>true</skip.unit.tests>
            </properties>
        </profile>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <spring.profiles.active>dev</spring.profiles.active>
                <env.name>dev</env.name>
            </properties>
        </profile>
        <profile>
            <id>qa</id>
            <properties>
                <spring.profiles.active>qa</spring.profiles.active>
                <env.name>qa</env.name>
            </properties>
        </profile>
        <profile>
            <id>prod</id>
            <properties>
                <spring.profiles.active>prod</spring.profiles.active>
                <env.name>prod</env.name>
            </properties>
        </profile>
    </profiles>
</project>


来源: stackexchange

问:
Performing a Crosstab Query against a Dynamic data list
I have a query that pulls a field IncCode from Table A and arranges it by column headers. 1, 2, 3, 4, 5. That query also pulls an address list as shown below:

Query 1:

Address
1
2
3
4
5

100 Street
A
B
C
D
E

200 Street
A
B
C
D
E

300 Street
A
B
C
D
E

This information is then compared against another query in a crosstab to pull in a different Address based on matching values:

(Crosstab) Query 2:

Address
1
2
3
4
5

400 Street
A
B
C
D
E

500 Street
A
B
C
D
E

600 Street
A
B
C
D
E

The problem is IncCode only outputs a column if there is something to output. If there are no entries for 5, for example, then there is no column 5. When put into a crosstab, which requires me to Select the columns manually, it fails outputting an error. Is there a way to pre-empt this without manually removing the columns that are not present in the crosstab SQL? I realize a Select * would handle pulling in the output regardless of which columns are present, but I need the updated addresses from the crosstab comparison as well. An example of an output like this would incorporate an empty column to represent the field not present as shown in Example 1: Any help would be appreciated.

Example 1 (Column 5 not pulled from Query 1):

Address
1
2
3
4
5

400 Street
A
B
C
D

500 Street
A
B
C
D

600 Street
A
B
C
D

ContentLicense: CC BY-SA 4.0


问:
Networked program has problem "waking up" HP printer to print
I am writing some software that tries to print via IPP to typical HP laser printers like the M605, for example, and it is having a hard time "waking up" the printer sometimes. What happens is that the software tries to connect to the printer's IP address on the local network (10.1.10.185 or whatever) and gets a "No route to host" error. If the user tries several times in a row, eventually the printer "wakes up" and begins responding.

I notice that regular Linux or Window programs that print to the printer do not seem to have this problem. So, either they are not using IP/networked printing or they have some way to deal with the "sleeping" problem that I am not aware of. I suppose I could put a tap on the ethernet cord, and print from a Windows program and see what it is doing, but that would be a very time consuming and laborious procedure.

Does anybody know what I am doing wrong here? Is there some way to wake up a printer via its internet connectivity access protocol?

One thing I noticed in one person's code is that they had a 30-second timeout specified on the connect, so that may be the issue, is that my connection timeout is just not what it should be. In that case, is there an established timeout period for waking up HP printers?


问:
CSS files loaded but display wrong on Laravel9
I deploy the Laravel9 project to the centos server. (https://fullstacktrainingclass.com), but got a display problem on the live server, below is a CSS list that was added with the asset command.

```<code>    <link rel="stylesheet" href="{{asset('assets/css/magnific-popup.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/content-box.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/contact-form.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/media-box.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/skin.css')}}">
</code>```

I check the view-source:https://fullstacktrainingclass.com/ and all CSS files were correctly loaded, but display wrong (they display correctly on the local machine).

Any advice or guidance on this would be greatly appreciated, Thanks.

Body:
I deploy the Laravel9 project to the centos server. (https://fullstacktrainingclass.com), but got a display problem on the live server, below is a CSS list that was added with the asset command.

    <link rel="stylesheet" href="{{asset('assets/css/magnific-popup.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/content-box.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/contact-form.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/media-box.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/skin.css')}}">

I check the view-source:https://fullstacktrainingclass.com/ and all CSS files were correctly loaded, but display wrong (they display correctly on the local machine).

Any advice or guidance on this would be greatly appreciated, Thanks.


问:
Unable to deploy Growthbook service (A/B Testing) together with Nginx sidecar container for handling SSL/TLS encryption into Amazon ECS
I want to deploy Growthbook (A/B Testing tool) container along with Nginx reverse proxy for handling SSL/TLS encryption(i.e SSL Termination) into AWS ECS. I was trying to deploy using Docker compose file(i.e Docker ECS context). The problem is, it is creating all the necessary resources like Network Load Balances, Target Groups, ECS task definitions etc. And Abruptly fails creating ECS service and tries to delete all the resources it created when I ran docker compose --project-name growthbook up. Reason it says is "Nginx sidecar container exited".

Here is my docker-compose.yml file:

```<code># docker-compose.yml
version: "3"
x-aws-vpc: "vpc-*************"
services:
  growthbook:
    image: "growthbook/growthbook:latest"
    ports:
      - 3000:3000
      - 3100:3100
    environment:
      - MONGODB_URI=<mongo_db_connection_string>
      - JWT_SECRET=<jwt_secret>
    volumes:
      - uploads:/usr/local/src/app/packages/back-end/uploads
  nginx-tls-sidecar:
    image: <nginx_sidecar_image>
    ports:
      - 443:443
    links:
      - growthbook
volumes:
  uploads:

</code>```

And Here is Dockerfile used to build nginx sidecar image:

```<code>FROM nginx
COPY nginx.conf /etc/nginx/nginx.conf
COPY ssl.key /etc/nginx/ssl.key
COPY ssl.crt /etc/nginx/ssl.crt
</code>```

In the above Dockerfile, SSL keys and certificates are self-signed generated using openssl and are in order.

And Here is my nginx.conf file:

```<code># nginx Configuration File
# https://wiki.nginx.org/Configuration

# Run as a less privileged user for security reasons.
user nginx;

worker_processes auto;

events {
  worker_connections 1024;
}

pid        /var/run/nginx.pid;

http {

    #Redirect to https, using 307 instead of 301 to preserve post data

    server {
        listen [::]:443 ssl;
        listen 443 ssl;

        server_name localhost;

        # Protect against the BEAST attack by not using SSLv3 at all. If you need to support older browsers (IE6) you may need to add
        # SSLv3 to the list of protocols below.
        ssl_protocols              TLSv1.2;

        # Ciphers set to best allow protection from Beast, while providing forwarding secrecy, as defined by Mozilla - https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx
        ssl_ciphers                ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK;
        ssl_prefer_server_ciphers  on;

        # Optimize TLS/SSL by caching session parameters for 10 minutes. This cuts down on the number of expensive TLS/SSL handshakes.
        # The handshake is the most CPU-intensive operation, and by default it is re-negotiated on every new/parallel connection.
        # By enabling a cache (of type "shared between all Nginx workers"), we tell the client to re-use the already negotiated state.
        # Further optimization can be achieved by raising keepalive_timeout, but that shouldn't be done unless you serve primarily HTTPS.
        ssl_session_cache    shared:SSL:10m; # a 1mb cache can hold about 4000 sessions, so we can hold 40000 sessions
        ssl_session_timeout  24h;

        # Use a higher keepalive timeout to reduce the need for repeated handshakes
        keepalive_timeout 300; # up from 75 secs default

        # remember the certificate for a year and automatically connect to HTTPS
        add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains';

        ssl_certificate      /etc/nginx/ssl.crt;
        ssl_certificate_key  /etc/nginx/ssl.key;

        location / {
            proxy_pass http://localhost:3000; # TODO: replace port if app listens on port other than 80

            proxy_set_header Connection "";
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
        }

        location / {
            proxy_pass http://localhost:3100; # TODO: replace port if app listens on port other than 80

            proxy_set_header Connection "";
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
        }
    }
}
</code>```

Basically, Growthbook exposes its service on http://localhost:3000 and http://localhost:3100. And Nginx sidecar container only listens on port 443. I need to be able to proxy to both endpoints which are exposed by Growthbook from Nginx port 443.

Help is much appreciated, if you guys find any mistakes in my configuration :)

By default, Growthbook service does not provide TLS encryption. So I used Nginx as sidecar handling SSL Termination. As a end result, I need to be able to run Growthbook service using TLS encryption hosted on AWS ECS.

Body:
I want to deploy Growthbook (A/B Testing tool) container along with Nginx reverse proxy for handling SSL/TLS encryption(i.e SSL Termination) into AWS ECS. I was trying to deploy using Docker compose file(i.e Docker ECS context). The problem is, it is creating all the necessary resources like Network Load Balances, Target Groups, ECS task definitions etc. And Abruptly fails creating ECS service and tries to delete all the resources it created when I ran docker compose --project-name growthbook up. Reason it says is "Nginx sidecar container exited".

Here is my docker-compose.yml file:

# docker-compose.yml
version: "3"
x-aws-vpc: "vpc-*************"
services:
  growthbook:
    image: "growthbook/growthbook:latest"
    ports:
      - 3000:3000
      - 3100:3100
    environment:
      - MONGODB_URI=<mongo_db_connection_string>
      - JWT_SECRET=<jwt_secret>
    volumes:
      - uploads:/usr/local/src/app/packages/back-end/uploads
  nginx-tls-sidecar:
    image: <nginx_sidecar_image>
    ports:
      - 443:443
    links:
      - growthbook
volumes:
  uploads:

And Here is Dockerfile used to build nginx sidecar image:

FROM nginx
COPY nginx.conf /etc/nginx/nginx.conf
COPY ssl.key /etc/nginx/ssl.key
COPY ssl.crt /etc/nginx/ssl.crt

In the above Dockerfile, SSL keys and certificates are self-signed generated using openssl and are in order.

And Here is my nginx.conf file:

# nginx Configuration File
# https://wiki.nginx.org/Configuration

# Run as a less privileged user for security reasons.
user nginx;

worker_processes auto;

events {
  worker_connections 1024;
}

pid        /var/run/nginx.pid;

http {

    #Redirect to https, using 307 instead of 301 to preserve post data

    server {
        listen [::]:443 ssl;
        listen 443 ssl;

        server_name localhost;

        # Protect against the BEAST attack by not using SSLv3 at all. If you need to support older browsers (IE6) you may need to add
        # SSLv3 to the list of protocols below.
        ssl_protocols              TLSv1.2;

        # Ciphers set to best allow protection from Beast, while providing forwarding secrecy, as defined by Mozilla - https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx
        ssl_ciphers                ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK;
        ssl_prefer_server_ciphers  on;

        # Optimize TLS/SSL by caching session parameters for 10 minutes. This cuts down on the number of expensive TLS/SSL handshakes.
        # The handshake is the most CPU-intensive operation, and by default it is re-negotiated on every new/parallel connection.
        # By enabling a cache (of type "shared between all Nginx workers"), we tell the client to re-use the already negotiated state.
        # Further optimization can be achieved by raising keepalive_timeout, but that shouldn't be done unless you serve primarily HTTPS.
        ssl_session_cache    shared:SSL:10m; # a 1mb cache can hold about 4000 sessions, so we can hold 40000 sessions
        ssl_session_timeout  24h;

        # Use a higher keepalive timeout to reduce the need for repeated handshakes
        keepalive_timeout 300; # up from 75 secs default

        # remember the certificate for a year and automatically connect to HTTPS
        add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains';

        ssl_certificate      /etc/nginx/ssl.crt;
        ssl_certificate_key  /etc/nginx/ssl.key;

        location / {
            proxy_pass http://localhost:3000; # TODO: replace port if app listens on port other than 80

            proxy_set_header Connection "";
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
        }

        location / {
            proxy_pass http://localhost:3100; # TODO: replace port if app listens on port other than 80

            proxy_set_header Connection "";
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
        }
    }
}

Basically, Growthbook exposes its service on http://localhost:3000 and http://localhost:3100. And Nginx sidecar container only listens on port 443. I need to be able to proxy to both endpoints which are exposed by Growthbook from Nginx port 443.

Help is much appreciated, if you guys find any mistakes in my configuration :)

By default, Growthbook service does not provide TLS encryption. So I used Nginx as sidecar handling SSL Termination. As a end result, I need to be able to run Growthbook service using TLS encryption hosted on AWS ECS.


问:
tomcat threads in timed_waiting state
```<code></code>```

2022-11-30 23:39:41
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.281-b09 mixed mode):

"Attach Listener" #156162 daemon prio=9 os_prio=0 tid=0x00007f3e08002000 nid=0x26214 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

"http-nio-8088-exec-580" #155831 daemon prio=5 os_prio=0 tid=0x00007f3d98216000 nid=0x260bb waiting on condition [0x00007f3ab21e0000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000000d6d3f820> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:102)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Locked ownable synchronizers:
- None

"http-nio-8088-exec-579" #155830 daemon prio=5 os_prio=0 tid=0x00007f3d98214000 nid=0x260ba waiting on condition [0x00007f3ab22e1000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000000d6d3f820> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:102)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Locked ownable synchronizers:
- None

"http-nio-8088-exec-578" #155829 daemon prio=5 os_prio=0 tid=0x00007f3d98212800 nid=0x260b9 waiting on condition [0x00007f3ab23e2000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000000d6d3f820> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:102)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Locked ownable synchronizers:
- None

"http-nio-8088-exec-577" #155828 daemon prio=5 os_prio=0 tid=0x00007f3d98210800 nid=0x260b8 waiting on condition [0x00007f3ab24e3000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000000d6d3f820> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:102)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Locked ownable synchronizers:
- None

"http-nio-8088-exec-576" #155827 daemon prio=5 os_prio=0 tid=0x00007f3d9820e800 nid=0x260b7 waiting on condition [0x00007f3ab25e4000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000000d6d3f820> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:102)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Locked ownable synchronizers:
- None

"http-nio-8088-exec-575" #155826 daemon prio=5 os_prio=0 tid=0x00007f3d9820c800 nid=0x260b6 waiting on condition [0x00007f3ab26e5000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000000d6d3f820> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:102)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Locked ownable synchronizers:
- None

"http-nio-8088-exec-574" #155825 daemon prio=5 os_prio=0 tid=0x00007f3d9820b000 nid=0x260b5 waiting on condition [0x00007f3ab27e6000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000000d6d3f820> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:102)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

```<code></code>```

Title: tomcat threads in timed_waiting state


问:
Achieving data persistence of a dynamic .json file with a python web app as a public repository
A little info about the project: https://ahashplace.@PreferablyAFreeHost.something/ is a grid of query strings. When you make a request to the site with x, y and color in the query string if the sha256 hash of your query is lower than the current query in that x,y position the site will save your query for that position.

So I was running on Heroku's free tier (a recently discontinued product) with an s3 bucket as backup. With Heroku private repos I had the AWS credentials as plain text. I need s3 to keep an updated copy of a file (data.json) so that the app can get it instead of rolling back to its deployment version when the build re-deploys.

I would like the build to be a public repository. This is for a couple reasons; first I want this to be open source and second I would prefer not to give out my github credentials even if Render will deploy on their hardware from your own private repos for free.

The question: How do I get my dynamic file to endure along side an open source python web app?

My thoughts so far...

It would be great if I could make whatever credentials I put out there only work from the host; based on like a known static ip and sub-net-mask but I'm not sure that would be secure or viable as the host might change my network address and it could be spoofed by an attacker.

I've used mongoDB before and it didn't really have this problem and I don't know why...

I could put the data in a public repo and just run code privately to periodically fetch data from the app and push updates to the repo. Then the app could look to the repo when starting up the build. This is messy though.


问:
Is there a way I can fix my header component to stop displaying blank due to react router version 6.4.3?
**I learnt React router version 5 but I do not understand how version 6.4.3 works

App.js

```<code>import React from 'react';

import './App.css';
import Header from './Header';

function App() {
  return (
    <div className="app">
      <Header/>

    </div>
  );
}

export default App;

</code>```

Header.js

```<code>import React, {useState} from 'react'
import './Header.css';
import MenuIcon from '@mui/icons-material/Menu';
import SearchIcon from '@mui/icons-material/Search';
import VideoCallIcon from '@mui/icons-material/VideoCall';
import AppsIcon from '@mui/icons-material/Apps';
import NotificationAddIcon from '@mui/icons-material/NotificationAdd';
import { Avatar } from '@mui/material';
import { Link } from "react-router-dom";

function Header() {
  const [inputSearch, setInputSearch] = useState('');
  return (

    <div className='header'>
      <div className='header_left'>
      <MenuIcon />
      <Link to='/'>
      <img
      className='header_logo'
      src='https://upload.wikimedia.org/wikipedia/commons/e/e1/Logo_of_YouTube_%282015-2017%29.svg'
      alt='' />
      </Link>
      </div>
      <div className='header_input'>
      <input onChange={(e) => setInputSearch(e.target.value)}
      value={inputSearch}
      type='text' placeholder='Search'/>

      <Link to={`/search/${inputSearch}`}>
      <SearchIcon className='header_inputbutton' />
</code>```

type here

```<code>
      </Link>
      </div>
      <div className='header_icons'>
      <VideoCallIcon className='header_icon' />
      <AppsIcon className='header_icon'/>
      <NotificationAddIcon className='header_icon'/>
      <Avatar src='' alt='Igbe Ajaga'/>
    </div>
    </div>
  )
}

export default Header

</code>```

I tried to use react router but the Header component which has react router imported is displaying a blank white space on my browser while the other components without react router are displaying correctly.**

Body:
**I learnt React router version 5 but I do not understand how version 6.4.3 works

App.js

import React from 'react';

import './App.css';
import Header from './Header';

function App() {
  return (

  );
}

export default App;

Header.js

import React, {useState} from 'react'
import './Header.css';
import MenuIcon from '@mui/icons-material/Menu';
import SearchIcon from '@mui/icons-material/Search';
import VideoCallIcon from '@mui/icons-material/VideoCall';
import AppsIcon from '@mui/icons-material/Apps';
import NotificationAddIcon from '@mui/icons-material/NotificationAdd';
import { Avatar } from '@mui/material';
import { Link } from "react-router-dom";

function Header() {
  const [inputSearch, setInputSearch] = useState('');
  return (

      <MenuIcon />
      <Link to='/'>

      </Link>

      <input onChange={(e) => setInputSearch(e.target.value)}
      value={inputSearch}
      type='text' placeholder='Search'/>

      <Link to={`/search/${inputSearch}`}>
      <SearchIcon className='header_inputbutton' />

type here

      </Link>

      <VideoCallIcon className='header_icon' />
      <AppsIcon className='header_icon'/>
      <NotificationAddIcon className='header_icon'/>
      <Avatar src='' alt='Igbe Ajaga'/>

  )
}

export default Header

I tried to use react router but the Header component which has react router imported is displaying a blank white space on my browser while the other components without react router are displaying correctly.**


问:
How would I create a snapshot of a MySQL instance in WSL?
We use MySQL for our app. During dev and testing, we have to constantly reload the MySQL database, sometimes with very large amounts of data. In Linux, I would create an LVM snapshot to do quick rollbacks during testing to reduce turn-around time from 10-15 minutes to 30 seconds.

A number of our devs use Windows Subsystem for Linux (WSL) for their dev environment. It works great and allows them to mix the use of their Windows and Linux tools. Alas, unless things have changed recently, we don't have the full capability of LVM snapshots under WSL.

Are there any scripts we can use to create a MySQL snapshot and quickly restore to that rollback point? I'm aware we can manually review snapshots with mysqlbinlog, but that's rather tedious. I'd love a way to:

run a script start-point.sh

do our testing

profit

run a script rollback.sh

I'm very familiar with filesystem snapshots and so haven't done much with MySQL snapshots to date. The googling results are.. kind of a mess and I'm hoping there is an obvious "oh yeah, just use script ABC at this github link" if possible.

Thanks all.

P.S. If there is a better way of doing this in WSL I am all ears!


问:
Angular image modal popup
I should create a pop up that opens after clicking on an image and displays that image bigger. But I get the url instead of the image. I used bootstrap's ngbModal

Details.component.html

```<code><img src="{{sku.imageLink}}" (click)="open(sku.imageLink)" style="width: 50%; margin-right: 100px; margin-left: 10%; cursor: pointer;" alt=""     >
</code>```

Details.component.ts

```<code>import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute } from '@angular/router';
import { ProductsService } from 'app/core/services/products.service';
import { Products,Product } from 'app/shared/model/products-model';
import { PopUpComponent } from '../pop-up/pop-up.component';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';

@Component({
  selector: 'lpr-details',
  templateUrl: './details.component.html',
  styleUrls: ['./details.component.scss']
})
export class DetailsComponent implements OnInit {
  sku: any;
  subCategory: Product;
  data: any={};
  quantity: number=1;
  i=1;

  constructor(
    private route: ActivatedRoute,
    private productService: ProductsService,
    private dialogRef: MatDialog,
    private modalService: NgbModal

  ) {
    this.sku=this.route.snapshot.paramMap.get('sku')
    console.log(this.sku)
  }

  ngOnInit(): void {
    this.getProductbySku()
  }

  getProductbySku(){
    this.productService.getProductsBySku(this.sku)
    .subscribe(res=>{
      this.sku=res;
    })
  }

  open(content: any){
    this.modalService.open(content,{ariaLabelledBy: 'modal-basic-title'})
  }
}
</code>```

I would expect the picture, not the url

Title: Angular image modal popup

Body:
I should create a pop up that opens after clicking on an image and displays that image bigger. But I get the url instead of the image. I used bootstrap's ngbModal

Details.component.html

Details.component.ts

import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute } from '@angular/router';
import { ProductsService } from 'app/core/services/products.service';
import { Products,Product } from 'app/shared/model/products-model';
import { PopUpComponent } from '../pop-up/pop-up.component';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';

@Component({
  selector: 'lpr-details',
  templateUrl: './details.component.html',
  styleUrls: ['./details.component.scss']
})
export class DetailsComponent implements OnInit {
  sku: any;
  subCategory: Product;
  data: any={};
  quantity: number=1;
  i=1;

  constructor(
    private route: ActivatedRoute,
    private productService: ProductsService,
    private dialogRef: MatDialog,
    private modalService: NgbModal

  ) {
    this.sku=this.route.snapshot.paramMap.get('sku')
    console.log(this.sku)
  }

  ngOnInit(): void {
    this.getProductbySku()
  }

  getProductbySku(){
    this.productService.getProductsBySku(this.sku)
    .subscribe(res=>{
      this.sku=res;
    })
  }

  open(content: any){
    this.modalService.open(content,{ariaLabelledBy: 'modal-basic-title'})
  }
}

I would expect the picture, not the url


问:
Getting this error in ffmpeg pipeline: Non-monotonous DTS in output stream 0:0; previous: 4951970, current: 4951659; changing to 4951971
Error: Non-monotonous DTS in output stream 0:0; previous: 4951970, current: 4951659; changing to 4951971. This may result in incorrect timestamps in the output file.

I am using AWS Chime streaming then passing there data stream to FFMPEG and then going live with that data stream using AWS IVS(Interactive video service).
I am using ffmpeg for changing aspects of video on live streaming and brightness and contrast.
But when we turn off camera and after some time reopen it we facing the above mention error.
I have read about concat but we don't have input file actually we are passing data stream is ffmpeg that's why its not working.

Here is my ffmpeg command

```<code>ffmpeg=ffmpeg.spawn('ffmpeg', [
            '-i', '-' ,
            // '-f', 'concat',
            // '-segment_time_metadata','1',
            // '-use_wallclock_as_timestamps', '1',
            '-c:v', 'libx264',
            '-b:v', '2567k',
            '-maxrate', '6000K',
            '-preset', 'ultrafast',
            '-profile:v', 'baseline',
            '-level', '3.0',
            // '-aspect', '9:16',
            '-force_key_frames', 'expr:gte(t,n_forced*2)',
            '-movflags', 'faststart',
            '-fflags', 'nobuffer',
            '-tune', 'zerolatency',
            '-acodec', 'aac',
            '-ab', '160k',
            '-ar', '44100',
            '-f', 'flv',
            'rtmps-url/secret-key-replaced'
        ])
</code>```

I have tried this command -use_wallclock_as_timestamps', '1' but it does nothing to error.

Body:
Error: Non-monotonous DTS in output stream 0:0; previous: 4951970, current: 4951659; changing to 4951971. This may result in incorrect timestamps in the output file.

I am using AWS Chime streaming then passing there data stream to FFMPEG and then going live with that data stream using AWS IVS(Interactive video service).
I am using ffmpeg for changing aspects of video on live streaming and brightness and contrast.
But when we turn off camera and after some time reopen it we facing the above mention error.
I have read about concat but we don't have input file actually we are passing data stream is ffmpeg that's why its not working.

Here is my ffmpeg command

ffmpeg=ffmpeg.spawn('ffmpeg', [
            '-i', '-' ,
            // '-f', 'concat',
            // '-segment_time_metadata','1',
            // '-use_wallclock_as_timestamps', '1',
            '-c:v', 'libx264',
            '-b:v', '2567k',
            '-maxrate', '6000K',
            '-preset', 'ultrafast',
            '-profile:v', 'baseline',
            '-level', '3.0',
            // '-aspect', '9:16',
            '-force_key_frames', 'expr:gte(t,n_forced*2)',
            '-movflags', 'faststart',
            '-fflags', 'nobuffer',
            '-tune', 'zerolatency',
            '-acodec', 'aac',
            '-ab', '160k',
            '-ar', '44100',
            '-f', 'flv',
            'rtmps-url/secret-key-replaced'
        ])

I have tried this command -use_wallclock_as_timestamps', '1' but it does nothing to error.


问:
Extension shortcuts not working in Selenium
I've created a shortcut to the extension that starts up whenever I press Ctrl+Shift+Z. The shortcut works when I manually use it on the chromedriver browser. I opened a keyboard tracking website that confirms that the keys are being pressed by the selenium script, yet doesn't activate it. If I manually press Ctrl+Shift+Z on my keyboard while the webdriver is open it activates the extension so there's no issue with the extension or webdriver. I'm unsure as to why this is, and I've tried multiple methods</p>
```<code>driver.get("https://en.key-test.ru/")
actionSteps = ActionChains(driver)
time.sleep(5)
driver.find_element(By.XPATH, '//body').send_keys(Keys.CONTROL + Keys.SHIFT + 'z') #method 1
driver.find_element(By.TAG_NAME, "body").send_keys(Keys.CONTROL + Keys.SHIFT + "z") #method 2
actionSteps.click.key_down(Keys.CONTROL).key_down(Keys.SHIFT).pause(1).send_keys('Z').key_up(Keys.CONTROL).key_up(Keys.SHIFT).perform() #method 3
</code>```

Body:
I've created a shortcut to the extension that starts up whenever I press Ctrl+Shift+Z. The shortcut works when I manually use it on the chromedriver browser. I opened a keyboard tracking website that confirms that the keys are being pressed by the selenium script, yet doesn't activate it. If I manually press Ctrl+Shift+Z on my keyboard while the webdriver is open it activates the extension so there's no issue with the extension or webdriver. I'm unsure as to why this is, and I've tried multiple methods

driver.get("https://en.key-test.ru/")
actionSteps = ActionChains(driver)
time.sleep(5)
driver.find_element(By.XPATH, '//body').send_keys(Keys.CONTROL + Keys.SHIFT + 'z') #method 1
driver.find_element(By.TAG_NAME, "body").send_keys(Keys.CONTROL + Keys.SHIFT + "z") #method 2
actionSteps.click.key_down(Keys.CONTROL).key_down(Keys.SHIFT).pause(1).send_keys('Z').key_up(Keys.CONTROL).key_up(Keys.SHIFT).perform() #method 3


问:
Pass argument in shellscript after creating exe with pyinstaller
Below is my shellscript:

```<code>& 'C:\files\service_file.exe' install

#Start the windows service
& 'C:\file\service_file.exe' start --env "D:\full_project\device\config\windows.env"
</code>```

I used pyinstaller to create service_file.exe and 'start' arg is working fine but does not support env path if included

I get path not found error, even after giving the env.

below is my service_file.py

```<code>import os
import win32serviceutil
import win32service
import servicemanager
import argparse

class MyService:
    def stop(self):
        self.running = False

    def run(self):
        application_path = os.path.dirname(sys.executable)
        os.chdir(application_path)

        def load_env(envFile):
            global env_obj
            env_obj = Environment(envFile)
            return env_obj

        parser = argparse.ArgumentParser(description="testing")
        parser.add_argument("--env")
        parser.add_argument("--log")
        args = parser.parse_args()
        env_obj = load_env(args.env)

        db_agent(env_obj)
        db_agent_download(env_obj)

        client_agent(env_obj)
        init_scheduler()

        app = rest_api(env_obj)
        app.run(port=env_obj.rest_api_port, host="0.0.0.0")

class MyServiceFramework(win32serviceutil.ServiceFramework):
    _svc_name_ = 'DeviceAgent'
    _svc_display_name_ = 'Device Agent Service'

    def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        self.service_impl.stop()
        self.ReportServiceStatus(win32service.SERVICE_STOPPED)

    def SvcDoRun(self):
        self.service_impl = MyService()
        self.ReportServiceStatus(win32service.SERVICE_START_PENDING)
        self.ReportServiceStatus(win32service.SERVICE_RUNNING)
        self.service_impl.run()

def Main():

    if len(sys.argv) == 1:
        print("this is if")
        servicemanager.Initialize()
        servicemanager.PrepareToHostSingle(MyServiceFramework)
        servicemanager.StartServiceCtrlDispatcher()
    else:
        print("this is else",sys.argv)
        win32serviceutil.HandleCommandLine(MyServiceFramework)

if __name__ == '__main__':
    Main()
</code>```

What should i do ? how can i run the shellscript along with env.
I want to know how i should pass the argument for env

Body:
Below is my shellscript:

& 'C:\files\service_file.exe' install

#Start the windows service
& 'C:\file\service_file.exe' start --env "D:\full_project\device\config\windows.env"

I used pyinstaller to create service_file.exe and 'start' arg is working fine but does not support env path if included

I get path not found error, even after giving the env.

below is my service_file.py

import os
import win32serviceutil
import win32service
import servicemanager
import argparse

class MyService:
    def stop(self):
        self.running = False

    def run(self):
        application_path = os.path.dirname(sys.executable)
        os.chdir(application_path)

        def load_env(envFile):
            global env_obj
            env_obj = Environment(envFile)
            return env_obj

        parser = argparse.ArgumentParser(description="testing")
        parser.add_argument("--env")
        parser.add_argument("--log")
        args = parser.parse_args()
        env_obj = load_env(args.env)

        db_agent(env_obj)
        db_agent_download(env_obj)

        client_agent(env_obj)
        init_scheduler()

        app = rest_api(env_obj)
        app.run(port=env_obj.rest_api_port, host="0.0.0.0")

class MyServiceFramework(win32serviceutil.ServiceFramework):
    _svc_name_ = 'DeviceAgent'
    _svc_display_name_ = 'Device Agent Service'

    def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        self.service_impl.stop()
        self.ReportServiceStatus(win32service.SERVICE_STOPPED)

    def SvcDoRun(self):
        self.service_impl = MyService()
        self.ReportServiceStatus(win32service.SERVICE_START_PENDING)
        self.ReportServiceStatus(win32service.SERVICE_RUNNING)
        self.service_impl.run()

def Main():

    if len(sys.argv) == 1:
        print("this is if")
        servicemanager.Initialize()
        servicemanager.PrepareToHostSingle(MyServiceFramework)
        servicemanager.StartServiceCtrlDispatcher()
    else:
        print("this is else",sys.argv)
        win32serviceutil.HandleCommandLine(MyServiceFramework)

if __name__ == '__main__':
    Main()

What should i do ? how can i run the shellscript along with env.
I want to know how i should pass the argument for env


问:
i have error Exception caught by widgets library
Please Help me
i have error Exception caught by widgets library .
The following _CastError was thrown building FeedScreen(dirty, dependencies: [MediaQuery], state: _FeedScreenState#9496a):
Null check operator used on a null value

i have error Exception caught by widgets library .
The following _CastError was thrown building FeedScreen(dirty, dependencies: [MediaQuery], state: _FeedScreenState#9496a):
Null check operator used on a null value and i want know how can i make my code auto reloade when usre following or unfollowing

```<code>class FeedScreen extends StatefulWidget {
  const FeedScreen({Key? key}) : super(key: key);

  @override
  State<FeedScreen> createState() => _FeedScreenState();
}

class _FeedScreenState extends State<FeedScreen> {

  @override
  Widget build(BuildContext context) {

    final width = MediaQuery.of(context).size.width;

    final model.User user =
        Provider.of<UserProvider>(context, listen: false).getUser;
    user.following.add(user.uid);
    final List filter = user.following;

    return Scaffold(
        backgroundColor:
            width > webScreenSize ? webBackgroundColor : mobileBackgroundColor,
        appBar: AppBar(
          backgroundColor: mobileBackgroundColor,
          centerTitle: false,
          title: SvgPicture.asset(
            'assets/logo.svg',
            color: primaryColor,
            height: 32,
          ),
          actions: [
            IconButton(
              icon: const Icon(
                Icons.add_a_photo,
                color: primaryColor,
              ),
              onPressed: () {
                Get.to(Scaffold(
                    appBar: AppBar(
                      backgroundColor: mobileBackgroundColor,
                      title: Text('uplode yor post'),
                    ),
                    body: const AddPostScreen()));
              },
            ),
            IconButton(
              icon: const Icon(
                Icons.search_outlined,
                color: primaryColor,
              ),
              onPressed: () {
                Get.to(const SearchScreen());
              },
            ),
            IconButton(
              icon: const Icon(
                Icons.messenger_outline,
                color: primaryColor,
              ),
              onPressed: () {
                Get.to(ChatHomeScreen());
              },
            ),
            IconButton(
              icon: const Icon(
                Icons.notification_important,
                color: primaryColor,
              ),
              onPressed: () {},
            ),
          ],
        ),
        body: StreamBuilder(
          stream: FirebaseFirestore.instance
              .collection('posts')
              .where('uid', whereIn: filter)
              .snapshots(),
          builder: (context,
              AsyncSnapshot<QuerySnapshot<Map<String, dynamic>>> snapshot) {
            if (snapshot.connectionState == ConnectionState.waiting) {
              return const Center(
                child: CircularProgressIndicator(),
              );
            }
            return ListView.builder(
              shrinkWrap: true,
              physics: const BouncingScrollPhysics(),
              itemCount: snapshot.data!.docs.length,
              itemBuilder: (ctx, index) => Container(
                margin: EdgeInsets.symmetric(
                  horizontal: width > webScreenSize ? width * 0.3 : 0,
                  vertical: width > webScreenSize ? 15 : 0,
                ),
                child: PostCard(
                  snap: snapshot.data!.docs[index].data(),
                ),
              ),
            );
          },
        ));
  }
}
</code>```

Body:
Please Help me
i have error Exception caught by widgets library .
The following _CastError was thrown building FeedScreen(dirty, dependencies: [MediaQuery], state: _FeedScreenState#9496a):
Null check operator used on a null value

i have error Exception caught by widgets library .
The following _CastError was thrown building FeedScreen(dirty, dependencies: [MediaQuery], state: _FeedScreenState#9496a):
Null check operator used on a null value and i want know how can i make my code auto reloade when usre following or unfollowing

class FeedScreen extends StatefulWidget {
  const FeedScreen({Key? key}) : super(key: key);

  @override
  State<FeedScreen> createState() => _FeedScreenState();
}

class _FeedScreenState extends State<FeedScreen> {

  @override
  Widget build(BuildContext context) {

    final width = MediaQuery.of(context).size.width;

    final model.User user =
        Provider.of<UserProvider>(context, listen: false).getUser;
    user.following.add(user.uid);
    final List filter = user.following;

    return Scaffold(
        backgroundColor:
            width > webScreenSize ? webBackgroundColor : mobileBackgroundColor,
        appBar: AppBar(
          backgroundColor: mobileBackgroundColor,
          centerTitle: false,
          title: SvgPicture.asset(
            'assets/logo.svg',
            color: primaryColor,
            height: 32,
          ),
          actions: [
            IconButton(
              icon: const Icon(
                Icons.add_a_photo,
                color: primaryColor,
              ),
              onPressed: () {
                Get.to(Scaffold(
                    appBar: AppBar(
                      backgroundColor: mobileBackgroundColor,
                      title: Text('uplode yor post'),
                    ),
                    body: const AddPostScreen()));
              },
            ),
            IconButton(
              icon: const Icon(
                Icons.search_outlined,
                color: primaryColor,
              ),
              onPressed: () {
                Get.to(const SearchScreen());
              },
            ),
            IconButton(
              icon: const Icon(
                Icons.messenger_outline,
                color: primaryColor,
              ),
              onPressed: () {
                Get.to(ChatHomeScreen());
              },
            ),
            IconButton(
              icon: const Icon(
                Icons.notification_important,
                color: primaryColor,
              ),
              onPressed: () {},
            ),
          ],
        ),
        body: StreamBuilder(
          stream: FirebaseFirestore.instance
              .collection('posts')
              .where('uid', whereIn: filter)
              .snapshots(),
          builder: (context,
              AsyncSnapshot<QuerySnapshot<Map<String, dynamic>>> snapshot) {
            if (snapshot.connectionState == ConnectionState.waiting) {
              return const Center(
                child: CircularProgressIndicator(),
              );
            }
            return ListView.builder(
              shrinkWrap: true,
              physics: const BouncingScrollPhysics(),
              itemCount: snapshot.data!.docs.length,
              itemBuilder: (ctx, index) => Container(
                margin: EdgeInsets.symmetric(
                  horizontal: width > webScreenSize ? width * 0.3 : 0,
                  vertical: width > webScreenSize ? 15 : 0,
                ),
                child: PostCard(
                  snap: snapshot.data!.docs[index].data(),
                ),
              ),
            );
          },
        ));
  }
}


问:
Overlapping of detail that I want to show in my detail screen

```<code> @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: ()
      {
        Navigator.push(context, MaterialPageRoute(builder: (c)=> HistoryDetailScreen(orderID: orderID)));
      },
      child: FutureBuilder<DocumentSnapshot>(
        future: FirebaseFirestore.instance
            .collection("orders")
            .doc(orderID)
            .get(),
        builder: (c, snapshot)
        {
          Map? dataMap;
          if(snapshot.hasData)
          {
            dataMap = snapshot.data!.data()! as Map<String, dynamic>;
            totalAmount = dataMap["totalAmount"].toString();
            customerName = dataMap["orderBy"].toString();
          }
          return snapshot.hasData
              ?
          Container(
            margin: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                SizedBox(height: 5,),
                Text(
                  "ORDER ID: "+customerName.toString(),
                  style: const TextStyle(
                    color: Colors.black,
                    fontSize: 16,
                    fontFamily: "Acme",
                  ),
                ),
                SizedBox(height: 5),
                Text(
                  "Total Amount: ₱" + totalAmount.toString(),
                  style: const TextStyle(
                    fontWeight: FontWeight.w500,
                    color: Colors.black,
                    fontSize: 16,
                    fontFamily: "Acme",
                  ),
                ),
                SizedBox(height: 5,),
                Text(
                  "More Info >>",
                  style: const TextStyle(
                    color: Colors.grey,
                    fontSize: 13,
                    fontFamily: "Acme",
                  ),
                ),
                Container(
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(10),
                      color: Colors.white
                  ),
                  padding: const EdgeInsets.all(5),
                  margin: const EdgeInsets.all(5),
                  height: itemCount! * 50,
                  child: Stack(
                    children: [
                      Padding(padding: EdgeInsets.all(10)),
                      ListView.builder(
                        itemCount: itemCount,
                        physics: BouncingScrollPhysics(),
                        itemBuilder: (context, index)
                        {
                          Items model = Items.fromJson(data![index].data()! as Map<String, dynamic>);
                          return Align(
                            heightFactor: 0.3,
                            alignment: Alignment.topCenter,
                            child: placedOrderDesignWidget(model, context, seperateQuantitiesList![index]),
                          );
                        },
                      ),
                    ],
                  ),
                ),
              ],
            ),
          )
              :Center(child: circularProgress(),);
        },
      ),
    );
  }
}

Widget placedOrderDesignWidget(Items model, BuildContext context, seperateQuantitiesList)
{
  return Container(
    width: MediaQuery.of(context).size.width,
    height: 110,

    child: Container(
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(10),
        boxShadow: [
          BoxShadow(
            color: Colors.grey.withOpacity(0.5),
            spreadRadius: 3,
            blurRadius: 3,
            offset: Offset(0, 3), // changes position of shadow
          ),
        ],
      ),
      child: Row(
        children: [
          ClipRRect(
            borderRadius: BorderRadius.circular(10.0), //add border radius
            child: Image.network(model.thumbnailUrl!, width: 90, height: 90, fit: BoxFit.cover,),
          ),
          const SizedBox(width: 10.0,),
          Expanded(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                const SizedBox(
                  height: 10,
                ),
                Row(
                  mainAxisSize: MainAxisSize.max,
                  children: [
                    Expanded(
                      child: Text(
                        model.name! + " x " + seperateQuantitiesList,
                        style: const TextStyle(
                          color: Colors.black,
                          fontSize: 16,
                          fontFamily: "Acme",
                        ),
                      ),
                    ),
                    const SizedBox(
                      width: 5,
                    ),
                  ],
                ),
                Text(
                  "₱ " + model.price.toString(),
                  style: TextStyle(fontSize: 16.0, color: Colors.blue),
                ),
              ],
            ),
          ),
        ],
      ),
    ),
  );
}
</code>```

I wanted to avoid the overlapping of data that being shown in my screen

Body:
 @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: ()
      {
        Navigator.push(context, MaterialPageRoute(builder: (c)=> HistoryDetailScreen(orderID: orderID)));
      },
      child: FutureBuilder<DocumentSnapshot>(
        future: FirebaseFirestore.instance
            .collection("orders")
            .doc(orderID)
            .get(),
        builder: (c, snapshot)
        {
          Map? dataMap;
          if(snapshot.hasData)
          {
            dataMap = snapshot.data!.data()! as Map<String, dynamic>;
            totalAmount = dataMap["totalAmount"].toString();
            customerName = dataMap["orderBy"].toString();
          }
          return snapshot.hasData
              ?
          Container(
            margin: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                SizedBox(height: 5,),
                Text(
                  "ORDER ID: "+customerName.toString(),
                  style: const TextStyle(
                    color: Colors.black,
                    fontSize: 16,
                    fontFamily: "Acme",
                  ),
                ),
                SizedBox(height: 5),
                Text(
                  "Total Amount: ₱" + totalAmount.toString(),
                  style: const TextStyle(
                    fontWeight: FontWeight.w500,
                    color: Colors.black,
                    fontSize: 16,
                    fontFamily: "Acme",
                  ),
                ),
                SizedBox(height: 5,),
                Text(
                  "More Info >>",
                  style: const TextStyle(
                    color: Colors.grey,
                    fontSize: 13,
                    fontFamily: "Acme",
                  ),
                ),
                Container(
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(10),
                      color: Colors.white
                  ),
                  padding: const EdgeInsets.all(5),
                  margin: const EdgeInsets.all(5),
                  height: itemCount! * 50,
                  child: Stack(
                    children: [
                      Padding(padding: EdgeInsets.all(10)),
                      ListView.builder(
                        itemCount: itemCount,
                        physics: BouncingScrollPhysics(),
                        itemBuilder: (context, index)
                        {
                          Items model = Items.fromJson(data![index].data()! as Map<String, dynamic>);
                          return Align(
                            heightFactor: 0.3,
                            alignment: Alignment.topCenter,
                            child: placedOrderDesignWidget(model, context, seperateQuantitiesList![index]),
                          );
                        },
                      ),
                    ],
                  ),
                ),
              ],
            ),
          )
              :Center(child: circularProgress(),);
        },
      ),
    );
  }
}

Widget placedOrderDesignWidget(Items model, BuildContext context, seperateQuantitiesList)
{
  return Container(
    width: MediaQuery.of(context).size.width,
    height: 110,

    child: Container(
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(10),
        boxShadow: [
          BoxShadow(
            color: Colors.grey.withOpacity(0.5),
            spreadRadius: 3,
            blurRadius: 3,
            offset: Offset(0, 3), // changes position of shadow
          ),
        ],
      ),
      child: Row(
        children: [
          ClipRRect(
            borderRadius: BorderRadius.circular(10.0), //add border radius
            child: Image.network(model.thumbnailUrl!, width: 90, height: 90, fit: BoxFit.cover,),
          ),
          const SizedBox(width: 10.0,),
          Expanded(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                const SizedBox(
                  height: 10,
                ),
                Row(
                  mainAxisSize: MainAxisSize.max,
                  children: [
                    Expanded(
                      child: Text(
                        model.name! + " x " + seperateQuantitiesList,
                        style: const TextStyle(
                          color: Colors.black,
                          fontSize: 16,
                          fontFamily: "Acme",
                        ),
                      ),
                    ),
                    const SizedBox(
                      width: 5,
                    ),
                  ],
                ),
                Text(
                  "₱ " + model.price.toString(),
                  style: TextStyle(fontSize: 16.0, color: Colors.blue),
                ),
              ],
            ),
          ),
        ],
      ),
    ),
  );
}

I wanted to avoid the overlapping of data that being shown in my screen


问:
Problem debug react apps with visual code
Is it possible for Visual Code to show me exactly in which line of my program there is an error? In the image, it only shows me the text of the error, but dosen't  show where it occurs in my program.

enter image description here

I tried change the file launch.json

```<code>{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "pwa-chrome",
            "request": "launch",
             "outputCapture": "std",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:3000",
            "webRoot": "${workspaceFolder}",
            "skipFiles": [
                "${workspaceFolder}/<node_internals>/**",
                "${workspaceFolder}/node_modules/**"
            ]
        }
    ]
}
</code>```

Body:
Is it possible for Visual Code to show me exactly in which line of my program there is an error? In the image, it only shows me the text of the error, but dosen't  show where it occurs in my program.

enter image description here

I tried change the file launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "pwa-chrome",
            "request": "launch",
             "outputCapture": "std",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:3000",
            "webRoot": "${workspaceFolder}",
            "skipFiles": [
                "${workspaceFolder}/<node_internals>/**",
                "${workspaceFolder}/node_modules/**"
            ]
        }
    ]
}


问:
Python Pandas write '1' if row equal 0.040 else write '2'
I want to write '1' if maintain_margin == 0.040 in a new column named 'leverage' and write '2' if maintain_margin < 0.040
But my code always write 2. I don't know what is wrong.

My df is like this:

```<code>                symbol  maintain_margin  max_leverage
0     10000NFTUSDT            0.040          12.5
15     1000BTTUSDT            0.040          12.5
30    1000LUNCUSDT            0.020          25.0
45     1000XECUSDT            0.040          12.5
60       1INCHUSDT            0.020          25.0
75        AAVEUSDT            0.020          25.0
90         ACHUSDT            0.040          12.5
105        ADAUSDT            0.010          50.0
135       AGLDUSDT            0.020          25.0
</code>```

my expected result:

```<code>                symbol  maintain_margin  max_leverage leverage
0     10000NFTUSDT            0.040          12.5        1
15     1000BTTUSDT            0.040          12.5        1
30    1000LUNCUSDT            0.020          25.0        2
45     1000XECUSDT            0.040          12.5        1
60       1INCHUSDT            0.020          25.0        2
75        AAVEUSDT            0.020          25.0        2
90         ACHUSDT            0.040          12.5        1
105        ADAUSDT            0.010          50.0        2
135       AGLDUSDT            0.020          25.0        2
</code>```

my code is like this:

```<code>bybit = requests.get('https://api.bybit.com/public/linear/risk-limit')
e = bybit.json()
df_risk = pd.DataFrame(e['result'])
df_risk = df_risk[df_risk.is_lowest_risk != 0]
df_risk = df_risk.drop(['id', 'limit', 'starting_margin', 'section', 'is_lowest_risk', 'created_at', 'updated_at'], axis=1)
df_risk["leverage"] = ["1" if ele  == "0.040" else "2" for ele in df_risk["maintain_margin"]]
print(df_risk)
</code>```

Body:
I want to write '1' if maintain_margin == 0.040 in a new column named 'leverage' and write '2' if maintain_margin < 0.040
But my code always write 2. I don't know what is wrong.

My df is like this:

                symbol  maintain_margin  max_leverage
0     10000NFTUSDT            0.040          12.5
15     1000BTTUSDT            0.040          12.5
30    1000LUNCUSDT            0.020          25.0
45     1000XECUSDT            0.040          12.5
60       1INCHUSDT            0.020          25.0
75        AAVEUSDT            0.020          25.0
90         ACHUSDT            0.040          12.5
105        ADAUSDT            0.010          50.0
135       AGLDUSDT            0.020          25.0

my expected result:

                symbol  maintain_margin  max_leverage leverage
0     10000NFTUSDT            0.040          12.5        1
15     1000BTTUSDT            0.040          12.5        1
30    1000LUNCUSDT            0.020          25.0        2
45     1000XECUSDT            0.040          12.5        1
60       1INCHUSDT            0.020          25.0        2
75        AAVEUSDT            0.020          25.0        2
90         ACHUSDT            0.040          12.5        1
105        ADAUSDT            0.010          50.0        2
135       AGLDUSDT            0.020          25.0        2

my code is like this:

bybit = requests.get('https://api.bybit.com/public/linear/risk-limit')
e = bybit.json()
df_risk = pd.DataFrame(e['result'])
df_risk = df_risk[df_risk.is_lowest_risk != 0]
df_risk = df_risk.drop(['id', 'limit', 'starting_margin', 'section', 'is_lowest_risk', 'created_at', 'updated_at'], axis=1)
df_risk["leverage"] = ["1" if ele  == "0.040" else "2" for ele in df_risk["maintain_margin"]]
print(df_risk)