How To Remove an Image Background on Windows 11.

Removing the background from an image or replacing it with a different color can be essential for various purposes, such as creating professional-looking graphics or collages. While there are specialized tools for this task, you can achieve basic background removal on Windows 11 using built-in tools like Paint 3D or Photos app. 

Remove The Background of an Image.

You can use Windows built-in Paint application to delete or remove the entire background of an image and make it transparent. Here is a step-by-step guide to do that:

Step 1: First move to where you kept your image in File Explorer. Right-click on the image file you want to edit and select 'Open with' > 'Paint 3D.'

Open Image in Paint App on Windows

Step 2: After opening the image in Paint, in the 'Image' section at the top, select the 'Remove Background' option. 

Remove Background of Image in Paint App in Windows

Step 3: Wait for some time and you will see your edited image with a transparent background. 

Step 4: To save your image changes, click on File > Save As from the left Menu. Save your image as PNG to maintain the transparency as JPG does not support this format of the image.

Save Transparent Image as PNG in Paint app

Paint 3D allows you to undo and redo your actions. If you're not satisfied, use these options to go back and make adjustments.

If you do not want to remove the background of the entire image but only a selected part of the image then you can use the 'Selection' tool on the left top to select the specific portion of the image and then apply the 'Remove Background' option.

Change The Background Color of The Image.

If you don't want to make the background of the image transparent but want to change the background color, then you can do this as well on the Windows 11 Photo app without installing any additional tools. Let's learn how to do that:

Step 1: First move to where you kept your image in File Explorer. Right-click on the image file you want to edit and select "Open with" > "Photos."

Step 2: Once the image is loaded on the Photos app, click on 'Edit Image' on top.

Edit Image Option in Photos App in Windows

Step 3: Click on the 'Background' option from the top toolbar. The Photos app will automatically detect the background of the image.

Background Edit Option in Photos App

Step 4: You will get three options (Blur, Remove, and Replace) to modify your current image, choose 'Replace' and then select the color you want to fill in your image background. (see screenshot)

Choose Background Color of Image

Step 5: When you are done with color selection, you can click on the 'Apply' button at the bottom right and then click on 'Save options' to save your edited image. That's it.

Save and Edited Image in Photos app

These are a few simple steps that you need to follow to change the background of any image on Windows 11 without downloading any additional third-party tool. 

How To Find WiFi Password in Windows 11.

Recently I bought a new laptop for my personal work and when I try to connect it from my home WiFi network I realize that I need to remember my WiFi password. For some time after struggling, I found some methods to find saved WiFi passwords from my previous Windows laptop. That day I also found that Windows stores all the WiFi passwords which has been used in the past to connect your device to the Internet. 

 

In this article, I am sharing two methods to find WiFi passwords on Windows and you can choose one based on your connivance.


Find WiFi Password on Windows Using Settings.

This is the simple and straightforward way to find WiFi passwords using Windows settings without using any third-party tool.

 

Step 1: Press "Windows key + I" to open Settings.

 

Step 2: Navigate to "Network & Internet" and select "WiFi" from the left pane. 

Manage Knows Networks from Windows Pannel

 

Step 3: Click on "Manage known networks."

 

Step 4: Choose your WiFi network, and under "Properties," you'll find the Network security key (password).

Looking for Saved WiFi password in Windows Settings

I hope you know where to go in your laptop to search all old WiFi passwords but make sure you have administrative privileges on the laptop and always double-check the network for security. Never connect your working or personal laptop to any unknown WiFi network. 

 

Find WiFi Password Using Command Prompt.

I am a tech-savvy person and I use Windows CMD and PowerShell a lot for many professional and personal work. I also find another method to fetch saved WiFi passwords from Windows CMD. Let's learn how to do that:

 

Step 1: Press "Windows key + X" on your keyboard. From the menu that appears, select "Command Prompt (Admin)" or "PowerShell (Admin)." This is crucial as administrative privileges are required for the following commands.

 

