Creating a personal mini car inventory system from scratch using your best knowledge and skills. The system will have inventory of manufacturer and models (cars) of each manufacturer owned.
System should be created using your own frontend and backend framework and should use caching.
Frontend should be a webapp a.k.a. SPA. (Ie: no refreshing/reloading pages)
Technology to be used:
PHP (OOP) MySql (Normalized Database Schema) Javascript (JQuery – AJAX) HTML, CSS and Bootstrap 5
Classes to be created:
Database – Class to deal with each and every operation of database. Manufacturer – Class to deal with all operations related to car manufacturer. Model – Class to deal with all operations related to car model.
Page 1: Add Manufacturer. The page should contain a input box for manufacturer name and a submit button.
Page 2: Add Model. This page should have a manufacturer dropdown on the right side and model name textbox on the left side (Both should be in the same line)
Add other details below about the car like “Color, manufacturing year, registration number, note and 2 pictures”. Pictures should be uploaded using any ajax plugin.
And lastly there should be a submit button.
Page 3: View Inventory. This page should populate a table of all the models and manufacturers from the DB.
It should have the columns as below
Serial Number, Manufacturer Name, Model Name, Count
eg.
Maruti WagonR 2
Tata Nano 1
On clicking on the row, a popup will appear which will have details of the individual models like color, manufacturing year etc. (Basically all details from page 2) and a Sold clickable link.
On clicking Sold, the row will be deleted and the DB will be updated accordingly.
In addition to this, on Page 3 when users are viewing the inventory and in case a car is sold, the View Inventory table for the column Count will have to be dynamically updated in case a car is sold at that moment.
Similarly in case the users are on any other page or pop up of the system, they should get an alert saying “make model is sold” when a car is sold.
yy => p
dd => p
v => select lines to copy => y => goto line where need to paste => p
v => select lines to cut => d => goto line where need to paste => p
to undo and redo
Esc
u u u u
Esc
Ctrl + R Ctrl + R
to open file in read mode
vim -R filename
to open file on specific line number
vim filename +10
insert mode
i
o
escape / command mode
Esc
to write file
:w
:wq
:x
to minimize vim editor
Ctrl + Z
to see minimized files in vim
jobs
to see background job
bg
to open specific jobs or bring it to foreground
fg 1
fg +
fg -
search any word in vim editor
/word
/word\c
/word\C
#then press N or Shift + N
search and replace word
:%s/word/replacewith/i
:%s/word/replacewith/g
go to specific line
:10
:1
:$
show/hide line numbers in vim editor
:set number
:set nonumber
set tabstop
:set tabstop=4
set font color
:colorscheme murphy
vimdiff difference between 2 files
vimdiff file1 file2
#difference put
dp
#difference obtain
do
mysql -u root -p'password' -e "SELECT COUNT(*) FROM database_name.table_name"
copy table
CREATE TABLE copy_of_table AS SELECT * FROM existing_table_name;
copy only table structure
CREATE TABLE copy_of_table AS SELECT * FROM existing_table_name WHERE 1 > 2;
Create new database user
CREATE USER 'user'@'hostname' IDENTIFIED BY 'PassWord';
To give remote access
GRANT ALL ON database_name.* to 'database_username'@'10.24.96.%' IDENTIFIED BY 'database_password';
CRUD SQL
SELECT * FROM users ORDER BY id DESC;
DELETE FROM users WHERE id = 3;
INSERT INTO users (id, name, age, city, added_at, updated_at) VALUES (NULL, 'sonam gupta', 18, 'gorakhpur', NOW(), NOW());
UPDATE users SET name = 'Sonam Gupta', age = 20, city = 'Gorakhpur', updated_at = NOW() WHERE id = 5;
Once you update wsl kernal Run following command again
Now update Ubuntu from version 1 to 2
If you get error do enable to Virtual Machine Platform from Windows Features
Now Restart PC
Restart-Computer
If you still get the error then do enable virtualization from BIOS setting
Ubuntu path on windows explorer
\\wsl$\Ubuntu
Update and Upgrade Kernal
sudo apt-get update
sudo apt-get upgrade
Install Nginx Web Server
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install -y nginx
sudo service nginx start
sudo service nginx status
sudo service nginx status