This is the code with QtQuick.Controls.12.2. It displays properly but when I press Ctrl nothing happens. I expect the print statement to execute. What am I doing wrong here? Answer Indeed it looks like it’s not possible to use a single modifier (Ctrl/Shift/…) as a shortcut value. (See this similar…
Problem while loop to compare current date to date in a file
I want to compare current date to date present in file [every 30 seconds and in background] I don’t know if I have to do an infinite loop or a while read line loop … So, every match of current date with a date of a file, I print the current line matched in xmessage. ( I add a date
JavaScript Follow / Unfollow Button
I would like to make a simple JavaScript program witch allow you to like and dislike. So actually I am new in JavaScript it’s a bit difficult me yet. So when you click onto the Follow button it will increase the “countF” variable’s amount with 1, and change the button text to “Un…
What would be a good algorithm for patching binary files on Linux?
I am trying to reduce data transfer to my embedded Linux device by creating patches for almost similar binaries. I have memory constraints on my device and hence heavy algorithms like bsdiff and bspatch are unaffordable on my target for binary sizes of around 36-60 MB. I would like to know the commands that h…
What is using so much memory on an idle linux server? Comparing output of “htop” and “ps aux”
I am trying to understand and compare the output I see from htop (sorted by mem%) and “ps aux –sort=-%mem | grep query.jar” and determine why 24.2G out of 32.3G is in use on an idle server. The ps command shows a single parent (not child process I assume): Whereas htop shows PID 6790 as well…
Recursively delete all but the one newest file throughout all directories
My system depends on only having one file (PDF, DOCX) per subdirectory. There are thousands and thousands of subdirectories. Due to a permission error, in some of them, I have ended up with more than one file. In these instances, I only want to keep the one most recently modified file. I was able to export a …
Python3 Playsound Tkinter code not running in order expected
I want to call a function (trigger) that will hide one image, show another image and play a sound. The sound has to play last as it lasts for several seconds locking everything up. When I call the function my alarm sound plays for several seconds then an image is shown showing which sensor has triggered (the …
output mountpoint on (usb)device detection
I want to create a bash script that will output the mount point from an inserted USB device. I have two commands (between “do” “and” done”) that work separately but not together in a bash script. The script looks for a UUID file use the $UUID filename in the lsblk command to extr…
What’s the difference between docker run –device and docker run –volume?
If everything is “just” a file in linux, how do files/nodes in /dev differ from other files such that docker must handle them differently? What does docker do differently for device files? I expect it to be a shorthand for a more verbose bind command? In fact, after just doing a regular bind mount…
Can I use QFile to truncate a write protected file?
I am not running the application itself as root. Rather than do a convoluted With QProcess, I would rather simply open /sys/devices/system/cpu/intel_pstate/min_perf_pct and truncate a number into it. It would look something like this: Is there a way to do this without having to start or run any other part of …