My Youtube Channel

Please Subscribe

Flag of Nepal

Built in OpenGL

Word Cloud in Python

With masked image

Sunday, February 4, 2024

Exploring the Most Infamous Software Glitches in History

Exploring the Most Infamous Software Glitches in History provides insights into some of the most impactful and notorious software failures that have occurred throughout history. Here are several examples:

 

1. Y2K Bug (Year 2000 Problem):

   - As the year 2000 approached, many computer systems stored dates using only the last two digits of the year (e.g., "99" for 1999). Concerns arose that when the year changed to 2000, computers would interpret it as 1900 due to the two-digit representation. This led to fears of widespread system failures in critical infrastructure, finance, and other sectors. While extensive preparations and fixes mitigated most issues, the Y2K bug remains one of the most infamous software glitches.

 

2. Ariane 5 Flight 501:

   - In 1996, the maiden flight of the Ariane 5 rocket ended in catastrophic failure just 40 seconds after liftoff. The rocket's guidance system experienced an overflow error in the inertial reference system software. This error occurred due to a software component designed for the Ariane 4, which had different flight parameters. The failure resulted in the rocket's self-destruct mechanism being triggered, leading to the loss of the payload.

 

3. Therac-25 Radiation Therapy Machine:

   - The Therac-25 was a medical linear accelerator used for radiation therapy in the 1980s. It suffered from a series of software-related accidents that resulted in patients receiving massive overdoses of radiation, leading to severe injuries and deaths. The accidents were caused by race conditions and inadequate error handling in the software, which allowed the machine to deliver lethal doses of radiation to patients.

 

4. Patriot Missile Failure (Gulf War):

   - During the Gulf War in 1991, a Patriot missile defense system failed to intercept an incoming Scud missile launched by Iraq, resulting in the destruction of a U.S. Army barracks and multiple casualties. The failure was attributed to a software flaw in the system's internal clock, which caused inaccuracies to accumulate over time. As a result, the Patriot system failed to track and intercept the incoming missile.

 

5. Heartbleed Bug:

   - In 2014, the Heartbleed bug was discovered in the OpenSSL cryptographic software library, which is widely used to secure internet communications. The bug allowed attackers to exploit a vulnerability in the implementation of the Transport Layer Security (TLS) protocol, potentially exposing sensitive data such as passwords, private keys, and other cryptographic information. The widespread use of OpenSSL meant that millions of websites and services were vulnerable to exploitation.

 

These examples highlight the significant impact that software glitches can have on various aspects of society, from critical infrastructure and healthcare to military defense and cybersecurity. They underscore the importance of rigorous software testing, thorough code reviews, and robust error handling practices in preventing and mitigating the effects of software failures.

 


Debugging 101: Strategies for Squashing Software Bugs

Description:

Debugging is the process of identifying and fixing errors, or "bugs," in software code. It's an essential skill for developers and programmers to ensure their programs function correctly and efficiently. "Debugging 101" suggests an introductory level of understanding, making it suitable for beginners or those looking to improve their debugging skills.

 

Strategies for Squashing Software Bugs:

 

1. Identifying the Bug:

   - Understand the symptoms and behavior of the bug. Reproduce the issue to gain insights into its triggers and manifestations.

 

2. Isolating the Bug:

   - Narrow down the scope of the problem. Determine which parts of the code are affected by the bug and focus your attention there.

 

3. Reading the Code:

   - Thoroughly review the relevant code sections. Look for logic errors, syntax mistakes, or unexpected behaviors that could be causing the bug.

 

4. Using Debugging Tools:

   - Leverage debugging tools provided by the programming environment or IDE (Integrated Development Environment). These tools allow you to step through the code, inspect variables, and track program flow during execution.

 

5. Adding Logging Statements:

   - Insert logging statements strategically within the code to track the program's execution flow and monitor the values of variables at different stages. Logging helps identify the point at which the program deviates from the expected behavior.

 

6. Testing and Regression Testing:

   - Perform thorough testing to ensure that the bug fixes do not introduce new issues or regressions into the codebase. Regression testing involves retesting previously working parts of the software to verify that changes haven't affected their functionality.

 

7. Seeking Help and Collaboration:

   - Don't hesitate to seek assistance from colleagues, online communities, or forums when troubleshooting difficult bugs. Collaborating with others can provide fresh perspectives and insights into potential solutions.

 

8. Documenting the Fix:

   - Once the bug is resolved, document the steps taken to identify and fix it. Clear documentation helps future developers understand the problem and its solution, facilitating smoother maintenance and development processes.

 

