In this article, you will learn, how to remove an array element in a for loop using Javascript. We will be looping in reverse. Video tutorial: You can use the following code: This will delete all categories having more than 3 products.
In this tutorial, you will learn, how you can upload, retrieve, and delete files using MongoDB GridFS. Video tutorial: Upload the file to MongoDB GridFS First, in your Node JS file, you need to create an instance of your GridFS bucket. You can create as many buckets as you want. You can also give your …
Read More “MongoDB GridFS”
In this article, you will learn how you can manage your website, hosted on Shared, VPS, or dedicated server, using Git version control. Video tutorial: This tutorial works for all Shared, VPS, and dedicated hosting servers. I have created a simple “Hello world” PHP file. I have created a sub-domain and Git repo on my …
Read More “Manage website using Git – Shared, VPS, Dedicated”
In this article, we will show you, how you can return an image from the response of an API in Node JS. Video tutorial: First, I will create an image tag and set the “src” attribute as the path of the API. I also send “adnan” as an argument so the server will know which …
Read More “API to return image in Node JS”
A Job Portal website is created in PHP and MySQL using MVC architecture. MVC stands for Model-View-Controller and this architectural design is used by many websites for scalability. New features: Files included: Tech stack: Recruiter can post a job Recruiter posted jobs Change status of applicant Edit/delete job A recruiter can edit or delete any …
Read More “Job Portal website in PHP and MySQL – MVC”
In this tutorial, we will teach you, how you can convert UTC time to your local timezone in Node JS. Following code will first get the current datetime in UTC, then convert it to user local timezone. Note: You do not need to provide the timeZone from client side. Node JS will automatically detect the …
Read More “Convert UTC to local timezone – Node JS”
In this article, we will show you how you can free up some space in your Mac. If you are running low on space, this is for you. My Mac was running on 5-6 GB and it keeps getting lower as I work more. So I did the following actions and now my Mac has …
Read More “How to free up space in Mac”
In this tutorial, you will learn how to check if the time is passed in Python. First, we will get the future time in UTC. In order to get this, first we will get the current time in UTC. Then we will add 24 hours in it. After that, we will get time_struct object from …
Read More “Check if time is passed – Python”
Here’s how you can get the date and time in UTC and convert it to user’s local timezone in Python. Comments has been added with each line for explanation. You can check its real-world example in a URL shortener app we created in Python.
If you are developing an application and getting CORS error in Python FastAPI, then you can fix it by first importing the CORS middleware from FastAPI module. Then you need to add that middleware in your FastAPI “app” instance. Allow all origins, all credentials, and all methods and headers. It will fix CORS error in …
Read More “How to fix CORS error in FastAPI Python”