Step 2: Once the Command Prompt with administrative privileges is open, type the following command and press Enter. 

netsh wlan show profiles

This command will display a list of all WiFi profiles saved on your Windows laptop.


Step 3: Scroll through the list and identify your specific WiFi network name under the "User profiles" section.

Cmd command to see the list of network in Windows

Step 4: To reveal the password for a specific WiFi network, use the following command and press Enter. Replace "YOUR_NETWORK_NAME" with the actual name of your WiFi network (as identified in step 3).

netsh wlan show profile name="YOUR_NETWORK_NAME" key=clear


Command to get WiFi Password on any Network by their Name
 

Step 5: This command will provide detailed information about the selected WiFi network, including the "Key Content," which is the WiFi password.

Key Content in Cmd store the Saved WiFi Password

Both above methods to find WiFi passwords are efficient and simple. I personally choose CMD to fetch WiFi passwords because it gives me more insights into my network configurations.

How To Check Battery Health on Windows.

Battery Health Report of Windows Laptop

Ensuring the health of your Windows laptop's battery is crucial for prolonged usage and optimal performance as batteries play a pivotal role, in fueling our devices' vitality. However, batteries, much like the energy they provide, aren't eternal. This step-by-step guide provides insights into checking battery health and practical tips to enhance and maintain its longevity.

How To Check Windows Battery Health.

By running a simple line of code in Windows we can generate a complete health report of our battery in HTML file format. You can follow the below steps to generate the report:

Step 1: Press "Windows key + S," type "cmd," right-click on Command Prompt, and select "Run as administrator."

Opening Window Command Prompt as Admin

Step 2: In the Command Prompt, type the following command and press Enter. This command generates a battery report and saves it as an HTML file on your C: drive.
powercfg /batteryreport /output "C:\battery_report.html"

Running CMD code to Generate Battery Report

Step 3: Navigate to C:\ and locate the "battery_report.html" file. Open the file using a web browser to view detailed information about your battery's health.

The report provides insights into the battery's capacity, recent usage, and charging patterns.

Understanding Battery Health Report.

The Battery Report generated by your Windows laptop is akin to a comprehensive diary, chronicling the life and vitality of its power source. Let's dive into the key aspects it unfolds:
  • Design Capacity: This represents the original capacity of your battery, essentially the amount it could store when it was brand new.
  • Full Charge Capacity: The Full Charge Capacity showcases the current storage capacity of your battery. It's a real-time snapshot of how much energy your battery can currently hold.
  • Cycle Count: The Cycle Count reveals the number of charge and discharge cycles your battery has undergone. A cycle is completed when your battery goes from 100% to 0% and back to 100%.
  • Recent Usage: This section details your laptop's power consumption over the last several days, giving you insights into how your device utilizes its energy.
  • Battery Drain Patterns: Examining the report unveils patterns of battery drain during different usage scenarios, shedding light on power-hungry applications or settings.
Understanding these metrics empowers you to make informed decisions about your laptop's energy source.


Tips to Improve Battery Health.

Taking care of your laptop battery health is in your own hands, you can follow some of our tips mentioned below to make your battery last longer.

  • Try to avoid letting your battery drain completely before charging. Frequent deep discharges can contribute to wear and tear.
  • Aim for partial discharge cycles (20-80%) rather than full 0-100% cycles. This can contribute to a longer battery lifespan.
  • Adjust your power settings to balance performance and battery life. The "Power & sleep settings" in Windows allow you to choose power plans that suit your needs.
  • Windows has a "Battery Saver" mode that conserves power by limiting background activity. Activate it when you need to extend battery life.
  • Ensure your device drivers, especially those related to power management, are up to date. Check the manufacturer's website for the latest drivers.
  • Lowering screen brightness can significantly impact battery life. Adjust brightness based on your environment to conserve power.

Conclusion.

By following these steps and implementing these tips, you can not only check the health of your Windows laptop's battery but also adopt practices that contribute to its longevity and sustained performance. Regular monitoring and mindful usage are key to ensuring your battery serves you well over time.

