How to extend C Drive or merge 2 Drives on Windows
If you are looking for a solution to extend the C drive storage on Windows or Merge 2 drives here is a simple solution for you. Primary steps First to know the type of the drives- primary or logical Right click on the Computer (This PC) Click on Manage Click on Disk...How to fix error expo ps1 cannot be loaded because running scripts is disabled on this system
A solution for running expo on local machine error on Windows : Open Windows PowerShell with Run as Administrator Run this command: Set-ExecutionPolicy Unrestricted Problem solved. Explanation Issue: expo.ps1 cannot be loaded because running scripts is disabled on...How to remove Users from WordPress Sitemap
First check your website for the sitemap output yourWebsite/wp-sitemap.xml Now, if the users or author sitemap link shows here, simply follow these steps to remove it. Login to cpanel Open File Manager Select your website folder Open wp-includes folder Open sitemaps...Most used git commands
Git Book, Git References, Git Documentation git clone Clone a public repo git clone https://github.com/username/repo-name.git local-machine-folder-name git init Initialize or reinitialize a git repo git init git add Add / save all the changes in a repo git add --all...How to configure github username and email to local environment
Open the terminal Run this command to set username git config --global user.name "yourUserNameHere" Run this command to set useremail git config --global user.email "yourEmailAddressHere" If you find this post helpful, please feel free to share...How to rename windows drive name C D E F G
If you want to change / rename the Windows Drive name Letter to another Letter, you can follow this simple solution Right click on Start menu Click on Disk Management Right click on the disk you want to rename Click on Change Drive Letter and Paths... Click on Change...How to update object state with react useState()
To update a state in React is a very simple process using react hooks - useState. Check the code below: Update simple state // import useState hook import React, {useState} from 'react'; //create and export the component export default function MyName(){...How to run useEffect() only once | React Hooks
Just add an empty array after the callback function separated by a comma useEffect(callback, []); useEffect(()=>{}, []); And if you get any warning for missing dependency, add that inside the array useEffect(()=>{ // your code here }, [dependency_item]); If the...How to deploy React App to github pages | gh-pages
Make an empty repo on github (no file) Install your react app using this command npx create-react-app yourprojectname Go to your project cd yourprojectname Intall gh-pages npm install gh-pages Add a homepage to package.json...Get started with Create React App
Create a react app with Zero build configuration on your local machine. Please ensure that you have Nodejs installed on your machine Step 1: Open your terminial run this command npx create-react-app my-app This will install all the necessary codes to your device. Here...Basic HTML (tutorial for the beginners)
Learn HTML. Anyone who wants to learn to build websites, learning HTML is a must. A single HTML web page has mainly some essential parts- html, head, body. Here is a basic formation of HTML pages to understand at the starting level…
How to fix error nodemon ps1 cannot be loaded because running scripts is disabled
A solution for running nodemon on local machine error on Windows :
1. Open Windows PowerShell with Run as Administrator
2. Run this command: Set-ExecutionPolicy Unrestricted
Problem solved. Click on the link to see explanation…
How to get multiple documents with limited fields- MongoDB
Now, if we want all the documents from the collection but with limited fields, like,
if we need only the username and userType from all the documents, we can do it by this way…
How to get all the documents from MongoDB
Getting entire data of a MongoDB collection is very simple. For example the following documents are in our Users collection… and we can get all the documents from our database using Users.find({}), this will…
How to get only required data fields from MongoDB
So, you have noticed that we can exclude any field by giving it a value `false` or zero `0`. Now, think, what the code will be if we want all the fields to send but not the password! Easy? yes, here is the code…
Get data with MongoDB findById()
Now, if we need only the `username`, or only `firstName`, or only `username` and `email`, or all the data fields but not the `password`, or whatever you want…
Install MongoDB on Windows
Install MongoDB Community Server on your local machine. One Click Download- MongoDB, or (1) visit https://www.mongodb.com/try/download/community?tck=docs_server, (2) Select Version, Platform (Windows), and Package (msi), (3) Click on Download, (4) Run the installer…
About MongoDB
MongoDB is the Leading NoSQL database. It’s a very populare document based database platform with the scalability and flexibility built for modern application developers and for the cloud era…