Dealing with deprecations
1. Deprecations are helpful It’s a common complaint: “why do my PHP scripts break with minor version updates??”. And quite right: PHP has a tendency to add deprecation notices in minor releases, which tend to be audibly present when upgrading a project. It’s important to understand what deprecations are about: they aren’t errors, they are notices….
How to Create Live Search in HTML table with jQuery
This tutorial shows you client-side searching in an HTML table with jQuery this is a very simple and easy code snippet you can use it in small apps reporting where you want to add fast searching you can use this code snippet as a 10-line of code to make a simple. The code for this…
Read More “How to Create Live Search in HTML table with jQuery” »
How to make a div always float on the screen in the top right corner with CSS?
Sometimes, we want to make a div always float on the screen in the top right corner with CSS. In this article, we’ll look at how to make a div always float on the screen in the top right corner with CSS. To make a div always float on the screen in top right corner…
Read More “How to make a div always float on the screen in the top right corner with CSS?” »
How to use the Local Storage in Javascript
This article discusses what local storage is and the JavaScript methods that we can use to manipulate it. What is Local Storage? Local storage is a web storage object that is available in a user’s browser. It allows JavaScript browsers to store and access data right in the browser. Basic CRUD operations (create, read, update…
What’s new in PHP 8.2
PHP 8.2 will be released on November 24, 2022. In this post, we’ll go through all features, performance improvements, changes, and deprecations one by one. Readonly classes rfc This RFC builds on top of them and adds syntactic sugar to make all class properties readonly at once. Instead of writing this: You can now write this: Functionally, making…
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…
How to Convert PHP CSV to JSON
JSON format is a widely used format when dealing with API development. Most of the existing API responses are in JSON format. Converting CSV content to JSON format in PHP is easy. In this article, we will look at various methods of achieving this conversion. The above quick example in PHP converts the CSV file…
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,…
Best JavaScript Minifying Tools
Several JavaScript minification technologies are used by developers to reduce code size and improve performance. Each developer, on the other hand, has their own preferences and uses a different tool. There are a lot of JavaScript minification tools out there, and each one has its own set of advantages and disadvantages, so you’ll have 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?” »
What is SSH in Linux?
SSH stands for Secure Shell, and it is a network protocol that provides a secure way to access and manage a remote computer over an unsecured network. In the context of Linux, SSH is widely used for secure command-line access to servers, allowing users to execute commands, transfer files, and perform other administrative tasks on…
Difference Between Git and GitHub
Git and GitHub are the same and serve the same purpose, but this is not the case. Git is a version control system used to manage different versions of our project whereas GitHub is a Git repository hosting service. Git- Git is a very popular version control system used to manage projects. However, a version…
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 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 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 use setTimeout and setInterval methods in JavaScript
There are times when you don’t want to execute a function immediately. You want it to delay its execution or run repeatedly after a certain time interval. JavaScript provides us with two methods to achieve that: setTimeout and setInterval. In this article, we will discuss these two methods and how we can use them to…
Read More “How to use setTimeout and setInterval methods in JavaScript” »
How to Make Toggles With React Hooks
To toggle between a boolean flag in React, you can use the below custom hook that uses setState internally: Since the function returns an array, with a state and a callback function, you can use it in your component, just like you would for other built-in React hooks, like so:
How to Get Environment Variables in Laravel ReactJS
This article will provide examples of react js environment variables. I would like to share with you how to get the env variable in the laravel react site. if you want to see an example of how to get environment variables in react js then you are in the right place. we will help you…
Read More “How to Get Environment Variables in Laravel ReactJS” »
How to Define Global Variables for Twig Templates in Symfony 6
Sometimes we may need to inject the same variable in all the Twig templates. It can be done on each controller by passing a variable to template. However, it is not a good solution. This tutorial shows how to define global variables for Twig templates in Symfony 6 application. Global variables for Twig templates can…
Read More “How to Define Global Variables for Twig Templates in Symfony 6” »
CSS
What is CSS ? CSS for Cascading Style Sheets CSS describes how HTML elements are to be displayed on the screen, on paper, or in other media CSS saves a lot of work. It can control the layout of multiple web pages all at once External stylesheets are stored in CSS files Syntax CSS is…