问:
Error while building APK using GluonFX 1.0.16
Our app was already using GluonFX 1.0.12. And we were able to build APK (with OpenJDK 11).

I've updated the GluonFX to 1.0.16 now. I am able to run the app. And running the app through mvn gluonfx:runagent goal is also working fine. But building using mvn gluonfx:build gluonfx:package -Pandroid results in error.

So I generated a sample project from start.gluon.io and tried to build APK with same configuration, and it also failed returing same error, as shown below.

```<code>[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB] [1/7] Initializing...                                                                                (0.0s @ 0.13GB)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB] Fatal error: java.lang.UnsupportedClassVersionError: javafx/application/Application has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.security.AccessController.doPrivileged(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.security.AccessController.doPrivileged(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.Class.forName0(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.Class.forName(Class.java:398)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.ImageClassLoader.forName(ImageClassLoader.java:291)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.ImageClassLoader.forName(ImageClassLoader.java:287)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.ImageClassLoader.forName(ImageClassLoader.java:296)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:343)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:585)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:615)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB] Error: Image build request failed with exit status 1
[Wed Dec 28 15:02:03 IST 2022][FINE] Result for compile: 1
[Wed Dec 28 15:02:03 IST 2022][SEVERE] Process compile failed with result: 1
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Wed Dec 28 15:02:03 IST 2022][INFO] Logging process [compile] to file: /home/manikandan/git/hellojavafx/target/gluonfx/log/process-compile-1672219923249.log
[Wed Dec 28 15:02:03 IST 2022][SEVERE] Compiling failed.
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
</code>```

Complete log can be found here

Here's the pom.xml file.

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

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.manikandan</groupId>
    <artifactId>myapplication</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>HelloJavafx</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>11</maven.compiler.release>
        <javafx.version>19</javafx.version>
        <javafx.plugin.version>0.0.8</javafx.plugin.version>
        <gluonfx.plugin.version>1.0.16</gluonfx.plugin.version>
        <main.class>com.manikandan.sample.Main</main.class>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-base</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javafx.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>${javafx.plugin.version}</version>
                <configuration>
                    <mainClass>${main.class}</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.gluonhq</groupId>
                <artifactId>gluonfx-maven-plugin</artifactId>
                <version>${gluonfx.plugin.version}</version>
                <configuration>
                    <target>${gluonfx.target}</target>
                    <mainClass>${main.class}</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>android</id>
            <properties>
                <gluonfx.target>android</gluonfx.target>
            </properties>
        </profile>
        <profile>
            <id>ios</id>
            <properties>
                <gluonfx.target>ios</gluonfx.target>
            </properties>
        </profile>
    </profiles>
</project>
</code>```

I am using OpenJDK 11.0,14.

```<code>manikandan@manikandan-VirtualBox:~/git/hellojavafx$ java -version
openjdk version "11.0.14.1" 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
</code>```

And I am using graalvm-svm-java11-linux-gluon-22.1.0.1-Final.

```<code>manikandan@manikandan-VirtualBox:~/git/hellojavafx$ echo $GRAALVM_HOME
/media/sf_linux_softwares/graalvm-svm-java11-linux-gluon-22.1.0.1-Final
</code>```

Please let me know what is the cause of this error?

Update 1:-
As suggested, I've added javafxStaticSdkVersion-19 to gluonfx configuration.

```<code><plugin>
    <groupId>com.gluonhq</groupId>
    <artifactId>gluonfx-maven-plugin</artifactId>
    <version>${gluonfx.plugin.version}</version>
    <configuration>
        <target>${gluonfx.target}</target>
        <mainClass>${main.class}</mainClass>
        <javafxStaticSdkVersion>19</javafxStaticSdkVersion>
    </configuration>
