Playwright

Playwright is an open-source end-to-end testing and browser automation framework developed by Microsoft. It allows you to automate actions in web browsers like Chromium (Chrome, Edge), WebKit (Safari), and Firefox with a single API. It’s commonly used for: UI Testing – verifying that web applications work as expected. Web Scraping – extracting data from…

0 Comments

Cypress

Cypress is a modern end-to-end (E2E) testing framework for web applications. It’s mainly used to test how your app behaves in a real browser (Chrome, Edge, Firefox, etc.), simulating actual user interactions such as clicking buttons, filling forms, navigating pages, and making assertions about what should appear on the screen. Unlike older tools like…

0 Comments

What is the DOM

🌐 What is the DOM? The DOM is a programming interface for web documents. It represents the HTML or XML document as a tree structure. Each element (like <div>, <p>, <h1>, etc.) becomes a node in this tree. Example: <html> <body> <h1>Hello</h1> <p>World</p> </body> </html> <html> <body> <h1>Hello</h1> <p>World</p> </body> </html> DOM Tree Representation:…

0 Comments

Local Storage, Session Storage, and Cookies in JavaScript

1. Local Storage Purpose: Stores data in the browser that persists even after the browser is closed. Lifespan: Permanent until explicitly cleared by the user or program. Storage Limit: Usually 5-10 MB per domain. Accessibility: Only accessible on the client-side (browser), not sent with HTTP requests. Example: // Store data localStorage.setItem('username', 'Alice'); // Retrieve…

0 Comments

Error handling in JavaScript using try/catch

1. The Basics of try/catch try/catch lets you handle errors gracefully instead of letting your program crash. Syntax: try { // Code that might throw an error } catch (error) { // Code to handle the error } finally { // Optional: code that runs regardless of error } try { // Code that…

0 Comments

Working with APIs using fetch()

1. What is fetch()? fetch() is a modern JavaScript function that allows you to make network requests (like GET, POST, etc.) to APIs. It returns a Promise, which resolves to the Response object. 2. Basic fetch() Example Suppose we want to get some data from a public API: JSONPlaceholder (fake API for testing). //…

0 Comments

Aggregations and filters in MongoDB

1. Filters in MongoDB Filters are used in queries to select documents that match certain conditions. You generally use find() for this. Example: Suppose we have a collection employees: [ { "_id": 1, "name": "Alice", "age": 30, "department": "HR", "salary": 5000 }, { "_id": 2, "name": "Bob", "age": 25, "department": "IT", "salary": 6000 },…

0 Comments

Difference between SQL and NoSQL

Here’s a clear breakdown of the differences between SQL and NoSQL databases: FeatureSQL (Relational)NoSQL (Non-Relational)Data ModelStructured, table-based with rows and columnsFlexible, can be document, key-value, column-family, or graph-basedSchemaFixed schema; must define tables and column types beforehandDynamic or flexible schema; fields can vary across documentsQuery LanguageUses SQL (Structured Query Language) for complex queriesUses varied query…

0 Comments

N+1 problem

The N+1 problem is a common performance issue in programming, especially when dealing with databases and object-relational mapping (ORM) frameworks. It occurs when an application makes one query to fetch a list of items (the “1”) and then makes an additional query for each item in the list (the “N”), resulting in many more…

0 Comments

Partitioning and Sharding in databases

1. Partitioning Definition:Partitioning is the process of dividing a single database table into smaller, more manageable pieces, called partitions, while still keeping them within the same database. Each partition can be stored separately, often based on some key (like date, region, or ID). Purpose: Improves query performance. Makes management easier (backups, archiving). Can reduce…

0 Comments

End of content

No more pages to load