programming

How to create timesince feature in Laravel?

There is no built-in method called timesince in Laravel 8. However, you can create a custom function or use Carbon class' diffForHumans() method to achieve

Steve Alila6 min read
programming

Serialization and Deserialization in Java [Explained]

Serialization and deserialization are common techniques used in software development for data persistence and communication between applications. In Java,

Bashir Alam11 min read
programming

Private Vs Protected in Java [In-Depth Tutorial]

In Java, methods are the building blocks of classes, which allow us to encapsulate functionality within an object-oriented paradigm. Java provides several

Bashir Alam9 min read
programming

Java RegEx Explained [In-Depth Tutorial]

Regular expressions are a powerful tool used to match and manipulate text. They are a sequence of characters that define a search pattern, which can be used

Bashir Alam11 min read
programming

How to Recursively Search Arrays in Laravel?

Sometimes you want to add custom methods to a Laravel collection, especially if you lack a predefined method for a goal. For example, when doing a Laravel

Steve Alila6 min read
programming

How to Unlink File in Laravel?

Now let's see how to unlink file in Laravel.

Steve Alila6 min read
programming

Spatie Permission: The Ultimate Laravel Security Toolkit

The role:admin middleware from 'role' => SpatiePermissionMiddlewaresRoleMiddleware::class permits only users with Admin role to access the

Steve Alila8 min read
programming

Encapsulation in Java [In-Depth Tutorial]

Encapsulation is one of the fundamental concepts of object-oriented programming (OOP) and is considered essential for building robust and scalable

Bashir Alam11 min read
programming

How to use Generics in Java? [In-Depth Tutorial]

The guide will begin by introducing the basics of generics, including the syntax and its advantages. Then, it will delve deeper into the various ways in which

Bashir Alam10 min read
programming

Difference between Interface and Abstract class

In Java, both abstract classes and interfaces are used to define abstract types. However, there are some differences between these two concepts.

Bashir Alam6 min read
programming

Check User Online or Offline on Laravel

Here is a screenshot which shows the status of the user online or offline on Laravel, let's explore how this can be achieved using Session Tracking.

Steve Alila8 min read
programming

How to implement inheritance in Java?

Java Inheritance

Bashir Alam8 min read
programming

Java instanceof [In-Depth Tutorial]

instanceof in Java is an operator that is used to check if an object belongs to a particular class or a subclass of that class. It returns a boolean value of

Bashir Alam5 min read
programming

Java String Indexing [In-Depth Tutorial]

Java String indexing refers to the process of accessing individual characters within a string by their position or index. Each character in a string is

Bashir Alam5 min read
programming

How to PROPERLY add sleep in Java?

Java sleep is a method used to pause the execution of a thread for a specified amount of time. It is used when you want to introduce a delay in your program

Bashir Alam7 min read
programming

Java Memory Management [In-Depth Tutorial]

Java memory management is handled by the Java Virtual Machine (JVM). The JVM allocates memory for Java objects on the heap, which is a portion of memory that

Bashir Alam10 min read
programming

How to add quotation marks within string Java?

Quotation marks are a commonly used character in programming, especially when it comes to strings. In Java, there are two types of quotation marks that can be

Bashir Alam5 min read
programming

How to skip a line in Java Scanner?

In Java, you can use the nextLine method of the Scanner class to read a line of input from the user. If you want to skip a line, you can simply call the

Bashir Alam6 min read
programming

HackerRank Solution: String Formatting

In this tutorial we will solve string formatting problem of python strings from hacker rank using python. We have covered 3 methods to solve this problem using

Bashir Alam4 min read
programming

HackerRank Solution: Designer Door Mat

In thus tutorial we will solve hacker rank problem on designer door mat using python3 with following 4 methods, Solution-1: Using the map function, Solution-2: Using user-defined functions, Solution-3: Using if-else …

Bashir Alam5 min read
programming

HackerRank Solution: Python Text Wrap

In this tutorial we cover 3 different methods to solve Python text wrap problem from hacker rank using Solution-1: Using for loop Solution-2: Using textwrap module Solution-3: Using join() method

Bashir Alam4 min read
programming

HackerRank Solution: Python Text Alignment

There are two methods to solve text alignment problem from Hacker Rank. 1. Using user defined function, 2. Using for loop.

Bashir Alam4 min read
programming

HackerRank Solution: Python String Validators

Python has built-in string validation methods for basic data. It can check if a string is composed of alphabetical characters, alphanumeric characters,

Bashir Alam5 min read
programming

HackerRank Solution: Python Find a string

In this challenge, the user enters a string and a substring. You have to print the number of times that the substring occurs in the given string. String

Bashir Alam4 min read
programming

HackerRank Solution: Summing the N series

There is a sequence whose term nth is:

Bashir Alam4 min read
programming

HackerRank Solution: Does Path Exist

Adam is standing at point (a, b) in an infinite 2D grid. He wants to know if he can reach point (x, y) or not. The only operation he can do is to move to

Bashir Alam4 min read
programming

HackerRank Solution: Python sWAP cASE [3 Methods]

You are given a string and your task is to swap cases. In other words, convert all lowercase letters to uppercase letters and vice versa.

Bashir Alam4 min read
programming

HackerRank Solution: String Split and Join

In Python, a string can be split on a delimiter.

Bashir Alam4 min read
programming

HackerRank Solution: Python What's your name? [3 Methods]

In this tutorial we are going to explore different methods to solve the hacker rank problem what's your name in Python

Bashir Alam3 min read
programming

HackerRank Solution: Python Mutations

There are 4 possible methdos to solve python mutations from hacker rank using a while loop, One-line solution, Using list comprehension, Using for loop

Bashir Alam6 min read