</plugin>
</code>```

But now the build fails at linking stage.

```<code>[Thu Dec 29 11:13:04 IST 2022][INFO] ==================== LINK TASK ====================
[Thu Dec 29 11:13:07 IST 2022][INFO] [SUB] /media/sf_linux_softwares/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: unrecognized option '--rosegment'
[Thu Dec 29 11:13:07 IST 2022][INFO] [SUB] /media/sf_linux_softwares/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: use the --help option for usage information
[Thu Dec 29 11:13:07 IST 2022][INFO] [SUB] clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[Thu Dec 29 11:13:07 IST 2022][SEVERE] Process link failed with result: 1
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Thu Dec 29 11:13:07 IST 2022][INFO] Logging process [link] to file: /home/manikandan/git/hellojavafx/target/gluonfx/log/process-link-1672292587129.log
[Thu Dec 29 11:13:07 IST 2022][SEVERE] Linking failed.
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:35 min
[INFO] Finished at: 2022-12-29T11:13:07+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:link (default-cli) on project myapplication: Linking failed -> [Help 1]
</code>```

I am using android-ndk-r21b. Does gluonfx 1.0.16 require latest version of ndk ?

Update2:-

I let the plugin download the SDK, and I separately downloaded NDK r25b and updated PATH of 'ANDROID_NDK'

Now the build fails with "error: 127, clang not found" (shown below)

```<code>[Fri Dec 30 16:46:09 IST 2022][INFO] ==================== COMPILE TASK ====================
[Fri Dec 30 16:46:11 IST 2022][INFO] We will now compile your code for aarch64-linux-android. This may take some time.
[Fri Dec 30 16:46:11 IST 2022][FINE] Extracting native libs to: /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/lib
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/dummy.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/launcher.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/javafx_adapter.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/touch_events.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/glibc_shim.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/attach_adapter.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/logger.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/grandroid.h
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/grandroid_ext.h
[Fri Dec 30 16:46:11 IST 2022][FINE] PB Command for compile-additional-sources: /media/sf_linux_softwares/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -c -DSUBSTRATE -target aarch64-linux-android -I. -fPIC -I/home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/HelloJavafx dummy.c launcher.c javafx_adapter.c touch_events.c glibc_shim.c attach_adapter.c logger.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Start process compile-additional-sources...
[Fri Dec 30 16:46:11 IST 2022][FINE] [SUB] /media/sf_linux_softwares/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: 1: clang-14: not found
[Fri Dec 30 16:46:11 IST 2022][FINE] Result for compile-additional-sources: 127
[Fri Dec 30 16:46:11 IST 2022][SEVERE] Process compile-additional-sources failed with result: 127
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Fri Dec 30 16:46:11 IST 2022][INFO] Logging process [compile-additional-sources] to file: /home/manikandan/git/hellojavafx/target/gluonfx/log/process-compile-additional-sources-1672398971174.log
[Fri Dec 30 16:46:11 IST 2022][SEVERE] Compiling failed.
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
</code>```

But I checked the directory specified  in error log, and clang-14 is there.

How to handle this error ?

Body:
Our app was already using GluonFX 1.0.12. And we were able to build APK (with OpenJDK 11).

I've updated the GluonFX to 1.0.16 now. I am able to run the app. And running the app through mvn gluonfx:runagent goal is also working fine. But building using mvn gluonfx:build gluonfx:package -Pandroid results in error.

So I generated a sample project from start.gluon.io and tried to build APK with same configuration, and it also failed returing same error, as shown below.

[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB] [1/7] Initializing...                                                                                (0.0s @ 0.13GB)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB] Fatal error: java.lang.UnsupportedClassVersionError: javafx/application/Application has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.security.AccessController.doPrivileged(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.security.AccessController.doPrivileged(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.Class.forName0(Native Method)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at java.base/java.lang.Class.forName(Class.java:398)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.ImageClassLoader.forName(ImageClassLoader.java:291)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.ImageClassLoader.forName(ImageClassLoader.java:287)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.ImageClassLoader.forName(ImageClassLoader.java:296)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:343)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:585)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB]  at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:615)
[Wed Dec 28 15:02:03 IST 2022][INFO] [SUB] Error: Image build request failed with exit status 1
[Wed Dec 28 15:02:03 IST 2022][FINE] Result for compile: 1
[Wed Dec 28 15:02:03 IST 2022][SEVERE] Process compile failed with result: 1
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Wed Dec 28 15:02:03 IST 2022][INFO] Logging process [compile] to file: /home/manikandan/git/hellojavafx/target/gluonfx/log/process-compile-1672219923249.log
[Wed Dec 28 15:02:03 IST 2022][SEVERE] Compiling failed.
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.

Complete log can be found here

Here's the pom.xml file.

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

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.manikandan</groupId>
    <artifactId>myapplication</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>HelloJavafx</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>11</maven.compiler.release>
        <javafx.version>19</javafx.version>
        <javafx.plugin.version>0.0.8</javafx.plugin.version>
        <gluonfx.plugin.version>1.0.16</gluonfx.plugin.version>
        com.manikandan.sample.Main
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-base</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javafx.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>${javafx.plugin.version}</version>
                <configuration>
                    <mainClass>${main.class}</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.gluonhq</groupId>
                <artifactId>gluonfx-maven-plugin</artifactId>
                <version>${gluonfx.plugin.version}</version>
                <configuration>
                    <target>${gluonfx.target}</target>
                    <mainClass>${main.class}</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>android</id>
            <properties>
                <gluonfx.target>android</gluonfx.target>
            </properties>
        </profile>
        <profile>
            <id>ios</id>
            <properties>
                <gluonfx.target>ios</gluonfx.target>
            </properties>
        </profile>
    </profiles>
</project>

I am using OpenJDK 11.0,14.

manikandan@manikandan-VirtualBox:~/git/hellojavafx$ java -version
openjdk version "11.0.14.1" 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

And I am using graalvm-svm-java11-linux-gluon-22.1.0.1-Final.

manikandan@manikandan-VirtualBox:~/git/hellojavafx$ echo $GRAALVM_HOME
/media/sf_linux_softwares/graalvm-svm-java11-linux-gluon-22.1.0.1-Final

Please let me know what is the cause of this error?

Update 1:-
As suggested, I've added javafxStaticSdkVersion-19 to gluonfx configuration.

<plugin>
    <groupId>com.gluonhq</groupId>
    <artifactId>gluonfx-maven-plugin</artifactId>
    <version>${gluonfx.plugin.version}</version>
    <configuration>
        <target>${gluonfx.target}</target>
        <mainClass>${main.class}</mainClass>
        <javafxStaticSdkVersion>19</javafxStaticSdkVersion>
    </configuration>
</plugin>

But now the build fails at linking stage.

[Thu Dec 29 11:13:04 IST 2022][INFO] ==================== LINK TASK ====================
[Thu Dec 29 11:13:07 IST 2022][INFO] [SUB] /media/sf_linux_softwares/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: unrecognized option '--rosegment'
[Thu Dec 29 11:13:07 IST 2022][INFO] [SUB] /media/sf_linux_softwares/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: use the --help option for usage information
[Thu Dec 29 11:13:07 IST 2022][INFO] [SUB] clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[Thu Dec 29 11:13:07 IST 2022][SEVERE] Process link failed with result: 1
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Thu Dec 29 11:13:07 IST 2022][INFO] Logging process [link] to file: /home/manikandan/git/hellojavafx/target/gluonfx/log/process-link-1672292587129.log
[Thu Dec 29 11:13:07 IST 2022][SEVERE] Linking failed.
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:35 min
[INFO] Finished at: 2022-12-29T11:13:07+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:link (default-cli) on project myapplication: Linking failed -> [Help 1]

I am using android-ndk-r21b. Does gluonfx 1.0.16 require latest version of ndk ?

Update2:-

I let the plugin download the SDK, and I separately downloaded NDK r25b and updated PATH of 'ANDROID_NDK'

Now the build fails with "error: 127, clang not found" (shown below)

[Fri Dec 30 16:46:09 IST 2022][INFO] ==================== COMPILE TASK ====================
[Fri Dec 30 16:46:11 IST 2022][INFO] We will now compile your code for aarch64-linux-android. This may take some time.
[Fri Dec 30 16:46:11 IST 2022][FINE] Extracting native libs to: /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/lib
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/dummy.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/launcher.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/javafx_adapter.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/touch_events.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/glibc_shim.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/attach_adapter.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/logger.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/grandroid.h
[Fri Dec 30 16:46:11 IST 2022][FINE] Looking for resource: /native/android/c/grandroid_ext.h
[Fri Dec 30 16:46:11 IST 2022][FINE] PB Command for compile-additional-sources: /media/sf_linux_softwares/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -c -DSUBSTRATE -target aarch64-linux-android -I. -fPIC -I/home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/HelloJavafx dummy.c launcher.c javafx_adapter.c touch_events.c glibc_shim.c attach_adapter.c logger.c
[Fri Dec 30 16:46:11 IST 2022][FINE] Start process compile-additional-sources...
[Fri Dec 30 16:46:11 IST 2022][FINE] [SUB] /media/sf_linux_softwares/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: 1: clang-14: not found
[Fri Dec 30 16:46:11 IST 2022][FINE] Result for compile-additional-sources: 127
[Fri Dec 30 16:46:11 IST 2022][SEVERE] Process compile-additional-sources failed with result: 127
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
[Fri Dec 30 16:46:11 IST 2022][INFO] Logging process [compile-additional-sources] to file: /home/manikandan/git/hellojavafx/target/gluonfx/log/process-compile-additional-sources-1672398971174.log
[Fri Dec 30 16:46:11 IST 2022][SEVERE] Compiling failed.
Check the log files under /home/manikandan/git/hellojavafx/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.

But I checked the directory specified  in error log, and clang-14 is there.

How to handle this error ?


来源: stackexchange

问:
Send video as Buffer to Telegram
Hello to all!
I use telegraf package for my telegram bot. I have a simple command that, when sent to my Telegram bot, combines a YouTube video with its separate audio file through the ffmpeg package in child_process channels and dumps the output into an array of buffers. When the process is finished, the final file is sent to Telegram through the sendVideo method:

```<code>const tracker = {
                    start: Date.now(),
                    audio: {downloaded: 0, total: Infinity},
                    video: {downloaded: 0, total: Infinity},
                };

                const video = ytdl(id, {filter: 'videoonly', quality: String(itag)})
                    .on('progress', (_: any, downloaded: any, total: any) => {
                        tracker.video = {downloaded, total};
                    });
                const audio = ytdl(id, {filter: 'audioonly', quality: 'highestaudio'})
                    .on('progress', (_: any, downloaded: any, total: any) => {
                        tracker.audio = {downloaded, total};
                    });

                const ffmpegProcess = cp.spawn(ffmpeg, [
                    // Remove ffmpeg's console spamming
                    '-loglevel', '0', '-hide_banner',
                    '-i', 'pipe:3',
                    '-i', 'pipe:4',
                    '-c:v', 'libx265', '-x265-params', 'log-level=0',
                    '-c:a', 'flac',
                    // Define output container
                    '-f', 'matroska', 'pipe:5',
                ], {
                    windowsHide: true,
                    stdio: [
                        /* Standard: stdin, stdout, stderr */
                        'inherit', 'inherit', 'inherit',
                        /* Custom: pipe:3, pipe:4, pipe:5 */
                        'pipe', 'pipe', 'pipe',
                    ],
                });

                let chunks: any = [], fileSize = 0;

                audio.pipe(ffmpegProcess.stdio[3]);
                video.pipe(ffmpegProcess.stdio[4]);

                ffmpegProcess.stdio[5].on('data', (chunk: string | any[]) => {

                    chunks.push(chunk);
                    fileSize += chunk.length;

                }).on('end', () => {

                    const buff = Buffer.concat(chunks);

                    const { Input } = require('telegraf');

                    await ctx.sendVideo(
                    Input.fromBuffer(buff), 'File name'
                  );

                });

            }
</code>```

My problem is that when the file is sent, the video time is not available until it is completely downloaded and is 0, and inside the Telegram web version, the file is not downloaded completely and it gets stuck on "Buffering..." (on Android, without The problem is downloaded, but it still has no time). I think this problem is due to incomplete metadata in Buffer. Can anyone help me?

ContentLicense: CC BY-SA 4.0

Title: Send video as Buffer to Telegram

Body:
Hello to all!
I use telegraf package for my telegram bot. I have a simple command that, when sent to my Telegram bot, combines a YouTube video with its separate audio file through the ffmpeg package in child_process channels and dumps the output into an array of buffers. When the process is finished, the final file is sent to Telegram through the sendVideo method:

const tracker = {
                    start: Date.now(),
                    audio: {downloaded: 0, total: Infinity},
                    video: {downloaded: 0, total: Infinity},
                };

                const video = ytdl(id, {filter: 'videoonly', quality: String(itag)})
                    .on('progress', (_: any, downloaded: any, total: any) => {
                        tracker.video = {downloaded, total};
                    });
                const audio = ytdl(id, {filter: 'audioonly', quality: 'highestaudio'})
                    .on('progress', (_: any, downloaded: any, total: any) => {
                        tracker.audio = {downloaded, total};
                    });

                const ffmpegProcess = cp.spawn(ffmpeg, [
                    // Remove ffmpeg's console spamming
                    '-loglevel', '0', '-hide_banner',
                    '-i', 'pipe:3',
                    '-i', 'pipe:4',
                    '-c:v', 'libx265', '-x265-params', 'log-level=0',
                    '-c:a', 'flac',
                    // Define output container
                    '-f', 'matroska', 'pipe:5',
                ], {
                    windowsHide: true,
                    stdio: [
                        /* Standard: stdin, stdout, stderr */
                        'inherit', 'inherit', 'inherit',
                        /* Custom: pipe:3, pipe:4, pipe:5 */
                        'pipe', 'pipe', 'pipe',
                    ],
                });

                let chunks: any = [], fileSize = 0;

                audio.pipe(ffmpegProcess.stdio[3]);
                video.pipe(ffmpegProcess.stdio[4]);

                ffmpegProcess.stdio[5].on('data', (chunk: string | any[]) => {

                    chunks.push(chunk);
                    fileSize += chunk.length;

                }).on('end', () => {

                    const buff = Buffer.concat(chunks);

                    const { Input } = require('telegraf');

                    await ctx.sendVideo(
                    Input.fromBuffer(buff), 'File name'
                  );

                });

            }

My problem is that when the file is sent, the video time is not available until it is completely downloaded and is 0, and inside the Telegram web version, the file is not downloaded completely and it gets stuck on "Buffering..." (on Android, without The problem is downloaded, but it still has no time). I think this problem is due to incomplete metadata in Buffer. Can anyone help me?


问:
Why nodejs runs other js file first before index.js file?
I have created a simple nodejs project to see how nodejs runtime execution flow works. In my project folder I have initiated a nodejs project with npm init -y command. Then added "type": "module" to the package.json file. After that I have created two files

index.js with following content

```<code>console.log("index.js")
import x from './test.js'
</code>```

test.js with following content

```<code>console.log("test.js")
export default {}
</code>```

When I tried to execute the index.js file with node index.js I got the result as follows

```<code>test.js
index.js
</code>```

But I expected the otherway around. Could someone explain why this is the behavior I am getting. Also please advice me, is there any way to enforce nodejs to go through the index.js file first before the other one?

Body:
I have created a simple nodejs project to see how nodejs runtime execution flow works. In my project folder I have initiated a nodejs project with npm init -y command. Then added "type": "module" to the package.json file. After that I have created two files

index.js with following content

console.log("index.js")
import x from './test.js'

test.js with following content

console.log("test.js")
export default {}

When I tried to execute the index.js file with node index.js I got the result as follows

test.js
index.js

But I expected the otherway around. Could someone explain why this is the behavior I am getting. Also please advice me, is there any way to enforce nodejs to go through the index.js file first before the other one?


问:
How can vb.net append text to the same text file in multiple threads?
I am writing a function for log output, but when this function is called in multiple places, an error will be prompted: thread occupation. How should I solve it?

the error：

```<code>IOException: The process cannot access the file 'C:\Users\Administrator\source\repos\NSC 6\NSC 6\bin\Debug\net6.0-windows\log\log-latest.log' because it is being used by another process.
</code>```

This is the code of the function

```<code>Function log_record(logtext As String)
    File.AppendAllText(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) & "\log\log-latest.log", "「" & Now & "」" & logtext)
