问:
Multiple React applications in one Spring Boot project
We have a Spring Boot based project where our frontend is written in React and try to build a single war file that has React build inside it. Now, we need to add one more React app into it. I tried to refer to this link, but not able to achieve the result. What changes should be done in order to add two React apps inside one Spring Project? The new react project name is er360, as per the suggested stackoverflow link, we need to consider the react app as a module. But after that it is mentioned that the React app needs to refer parent pom, something like this:

pom.xml (er360) (React app)

```<code><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         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>

    <parent>
        <groupId>com.mart</groupId>
        <artifactId>Mart-MCL-NewUI</artifactId>
        <version>dev</version>
    </parent>

    <artifactId>er360</artifactId>
    <version>dev</version>

</project>
</code>```

This is my current
pom.xml (root)

```<code><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mart</groupId>
    <artifactId>Mart-MCL-NewUI</artifactId>
    <version>dev</version>
    <packaging>pom</packaging>
    <name>Mart-MCL-NewUI</name>
    <description>Mart Server</description>

    <properties>
        <revision>0.0.1-SNAPSHOT</revision>
        <java.version>16</java.version>
        <log4j2.version>2.18.0</log4j2.version>
        <commons-dbcp2.version>2.7.0</commons-dbcp2.version>
        <commons-lang3.version>3.10</commons-lang3.version>
        <commons-logging.version>1.2</commons-logging.version>
        <commons-pool.version>2.8.0</commons-pool.version>
        <jackson.version>2.13.2</jackson.version>
        <spring-boot.version>2.6.6</spring-boot.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
        <outputdir>${project.build.directory}</outputdir>
        <martAdminWorkingDirectory>${project.basedir}/MartAdmin</martAdminWorkingDirectory>
    </properties>

    <modules>
        <module>MartServer</module>
        <module>MartUpgrade</module>
        <module>er360</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-dbcp2</artifactId>
                <version>2.9.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.12.0</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-pool2</artifactId>
                <version>2.10.0</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.10.0</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.18.20</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.13.4.2</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.13.2</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>2.13.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>com.oracle.database.jdbc</groupId>
                <artifactId>ojdbc10</artifactId>
            </dependency>

            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.3.1</version>
            </dependency>

            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>2.3.4</version>
            </dependency>

            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-core</artifactId>
                <version>2.3.0.1</version>
            </dependency>

            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20200518</version>
            </dependency>

            <dependency>
                <groupId>com.microsoft.sqlserver</groupId>
                <artifactId>mssql-jdbc</artifactId>
                <version>8.4.1.jre8</version>
            </dependency>

            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>42.2.22.jre7</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.commonjava.maven.plugins</groupId>
                <artifactId>directory-maven-plugin</artifactId>
                <version>0.1</version>
                <executions>
                    <execution>
                        <id>directories</id>
                        <goals>
                            <goal>directory-of</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <property>myproject.basedir</property>
                            <project>
                                <groupId>com.mart</groupId>
                                <artifactId>Mart-MCL-NewUI</artifactId>
                            </project>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <executions>
                    <execution>
                        <id>auto-clean</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <finalName>MartConfiguration</finalName>
    </build>

</project>
</code>```

pom.xml (MartServer) Spring Boot app

```<code><?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>com.mart</groupId>
        <artifactId>Mart-MCL-NewUI</artifactId>
        <version>dev</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>MartServer</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>

    <properties>
        <start-class>com.mart.mmappserver.MartSpringBootApplication</start-class>
        <log4jdbc.log4j2.version>1.16</log4jdbc.log4j2.version>
        <jjwt.version>0.11.2</jjwt.version>
        <rest.assured.version>2.3.3</rest.assured.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <type>pom</type>
                <version>${spring-boot.version}</version>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-server-jndi</artifactId>
            <version>2.0.0.AM26</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web-services</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </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>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws-support</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-ldap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>5.9.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna-platform -->
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
            <version>5.9.0</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.8</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/lib/gson-2.8.6-1a.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.21</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>3.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-dbcp2</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>5.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>5.7.1</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.3.2</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle.ojdbc</groupId>
            <artifactId>ojdbc10</artifactId>
            <version>19.3.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.github.eirslett</groupId>
            <artifactId>frontend-maven-plugin</artifactId>
            <version>1.12.0</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>${jjwt.version}</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>${jjwt.version}</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId>
            <version>${jjwt.version}</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.oracle.ojdbc/osdt_cert -->
        <dependency>
            <groupId>com.oracle.ojdbc</groupId>
            <artifactId>osdt_cert</artifactId>
            <version>19.3.0.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.oracle.ojdbc/osdt_core -->
        <dependency>
            <groupId>com.oracle.ojdbc</groupId>
            <artifactId>osdt_core</artifactId>
            <version>19.3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.oracle.ojdbc</groupId>
            <artifactId>oraclepki</artifactId>
            <version>19.3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.mchange</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.5.5</version>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-boot-starter</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>9.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-analyzers-common</artifactId>
            <version>8.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queryparser</artifactId>
            <version>9.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.gitlab4j</groupId>
            <artifactId>gitlab4j-api</artifactId>
            <version>5.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.kohsuke</groupId>
            <artifactId>github-api</artifactId>
            <version>1.133</version>
        </dependency>

    </dependencies>

    <build>
        <finalName>MartServer</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <webResources>
                        <resource>
                            <directory>${project.basedir}/src/main/resources/lib/</directory>
                            <targetPath>WEB-INF/lib</targetPath>
                            <includes>
                                <include>**/*.jar</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.12.0</version>
                <configuration>
                    <npmVersion>6.14.15</npmVersion>
                    <nodeVersion>v14.17.6</nodeVersion>
                    <workingDirectory>${myproject.basedir}/martadmin/</workingDirectory>
                    <installDirectory>${project.basedir}/target</installDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>npm install packages</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>

                    <execution>
                        <id>npm run build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes/public</outputDirectory>
                            <resources>
                                <resource>
                                    <!--suppress UnresolvedMavenProperty -->
                                    <directory>${myproject.basedir}/martadmin/build</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
</code>```

Body:
We have a Spring Boot based project where our frontend is written in React and try to build a single war file that has React build inside it. Now, we need to add one more React app into it. I tried to refer to this link, but not able to achieve the result. What changes should be done in order to add two React apps inside one Spring Project? The new react project name is er360, as per the suggested stackoverflow link, we need to consider the react app as a module. But after that it is mentioned that the React app needs to refer parent pom, something like this:

pom.xml (er360) (React app)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         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>

    <parent>
        <groupId>com.mart</groupId>
        <artifactId>Mart-MCL-NewUI</artifactId>
        <version>dev</version>
    </parent>

    <artifactId>er360</artifactId>
    <version>dev</version>

</project>

This is my current
pom.xml (root)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mart</groupId>
    <artifactId>Mart-MCL-NewUI</artifactId>
    <version>dev</version>
    <packaging>pom</packaging>
    <name>Mart-MCL-NewUI</name>
    <description>Mart Server</description>

    <properties>
        <revision>0.0.1-SNAPSHOT</revision>
        <java.version>16</java.version>
        <log4j2.version>2.18.0</log4j2.version>
        <commons-dbcp2.version>2.7.0</commons-dbcp2.version>
        <commons-lang3.version>3.10</commons-lang3.version>
        <commons-logging.version>1.2</commons-logging.version>
        <commons-pool.version>2.8.0</commons-pool.version>
        <jackson.version>2.13.2</jackson.version>
        <spring-boot.version>2.6.6</spring-boot.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
        <outputdir>${project.build.directory}</outputdir>
        <martAdminWorkingDirectory>${project.basedir}/MartAdmin</martAdminWorkingDirectory>
    </properties>

    <modules>
        <module>MartServer</module>
        <module>MartUpgrade</module>
        <module>er360</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-dbcp2</artifactId>
                <version>2.9.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.12.0</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-pool2</artifactId>
                <version>2.10.0</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.10.0</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.18.20</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.13.4.2</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.13.2</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>2.13.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>com.oracle.database.jdbc</groupId>
                <artifactId>ojdbc10</artifactId>
            </dependency>

            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.3.1</version>
            </dependency>

            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>2.3.4</version>
            </dependency>

            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-core</artifactId>
                <version>2.3.0.1</version>
            </dependency>

            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20200518</version>
            </dependency>

            <dependency>
                <groupId>com.microsoft.sqlserver</groupId>
                <artifactId>mssql-jdbc</artifactId>
                <version>8.4.1.jre8</version>
            </dependency>

            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>42.2.22.jre7</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.commonjava.maven.plugins</groupId>
                <artifactId>directory-maven-plugin</artifactId>
                <version>0.1</version>
                <executions>
                    <execution>
                        <id>directories</id>
                        <goals>
                            <goal>directory-of</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <property>myproject.basedir</property>
                            <project>
                                <groupId>com.mart</groupId>
                                <artifactId>Mart-MCL-NewUI</artifactId>
                            </project>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <executions>
                    <execution>
                        <id>auto-clean</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <finalName>MartConfiguration</finalName>
    </build>

</project>

