Categories
Arduino Ask Engineering

Send custom HID values instead of keys

I’ve been building a small macro keypad based on the ATmega32U4. So far, I’ve been able to send standard key presses to the host. But since I want a program on the host system to react to the key presses, I only send the keys to serial to avoid typing anything. For now, this does […]

Categories
Mastering Development

setTimeout not working client side on landing page

Good Afternoon, I am trying to have a loading animation for the pages on my site, but the client-side setTimeout function is not working. I have the same function on a test page with no bootstrap and no other scripts and it works, but once I put the script on my landing page it doesn’t […]

Categories
Ask Chemistry

Why trans-1-chloro-4-methylcyclohexane have a higher relative energy than trans-1-chloro-2-methylcyclohexane?

Both can be A,a or e,e, in 1,4 the groups are further apart -> less steric strain, why is 1,4 less stable according to experimental values? 1,2 high energy conformer’s relative energy (kj/mol) is 4.05 and 1,4 high energy conformer’s relative energy (kj/mol) is 4.50

Categories
Database Development

Determine Nodes in Network with PostgreSQL

I have a table where every entry is a node and the table contains the direct connections of each node to other nodes. I am looking to create a view with a column for each node containing all the nodes in the chain, not just the nodes the node itself is connected to. An example […]

Categories
Mastering Development

Putting a “in list” into an if statement

I am currently in the process of creating a hangman game. My problem is in the 2nd for loop, for x in wordlist. This for loop is supposed go through the wordlist (in this example [‘H’, ‘E’, ‘L’, ‘L’, ‘O’]) and: if x in newwordlist or x==guessedletter, then x is printed onto the new list […]

Categories
Mastering Development

Webcam on MS-Access 16

I am building an inventory database with Microsoft Access. I am running the latest version on Access on a windows 10 machine with all latest updates. What I want is to access the webcam so I can easily take a picture of the item in inventory. Then save the picture to a certain path and […]

Categories
Ask Electrical Engineering Engineering

Sleep current of automotive device increasing over time

I have something like a tire pressure monitor. It is battery operated. I haven’t done automotive before and it is a whole other world besides consumer. I put in all high temp components (i,e, 40-125C vs 40-85C). I can’t really find much info on what happens to IC and components in a high temp, high […]

Categories
Mastering Development

Binomial Random Variable in Python

I’m attempting to solve the below question using just one line of code: ‘Suppose you take a multiple choice test with 10 questions, and each question has 5 answer choices (a,b,c,d,e), what is the probability you get exactly 4 questions correct just by guessing?’ I know the answer is 0.08808 or around 9%. I’m trying […]

Categories
Mastering Development

Write a function called stringIndexOf, which accepts two strings: the first is a word and the second is a single character

The function should return the first index in the word at which the character exists or -1 if the character is not found. Do not use the String.indexOf() function. Example: stringIndexOf(‘awesome’, ‘e’) // 2 My code keeps returning -1: function stringIndexOf(word, char) { let index = 1 for (var i = 0; i < word.length; […]

Categories
CMS Drupal Mastering Development

Intermittent AJAX error on Commerce Product pages causing pricing not to update when variations are changed

We have a Commerce 2 website with an intermittent where changing the variations on the add to cart form does not update the photos and prices. When the issue is occurring there is an AJAX error in the console log (see below). However, the error and issue disappear after a page-load of two. JS aggregation […]