9. Learning from Mistakes:

   - Treat each debugging experience as a learning opportunity. Analyze the root causes of bugs and identify patterns or common pitfalls to avoid in future coding endeavors.

 

By employing these strategies, developers can effectively debug software applications, improve code quality, and enhance overall development productivity. Debugging is not only a technical skill but also a mindset that emphasizes problem-solving, attention to detail, and persistence in the pursuit of software excellence.


Examples of each:

 

Description:

Debugging is a critical skill for software developers, enabling them to identify and fix errors in their code. "Debugging 101" suggests an introductory approach, making it suitable for beginners or those looking to refine their debugging techniques.

 

Strategies for Squashing Software Bugs:

 

1. Identifying the Bug:

   - Example: You notice that clicking a specific button in your web application consistently crashes the program or produces unexpected behavior.

 

2. Isolating the Bug:

   - Example: You determine that the issue only occurs when the button triggers a particular function responsible for updating user preferences.

 

3. Reading the Code:

   - Example: Upon reviewing the code for the function, you notice a conditional statement that incorrectly handles user input, leading to unexpected outcomes.

 

4. Using Debugging Tools:

   - Example: You set breakpoints within the function using your IDE's debugger and step through the code line by line to track the flow of execution and inspect variable values.

 

5. Adding Logging Statements:

   - Example: You insert logging statements before and after critical sections of code to monitor variable values and program flow during runtime, helping pinpoint the source of the issue.

 

6. Testing and Regression Testing:

   - Example: After implementing a potential fix, you conduct comprehensive testing to verify that the button now functions correctly and that other parts of the application remain unaffected.

 

7. Seeking Help and Collaboration:

   - Example: If you encounter difficulties resolving the bug, you seek advice from colleagues or participate in online developer communities to gain insights and potential solutions.

 

8. Documenting the Fix:

   - Example: Once the bug is resolved, you document the steps taken to identify and fix the issue, including any relevant code changes or insights gained during the debugging process.

 

9. Learning from Mistakes:

   - Example: Reflecting on the debugging experience, you identify areas for improvement in your coding practices and strive to incorporate lessons learned into future development projects.

 

By applying these strategies and learning from real-world examples, developers can enhance their debugging skills and effectively resolve software bugs, contributing to the overall quality and reliability of their applications.

 


Top 10 Common Coding Errors and How to Fix Them

1. Null Pointer Exception:

   - **Description:** Null pointer exceptions occur when you try to access a member or method of an object that's null. It's a common mistake in Java and other languages that support pointers.

   - **Example:** Suppose you have an object reference `obj` that is not initialized properly, and you try to call a method like `obj.someMethod()`. This will result in a null pointer exception.

   - **Fix:** To fix this error, you need to ensure that the object reference is initialized properly before accessing its members or methods.


2. Index Out of Bounds Exception:

   - **Description:** This error occurs when you try to access an element of an array, list, or other data structure at an index that is beyond the bounds of the structure.

   - **Example:** If you have an array `arr` with 5 elements (indices 0 to 4) and you try to access `arr[5]`, you'll get an index out of bounds exception.

   - **Fix:** To fix this error, ensure that the index you're trying to access is within the valid range of the data structure.


3. Infinite Loops:

   - **Description:** Infinite loops occur when the condition controlling the loop never evaluates to false, causing the loop to continue indefinitely.

   - **Example:** In Java, a common example of an infinite loop is `while (true) { ... }` without a break condition.

   - **Fix:** To fix this error, make sure that the loop condition eventually becomes false or add a break statement to exit the loop under certain conditions.


4. Type Mismatch Errors:

   - **Description:** Type mismatch errors occur when you try to assign a value of one data type to a variable of another data type that's not compatible.

   - **Example:** Assigning a string value to an integer variable without proper conversion can result in a type mismatch error.

   - **Fix:** Ensure that the data types of variables match the types of values being assigned to them, or use appropriate type conversion techniques.


5. Division by Zero Errors:

   - **Description:** Division by zero errors occur when you attempt to divide a number by zero, which is undefined in mathematics and most programming languages.

   - **Example:** Dividing a number by zero, such as `int result = 10 / 0;`, will result in a division by zero error.

   - **Fix:** To fix this error, ensure that the denominator is not zero before performing division operations.


6. Syntax Errors:

   - **Description:** Syntax errors occur when the code violates the rules of the programming language's syntax.

   - **Example:** Forgetting to close parentheses, missing semicolons, or using incorrect keywords can all result in syntax errors.

   - **Fix:** Review the code carefully to identify and correct syntax errors according to the rules of the programming language.


