Categories
Arduino Ask Engineering

6 buttons useless box

i want to make a useless box with 6 buttons MY CODE // steppmm*moveX=240 #include <Stepper.h> int BUTTON_PIN[7] = {26, 27, 22, 23, 24, 25, 10}; int lastState = LOW; int currentState; float Stepmm = 250 ; float A = 0; float B = 0; int S1[0]; const int stepsPerRevolution = 200 ; int switchPos[9] […]

Categories
Mastering Development

Need to generate output in the following format year, q1,q2,q3,q4 in the MS SQL server for below data

CREATE TABLE acquisition ( id INT PRIMARY KEY IDENTITY, company_name VARCHAR(100), cost_amount INT NOT NULL, acquired_at DATE NOT NULL ); INSERT INTO acquisition(company_name, cost_amount, acquired_at) VALUES (1,’HOFA’, 6850, ‘2010-01-17′), (2,’POGA’, 9256, ‘2019-09-04′), (3,’CUPU’, 9329, ‘2012-08-21′), (4,’BULO’, 5162, ‘2020-11-21′), (5,’GICE’, 5301, ‘2012-10-04′), (6,’TOSE’, 1790, ‘2018-09-30′), (7,’POWU’, 7183, ‘2019-05-21′), (8,’YEJO’, 1491, ‘2010-12-12′), (9,’XAMO’, 5974, ‘2010-03-23′), (10,’TEFA’, 9456, […]

Categories
Mastering Development

Gurobi/Python Syntax for print commands to get a specific result?

I’m trying to figure out the syntax to print the following optimization problem. It’s supposed to look like this when printed: The minimum workers for Scheduling: 14 Shift 1: workers starting = 0, total working = __, required = __ Shift 2: workers starting = 6, total working = __, required = __ Shift 3: […]

Categories
Mastering Development

how does this concat command work with this array?

I came across this JS problem but I can’t figure out the syntax of how it’s working, could someone please help to explain? I don’t understand the empty square bracket syntax at the start and then how the concat is being applied with another empty square bracket? it’s just quite confusing for me. Appreciate any […]

Categories
Linux Mastering Development

Why can’t hostapd service start AP configured in 5 GHz band using Intel AX200 based adapter?

I am trying to set up an AP using the following configuration: Wi-Fi adapter: TP-Link AX3000 (Intel AX200 based) Operating system: Ubuntu Server 20.10 (groovy) Kernel version: 5.8.0-44-generic Firmware: iwlwifi-cc-a0-55.ucode AP service: hostapd v2.9 (tried the custom-build from the latest source code as well) I have two almost identical setups in Canada and France. The […]

Categories
Mastering Development

Javascript Sorting Matrix Diagonally

There is an algorithm question asking to sort a matrix diagonally. I’m not finding a solution for this quesiton. const matrix = [ [1, 3, 9, 4], [9, 5, 7, 7], [3, 6, 9, 7], [1, 2, 2, 2] ] Should output: [ [1, 9, 9, 7], [3, 5, 6, 9], [3, 4, 7, 7], […]

Categories
Mastering Development

Ionic date time picker update columns dynamically

I have the following requirement which aim looking for some thing similar ready. Time select where user select Hours and minutes. Hours will be provider could be any (1,5,6,13,19) etc. Each hour has its own minutes the data structure like this [ { hour: 1, minutes: [0, 15, 30], }, { hour: 4, minutes: [15, […]

Categories
Mastering Development

What is the efficient way to find an array inside an array?

Find an Array of Values Inside an Array Lets say I have an array [1,2,3,8,2,3,4,5,6,7,8] and I want to find the first occurrence of the values [3,4,5,6] together, how might I do that? I can use Array.prototype.findIndex, but when I am looking for a large amount of values in a large array, it doesn’t feel […]

Categories
Mastering Development

Suggested Logic For Displaying Specific Files on Specific Days

An app I am working on will have a daily message in it for every weekday of a year. I’d like it to either show everyone the same message each day, regardless of when they start using it, or to simply start on the first Monday that they have the app. Each message is its […]

Categories
Ask Geographic Information System (GIS)

How to add vertical lines to log transformed axes in ggplot2 [closed]

I tried to add a vertical line to the log transformed x-axis using geom_vline(), but it kept reporting warnings like "Removed 1 rows containing missing values (geom_vline)". The code I used as follows: ggplot(df)+ theme_bw()+scale_x_continuous(limits=c(2.5,6.5),breaks=c(3,4,5,6),labels=c(expression(10^3),expression(10^4),expression(10^5),expression(10^6)))+ xlab("Time")+ylab("Size")+ scale_y_continuous(expand = c(0, 0), limits=c(2.5,6.5),breaks=c(3,4,5,6),labels=c(expression(10^3),expression(10^4),expression(10^5),expression(10^6)))+ annotation_logticks() I don’t know how to add a vertical line at x=18000.