How to set QT_QPA_PLATFORM_PLUGIN_PATH properly (concept)? - qt

I have Qt Creator and Qt 5.5 installed.
QT_QPA_PLATFORM_PLUGIN_PATH = C:\Qt\5.5\msvc2013\plugins
If I disable the environment var, I do get an error when I launch an application from QtC. So the variable seems to be required.
My problem is:
When I run other Qt based applications (i.e. Teamspeak or such), those fail, I always have to disable (delete) QT_QPA_PLATFORM_PLUGIN_PATH first
When I use KITS in QtC and switch between Qt versions (i.e. 5.4, 5.6) the variable is not in sync with this very version
How is this supposed to work?

The best solution I have found so far is to set it on the QtC Project page for that specific build

My decision that helped me. It:
In the search for Win 10 enter sysdm.cpl
Advanced -> Environment Variables -> to System Variables -> add:
PATH
C: \ Users \ ~ \ AppData \ Local \ Programs \ Python \ Python36-32 \ Lib \ site-packages \ pyqt5_tools \ plugins \ platforms \ (your address to qminimal.dll, qoffscreen.dll, qwebgl.dll)
dll took from here: https://www.riverbankcomputing.com/software/pyqt/download5 official site

Related

Unable to successfully build the rocker/r-apt image NO GPG KEY found

I am attempting to utilize the rocker/r-apt image which enables R binary installs.
My 72 Minute Docker Build using the r-base image could use some help...
My file looks like this.
FROM container.registry/rocker/r-apt:bionic
RUN apt-get update
Couple of notes. My company uses an internal registry, so i've downloaded the image from
https://hub.docker.com/r/rocker/r-apt
and pushed it to my local container registry.
When I try and build the Docker container it gives me this error.
UPDATE - Full Error message
/deb.debian.org/debian testing InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138
I can post a more detailed error message when the internet on my other computer returns.
I realize now that bionic is the Ubuntu distro. r-base uses a debian base from what I can tell.
My big question..what am I doing wrong to get this rocker/r-apt image to run correctly and still allow me to use apt-get to install a number of things, include the cran-r packages that its supposed to enable.
I am following this post by datawookie.
https://datawookie.netlify.app/blog/2019/01/docker-images-for-r-r-base-versus-r-apt/
UPDATE
My new big question... should i be pointing at deb.debian.org/debian for apt-get?
I would suggest to use rocker/r-ubuntu instead of rocker/r-apt (which predates it). I am the man behind the curtain for both.
Within Rocker we have containers based on Debian, and containers based on Ubuntu, and containers based on Debian now that will likely be based on Ubuntu in the future. In short, "it's complicated" but that is in part ... because we have so darn many containers already.
The source for background information is still our R Journal paper (shortcut to pdf).
Success!!! So the R-Ubuntu 20.04 appears to be working like a charm.
My outcome of decreasing the build time of my R application has worked.
72 Minutes is now 4 Minutes
This is important because our applications run in CI/CD pipelines and so a 72 minute build is extremely annoying. Not to mention consumes lots of resources to compile code.
It looks like all my issues were related to my organizations Nexus Repository.
Once we downloaded the R-Ubuntu, we had to rebuild it from the GIT Repo to utilize our internal Ubuntu Image. That fixed 1 problem.
Then I had to import the Michael Rutter Repo as a source and update that to utilize the internal repository.
The one issue that might not be apparent is that the DockerFile has to have the apt-get update and installs in the correct order. I do not recall if the source image had all this, but I'll post the order here.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
&& apt-get install -y gnupg2 \
&& apt-get install -y --no-install-recommends \
dialog \
software-properties-common \
ed \
less \
locales \
vim-tiny \
wget \
ca-certificates
So once all that was setup it worked like magic.

Is it possible to use javapackager on ZuluFX for Mac

I was able to use ZuluFX 8 with javapackager on Windows. However, on a Mac I get this error:
Bundler Mac Application Image skipped because of a configuration problem: Cannot determine which JRE/JDK exists in the specified runtime directory.
Advice to fix: Point the runtime directory to one of the JDK/JRE root, the Contents/Home directory of that root, or the Contents/Home/jre directory of the JDK.
It's pretty easy to just move the package into Contents/Home but I doubt that will work as it seems there is no JRE bundled with the Mac version of ZuluFX 8. Is this something that can be worked around?
It's pretty easy to just move the package into Contents/Home but I doubt that will work as it seems there is no JRE bundled with the Mac version of ZuluFX 8.
From what I'm seeing, I'm not sure that's correct. The ZuluFx 8 archive for Mac contains a jre directory. I extracted the archive to ~/zuluFX and from there created the Contents/Home directory as required by MacOS and added a symbolic link to said jre directory there. I then set $JAVA_HOME accordingly:
$ pwd
/Users/cody/zuluFX
$ mkdir -p Contents/Home
$ ln -s ../../jre .
$ export JAVA_HOME=~/zuluFX
Then I utilized a simple javapackager example on github to test its usage (I have no other JREs/JDKs installed on this box). The example app simply dumps Java properties and environment variables in a TextArea.
I had to modify the 3build script in the example to comment out its attempt to re-set $JAVA_HOME, but otherwise, it builds successfully, with the following javapackager command:
javapackager \
-deploy -Bruntime=${JAVA_HOME} \
-native image \
-srcdir . \
-srcfiles MacJavaPropertiesApp.jar \
-outdir release \
-outfile ${APP_DIR_NAME} \
-appclass MacJavaPropertiesApp \
-name "MacJavaProperties" \
-title "MacJavaProperties" \
-nosign \
-v
When I launch the resulting app, it reports the usage of the azul/zulu jre as expected:

How to generate some models for java with OpenApi Generator?

I successfully did generate a REST Client in java from a Swagger/OpenApi v2.0 using OpenApi Generator CLI 3.3.2-SNAPSHOT
But I already have a REST Client, so I just want to generate some models from the spec.
I get success when I run:
java -Dmodels -DmodelDocs=false \
-jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i swagger.json \
-g java \
-o /temp/my_models
But when I want to generate just specific models with
java -Dmodels=Body,Header -DmodelDocs=false \
-jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i swagger.json \
-g java
-o /temp/my_selected_models
I'm getting this ERROR:
[main] INFO o.o.c.languages.AbstractJavaCodegen - Environment
variable JAVA_POST_PROCESS_FILE not defined so the Java code may not
be properly formatted. To define it, try 'export
JAVA_POST_PROCESS_FILE="/usr/local/bin/clang-format -i"' (Linux/Mac)
What is this JAVA_POST_PROCESS_FILE and how can I specify a valid format to generate the models?
Why the code generation success with all models but fails with a subset?
That message is just informational. It aims to inform you that there's a way to auto-format the auto-generated Java code by specifying an environment variable with the auto code formatter (clang_format in this case):
export JAVA_POST_PROCESS_FILE="/usr/local/bin/clang-format -i"
In other words, it does not affect the code generation process if the environment variable is not specified.

running pyspark kafka steam with an error

When I tried to run an example code for spark-steaming: "kafka_wordcount.py"
under the folder: /usr/local/spark/examples/src/main/python/streaming
The code explicitly describes the instruction to execute the code as:
" $ bin/spark-submit --jars \
external/kafka-assembly/target/scala-*/spark-streaming-kafka-assembly-*.jar \
examples/src/main/python/streaming/kafka_wordcount.py \
localhost:2181 test
test is the topic name. But I cannot find the jar and the path:
" external/kafka-assembly/target/scala-/spark-streaming-kafka-assembly-.jar"
So instead I created a folder "streaming/jar/" and put all jars from the
website http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22spark-streaming-kafka-assembly_2.10%22 and then when I run
"park-submit --jars ~/stream-example/jars/spark-streaming-kafka-assembly_*.jar kafka_wordcount.py localhost:2181 topic"
which shows
"Error: No main class set in JAR; please specify one with --class
Run with --help for usage help or --verbose for debug output"
What is wrong with that? Where are jars?
A ton of Thanks!!
This question was asked long ago, so I assume you have figured out by now.
But, as I just had the same problem, I will post the solution that worked for me.
The deployment section of this guide (http://spark.apache.org/docs/latest/streaming-kafka-integration.html) says you can pass the lib with the --packages argument, like bellow:
bin/spark-submit \
--packages org.apache.spark:spark-streaming-kafka_2.10:1.6.2 \
examples/src/main/python/streaming/kafka_wordcount.py \
localhost:2181 test
You can also download the jar itself here: http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22spark-streaming-kafka-assembly_2.10%22
Note: I didn't ran the command above, I tested with this other example, but it should work the same way:
bin/spark-submit
--packages org.apache.spark:spark-streaming-kafka_2.10:1.6.2 \
examples/src/main/python/streaming/direct_kafka_wordcount.py \
localhost:9092 test

How to add Flash Player prebuilt application to the system.img in android?

I am trying to customize my android system by adding Flash Player to the default system applications.
I added the .apk file to packages/apps/FlashPlayer, with the Android.mk file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := FlashPlayer
LOCAL_SRC_FILES := FlashPlayer.apk
LOCAL_MODULE_SUFFIX := .apk
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)
This apk also uses some libraries: libflashplayer.so libstagefright_froyo.so. libstagefright_honeycomb.so and libysshared.so.
I created a module for each one and added them to generic.mk in the variable
PRODUCT_PACKAGES
PRODUCT_PACKAGES:= libflashplayer \
libstagefright_froyo \
libstagefright_honeycomb \
libysshared \
FlashPlayer \
I tested with adb shell, the apk is in /system/app and the libs are present in /system/lib
but when I try to play a movie from a browser, it says that the flash player is not installed.
However if I manually install FlashPlayer with adb install command the movie can be played from browser.
Can you help with this issue?
Libs should be in /system/lib/plugins/com.adobe.flashplayer, according to PluginManager.java.
I got the very same problem. For some reason, WebKit is unable to load plugins that are installed by adding them into PRODUCT_PACKAGES list. However, WebKit will load them if you install them with adb install. I still did not find other way for installing them. Only adb install will make them work. Please, update your post here if You got any progress on this.

Resources