7. Memory Leaks:

   - **Description:** Memory leaks occur when a program allocates memory but fails to release it after it's no longer needed, leading to memory consumption over time.

   - **Example:** Forgetting to deallocate dynamically allocated memory in languages like C or C++ can result in memory leaks.

   - **Fix:** Properly manage memory allocation and deallocation using techniques like garbage collection or manual memory management.


8. Logic Errors:

   - **Description:** Logic errors occur when the program performs the wrong computations or produces incorrect results due to flawed logic in the code.

   - **Example:** A logic error could occur in a sorting algorithm that sorts elements in the wrong order or fails to sort them at all.

   - **Fix:** Debug the code to identify and correct logical flaws, such as incorrect conditional statements or algorithmic errors.


9. Concurrent Modification Errors:

   - **Description:** Concurrent modification errors occur in multi-threaded or concurrent programs when one thread modifies a data structure while another thread is iterating over it.

   - **Example:** Modifying a collection while iterating over it using an iterator can result in a concurrent modification error in Java.

   - **Fix:** Use proper synchronization techniques or concurrent data structures to avoid concurrent modification errors in multi-threaded programs.


10. Resource Management Errors:

   - **Description:** Resource management errors occur when the program fails to properly acquire, use, or release system resources like file handles, database connections, or network sockets.

   - **Example:** Failing to close an open file or database connection after its use can lead to resource management errors.

   - **Fix:** Ensure that resources are properly acquired, used, and released in the code using techniques like try-with-resources or explicit resource management.


Each of these examples illustrates a common coding error, explains why it occurs, and provides guidance on how to fix or prevent it. By understanding and addressing these common errors, developers can write more robust and reliable code.

Saturday, February 3, 2024

Solved: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


Follow the given steps to solve the issue. The commands here are for CentOS 8. The solution is same for other OS as well so modify the commands accordingly.

Step 1: After the installation of MYSQL is finished, enable and start mysqld as given below:

sudo systemctl start mysqld

sudo systemctl enable mysqld

Once, done also check the status of the mysqld to verify whether it is running or not:

sudo systemctl status mysqld

Step 2: Find the temporary password and copy it using the following command:

sudo grep 'temporary password' /var/log/mysqld.log

You will see something like this:

 A temporary password is generated for root@localhost: ;ND0#VvB0*Mt

Copy the temporary password.

Step 3: Type the following command:

mysql -u root -p

Step 4: When prompted to enter password, just paste the copied temporary password and yes you are done with your task. 

Step 5: Then you can change the password for root using the command:

sudo mysql_secure_installation



Using single Gmail as multiple Gmail addresses | Some hidden secrets of ...

Thursday, February 1, 2024

Steps to install oci8 on centos 8

The following steps is valid for Oracle 11g, you can modify as per your oracle version in a similar fashion.

1. Install the Oracle Instant Client:

   - Download the Oracle Instant Client RPM packages for your architecture from the Oracle website (https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html). You'll need  oracle-instantclient-basic ,  oracle-instantclient-devel and oracle-instantclient-sqlplus packages.

   - Transfer the downloaded RPM packages to your CentOS 8 system if you downloaded them on a different machine.

Note: for centos, it is better to download “.rpm” file rather than “.zip”

2. Install the Oracle Instant Client RPM packages:

Go to the directory where you downloaded the oracle instant-client files and install those files:

Let’s take example for version oracle instant-client 11.2,

sudo dnf install oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm 

sudo dnf install oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64

sudo dnf install oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64

To verify whether the Oracle Instant Client "devel" package is installed on your CentOS system, you can use the package management tool rpm or dnf. Here's how you can check for the presence of the Oracle Instant Client devel package:

Using ‘rpm’:

rpm -qa | grep oracle-instantclient-devel

Using ‘dnf’:

dnf list installed | grep oracle-instantclient-devel

 

3. Verify the ORACLE_HOME environment variable:

echo $ORACLE_HOME

Ensure that the ORACLE_HOME environment variable is set correctly and points to the location where you installed the Oracle Instant Client. If it's not set correctly, you can set it as follows:

export ORACLE_HOME=/path/to/instant/client

During the installation process, you may be prompted to provide the path to the Oracle Instant Client library. If prompted, enter the correct path:

Enter the path: instantclient,/usr/lib/oracle/19.20/client64/lib

 

4. Set the environment variables required for OCI8 and PHP:

 

$ export ORACLE_HOME=/usr/lib/oracle/11.2/client64

$ export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib

sudo ldconfig

Once you are done with above steps, the environment is set for oci8 installation, follow the bellows steps now,

5. Stop Apache and uninstall older version of OCI8 if any (stopping Apache is very important):

 service httpd stop

 pecl uninstall oci8

 