pom.xml (MartServer) Spring Boot app

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>com.mart</groupId>
        <artifactId>Mart-MCL-NewUI</artifactId>
        <version>dev</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>MartServer</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>

    <properties>
        <start-class>com.mart.mmappserver.MartSpringBootApplication</start-class>
        <log4jdbc.log4j2.version>1.16</log4jdbc.log4j2.version>
        <jjwt.version>0.11.2</jjwt.version>
        <rest.assured.version>2.3.3</rest.assured.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <type>pom</type>
                <version>${spring-boot.version}</version>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-server-jndi</artifactId>
            <version>2.0.0.AM26</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web-services</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </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>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws-support</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-ldap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>5.9.0</version>
        </dependency>

        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
            <version>5.9.0</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.8</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/lib/gson-2.8.6-1a.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.21</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>3.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-dbcp2</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>5.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>5.7.1</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.3.2</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle.ojdbc</groupId>
            <artifactId>ojdbc10</artifactId>
            <version>19.3.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.github.eirslett</groupId>
            <artifactId>frontend-maven-plugin</artifactId>
            <version>1.12.0</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>${jjwt.version}</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>${jjwt.version}</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId>
            <version>${jjwt.version}</version>
        </dependency>

        <dependency>
            <groupId>com.oracle.ojdbc</groupId>
            <artifactId>osdt_cert</artifactId>
            <version>19.3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.oracle.ojdbc</groupId>
            <artifactId>osdt_core</artifactId>
            <version>19.3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.oracle.ojdbc</groupId>
            <artifactId>oraclepki</artifactId>
            <version>19.3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.mchange</groupId>
            <artifactId>c3p0</artifactId>
            <version>0.9.5.5</version>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-boot-starter</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>9.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-analyzers-common</artifactId>
            <version>8.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queryparser</artifactId>
            <version>9.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.gitlab4j</groupId>
            <artifactId>gitlab4j-api</artifactId>
            <version>5.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.kohsuke</groupId>
            <artifactId>github-api</artifactId>
            <version>1.133</version>
        </dependency>

    </dependencies>

    <build>
        <finalName>MartServer</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <webResources>
                        <resource>
                            <directory>${project.basedir}/src/main/resources/lib/</directory>
                            <targetPath>WEB-INF/lib</targetPath>
                            <includes>
                                <include>**/*.jar</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.12.0</version>
                <configuration>
                    <npmVersion>6.14.15</npmVersion>
                    <nodeVersion>v14.17.6</nodeVersion>
                    <workingDirectory>${myproject.basedir}/martadmin/</workingDirectory>
                    <installDirectory>${project.basedir}/target</installDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>npm install packages</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>

                    <execution>
                        <id>npm run build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes/public</outputDirectory>
                            <resources>
                                <resource>

                                    <directory>${myproject.basedir}/martadmin/build</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>


来源: stackexchange

问:
iTextSharp does not show Unicode symbols on pdf document
I have a little problem in ASP.NET Webforms I am using iTextSharp to create a pdf document. Everything works great, except the Unicode characters that are not displayed or they appear as question marks. Here is my code, if anyone knows what am I doing wrong I would be very grateful!

```<code>BaseFont base = BaseFont.CreateFont("C:\\Windows\\Fonts\\Wingdings.ttf", BaseFont.CP1252, BaseFont.EMBEDDED);
Font font = new Font(base, 12, Font.NORMAL, BaseColor.BLACK);
 using (MemoryStream ms = new MemoryStream())
        {
            using (var document = new Document())
            {
             HTMLWorker parser = new HTMLWorker(document);
             document.NewPage();
             string str = " \u2022 \u2706 ";
             Phrase phrase = new Phrase(str, font);
             document.Add(phrase);
             //and after that I have some other strings which are parsed with parser and that works perfectly
         }}
</code>```

I have tried to parse the phrase with XMLWorkerHelper, but it did not work at all. Also, I have tried to convert the string like this and the symbols appeared as question marks. I have tried to change the font like Wingding2, Wingding3 but it did not work.

```<code> byte[] bytestr = Encoding.Default.GetBytes(str);
 string convertstr = Encoding.UTF8.GetString(bytestr);
 Phrase phrase = new Phrase(convertstr, font);
 document.Add(phrase);
</code>```

Also I have tried to enter them like this, but also I've got the same result with the question marks

```<code>string str = "•✆";
Phrase phrase = new Phrase(str, font);
document.Add(phrase);
</code>```

EDIT: I have tried to change the font to Segoe UI Symbol and escape characters like \u260F, but still does not work.

ContentLicense: CC BY-SA 4.0

Body:
I have a little problem in ASP.NET Webforms I am using iTextSharp to create a pdf document. Everything works great, except the Unicode characters that are not displayed or they appear as question marks. Here is my code, if anyone knows what am I doing wrong I would be very grateful!

BaseFont base = BaseFont.CreateFont("C:\\Windows\\Fonts\\Wingdings.ttf", BaseFont.CP1252, BaseFont.EMBEDDED);
Font font = new Font(base, 12, Font.NORMAL, BaseColor.BLACK);
 using (MemoryStream ms = new MemoryStream())
        {
            using (var document = new Document())
            {
             HTMLWorker parser = new HTMLWorker(document);
             document.NewPage();
             string str = " \u2022 \u2706 ";
             Phrase phrase = new Phrase(str, font);
             document.Add(phrase);
             //and after that I have some other strings which are parsed with parser and that works perfectly
         }}

I have tried to parse the phrase with XMLWorkerHelper, but it did not work at all. Also, I have tried to convert the string like this and the symbols appeared as question marks. I have tried to change the font like Wingding2, Wingding3 but it did not work.

 byte[] bytestr = Encoding.Default.GetBytes(str);
 string convertstr = Encoding.UTF8.GetString(bytestr);
 Phrase phrase = new Phrase(convertstr, font);
 document.Add(phrase);

Also I have tried to enter them like this, but also I've got the same result with the question marks

string str = "•✆";
Phrase phrase = new Phrase(str, font);
document.Add(phrase);

EDIT: I have tried to change the font to Segoe UI Symbol and escape characters like \u260F, but still does not work.


问:
OpenGL line width/thickness
I've got two models in my openGL. I'm trying to set a line thickness of these models. I tried to do it by glLineWidth but it does not work.  How can I set line thickness of this models individually? Is it a good way to adjust the line thickness by glLineWidth or Is there a better way to do so?

Here is my code:

```<code>  vector<float> vertices1 = {};
   vector<float> vertices2;

    ShaderProgram sp(BASIC_VERTEX, BASIC_FRAGMENT);
    sp.bind();
    sp.setUniform4f("color", 1.0f, 1.0f, 1.0f, 1.0f);

    VertexBuffer VBO1(vertices1);
    //VBO_task1.setAttribute(0, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(float), NULL);
    VBO1.setAttribute(0, 2, GL_FLOAT, 2 * sizeof(float), 0);
    //VBO_task1.bind();

    int resolution = 1000;
    for (int i = 0; i < resolution; i++)
    {
        float t = (float(i) / float(resolution)) * (2 * 3.14159);
        vertices_task2.push_back((4.0 * cos(t) + cos(4 * t)) / 5.0);
        vertices_task2.push_back((4.0 * sin(t) - sin(4 * t)) / 5.0);
    }
    VertexBuffer VBO2(vertices2);
    VBO2.setAttribute(0, 2, GL_FLOAT, 2 * sizeof(float), 0);
    VBO2.bind();

    while (!glfwWindowShouldClose(window)) {
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

        float angle = ((fmod(glfwGetTime(), 5.0f)) / 5.0f) * 360.0;
        //sp.setUniform4f("input_color",1, 1, 0, 1);

        //glDrawArrays(GL_TRIANGLES, 0, vertices_task1.size() / 6);
        glm::mat4 projection(1.f);
        glm::mat4 model(1.f);
        glm::mat4 view(1.f);
        glm::mat4 model1 = glm::mat4(1.0f);

        //proj = glm::perspective(glm::radians(90.f), 800.f / 600.f, 1.0f, 10.f);
        model = glm::rotate(model, glm::radians(-angle++), glm::vec3(0.0f, 0.0f, 1.0f));
        //view = glm::lookAt(glm::vec3(-1.f, 2.f, 1.f), glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f, 1.f, 0.f));

        //sp.setUniformMatrix4fv("projection", proj);
        sp.setUniformMatrix4fv("model", model);

        //view = glm::lookAt(glm::vec3(1.f, 2.f, 2.f), glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f, 1.f, 0.f));
        //view = glm::rotate(view, glm::radians(0.1f), glm::vec3(0.0f, 1.0f, 0.0f));

        sp.setUniformMatrix4fv("proj", projection);
        sp.setUniformMatrix4fv("model", model);
        sp.setUniformMatrix4fv("view", view);
        //model = glm::rotate(model, glm::radians(30.f), glm::vec3(0.f, 1.f, 0.f));
       // sp.setUniformMatrix4fv("model", model);
        VBO1.bind();
        sp.setUniform4f("color", 0, 1, 0, 1);
        //
        //view = glm::rotate(view, glm::radians(angle++), glm::vec3(0.0f, 0.0f, 1.0f));
        glDrawArrays(GL_LINE_LOOP, 0, vertices_task1.size() / 2);

        VBO_task2.bind();
        sp.setUniform4f("color", 0.7, 0.5, 0.9, 1);
        //proj = glm::ortho(-2.f, 2.f, -2.f, 2.f);
        //sp.setUniformMatrix4fv("proj", proj);

        model1 = glm::scale(model1, glm::vec3(0.5f, 0.5f, 0.5f));
        model1 = glm::translate(model1, glm::vec3(1.f, 0.f, 0.f));
        model1 = glm::rotate(model1, glm::radians(angle++), glm::vec3(0.0f, 0.0f, 1.0f));

        sp.setUniformMatrix4fv("model", model1);

        glDrawArrays(GL_LINE_LOOP, 0, vertices_task2.size() / 2);

        glfwSwapBuffers(window);
        glfwPollEvents();
    }

    glfwTerminate();
    return 0;
}

</code>```

Title: OpenGL line width/thickness

Body:
I've got two models in my openGL. I'm trying to set a line thickness of these models. I tried to do it by glLineWidth but it does not work.  How can I set line thickness of this models individually? Is it a good way to adjust the line thickness by glLineWidth or Is there a better way to do so?

Here is my code:

  vector<float> vertices1 = {};
   vector<float> vertices2;

    ShaderProgram sp(BASIC_VERTEX, BASIC_FRAGMENT);
    sp.bind();
    sp.setUniform4f("color", 1.0f, 1.0f, 1.0f, 1.0f);

    VertexBuffer VBO1(vertices1);
    //VBO_task1.setAttribute(0, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(float), NULL);
    VBO1.setAttribute(0, 2, GL_FLOAT, 2 * sizeof(float), 0);
    //VBO_task1.bind();

    int resolution = 1000;
    for (int i = 0; i < resolution; i++)
    {
        float t = (float(i) / float(resolution)) * (2 * 3.14159);
        vertices_task2.push_back((4.0 * cos(t) + cos(4 * t)) / 5.0);
        vertices_task2.push_back((4.0 * sin(t) - sin(4 * t)) / 5.0);
    }
    VertexBuffer VBO2(vertices2);
    VBO2.setAttribute(0, 2, GL_FLOAT, 2 * sizeof(float), 0);
    VBO2.bind();

    while (!glfwWindowShouldClose(window)) {
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

        float angle = ((fmod(glfwGetTime(), 5.0f)) / 5.0f) * 360.0;
        //sp.setUniform4f("input_color",1, 1, 0, 1);

        //glDrawArrays(GL_TRIANGLES, 0, vertices_task1.size() / 6);
        glm::mat4 projection(1.f);
        glm::mat4 model(1.f);
        glm::mat4 view(1.f);
        glm::mat4 model1 = glm::mat4(1.0f);

        //proj = glm::perspective(glm::radians(90.f), 800.f / 600.f, 1.0f, 10.f);
        model = glm::rotate(model, glm::radians(-angle++), glm::vec3(0.0f, 0.0f, 1.0f));
        //view = glm::lookAt(glm::vec3(-1.f, 2.f, 1.f), glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f, 1.f, 0.f));

        //sp.setUniformMatrix4fv("projection", proj);
        sp.setUniformMatrix4fv("model", model);

        //view = glm::lookAt(glm::vec3(1.f, 2.f, 2.f), glm::vec3(0.f, 0.f, 0.f), glm::vec3(0.f, 1.f, 0.f));
        //view = glm::rotate(view, glm::radians(0.1f), glm::vec3(0.0f, 1.0f, 0.0f));

        sp.setUniformMatrix4fv("proj", projection);
        sp.setUniformMatrix4fv("model", model);
        sp.setUniformMatrix4fv("view", view);
        //model = glm::rotate(model, glm::radians(30.f), glm::vec3(0.f, 1.f, 0.f));
       // sp.setUniformMatrix4fv("model", model);
        VBO1.bind();
        sp.setUniform4f("color", 0, 1, 0, 1);
        //
        //view = glm::rotate(view, glm::radians(angle++), glm::vec3(0.0f, 0.0f, 1.0f));
        glDrawArrays(GL_LINE_LOOP, 0, vertices_task1.size() / 2);

        VBO_task2.bind();
        sp.setUniform4f("color", 0.7, 0.5, 0.9, 1);
        //proj = glm::ortho(-2.f, 2.f, -2.f, 2.f);
        //sp.setUniformMatrix4fv("proj", proj);

        model1 = glm::scale(model1, glm::vec3(0.5f, 0.5f, 0.5f));
        model1 = glm::translate(model1, glm::vec3(1.f, 0.f, 0.f));
        model1 = glm::rotate(model1, glm::radians(angle++), glm::vec3(0.0f, 0.0f, 1.0f));

        sp.setUniformMatrix4fv("model", model1);

        glDrawArrays(GL_LINE_LOOP, 0, vertices_task2.size() / 2);

        glfwSwapBuffers(window);
        glfwPollEvents();
    }

    glfwTerminate();
    return 0;
}


问:
utf-8 codec can't decode byte 0x87 in position 377: invalid start byte
The program is to accept a matrix and an integer and replace all the elements with asterisk('*') other than the elements present in upper left and right triangle and lower right and left triangle of size k.

code:

```<code>#include <stdio.h>

int main()
{
    int n, x, i, j;
    // Inputs
    printf("n: ");
    scanf("%d\n", &n);
    char a[n][n], b[n][n];
    printf("Enter the matrix elements\n");
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < n; j++)
        {
            printf("[%d][%d]: ", i, j);
            scanf("%c\n", &a[i][j]);
            b[i][j] = '*';
        }
    }
    printf("x: ");
    scanf("%d\n", &x);
    printf("x: %d\n",x);

    // Implementation
    // Top right and left triangles
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < x - i; j++)
        {
            b[i][j] = a[i][j];
        }
        for (j = n - 1; j >= (n - x) + i; j--)
        {
            b[i][j] = a[i][j];
        }
    }

    // Bottom right and left triangles
    int c = 0;
    for (i = n - 1; i >= (n - x); i--)
    {
        for (j = 0; j < x - c; j++)
        {
            b[i][j] = a[i][j];
        }
        for (j = n - 1; j >= (n-x) + c; j--)
        {
            b[i][j] = a[i][j];
        }
        c++;
    }

    // Printing the mat
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < n; j++)
        {
            printf("%c ", b[i][j]);
        }
        printf("\n");
    }

    return 0;
}

</code>```

The program works for inputs 1 through 8... I didn't try for inputs past 8 because its was tedious enough to type 64 elements, but when I submitted the program it showed that for test case of matrix size 50 the result was an error, specifically 'utf-8' codec can't decode byte 0x87 in position 377: invalid start byte
The program works fine for inputs 1 to 8. Any idea why this is happening?

Body:
The program is to accept a matrix and an integer and replace all the elements with asterisk('*') other than the elements present in upper left and right triangle and lower right and left triangle of size k.

code:

#include <stdio.h>

int main()
{
    int n, x, i, j;
    // Inputs
    printf("n: ");
    scanf("%d\n", &n);
    char a[n][n], b[n][n];
    printf("Enter the matrix elements\n");
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < n; j++)
        {
            printf("[%d][%d]: ", i, j);
            scanf("%c\n", &a[i][j]);
            b[i][j] = '*';
        }
    }
    printf("x: ");
    scanf("%d\n", &x);
    printf("x: %d\n",x);

    // Implementation
    // Top right and left triangles
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < x - i; j++)
        {
            b[i][j] = a[i][j];
        }
        for (j = n - 1; j >= (n - x) + i; j--)
        {
            b[i][j] = a[i][j];
        }
    }

    // Bottom right and left triangles
    int c = 0;
    for (i = n - 1; i >= (n - x); i--)
    {
        for (j = 0; j < x - c; j++)
        {
            b[i][j] = a[i][j];
        }
        for (j = n - 1; j >= (n-x) + c; j--)
        {
            b[i][j] = a[i][j];
        }
        c++;
    }

    // Printing the mat
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < n; j++)
        {
            printf("%c ", b[i][j]);
        }
        printf("\n");
    }

    return 0;
}

The program works for inputs 1 through 8... I didn't try for inputs past 8 because its was tedious enough to type 64 elements, but when I submitted the program it showed that for test case of matrix size 50 the result was an error, specifically 'utf-8' codec can't decode byte 0x87 in position 377: invalid start byte
The program works fine for inputs 1 to 8. Any idea why this is happening?


问:
Hierarchy in Package - : cannot find symbol. "Please remove or make sure it appears in the correct subdirectory of the classpath."
The hierarchy :

kolokwium2022:

zad1/

zad1/Main.java

zad1/Osoba.class

zad2/...

I have tried to add package  but still code doesn't work. I have to do it in Vim. However, in Intellij I don't have to specified any package. Why ? I also have all needed files here inside one package.

```<code>package zad1.Osoba;
//import Osoba.osoba;
//package kolokwium2022.zad1;
//package kolokwium2022.zad1.*;

public class Main{
public static void main(String[] args){
System.out.println("hello vim");
Osoba osoba = new Osoba("brzeczyszczykiewicz");
System.out.println(osoba.getNazwisko());

}}

package kolokwium2022.zad1;
public class Osoba{
        String nazwisko;
        // konstruktor
        Osoba(String nazwisko){
        this.nazwisko = nazwisko;}

        public String getNazwisko(){
        return nazwisko;}

        public String getOpis(){
        return "Nazwisko "+nazwisko;}

}
</code>```

Body:
The hierarchy :

kolokwium2022:

zad1/

zad1/Main.java

zad1/Osoba.class

zad2/...

I have tried to add package  but still code doesn't work. I have to do it in Vim. However, in Intellij I don't have to specified any package. Why ? I also have all needed files here inside one package.

package zad1.Osoba;
//import Osoba.osoba;
//package kolokwium2022.zad1;
//package kolokwium2022.zad1.*;

public class Main{
public static void main(String[] args){
System.out.println("hello vim");
Osoba osoba = new Osoba("brzeczyszczykiewicz");
System.out.println(osoba.getNazwisko());

}}

package kolokwium2022.zad1;
public class Osoba{
        String nazwisko;
        // konstruktor
        Osoba(String nazwisko){
        this.nazwisko = nazwisko;}

        public String getNazwisko(){
        return nazwisko;}

        public String getOpis(){
        return "Nazwisko "+nazwisko;}

}


问:
How to locate letters with DrawText() in MFC?
DrawText automatically breaks line when inputting text.

In single line I can use GetOutputTextExtent to locate a single letter. But with automatic line break I can't get the exact text of a single line. So I can't locate a letter (to be exact where the cursor is).

I have no experience in text editor in MFC-related programming.


问:
When should we create tables/views/stored procedures etc when using TestContainers
Since our tests requires many DB tables/views/storedprocs, would it be slow to create them for each test class initialization ? So where's the appropriate place to do it ?

Any advice would be greatly appreciated.

Best regards,

SetNug


问:
Code or tool to check last time a sql table was updated with result as date
Fairly new to SQL so please bear with... Trying to write SQL code or Rstudio function which will identify when a SQL table was last updated.

Is there a way of using the CAST(FROM_UNIXTIME.... In the same SHOW TBLPROPERTIES statement so the result is the correct date?

```<code>SHOW TBLPROPERTIES my_table('transient_lastDdlTime');

cast(from_unixtime(transient_lastDdlTime) AS TIMESTAMP);
</code>```

Body:
Fairly new to SQL so please bear with... Trying to write SQL code or Rstudio function which will identify when a SQL table was last updated.

Is there a way of using the CAST(FROM_UNIXTIME.... In the same SHOW TBLPROPERTIES statement so the result is the correct date?

SHOW TBLPROPERTIES my_table('transient_lastDdlTime');

cast(from_unixtime(transient_lastDdlTime) AS TIMESTAMP);


问:
CMake cannot generate protocolbuf headers and source files on Windows
I am trying to compile a .proto file on Windows using CMake (version 3.23.1). To this aim, I am using documentations that can be found here and here. But at the end, the .cc and .h files are not generated. Here is my CMakeLists.txt file:

```<code>project(test_proto)
cmake_minimum_required(VERSION 3.23)

set(Protobuf_DIR "C:/grpc/debug/cmake")
set(gRPC_DIR "C:/grpc/debug/lib/cmake/grpc")
set(ZLIB_ROOT "C:/zlib/debug")
set(c-ares_DIR "C:/grpc/debug/lib/cmake/c-ares")

find_package(Protobuf CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)

set(PROTO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/proto/server.proto)
add_library(test_proto ${PROTO_FILES})

target_link_libraries(test_proto
   PUBLIC protobuf::libprotobuf
   PUBLIC gRPC::grpc
   PUBLIC gRPC::grpc++
)

set(PROTO_BINARY_DIR  "${CMAKE_CURRENT_SOURCE_DIR}/tmp")
set(PROTO_IMPORT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/proto")

get_target_property(grpc_cpp_plugin_location gRPC::grpc_cpp_plugin LOCATION)
message(STATUS  " The value of grpc cpp location is: ${grpc_cpp_plugin_location}")

protobuf_generate(
    TARGET test_proto
    LANGUAGE cpp
    OUT_VAR PROTO_GENERATED_FILES
    IMPORT_DIRS ${PROTO_IMPORT_DIRS}
    PROTOC_OUT_DIR "${PROTO_BINARY_DIR}")

protobuf_generate(
    TARGET test_proto
    OUT_VAR PROTO_GENERATED_FILES
    LANGUAGE grpc
    GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc
    PLUGIN "protoc-gen-grpc=${grpc_cpp_plugin_location}"
    IMPORT_DIRS ${PROTO_IMPORT_DIRS}
    PROTOC_OUT_DIR "${PROTO_BINARY_DIR}")

message(STATUS " The generated files are located in: ${PROTO_GENERATED_FILES}")
</code>```

After running the above CMake file using this command:

```<code>cmake.exe -D CMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" -S D:\cmake-test -B D:\cmake-test
</code>```

I am getting this output:

```<code>-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.29.30137.0
-- The CXX compiler identification is MSVC 19.29.30137.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: c:/VS/MVS16117/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: c:/VS/MVS16117/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: C:/zlib/debug/lib/zlibd.lib (found version "1.2.11")
-- Found OpenSSL: optimized;C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MD.lib;debug;C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib (found version "3.0.3")
--  The value of grpc cpp location is: C:/grpc/debug/bin/grpc_cpp_plugin.exe
--  The generated files are located in: D:/cmake-test/tmp/proto/server.grpc.pb.h;D:/cmake-test/tmp/proto/server.grpc.pb.cc;D:/cmake-test/tmp/proto/serverPLUGIN;D:/cmake-test/tmp/proto/serverprotoc-gen-grpc=C:/data/tools/grpc/v1.15.1-2/win64/release/bin/grpc_cpp_plugin.exe
-- Configuring done
-- Generating done
-- Build files have been written to: D:/cmake-test
</code>```

without any errors. But the .h and .cc files are not generated. Any ideas?

Body:
I am trying to compile a .proto file on Windows using CMake (version 3.23.1). To this aim, I am using documentations that can be found here and here. But at the end, the .cc and .h files are not generated. Here is my CMakeLists.txt file:

project(test_proto)
cmake_minimum_required(VERSION 3.23)

set(Protobuf_DIR "C:/grpc/debug/cmake")
set(gRPC_DIR "C:/grpc/debug/lib/cmake/grpc")
set(ZLIB_ROOT "C:/zlib/debug")
set(c-ares_DIR "C:/grpc/debug/lib/cmake/c-ares")

find_package(Protobuf CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)

set(PROTO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/proto/server.proto)
add_library(test_proto ${PROTO_FILES})

target_link_libraries(test_proto
   PUBLIC protobuf::libprotobuf
   PUBLIC gRPC::grpc
   PUBLIC gRPC::grpc++
)

set(PROTO_BINARY_DIR  "${CMAKE_CURRENT_SOURCE_DIR}/tmp")
set(PROTO_IMPORT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/proto")

get_target_property(grpc_cpp_plugin_location gRPC::grpc_cpp_plugin LOCATION)
message(STATUS  " The value of grpc cpp location is: ${grpc_cpp_plugin_location}")

protobuf_generate(
    TARGET test_proto
    LANGUAGE cpp
    OUT_VAR PROTO_GENERATED_FILES
    IMPORT_DIRS ${PROTO_IMPORT_DIRS}
    PROTOC_OUT_DIR "${PROTO_BINARY_DIR}")

protobuf_generate(
    TARGET test_proto
    OUT_VAR PROTO_GENERATED_FILES
    LANGUAGE grpc
    GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc
    PLUGIN "protoc-gen-grpc=${grpc_cpp_plugin_location}"
    IMPORT_DIRS ${PROTO_IMPORT_DIRS}
    PROTOC_OUT_DIR "${PROTO_BINARY_DIR}")

message(STATUS " The generated files are located in: ${PROTO_GENERATED_FILES}")

After running the above CMake file using this command:

cmake.exe -D CMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" -S D:\cmake-test -B D:\cmake-test

I am getting this output:

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.29.30137.0
-- The CXX compiler identification is MSVC 19.29.30137.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: c:/VS/MVS16117/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: c:/VS/MVS16117/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: C:/zlib/debug/lib/zlibd.lib (found version "1.2.11")
-- Found OpenSSL: optimized;C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MD.lib;debug;C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib (found version "3.0.3")
--  The value of grpc cpp location is: C:/grpc/debug/bin/grpc_cpp_plugin.exe
--  The generated files are located in: D:/cmake-test/tmp/proto/server.grpc.pb.h;D:/cmake-test/tmp/proto/server.grpc.pb.cc;D:/cmake-test/tmp/proto/serverPLUGIN;D:/cmake-test/tmp/proto/serverprotoc-gen-grpc=C:/data/tools/grpc/v1.15.1-2/win64/release/bin/grpc_cpp_plugin.exe
-- Configuring done
-- Generating done
-- Build files have been written to: D:/cmake-test

without any errors. But the .h and .cc files are not generated. Any ideas?


问:
Is it possible to run the Javascript debug terminal outside of VSCode?
I want the Javascript debug terminal to be run outside of the vscode in the external linux terminal.
How can i do that?
Not found a single relevant answer in any platform.</p>


问:
Angular: how make history back when url is removed a hash
situation  I have url like  /goods#date
the #date hash is in history.
I want that when user click browser back button it leads to a page previous of the /goods.
(consider there is such page)

I tried to do it with Angular services Location and history but i get not success.

Now I use this approach:

```<code>...
...
    constructor(
      @Inject(DOCUMENT) private readonly documentRef: Document
  ) {
    if (this.documentRef.defaultView){

      this.documentRef.defaultView!.onhashchange = (event): void => {

        if (event instanceof HashChangeEvent){
          if (event.isTrusted
              && event.type === 'hashchange'
              && event.oldURL.startsWith(event.newURL)
              && event.newURL.indexOf('#') === -1){

              this.documentRef.defaultView.history.back();
          }

        }
      };
    }

  }
</code>```

which do not looks like so Angular way)
Maybe somebody have better solution?

Body:
situation  I have url like  /goods#date
the #date hash is in history.
I want that when user click browser back button it leads to a page previous of the /goods.
(consider there is such page)

I tried to do it with Angular services Location and history but i get not success.

Now I use this approach:

...
...
    constructor(
      @Inject(DOCUMENT) private readonly documentRef: Document
  ) {
    if (this.documentRef.defaultView){

      this.documentRef.defaultView!.onhashchange = (event): void => {

        if (event instanceof HashChangeEvent){
          if (event.isTrusted
              && event.type === 'hashchange'
              && event.oldURL.startsWith(event.newURL)
              && event.newURL.indexOf('#') === -1){

              this.documentRef.defaultView.history.back();
          }

        }
      };
    }

  }

which do not looks like so Angular way)
Maybe somebody have better solution?


问:
RegEx to get unique values from large file with duplicates
I have a large XML-file that I want to extract unique values from. The values I'm looking for are placed in the XML-tag: ns3:order_id
To make it more complex, the file contains duplicates of order_id, and I'm only interested in geeting the unique order_id values.

I've been using RegEx to extract the values, this is the expression:

```<code>(?sm)(\<ns3:order_id>\d+\b)(?!.*\1\b)
</code>```

The expression gives me what I need, BUT only if the file is way smaller. When I try this expression on the "big" file I receive: "Catastrophic backtracking has been detected and the execution of your expression has been halted." I guess it has with *, and I have tried different ways replacing it without success.

Is there any way to correct my expression so that I can collect the values?

As seen in the text above, I've tried several diffrent RegEx ways. The expression above works, but not in bigger files.

Body:
I have a large XML-file that I want to extract unique values from. The values I'm looking for are placed in the XML-tag: ns3:order_id
To make it more complex, the file contains duplicates of order_id, and I'm only interested in geeting the unique order_id values.

I've been using RegEx to extract the values, this is the expression:

(?sm)(\<ns3:order_id>\d+\b)(?!.*\1\b)

The expression gives me what I need, BUT only if the file is way smaller. When I try this expression on the "big" file I receive: "Catastrophic backtracking has been detected and the execution of your expression has been halted." I guess it has with *, and I have tried different ways replacing it without success.

Is there any way to correct my expression so that I can collect the values?

As seen in the text above, I've tried several diffrent RegEx ways. The expression above works, but not in bigger files.


问:
How to synchronize authentication between firebase and supabase?
I want to migrate the database part of my Firebase project to Supabase but I need to keep using Firebase Functions so I need to authenticate the user with Firebase.

Is it possible to "synchronize" the authentication information of for both platforms?


问:
Is there any way to get all request url

```<code>import mechanize
import json
import re
from bs4 import BeautifulSoup
url = "https://app.propertymeld.com/login/?next=/"
browser = mechanize.Browser()
browser.open(url)
browser.select_form(nr = 0)
browser.form['email'] = "aaa"
browser.form['password'] = "bbb"
result = browser.submit().read()
print(result)
soup = BeautifulSoup(result,"html.parser")
print(soup)
</code>```

Is there any method to get request url from the website. After the website login the url is been hidden. Only javascript is available.

Title: Is there any way to get all request url

Body:
import mechanize
import json
import re
from bs4 import BeautifulSoup
url = "https://app.propertymeld.com/login/?next=/"
browser = mechanize.Browser()
browser.open(url)
browser.select_form(nr = 0)
browser.form['email'] = "aaa"
browser.form['password'] = "bbb"
result = browser.submit().read()
print(result)
soup = BeautifulSoup(result,"html.parser")
print(soup)

Is there any method to get request url from the website. After the website login the url is been hidden. Only javascript is available.


问:
How to triger an event only if certain node condition is met?
I know that I can use the following code to do some action right after the node is created:

```<code>CREATE TRIGGER createVertex
ON () CREATE AFTER COMMIT EXECUTE
UNWIND createdVertices AS createdVertex
SET createdVertex.created = timestamp()
</code>```

But is it possible to run a trigger only if certain criteria are met, e.g. if a new node has a relationship to some other node?

I have a node person that is connected to a city, and I want to add a timestamp to it only if the city name is London. How can I do that?

Body:
I know that I can use the following code to do some action right after the node is created:

CREATE TRIGGER createVertex
ON () CREATE AFTER COMMIT EXECUTE
UNWIND createdVertices AS createdVertex
SET createdVertex.created = timestamp()

But is it possible to run a trigger only if certain criteria are met, e.g. if a new node has a relationship to some other node?

I have a node person that is connected to a city, and I want to add a timestamp to it only if the city name is London. How can I do that?


问:
MODALS BOOTSTRAP
I've trying to add a bootstrap's modal inside a for loop in html, and nothing seems to be working. I've tried everything. I saw another similar question where the problem was about the data attributes when using Bootstrap 5 but didn't work either. So I came to the conclusion that the problem resides in my syntax

Here is my layout.html head:

`

```<code><head>
        <title>{% block title %}Social Network{% endblock %}</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
        <link href="{% static '/network/styles.css' %}" rel="stylesheet">
        <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
    </head>
</code>```

`
I've also tried adding the js scripts at the bottom of my index.html page, where the modal is, and it didn't work

Here is the code inside my index.html page:

```<code><div id="all_posts" >
        {% for post in posts_of_the_page %}
            <div id="row_post">
               <h5 class="username"><a href="{% url 'profile' user_id=post.user.id %}">@{{ post.user }}</a></h5>
               <h6 class="content">{{ post.content }}</h6>
                <p class="date">{{ post.date }}</p>
                {% if user.is_authenticated %}
                    {% if user == post.user %}
                        <div class="modal fade" tabindex="-1" role="dialog" id="#edit_{{ post.id }}" aria-labelledby="#edit_{{ post.id }}_label">
                            <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                <h5 class="modal-title">Modal title</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">×</span>
                                </button>
                                </div>
                                <div class="modal-body">
                                <p>Modal body text goes here.</p>
                                </div>
                                <div class="modal-footer">
                                <button type="button" class="btn btn-primary">Save changes</button>
                                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                                </div>
                            </div>
                            </div>
                        </div>

                        <div class="d-flex">
                            <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#edit_{{ post.id }}">Edit</button>
                        </div>

                    {% endif %}
                {% endif %}
            </div>
        {% endfor %}
    </div>
</code>```

I saw another similar question where the problem was about the data attributes when using Bootstrap 5 but didn't work either. So I came to the conclusion that the problem resides in my syntax when using the for loop. Thanks in advance :)

Title: MODALS BOOTSTRAP

Body:
I've trying to add a bootstrap's modal inside a for loop in html, and nothing seems to be working. I've tried everything. I saw another similar question where the problem was about the data attributes when using Bootstrap 5 but didn't work either. So I came to the conclusion that the problem resides in my syntax

Here is my layout.html head:

`

        <title>{% block title %}Social Network{% endblock %}</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
        <link href="{% static '/network/styles.css' %}" rel="stylesheet">

`
I've also tried adding the js scripts at the bottom of my index.html page, where the modal is, and it didn't work

Here is the code inside my index.html page:

        {% for post in posts_of_the_page %}

@{{ post.user }}

{{ post.content }}

{{ post.date }}

                {% if user.is_authenticated %}
                    {% if user == post.user %}

Modal title

                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    ×
                                </button>

Modal body text goes here.

                                <button type="button" class="btn btn-primary">Save changes</button>
                                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>

                            <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#edit_{{ post.id }}">Edit</button>

                    {% endif %}
                {% endif %}

        {% endfor %}

I saw another similar question where the problem was about the data attributes when using Bootstrap 5 but didn't work either. So I came to the conclusion that the problem resides in my syntax when using the for loop. Thanks in advance :)


问:
RTK query subscribers reference count
How can you find out how many components are using the same endpoint at any moment of time in RTK Query? (how to find subscribers reference count)</p>

Title: RTK query subscribers reference count


问:
Feign Client throws unknown host exception with DNS name
I have created Spring boot application and consuming REST API's developed and deployed on other server with DNS name.

```<code> @FeignClient(url="${env.app.crm.url}", value= "crm-feign-client", path ="/CRM/API", configuration = CRMFeignConfiguration.class)
@Headers("Content-Type: application/json")
public interface CRMFeignClients {
</code>```

Success scenarios:

when I run application locally by consuming API's using feign client with DNS name.

when I run application locally by consuming API's using feign client with IP address.

Deployed my application on server by consuming API's using feign client with IP address.

Failure case:

when I deploy my application on server by consuming API's using feign client with DNS name it is giving unknown host exception

Below is the log:

```<code>**feign.RetryableException: <HOST NAME**> executing POST http://<**HOST NAME AND CONTEXT PATH**>/UpdateCustomer
        at feign.FeignException.errorExecuting(FeignException.java:268)
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:131)
        at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:91)
        at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
        at com.sun.proxy.$Proxy176.updateCustomer(Unknown Source)
        at com.kafd.outbound.services.KAFDCrmService.callCustomerUpdateService(KAFDCrmService.java:107)
        at com.kafd.outbound.services.KAFDBackgroundService.CustomerDataPush(KAFDBackgroundService.java:81)
        at com.kafd.outbound.services.KAFDBackgroundService$$FastClassBySpringCGLIB$$add32094.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
**Caused by: java.net.UnknownHostException**: <**MY HOST NAME**>
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
        at sun.net.www.http.HttpClient.New(HttpClient.java:308)
        at sun.net.www.http.HttpClient.New(HttpClient.java:326)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258)
        at feign.Client$Default.convertAndSend(Client.java:208)
        at feign.Client$Default.execute(Client.java:105)
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:121)
</code>```

Body:
I have created Spring boot application and consuming REST API's developed and deployed on other server with DNS name.

 @FeignClient(url="${env.app.crm.url}", value= "crm-feign-client", path ="/CRM/API", configuration = CRMFeignConfiguration.class)
@Headers("Content-Type: application/json")
public interface CRMFeignClients {

Success scenarios:

when I run application locally by consuming API's using feign client with DNS name.

when I run application locally by consuming API's using feign client with IP address.

Deployed my application on server by consuming API's using feign client with IP address.

Failure case:

when I deploy my application on server by consuming API's using feign client with DNS name it is giving unknown host exception

Below is the log:

**feign.RetryableException: <HOST NAME**> executing POST http://<**HOST NAME AND CONTEXT PATH**>/UpdateCustomer
        at feign.FeignException.errorExecuting(FeignException.java:268)
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:131)
        at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:91)
        at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
        at com.sun.proxy.$Proxy176.updateCustomer(Unknown Source)
        at com.kafd.outbound.services.KAFDCrmService.callCustomerUpdateService(KAFDCrmService.java:107)
        at com.kafd.outbound.services.KAFDBackgroundService.CustomerDataPush(KAFDBackgroundService.java:81)
        at com.kafd.outbound.services.KAFDBackgroundService$$FastClassBySpringCGLIB$$add32094.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
        at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
**Caused by: java.net.UnknownHostException**: <**MY HOST NAME**>
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
        at sun.net.www.http.HttpClient.New(HttpClient.java:308)
        at sun.net.www.http.HttpClient.New(HttpClient.java:326)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258)
        at feign.Client$Default.convertAndSend(Client.java:208)
        at feign.Client$Default.execute(Client.java:105)
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:121)


问:
Argument must be a Tensor or TensorLike, but got 'Tensor'
I'm trying to integrate a ML model into a React Native application. The first step was to transform my image into a Tensor. I followed this tutorial but I'm getting the following error:

Argument 'images' passed to 'resizeNearestNeighbor' must be a Tensor or TensorLike, but got 'Tensor'

```<code>import * as tf from '@tensorflow/tfjs'
import { bundleResourceIO, decodeJpeg, fetch } from '@tensorflow/tfjs-react-native'
import * as fs from 'expo-file-system'

const App = () => {
 const transformImageToTensor = async (uri) => {
    const img64 = await fs.readAsStringAsync(uri, { encoding: fs.EncodingType.Base64 })
    const imgBuffer = tf.util.encodeString(img64, 'base64').buffer
    const raw = new Uint8Array(imgBuffer)
    let imgTensor = decodeJpeg(raw)
    const scalar = tf.scalar(255)

    //resize the image
     imgTensor = tf.image.resizeNearestNeighbor(imgTensor, [300, 300])
    //normalize; if a normalization layer is in the model, this step can be skipped
    const tensorScaled = imgTensor.div(scalar)
    //final shape of the rensor
    const img = tf.reshape(tensorScaled, [1, 300, 300, 3])
    return imgTensor
  }

    useEffect(()=> {    transformImageToTensor('/Users/roxana/Desktop/rndigits/project/model/example.jpeg')
    })
}
</code>```

I found a mention that maybe @tfjs and @tfjs-react-native have different implementations of the Tensor object, but I'm not sure how to code it differently. No other tutorial out there worked

Body:
I'm trying to integrate a ML model into a React Native application. The first step was to transform my image into a Tensor. I followed this tutorial but I'm getting the following error:

Argument 'images' passed to 'resizeNearestNeighbor' must be a Tensor or TensorLike, but got 'Tensor'

import * as tf from '@tensorflow/tfjs'
import { bundleResourceIO, decodeJpeg, fetch } from '@tensorflow/tfjs-react-native'
import * as fs from 'expo-file-system'

const App = () => {
 const transformImageToTensor = async (uri) => {
    const img64 = await fs.readAsStringAsync(uri, { encoding: fs.EncodingType.Base64 })
    const imgBuffer = tf.util.encodeString(img64, 'base64').buffer
    const raw = new Uint8Array(imgBuffer)
    let imgTensor = decodeJpeg(raw)
    const scalar = tf.scalar(255)

    //resize the image
     imgTensor = tf.image.resizeNearestNeighbor(imgTensor, [300, 300])
    //normalize; if a normalization layer is in the model, this step can be skipped
    const tensorScaled = imgTensor.div(scalar)
    //final shape of the rensor
    const img = tf.reshape(tensorScaled, [1, 300, 300, 3])
    return imgTensor
  }

    useEffect(()=> {    transformImageToTensor('/Users/roxana/Desktop/rndigits/project/model/example.jpeg')
    })
}

I found a mention that maybe @tfjs and @tfjs-react-native have different implementations of the Tensor object, but I'm not sure how to code it differently. No other tutorial out there worked


问:
How to create GitHub issue template that is only visible to certain team?
Is it possible to limit the visibility of a GitHub issue template to a certain team?

An example use case is using GitHub issues to hold a vote amongst a maintainer team. It would be useful to somehow specify the markdown or yaml template file such that only the maintainer team members can utilize this template, as they should be the only ones calling for a vote, and utilizing a template will keep things tidy and consistent.