Posts

JS-Assignment-9-1

 Make HTTP GET request to  Users  and process the result to get following data 1. Find the user with username "Ervin Howell" 2. Find the users belong to the street "Victor Plains" 3. Get geo information of user "Clementine Bauch" 4. Find the no of users in the result

Bootstrap assignment-5

Image
  Design the following Responsive layout using HTML,CSS & Bootstrap

Grid layouts

Image
  Design the following responsive layouts using CSS Flex & Grid

Grid layout

Image
 Design the following layouts using CSS Grid

Git commands

%3CmxGraphModel%3E Configure git ------------- git config   --global user.name   “your username” git config   --global user.email   “your email” Check config ------------ git config user.name git config user.email Create git local repo ------------------- Folder is already created: git init Folder is not created yet: git init folder-name check status of folder --------------------- git status Asking Git to track files(Staging env) ----------------------------------- git add file-name(single file) git add . (all files) To remove from Staging env --------------------------- git rm --cached file-name Save version to git ------------------- git add . git commit -m 'message' View commits ------------ git log git log --oneline Switch between commits ---------------------- git checkout hash-id To get lost commits ------------------- git reflog git cherry-pick hash-of-previous commit Branches -------- To check branches: git branch To create a n

Image upload in MERN app

 Register.js -------------- import { useState } from " react " ; import " ./Register.css " ; import { useForm } from " react-hook-form " ; import axios from " axios " ; import { useNavigate } from " react-router-dom " ; function Register () { //error state let [ error , setError ] = useState ( "" ); let [ selectedFile , setSelectedFile ] = useState ( null ) //navigate const navigate = useNavigate (); //use form hook let { register , handleSubmit , formState : { errors }, } = useForm (); //adding new user let addNewUser = ( newUser ) => { // console.log(newUser); //make HTTP POST req to save newUser to localAPI let fd =new FormData (); //append newUser to form data fd . append ( " user " , JSON . stringify ( newUser )) //append selected file to form data fd . append ( " photo " , selectedFile ) axios