6. Install php-pear and php devel:

 sudo yum install php-pear php-devel

 pear download pecl/oci8

7. The next commands depend on the version of oci8 downloaded above.

$ tar xvzf oci8-2.2.0.tgz

$ cd oci8-2.2.0/

$ phpize

$ export PHP_DTRACE=yes

$ sudo dnf install libnsl

$ sudo dnf install epel-release

$ setenforce 0

 

8. Make sure of the instantclient path below... mine was version 11.2 so it was located in this folder... Also make note some tutorials ask for the ORACLE_HOME folder which theoretically is /usr/lib/oracle/11.2/client64 but if its instantclient then put the lib folder underneath it (worked for me at least:)

$ ./configure --with-oci8=instantclient,/usr/lib/oracle/12.2/client64/lib/

$ make

$ make install

$ sudo pecl install oci8-3.3.0 instantclient,$ORACLE_HOME/lib

$ sudo systemctl restart httpd

$ sudo systemctl restart php-fpm

$ sudo systemctl restart mysqld 

9. NOW an .so file built in: /usr/lib64/php/modules/oci8.so

10. check whether oci8 has been successfully installed or not:

php -m | grep oci8

The steps may not be needed in most of the cases. If indeed, it is required in your case go through these steps as well (though it is suggested to first try running before implementing the below steps):

# THIS STEP NOT NEEDED if SELinux disabled on your server/box, but if SELinux is enabled run: setsebool -P httpd_execmem 1

# NOW add:   extension=oci8.so    at the bottom of your php.ini file (probably in /etc/php.ini)

# Add extension_dir=/usr/lib64/php/modules/


Steps to install HTTPD, PHP, MYSQL and PHPMYADMIN in CentOS 8


Steps to install httpd in CentOS 8

  1. sudo yum install dnf
  2. sudo dnf update
  3. sudo dnf install httpd
  4. sudo systemctl start httpd
  5. sudo systemctl enablr httpd
  6. sudo systemctl enable httpd
  7. sudo firewall-cmd --add-service=http --permanent
  8. sudo firewall-cmd --reload
  9. sudo systemctl status httpd
  10. sudo dnf update

Steps to install PHP in CentOS 8

  1. sudo dnf update
  2. sudo dnf install epel-release
  3. sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
  4. sudo dnf module enable php:remi-8.2
  5. sudo dnf module reset php
  6. sudo dnf module enable php:remi-8.2
  7. sudo dnf module list php
  8. sudo dnf install php php-cli php-fpm php-mysqlnd php-pdo php-gd php-xml
  9. php -v
Steps to install MYSQL in CentOS 8

  1. sudo dnf update
  2. sudo dnf install https://dev.mysql.com/get/mysql80-community-release-el8-    3.noarch.rpm
  3. sudo dnf module enable mysql:8.0
  4. sudo dnf update
  5. sudo dnf install mysql-server
  6. sudo systemctl start php-fpm
  7. sudo systemctl enable php-fpm
  8. sudo systemctl restart httpd
  9. sudo systemctl start mysqld
  10. sudo systemctl enable mysqld
Steps to install phpmyadmin in CentOS 8

  1. Sudo dnf install epel-release
  2. sudo dnf update
  3. yum -y update
  4. yum -y install phpmyadmin
  5. dnf --enablerepo=remi install phpMyAdmin
  6. sudo vi /etc/httpd/conf.d/phpMyAdmin.conf
Make sure the phpMyAdmin.conf file looks similar to this:

Alias /phpMyAdmin /usr/share/phpMyAdmin

Alias /phpmyadmin /usr/share/phpMyAdmin

 

<Directory /usr/share/phpMyAdmin/>

   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>

      # Apache 2.4

      <RequireAny>

         Require all granted

      </RequireAny>

   </IfModule>

   <IfModule !mod_authz_core.c>

      # Apache 2.2

      Order Deny,Allow

      Deny from All

      Allow from 127.0.0.1

      Allow from ::1

   </IfModule>

</Directory>

 

<Directory /usr/share/phpMyAdmin/setup/>

7. sudo systemctl restart httpd

8. You can verify the phpmyadmin installation by opening URL:

http://your_server_ip/phpMyAdmin

