Posts

Showing posts from 2020

Google Chrome remove redirect HTTP to HTTPS on localhost

Image
localhost:4200 Google Chrome remove redirect HTTP to HTTPS on localhost  If you are getting this kind of error while running on the local machine then following are the way to fix it. Hard Refresh You can check whether the current page is opening in incognito mode or not if it is opening in the incognito mode then the chances are Google Chrome has cached the site so whenever you are trying to reach the site then it redirecting to HTTP to HTTPS. Steps to follow: Open Google Chrome Developer Tools (Ctrl + Shift + i) Go to Network Tab Click on disabled cache checkbox at the top of the developer tools Now hard refresh the page (press f5 or shift refresh) This should work now Please find the following image to understand more about it. Please let me know if this help you. If you are still getting the same error then comment here we will try to help you.

macOS unrar file using terminal

Image
Hello Guys, Whenever you download some .rar file on your mac & you want to unzip/unrar it, macOS doesn't have a default unrar, so let's check how to do this. macOS unrar file using terminal Prerequisite: Homebrew installed on your macOS. Now we are ready to install the required software on our macOS, just run following command to install unrar tool. brew install unrar You can check whether its installed or not by running following command: $ unrar so it will print all available commands with it. now let's take an example you want to unrar file names MyApp.rar so following command will help you to unrar it. $ unrar x MyApp.rar It will create a new folder with MyApp name & also with all files & folders inside it. so this way it will unrar the file using the terminal.  I hope now can you can install & run above commands to unr...

JavaScript find max value in an array | find max value in array object

Image
Find the max or min value from an array or an object As JavaScript Developer we usually need to work on arrays & array objects and sometimes we need to do some operations on arrays like searching, sorting, find min/max etc. So today's post we will see how to find max or min value from an array. So let's take an example of the following array. let arr = [21,32,43,34,42,5,6,2,43,23]; If we want to find the maximum value from the array, so code will be as follows: Math.max(…arr); If we print it then the output will be as follows: So this will provide the maximum value from the array element. ProTip: If you are not aware of ... the operator then just inline explanation is that this is Destructuring mechanism for an array so it provides values in the destructed format. If we want to find the minimum value from the array, so code will be as follows: Math.min(…arr); So this will provide the minimum value from the array element. If we print it then the output will be as follows: ...

Install Python 3 on Mac

Image
Install Python 3 on Mac In this tutorial, we are going to install python3 in Mac OS. There are multiple ways to install like downloading from the official site  or homebrew . Check whether python2 installed or not Initially, MacOS came preinstalled with Python 2, however, starting with Mac 10.15 this is no longer the case. And since Python 2 will no longer be officially supported as of January 1, 2020, you  should really use Python 3 instead . Check whether python3 already installed or not: Before we start, make sure Python 3 isn’t already installed on your computer. Open up the command line via the Terminal application which is located at Applications -> Utilities -> Terminal. $ python --version Python version Xcode Installation: The first step for Python 3 is to put in Apple’s Xcode program which is important for iOS improvement as nicely as most programming tasks. We will use XCode to put in Homebrew. In your Terminal app,...