End Function
</code>```

or

```<code>Function log_record(logtext As String)
    Dim log_writer As New StreamWriter(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) & "\log\log-latest.log", True)
    log_writer.WriteLine("「" & Now & "」" & logtext)
    log_writer.Close()
End Function
</code>```

Body:
I am writing a function for log output, but when this function is called in multiple places, an error will be prompted: thread occupation. How should I solve it?

the error：

IOException: The process cannot access the file 'C:\Users\Administrator\source\repos\NSC 6\NSC 6\bin\Debug\net6.0-windows\log\log-latest.log' because it is being used by another process.

This is the code of the function

Function log_record(logtext As String)
    File.AppendAllText(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) & "\log\log-latest.log", "「" & Now & "」" & logtext)
End Function

or

Function log_record(logtext As String)
    Dim log_writer As New StreamWriter(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) & "\log\log-latest.log", True)
    log_writer.WriteLine("「" & Now & "」" & logtext)
    log_writer.Close()
End Function


问:
Finding object files compiled with WholeProgramOptimization flag
When linking my final .exe file I receive error: C1047 The object or library file XX.lib was created by a different version of the compiler than other objects like YY.lib rebuild all objects and libraries with the same compiler.

According to the documentation: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1047?view=msvc-170
It happens when some object files are compiled with /GL or /LTCG flags.

YY.lib is an external library. It is C library, compiled with different version of Visual Studio. But it should be fine. It has no /GL nor /LTCG flag enabled.

XX.lib is another static library. I partially control how it is created. It contains many third-party libraries also inside.

Now I need to somehow figure out which .obj files inside XX.lib were compiled with /GL flag (to remove this flag and fix the issue). Is there any way to find out which .obj files were compiled with the /GL or /LTCG flag enabled without direct access to source/build systems of those libraries ? (I assume it should be possible as linker is able to determine it). But I can't find where this information is stored. I can unpack the static library to individual .obj files. But using e.g. dumpbin I don't see any info about /GL or /LTCG flag.


问:
Bottom navigation does not show icon and text
I created a bottom navigation in main activity and does not show menu icon or text

I use the material library version 1.7.0

I changed the version to 1.6.1 and  1.5, but there was still a problem

I invalidate caches and the problem was not solved

I also used the clean project/rebuild project, but the problem was not solved

what is the problem?

activity_main.xml

```<code><layout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">
    <data>

    </data>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">

        <RelativeLayout
            android:id="@+id/mainActivityBase"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.core.widget.NestedScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fillViewport="true">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/app_name"
                        android:gravity="center"
                        android:textAppearance="?textAppearanceHeadline4"
                        android:layout_marginTop="25dp"/>

                    <androidx.fragment.app.FragmentContainerView
                        android:id="@+id/nav_host_container"
                        android:name="androidx.navigation.fragment.NavHostFragment"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:paddingBottom="64dp"
                        android:clipToPadding="false"
                        app:defaultNavHost="true"
                        app:navGraph="@navigation/nav_movie_player"
                        tools:layout="@layout/fragment_home" />

                </LinearLayout>

            </androidx.core.widget.NestedScrollView>

            <com.google.android.material.bottomnavigation.BottomNavigationView
                android:id="@+id/bottomNavigationMain"
                android:layout_width="match_parent"
                android:layout_height="64dp"
                android:layout_alignParentBottom="true"
                android:layout_marginStart="@dimen/marginStart"
                android:layout_marginEnd="@dimen/marginEnd"
                android:layout_marginBottom="@dimen/marginStart"
                android:elevation="8dp"
                app:labelVisibilityMode="unlabeled"
                app:menu="@menu/movie_player_menu"
                app:itemIconSize="28dp"
                app:itemRippleColor="@android:color/transparent"
                />

        </RelativeLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
</code>```

movie_player_menu.xml

```<code><menu xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:id="@+id/homeFragment"
        android:title="@string/home"
        android:icon="@drawable/ic_round_home_24" />

    <item android:id="@+id/searchFragment"
        android:title="@string/search"
        android:icon="@drawable/ic_round_search_24" />

    <item android:id="@+id/profileFragment"
        android:title="@string/profile"
        android:icon="@drawable/ic_round_person_24" />

</menu>
</code>```

Navigation components setup

```<code> private lateinit var navController: NavController
 private lateinit var appBarConfiguration: AppBarConfiguration

 override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
        binding.lifecycleOwner = this

        setupBottomNavigationBar()
    }

 private fun setupBottomNavigationBar() {
        val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottomNavigationMain)
        val navHostFragment = supportFragmentManager.findFragmentById(
            R.id.nav_host_container
        ) as NavHostFragment
        navController = navHostFragment.navController

        bottomNavigationView.setupWithNavController(navController)
        appBarConfiguration = AppBarConfiguration(
            setOf(R.id.homeFragment, R.id.searchFragment, R.id.profileFragment)
        )

    }

    override fun onSupportNavigateUp(): Boolean {
        return navController.navigateUp(appBarConfiguration)
    }
</code>```

I run it on a physical phone but the problem was still there

Update

I found the problem set windowTranslucentNavigation false and problem is solved

Body:
I created a bottom navigation in main activity and does not show menu icon or text

I use the material library version 1.7.0

I changed the version to 1.6.1 and  1.5, but there was still a problem

I invalidate caches and the problem was not solved

I also used the clean project/rebuild project, but the problem was not solved

what is the problem?

activity_main.xml

<layout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">
    <data>

    </data>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">

        <RelativeLayout
            android:id="@+id/mainActivityBase"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.core.widget.NestedScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fillViewport="true">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/app_name"
                        android:gravity="center"
                        android:textAppearance="?textAppearanceHeadline4"
                        android:layout_marginTop="25dp"/>

                    <androidx.fragment.app.FragmentContainerView
                        android:id="@+id/nav_host_container"
                        android:name="androidx.navigation.fragment.NavHostFragment"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:paddingBottom="64dp"
                        android:clipToPadding="false"
                        app:defaultNavHost="true"
                        app:navGraph="@navigation/nav_movie_player"
                        tools:layout="@layout/fragment_home" />

                </LinearLayout>

            </androidx.core.widget.NestedScrollView>

            <com.google.android.material.bottomnavigation.BottomNavigationView
                android:id="@+id/bottomNavigationMain"
                android:layout_width="match_parent"
                android:layout_height="64dp"
                android:layout_alignParentBottom="true"
                android:layout_marginStart="@dimen/marginStart"
                android:layout_marginEnd="@dimen/marginEnd"
                android:layout_marginBottom="@dimen/marginStart"
                android:elevation="8dp"
                app:labelVisibilityMode="unlabeled"
                app:menu="@menu/movie_player_menu"
                app:itemIconSize="28dp"
                app:itemRippleColor="@android:color/transparent"
                />

        </RelativeLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>

movie_player_menu.xml

<menu xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:id="@+id/homeFragment"
        android:title="@string/home"
        android:icon="@drawable/ic_round_home_24" />

    <item android:id="@+id/searchFragment"
        android:title="@string/search"
        android:icon="@drawable/ic_round_search_24" />

    <item android:id="@+id/profileFragment"
        android:title="@string/profile"
        android:icon="@drawable/ic_round_person_24" />

</menu>

Navigation components setup

 private lateinit var navController: NavController
 private lateinit var appBarConfiguration: AppBarConfiguration

 override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
        binding.lifecycleOwner = this

        setupBottomNavigationBar()
    }

 private fun setupBottomNavigationBar() {
        val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottomNavigationMain)
        val navHostFragment = supportFragmentManager.findFragmentById(
            R.id.nav_host_container
        ) as NavHostFragment
        navController = navHostFragment.navController

        bottomNavigationView.setupWithNavController(navController)
        appBarConfiguration = AppBarConfiguration(
            setOf(R.id.homeFragment, R.id.searchFragment, R.id.profileFragment)
        )

    }

    override fun onSupportNavigateUp(): Boolean {
        return navController.navigateUp(appBarConfiguration)
    }

I run it on a physical phone but the problem was still there

Update

I found the problem set windowTranslucentNavigation false and problem is solved


问:
How to handler an DocumentSnapshot in Koltin
I Have an Firestore ArrayList response and it comes in DocumentSnapshot. I would like to know how i can get every animeId filtered by document.
Heres is the Firestore DB:

Here's the code to get the Firestore Data:

```<code>val animeRef = firestoreClient.collection("Users")
        animeRef.get().addOnCompleteListener { documents ->
            if (documents.isSuccessful) {
                val name = mutableListOf<String>()
                for (document in documents.result) {
                    val animeId = document.toString()
                    name.add(animeId)
                }
                println(name)
            }
        }