Difference Between == and .equals() in Java.

As a language, Java provides different mechanisms to compare objects and values. Two commonly used methods for comparison are the equals() method and the == operator. While they might seem similar, they serve different purposes and behave differently when used. Let's discuss each of them individually and understand which one should use in which condition.

Comparison Operator in Java

== Operator.

In Java, the == operator is used to compare primitive data types and object references. When comparing primitive data types, it checks whether the values are the same. When comparing object references, it checks whether the references point to the same memory location.

Example Java Code:
public class EqualityExample {
    public static void main(String[] args) {
        // Primitive types
        int x = 5;
        int y = 5;
        System.out.println(x == y); // true

        // Object references
        String str1 = new String("Hello");
        String str2 = new String("Hello");
        System.out.println(str1 == str2); // false
    }
}
Output:
true
false

Explanation:

In the example, x == y is true because the values of x and y are both 5. However, str1 == str2 is false because the == operator compares the references, and str1 and str2 point to different memory locations.

equals() Methods.

The equals() method is a method provided by the Object class and is meant to be overridden by classes that need to define a logical equality. By default, the equals() method in the Object class compares object references, similar to the == operator.

Example Java Code:
public class EqualityExample {
    public static void main(String[] args) {
        String str1 = new String("Hello");
        String str2 = new String("Hello");
        System.out.println(str1.equals(str2)); // true
    }
}
Output:
true

Explanation:

In this example, str1.equals(str2) is true because the String class overrides the equals() method to compare the actual content of the strings, not just the references.

It's important to note that many classes in Java, like String, Integer, and others, override the equals() method to provide meaningful content-based comparison. When working with custom classes, you should override equals() to suit the specific equality criteria for instances of your class.

How To Schedule Cleanup Process in Windows.

Regularly scheduling cleanup processes in Windows is essential for maintaining optimal system performance and managing storage efficiently. This guide provides step-by-step instructions along with various methods to automate cleanup tasks, ensuring your system stays clutter-free.


Schedule Disk Cleanup with Task Scheduler.

Task Scheduler is a powerful built-in tool in Windows that allows you to automate various tasks, including cleanup processes. By creating scheduled tasks, you can ensure that cleanup routines occur regularly without manual intervention.


Step-by-step Guide:

Step 1: Press 'Windows key + S', type 'Task Scheduler', and select it from the search results.

Task Scheduler on Windows

Step 2: In the right-hand pane, click on 'Create Basic Task'.

Create Basic Task in Windows

Step 3: Provide a name and description for your task, then click 'Next'.

Name and Description of Task Name

Step 4: Choose the trigger for your cleanup task (e.g., Daily, Weekly), and click 'Next'.

Creating Trigger to Schedule Job

Step 5: Specify the start date and time for the task, and click 'Next'.

Start Date and Time for Schedule Task

Step 6: Select 'Start a program'  as the action, and click 'Next'.

Start a program for Schedule Task

Step 7: In the "Program/script" field, enter the cleanup command (e.g., 'cleanmgr.exe' for Disk Cleanup). Add any arguments needed, like '/sagerun:1' for automated cleanup. Click 'Next'.

Disk Cleanup process in Windows

Step 8: Review your settings and click Finish.

Schedule Disk Cleanup with Task Scheduler.

Note: Test the task manually before relying on the scheduled run. You can set multiple triggers or conditions for more customized scheduling. 


How To Delete a Scheduled Task on Windows.

If you want to disable or delete the created scheduled task from Task Scheduler then you can follow these steps. 


Step-by-step Guide:

Step 1: Open Task Scheduler and in the left-hand pane, expand the 'Task Scheduler Library' to find the task.

Step 2: Right-click on the task you want to delete and select 'Delete' from the context menu.

Delete Schedule Task in Windows

Note: If you do not want to delete the task permanently then you can also disable them by selecting 'Disable' from the context menu.


