I was looking for a tool that allows me to write API documentation so I can provide it to the frontend developers and also for myself. I checked many but didn’t find any that fits to all of my requirements. So I decided to create one of my own. Creating my own tool gives me …
Read More “Free tool to write API documentation – PHP, MySQL”
In order to include a React JS component dynamically, we need to use the Javascript’s built-in fetch API. Let’s say you have a simple component that renders an <h1> tag: And in your index.html, you have your main React JS app. Now you want to render your React JS component “MyComponent” dynamically in div having …
Read More “Include React JS component dynamically”
If you are working in MySQL, you can use joins to match rows between multiple tables. In Mongo DB, however you are working in documents instead of rows, you can still use joins to combine data from 2 different collections. Here is how you can do it. Let’s say you have 2 collections, users and …
Read More “Joins in Mongo DB”
A multi-purpose platform is created in Node.js and MongoDB. Developing an API in Node.js and MongoDB allows you to create real-time, high performance and scalable applications. When you are building a website or a mobile app, you might have a different design than what is already built. But your backend will be almost similar to …
Read More “Multi-purpose platform in Node.js and MongoDB”
In this blog post, we will discuss, how you can show or hide an input field for password using plain HTML and Javascript. This is useful because sometimes users wants to see what password they are setting. This feature is very helpful in: No library has been used in this tutorial. First, we will create …
Read More “Show or hide input field password – HTML and Javascript”
Let’s say you have a webpage where you want to show an anchor link to the user that will redirect the user to his previous page. So we will first create an anchor link to the first page. When it is clicked, we will call a Javascript function instead of directly redirecting to new page. …
Read More “Redirect to previous page – Javascript”
Suppose you have a database where data of all players of any sports team is stored. Every player has a name and a shirt number. We will create a program that will generate a new number for new player. We will make sure the new number is not already assigned to any player. We will …
Read More “Assign shirt number to new cricketer – PHP PDO MySQL”
In order to check if a URL is valid in PHP, we are going to use the cURL. You can get the complete reference on cURL from php.net. First, we are going to create a variable that will hold the value of URL that needs to be checked. Then, we are going to initialize the …
Read More “Check if URL is valid – PHP”
Suppose you have custom post type in WordPress that you want to sort such that it displays the first created post on top. By default, WordPress sort the posts by ID in descending. That means that the latest uploaded post will be displayed on top, which is good in many cases. But there might be …
Read More “Sort custom post type by ID ascending – WordPress”
In order to send money from remitly.com to NayaPay (Pakistan), you need to follow the following steps. Step 1: Create an account First, you need to create an account on remitly.com. Step 2: Select country After registration is done, you need to select country as “Pakistan” and click on “Send Money” button. You will also …
Read More “How to send money from remitly.com to NayaPay (Pakistan)”