</code>```

Executing this code I have this response:

How can I  get the animeId filtered by the key?

Body:
I Have an Firestore ArrayList response and it comes in DocumentSnapshot. I would like to know how i can get every animeId filtered by document.
Heres is the Firestore DB:

Here's the code to get the Firestore Data:

val animeRef = firestoreClient.collection("Users")
        animeRef.get().addOnCompleteListener { documents ->
            if (documents.isSuccessful) {
                val name = mutableListOf<String>()
                for (document in documents.result) {
                    val animeId = document.toString()
                    name.add(animeId)
                }
                println(name)
            }
        }

Executing this code I have this response:

How can I  get the animeId filtered by the key?


问:
GLSL std140 layout misunderstanding
Padding and formatting between C++ code and GLSL code is working but doesn't make sense. I would be happy if someone can explain.

I am sending this struct with uniform buffer to my shader.

```<code>struct PerFrameData
{
    glm::mat4 CameraViewProjection{};
    glm::vec3 CameraWorldPosition{};
    float TotalTime;
} frameData{};
</code>```

I have tested and alignments of elements are 0,64,76. Total size is 80B and struct alignment is 4B.

According to std140:

scalar types are aligned on 4B

vec2 is aligned on 8B

vec3 and vec4 are aligned on 16B

mat3 and mat4 are aligned on 16B per row/column

array elements are aligned on ceil 16B offset from array element size

When I see my struct above. It would make sense to put 4B of padding before "float TotalTime", but then it doesn't work. (It works when it doesn't have padding and that is what bugs me).

And this is how it looks in GLSL shader:

```<code>layout(std140, binding = 1) uniform PerFrameBuffer
{
    mat4 CameraViewProjection;
    vec3 CameraWorldPosition;
    float TotalTime;
};
</code>```

Am I missing something or?

Title: GLSL std140 layout misunderstanding

Body:
Padding and formatting between C++ code and GLSL code is working but doesn't make sense. I would be happy if someone can explain.

I am sending this struct with uniform buffer to my shader.

struct PerFrameData
{
    glm::mat4 CameraViewProjection{};
    glm::vec3 CameraWorldPosition{};
    float TotalTime;
} frameData{};

I have tested and alignments of elements are 0,64,76. Total size is 80B and struct alignment is 4B.

According to std140:

scalar types are aligned on 4B

vec2 is aligned on 8B

vec3 and vec4 are aligned on 16B

mat3 and mat4 are aligned on 16B per row/column

array elements are aligned on ceil 16B offset from array element size

When I see my struct above. It would make sense to put 4B of padding before "float TotalTime", but then it doesn't work. (It works when it doesn't have padding and that is what bugs me).

And this is how it looks in GLSL shader:

layout(std140, binding = 1) uniform PerFrameBuffer
{
    mat4 CameraViewProjection;
    vec3 CameraWorldPosition;
    float TotalTime;
};

Am I missing something or?


问:
Tensorflow Estimator load model from pb file and re-train new data
I build a machine learning model with Tensorflow Estimators and when I save the model I get three files [saved_model.pb, variables-data-00000-00001, variables.index]. I can then load
this model with

self.model = tf.saved_model.load(path_to_saved_model_and_variables, tags="serve")

And I can make prediction with

```<code>self.model.signatures["predict"]
</code>```

But how can I train this model with new data?

Body:
I build a machine learning model with Tensorflow Estimators and when I save the model I get three files [saved_model.pb, variables-data-00000-00001, variables.index]. I can then load
this model with

self.model = tf.saved_model.load(path_to_saved_model_and_variables, tags="serve")

And I can make prediction with

self.model.signatures["predict"]

But how can I train this model with new data?


问:
there is no next step after I click create new maven project. and in preferences , maven archetype is empty. cant create new maven project
[enter image description here](https://i.stack.imgur.com/JD21a.png)

I am not able to create  new maven project. previously I added remote catalogue in  maven archetype preferences because I was not getting the maven-archetype in the suggestion. after adding remote catalogue , the box is empty now. not showing the original one


问:
How can I add URL to Icon in existing scss code?
Further on from this issue (Tidy up some SCSS) and copied below which works perfectly; is there a solution that would allow me to add an icon path/background image to each of those charity sectors (/assets/img/section/charity/ico/icon-name.svg)?</p>
```<code>$charity-colors: (
  animals: #a9efea,
  babies: #fae08c,
  cancer: #f4c9c8,
  community: #b3ddf2,
  deaf: #9FC279,
  mental: #CB89D5,
  elderly: #CCDCD4,
  rescue: #F4BD88,
  medical: #D0879C,
  hospice: #F0D3FA,
  human: #D3E0AD,
  military: #CBC3AD,
  overseas: #96C0E5,
  sports: #939393
);

@each $sector, $color in $charity-colors {
  .#{$sector}-bg {
    background: $color;
  }
  .#{$sector}-bg--tint {
    background: rgba($color, $color-tint);
  }
}
</code>```

Body:
Further on from this issue (Tidy up some SCSS) and copied below which works perfectly; is there a solution that would allow me to add an icon path/background image to each of those charity sectors (/assets/img/section/charity/ico/icon-name.svg)?

$charity-colors: (
  animals: #a9efea,
  babies: #fae08c,
  cancer: #f4c9c8,
  community: #b3ddf2,
  deaf: #9FC279,
  mental: #CB89D5,
  elderly: #CCDCD4,
  rescue: #F4BD88,
  medical: #D0879C,
  hospice: #F0D3FA,
  human: #D3E0AD,
  military: #CBC3AD,
  overseas: #96C0E5,
  sports: #939393
);

@each $sector, $color in $charity-colors {
  .#{$sector}-bg {
    background: $color;
  }
  .#{$sector}-bg--tint {
    background: rgba($color, $color-tint);
  }
}


问:
Why does e.currentTarget object become null after awaited promise function call or then method of a promise in JavaScript/Typescript?
I am trying to reset its field of a form after an async function completes execution. However, when the async function completes its instructions, I found that the e.currentTarget (where e is the React.FormEvent<HtmlFormElement> object). Here is the code please review and let me know what was wrong in my code:

onAddFormSubmitted(e: React.FormEvent<HTMLFormElement>): Promise<void> {
  e.preventDefault();

  const formdata = new FormData(e.currentTarget);

  // e.currentTarget.reset(); // it worked here

  if (formdata) {
    const book: Book = {
      title: formdata.get("booktitle") as string,
      author: formdata.get("authorname") as string,
    }

    addBook(book).then((doc) => {
        book.id = doc.id;
        this.props.onBookCreated(book);
        e.currentTarget.reset(); // e.currentTarget becoming null at this point. Why?
      });
    }
  }
```

I am trying to reset form element after the asynchronous function call. But, the currentTarget object becomes null.

Body:
I am trying to reset its field of a form after an async function completes execution. However, when the async function completes its instructions, I found that the e.currentTarget (where e is the React.FormEvent<HtmlFormElement> object). Here is the code please review and let me know what was wrong in my code:

onAddFormSubmitted(e: React.FormEvent<HTMLFormElement>): Promise<void> {
  e.preventDefault();

  const formdata = new FormData(e.currentTarget);

  // e.currentTarget.reset(); // it worked here

  if (formdata) {
    const book: Book = {
      title: formdata.get("booktitle") as string,
      author: formdata.get("authorname") as string,
    }

    addBook(book).then((doc) => {
        book.id = doc.id;
        this.props.onBookCreated(book);
        e.currentTarget.reset(); // e.currentTarget becoming null at this point. Why?
      });
    }
  }

I am trying to reset form element after the asynchronous function call. But, the currentTarget object becomes null.


问:
Error within Debug UI in debugging (Windows) OMNET++
I am trying to debug the code which is written in Veins of wirelees host communicating. To do that I use the OMNeT++ IDE (Windows) and its debug option. However, the Omnet generates me an error "Errors within Debug UI"

Error within Debug UI:

```<code>java.lang.reflect.InvocationTargetException
</code>```

Any suggestion is appreciated.
Regards.

Body:
I am trying to debug the code which is written in Veins of wirelees host communicating. To do that I use the OMNeT++ IDE (Windows) and its debug option. However, the Omnet generates me an error "Errors within Debug UI"

Error within Debug UI:

java.lang.reflect.InvocationTargetException

Any suggestion is appreciated.
Regards.