Step 3: Confirm the deletion when prompted.

Deleting a task removes it permanently. Ensure you want to delete it before confirming. You can also check the task's status in the 'Active Tasks' tab before deleting or disabling the task.


Cleanup Process Using Storage Sense in Windows.

Storage Sense is a built-in feature in Windows 10 and 11 that automatically frees up space by deleting unnecessary files. This method is user-friendly and requires minimal configuration.


Step-by-step Guide:

Step 1: Press 'Windows key + I' to open Settings.

Step 2: Navigate to System > Storage.

Step 3: Click on 'Configure Storage Sense or run it now'.

Storage Sense in Windows

Step 4: Toggle the switch to turn on Storage Sense. Choose the frequency and action for temporary file cleanup.

Step 5: Click on 'Advanced settings' to fine-tune cleanup options.

Storage Sense can automatically free up space by deleting temporary files, system-created files, and items in the recycle bin.


By following these methods, you can effortlessly schedule cleanup processes in Windows, ensuring your system remains optimized and clutter-free. Regular automated cleanup contributes to improved performance and efficient storage management.

Infix to Postfix Conversion Using Stack.

Converting an infix expression to a postfix expression involves rearranging the operators and operands to a postfix format. We can perform this operation using the Stack data structure by traversing the infix expression from left to right. But before moving to the algorithm part, let's quickly understand infix and postfix expressions.

Infix Expression:

An Infix Expression is a mathematical expression where the operators are placed between operands. For example, A + (B * C) is an Infix expression, where the operators (+ and *) are placed between the operands (A, B, and C). In infix notation, parentheses are used to determine the order of operations.

Postfix Expression:
A Postfix expression, also known as Reverse Polish Notation (RPN), is a mathematical expression where the operators follow their operands. For example, ABC*+ is a Postfix expression equivalent to the infix expression A + (B * C). In postfix notation, parentheses are not required since the order of operations is determined explicitly by the arrangement of operands and operators.

Example of Infix to Postfix Conversion.

Let’s convert the infix expression ((A + B) * C - D) / E to postfix.
  1. Expression: ((A + B) * C - D) / E
  2. Stack: (Empty)
  3. Postfix String: (Empty)

Iterating through the expression:
  • Character: ( → Push onto the stack.
  • Character: ( → Push onto the stack.
  • Character: A → Append to postfix string.
  • Character: + → Push onto the stack.
  • Character: B → Append to postfix string.
  • Character: ) → Pop and append operators (+) from the stack to the postfix string.
  • Character: * → Push onto the stack.
  • Character: C → Append to postfix string.
  • Character: - → Push onto the stack.
  • Character: D → Append to postfix string.
  • Character: ) → Pop and append operators (-, *) from the stack to the postfix string.
  • Character: / → Push onto the stack.
  • Character: E → Append to postfix string.
  • Empty the Stack: Pop and append the remaining operators (/) to the postfix string.

Resulting Postfix Expression:
The infix expression ((A + B) * C - D) / E converts to the postfix expression AB+C*DE-/.

Algorithm for Infix to Postfix Conversion.

  1. Initialize an empty stack to hold operators.
  2. Initialize an empty string to store the postfix expression.
  3. Iterate through the infix expression:
    • For each character:
    • If it’s an operand (alphabets or digits), add it to the postfix string.
    • If it’s an operator:
      • While the stack is not empty and the precedence of the current operator is less than or equal to the precedence of the operator at the top of the stack:
      • Pop and append the top of the stack to the postfix string.
      • Push the current operator onto the stack.
    • If it’s an opening parenthesis ‘(’, push it onto the stack.
    • If it’s a closing parenthesis ‘)’:
      • Pop and append operators from the stack to the postfix string until an opening parenthesis is encountered.
      • Discard the opening parenthesis.
  4. Pop and append any remaining operators from the stack to the postfix string.

Below is the code implementation for the above algorithm:

