Categories
CMS Magento Mastering Development

How can you calculate the prices with 2 decimals, not with 4 decimals?

How can you set in Magento2 that all the calculations you make on orders, invoices, price rules,…, to be done with 2 decimals not with 4 decimals? Attention, I mean the calculation of prices and not the display of prices.

Categories
Mastering Development

C# Enabling/Disabling buttons using an array, Win forms/MVP

i have an array of buttons [42] in a c# winforms desktop application : private Button[] _tabButton = new Button[]{button00,button01,/*…,*/button41}; Than, when i called the "Initiate" methode i just do : for(int i=0;i<_tabButton.Length;i++) { _tabButton[i].enabled = false; } that was pretty simple and logic. Now, am newbie in MVP/MVC, but I did a little work […]

Categories
Database Development

A flag (indicator) that shows for each row which conditions was used to select it

Suppose I have the table foo. I want to filter the rows of this table using different conditions (cond_1, cond_2, …, cond_n – the order is important) combined in a disjunction, i.e.: SELECT * FROM foo WHERE cond_1 OR cond_2 OR … OR cond_n; Is it possible (in PostgreSQL 13) to distinguish for each row […]

Categories
Mastering Development

Defuzzification of fuzzy subsets to another subset

I am performing a vulnerability assessment for a project and have been reading much about Fuzzy Set Theory and the Analytical Hierarchy Process and feel these are the perfect methods for the imprecise, vague, uncertain characteristic of my decision problem. **Problem 1**: I’ve got many criterion with which to judge the vulnerability of a location […]

Categories
Linux Mastering Development Ubuntu

Keyboard output reset

Ubuntu 20.10 groovy (x86-64) Kernel: 5.8.0-43-generic Cinnamon: 4.6.7 Problem: Keyboard output reset My Belgian Keyboard output (layout is ok), resets every time and I have to use the sudo setxkbmap be command to set it back every time. Exemple: "t^ete" instead of "tête" (means head in French) The results I mention are always taken from […]

Categories
Mastering Development System & Network

What additional (probably basic) configuration do I need to do to enable CGI execution under Apache 2.4?

I’m setting up a system, and I seem to be missing a basic aspect of Apache configuration. I am getting a 403 error when I attempt to load 127.0.0.1/index.cgi. My sites-enabled conf file is: <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. […]

Categories
User Help

How to play an audio file on a specific soundcard output on OS X

I would like to play sound files Wav/Mp3 on a specified channel of a multichannel output on OSX. Unfortunatley afplay does not allow me to specify its output on osx as aplay does on linux. Looking for shell command or nodejs solution, …

Categories
Mastering Development

how to show the results of two different functions, working with lists and sapply? or for loop?

For each unique id I’m taking the first 3 rows (studies) to predict the remaining studies in that id. I was able to write the code but I couldn’t show the results. id <- c(1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3) year <- c(1978, […]

Categories
Mastering Development

face_recognition.compare_faces return only false

I wanna make script that get an image of face and return all images in dataset that it found in. I saved encodings of all images in dataset and load it into a list: dataEncodingsList = [d["encoding"] for d in data] Than I make encodings also to the image with face to search: imageEncodings = […]

Categories
Mastering Development System & Network

Understand the concepts needed to send emails with a custom domain

My question today has to do with me not knowing the names/concepts of the things I probably need to fiddle with in order to achieve my desired result: To be able to use alias1@example.com, alias2@example.com, …, email addresses, where example.com is a domain name I own, ideally from a familiar interface like that of gmail. […]