Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Using the orientation media query in HTML video content for users devices orientation, enhancing usability and performance.
๐JOIN WEB DEVELOPMENT CHANNEL
https://t.me/learn_devtech
๐ JOIN TECH ZONE ๐ฅ
https://t.me/Mega_free_course
JOIN GROUP CHAT
https://t.me/+u7jqwUjGzzs1OWI0
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
A collection of very short ๐ค but handy CSS snippets for you โจ
๐JOIN WEB DEVELOPMENT CHANNEL
https://t.me/learn_devtech
๐ JOIN TECH ZONE ๐ฅ
https://t.me/Mega_free_course
JOIN GROUP CHAT
https://t.me/+u7jqwUjGzzs1OWI0
๐JOIN WEB DEVELOPMENT CHANNEL
https://t.me/learn_devtech
๐ JOIN TECH ZONE ๐ฅ
https://t.me/Mega_free_course
JOIN GROUP CHAT
https://t.me/+u7jqwUjGzzs1OWI0
align-items and align-content were two of my most confusing properties when I started out on CSS. Here is a visualization for the same!
๐JOIN WEB DEVELOPMENT CHANNEL
https://t.me/learn_devtech
๐ JOIN TECH ZONE ๐ฅ
https://t.me/Mega_free_course
JOIN GROUP CHAT
https://t.me/+u7jqwUjGzzs1OWI0
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
*๐ฅ Now Letโs move to the next topic:*
*COALESCE & NULL Handling in SQL*
*๐ง 1. What is NULL in SQL?*
NULL means
๐ missing value
๐ unknown value
๐ no data available
*โ ๏ธ NULL is NOT:*
โ 0
โ Empty string
*โก 2. Problems with NULL Values*
NULL can affect:
โ Calculations
โ Comparisons
โ Reports
*Example ๐*
SELECT salary + bonus
FROM employees;
If bonus is NULL โ result becomes NULL โ
*๐ฅ 3. COALESCE Function*
๐ Replaces NULL with another value
*โ Syntax*
COALESCE(column, value)
*โก 4. Basic Example*
SELECT name,
COALESCE(bonus, 0) AS bonus
FROM employees;
โ If bonus is NULL โ shows 0 instead
*โก 5. Multiple Values with COALESCE*
SELECT name,
COALESCE(phone, email, 'No Contact') AS contact
FROM employees;
โ Returns first non-NULL value
*๐ฅ 6. IS NULL & IS NOT NULL*
๐ Find employees without bonus
SELECT * FROM employees
WHERE bonus IS NULL;
๐ Find employees with bonus
SELECT * FROM employees
WHERE bonus IS NOT NULL;
*โก 7. NULL Handling in Aggregation*
SELECT AVG(COALESCE(bonus, 0))
FROM employees;
โ Prevents NULL issues in calculations
*๐ฏ 8. Practice Tasks*
1. Replace NULL bonus with 0
2. Find rows with NULL values
3. Find rows without NULL values
4. Use COALESCE with multiple columns
5. Calculate total salary safely using COALESCE
*โก Mini Challenge ๐ฅ*
๐ Show employee total income:
salary + bonus
(If bonus is NULL โ treat as 0)
*๐ฅ Mini Challenge Solution ๐ฏ*
*๐ Requirement:*
total_income = salary + bonus
If bonus is NULL โ treat it as 0
*โ SQL Solution Using COALESCE*
SELECT name,
salary,
COALESCE(bonus, 0) AS bonus,
salary + COALESCE(bonus, 0) AS total_income
FROM employees;
*โ Example Output*
*name* : Amit, *salary* : 70000, *bonus* : 5000, *total_income* : 75000
*name* : Neha, *salary* : 50000, *bonus* : 0, *total_income* : 50000
*name* : Ravi, *salary* : 60000, *bonus* : 3000, *total_income* : 63000
*๐ง How It Works*
๐
means:
- If bonus exists โ use bonus
- If bonus is NULL โ use 0
๐ก *Most common interview mistake* โ๐
WHERE column = NULL
*โ Correct:*
WHERE column IS NULL
*Double Tap โค๏ธ For More*
*COALESCE & NULL Handling in SQL*
*๐ง 1. What is NULL in SQL?*
NULL means
๐ missing value
๐ unknown value
๐ no data available
*โ ๏ธ NULL is NOT:*
โ 0
โ Empty string
*โก 2. Problems with NULL Values*
NULL can affect:
โ Calculations
โ Comparisons
โ Reports
*Example ๐*
SELECT salary + bonus
FROM employees;
If bonus is NULL โ result becomes NULL โ
*๐ฅ 3. COALESCE Function*
๐ Replaces NULL with another value
*โ Syntax*
COALESCE(column, value)
*โก 4. Basic Example*
SELECT name,
COALESCE(bonus, 0) AS bonus
FROM employees;
โ If bonus is NULL โ shows 0 instead
*โก 5. Multiple Values with COALESCE*
SELECT name,
COALESCE(phone, email, 'No Contact') AS contact
FROM employees;
โ Returns first non-NULL value
*๐ฅ 6. IS NULL & IS NOT NULL*
๐ Find employees without bonus
SELECT * FROM employees
WHERE bonus IS NULL;
๐ Find employees with bonus
SELECT * FROM employees
WHERE bonus IS NOT NULL;
*โก 7. NULL Handling in Aggregation*
SELECT AVG(COALESCE(bonus, 0))
FROM employees;
โ Prevents NULL issues in calculations
*๐ฏ 8. Practice Tasks*
1. Replace NULL bonus with 0
2. Find rows with NULL values
3. Find rows without NULL values
4. Use COALESCE with multiple columns
5. Calculate total salary safely using COALESCE
*โก Mini Challenge ๐ฅ*
๐ Show employee total income:
salary + bonus
(If bonus is NULL โ treat as 0)
*๐ฅ Mini Challenge Solution ๐ฏ*
*๐ Requirement:*
total_income = salary + bonus
If bonus is NULL โ treat it as 0
*โ SQL Solution Using COALESCE*
SELECT name,
salary,
COALESCE(bonus, 0) AS bonus,
salary + COALESCE(bonus, 0) AS total_income
FROM employees;
*โ Example Output*
*name* : Amit, *salary* : 70000, *bonus* : 5000, *total_income* : 75000
*name* : Neha, *salary* : 50000, *bonus* : 0, *total_income* : 50000
*name* : Ravi, *salary* : 60000, *bonus* : 3000, *total_income* : 63000
*๐ง How It Works*
๐
COALESCE(bonus, 0) means:
- If bonus exists โ use bonus
- If bonus is NULL โ use 0
๐ก *Most common interview mistake* โ๐
WHERE column = NULL
*โ Correct:*
WHERE column IS NULL
*Double Tap โค๏ธ For More*
MIT made its entire AI & ML library 100% FREE to access.
These 12 books are the best place to start ๐
โณ ๐๐ผ๐๐ป๐ฑ๐ฎ๐๐ถ๐ผ๐ป๐
1. Foundations of Machine Learning
https://cs.nyu.edu/~mohri/mlbook/
The mathematical backbone of ML - algorithms, theory, and how models actually learn.
2. Understanding Deep Learning
https://udlbook.github.io/udlbook/
Neural networks explained visually and intuitively, from basics to modern architectures.
3. Deep Learning
https://www.deeplearningbook.org/
The definitive deep learning reference, written by the researchers who shaped the field.
4. Introduction to Machine Learning Systems
https://mlsysbook.ai/
How to design and build ML systems that work in production, not just in notebooks.
5. Algorithms for Optimization
https://algorithmsbook.com/optimization/
The math behind how models improve - gradient methods, search, and decision-making.
โณ ๐ฅ๐ฒ๐ถ๐ป๐ณ๐ผ๐ฟ๐ฐ๐ฒ๐บ๐ฒ๐ป๐ ๐๐ฒ๐ฎ๐ฟ๐ป๐ถ๐ป๐ด
6. Reinforcement Learning: An Introduction
http://incompleteideas.net/book/the-book.html
T
These 12 books are the best place to start ๐
โณ ๐๐ผ๐๐ป๐ฑ๐ฎ๐๐ถ๐ผ๐ป๐
1. Foundations of Machine Learning
https://cs.nyu.edu/~mohri/mlbook/
The mathematical backbone of ML - algorithms, theory, and how models actually learn.
2. Understanding Deep Learning
https://udlbook.github.io/udlbook/
Neural networks explained visually and intuitively, from basics to modern architectures.
3. Deep Learning
https://www.deeplearningbook.org/
The definitive deep learning reference, written by the researchers who shaped the field.
4. Introduction to Machine Learning Systems
https://mlsysbook.ai/
How to design and build ML systems that work in production, not just in notebooks.
5. Algorithms for Optimization
https://algorithmsbook.com/optimization/
The math behind how models improve - gradient methods, search, and decision-making.
โณ ๐ฅ๐ฒ๐ถ๐ป๐ณ๐ผ๐ฟ๐ฐ๐ฒ๐บ๐ฒ๐ป๐ ๐๐ฒ๐ฎ๐ฟ๐ป๐ถ๐ป๐ด
6. Reinforcement Learning: An Introduction
http://incompleteideas.net/book/the-book.html
T
Machine Learning Systems
*Now, Letโs move to next topic of cybersecurity roadmap๐*
*๐ฅ Cross-Site Scripting XSS*
Cross-Site Scripting XSS is a web vulnerability where attackers inject malicious JavaScript code into websites.
๐ The injected script runs inside the victimโs browser.
*This can allow attackers to:*
- Steal cookies ๐ช
- Hijack sessions ๐
- Redirect users
- Deface websites
*๐ง How XSS Happens*
Websites often allow user input:
- Comments
- Search boxes
- Chat messages
- Forms
If input is not properly filtered, attackers may inject scripts ๐
*โ ๏ธ Simple Example*
Suppose a website displays user comments directly.
*Attacker enters:*
<script>alert('Hacked')</script>
If the website displays it without sanitizing:
๐ The script executes in usersโ browsers ๐ฅ
*๐ฏ Real-Life Impact*
Attackers can use XSS to:
- Steal authentication cookies
- Impersonate users
- Capture keystrokes
- Deliver malware
*๐ฅ Types of XSS*
*Type* : Description
*Stored XSS* : Script saved permanently in DB
*Reflected XSS* : Script reflected via URL/request
*DOM-Based XSS* : Happens inside browser DOM
*โ ๏ธ Stored XSS Example*
Attacker posts malicious comment ๐
<script>malicious code</script>
Every user viewing the comment executes the script.
๐ Very dangerous ๐ฅ
*โ ๏ธ Reflected XSS Example*
Malicious payload embedded in URL:
example.com/search?q=<script>
Victim clicks crafted link โ script executes
*๐ก๏ธ How Websites Prevent XSS*
*โ Input Sanitization*
Remove dangerous code
*โ Output Encoding*
Display special characters safely
*โ Content Security Policy CSP*
Restrict script execution
*โ HttpOnly Cookies*
Prevent JavaScript from reading cookies
*๐ฏ Real-Life Cybersecurity Usage*
Ethical hackers test websites for XSS because it can lead to:
- Account takeover
- Session hijacking
- Sensitive data theft
*๐ฅ XSS vs SQL Injection*
*XSS* : Targets browser : Uses JavaScript : Affects users
*SQL Injection* : Targets database : Uses SQL : Affects backend DB
*๐ Quick Task*
1. Learn basic HTML + JavaScript concepts
2. Understand why websites sanitize input
3. Observe comment sections carefully on websites
*โ ๏ธ Important Ethical Note*
Only practice XSS in:
- Labs
- CTF platforms
- Authorized testing environments
Never attack real websites without permission.
*๐ฅ Pro Tip*
If you understand:
โ HTML
โ JavaScript
โ HTTP requests
โ Cookies & Sessions
then XSS becomes much easier to master ๐ฅ
*Double Tap โค๏ธ For More*
*๐ฅ Cross-Site Scripting XSS*
Cross-Site Scripting XSS is a web vulnerability where attackers inject malicious JavaScript code into websites.
๐ The injected script runs inside the victimโs browser.
*This can allow attackers to:*
- Steal cookies ๐ช
- Hijack sessions ๐
- Redirect users
- Deface websites
*๐ง How XSS Happens*
Websites often allow user input:
- Comments
- Search boxes
- Chat messages
- Forms
If input is not properly filtered, attackers may inject scripts ๐
*โ ๏ธ Simple Example*
Suppose a website displays user comments directly.
*Attacker enters:*
<script>alert('Hacked')</script>
If the website displays it without sanitizing:
๐ The script executes in usersโ browsers ๐ฅ
*๐ฏ Real-Life Impact*
Attackers can use XSS to:
- Steal authentication cookies
- Impersonate users
- Capture keystrokes
- Deliver malware
*๐ฅ Types of XSS*
*Type* : Description
*Stored XSS* : Script saved permanently in DB
*Reflected XSS* : Script reflected via URL/request
*DOM-Based XSS* : Happens inside browser DOM
*โ ๏ธ Stored XSS Example*
Attacker posts malicious comment ๐
<script>malicious code</script>
Every user viewing the comment executes the script.
๐ Very dangerous ๐ฅ
*โ ๏ธ Reflected XSS Example*
Malicious payload embedded in URL:
example.com/search?q=<script>
Victim clicks crafted link โ script executes
*๐ก๏ธ How Websites Prevent XSS*
*โ Input Sanitization*
Remove dangerous code
*โ Output Encoding*
Display special characters safely
*โ Content Security Policy CSP*
Restrict script execution
*โ HttpOnly Cookies*
Prevent JavaScript from reading cookies
*๐ฏ Real-Life Cybersecurity Usage*
Ethical hackers test websites for XSS because it can lead to:
- Account takeover
- Session hijacking
- Sensitive data theft
*๐ฅ XSS vs SQL Injection*
*XSS* : Targets browser : Uses JavaScript : Affects users
*SQL Injection* : Targets database : Uses SQL : Affects backend DB
*๐ Quick Task*
1. Learn basic HTML + JavaScript concepts
2. Understand why websites sanitize input
3. Observe comment sections carefully on websites
*โ ๏ธ Important Ethical Note*
Only practice XSS in:
- Labs
- CTF platforms
- Authorized testing environments
Never attack real websites without permission.
*๐ฅ Pro Tip*
If you understand:
โ HTML
โ JavaScript
โ HTTP requests
โ Cookies & Sessions
then XSS becomes much easier to master ๐ฅ
*Double Tap โค๏ธ For More*
*Now, Letโs move to next topic of cybersecurity roadmap๐*
*๐ SQL Injection*
SQL Injection SQLi is one of the most famous web attacks in cybersecurity ๐ฅ
It happens when a website improperly handles user input and directly sends it to a database query.
*๐ Attackers can manipulate queries to:*
- Bypass login systems
- Read sensitive data
- Modify databases
- Delete information
*๐ง How Websites Normally Work*
A website sends SQL queries to a database.
*Example query:*
SELECT * FROM users WHERE username='admin' AND password='1234';
๐ If username/password match โ login successful
*โ ๏ธ Where the Problem Happens*
If developers directly trust user input ๐
An attacker can inject malicious SQL code.
*๐ฅ Simple SQL Injection Example*
Suppose login form asks:
- Username
- Password
*Attacker enters:*
' OR '1'='1
*The query may become:*
SELECT * FROM users WHERE username='' OR '1'='1';
๐ Since 1=1 is always true, authentication may bypass ๐ฅ
*๐ฏ Real-Life Impact*
SQL Injection can allow attackers to:
- Steal user accounts
- Access banking data
- Dump entire databases
- Delete records
๐ Many famous breaches happened due to SQL Injection
*โ ๏ธ Types of SQL Injection*
*Type* : Description
*Login Bypass* : Skip authentication
*UNION Injection* : Extract extra data
*Blind SQLi* : Infer data indirectly
*Error-Based SQLi* : Use DB errors to leak info
*๐ก๏ธ How Developers Prevent SQL Injection*
*โ Prepared Statements / Parameterized Queries*
Safely separates code from user input
*โ Input Validation*
Reject suspicious input
*โ Least Privilege*
Database accounts should have minimal permissions
*๐ฅ Real-World Example*
*Bad practice โ*
SELECT * FROM users WHERE username='$input';
*Safer approach โ *
Uses parameterized queries instead of directly injecting user input.
*๐ง Cybersecurity Importance*
SQL Injection is heavily used in:
- Ethical hacking
- Penetration testing
- Bug bounty hunting
๐ Understanding SQL itself helps massively here ๐ฅ
*๐ Quick Task*
1. Learn these SQL basics:
- SELECT
- WHERE
- OR condition
2. Understand why user input must never be trusted directly
*โ ๏ธ Important Ethical Note*
Only practice SQL Injection in:
- Labs
- CTFs
- Authorized environments
Never test on real systems without permission.
*๐ฅ Pro Tip*
If you understand:
โ SQL
โ HTTP requests
โ Databases
then SQL Injection becomes much easier to understand.
*Double Tap โค๏ธ For More*
*๐ SQL Injection*
SQL Injection SQLi is one of the most famous web attacks in cybersecurity ๐ฅ
It happens when a website improperly handles user input and directly sends it to a database query.
*๐ Attackers can manipulate queries to:*
- Bypass login systems
- Read sensitive data
- Modify databases
- Delete information
*๐ง How Websites Normally Work*
A website sends SQL queries to a database.
*Example query:*
SELECT * FROM users WHERE username='admin' AND password='1234';
๐ If username/password match โ login successful
*โ ๏ธ Where the Problem Happens*
If developers directly trust user input ๐
An attacker can inject malicious SQL code.
*๐ฅ Simple SQL Injection Example*
Suppose login form asks:
- Username
- Password
*Attacker enters:*
' OR '1'='1
*The query may become:*
SELECT * FROM users WHERE username='' OR '1'='1';
๐ Since 1=1 is always true, authentication may bypass ๐ฅ
*๐ฏ Real-Life Impact*
SQL Injection can allow attackers to:
- Steal user accounts
- Access banking data
- Dump entire databases
- Delete records
๐ Many famous breaches happened due to SQL Injection
*โ ๏ธ Types of SQL Injection*
*Type* : Description
*Login Bypass* : Skip authentication
*UNION Injection* : Extract extra data
*Blind SQLi* : Infer data indirectly
*Error-Based SQLi* : Use DB errors to leak info
*๐ก๏ธ How Developers Prevent SQL Injection*
*โ Prepared Statements / Parameterized Queries*
Safely separates code from user input
*โ Input Validation*
Reject suspicious input
*โ Least Privilege*
Database accounts should have minimal permissions
*๐ฅ Real-World Example*
*Bad practice โ*
SELECT * FROM users WHERE username='$input';
*Safer approach โ *
Uses parameterized queries instead of directly injecting user input.
*๐ง Cybersecurity Importance*
SQL Injection is heavily used in:
- Ethical hacking
- Penetration testing
- Bug bounty hunting
๐ Understanding SQL itself helps massively here ๐ฅ
*๐ Quick Task*
1. Learn these SQL basics:
- SELECT
- WHERE
- OR condition
2. Understand why user input must never be trusted directly
*โ ๏ธ Important Ethical Note*
Only practice SQL Injection in:
- Labs
- CTFs
- Authorized environments
Never test on real systems without permission.
*๐ฅ Pro Tip*
If you understand:
โ SQL
โ HTTP requests
โ Databases
then SQL Injection becomes much easier to understand.
*Double Tap โค๏ธ For More*
Media is too big
VIEW IN TELEGRAM
Responsive design is more important than ever as we want to ensure that our website looks awesome on all devices. With Flexbox we can make our Elements more dynamic, so let's find out how this works in this tutorial!
Please open Telegram to view this post
VIEW IN TELEGRAM