// C++ program for infix to postfix conversion using stack.
#include <iostream>
#include <stack>
#include <string>
#include <unordered_map>
using namespace std;

bool isOperator(char c) {
    return (c == '+' || c == '-' || c == '*' || c == '/');
}

int getPrecedence(char c) {
    if (c == '+' || c == '-')
        return 1;
    if (c == '*' || c == '/')
        return 2;
    return 0;
}

string infixToPostfix(string infix) {
    stack<char> s;
    string postfix = "";
    unordered_map<char, int> precedence;

    precedence['+'] = 1;
    precedence['-'] = 1;
    precedence['*'] = 2;
    precedence['/'] = 2;

    for (char c : infix) {
        if (isalnum(c))
            postfix += c;
        else if (c == '(')
            s.push(c);
        else if (c == ')') {
            while (!s.empty() && s.top() != '(') {
                postfix += s.top();
                s.pop();
            }
            s.pop();
        } else {
            while (!s.empty() && precedence[c] <= precedence[s.top()]) {
                postfix += s.top();
                s.pop();
            }
            s.push(c);
        }
    }

    while (!s.empty()) {
        postfix += s.top();
        s.pop();
    }

    return postfix;
}

int main() {
    string infixExpression = "a+b*c-(d/e+f*g*h)";
    string postfixExpression = infixToPostfix(infixExpression);
    cout << "Infix Expression: " << infixExpression << endl;
    cout << "Postfix Expression: " << postfixExpression << endl;

    return 0;
}
// Java program for infix to postfix conversion using stack
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;

public class InfixToPostfix {
    public static String infixToPostfix(String infix) {
        Stack<Character> stack = new Stack<>();
        StringBuilder postfix = new StringBuilder();
        Map<Character, Integer> precedence = new HashMap<>();

        precedence.put('+', 1);
        precedence.put('-', 1);
        precedence.put('*', 2);
        precedence.put('/', 2);

        for (char c : infix.toCharArray()) {
            if (Character.isLetterOrDigit(c))
                postfix.append(c);
            else if (c == '(')
                stack.push(c);
            else if (c == ')') {
                while (!stack.isEmpty() && stack.peek() != '(')
                    postfix.append(stack.pop());
                stack.pop();
            } else {
                while (!stack.isEmpty() && precedence.getOrDefault(c, 0) <= precedence.getOrDefault(stack.peek(), 0))
                    postfix.append(stack.pop());
                stack.push(c);
            }
        }

        while (!stack.isEmpty())
            postfix.append(stack.pop());

        return postfix.toString();
    }

    public static void main(String[] args) {
        String infixExpression = "a+b*c-(d/e+f*g*h)";
        String postfixExpression = infixToPostfix(infixExpression);
        System.out.println("Infix Expression: " + infixExpression);
        System.out.println("Postfix Expression: " + postfixExpression);
    }
}
# Python code for infix to postfix conversion using stack
def infix_to_postfix(infix):
stack = []
postfix = ""
precedence = {'+': 1, '-': 1, '*': 2, '/': 2}

for c in infix:
    if c.isalnum():
        postfix += c
    elif c == '(':
        stack.append(c)
    elif c == ')':
        while stack and stack[-1] != '(':
            postfix += stack.pop()
        stack.pop()
    else:
        while stack and precedence.get(c, 0) <= precedence.get(stack[-1], 0):
            postfix += stack.pop()
        stack.append(c)

while stack:
    postfix += stack.pop()

return postfix


# Example usage
infix_expression = "a+b*c-(d/e+f*g*h)"
postfix_expression = infix_to_postfix(infix_expression)
print("Infix Expression:", infix_expression)
print("Postfix Expression:", postfix_expression)
// C-Sharp Code for infix to postfix conversion using stack
using System;
using System.Collections.Generic;