Alternative way to install phpmyadmin on CentOS 8

  1. sudo dnf update
  2. sudo dnf install tar
  3. sudo dnf install wget
  4. wget https://files.phpmyadmin.net/phpMyAdmin/5.1.3/phpMyAdmin-5.1.3-all-languages.tar.gz
  5. tar xzf phpMyAdmin-5.1.3-all-languages.tar.gz
  6. sudo mv phpMyAdmin-5.1.3-all-languages /usr/share/phpMyAdmin
  7. sudo mkdir /etc/phpMyAdmin
  8. sudo cp /usr/share/phpMyAdmin/config.sample.inc.php /etc/phpMyAdmin/config.inc.php
  9. sudo chmod 660 /etc/phpMyAdmin/config.inc.php
  10. sudo chown -R apache:apache /etc/phpMyAdmin
  11. sudo vi /etc/phpMyAdmin/config.inc.php
  12. add to config.inc.php,
                $cfg['blowfish_secret'] = 'a1b2c3d4e5f6g7h8i9j0';

13. sudo vi /etc/httpd/conf.d/phpMyAdmin.conf

Your phpMyAdmin.conf should be similar to given below,

Alias /phpMyAdmin /usr/share/phpMyAdmin

Alias /phpmyadmin /usr/share/phpMyAdmin

 

<Directory /usr/share/phpMyAdmin/>

   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>

      # Apache 2.4

      <RequireAny>

         Require all granted

      </RequireAny>

   </IfModule>

   <IfModule !mod_authz_core.c>

      # Apache 2.2

      Order Deny,Allow

      Deny from All

      Allow from 127.0.0.1

      Allow from ::1

   </IfModule>

</Directory>

 

<Directory /usr/share/phpMyAdmin/setup/>

14. sudo systemctl restart httpd

 

Note: "vi" command used above is an editor. I hope you know how to use it.

To insert, press i

To exit without saving, press esc then :q! and then enter

To exit along with saving, press esc then :wq! then enter







Tuesday, January 30, 2024

Defining and differentiating Super key and Candidate Key based on two properties

Candidate keys and super keys are concepts in relational database theory that relate to the uniqueness and irreducibility of attributes within a table's schema.

1. **Super Key**:

   - A super key is a set of one or more attributes (columns) that uniquely identifies each tuple (row) within a table.

   - It may contain more attributes than necessary to uniquely identify tuples.

   - A super key must satisfy the uniqueness property, meaning no two tuples in the table can have the same combination of values for the attributes in the super key.

   - Super keys can be minimal (irreducible) or non-minimal (reducible).


2. **Candidate Key**:

   - A candidate key is a minimal super key, meaning it is a super key with the fewest possible attributes.

   - It uniquely identifies each tuple in the table.

   - If any attribute is removed from a candidate key, it loses its uniqueness property.

   - Each candidate key within a table is unique, meaning no two candidate keys contain the same set of attributes.


Now, let's delve deeper into the uniqueness and irreducibility properties that differentiate between candidate keys and super keys:


- **Uniqueness**:

  - Both candidate keys and super keys must guarantee uniqueness.

  - However, candidate keys provide the strongest form of uniqueness because they are minimal and cannot be further reduced without losing the uniqueness property.

  - Super keys, on the other hand, may contain redundant attributes that do not contribute to uniqueness, but they still ensure that each tuple in the table is uniquely identifiable.


- **Irreducibility**:

  - Irreducibility refers to the inability to remove any attribute from a key without losing its unique identification property.

  - Candidate keys are by definition irreducible because they are minimal super keys.

  - Super keys, while they can also provide uniqueness, may include additional attributes that are not strictly necessary for uniquely identifying tuples. Removing these attributes may still preserve uniqueness, making them reducible.


In summary, while both candidate keys and super keys ensure uniqueness, candidate keys are distinguished by their irreducibility, as they represent the smallest set of attributes necessary to uniquely identify each tuple in a table. Super keys, while also ensuring uniqueness, may contain redundant attributes and are not necessarily minimal.


Understanding with example:

Let's consider a simple table representing employees in a company:


**Employee Table:**


| EmployeeID | Name      | Department | Salary |

|------------|-----------|------------|--------|

| 1          | John      | HR         | 50000  |

| 2          | Jane      | IT         | 60000  |

| 3          | Alice     | IT         | 55000  |

| 4          | Bob       | Sales      | 48000  |


**1. Uniqueness:**


- **Candidate Key Example:**

  In this table, the attribute `EmployeeID` serves as a candidate key because it uniquely identifies each employee. No two employees have the same `EmployeeID`.

  Candidate Key: `{EmployeeID}`


- **Super Key Example:**

  A super key could be the combination of `EmployeeID` and `Name`. This combination uniquely identifies each employee, making it a super key. However, it's not minimal because `EmployeeID` alone is sufficient.

  Super Key: `{EmployeeID, Name}`


**2. Irreducibility:**