问:
save current user location to firestore database?
```<code>TextEditingController location = TextEditingController();
Position? position;
List<Placemark>? placeMarks;
late LocationPermission permission;

getCurrentLocation() async // here is to fetch the user's location
 {
   LocationPermission allow = await Geolocator.requestPermission();
   Position newPosition = await Geolocator.getCurrentPosition(
     desiredAccuracy: LocationAccuracy.high,
   );

   position = newPosition;
   placeMarks = await placemarkFromCoordinates(
       position!.latitude,
       position!.longitude,
   );

Placemark pMark = placeMarks![0];
   String completeAddress = '${pMark.subThoroughfare} ${pMark.thoroughfare}, '
       '${pMark.subLocality} ${pMark.locality}, ${pMark.subAdministrativeArea}, '
       '${pMark.administrativeArea} ${pMark.postalCode}, ${pMark.country}'; // get exact location with state,country,postal

   location.text = completeAddress;
 }

</code>```

i don't know how to save current user's location to firestore database so that i can use the id. Please help me

Body:
TextEditingController location = TextEditingController();
Position? position;
List<Placemark>? placeMarks;
late LocationPermission permission;

getCurrentLocation() async // here is to fetch the user's location
 {
   LocationPermission allow = await Geolocator.requestPermission();
   Position newPosition = await Geolocator.getCurrentPosition(
     desiredAccuracy: LocationAccuracy.high,
   );

   position = newPosition;
   placeMarks = await placemarkFromCoordinates(
       position!.latitude,
       position!.longitude,
   );

Placemark pMark = placeMarks![0];
   String completeAddress = '${pMark.subThoroughfare} ${pMark.thoroughfare}, '
       '${pMark.subLocality} ${pMark.locality}, ${pMark.subAdministrativeArea}, '
       '${pMark.administrativeArea} ${pMark.postalCode}, ${pMark.country}'; // get exact location with state,country,postal

   location.text = completeAddress;
 }

i don't know how to save current user's location to firestore database so that i can use the id. Please help me


问:
AWS RDS - DB Triggers invoking Lambda Function
I need to create an RDS Oracle trigger that will invoke a Lambda function when fired. This trigger needs to get the access to invoke the function. The policy AWS_FullLambdaAccess is the right policy for this job. How to attach it to let the trigger get access?

Please refer to this link, especially at very end of the page for DB Account.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.IAMPolicy.html


Title: Why do I still have compressed data?

Body:
How can I decode received web-socket data. I will show you two code examples, Python and Ruby. At first, this is web-socket received raw data:

if I am using Ruby('faye/websocket'&'eventmachine'):

[31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 53, 206, 177, 13, 194, 48, 20, 69, 209, 251, 252, 191, 109, 8, 16, 69, 8, 9, 165, 97, 2, 87, 41, 89, 33, 18, 29, 19, 192, 18, 76, 192, 60, 217, 34, 179, 144, 150, 1, 136, 11, 244, 138, 219, 156, 226, 189, 64, 111, 196, 131, 120, 110, 245, 85, 40, 178, 34, 159, 137, 79, 210, 64, 46, 218, 12, 108, 47, 52, 39, 118, 13, 123, 56, 64, 11, 38, 28, 8, 53, 89, 159, 117, 161, 247, 222, 173, 163, 195, 39, 155, 44, 94, 185, 121, 130, 163, 103, 184, 187, 248, 179, 69, 139, 172, 90, 175, 54, 86, 155, 180, 30, 200, 163, 143, 254, 3, 73, 113, 41, 98, 142, 0, 0, 0]

and Python(import asyncio/):

b'\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x035\xce\xb1\r\xc20\x14E\xd1\xfb\xfc\xbfm\x08\x10E\x08\t\xa5a\x02W)Y!\x12\x1d\x13\xc0\x12L\xc0<\xd9"\xb3\x90\x96\x01\x88\x0b\xf4\x8a\xdb\x9c\xe2\xbd@o\xc4\x83xn\xf5U(\xb2"\x9f\x89O\xd2@.\xda\x0cl/4\'v\r{8@\x0b&\x1c\x085Y\x9fu\xa1\xf7\xde\xad\xa3\xc3\'\x9b,^\xb9y\x82\xa3g\xb8\xbb\xf8\xb3E\x8b\xacZ\xaf6V\x9b\xb4\x1e\xc8\xa3\x8f\xfe\x03Iq)b\x8e\x00\x00\x00'

So, this is Ruby code:

require 'faye/websocket'
require 'eventmachine'
require 'permessage_deflate'
require 'zlib'

EM.run do
  ws = Faye::WebSocket::Client.new(
    "wss://wss.winline.ru/data_ng?",
    [],
    :extensions => [PermessageDeflate]
  )

  ws.on :open do |event|
    p [:open]
    ws.send "lang"
    ws.send "AQ=="
    ws.send "data"
    ws.send "WINLINE"
    ws.send "getdate"
    ws.send "no_fordata"

  end

  ws.on :message do |event|
    gz = Zlib::GzipReader.new(StringIO.new(event.data.pack('c*')))
    puts gz.read
  end

  ws.on :close do |event|
    p [:close, event.code, event.reason]
    ws = nil
  end
end

To decode this data [31, 139, 8..] I used at first method pack('c')* with directive c*, maybe its wrong directive(found here) and then Zlib::GzipReader.new, so now I have the following data:

0k��0l��0���0���0���0���0���0���0���0���0���0���0���0���0���0���0���0���0���0���0��0�0�0���0���0���0���0Bhttps://player.twitch.tv/?channel=esbbasketball1&parent=winline.rue��Bhttps://player.twitch.tv/?channel=esbbasketball3&parent=winline.run��3https://bigsports.servicecdn.ru/streams/9952_499736���2154391���
38272563���Ahttps://player.twitch.tv/?channel=gt_sports_tv2&parent=winline.ru���Ahttps://player.twitch.tv/?channel=gt_sports_tv1&parent=winline.ru���0

Its still decoded, but now u can see links and other.

Then I decide to use Python, here is code:

import asyncio
import websockets
import gzip

async def echo():
    """Connect to socket, send message&get response"""
    uri = "wss://wss.winline.ru/data_ng?client=site"
    async with websockets.connect(uri, extra_headers=headers) as websocket:

        await websocket.send("lang")
        await websocket.send("AQ==")
        await websocket.send("data")
        await websocket.send("WINLINE")
        await websocket.send("getdate")

        response = await websocket.recv()
        print(response)
        content = gzip.decompress(response)
        print(unpack_from('hhl', response, 0))
        print(unpack_from('hhl', content, 0))
        print(content)

if __name__ == "__main__":
    while True:
        asyncio.run(echo())

When I am using gzip.decompress(response) its still compress! Ok, then I decided to use unpack_from and I have the following: (-29921, 8, 3513385716622361344)  from -> unpack_from('hhl', response, 0) or (121, 256, 140738648382701667)  from -> unpack_from('hhl', content, 0). And again, maybe I should use another format characters('hhl') if it Python code(format characters).

The final decoded or decompress data should looks like:

42["sb_odds_change","{\"id\":35285604,\"type\":\"match\",\"provider\":2,\"status\":1,\"timestamp\":1672170170534,\"markets\":[{\"id\":60,\"specifiers\":\"\",\"status\":0,\"provider\":2,\"meta\":{\"dataVersion\":46,\"lA\":0,\"lH\":0},\"timestamp\":1672170170534,\"outcomes\":[{\"id\":1,\"type\":\"predefined\",\"odds\":14,\"active\":false,\"state\":1},{\"id\":3,\"type\":\"predefined\",\"odds\":1.23,\"active\":false,\"state\":1},{\"id\":2,\"type\":\"predefined\",\"odds\":4.3,\"active\":false,\"state\":1}],\"state\":1,\"weight\":2},{\"id\":63,\"specifiers\":\"\",\"status\":0,\"provider\":2,\"meta\":{\"dataVersion\":46,\"lA\":0,\"lH\":0},\"timestamp\":1672170170534,\"outcomes\":[{\"id\":9,\"type\":\"predefined\",\"odds\":3.75,\"active\":false,\"state\":1}"]

Any help will be greatly appreciated! Maybe some one know, what should I am try.

P.S. Its only for me, I will get no money for this, if some one think so! Am really interesting to know, how or where I should find info to decode response from web socket. I am stuck be honestly.


问:
How to enable dropping an element to another browser tab and drop there using cdkDrandAndDrop?
I am using angular cdkDragAndDrop to drag and drop elements from one list to another, but I would like to extend my implementation to also enable dragging the element to another tab of the same page and drop it there.
But when I try to drag the element out of my browser tab, it disappears and doesn't move to the next tab.

To make it more clear, a use case example of this behavior is like we can select the url of this page and drag it to next page and drop there.


问:
How to add a new variable (bar) to already existing bar chart?
I want to plot a bar chart of a timeseries using R, which displays several variables. I already plotted the first bar chart using the

barplot()
```
<p>function. The result is a stacked bar, which is what I want
I also added a horizontal line, with the</p>
<pre class="lang-r prettyprint-override"><code>abline ()
</code>```

function. So far so good. I attached a picture to show where I am at.
I now want to add another variable which would also be displayed next to the existing bars. So for each year I would like to have two bars, one is already plotted (see image).

I tried using the add_bars() function:
add_bars(data_frame)
I saved my dataframe as a matrix. However R just gives me an error message here:
error in add_bars(Bar_plot_RMC) : could not find function "add_bars"
It might also be worth noting that some of my new values to be displayed are NA.
This is my code for the entire plot:

barplot(Bar_plot_DMC,
        main = "Entwicklung des inländischen
                Materialverbrauchs (1994 - 2019)",
        ylab = "DMC (in t)",
        col = c("grey", "green","blue", "darkgreen", "yellow",
                "black"))
add_bars(Bar_plot_RMC)
abline(h = 7.2, col = 2, lwd = 4)
legend(x = "bottomleft",
       legend = c("Fossile Energieträger", "Erze",
                  "sonstige Mineralien", "Biomasse",
                  "Sonstige",
                  "Treibstoffbunkerungen"),
       fill = c("grey","green","blue", "darkgreen", "yellow",
                "black"),
       cex = 0.5)
```

So my question would be how to add a second variable to the bar plot.

Edit 1 : Imported the plotfunctions() package and bar_plot now works. However I do not know how to show the data I have next to each other. Right now, my graphic looks like picture 2new barplot which is not what I want. I want the bars to be displayed next to another, i.e. have 2 bars for 2008, 2009, 2010 ...
Here I want to have one stacked bar, and one single bar next to each other. How would I be able to display both of them next to each other?

Body:
I want to plot a bar chart of a timeseries using R, which displays several variables. I already plotted the first bar chart using the

barplot()

function. The result is a stacked bar, which is what I want
I also added a horizontal line, with the

abline ()

function. So far so good. I attached a picture to show where I am at.
I now want to add another variable which would also be displayed next to the existing bars. So for each year I would like to have two bars, one is already plotted (see image).

I tried using the add_bars() function:
add_bars(data_frame)
I saved my dataframe as a matrix. However R just gives me an error message here:
error in add_bars(Bar_plot_RMC) : could not find function "add_bars"
It might also be worth noting that some of my new values to be displayed are NA.
This is my code for the entire plot:

barplot(Bar_plot_DMC,
        main = "Entwicklung des inländischen
                Materialverbrauchs (1994 - 2019)",
        ylab = "DMC (in t)",
        col = c("grey", "green","blue", "darkgreen", "yellow",
                "black"))
add_bars(Bar_plot_RMC)
abline(h = 7.2, col = 2, lwd = 4)
legend(x = "bottomleft",
       legend = c("Fossile Energieträger", "Erze",
                  "sonstige Mineralien", "Biomasse",
                  "Sonstige",
                  "Treibstoffbunkerungen"),
       fill = c("grey","green","blue", "darkgreen", "yellow",
                "black"),
       cex = 0.5)

So my question would be how to add a second variable to the bar plot.

Edit 1 : Imported the plotfunctions() package and bar_plot now works. However I do not know how to show the data I have next to each other. Right now, my graphic looks like picture 2new barplot which is not what I want. I want the bars to be displayed next to another, i.e. have 2 bars for 2008, 2009, 2010 ...
Here I want to have one stacked bar, and one single bar next to each other. How would I be able to display both of them next to each other?


问:
android.test.purchased displays as a white dialog with not buy or cancel button just name and price
During the purchase flow, with ID: android.text.purchased, a plain white dialog box is displayed with only Sample Title and US$.99 at the top. No other buttons are present, e.g. no buy button.

I tried using the actual ID for the app on google play, and that worked fine.

But using stock tests:

android.test.item_unavailable  **Worked fine with an OK button displayed
**
android.test.canceled  Blank white dialog with Sample Title and US$.99 at the top but no OK button

android.test.refunded Blank white dialog with Sample Title and US$.99 at the top but no OK button

android.test.purchased Blank white dialog with Sample Title and US$.99 at the top but no Buy or Cancel button

```<code>
```CURRENTLY RUNNING ```
Android Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 30, 2022
</code>```

Body:
During the purchase flow, with ID: android.text.purchased, a plain white dialog box is displayed with only Sample Title and US$.99 at the top. No other buttons are present, e.g. no buy button.

I tried using the actual ID for the app on google play, and that worked fine.

But using stock tests:

android.test.item_unavailable  **Worked fine with an OK button displayed
**
android.test.canceled  Blank white dialog with Sample Title and US$.99 at the top but no OK button

android.test.refunded Blank white dialog with Sample Title and US$.99 at the top but no OK button

android.test.purchased Blank white dialog with Sample Title and US$.99 at the top but no Buy or Cancel button

```CURRENTLY RUNNING ```
Android Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 30, 2022


问:
"Edit" button working like a "Add" on Angular
I writing prject on Java using Spring Boot and Angular, and I've one question about "Edit" button in my project, fact is that she is working like a "Add" button, I mean she to create a new word in my table, and must edit

That's problem not on back side, 'coz I was testing my @Put method by Postman and he is working good and I made a conclusion that this is problem on front side of my program

My open Modal method in my component

```<code>public onOpenModal(word: Word | any, mode: string): void {

    const container = document.getElementById('main-container')

    const button = document.createElement('button');

    button.type = 'button';
    button.style.display = 'none';
    button.setAttribute('data-toggle', 'modal');

    if (mode === 'add') {
      button.setAttribute('data-target', '#addWordModal');
    }
    if (mode === 'update') {
      this.editWord = word;
      button.setAttribute('data-target', '#editWordModal');
    }
    if (mode === 'delete') {
      this.deleteWord = word;
      button.setAttribute('data-target', '#deleteWordModal');
    }

    container?.appendChild(button);
    button.click();
  }
</code>```

My modal windows

Add Word

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

        <form #addForm="ngForm" (ngSubmit)="onAddWord(addForm)">

            English word
            <input type="text" ngModel name="englishWord" class="form-control" id="english word" placeholder="english word" required>

            Transcription
            <input type="email" ngModel name="transcription" class="form-control" id="transcription" placeholder="Transcription" required>

            Translate word
            <input type="text" ngModel name="translateWord" class="form-control" id="translate word" placeholder="Translate word" required>

            <button type="button" id="add-word-form" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <button [disabled]="addForm.invalid"  type="submit" class="btn btn-primary" >Save changes</button>

        </form>

Edit Word

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

        <form #editForm="ngForm">

            English word
            <input type="text" ngModel="{{editWord?.englishWord}}" name = "englishWord" class="form-control" id="englishWord" placeholder="english word" required>

            Transcription
            <input type="email" ngModel="{{editWord?.transcription}}" name = "transcription" class="form-control" id="editTranscription" placeholder="Transcription" required>

            Translate word
            <input type="text" ngModel="{{editWord?.translateWord}}" name = "translateWord" class="form-control" id="translateWord" placeholder="Translate word" required>

            <button type="button" id="edit-word-form" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <button (click)="onEditWord(editForm.value)" type="submit" class="btn btn-primary" >Save changes</button>

        </form>

```
</div>
</div>
</p>
<p>Now I try explain my problem one more time using screenshots</p>
<p><img src="https://i.stack.imgur.com/C4CJ7.png" alt="enter image description here" /></p>
<p>I've that's table where I can add new word in my dictionary</p>
<p><img src="https://i.stack.imgur.com/q4sHd.png" alt="enter image description here" /></p>
<p>And when I try to edit a word, the program creates a new word which is the previously edited word
<img src="https://i.stack.imgur.com/fbanI.png" alt="enter image description here" /></p>
<p><img src="https://i.stack.imgur.com/L63dy.png" alt="enter image description here" /></p>
<p><img src="https://i.stack.imgur.com/bYh2Q.png" alt="enter image description here" /></p>
<p>I was trying to edit <code>word</code> on <code>words</code></p>
<p><em>Word service ts</em></p>
```  public addWord(word: Word): Observable<Word>{
    return this.http.post<Word>(`${this.apiServerUrl}/dictionary/add`, word);
  }
  public updateWord(word: Word): Observable<Word>{
    return this.http.put<Word>(`${this.apiServerUrl}/dictionary/update`, word);
  }
```
<p><strong>Put request using Postman</strong></p>
<p><img src="https://i.stack.imgur.com/W0QXq.png" alt="enter image description here" /></p>
<p><strong>Put request using UI</strong></p>
<p><img src="https://i.stack.imgur.com/wVhjw.png" alt="enter image description here" /></p>
<p><strong>Response using UI</strong></p>
```{
"id":1008,
"englishWord":"Removed",
"translateWord":"Удалять",
"transcription":"[transcription]",
"wordCode":null
}
```
<p><strong>onEditMethod</strong></p>
```  public onEditWord(word: Word): void {

    this.wordService.updateWord(word).subscribe(
      (response: Word) => {
        console.log(response);
        this.getWords();
      },
      (error: HttpErrorResponse) => {
        alert(error.message);
      }
    );
  }

```
<p><img src="https://i.stack.imgur.com/umtng.png" alt="enter image description here" /></p>
```Word.ts
____________________

export interface Word{
  id: number;
  englishWord: string;
  translateWord: string;
  transcription: string;
}

```
```WordService.ts
__________________
import {Observable} from "rxjs";
import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {Word} from "./word";

@Injectable({
  providedIn: 'root'
})

export class WordService{
  private apiServerUrl = 'http://localhost:8080';

  constructor(private http: HttpClient) { }

  public mainPage(): Observable<void>{
    return this.http.get<void>(`${this.apiServerUrl}`)
  }
  public getWords(): Observable<Word[]>{
    return this.http.get<Word[]>(`${this.apiServerUrl}/dictionary/all`);
  }
  public addWord(word: Word): Observable<Word>{
    return this.http.post<Word>(`${this.apiServerUrl}/dictionary/add`, word);
  }
  public updateWord(word: Word): Observable<Word>{
    return this.http.put<Word>(`${this.apiServerUrl}/dictionary/update`, word);
  }
  public deleteWord(wordId: number): Observable<void>{
    return this.http.delete<void>(`${this.apiServerUrl}/dictionary/delete/${wordId}`);
  }
}
```