public class InfixToPostfix {
    public static string InfixToPostfix(string infix) {
        Stack<char> stack = new Stack<char>();
        System.Text.StringBuilder postfix = new System.Text.StringBuilder();
        Dictionary<char, int> precedence = new Dictionary<char, int> {
            { '+', 1 },
            { '-', 1 },
            { '*', 2 },
            { '/', 2 }
        };

        foreach (char c in infix) {
            if (char.IsLetterOrDigit(c))
                postfix.Append(c);
            else if (c == '(')
                stack.Push(c);
            else if (c == ')') {
                while (stack.Count > 0 && stack.Peek() != '(')
                    postfix.Append(stack.Pop());
                stack.Pop();
            } else {
                while (stack.Count > 0 && precedence.GetValueOrDefault(c, 0) <= precedence.GetValueOrDefault(stack.Peek(), 0))
                    postfix.Append(stack.Pop());
                stack.Push(c);
            }
        }

        while (stack.Count > 0)
            postfix.Append(stack.Pop());

        return postfix.ToString();
    }

    public static void Main() {
        string infixExpression = "a+b*c-(d/e+f*g*h)";
        string postfixExpression = InfixToPostfix(infixExpression);
        Console.WriteLine("Infix Expression: " + infixExpression);
        Console.WriteLine("Postfix Expression: " + postfixExpression);
    }
}
Output:
Infix Expression: a+b*c-(d/e+f*g*h)
Postfix Expression: abc*+de/fg*h*+-
  • Time Complexity: The time complexity of the code is O(N), where N is the length of the input infix expression.
  • Space Complexity: The space complexity of the code is O(N).

How to check the technology a website is build with?

Checking the technology a website is built with involves inspecting its underlying components, such as the content management system (CMS), web server, programming languages, and frameworks. Here are several methods to uncover the technology stack of a website:

1. Using Online Tools.

Discovering the technology stack of a website becomes effortless with the assistance of online tools. Platforms like BuiltWith and Wappalyzer offer comprehensive reports by analyzing various components, unveiling the intricate web technologies shaping a website.

BuiltWith:
  1. Visit BuiltWith.
  2. Enter the URL of the website in question.
  3. The tool will generate a detailed report outlining the technologies used.

Wappalyzer:
  1. Install the Wappalyzer browser extension for Chrome or Firefox.
  2. Open the website you want to inspect.
  3. Click on the Wappalyzer icon in your browser to view the detected technologies.

2. Check Page Source.

Dive into the digital anatomy of a website by scrutinizing its page source. By right-clicking and exploring the HTML code, you can unveil meta tags, scripts, and comments that serve as clues, unraveling the technological tapestry behind the web interface.
  • Right-click on the website page and select "View Page Source" or "Inspect" (depending on your browser).
  • Look for meta tags, comments, or scripts that may indicate the use of specific technologies.

3. Loop for Generator Meta Tag.

Embark on a metadata expedition within a website's HTML source code. The presence of a generator meta tag, such as the one indicating WordPress, serves as a breadcrumb leading to the revelation of the content management system (CMS) in use.
<meta name="generator" content="WordPress">

4. WHOIS Loopup.

Unveil the digital footprint of a website through a WHOIS lookup. By exploring information about domain registration, hosting provider details, and registration history, one can glean insights into the foundational elements supporting the website's structure.
  • Perform a WHOIS lookup using websites like WHOIS.net.
  • Look for information about the web hosting provider, which might give clues about the technology stack.

5. Online Platform.

Peer into the collaborative world of online platforms like GitHub, GitLab, or Bitbucket. These repositories often unveil the source code and development choices behind a website, presenting a community-driven perspective on its technological foundation.

Some Tips:
  • Keep in mind that not all information may be accurately disclosed, and some websites may actively hide their technology stack for security reasons.
  • Use multiple methods to cross-verify results.
  • Understand that the information gathered might not be exhaustive or up-to-date, especially if the website employs security measures to conceal its stack.

By employing these methods, you can gain valuable insights into the technology stack of a website, enabling a better understanding of its underlying infrastructure and development choices.

DON'T MISS

Tech News
© all rights reserved
made with by AlgoLesson