- **Irreducible Candidate Key Example:**

  `EmployeeID` is an irreducible candidate key because removing any attribute from it would violate uniqueness. If you remove `EmployeeID`, you can't uniquely identify employees anymore.

  Candidate Key: `{EmployeeID}`


- **Reducible Super Key Example:**

  Let's consider the super key `{EmployeeID, Department}`. While it uniquely identifies each tuple, `Department` is not necessary for uniqueness. Removing `Department` still leaves us with a unique identifier.

  Super Key (Reducible): `{EmployeeID, Department}`


In summary, `EmployeeID` serves as both a candidate key and an example of irreducibility. Meanwhile, combinations like `{EmployeeID, Name}` represent super keys but are not minimal due to the inclusion of non-essential attributes.

Candidate Key Vs Super Key : Differentiating with Two Properties in an e...

Monday, January 29, 2024

Interesting and Useful features of Gmail : Use single Gmail account as Multiple email address

Gmail addresses offer several interesting features and nuances beyond the standard email format. Here are a few more:

1. **Dot Ignorance**: Gmail addresses ignore dots in the username. For example, "john.doe@gmail.com" is the same as "johndoe@gmail.com" or "j.o.h.n.d.o.e@gmail.com". They all route to the same inbox.


2. **Case Insensitivity**: Gmail addresses are not case-sensitive. "JohnDoe@gmail.com" is the same as "johndoe@gmail.com". 


3. **Gmail Aliases**: Gmail also supports the use of aliases. You can append a plus sign (+) followed by any additional text to your Gmail address. For instance, emails sent to "yourusername+anything@gmail.com" will still be delivered to "yourusername@gmail.com". This feature is handy for filtering and organizing incoming mail.


4. **Gmail Dot Trick**: While Gmail doesn't recognize dots in the username, they do allow you to use different variations of your email address. This can be useful for signing up for multiple accounts on the same service while only using one email address. For instance, you could sign up for one account as "johndoe@gmail.com" and another as "john.doe@gmail.com", and both emails will still go to the same inbox.


5. **Address Discarding**: If you receive unwanted emails or spam to a particular Gmail address, you can create a filter to automatically delete or archive messages sent to that address. This can help manage your inbox more effectively.


These features provide users with flexibility and control over their email addresses, making Gmail a versatile platform for communication and organization.


Usefulness of such features in day to day life:

The unique features and capabilities of Gmail addresses, including dot ignorance, case insensitivity, aliases, and the dot trick, offer users several practical use cases:

1. **Filtering and Organizing Emails**: By using aliases or the dot trick, users can easily filter and organize incoming emails based on their source. For example, users can sign up for newsletters using "username+news@gmail.com" and automatically filter these emails into a separate folder or label.


2. **Detecting Spam and Unwanted Emails**: Users can easily identify the source of spam or unwanted emails by monitoring which alias or variation of their email address was used. This can help users better manage their inbox and block or filter unwanted senders.


3. **Managing Multiple Accounts**: The dot trick allows users to sign up for multiple accounts on the same service using variations of their Gmail address. This is particularly useful for managing accounts on websites or services that limit the number of registrations per email address.


4. **Tracking Email Signups**: Users can track which websites or services share their email address with third parties by using unique aliases for each signup. If they start receiving spam or unsolicited emails to a specific alias, they can easily identify the source and take appropriate action.


5. **Testing and Development**: Developers and testers can use Gmail aliases to create test accounts or simulate multiple users without the need for separate email addresses. This simplifies testing and development processes while ensuring that all test emails are delivered to a single inbox.


6. **Privacy and Security**: Users concerned about privacy and security can use aliases to share their email address with specific contacts or services without revealing their primary email address. If an alias becomes compromised or starts receiving spam, users can simply delete or disable it without affecting their primary address.


Overall, the unique features of Gmail addresses provide users with greater flexibility, control, and security over their email communications and online activities.

Wednesday, January 24, 2024

BTech Vs BE

Wednesday, January 10, 2024

Detach audio from video in Clipchamp | Also trim audio and video individ...

Thursday, November 2, 2023

Install "PhpSpreadsheet" to handle Excel file in PHP | Library to handl...

Wednesday, November 1, 2023

Solved: Cannot find script file Maintenance.vbs/ StartupCheck.vbs | Wind...

Wednesday, September 27, 2023

Difference between JAVA and JAVASCRIPT

 Java and JavaScript are two distinct programming languages that share a similar name but are used for different purposes and have significant differences. Here's a breakdown of the key differences between Java and JavaScript:


1. **Origin and History**:

   - **Java**: Java was created by James Gosling at Sun Microsystems in the mid-1990s. It


