ES6 classes
Prior to ES6, classes have been in use in Javascript. ES6 just comes with a clean, nice-looking syntax for defining classes. It’s good to note that JavaScript’s class is just a more convenient way of creating constructor functions, which are very different from traditional classes. In this article, we will focus on: How to define…
How to PHP Get Max Value From Array
PHP gets the max/maximum/largest value from the array. This tutorial has the purpose to explain to you several easy ways to find or get the maximum or largest value from an array in PHP. Here, we will take e.g. PHP gets the maximum value in an array, get the largest number in the array PHP…
WordPress Installation Steps
WordPress is the widely used CMS for creating blogs. Installing WordPress is a very easy and simple process. It will take too less time to complete the Installation. There are many providers in the market that make the one-step WordPress installation possible by clicking the installer tool. In this tutorial, we are going to see…
Best Practical CSS Tips
1. First letter drop We can use :first-letter it to drop the first letter of the text. The:first-letter selector is used to specify the style of the first letter of an element, it only applies to block-level elements. The effect is as follows. See the Pen Untitled by TeachDeveloper (@TeachDeveloper) on CodePen. 2. Image text wrapping Shape-outside is…
How to Send Email from Localhost in PHP
PHP sends email using the Inbuilt PHP MAIL() function. This tutorial shows you how you can send emails in PHP using the inbuilt PHP mail() function. If you work with PHP, you need to send emails to users like when the user registered with us, send a reset password link in the mail, if any…
How to increase browser zoom level on page load with CSS?
Sometimes, we want to increase the browser zoom level on page load with CSS. In this article, we’ll look at how to increase browser zoom level on page load with CSS. To increase browser zoom level on page load with CSS, we set the zoom property. For instance, we write to set zoom to 2 on the zoom class. Then the…
Read More “How to increase browser zoom level on page load with CSS?” »
How to Search Recently Modified Files in Linux
This post will help you to find recently modified files in Linux via the command line. The find command works with, defining duration in Minutes or Days. The minutes are defined with -mmin and the day’s value can be defined with -mtime You can also define the search criteria to find files modified within or before the specified…
Read More “How to Search Recently Modified Files in Linux” »
How to check PHP version using the command line
If you have access to the command line or terminal, then you can check your PHP version by running the php -v or php –version command. Here’s an example of the output: You can see that the command shows the PHP version as PHP 8.1.5. But sometimes you may not have access to the command line, or you may install…
Read More “How to check PHP version using the command line” »
How to Install a WordPress Plugin for Beginners
WordPress plugins are used to enable addon features to the web application developed in WordPress. Many features do not come with the WordPress core by default. So, if we need to extend the functionality of the WordPress application, then we need to use the plugins. There are many plugins available in the market for WordPress…
Read More “How to Install a WordPress Plugin for Beginners” »
Common Mistakes with Conditionals
This article will go over some mistakes that are easy to make when writing more complex programs with conditional. Mistake 1: Not treating expressions as distinct:Let’s say we want to print something if your variable $num is equal to 1 or 2 or 3. Why doesn’t the following code work? $num = 5; if ($num === 1 || 2 || 3) {…
How to install Git on Linux
Linux is a popular and as well as widely used operating system. The installation of Git on Linux is quite simpler when compared to other platforms. However, one has to use the right package manager for Linux distribution.We will proceed with this tutorial to see how to install and set up Git on various distributions…
How to Deploy a React application on a cPanel
post is about how to deploy React app in a sub-directory on cPanel. So, for this, you need a React Application setup and a cPanel ready for deployment. You can host React app on Firebase or any free hosting as well. That, I will cover in another post. React App cPanel/WHM Once, you are ready, let’s start…
PHP 8: Constructor property promotion
I’m very happy with the constructor property promotion RFC, it’s passed and will be added in PHP 8. You see, this feature reduces a lot of boilerplate code when constructing simple objects such as VOs and DTOs. In short: property promotion allows you to combine class fields, constructor definition, and variable assignments all into one syntax,…
How to Object Destructuring in ES6
This is a follow-up article to my previous article on Array Destructuring. Except you have an idea of destructuring, you should read it. First, let’s see why object destructuring is needed. We want to extract data from the object and assign it to new variables. Before ES6, how would this happen? See how tedious it is…
How to use :hover to modify the CSS of another class?
To use :hover to modify the CSS of another class, we can use it with another selector. For instance, we write to select the elements with the class wrapper in the elements with class item that we hovered on. We set its color and background-color for those elements.
Git basics: The simple commands to begin with
Git config command This command is used to configure settings accompanying your use of git on your local machine/computer. Here are the major settings and configurations executed with this command. You can configure these settings on a global or local level. NB:Your username and email should be the same as those on your GitHub or…
4 Methods to Search an Array
There are different methods in JavaScript that you can use to search for an item in an array. The use of these methods depends on your specific use case. For instance, do you want to get all items in an array that meet a specific condition? Do you want to check if any item meets…
How to clear your cache in npm
If you ever get weird errors in npm like Please run npm cache clean you may need to clean or refresh your npm cache. To fix this, you can try running npm cache clean. Run: “npm cache verify” for npm version 5 and up However if you’re running npm v5 and above, npm is supposed to be self-healing,…
How to remove index.php from URL in CodeIgniter 4
CodeIgniter 4 projects, you’ll notice that the URL has an extra argument. It is index.php in your project URL. So, if you don’t want this extra dimension you can remove it. This will create a clean URL for your website. There are several ways to remove this index.php in CodeIgniter 4. You can create a…
Read More “How to remove index.php from URL in CodeIgniter 4” »
Important most things you should know about JSX
What JSX is JSX is a syntax extension for JavaScript. Basically, it extends JavaScript so that constructs like HTML/XML can be used with JavaScript. It allows developers to use HTML syntax to compose JavaScript components. This makes it possible to have a clear and familiar syntax for defining DOM tree structures with attributes. Although it…
Read More “Important most things you should know about JSX” »