How to trigger a button click from another button click event with JavaScript?
Sometimes, we want to trigger a button click from another button click event with JavaScript. In this article, we’ll look at how to trigger a button click from another button click event with JavaScript. To trigger a button click from another button click event with JavaScript, we call the element click method. For instance, we write to…
Read More “How to trigger a button click from another button click event with JavaScript?” »
How to add page numbers in PDF in CodeIgniter
Step 1: Install CodeIgniter 4 To install CodeIgniter 4 we can install it through Composer or download CodeIgniter 4 directly here: Install via composer: Step 2: Change CodeIgniter Environment CodeIgniter is the default environment product, a security feature to add security when settings go wrong when it’s live. To change the environment, we will rename or…
How to style an HTML radio button to look like a checkbox with CSS?
Sometimes, we want to style an HTML radio button to look like a checkbox with CSS. In this article, we’ll see how to style an HTML radio button to look like a checkbox with CSS. To style an HTML radio button to look like a checkbox with CSS, we use the appearance property. For instance, we write…
Read More “How to style an HTML radio button to look like a checkbox with CSS?” »
How to Change SSH Port in Linux
SSH (Secure Shell) is the most popular protocol for connecting remote Linux systems. Changing the SSH port will provide you with an extra layer of security. The new port will be a little harder to identify for hackers. Change SSH Port in Linux Changing the SSH port is a straightforward process in Linux systems. Any…
How to add two-factor authentication (2FA) to WordPress using the Google Authenticator plugin.
WordPress two-factor authentication (2FA) is a more simple work than you imagine. You can improve the security of your website by adding WordPress two-factor authentication. If you are worried about brute-force attacks and hacking, then you should instantly go for 2FA. The essential step in protecting your WordPress setup is adding a two-factor authentication system. If the…
PHP 8.1: read-only properties
Writing data transfer objects and value objects in PHP have become significantly easier over the years. Take for example a look at a DTO in PHP 5.6: And compare it to its PHP 8.0’s equivalent: That’s already quite the difference, though I think there’s still one big issue: all those getters. Personally, I don’t use them…
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 change background Opacity when the bootstrap modal is open with CSS?
Sometimes, we want to change background opacity when the Bootstrap modal is open with CSS. This article will look at how to change background opacity when the Bootstrap modal is open with CSS. To change background Opacity when Bootstrap modal is open with CSS, we set the opacity style in the modal-backdrop class. For instance, we write to set…
Read More “How to change background Opacity when the bootstrap modal is open with CSS?” »
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” »
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.
10 Programming Habits that every Developer Should Adopt
Write Human-Friendly Code Always remember that you are not writing code for machines but for others too. So it is essential to come up with a readable code. It is true that programming is like writing a good poem. The tone should be very consistent, the words should be descriptive & sentence well-structured. Here are…
Read More “10 Programming Habits that every Developer Should Adopt” »
How to split a string into an array with Twig
Twig provides many filters that mimic the basic features of PHP that are easy to understand for front-end developers. One of those filters is a split filter that allows you to split a delimited string by a single character, returning a repeating array. You can limit the length of the result array providing it as…
How to Disable WordPress Auto Update? Turn Off WordPress Auto Updates
WordPress can update your website automatically. It can also update themes and plugins on your site. Choosing to automatically update a website can provide additional security benefits and at the same time, the chances of breaking your site’s style or functionality cannot be ignored. It is more relevant in the case of websites built with…
Read More “How to Disable WordPress Auto Update? Turn Off WordPress Auto Updates” »
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” »
HTML Basic Examples
In this chapter, we will show some basic HTML examples. Don’t worry if we use tags you haven’t learned about yet. HTML Documents All HTML documents must start with a document type declaration: <!DOCTYPE html>. The HTML document itself begins with <html> and ends with </html>. The visible part of the HTML document is between <body> and </body>.
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…
ReactJs Properties
A component props is an object that holds information about that component. They are similar to attributes in HTML. In fact, they are passed to the components the same way attributes are passed to HTML. Here’s the code for the component we made in my previous article. Adding Properties to Components So let’s say we want to…
How to check if a customer is logged in to Magento 2 or not?
There are two ways by which you can check if a customer is logged in or not: 1) By using Object Manager It is always a bad practice to use ObjectManager directly. 2) By Injecting Class (Dependency Injection) As said earlier, it is one of the worst practices to use the ObjectManager directly. Therefore an…
Read More “How to check if a customer is logged in to Magento 2 or not?” »
How to Delete Files in Ubuntu Command Line
When you are new to the command line, even the simplest of the tasks may leave you searching the internet. Take the removal of files for example. You don’t have the luxury of right-clicking and opting for the delete option here. But when you know the right commands, things are not as scary. To delete…
PHP 8: Attributes
As of PHP 8, we’ll be able to use attributes. The goal of these attributes, also known as annotations in many other languages, is to add metadata to classes, methods, variables, and whatnot; in a structured way. The concept of attributes isn’t new at all, we’ve been using docblocks to simulate their behavior for years…