is a statically-typed, compiled programming language that was originally designed for developing applications for embedded systems. It later gained popularity for its "Write Once, Run Anywhere" capabilities.

   - **JavaScript**: JavaScript, often abbreviated as JS, was developed by Brendan Eich at Netscape in the early 1990s. It is a dynamically-typed, interpreted scripting language primarily used for web development. Despite its name, JavaScript has no direct relationship with Java.


2. **Usage**:

   - **Java**: Java is a general-purpose programming language used for various applications, including desktop applications, mobile app development (Android), server-side applications (Java EE), and more. It's known for its platform independence and strong type checking.

   - **JavaScript**: JavaScript is mainly used for web development. It is the primary scripting language for building interactive web pages and web applications, enabling dynamic content, user interactions, and client-side functionality within web browsers.


3. **Typing**:

   - **Java**: Java is statically typed, which means that variable types are declared at compile time, and type checking is done at compile time. This helps catch type-related errors early in the development process.

   - **JavaScript**: JavaScript is dynamically typed, which means that variable types are determined at runtime. Type checking occurs during program execution, which can lead to flexibility but may also introduce runtime errors if not handled carefully.


4. **Execution Environment**:

   - **Java**: Java applications are typically compiled into bytecode and run on the Java Virtual Machine (JVM). This allows Java code to be platform-independent, as long as there's a compatible JVM for the target platform.

   - **JavaScript**: JavaScript is executed directly by web browsers, making it a client-side scripting language. It can also be used on the server side through technologies like Node.js.


5. **Syntax and Semantics**:

   - **Java**: Java has C-like syntax and uses classes and objects for organizing code. It follows a more traditional programming language structure.

   - **JavaScript**: JavaScript has a C-like syntax as well, but it is often described as a prototype-based language. It supports dynamic object creation and manipulation, making it well-suited for building interactive web applications.


6. **Common Libraries and Frameworks**:

   - **Java**: Popular Java frameworks and libraries include Spring, Hibernate, and JavaFX for various application types.

   - **JavaScript**: JavaScript has numerous libraries and frameworks, such as React, Angular, and Vue.js for front-end web development, and Node.js for server-side development.


In summary, while Java and JavaScript share some superficial syntactical similarities, they are fundamentally different languages with distinct purposes, execution environments, and ecosystems. Java is a versatile, statically-typed language used for various applications, while JavaScript is primarily used for building dynamic, interactive web applications.

Tuesday, September 26, 2023

Immutable backup and how it is achieved ?

An immutable backup refers to a type of data backup that cannot be modified, altered, or deleted once it has been created. The term "immutable" implies that the data is protected from any changes, intentional or accidental, for a specified period of time or until certain conditions are met. This concept is commonly used in data protection and disaster recovery strategies to ensure the integrity and availability of critical data.


Here are some key characteristics and benefits of immutable backups:


1. Data Integrity: Immutable backups are designed to prevent data tampering, corruption, or deletion. This helps maintain the integrity of the backed-up data, ensuring that it remains unchanged and reliable for recovery purposes.


2. Ransomware Protection: Immutable backups are an effective defense against ransomware attacks. Since ransomware typically tries to encrypt or delete data, having immutable backups ensures that attackers cannot alter or delete the backup copies, making it possible to restore the data to a clean state.


3. Compliance Requirements: Some industries and regulatory bodies require organizations to maintain immutable backups as part of their compliance and data retention policies. Immutable backups can help organizations meet these requirements by providing a secure and unmodifiable data repository.


4. Legal and Audit Purposes: Immutable backups can be used as evidence in legal proceedings or audits, as they demonstrate that the data has not been altered or tampered with since the backup was created.


5. Data Recovery: In the event of data loss or system failures, immutable backups can be relied upon for data recovery. They provide a reliable source for restoring data to its previous state.


6. Retention Periods: Immutable backups often have predefined retention periods during which the data cannot be deleted or modified. Once the retention period expires, the data may become mutable or can be deleted according to the organization's policies.


Immutable backups are achieved through a combination of technology, policies, and best practices aimed at ensuring that data cannot be modified, altered, or deleted once it has been backed up. Here are some common methods and strategies for achieving immutable backups:


1. **Write Once Read Many (WORM) Storage**: WORM storage systems are designed


to allow data to be written once and read many times. Once data is written to a WORM storage device, it cannot be overwritten, modified, or deleted, making it an ideal choice for immutable backups.


2. **Versioning**: Implementing versioning mechanisms within a backup system allows multiple copies of a file or data to be retained. Each version is immutable, meaning it cannot be altered or deleted. This ensures that previous versions of data can be restored if needed.


