Categories
Mastering Development

How can I find which category has the most products shipped and the net income from sales in that category?

Using the w3schools.com SQL tutorial Northwind database, I’m trying to display the category that has the most products shipped. Additionally, I want to display the net income from all sales in that category. I can’t figure out how to take the category with the most products shipped, and use the amount of products shipped to […]

Categories
Ask Geographic Information System (GIS)

Changing the scale of an extent for a layout using PyQGIS

I have a script that creates a print layout and contains all of my vector/raster layers. I have changed my extent to ‘mem_layer’, which is my buffer layer I am using for this project. However, when I view the print layout, the extent is so far zoomed in on the buffer layer, that it is […]

Categories
Mastering Development

How do I delete every element of list of string that starts with a string from that list?

I have a list that looks like this: ["12", "123", "145", "178", "1264"] I want to find a way of changing that list. If one of the string holds an already present string in the list it should be deleted. For the given list above, it has element 12 so every element that starts with […]

Categories
Mastering Development

Invoke a serie of actions when Enter key is pressed

I have a Swing project and I have an action listener on JTextField for Tab key as follows. There is a JOptionPane.showMessageDialog() inside the getSum() method. And when Tab is pressed option pane will show an error message. My problem is that, when I press Enter on OK button of Error Message dialog, a series […]

Categories
Mastering Development

Java Swing – Invoks a series of actions when Enter key is pressed

I have one Swing project and I have an action listener on JTextField for Tab key as follows. There is a JOptionPane.showMessageDialog inside the getSum() method. And When TAB Key is pressed optionpane will show an error message. My Problem is that when I press ENTER Key on OK button of Error Message dialog a […]

Categories
Mastering Development

Created this procedure, when I execute I am not getting excepted results

I have created this procedure and I am not getting all records out. It should print id, ssn and ValidSSN. ValidSSN should come from case statement where is checking if SSN is valid. Please could you let me know why? Number of other records matches from table I am pulling from but no results for […]

Categories
Mastering Development

How can I get all details of the top x models from forecast::auto.arima in R?

My goal is to exactly re-create the top say 3 models from the auto.arima function in R. My example uses the following series: > data <- c(79, 73, 102, 158, 235, 326, 216, 153, 82, 87, 94, 163, 119, 81, 143, 179, 182, 247, 248, 105, 143, 64, 45, 163, 122, 95, 47, 117, 345, […]

Categories
Mastering Development

OpenCV Figure Detection

It’s my first time working with openCV. I’m trying to recognize where the cubes are located, draw their contour and identify their color. I have been able to create contours for them but when I put their corner locations I see some overlaps and I cant figure out how to identify the number of cubes […]

Categories
Mastering Development

Django-Import-Export: Import Error – AttributeError: ‘str’ object has no attribute ‘year’

I’m trying to to the django-import-export package to import a csv. the csv is very simple, a header row and the one row of values. there are two fields on the csv that are defined in the model as DateField’s #models.py edit_date = models.DateField(verbose_name="Edit Date", blank=True, default="1970-01-01") premiere_date = models.DateField(verbose_name="Premiere Date", null=True, blank=True) there are […]

Categories
Mastering Development

How to convert the hash as string?

How to print the hash as string? use sha3::{Digest, Keccak256}; fn main() { let vote = "Alice".to_owned(); let mut hasher = Keccak256::new(); hasher.update(vote.as_bytes()); let result = hasher.finalize(); let hashstring = result.to_owned(); println!("{:?}", hashstring); // [129, 55, 107, 152, 104, 178, 146, 164, 106, 28, 72, 109, 52, 78, 66, 122, 48, 136, 101, 127, 218, […]