Body:
I writing prject on Java using Spring Boot and Angular, and I've one question about "Edit" button in my project, fact is that she is working like a "Add" button, I mean she to create a new word in my table, and must edit

That's problem not on back side, 'coz I was testing my @Put method by Postman and he is working good and I made a conclusion that this is problem on front side of my program

My open Modal method in my component

public onOpenModal(word: Word | any, mode: string): void {

    const container = document.getElementById('main-container')

    const button = document.createElement('button');

    button.type = 'button';
    button.style.display = 'none';
    button.setAttribute('data-toggle', 'modal');

    if (mode === 'add') {
      button.setAttribute('data-target', '#addWordModal');
    }
    if (mode === 'update') {
      this.editWord = word;
      button.setAttribute('data-target', '#editWordModal');
    }
    if (mode === 'delete') {
      this.deleteWord = word;
      button.setAttribute('data-target', '#deleteWordModal');
    }

    container?.appendChild(button);
    button.click();
  }

My modal windows

Add Word

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

        <form #addForm="ngForm" (ngSubmit)="onAddWord(addForm)">

            English word
            <input type="text" ngModel name="englishWord" class="form-control" id="english word" placeholder="english word" required>

            Transcription
            <input type="email" ngModel name="transcription" class="form-control" id="transcription" placeholder="Transcription" required>

            Translate word
            <input type="text" ngModel name="translateWord" class="form-control" id="translate word" placeholder="Translate word" required>

            <button type="button" id="add-word-form" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <button [disabled]="addForm.invalid"  type="submit" class="btn btn-primary" >Save changes</button>

        </form>

Edit Word

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

        <form #editForm="ngForm">

            English word
            <input type="text" ngModel="{{editWord?.englishWord}}" name = "englishWord" class="form-control" id="englishWord" placeholder="english word" required>

            Transcription
            <input type="email" ngModel="{{editWord?.transcription}}" name = "transcription" class="form-control" id="editTranscription" placeholder="Transcription" required>

            Translate word
            <input type="text" ngModel="{{editWord?.translateWord}}" name = "translateWord" class="form-control" id="translateWord" placeholder="Translate word" required>

            <button type="button" id="edit-word-form" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <button (click)="onEditWord(editForm.value)" type="submit" class="btn btn-primary" >Save changes</button>

        </form>

Now I try explain my problem one more time using screenshots

I've that's table where I can add new word in my dictionary

And when I try to edit a word, the program creates a new word which is the previously edited word

I was trying to edit word on words

Word service ts

  public addWord(word: Word): Observable<Word>{
    return this.http.post<Word>(`${this.apiServerUrl}/dictionary/add`, word);
  }
  public updateWord(word: Word): Observable<Word>{
    return this.http.put<Word>(`${this.apiServerUrl}/dictionary/update`, word);
  }

Put request using Postman

Put request using UI

Response using UI

{
"id":1008,
"englishWord":"Removed",
"translateWord":"Удалять",
"transcription":"[transcription]",
"wordCode":null
}

onEditMethod

  public onEditWord(word: Word): void {

    this.wordService.updateWord(word).subscribe(
      (response: Word) => {
        console.log(response);
        this.getWords();
      },
      (error: HttpErrorResponse) => {
        alert(error.message);
      }
    );
  }

Word.ts
____________________

export interface Word{
  id: number;
  englishWord: string;
  translateWord: string;
  transcription: string;
}

WordService.ts
__________________
import {Observable} from "rxjs";
import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {Word} from "./word";

@Injectable({
  providedIn: 'root'
})

export class WordService{
  private apiServerUrl = 'http://localhost:8080';

  constructor(private http: HttpClient) { }

  public mainPage(): Observable<void>{
    return this.http.get<void>(`${this.apiServerUrl}`)
  }
  public getWords(): Observable<Word[]>{
    return this.http.get<Word[]>(`${this.apiServerUrl}/dictionary/all`);
  }
  public addWord(word: Word): Observable<Word>{
    return this.http.post<Word>(`${this.apiServerUrl}/dictionary/add`, word);
  }
  public updateWord(word: Word): Observable<Word>{
    return this.http.put<Word>(`${this.apiServerUrl}/dictionary/update`, word);
  }
  public deleteWord(wordId: number): Observable<void>{
    return this.http.delete<void>(`${this.apiServerUrl}/dictionary/delete/${wordId}`);
  }
}


问:
Dataframe: Unable to save cell value with .at or .loc
I'm having an issue while assigning values to pandas data frame cell with .at. For example:

```<code>u55.at[idx, 'cb_testid'] = new_val
df_pivot.at[save_idx, 'sample_nr'] = sample_nr
</code>```

This returns the correct value if I print a specific index, example u55.at[1, 'cb_testid'], but printing the column or data frame, the old values are returned.

How could I get the proper values in my df?

Body:
I'm having an issue while assigning values to pandas data frame cell with .at. For example:

u55.at[idx, 'cb_testid'] = new_val
df_pivot.at[save_idx, 'sample_nr'] = sample_nr

This returns the correct value if I print a specific index, example u55.at[1, 'cb_testid'], but printing the column or data frame, the old values are returned.

How could I get the proper values in my df?


问:
Make nested flexbox child take all height
In react native, I am trying to make the flex "columns" inside the rows take up the whole height but can't accomplish it. I tried using 'alignItems: "stretch"' but that did not work either.

Here's a live preview: https://snack.expo.dev/@mccafe/fd9368

```<code>import { Text, View, StyleSheet, SafeAreaView } from 'react-native';

export default function App() {
  threeByThree = {
    rowCount:3,
    columnCount:3,
  }
  return (
      <SafeAreaView style={styles.safeAreaView}>
      {
        Array(threeByThree["rowCount"]).fill(null).map((value, rowIndex) => (
          <View style={styles.rowContainer}>
            <View key={rowIndex} style={rowIndex==0?styles.rowOne:(rowIndex==1?styles.rowTwo:styles.rowThree)}>
              <View style={{flexDirection:"row"}}>
              {Array(threeByThree["columnCount"]).fill(null).map((value, columnIndex) => (
                <View key={columnIndex} style={columnIndex==0?styles.columnOne:(columnIndex==1?styles.columnTwo:styles.columnThree)}>
                  <Text>{columnIndex}</Text>{console.log(rowIndex, columnIndex)}
                </View>
              ))}
              </View>
            </View>
          </View>
        ))
      }
      </SafeAreaView>
  )
}
const styles = StyleSheet.create({
  safeAreaView: {
    flex:1,
    width:"100%",
    height:"100%",
    backgroundColor:"orange"
  },
  rowContainer: {
    flex:1,
    backgroundColor:"white",
    flexDirection:"column",
    alignItems: "stretch",
    alignSelf: "stretch",
  },
  rowOne: {
    flex:1,
    alignSelf: "stretch",
    backgroundColor:"blue"
  },
  rowTwo: {
    flex:1,
    backgroundColor:"lightblue",
    alignItems: "stretch",
    alignSelf: "stretch",
  },
  rowThree: {
    flex:1,
    backgroundColor:"darkblue",
  },
  columnContainer: {
    flex:1,
    backgroundColor:"lightgreen",
    width:"100%",
    height:"100%",
    alignItems: "stretch",
    flexDirection:"row"
  },
  columnOne: {
    flex:1,
    backgroundColor:"red",
    height:"100%",
    alignItems: "center",
    alignSelf: "center",
  },
  columnTwo: {
    flex:1,
    backgroundColor:"yellow",
  },
  columnThree: {
    flex:1,
    backgroundColor:"green",
  },
})
</code>```

In react native, I am trying to make the flex "columns" inside the rows take up the whole height but can't accomplish it. I tried using 'alignItems: "stretch"' but that did not work either.

Body:
In react native, I am trying to make the flex "columns" inside the rows take up the whole height but can't accomplish it. I tried using 'alignItems: "stretch"' but that did not work either.

Here's a live preview: https://snack.expo.dev/@mccafe/fd9368

import { Text, View, StyleSheet, SafeAreaView } from 'react-native';

