Categories
Arduino Ask Engineering

ESP-12e – RX/TX pins flickering on boot when used as GPIO pins

I am using ESP-12e as a controller for my garden lights. I am using pins 1 (TX), 3 (RX) and 5 as an analog output (PWM signal with mosfets) for three separate light sets. ESP is powered on when wall switch is turned on (wall switch turns on power adapter). When I turn the switch […]

Categories
CMS Mastering Development Wordpress

How to limit access to media library using wp.media on the frontend?

I am trying to make a frontend page for my plugin where users can create a post (CPT) and attach a thumbnail to it. I call wp_enqueue_media(); and use this HTML in the form: <div> <label for="post_image">Name</label> <input type="text" id="post_image"> <button type="button" class="btn js-image-upload">Select Image</button> </div> with this js code for the media uploader $(document).on(‘click’, […]

Categories
Mastering Development

Is there a way to extract the keys from JSON using jsonpath-ng?

I want to create a list of keys from JSON (actually JSON Schema). JSON is complex and nested so I am using the jsonpath-ng library. I can’t manage to get the list of keys. On the other hand, extracting the values is successful with this syntax: print([match.value for match in tagNames]). Attempt to extract the […]

Categories
Linux Mastering Development Ubuntu

Encrypt each user’s home folder individually with ZFS

Scenario is that I have a pile of computers (with Ubuntu 20.04), each of which can have multiple users. Each user’s account has to be encrypted individually.officially supporte As ecryptfs is no longer recommended, I took the following articles with ZFS based approaches as inspiration: https://medium.com/@steinarlbergmyrvang/ubuntu-20-04-with-encrypted-home-f5ce490333cc https://talldanestale.dk/2020/04/06/zfs-and-homedir-encryption/ I chose the "experimental" ZFS support during Ubuntu […]

Categories
Linux Mastering Development Ubuntu

How to disable on-board Bluetooth on Raspberry Pi 4

I have Raspberry Pi 4 Model B 8GB with installed Ubuntu 20.04 Server. How to disable onboard Bluetooth which requires the use of the hardware UART and restore UART0/ttyAMA0 over GPIOs 14 & 15? On Raspbian is needed to: Added dtoverlay=pi3-miniuart-bt in /boot/config.txt Run sudo systemctl disable hciuart But this not works on Ubuntu. I’ve […]

Categories
CMS Mastering Development Wordpress

order terms by count

Is there a way to order my term list by the terms that got more posts related? Im trying this, but without success: <?php $terms = get_terms( ‘jobinformationcat’, array( ‘orderby’ => ‘count’, ‘order’ => ‘DESC’, ‘hide_empty’=>0 ) ); foreach ($terms as $key => $term) { $link = get_term_link($term); $pressCat = “”; if($term->slug == $slugTerm){ $pressCat […]

Categories
Ask Board Games Games

What is the name of this very simple improvised card game?

I’m looking for the name of the improvised card game for two players with the following rules: Each player gets 13 cards numbered from 1 to 13 (These could also be from Ace to King). Both players play a card and place it upside down on the middle of the table, and then turn their […]

Categories
Ask Mathematics

Finding $z=x+y$ such that $x^2 + y^2$ is prime

For which integers $z$ can one write $z=x+y$ such that $x^2+y^2$ is prime? It feels like it should be possible for all odd $z>1$, and I have tried to adapt Euler’s proof of Girard/Fermat’s assertion that any prime congruent to $1 \bmod 4$ can be uniquely expressed as the sum of two squares, but without […]

Categories
Development

change aws launch template name

I’m new to aws. How can I change AWS launch template name? I tried to run the command: aws ec2 modify-launch-template –launch-template-id <ID> –launch-template-name <NEW_LAUNCH_TEMPLATE_NAME> or adding the ‘Name’ tag, but without success.

Categories
CMS Development Wordpress

Search for categories

I would like to propose on my site a search engine allowing to find categories (with suggestions), and not posts or pages. I tried different plugins, including ajax search lite, but without success, because it always necesseray to select as source article or page. Do you know a solution? With Ajax search lite or others? […]