Categories
Linux Mastering Development

Understanding command line arguments in custom shell and the effect of using quote

I am creating a custom shell using C language and I am successful with parsing, fork and exec, pipes, redirection etc. I noticed one particular type of command which seems to be throwing my shell off. In bash shell , the following command works. bash> echo "abc" >> tempFile bash> sed s/a/b/g tempFile bash> sed […]

Categories
Linux Mastering Development

Understanding command line arguments in custom shell and the effect of using quote

I am creating a custom shell using C language and I am successful with parsing, fork and exec, pipes, redirection etc. I noticed one particular type of command which seems to be throwing my shell off. In bash shell , the following command works. bash> echo "abc" >> tempFile bash> sed s/a/b/g tempFile bash> sed […]

Categories
Linux Mastering Development

Understanding command line arguments in custom shell and the effect of using quote

I am creating a custom shell using C language and I am successful with parsing, fork and exec, pipes, redirection etc. I noticed one particular type of command which seems to be throwing my shell off. In bash shell , the following command works. bash> echo "abc" >> tempFile bash> sed s/a/b/g tempFile bash> sed […]

Categories
Linux Mastering Development

*nix command `df -ih /` – interpreting output

I came across this article over inodes – How to Get Total Inodes of Root Partition. Then, i ran below on my machine – $ df -ih / Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda4 11M 284K 11M 3% / From the output, can I infer this: Since the max inodes avaialbe are 11M, […]

Categories
Development

How to optimize VIPS performance in PHP

I want to convert images held as strings in variables as fast as possible to WebP format while shrinking larger images but do not enlarge smaller images. The base system is a Debian 9.9 with PHP 7.3. I’ve tried to measure speed for the following techniques: imagejpeg, imagewebp, using cwep and php-vips. I used the […]

Categories
Development PHP

How to show the introduction text of the PHP internal web server

I actually launch a PHP web internal web server with the command php -S localhost:8000 -t myPath myFile.php via a PHP file. What I want to see : PHP 7.3.11-1+ubuntu18.04.1+deb.sury.org+1 Development Server started at Mon Nov 18 12:04:52 2019 Listening on http://localhost:8000 Document root is /var/www/html/perso/otra/web Press Ctrl-C to quit. When I type this command […]

Categories
Development

Mutate while accessing value in list column in a pipe with map and pluck

I would like to achieve the following: filter dataframe catalogs based on multiple columns in dataframe orders, for each row in dataframe orders and store the result in a list column in dataframe orders. (succeeded) calculate the difference between a date in data frame orders and another date in the new listcolumn. Table s_orders contains […]

Categories
Development

Machine Learning Flappy Bird, pygame not opening window

I am following a tutorial by Tech with Tim on how to create a Machine learning program that learns how to play flappy bird. I finished the coding but pygame will not open a window for me to see the game. I have tried moving my command or using different variable but none of these […]