Using group by on multiple columns

Group By X means put all those with the same value for X in the one group. Group By X, Y means put all those with the same values for both X and Y in the one group. To illustrate using an example, let’s say we have the following table, to do with who is attending what subject at … Read more

nginx: connect() failed (111: Connection refused) while connecting to upstream – after update nginx –

After many hours trying to find the source of the problem (many install and purge) The problem was, for me, the use of different port “name” in nginx and php. in php (/etc/php/8.0/fpm/pool.d/bienestarmutuo-org8050.conf) i have in nginx (/etc/nginx/sites-available/bienestarmutuo.org.conf) i have This was changed to: in nginx in php restart php and nginx, everything Work again. … Read more

Mapping a numeric range onto another

Let’s forget the math and try to solve this intuitively. First, if we want to map input numbers in the range [0, x] to output range [0, y], we just need to scale by an appropriate amount. 0 goes to 0, x goes to y, and a number t will go to (y/x)*t. So, let’s reduce your problem to the above simpler problem. … Read more

changing the owner of folder in linux

Use chown to change ownership and chmod to change rights. use the -R option to apply the rights for all files inside of a directory too. Note that both these commands just work for directories too. The -R option makes them also change the permissions for all files and directories inside of the directory. For example will change ownership (both user and group) … Read more