3. **Data Encryption**: Encrypting backup data can help protect it from unauthorized access and tampering. Even if an attacker gains access to the backup storage, they won't be able to modify the data without the encryption keys.


4. **Access Controls and Authentication**: Implement strict access controls and authentication mechanisms to prevent unauthorized personnel from making changes to backup data.


5. **Retention Policies**: Establish clear retention policies that define how long backup data should be kept in its immutable state. Once the retention period expires, the data may become mutable or can be deleted based on organizational policies.


6. **Auditing and Monitoring**: Regularly audit and monitor backup systems to detect any unusual activities or attempts to tamper with the data. Log and track all actions related to backup data.


7. **Backup Replication**: Create multiple copies of backups and store them in geographically diverse locations. This ensures redundancy and protects against both data loss and the risk of a single copy being compromised.


8. **Offline or Air-Gapped Backups**: Keep some backup copies completely offline or air-gapped from the network. This makes it nearly impossible for cyberattacks to reach the backup data.


9. **Immutable Backup Solutions**: Some backup solutions and cloud providers offer built-in features for creating immutable backups. These solutions often provide a secure and automated way to achieve immutability.


10. **Regular Testing and Recovery Drills**: Periodically test the restoration process from immutable backups to ensure that the data can be successfully recovered when needed.


11. **Legal and Compliance Compliance**: Ensure that your immutable backup strategy aligns with legal and compliance requirements specific to your industry and region.


The exact implementation of immutable backups can vary depending on the organization's needs, available technologies, and budget. It's crucial to assess the specific requirements and risks associated with your data and design an immutable backup strategy accordingly. Additionally, maintaining documentation and regular reviews of your backup strategy can help ensure its effectiveness over time.

Connect MS SQL Server database with PHP

Saturday, September 23, 2023

Clear recent history and search histrory in windows 10/11 in one GO

Friday, September 8, 2023

Different Bands in Mobile Telecommunication?

Telecom mobile communication systems use various frequency bands to provide wireless services. Different countries and regions allocate specific frequency bands for mobile communication services, and the exact frequency ranges can vary. Here are some of the commonly used frequency bands in mobile communication:



1. **GSM (Global System for Mobile Communications):**

   - GSM 900 MHz: 890-960 MHz (Europe, Asia, Africa, Australia)

   - GSM 1800 MHz (DCS): 1710-1880 MHz (Europe, Asia, Africa)

   - GSM 850 MHz: 824-894 MHz (North America, South America, Caribbean)


2. **UMTS (Universal Mobile Telecommunications System) / 3G:**

   - UMTS Band I: 1920-1980 MHz (IMT, Europe, Asia)

   - UMTS Band II: 1850-1910 MHz (PCS, North America)

   - UMTS Band V: 824-849 MHz (Cellular 850, North America)

   - UMTS Band VIII: 880-915 MHz (GSM 900, Europe, Asia)

   - UMTS Band IV: 1710-1755 MHz (AWS, North America)

   - UMTS Band IX: 1755-1780 MHz (IMT, Europe)

   - UMTS Band X: 2110-2155 MHz (AWS, North America)


3. **LTE (Long-Term Evolution) / 4G:**

   - LTE Band 1: 1920-1980 MHz (IMT, Global)

   - LTE Band 2: 1850-1910 MHz (PCS, North America)

   - LTE Band 3: 1710-1785 MHz (DCS, Europe, Asia)

   - LTE Band 4: 1710-1755 MHz (AWS, North America)

   - LTE Band 5: 824-849 MHz (Cellular 850, North America)

   - LTE Band 7: 2500-2690 MHz (IMT, Global)

   - LTE Band 8: 880-915 MHz (GSM 900, Europe, Asia)

   - LTE Band 12: 699-716 MHz (Lower 700, North America)

   - LTE Band 20: 832-862 MHz (800 MHz Digital Dividend, Europe, Asia)


4. **5G NR (New Radio) / 5G:**

   - 5G NR Band n77: 3300-4200 MHz (C-Band, Global)

   - 5G NR Band n78: 3300-3800 MHz (3.8 GHz Band, Global)

   - 5G NR Band n41: 2496-2690 MHz (2.5 GHz Band, Global)

   - 5G NR Band n71: 600-6000 MHz (600 MHz Band, Global)


Please note that these are general frequency ranges, and specific countries and regions may have variations and additional frequency bands allocated for mobile communication. Additionally, there are sub-bands and carrier aggregation techniques used to combine multiple frequency bands for higher data speeds and capacity in 4G and 5G networks. The exact frequency bands used by a mobile operator depend on licensing and regulatory decisions in the respective countries and regions.