export default function App() {
  threeByThree = {
    rowCount:3,
    columnCount:3,
  }
  return (
      <SafeAreaView style={styles.safeAreaView}>
      {
        Array(threeByThree["rowCount"]).fill(null).map((value, rowIndex) => (
          <View style={styles.rowContainer}>
            <View key={rowIndex} style={rowIndex==0?styles.rowOne:(rowIndex==1?styles.rowTwo:styles.rowThree)}>
              <View style={{flexDirection:"row"}}>
              {Array(threeByThree["columnCount"]).fill(null).map((value, columnIndex) => (
                <View key={columnIndex} style={columnIndex==0?styles.columnOne:(columnIndex==1?styles.columnTwo:styles.columnThree)}>
                  <Text>{columnIndex}</Text>{console.log(rowIndex, columnIndex)}
                </View>
              ))}
              </View>
            </View>
          </View>
        ))
      }
      </SafeAreaView>
  )
}
const styles = StyleSheet.create({
  safeAreaView: {
    flex:1,
    width:"100%",
    height:"100%",
    backgroundColor:"orange"
  },
  rowContainer: {
    flex:1,
    backgroundColor:"white",
    flexDirection:"column",
    alignItems: "stretch",
    alignSelf: "stretch",
  },
  rowOne: {
    flex:1,
    alignSelf: "stretch",
    backgroundColor:"blue"
  },
  rowTwo: {
    flex:1,
    backgroundColor:"lightblue",
    alignItems: "stretch",
    alignSelf: "stretch",
  },
  rowThree: {
    flex:1,
    backgroundColor:"darkblue",
  },
  columnContainer: {
    flex:1,
    backgroundColor:"lightgreen",
    width:"100%",
    height:"100%",
    alignItems: "stretch",
    flexDirection:"row"
  },
  columnOne: {
    flex:1,
    backgroundColor:"red",
    height:"100%",
    alignItems: "center",
    alignSelf: "center",
  },
  columnTwo: {
    flex:1,
    backgroundColor:"yellow",
  },
  columnThree: {
    flex:1,
    backgroundColor:"green",
  },
})

In react native, I am trying to make the flex "columns" inside the rows take up the whole height but can't accomplish it. I tried using 'alignItems: "stretch"' but that did not work either.


问:
Popup window displayed wrongly
[tag:

Hi All,

I have added modal popup in my page. Popup was not coming correctly and unable to edit the popup screen as well. Pls see the attached image for more info

I have a button, when user clicks it, it will show the popup

```<code><div class="mb-2 mb-sm-0">
<button type ="button" data-toggle="modal" data-target="#loginModal" class="btn px-4 btn-red mb-1"><i class="fa fa-upload"></i></button>
</div>
</code>```

Modal code

```<code><!-- Login modal -->
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 360px;">
<div class="modal-content shadow border-none radius-2 px-3">
<div class="modal-header mt-n1 border-0 justify-content-center pos-rel">
<h3 class="modal-title text-white mt-n5 text-115" id="loginModalLabel">
Login to continue
</h3>
<button type="button" class="close position-br mb-n4" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body text-center py-0">
<h2 class="text-grey-d1 text-160">
<i class="fa fa-leaf text-success-m2 text-120 mr-1"></i>
Test App
</h2>
<form autocomplete="off" class="form-row mt-45">
<div class="form-group col-12 mb-3">
<div class="d-flex align-items-center input-floating-label text-blue-m1 brc-blue-m2">
<input type="text" class="form-control pr-4 shadow-none radius-1" id="id-login-username" />
<i class="fa fa-user text-grey-m2 ml-n4"></i>
<label class="floating-label text-grey-l1 text-95 ml-n3" for="id-login-username">Username</label>
</div>
</div>
<div class="form-group col-12">
<div class="d-flex align-items-center input-floating-label text-blue-m1 brc-blue-m2">
<input type="password" class="form-control pr-4 shadow-none radius-1" id="id-login-password" />
<i class="fa fa-key text-grey-m2 ml-n4"></i>
<label class="floating-label text-grey-l1 text-95 ml-n3" for="id-login-password">Password</label>
</div>
</div>
<div class="form-group col-12">
<button type="button" class="btn btn-sm btn-primary btn-block px-4 text-600 radius-1 disabled">
Log In
</button>
</div>
<div class="form-group col-12">
<a href="#" class="btn btn-link text-orange-d3 text-95" data-dismiss="modal">
Forgot password?!
</a>
</div>
</form>
</div><!-- /.modal-body -->
<div class="modal-footer bg-white justify-content-between py-3">
<div class="mx-auto text-grey-m1" data-dismiss="modal">
Not a member?
<a href="#" class="text-blue">
Sign up
</a>
</div>
</div>
</div>
</div>
</div>
</code>```

Title: Popup window displayed wrongly

Body:
[tag:

Hi All,

I have added modal popup in my page. Popup was not coming correctly and unable to edit the popup screen as well. Pls see the attached image for more info

I have a button, when user clicks it, it will show the popup

<button type ="button" data-toggle="modal" data-target="#loginModal" class="btn px-4 btn-red mb-1"></button>

Modal code

Login to continue

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

Test App

<form autocomplete="off" class="form-row mt-45">

<input type="text" class="form-control pr-4 shadow-none radius-1" id="id-login-username" />

Username

<input type="password" class="form-control pr-4 shadow-none radius-1" id="id-login-password" />

Password

<button type="button" class="btn btn-sm btn-primary btn-block px-4 text-600 radius-1 disabled">
Log In
</button>

Forgot password?!

</form>

Not a member?

Sign up


问:
Cannot create a NumPy datetime other than NaT with generic units
I having a problem to insert a date with loadtxt.

```<code>dt = np.dtype({'names':['name','height','year'],'formats':['U55','f4','datetime64']})

I = StringIO('Alice,1.75,2000-08-03')

txt = np.loadtxt(I,dtype = dt,delimiter = ',')
txt
</code>```

When I tried to run the code, it returns the following error:Cannot create a NumPy datetime other than NaT with generic units

I tried to solve as i saw in other question Python numpy loadtxt fails with date time, but i'm failing in import strpdate2num from matplitlib.dates to convert the date.

Body:
I having a problem to insert a date with loadtxt.

dt = np.dtype({'names':['name','height','year'],'formats':['U55','f4','datetime64']})

I = StringIO('Alice,1.75,2000-08-03')

txt = np.loadtxt(I,dtype = dt,delimiter = ',')
txt

When I tried to run the code, it returns the following error:Cannot create a NumPy datetime other than NaT with generic units

I tried to solve as i saw in other question Python numpy loadtxt fails with date time, but i'm failing in import strpdate2num from matplitlib.dates to convert the date.


问:
WP_Query Woocommerce: How to sort products by featured products then new (date from newest to oldest)
I want to order products from Woocommerce by featured products than new (date from newest to oldest) when I query by products categories in homepage templates.

This is my code:
`

```<code><?php
$tax_query[] = array(
    'taxonomy' => 'product_visibility',
    'field'    => 'name',
    'terms'    => 'featured',
    'operator' => 'IN', // or 'NOT IN' to exclude feature products
);

$args_product = array(
    'post_type'        => 'product',
    'post_status'      => 'publish',
    'posts_per_page'   => 8,
    'orderby'          => 'date',
    'order'            => 'DESC',
    'tax_query'        => $tax_query,
    'product_cat'      => get_term($product_cat)->name,
);
?>

<?php $product_query = new WP_Query( $args_product ); ?>

<?php if ( $product_query->have_posts() ) :
    while ($product_query-> have_posts()) : $product_query -> the_post(); ?>

        <?php wc_get_template_part( 'content', 'product' ); ?>

<?php endwhile;
else :
    do_action( 'woocommerce_no_products_found' );
endif;
woocommerce_reset_loop();
wp_reset_query();
wp_reset_postdata();
?>
</code>```

`

but the result only shows featured products. I want to if the products category not has featured products or featured products quantity < 8, the result show featured products, then shows products by date from newest to oldest.

Thanks all,

I tried with 'relation'=> 'OR' with tax_query:

```<code>$tax_query[] = array(
    'relation' => 'OR',
    array(
        'taxonomy' => 'product_visibility',
        'field'    => 'name',
        'terms'    => 'featured',
        'operator' => 'IN', // or 'NOT IN' to exclude feature products
    ),
    array(
        'taxonomy' => 'product_cat',
        'field'    => 'name',
        'terms'    =>  get_term($product_cat)->name,
        'operator' =>  'IN'
    )
);
</code>```

but was wrong. I don't know where I am going wrong.
Thank you.

Body:
I want to order products from Woocommerce by featured products than new (date from newest to oldest) when I query by products categories in homepage templates.

This is my code:
`

<?php
$tax_query[] = array(
    'taxonomy' => 'product_visibility',
    'field'    => 'name',
    'terms'    => 'featured',
    'operator' => 'IN', // or 'NOT IN' to exclude feature products
);

$args_product = array(
    'post_type'        => 'product',
    'post_status'      => 'publish',
    'posts_per_page'   => 8,
    'orderby'          => 'date',
    'order'            => 'DESC',
    'tax_query'        => $tax_query,
    'product_cat'      => get_term($product_cat)->name,
);
?>

<?php $product_query = new WP_Query( $args_product ); ?>

<?php if ( $product_query->have_posts() ) :
    while ($product_query-> have_posts()) : $product_query -> the_post(); ?>

        <?php wc_get_template_part( 'content', 'product' ); ?>

<?php endwhile;
else :
    do_action( 'woocommerce_no_products_found' );
endif;
woocommerce_reset_loop();
wp_reset_query();
wp_reset_postdata();
?>

`

but the result only shows featured products. I want to if the products category not has featured products or featured products quantity < 8, the result show featured products, then shows products by date from newest to oldest.

Thanks all,

I tried with 'relation'=> 'OR' with tax_query:

$tax_query[] = array(
    'relation' => 'OR',
    array(
        'taxonomy' => 'product_visibility',
        'field'    => 'name',
        'terms'    => 'featured',
        'operator' => 'IN', // or 'NOT IN' to exclude feature products
    ),
    array(
        'taxonomy' => 'product_cat',
        'field'    => 'name',
        'terms'    =>  get_term($product_cat)->name,
        'operator' =>  'IN'
    )
);

but was wrong. I don't know where I am going wrong.
Thank you.