-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `ashlya_academy`
--

-- --------------------------------------------------------

--
-- Table structure for table `achievements`
--

CREATE TABLE `achievements` (
  `id` int(100) NOT NULL,
  `title` varchar(1000) NOT NULL,
  `icon` varchar(1000) NOT NULL,
  `uid` int(100) NOT NULL,
  `issued_date` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `achievements`
--

INSERT INTO `achievements` (`id`, `title`, `icon`, `uid`, `issued_date`) VALUES
(1, 'Coding Champain', 'https://cdn-icons-png.freepik.com/256/7245/7245951.png?ga=GA1.1.1308848927.1732875625&semt=ais_hybrid', 60, '2081'),
(2, 'Coding Champain', 'https://cdn-icons-png.freepik.com/256/7245/7245951.png?ga=GA1.1.1308848927.1732875625&semt=ais_hybrid', 60, '2081'),
(3, 'Coding Champain', 'https://cdn-icons-png.freepik.com/256/2436/2436888.png', 60, '2081');

-- --------------------------------------------------------

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (
  `id` int(11) NOT NULL,
  `public_id` varchar(50) DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `email` varchar(70) NOT NULL,
  `password` varchar(80) NOT NULL,
  `role` varchar(50) NOT NULL DEFAULT 'teacher'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`id`, `public_id`, `name`, `email`, `password`, `role`) VALUES
(1, 'bishal', 'Bishal Regmi', 'regmibishal964@gmail.com', 'bishal', 'superadmin'),
(2, 'Akshiv', 'Akshiv Yadav', 'akshivyadav@gmail.com', 'akshiv@123', 'superadmin'),
(4, '47538afe-7e47-4df8-ac75-f5a90a09bf50', 'nawin', 'nawin@gmail.com', 'scrypt:32768:8:1$Anzag73LvYWxcOf2$1701d492da6f449d8810be46d7b255eb1e9aa2b71f26e5', 'teacher');

-- --------------------------------------------------------

--
-- Table structure for table `ai_chat_analytics`
--

CREATE TABLE `ai_chat_analytics` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `session_id` int(11) NOT NULL,
  `interaction_type` varchar(100) NOT NULL,
  `language_used` varchar(10) DEFAULT 'en-US',
  `voice_used` varchar(50) DEFAULT NULL,
  `success` tinyint(1) DEFAULT 1,
  `error_message` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `ai_chat_analytics`
--

INSERT INTO `ai_chat_analytics` (`id`, `user_id`, `session_id`, `interaction_type`, `language_used`, `voice_used`, `success`, `error_message`, `created_at`) VALUES
(3, 60, 9, 'text_query', 'en-US', 'nova', 1, NULL, '2025-08-14 12:23:42'),
(4, 60, 9, 'text_query', 'en-US', 'nova', 1, NULL, '2025-08-14 12:27:39');

-- --------------------------------------------------------

--
-- Table structure for table `ai_chat_favorites`
--

CREATE TABLE `ai_chat_favorites` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `session_id` int(11) NOT NULL,
  `message_id` int(11) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ai_chat_messages`
--

CREATE TABLE `ai_chat_messages` (
  `id` int(11) NOT NULL,
  `session_id` int(11) NOT NULL,
  `message_type` enum('user','assistant','system') NOT NULL,
  `content` text NOT NULL,
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),
  `parent_message_id` int(11) DEFAULT NULL,
  `audio_url` varchar(500) DEFAULT NULL,
  `image_url` varchar(500) DEFAULT NULL,
  `tokens_used` int(11) DEFAULT 0,
  `processing_time` float DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `ai_chat_messages`
--

INSERT INTO `ai_chat_messages` (`id`, `session_id`, `message_type`, `content`, `metadata`, `parent_message_id`, `audio_url`, `image_url`, `tokens_used`, `processing_time`, `created_at`) VALUES
(8, 4, 'user', 'What are the key components of blockchain technology?', '{}', NULL, NULL, NULL, 0, 0, '2025-08-12 03:34:02'),
(9, 5, 'user', 'Explain the difference between REST and GraphQL APIs', '{}', NULL, NULL, NULL, 0, 0, '2025-08-12 03:39:12'),
(10, 6, 'user', 'How can I improve my study habits for better retention?', '{}', NULL, NULL, NULL, 0, 0, '2025-08-12 03:40:50'),
(11, 6, 'user', 'hi', '{}', NULL, NULL, NULL, 0, 0, '2025-08-12 04:35:49'),
(12, 7, 'user', 'How can I improve my study habits for better retention?', '{}', NULL, NULL, NULL, 0, 0, '2025-08-12 04:36:30'),
(13, 8, 'user', 'Explain the concept of machine learning in simple terms', '{}', NULL, NULL, NULL, 0, 0, '2025-08-14 05:51:35'),
(14, 9, 'user', 'Explain me this image', '{}', NULL, NULL, NULL, 0, 0, '2025-08-14 12:21:09'),
(15, 10, 'user', 'Explain me this image', '{}', NULL, NULL, NULL, 0, 0, '2025-08-14 12:22:50'),
(16, 9, 'assistant', 'This image shows a part of a student record sheet from **Bright Star Public Secondary School**. The sheet is organized into columns with each row representing individual student information. The columns include:\n\n- **Registration Number** (`RegistrationNo`)\n- **Symbol Number** (`SymbolNo`)\n- **Alpha Grade** (`Alpha`)\n- **Student Name** (`StudentName`)\n\n### Sample Data (from the image):\n\n| Registration No | Symbol No | Alpha | Student Name                   |\n|-------------------|------------|--------|--------------------------------|\n| 731570001         | 7309358    | D      | AAYUSH DHUNGAL                |\n| 731570002         | 7309359    | E      | ARUN CHANDRA JOSHI            |\n| 731570003         | 7309360    | F      | BHAWANA BIST                  |\n| 731570004         | 7309361    | G      | BIBEK AYER                    |\n| 731570005         | 7309362    | H      | JIBAN BIST                    |\n| 731570006         | 7309363    | I      | JONU BIST                     |\n| 731570007         | 7309364    | J      | KAMAL RAJ BHATTA              |\n| 731570008         | 7309365    | K      | KUSHAL BAHADUR MAHARA         |\n\nThis data likely corresponds to student seats, grades, and names, useful for administrative, academic record-keeping or student management purposes.', '{\"language\": \"en-US\", \"voice\": \"nova\"}', NULL, 'http://127.0.0.1:30015/api/audio_generation/audio/tts_en-US_20250814_180816_8621bd9c.wav?api_key=1x345^4^9s8^X', NULL, 0, 0, '2025-08-14 12:23:42'),
(17, 9, 'user', 'Tell me more about this topic', '{}', NULL, 'http://127.0.0.1:30015/api/audio_generation/audio/tts_en-US_20250814_180816_8621bd9c.wav?api_key=1x345^4^9s8^X', 'http://127.0.0.1:30015/api/audio_generation/image/20250814_180858_This_image_shows_a_p_6d16435d.jpg', 0, 0, '2025-08-14 12:26:54'),
(18, 9, 'assistant', 'Certainly! The image shows a part of a student list from **Bright star public secondary school**. The list appears to be a table with the following columns:\n\n1. **Registration No**: Unique registration numbers assigned to each student.\n2. **Symbol No**: An alternative student identification number, possibly a symbol or code.\n3. **Alpha**: A single letter, possibly representing a category or group.\n4. **Student Name**: The full name of each student.\n\nThe list contains 17 students, with details like:\n\n- **AAYUSH DHUNGAL** with registration number 731570001 and symbol number 7309358, associated with the letter **D**.\n- **ARUN CHANDRA JOSHI** with registration number 731570002, symbol number 7309359, and letter **E**.\n- And so on, with each student having their own respective details.\n\nThis type of list is typically used for administrative purposes, such as attendance, grading, or record-keeping within the school.', '{\"language\": \"en-US\", \"voice\": \"nova\"}', NULL, 'http://127.0.0.1:30015/api/audio_generation/audio/tts_en-US_20250814_181218_df08861c.wav?api_key=1x345^4^9s8^X', 'http://127.0.0.1:30015/api/audio_generation/image/20250814_180858_This_image_shows_a_p_6d16435d.jpg', 0, 0, '2025-08-14 12:27:38'),
(19, 11, 'user', 'explain me this image in emotional way', '{}', NULL, NULL, NULL, 0, 0, '2025-08-14 12:39:51'),
(20, 12, 'user', 'Explain the concept of machine learning in simple terms', '{}', NULL, NULL, NULL, 0, 0, '2025-08-30 04:23:15');

-- --------------------------------------------------------

--
-- Table structure for table `ai_chat_search_index`
--

CREATE TABLE `ai_chat_search_index` (
  `id` int(11) NOT NULL,
  `session_id` int(11) NOT NULL,
  `message_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `searchable_content` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `ai_chat_search_index`
--

INSERT INTO `ai_chat_search_index` (`id`, `session_id`, `message_id`, `user_id`, `searchable_content`, `created_at`) VALUES
(8, 4, 8, 60, 'What are the key components of blockchain technology?', '2025-08-12 03:34:02'),
(9, 5, 9, 60, 'Explain the difference between REST and GraphQL APIs', '2025-08-12 03:39:12'),
(10, 6, 10, 60, 'How can I improve my study habits for better retention?', '2025-08-12 03:40:50'),
(11, 6, 11, 60, 'hi', '2025-08-12 04:35:49'),
(12, 7, 12, 60, 'How can I improve my study habits for better retention?', '2025-08-12 04:36:30'),
(13, 8, 13, 60, 'Explain the concept of machine learning in simple terms', '2025-08-14 05:51:35'),
(14, 9, 14, 60, 'Explain me this image', '2025-08-14 12:21:09'),
(15, 10, 15, 60, 'Explain me this image', '2025-08-14 12:22:50'),
(16, 9, 16, 60, 'This image shows a part of a student record sheet from **Bright Star Public Secondary School**. The sheet is organized into columns with each row representing individual student information. The columns include:\n\n- **Registration Number** (`RegistrationNo`)\n- **Symbol Number** (`SymbolNo`)\n- **Alpha Grade** (`Alpha`)\n- **Student Name** (`StudentName`)\n\n### Sample Data (from the image):\n\n| Registration No | Symbol No | Alpha | Student Name                   |\n|-------------------|------------|--------|--------------------------------|\n| 731570001         | 7309358    | D      | AAYUSH DHUNGAL                |\n| 731570002         | 7309359    | E      | ARUN CHANDRA JOSHI            |\n| 731570003         | 7309360    | F      | BHAWANA BIST                  |\n| 731570004         | 7309361    | G      | BIBEK AYER                    |\n| 731570005         | 7309362    | H      | JIBAN BIST                    |\n| 731570006         | 7309363    | I      | JONU BIST                     |\n| 731570007         | 7309364    | J      | KAMAL RAJ BHATTA              |\n| 731570008         | 7309365    | K      | KUSHAL BAHADUR MAHARA         |\n\nThis data likely corresponds to student seats, grades, and names, useful for administrative, academic record-keeping or student management purposes.', '2025-08-14 12:23:42'),
(17, 9, 17, 60, 'Tell me more about this topic', '2025-08-14 12:26:54'),
(18, 9, 18, 60, 'Certainly! The image shows a part of a student list from **Bright star public secondary school**. The list appears to be a table with the following columns:\n\n1. **Registration No**: Unique registration numbers assigned to each student.\n2. **Symbol No**: An alternative student identification number, possibly a symbol or code.\n3. **Alpha**: A single letter, possibly representing a category or group.\n4. **Student Name**: The full name of each student.\n\nThe list contains 17 students, with details like:\n\n- **AAYUSH DHUNGAL** with registration number 731570001 and symbol number 7309358, associated with the letter **D**.\n- **ARUN CHANDRA JOSHI** with registration number 731570002, symbol number 7309359, and letter **E**.\n- And so on, with each student having their own respective details.\n\nThis type of list is typically used for administrative purposes, such as attendance, grading, or record-keeping within the school.', '2025-08-14 12:27:38'),
(19, 11, 19, 60, 'explain me this image in emotional way', '2025-08-14 12:39:51'),
(20, 12, 20, 60, 'Explain the concept of machine learning in simple terms', '2025-08-30 04:23:16');

-- --------------------------------------------------------

--
-- Table structure for table `ai_chat_sessions`
--

CREATE TABLE `ai_chat_sessions` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `session_title` varchar(255) DEFAULT 'New Chat',
  `session_type` enum('text','multivoice','pdf') DEFAULT 'text',
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `ai_chat_sessions`
--

INSERT INTO `ai_chat_sessions` (`id`, `user_id`, `session_title`, `session_type`, `is_active`, `created_at`, `updated_at`) VALUES
(4, 60, 'What are the key components of blockchain techn...', 'text', 1, '2025-08-12 03:34:02', '2025-08-12 03:34:02'),
(5, 60, 'Explain the difference between REST and GraphQL...', 'text', 1, '2025-08-12 03:39:12', '2025-08-12 03:39:12'),
(6, 60, 'How can I improve my study habits for better re...', 'text', 1, '2025-08-12 03:40:50', '2025-08-12 04:35:49'),
(7, 60, 'How can I improve my study habits for better re...', 'text', 1, '2025-08-12 04:36:30', '2025-08-12 04:36:30'),
(8, 60, 'Explain the concept of machine learning in simp...', 'text', 1, '2025-08-14 05:51:35', '2025-08-14 05:51:35'),
(9, 60, 'Explain me this image', 'text', 1, '2025-08-14 12:21:09', '2025-08-14 12:27:38'),
(10, 60, 'Explain me this image', 'text', 1, '2025-08-14 12:22:50', '2025-08-14 12:22:50'),
(11, 60, 'explain me this image in emotional way', 'text', 1, '2025-08-14 12:39:51', '2025-08-14 12:39:51'),
(12, 60, 'Explain the concept of machine learning in simp...', 'text', 1, '2025-08-30 04:23:15', '2025-08-30 04:23:16');

-- --------------------------------------------------------

--
-- Table structure for table `blog_authors`
--

CREATE TABLE `blog_authors` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `bio` text DEFAULT NULL,
  `twitter` varchar(255) DEFAULT NULL,
  `linkedin` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_authors`
--

INSERT INTO `blog_authors` (`id`, `name`, `avatar`, `bio`, `twitter`, `linkedin`, `created_at`) VALUES
(1, 'Rajesh ', '/images/mentors/mentor1.jpg', 'Senior Programming Instructor with over 15 years of experience in software development and teaching programming concepts.', 'https://twitter.com', 'https://linkedin.com', '2025-05-18 12:49:55'),
(2, 'Priya Sharma', '/images/mentors/mentor2.jpg', 'Award-winning designer with expertise in user experience, interface design and product development.', 'https://twitter.com', 'https://linkedin.com', '2025-05-18 12:49:55'),
(3, 'Amit Shrestha', '/images/mentors/mentor5.jpg', 'Full stack developer with expertise in modern JavaScript frameworks and cloud architecture.', 'https://twitter.com', 'https://linkedin.com', '2025-05-18 12:49:55');

-- --------------------------------------------------------

--
-- Table structure for table `blog_categories`
--

CREATE TABLE `blog_categories` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `slug` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_categories`
--

INSERT INTO `blog_categories` (`id`, `name`, `created_at`, `slug`) VALUES
(1, 'All Posts', '2025-05-18 07:04:55', ''),
(2, 'Career Growth', '2025-05-18 07:04:55', ''),
(3, 'Design', '2025-05-18 07:04:55', ''),
(4, 'Education', '2025-05-18 07:04:55', ''),
(5, 'Programming', '2025-05-18 07:04:55', ''),
(6, 'Technology Trends', '2025-05-18 07:04:55', ''),
(7, 'Tutorials', '2025-05-18 07:04:55', ''),
(8, 'nepal', '2025-05-19 08:25:00', 'nepal'),
(9, 'code', '2025-05-22 04:46:27', 'code'),
(10, 'All Posts', '2025-05-22 11:05:52', ''),
(11, 'Programming', '2025-05-22 11:05:52', ''),
(12, 'Design', '2025-05-22 11:05:52', ''),
(13, 'Career Growth', '2025-05-22 11:05:52', ''),
(14, 'Education', '2025-05-22 11:05:52', ''),
(15, 'Technology Trends', '2025-05-22 11:05:52', ''),
(16, 'Tutorials', '2025-05-22 11:05:52', ''),
(17, 'Politics', '2025-05-22 23:20:17', 'politics-20250523105017'),
(18, 'monarchy', '2025-05-22 23:28:38', 'monarchy'),
(19, 'AI', '2025-07-01 17:18:26', 'ai');

-- --------------------------------------------------------

--
-- Table structure for table `blog_comments`
--

CREATE TABLE `blog_comments` (
  `id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `author` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `content` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_comments`
--

INSERT INTO `blog_comments` (`id`, `post_id`, `author`, `email`, `content`, `created_at`) VALUES
(1, 1, 'Jane Smith', 'jane.smith@example.com', 'Great article! This helped me understand the current landscape of web development.', '2025-05-16 18:15:00'),
(2, 1, 'Michael Johnson', 'michael.j@example.com', 'Do you have any recommendations for learning React as a beginner?', '2025-05-15 18:15:00'),
(3, 2, 'David Wilson', 'david.w@example.com', 'These design principles have really improved my approach to frontend development. Thanks!', '2025-05-11 18:15:00'),
(4, 3, 'Sarah Johnson', 'sarah.j@example.com', 'Great tips for job hunters. The section on portfolio building was especially helpful.', '2025-05-13 18:15:00'),
(5, 4, 'Kumar Patel', 'kumar.p@example.com', 'As an educator, I found these insights about AI in education very balanced. We need to embrace the benefits while being mindful of the challenges.', '2025-05-09 18:15:00');

-- --------------------------------------------------------

--
-- Table structure for table `blog_posts`
--

CREATE TABLE `blog_posts` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `excerpt` text NOT NULL,
  `content` longtext NOT NULL,
  `category_id` int(11) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `author_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `read_time` varchar(50) DEFAULT NULL,
  `featured` tinyint(1) DEFAULT 0,
  `views` int(11) DEFAULT 0,
  `likes` int(11) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `slug` varchar(1000) NOT NULL,
  `status` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_posts`
--

INSERT INTO `blog_posts` (`id`, `title`, `excerpt`, `content`, `category_id`, `image`, `author_id`, `date`, `read_time`, `featured`, `views`, `likes`, `created_at`, `updated_at`, `slug`, `status`) VALUES
(1, 'Grade 12 Kinematics Notes', 'Learn the essential skills and technologies needed to become a successful web developer in today\'s competitive market.', '# 📚 Grade 12 Physics: Kinematics\n\n---\n\n## 📖 Table of Contents\n\n1. [Introduction to Kinematics](#introduction-to-kinematics)\n2. [Fundamental Concepts](#fundamental-concepts)\n3. [Motion in One Dimension](#motion-in-one-dimension)\n4. [Equations of Motion](#equations-of-motion)\n5. [Graphical Analysis of Motion](#graphical-analysis-of-motion)\n6. [Free Fall Motion](#free-fall-motion)\n7. [Projectile Motion](#projectile-motion)\n8. [Circular Motion](#circular-motion)\n9. [Relative Motion](#relative-motion)\n10. [Problem-Solving Strategies](#problem-solving-strategies)\n11. [Important Formulas](#important-formulas)\n12. [Practice Problems](#practice-problems)\n\n---\n\n## 🎯 Introduction to Kinematics\n\n**Kinematics** is the branch of mechanics that describes the motion of objects without considering the forces that cause the motion. It deals with the geometric aspects of motion and focuses on:\n\n- **Position** and **displacement**\n- **Velocity** and **acceleration**\n- **Time** relationships\n\n> 💡 **Key Insight:** Kinematics answers the question \"How does an object move?\" but not \"Why does it move?\"\n\n### Learning Objectives\nBy the end of this chapter, you will be able to:\n- Define and distinguish between scalar and vector quantities\n- Analyze motion using equations of motion\n- Interpret motion graphs\n- Solve problems involving projectile motion\n- Understand circular motion concepts\n\n---\n\n## 🔧 Fundamental Concepts\n\n### 1. Scalar vs Vector Quantities\n\n| **Scalar Quantities** | **Vector Quantities** |\n|:---:|:---:|\n| Magnitude only | Magnitude + Direction |\n| Distance | Displacement |\n| Speed | Velocity |\n| Time | Acceleration |\n\n### 2. Position and Displacement\n\n**Position (x):** Location of an object relative to a reference point\n- Measured from origin (0,0)\n- Can be positive or negative\n\n**Displacement (Δx):** Change in position\n```\nΔx = x_final - x_initial = x_f - x_i\n```\n\n> 🔍 **Example:** If a car moves from x = 5m to x = 15m, the displacement is:\n> Δx = 15m - 5m = 10m\n\n### 3. Distance vs Displacement\n\n| **Distance** | **Displacement** |\n|:---:|:---:|\n| Total path length | Straight-line distance |\n| Always positive | Can be positive or negative |\n| Scalar quantity | Vector quantity |\n\n### 4. Speed and Velocity\n\n**Average Speed:**\n```\nv_avg = Total distance / Total time\n```\n\n**Average Velocity:**\n```\nv_avg = Displacement / Time = Δx / Δt\n```\n\n**Instantaneous Velocity:**\n```\nv = dx/dt (derivative of position with respect to time)\n```\n\n### 5. Acceleration\n\n**Average Acceleration:**\n```\na_avg = Change in velocity / Time = Δv / Δt\n```\n\n**Instantaneous Acceleration:**\n```\na = dv/dt = d²x/dt²\n```\n\n---\n\n## 📏 Motion in One Dimension\n\n### Types of Motion\n\n#### 1. Uniform Motion\n- **Constant velocity** (a = 0)\n- Equal displacements in equal time intervals\n- **Equation:** x = x₀ + vt\n\n#### 2. Uniformly Accelerated Motion\n- **Constant acceleration** (a ≠ 0)\n- Velocity changes uniformly with time\n- **Most common type** in physics problems\n\n#### 3. Non-uniform Motion\n- **Variable acceleration** (a changes with time)\n- More complex mathematical treatment required\n\n---\n\n## ⚡ Equations of Motion\n\n### The Four Kinematic Equations\n\nFor motion with **constant acceleration**:\n\n| **Equation** | **Variables** | **Missing Variable** |\n|:---:|:---:|:---:|\n| **v = v₀ + at** | v, v₀, a, t | x |\n| **x = x₀ + v₀t + ½at²** | x, x₀, v₀, a, t | v |\n| **v² = v₀² + 2a(x - x₀)** | v, v₀, a, x, x₀ | t |\n| **x = x₀ + ½(v₀ + v)t** | x, x₀, v₀, v, t | a |\n\n### Variables Definition\n- **x:** final position\n- **x₀:** initial position\n- **v:** final velocity\n- **v₀:** initial velocity\n- **a:** acceleration\n- **t:** time\n\n### 🧮 Derivation of Equations\n\n**Equation 1:** v = v₀ + at\n- From definition: a = (v - v₀)/t\n- Rearranging: v = v₀ + at\n\n**Equation 2:** x = x₀ + v₀t + ½at²\n- From average velocity: v_avg = (v₀ + v)/2\n- Displacement: Δx = v_avg × t\n- Substituting v = v₀ + at: x - x₀ = v₀t + ½at²\n\n**Equation 3:** v² = v₀² + 2a(x - x₀)\n- Eliminate t from equations 1 and 2\n- Mathematical manipulation leads to this form\n\n---\n\n## 📊 Graphical Analysis of Motion\n\n### 1. Position-Time Graphs\n\n#### Uniform Motion\n```\n     x\n     |  /\n     | /\n     |/\n     +------> t\n```\n- **Straight line** with constant slope\n- **Slope = velocity**\n\n#### Uniformly Accelerated Motion\n```\n     x\n     |   /\n     |  /\n     | /\n     |/\n     +------> t\n```\n- **Parabolic curve**\n- **Slope at any point = instantaneous velocity**\n\n### 2. Velocity-Time Graphs\n\n#### Uniform Motion\n```\n     v\n     |----\n     |    \n     |    \n     +------> t\n```\n- **Horizontal line**\n- **Area under curve = displacement**\n\n#### Uniformly Accelerated Motion\n```\n     v\n     |  /\n     | /\n     |/\n     +------> t\n```\n- **Straight line** with constant slope\n- **Slope = acceleration**\n- **Area under curve = displacement**\n\n### 3. Acceleration-Time Graphs\n\n#### Constant Acceleration\n```\n     a\n     |----\n     |    \n     |    \n     +------> t\n```\n- **Horizontal line**\n- **Area under curve = change in velocity**\n\n---\n\n## 🍎 Free Fall Motion\n\n### Characteristics\n- **Acceleration due to gravity:** g = 9.8 m/s² (downward)\n- **Initial velocity:** Can be zero (dropped) or non-zero (thrown)\n- **Air resistance:** Neglected in most problems\n\n### Sign Convention\n- **Upward direction:** Positive (+)\n- **Downward direction:** Negative (-)\n- **Acceleration:** a = -g = -9.8 m/s²\n\n### Equations for Free Fall\n\nTaking **upward as positive**:\n1. **v = v₀ - gt**\n2. **y = y₀ + v₀t - ½gt²**\n3. **v² = v₀² - 2g(y - y₀)**\n\n### 📝 Example Problem\n\n**A ball is thrown upward with initial velocity 20 m/s from height 10 m. Find:**\n1. Maximum height reached\n2. Time to reach maximum height\n3. Total time of flight\n\n**Solution:**\n1. **At maximum height, v = 0**\n   - Using v² = v₀² - 2g(y - y₀)\n   - 0 = (20)² - 2(9.8)(y - 10)\n   - y = 30.4 m\n\n2. **Time to reach maximum height:**\n   - Using v = v₀ - gt\n   - 0 = 20 - 9.8t\n   - t = 2.04 s\n\n3. **Total time of flight:**\n   - Using y = y₀ + v₀t - ½gt²\n   - 0 = 10 + 20t - 4.9t²\n   - Solving: t = 4.49 s\n\n---\n\n## 🎯 Projectile Motion\n\n### Definition\nMotion of an object launched into the air at an angle to the horizontal, subject only to gravitational acceleration.\n\n### Key Characteristics\n- **Two-dimensional motion**\n- **Horizontal velocity remains constant** (no horizontal acceleration)\n- **Vertical motion follows free fall** (acceleration = -g)\n- **Trajectory is parabolic**\n\n### Components of Motion\n\n#### Horizontal Motion\n- **Initial velocity:** v₀ₓ = v₀ cos θ\n- **Acceleration:** aₓ = 0\n- **Equations:**\n  - x = v₀ₓt = v₀ cos θ × t\n  - vₓ = v₀ₓ = constant\n\n#### Vertical Motion\n- **Initial velocity:** v₀ᵧ = v₀ sin θ\n- **Acceleration:** aᵧ = -g\n- **Equations:**\n  - y = v₀ᵧt - ½gt² = v₀ sin θ × t - ½gt²\n  - vᵧ = v₀ᵧ - gt = v₀ sin θ - gt\n\n### Important Formulas\n\n| **Quantity** | **Formula** |\n|:---:|:---:|\n| **Time of flight** | T = (2v₀ sin θ)/g |\n| **Maximum height** | H = (v₀² sin² θ)/(2g) |\n| **Range** | R = (v₀² sin 2θ)/g |\n| **Trajectory equation** | y = x tan θ - (gx²)/(2v₀² cos² θ) |\n\n### 🎯 Maximum Range\n- **Occurs at θ = 45°**\n- **Maximum range:** R_max = v₀²/g\n\n### 📝 Example Problem\n\n**A projectile is launched at 30° with initial speed 50 m/s. Calculate:**\n1. Time of flight\n2. Maximum height\n3. Range\n\n**Solution:**\n1. **Time of flight:**\n   - T = (2 × 50 × sin 30°)/9.8 = 5.1 s\n\n2. **Maximum height:**\n   - H = (50² × sin² 30°)/(2 × 9.8) = 31.9 m\n\n3. **Range:**\n   - R = (50² × sin 60°)/9.8 = 221.3 m\n\n---\n\n## 🔄 Circular Motion\n\n### Uniform Circular Motion\n- **Constant speed** along circular path\n- **Changing velocity** (direction changes)\n- **Centripetal acceleration** toward center\n\n### Key Quantities\n\n#### Angular Displacement (θ)\n- **Measured in radians**\n- **θ = s/r** (arc length/radius)\n\n#### Angular Velocity (ω)\n- **ω = θ/t = 2π/T**\n- **Units:** rad/s\n\n#### Angular Acceleration (α)\n- **α = Δω/Δt**\n- **Units:** rad/s²\n\n### Relationships\n\n| **Linear Quantity** | **Angular Quantity** | **Relationship** |\n|:---:|:---:|:---:|\n| Displacement (s) | Angular displacement (θ) | s = rθ |\n| Velocity (v) | Angular velocity (ω) | v = rω |\n| Acceleration (a) | Angular acceleration (α) | a = rα |\n\n### Centripetal Acceleration\n- **Direction:** Toward center of circle\n- **Magnitude:** aᶜ = v²/r = ω²r = 4π²r/T²\n\n### Period and Frequency\n- **Period (T):** Time for one complete revolution\n- **Frequency (f):** Number of revolutions per second\n- **Relationship:** f = 1/T\n\n---\n\n## 🔄 Relative Motion\n\n### Definition\nMotion of one object as observed from another moving object.\n\n### Key Concepts\n- **Reference frame** matters\n- **Relative velocity** = velocity of object A relative to object B\n\n### One-Dimensional Relative Motion\n\n**Velocity of A relative to B:**\n```\nv_AB = v_A - v_B\n```\n\n**Velocity of B relative to A:**\n```\nv_BA = v_B - v_A = -v_AB\n```\n\n### Two-Dimensional Relative Motion\n\n**Vector form:**\n```\nv⃗_AB = v⃗_A - v⃗_B\n```\n\n### 📝 Example Problem\n\n**Car A moves east at 60 km/h, Car B moves west at 40 km/h. Find relative velocity of A with respect to B.**\n\n**Solution:**\n- Taking east as positive: v_A = +60 km/h, v_B = -40 km/h\n- v_AB = v_A - v_B = 60 - (-40) = 100 km/h east\n\n---\n\n## 🧠 Problem-Solving Strategies\n\n### Step-by-Step Approach\n\n1. **🎯 Identify the Type of Motion**\n   - One-dimensional or two-dimensional?\n   - Constant velocity or constant acceleration?\n   - Free fall or projectile motion?\n\n2. **📝 List Given Information**\n   - Write down all known quantities\n   - Identify what needs to be found\n\n3. **🔍 Choose Appropriate Equations**\n   - Select equations containing known and unknown variables\n   - Ensure units are consistent\n\n4. **🧮 Solve Mathematically**\n   - Substitute values\n   - Pay attention to significant figures\n   - Check for reasonable answers\n\n5. **✅ Verify Your Answer**\n   - Does the answer make physical sense?\n   - Are units correct?\n   - Check order of magnitude\n\n### Common Mistakes to Avoid\n\n❌ **Confusing distance with displacement**\n❌ **Mixing up speed and velocity**\n❌ **Forgetting to consider direction in vectors**\n❌ **Using wrong sign conventions**\n❌ **Not checking units**\n\n---\n\n## 📋 Important Formulas\n\n### Motion with Constant Acceleration\n```\nv = v₀ + at\nx = x₀ + v₀t + ½at²\nv² = v₀² + 2a(x - x₀)\nx = x₀ + ½(v₀ + v)t\n```\n\n### Free Fall Motion\n```\nv = v₀ - gt\ny = y₀ + v₀t - ½gt²\nv² = v₀² - 2g(y - y₀)\n```\n\n### Projectile Motion\n```\nRange: R = (v₀² sin 2θ)/g\nMaximum height: H = (v₀² sin² θ)/(2g)\nTime of flight: T = (2v₀ sin θ)/g\n```\n\n### Circular Motion\n```\nv = rω\naᶜ = v²/r = ω²r\nT = 2π/ω = 2πr/v\nf = 1/T = ω/2π\n```\n\n---\n\n## 🎓 Practice Problems\n\n### Problem 1: One-Dimensional Motion\nA car accelerates from rest at 2 m/s² for 10 seconds, then maintains constant velocity for 5 seconds, then decelerates at -3 m/s² until it stops.\n\n**Find:**\n1. Maximum velocity reached\n2. Total distance traveled\n3. Total time taken\n\n### Problem 2: Free Fall\nA stone is dropped from a cliff 100 m high. One second later, another stone is thrown downward with initial velocity 20 m/s.\n\n**Find:**\n1. Which stone hits the ground first?\n2. Time difference between impacts\n3. Velocities when they hit the ground\n\n### Problem 3: Projectile Motion\nA football is kicked at 25° above horizontal with initial speed 30 m/s from ground level.\n\n**Find:**\n1. Time to reach maximum height\n2. Maximum height reached\n3. Range of the projectile\n4. Velocity when it hits the ground\n\n### Problem 4: Circular Motion\nA wheel of radius 0.5 m rotates at 120 rpm.\n\n**Find:**\n1. Angular velocity in rad/s\n2. Linear velocity of a point on the rim\n3. Centripetal acceleration\n4. Period of rotation\n\n---\n\n## 🎯 Key Takeaways\n\n### Remember These Concepts:\n- **Kinematics** describes motion without considering forces\n- **Vector quantities** have both magnitude and direction\n- **Equations of motion** apply only to constant acceleration\n- **Projectile motion** combines horizontal and vertical motions\n- **Circular motion** involves centripetal acceleration toward center\n- **Relative motion** depends on the reference frame\n\n### Success Tips:\n- 📖 **Master the basics** before moving to complex problems\n- 🎯 **Practice regularly** with varied problem types\n- 📊 **Use graphs** to visualize motion\n- 🧮 **Check units** in all calculations\n- 🔍 **Verify answers** for physical reasonableness\n\n---\n\n## 📚 Additional Resources\n\n### Recommended Study Materials:\n- Physics textbook chapters on mechanics\n- Online simulation tools for motion visualization\n- Practice problem sets with detailed solutions\n- Video lectures on kinematics concepts\n\n### Laboratory Experiments:\n- Motion sensor investigations\n- Projectile motion demonstrations\n- Circular motion measurements\n- Free fall timing experiments\n\n---\n\n*📝 These notes provide a comprehensive foundation for understanding kinematics in Grade 12 Physics. Regular practice and application of these concepts will ensure mastery of this fundamental topic.*\n\n---\n\n**📞 Need Help?**\n- Review worked examples carefully\n- Practice problems step by step\n- Seek clarification on unclear concepts\n- Form study groups for collaborative learning\n\n**🌟 Good luck with your physics studies!**', 1, 'https://userway.org/blog/wp-content/uploads/2024/03/The-404-Page_-How-To-Turn-a-404-Error-Into-a-Win-for-Your-Website.jpg', 1, '2025-05-15', '8 min read', 1, 1284, 87, '2025-05-18 07:04:55', '2025-07-25 22:03:39', 'getting-started-with-web-development-in-2025', 'published'),
(2, 'Grade 12 Maths Antiderivative', 'Discover how understanding basic design principles can make you a better developer and help you create more user-friendly applications.', '# 📚 Grade 12 Mathematics: Antiderivatives (Integration)\n\n---\n\n## 📖 Table of Contents\n\n1. [Introduction to Antiderivatives](#introduction-to-antiderivatives)\n2. [Fundamental Concepts](#fundamental-concepts)\n3. [Basic Integration Rules](#basic-integration-rules)\n4. [Integration Techniques](#integration-techniques)\n5. [Integration by Parts](#integration-by-parts)\n6. [Trigonometric Integration](#trigonometric-integration)\n7. [Integration by Substitution](#integration-by-substitution)\n8. [Partial Fractions](#partial-fractions)\n9. [Definite Integrals](#definite-integrals)\n10. [Applications of Integration](#applications-of-integration)\n11. [Important Formulas](#important-formulas)\n12. [Practice Problems](#practice-problems)\n\n---\n\n## 🎯 Introduction to Antiderivatives\n\n**Antiderivative** (or **Integration**) is the reverse process of differentiation. If we know the derivative of a function, integration helps us find the original function.\n\n> 💡 **Key Insight:** If F\'(x) = f(x), then F(x) is an antiderivative of f(x)\n\n### Relationship with Differentiation\n\n| **Differentiation** | **Integration** |\n|:---:|:---:|\n| d/dx[x²] = 2x | ∫ 2x dx = x² + C |\n| d/dx[sin x] = cos x | ∫ cos x dx = sin x + C |\n| d/dx[eˣ] = eˣ | ∫ eˣ dx = eˣ + C |\n\n### Learning Objectives\nBy the end of this chapter, you will be able to:\n- Understand the concept of antiderivatives\n- Apply basic integration rules\n- Use various integration techniques\n- Evaluate definite integrals\n- Solve real-world applications using integration\n\n---\n\n## 🔧 Fundamental Concepts\n\n### 1. Definition of Antiderivative\n\n**Definition:** A function F(x) is called an **antiderivative** of f(x) if:\n```\nF\'(x) = f(x)\n```\n\n**Notation:**\n- **Indefinite integral:** ∫ f(x) dx = F(x) + C\n- **Definite integral:** ∫ₐᵇ f(x) dx\n\n### 2. The Constant of Integration (C)\n\nSince the derivative of a constant is zero, we must add an arbitrary constant C to indefinite integrals.\n\n**Example:**\n```\n∫ 2x dx = x² + C\n```\n\n**Verification:**\n```\nd/dx[x² + C] = 2x + 0 = 2x ✓\n```\n\n### 3. Properties of Indefinite Integrals\n\n#### Linearity Property\n```\n∫ [af(x) + bg(x)] dx = a∫ f(x) dx + b∫ g(x) dx\n```\n\n#### Constant Multiple Rule\n```\n∫ k·f(x) dx = k∫ f(x) dx\n```\n\n#### Sum/Difference Rule\n```\n∫ [f(x) ± g(x)] dx = ∫ f(x) dx ± ∫ g(x) dx\n```\n\n---\n\n## ⚡ Basic Integration Rules\n\n### 1. Power Rule\n\n**For n ≠ -1:**\n```\n∫ xⁿ dx = (x^(n+1))/(n+1) + C\n```\n\n**Examples:**\n- ∫ x³ dx = x⁴/4 + C\n- ∫ x⁻² dx = ∫ x⁻² dx = -x⁻¹ + C = -1/x + C\n- ∫ √x dx = ∫ x^(1/2) dx = (2/3)x^(3/2) + C\n\n### 2. Special Case: n = -1\n\n```\n∫ x⁻¹ dx = ∫ (1/x) dx = ln|x| + C\n```\n\n### 3. Exponential Functions\n\n```\n∫ eˣ dx = eˣ + C\n∫ aˣ dx = aˣ/ln(a) + C   (a > 0, a ≠ 1)\n```\n\n### 4. Trigonometric Functions\n\n| **Function** | **Antiderivative** |\n|:---:|:---:|\n| ∫ sin x dx | -cos x + C |\n| ∫ cos x dx | sin x + C |\n| ∫ sec² x dx | tan x + C |\n| ∫ csc² x dx | -cot x + C |\n| ∫ sec x tan x dx | sec x + C |\n| ∫ csc x cot x dx | -csc x + C |\n\n### 5. Inverse Trigonometric Functions\n\n| **Function** | **Antiderivative** |\n|:---:|:---:|\n| ∫ 1/√(1-x²) dx | arcsin x + C |\n| ∫ 1/(1+x²) dx | arctan x + C |\n| ∫ 1/(x√(x²-1)) dx | arcsec x + C |\n\n---\n\n## 🛠️ Integration Techniques\n\n### 1. Direct Integration\n\n**Method:** Apply basic integration rules directly.\n\n**Example:**\n```\n∫ (3x² - 2x + 5) dx = 3∫ x² dx - 2∫ x dx + 5∫ dx\n                    = 3(x³/3) - 2(x²/2) + 5x + C\n                    = x³ - x² + 5x + C\n```\n\n### 2. Integration by Substitution (u-substitution)\n\n**When to use:** When the integrand contains a function and its derivative.\n\n**Method:**\n1. Choose u = g(x)\n2. Find du = g\'(x) dx\n3. Substitute to get ∫ f(u) du\n4. Integrate with respect to u\n5. Substitute back u = g(x)\n\n**Example:**\n```\n∫ 2x(x² + 1)⁵ dx\n\nLet u = x² + 1\nThen du = 2x dx\n\n∫ 2x(x² + 1)⁵ dx = ∫ u⁵ du = u⁶/6 + C = (x² + 1)⁶/6 + C\n```\n\n### 3. Integration by Parts\n\n**Formula:** \n```\n∫ u dv = uv - ∫ v du\n```\n\n**LIATE Rule for choosing u:**\n- **L**ogarithmic functions\n- **I**nverse trigonometric functions\n- **A**lgebraic functions\n- **T**rigonometric functions\n- **E**xponential functions\n\n**Example:**\n```\n∫ x ln x dx\n\nLet u = ln x,  dv = x dx\nThen du = (1/x) dx,  v = x²/2\n\n∫ x ln x dx = (ln x)(x²/2) - ∫ (x²/2)(1/x) dx\n            = (x² ln x)/2 - ∫ x/2 dx\n            = (x² ln x)/2 - x²/4 + C\n```\n\n---\n\n## 🔍 Integration by Parts\n\n### When to Use\n- Product of two different types of functions\n- When one function becomes simpler when differentiated\n\n### Strategy Table\n\n| **Type** | **Choose as u** | **Choose as dv** |\n|:---:|:---:|:---:|\n| ∫ x eˣ dx | x | eˣ dx |\n| ∫ x sin x dx | x | sin x dx |\n| ∫ ln x dx | ln x | dx |\n| ∫ x² eˣ dx | x² | eˣ dx |\n\n### 📝 Worked Examples\n\n**Example 1:** ∫ x cos x dx\n```\nLet u = x,  dv = cos x dx\nThen du = dx,  v = sin x\n\n∫ x cos x dx = x sin x - ∫ sin x dx\n             = x sin x - (-cos x) + C\n             = x sin x + cos x + C\n```\n\n**Example 2:** ∫ x² eˣ dx\n```\nLet u = x²,  dv = eˣ dx\nThen du = 2x dx,  v = eˣ\n\n∫ x² eˣ dx = x² eˣ - ∫ eˣ (2x) dx\n           = x² eˣ - 2∫ x eˣ dx\n\nNow integrate ∫ x eˣ dx by parts again:\nLet u = x,  dv = eˣ dx\nThen du = dx,  v = eˣ\n\n∫ x eˣ dx = x eˣ - ∫ eˣ dx = x eˣ - eˣ + C₁\n\nTherefore:\n∫ x² eˣ dx = x² eˣ - 2(x eˣ - eˣ) + C\n           = x² eˣ - 2x eˣ + 2eˣ + C\n           = eˣ(x² - 2x + 2) + C\n```\n\n---\n\n## 📐 Trigonometric Integration\n\n### 1. Powers of Sine and Cosine\n\n#### Case 1: ∫ sinⁿ x cosᵐ x dx (n or m odd)\n**Method:** Use substitution with the odd power.\n\n**Example:** ∫ sin³ x cos² x dx\n```\n∫ sin³ x cos² x dx = ∫ sin² x cos² x sin x dx\n                   = ∫ (1 - cos² x) cos² x sin x dx\n\nLet u = cos x, then du = -sin x dx\n\n= -∫ (1 - u²) u² du = -∫ (u² - u⁴) du\n= -(u³/3 - u⁵/5) + C\n= -cos³ x/3 + cos⁵ x/5 + C\n```\n\n#### Case 2: ∫ sinⁿ x cosᵐ x dx (both n and m even)\n**Method:** Use half-angle formulas.\n\n**Half-angle formulas:**\n- sin² x = (1 - cos 2x)/2\n- cos² x = (1 + cos 2x)/2\n\n### 2. Tangent and Secant Integrals\n\n| **Integral** | **Method** | **Result** |\n|:---:|:---:|:---:|\n| ∫ tan x dx | ∫ (sin x)/(cos x) dx, u = cos x | -ln\\|cos x\\| + C |\n| ∫ sec x dx | Multiply by (sec x + tan x)/(sec x + tan x) | ln\\|sec x + tan x\\| + C |\n| ∫ tanⁿ x dx | Use tan² x = sec² x - 1 | Various forms |\n\n---\n\n## 🔄 Integration by Substitution\n\n### Types of Substitution\n\n#### 1. Direct Substitution\n**When:** Integrand contains f(g(x))·g\'(x)\n\n**Example:** ∫ (2x + 3)⁵ dx\n```\nLet u = 2x + 3, then du = 2 dx, so dx = du/2\n\n∫ (2x + 3)⁵ dx = ∫ u⁵ (du/2) = (1/2)∫ u⁵ du\n                = (1/2)(u⁶/6) + C = u⁶/12 + C\n                = (2x + 3)⁶/12 + C\n```\n\n#### 2. Trigonometric Substitution\n**For expressions involving:**\n\n| **Expression** | **Substitution** | **Identity** |\n|:---:|:---:|:---:|\n| √(a² - x²) | x = a sin θ | sin² θ + cos² θ = 1 |\n| √(a² + x²) | x = a tan θ | 1 + tan² θ = sec² θ |\n| √(x² - a²) | x = a sec θ | sec² θ - 1 = tan² θ |\n\n**Example:** ∫ 1/√(4 - x²) dx\n```\nLet x = 2 sin θ, then dx = 2 cos θ dθ\n√(4 - x²) = √(4 - 4sin² θ) = 2√(1 - sin² θ) = 2 cos θ\n\n∫ 1/√(4 - x²) dx = ∫ 1/(2 cos θ) · 2 cos θ dθ\n                  = ∫ dθ = θ + C\n                  = arcsin(x/2) + C\n```\n\n---\n\n## 🧩 Partial Fractions\n\n### When to Use\nFor rational functions where degree of numerator < degree of denominator.\n\n### Types of Partial Fractions\n\n#### Case 1: Linear Factors\n```\nP(x)/[(x-a)(x-b)] = A/(x-a) + B/(x-b)\n```\n\n#### Case 2: Repeated Linear Factors\n```\nP(x)/(x-a)ⁿ = A₁/(x-a) + A₂/(x-a)² + ... + Aₙ/(x-a)ⁿ\n```\n\n#### Case 3: Quadratic Factors\n```\nP(x)/[(x-a)(x²+bx+c)] = A/(x-a) + (Bx+C)/(x²+bx+c)\n```\n\n### 📝 Worked Example\n\n**Example:** ∫ (2x + 1)/[(x - 1)(x + 2)] dx\n\n**Step 1:** Set up partial fractions\n```\n(2x + 1)/[(x - 1)(x + 2)] = A/(x - 1) + B/(x + 2)\n```\n\n**Step 2:** Clear denominators\n```\n2x + 1 = A(x + 2) + B(x - 1)\n```\n\n**Step 3:** Solve for A and B\n```\nLet x = 1: 2(1) + 1 = A(3) + B(0) → A = 1\nLet x = -2: 2(-2) + 1 = A(0) + B(-3) → B = 1\n```\n\n**Step 4:** Integrate\n```\n∫ (2x + 1)/[(x - 1)(x + 2)] dx = ∫ [1/(x - 1) + 1/(x + 2)] dx\n                                = ln|x - 1| + ln|x + 2| + C\n                                = ln|(x - 1)(x + 2)| + C\n```\n\n---\n\n## 📏 Definite Integrals\n\n### Definition\n```\n∫ₐᵇ f(x) dx = F(b) - F(a)\n```\nwhere F(x) is any antiderivative of f(x).\n\n### Fundamental Theorem of Calculus\n\n**Part 1:** If f is continuous on [a,b], then:\n```\nd/dx[∫ₐˣ f(t) dt] = f(x)\n```\n\n**Part 2:** If f is continuous on [a,b] and F is an antiderivative of f, then:\n```\n∫ₐᵇ f(x) dx = F(b) - F(a)\n```\n\n### Properties of Definite Integrals\n\n1. **∫ₐᵃ f(x) dx = 0**\n\n2. **∫ₐᵇ f(x) dx = -∫ᵇₐ f(x) dx**\n\n3. **∫ₐᵇ f(x) dx + ∫ᵇᶜ f(x) dx = ∫ₐᶜ f(x) dx**\n\n4. **∫ₐᵇ [f(x) ± g(x)] dx = ∫ₐᵇ f(x) dx ± ∫ₐᵇ g(x) dx**\n\n5. **∫ₐᵇ k·f(x) dx = k∫ₐᵇ f(x) dx**\n\n### 📝 Worked Examples\n\n**Example 1:** ∫₀² (x² + 1) dx\n```\n∫₀² (x² + 1) dx = [x³/3 + x]₀²\n                = (8/3 + 2) - (0/3 + 0)\n                = 8/3 + 2 = 14/3\n```\n\n**Example 2:** ∫₀^(π/2) sin x dx\n```\n∫₀^(π/2) sin x dx = [-cos x]₀^(π/2)\n                   = -cos(π/2) - (-cos(0))\n                   = -0 + 1 = 1\n```\n\n---\n\n## 📊 Applications of Integration\n\n### 1. Area Under a Curve\n\n**Area between f(x) and x-axis from x = a to x = b:**\n```\nA = ∫ₐᵇ |f(x)| dx\n```\n\n**Area between two curves f(x) and g(x):**\n```\nA = ∫ₐᵇ |f(x) - g(x)| dx\n```\n\n### 2. Volume of Revolution\n\n#### Disk Method (rotation about x-axis)\n```\nV = π∫ₐᵇ [f(x)]² dx\n```\n\n#### Washer Method (rotation about x-axis)\n```\nV = π∫ₐᵇ [R(x)]² - [r(x)]² dx\n```\n\n#### Shell Method (rotation about y-axis)\n```\nV = 2π∫ₐᵇ x·f(x) dx\n```\n\n### 3. Arc Length\n\n**Arc length of y = f(x) from x = a to x = b:**\n```\nL = ∫ₐᵇ √(1 + [f\'(x)]²) dx\n```\n\n### 4. Average Value\n\n**Average value of f(x) over [a,b]:**\n```\nf̄ = (1/(b-a))∫ₐᵇ f(x) dx\n```\n\n### 📝 Application Example\n\n**Example:** Find the area between y = x² and y = 2x from x = 0 to x = 2.\n\n**Solution:**\n```\nFirst, find intersection points:\nx² = 2x → x² - 2x = 0 → x(x - 2) = 0\nSo x = 0 and x = 2\n\nFor 0 ≤ x ≤ 2: 2x ≥ x² (since 2x - x² = x(2 - x) ≥ 0)\n\nArea = ∫₀² (2x - x²) dx\n     = [x² - x³/3]₀²\n     = (4 - 8/3) - (0 - 0)\n     = 12/3 - 8/3 = 4/3\n```\n\n---\n\n## 📋 Important Formulas\n\n### Basic Integration Rules\n```\n∫ xⁿ dx = x^(n+1)/(n+1) + C  (n ≠ -1)\n∫ 1/x dx = ln|x| + C\n∫ eˣ dx = eˣ + C\n∫ aˣ dx = aˣ/ln(a) + C\n```\n\n### Trigonometric Integrals\n```\n∫ sin x dx = -cos x + C\n∫ cos x dx = sin x + C\n∫ tan x dx = -ln|cos x| + C\n∫ sec x dx = ln|sec x + tan x| + C\n∫ sec² x dx = tan x + C\n∫ csc² x dx = -cot x + C\n```\n\n### Inverse Trigonometric Integrals\n```\n∫ 1/√(1-x²) dx = arcsin x + C\n∫ 1/(1+x²) dx = arctan x + C\n∫ 1/(x√(x²-1)) dx = arcsec x + C\n```\n\n### Integration by Parts\n```\n∫ u dv = uv - ∫ v du\n```\n\n### Fundamental Theorem of Calculus\n```\n∫ₐᵇ f(x) dx = F(b) - F(a)\n```\n\n---\n\n## 🎓 Practice Problems\n\n### Problem 1: Basic Integration\nEvaluate the following integrals:\n1. ∫ (3x² - 2x + 1) dx\n2. ∫ (√x + 1/x²) dx\n3. ∫ (e^(2x) + sin x) dx\n\n### Problem 2: Substitution\nEvaluate:\n1. ∫ x(x² + 1)³ dx\n2. ∫ (2x + 1)√(x² + x + 1) dx\n3. ∫ sin³ x cos x dx\n\n### Problem 3: Integration by Parts\nEvaluate:\n1. ∫ x eˣ dx\n2. ∫ x ln x dx\n3. ∫ x² sin x dx\n\n### Problem 4: Trigonometric Integration\nEvaluate:\n1. ∫ sin² x dx\n2. ∫ tan³ x dx\n3. ∫ sin x cos³ x dx\n\n### Problem 5: Partial Fractions\nEvaluate:\n1. ∫ (x + 1)/[(x - 1)(x + 2)] dx\n2. ∫ (2x + 3)/(x² + 3x + 2) dx\n\n### Problem 6: Definite Integrals\nEvaluate:\n1. ∫₀¹ (x² + 2x) dx\n2. ∫₀^(π/2) sin x cos x dx\n3. ∫₁² (1/x + eˣ) dx\n\n### Problem 7: Applications\n1. Find the area between y = x² and y = 4 from x = 0 to x = 2\n2. Find the volume when y = √x is rotated about the x-axis from x = 0 to x = 4\n3. Find the average value of f(x) = x² over [0, 3]\n\n---\n\n## 🧠 Problem-Solving Strategies\n\n### General Approach\n\n1. **🎯 Identify the Type of Integral**\n   - Basic polynomial?\n   - Trigonometric function?\n   - Product of functions?\n   - Rational function?\n\n2. **📝 Choose the Appropriate Method**\n   - Direct integration\n   - Substitution\n   - Integration by parts\n   - Partial fractions\n   - Trigonometric substitution\n\n3. **🔍 Apply the Technique**\n   - Follow the method step-by-step\n   - Be careful with algebra\n   - Don\'t forget the constant of integration\n\n4. **✅ Verify Your Answer**\n   - Differentiate your result\n   - Check if you get the original integrand\n   - Verify definite integral bounds\n\n### Method Selection Guide\n\n| **Integrand Type** | **Method** | **Example** |\n|:---:|:---:|:---:|\n| Polynomial | Direct | ∫ x³ dx |\n| f(g(x))·g\'(x) | Substitution | ∫ 2x(x²+1)³ dx |\n| Product of different types | Integration by parts | ∫ x eˣ dx |\n| Rational function | Partial fractions | ∫ 1/(x²-1) dx |\n| √(a²-x²), etc. | Trigonometric substitution | ∫ 1/√(1-x²) dx |\n\n### Common Mistakes to Avoid\n\n❌ **Forgetting the constant of integration**\n❌ **Incorrect application of integration by parts**\n❌ **Wrong substitution choice**\n❌ **Algebraic errors in partial fractions**\n❌ **Incorrect evaluation of definite integrals**\n\n---\n\n## 🎯 Key Takeaways\n\n### Remember These Concepts:\n- **Integration** is the reverse of differentiation\n- **Constant of integration** is essential for indefinite integrals\n- **Substitution** works when you can identify u and du\n- **Integration by parts** follows the LIATE rule\n- **Partial fractions** decompose rational functions\n- **Definite integrals** give numerical values\n\n### Success Tips:\n- 📖 **Master basic integration rules** first\n- 🎯 **Practice pattern recognition** for choosing methods\n- 🧮 **Check your work** by differentiating\n- 📊 **Understand geometric interpretations**\n- 🔍 **Work systematically** through complex problems\n\n---\n\n## 📚 Additional Resources\n\n### Recommended Study Materials:\n- Calculus textbooks with integration chapters\n- Online integration calculators for verification\n- Practice problem sets with step-by-step solutions\n- Video tutorials on integration techniques\n\n### Common Integration Tables:\n- Standard integral formulas\n- Trigonometric integral formulas\n- Exponential and logarithmic integrals\n- Inverse trigonometric integrals\n\n---\n\n*📝 These notes provide a comprehensive foundation for understanding antiderivatives and integration in Grade 12 Mathematics. Regular practice with various types of integrals will build proficiency in this essential calculus topic.*\n\n---\n\n**📞 Need Help?**\n- Review the method selection guide\n- Practice with simpler problems first\n- Check your algebra carefully\n- Use online tools for verification\n\n**🌟 Good luck with your calculus studies!**', 2, 'https://userway.org/blog/wp-content/uploads/2024/03/The-404-Page_-How-To-Turn-a-404-Error-Into-a-Win-for-Your-Website.jpg', 2, '2025-05-10', '6 min read', 1, 991, 65, '2025-05-18 07:04:55', '2025-08-03 06:05:00', 'ui-ux-design-principles-every-developer-should-know', 'published'),
(3, 'How to Land Your First Tech Job: A Complete Guide', 'A comprehensive guide for fresh graduates and career changers looking to break into the tech industry.', '<p>Breaking into the tech industry can be challenging, but with the right approach, you can position yourself for success. This guide provides actionable strategies for landing your first tech role.</p><h2>Build a Strong Foundation</h2><p>Identify the specific field you want to enter (software development, data science, UX design, etc.) and focus on mastering the fundamental skills required for that role. Online courses, bootcamps, and degree programs can provide structured learning paths.</p><h2>Create a Portfolio</h2><p>For most tech roles, a portfolio is more valuable than a resume. Build projects that demonstrate your skills and problem-solving abilities. Each project should showcase different competencies and include documentation explaining your approach and thinking process.</p><h2>Optimize Your Resume</h2><p>Your resume should be concise (1-2 pages), highlight relevant skills and projects, and include keywords from job descriptions you\'re targeting. Quantify achievements when possible and tailor your resume for each application.</p><h2>Build Your Online Presence</h2><p>Create profiles on GitHub, LinkedIn, and other platforms relevant to your field. Contribute to open-source projects, write technical blog posts, and engage with industry communities to increase your visibility.</p><h2>Network Strategically</h2><p>Attend industry meetups, conferences, and virtual events. Join online communities like Discord servers or Slack groups focused on your area of interest. Don\'t just ask for job leads—build genuine relationships by offering help and engaging in discussions.</p><h2>Prepare for Technical Interviews</h2><p>Research common interview questions for your target roles and practice regularly. For coding positions, solve problems on platforms like LeetCode or HackerRank. Prepare to explain your thought process clearly during technical assessments.</p><h2>Consider Alternative Entry Points</h2><p>Internships, apprenticeships, contract work, and volunteer opportunities can provide valuable experience and sometimes lead to full-time positions. Don\'t overlook smaller companies and startups, which may offer more responsibility and learning opportunities.</p><h2>Develop Soft Skills</h2><p>Communication, collaboration, and problem-solving abilities are highly valued in tech roles. Highlight these skills during interviews and provide concrete examples of how you\'ve applied them in previous work or projects.</p><h2>Stay Persistent and Adaptable</h2><p>Job hunting can be a lengthy process with multiple rejections. Use each interview as a learning opportunity, request feedback when possible, and be willing to adjust your approach based on what you learn.</p><h2>Continue Learning</h2><p>The tech industry evolves rapidly. Demonstrate your commitment to growth by staying current with industry trends and continuously expanding your skillset, even during your job search.</p>', 3, 'https://userway.org/blog/wp-content/uploads/2024/03/The-404-Page_-How-To-Turn-a-404-Error-Into-a-Win-for-Your-Website.jpg', 3, '2025-05-05', '10 min read', 0, 738, 48, '2025-05-18 07:04:55', '2025-05-22 11:17:19', 'how-to-land-your-first-tech-job-a-complete-guide', 'published'),
(4, 'The Future of AI in Education: Opportunities and Challenges', 'Explore how artificial intelligence is transforming education and what it means for students, teachers, and institutions.', '<p>Artificial intelligence is revolutionizing education, creating new possibilities while raising important questions about the future of learning and teaching.</p><h2>Personalized Learning at Scale</h2><p>AI systems can adapt to individual student needs, providing customized learning paths based on strengths, weaknesses, and learning styles. This enables truly personalized education at a scale previously impossible for human teachers alone.</p><h2>Intelligent Tutoring Systems</h2><p>AI-powered tutors provide 24/7 support, immediate feedback, and adaptive guidance. These systems can detect when students are struggling and offer targeted interventions, complementing the work of human educators.</p><h2>Automated Assessment</h2><p>Beyond multiple-choice tests, AI can now evaluate essays, programming assignments, and even creative work. This reduces grading burdens on teachers while providing students with faster, more consistent feedback.</p><h2>Content Creation and Curation</h2><p>AI tools help create educational materials, translate content into multiple languages, and adapt resources for different learning levels. This democratizes access to quality educational content globally.</p><h2>Administrative Efficiency</h2><p>AI streamlines administrative tasks like scheduling, enrollment management, and resource allocation. This allows educational institutions to operate more efficiently and educators to focus more on teaching.</p><h2>Challenges and Concerns</h2><p>Despite its promise, AI in education raises significant concerns. Data privacy, algorithmic bias, the digital divide, and questions about the changing role of teachers must be addressed thoughtfully.</p><h2>Ethical Considerations</h2><p>Educational AI must be developed and deployed with clear ethical guidelines. Issues of consent, transparency, fairness, and accountability are particularly important when AI systems impact educational outcomes.</p><h2>Digital Divide</h2><p>As education becomes more technology-dependent, ensuring equitable access becomes critical. Without deliberate intervention, AI could widen existing educational disparities rather than reduce them.</p><h2>Teacher Readiness</h2><p>Many educators lack training in effectively integrating AI into their teaching practice. Professional development must evolve to help teachers become skilled users and critics of educational AI.</p><h2>The Human Element</h2><p>As AI handles more aspects of education, we must carefully consider which elements of learning require human connection. Social-emotional development, critical thinking, creativity, and ethical reasoning may always need human guidance.</p>', 4, 'https://userway.org/blog/wp-content/uploads/2024/03/The-404-Page_-How-To-Turn-a-404-Error-Into-a-Win-for-Your-Website.jpg', 1, '2025-04-28', '7 min read', 0, 571, 42, '2025-05-18 07:04:55', '2025-05-22 01:14:26', 'the-future-of-ai-in-education-opportunities-and-challenges', 'published'),
(10, 'Mastering Microsoft Word: The Ultimate Document Processing Guide Transform Your Documents from Basic to Professional', 'Microsoft Word is far more than a simple text editor—it\'s your gateway to creating documents that command attention and respect. Whether you\'re crafting business proposals, academic papers, or personal projects, mastering Word\'s comprehensive toolkit will elevate your work to professional standards.', '<p>Microsoft Word is far more than a simple text editor—it\'s your gateway to creating documents that command attention and respect. Whether you\'re crafting business proposals, academic papers, or personal projects, mastering Word\'s comprehensive toolkit will elevate your work to professional standards.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:740/740;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409470/gpt4o_images/jynjmnpc9uslsttdgveh.png\" alt=\"Microsoft Word professional document interface\" width=\"740\" height=\"740\"></figure><p>Microsoft Word professional document interface</p><h2>Getting Started: Foundation Skills</h2><p>The journey begins with understanding Word\'s interface and basic formatting options. You\'ll learn to navigate the ribbon system efficiently, utilizing styles and themes to maintain consistency throughout your documents. Basic formatting goes beyond simple bold and italic text—it encompasses proper paragraph spacing, line breaks, and text alignment that creates visual harmony.</p><h2>Advanced Document Design</h2><p>As you progress, you\'ll discover Word\'s powerful design capabilities. Headers and footers become dynamic elements that can include automatic page numbering, document titles, and even company logos. Table creation and formatting transforms raw data into organized, visually appealing presentations. The mail merge feature alone can save hours of work when creating personalized letters, labels, or certificates.</p><h2>Collaboration and Productivity Features</h2><p>Modern document creation is rarely a solo endeavor. Word\'s collaboration tools allow multiple users to edit simultaneously, track changes, and leave comments for seamless teamwork. Version control ensures you never lose important revisions, while cloud integration through OneDrive means your documents are accessible anywhere.</p><h2>Professional Templates and Automation</h2><p>The course culminates with creating custom templates and utilizing Word\'s automation features. Macros can eliminate repetitive tasks, while built-in templates provide professional starting points for resumes, reports, and presentations. By the end, you\'ll approach every document with the confidence of a seasoned professional.</p><p><strong>Course Outcomes:</strong> You\'ll create documents that look professionally designed, work more efficiently with advanced features, and collaborate seamlessly with others in any professional environment.</p>', 4, 'https://skilladminapi.ashlya.com/uploads/blog_images/20250702043519_jynjmnpc9uslsttdgveh.png', 1, '2025-07-02', '2 min read', 1, 1, 0, '2025-07-01 17:05:34', '2025-08-03 06:07:13', 'mastering-microsoft-word-the-ultimate-document-processing-guide-transform-your-documents-from-basic-to-professional', 'published'),
(13, 'CapCut Mobile Video Editing: Create Stunning Social Media Content Turn Your Smartphone Into a Professional Video Studio', 'The democratization of video content creation has arrived, and CapCut leads the charge. This powerful mobile application puts professional-grade editing tools directly in your pocket, enabling you to create compelling content that rivals studio productions—all from your smartphone.', '<p>The democratization of video content creation has arrived, and CapCut leads the charge. This powerful mobile application puts professional-grade editing tools directly in your pocket, enabling you to create compelling content that rivals studio productions—all from your smartphone.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:724/1087;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409529/gpt4o_images/qt4tyc2eytb9epnbxfqa.png\" alt=\"CapCut mobile video editing interface\" width=\"724\" height=\"1087\"></figure><p>CapCut mobile video editing interface</p><h2>Mobile Editing Fundamentals</h2><p>Understanding mobile video editing begins with mastering the basics: importing footage, trimming clips, and arranging sequences. CapCut\'s intuitive timeline interface makes these fundamental operations surprisingly straightforward. You\'ll learn to work with different video formats and resolutions, ensuring your content displays perfectly across various social media platforms.</p><h2>Visual Enhancement Techniques</h2><p>Color grading transforms ordinary footage into cinematic experiences. CapCut\'s advanced color tools allow you to adjust brightness, contrast, saturation, and apply professional-grade filters. Understanding these tools means the difference between amateur-looking videos and content that stops scrollers mid-swipe.</p><h2>Audio Excellence</h2><p>Great video content requires equally great audio. You\'ll master CapCut\'s audio editing capabilities, including background music integration, sound effect placement, and voice-over recording. Learning to balance audio levels and apply audio effects ensures your videos sound as professional as they look.</p><h2>Platform-Specific Optimization</h2><p>Different social media platforms have unique requirements and algorithms. The course covers aspect ratio optimization for Instagram Stories, TikTok videos, YouTube Shorts, and Facebook posts. You\'ll learn export settings that maintain quality while meeting platform specifications.</p><h2>Trending Techniques and Effects</h2><p>Stay current with the latest video trends by mastering popular effects, transitions, and editing styles. From quick cuts to slow-motion sequences, from text animations to green screen effects, you\'ll build a comprehensive toolkit for creating viral-worthy content.</p><p><strong>Course Outcomes:</strong> Create professional-quality videos entirely on your mobile device, optimize content for multiple social platforms, and develop a signature editing style that engages audiences.</p>', 12, '', 1, '2025-07-02', '2 min read', 0, 2, 0, '2025-07-01 17:10:11', '2025-07-02 04:28:05', 'capcut-mobile-video-editing-create-stunning-social-media-content-turn-your-smartphone-into-a-professional-video-studio-5b9e07', 'published'),
(14, 'Photoshop Masterclass: Digital Image Manipulation Pro From Basic Edits to Creative Masterpieces', 'Adobe Photoshop remains the industry standard for digital image manipulation, used by photographers, designers, and digital artists worldwide. This comprehensive masterclass takes you from basic photo corrections to advanced digital artistry, unlocking creative possibilities you never imagined.', '<p>Adobe Photoshop remains the industry standard for digital image manipulation, used by photographers, designers, and digital artists worldwide. This comprehensive masterclass takes you from basic photo corrections to advanced digital artistry, unlocking creative possibilities you never imagined.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:724/483;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409590/gpt4o_images/rlvvenejc9kqfkdjxbht.png\" alt=\"Adobe Photoshop professional editing workspace\" width=\"724\" height=\"483\"></figure><p>Adobe Photoshop professional editing workspace</p><h2>Non-Destructive Editing Mastery</h2><p>The foundation of professional photo editing lies in non-destructive workflows. You\'ll master adjustment layers, smart objects, and layer masks—techniques that preserve your original images while allowing unlimited experimentation. This approach means you can always return to earlier versions or try multiple creative directions without starting over.</p><h2>Advanced Selection and Masking</h2><p>Precise selections separate amateur edits from professional work. The course covers every selection tool in detail: Magic Wand, Quick Selection, Pen Tool, and advanced techniques like color range selection and luminosity masking. You\'ll learn to create complex composites by seamlessly blending multiple images.</p><h2>Portrait Retouching Excellence</h2><p>Professional portrait retouching goes far beyond blemish removal. You\'ll learn frequency separation for skin smoothing, dodging and burning for dimensional lighting, and subtle adjustments that enhance natural beauty without creating an artificial appearance. These skills are essential for photographers and anyone working with portrait photography.</p><h2>Creative Compositing</h2><p>Transform reality through advanced compositing techniques. Learn to replace skies dramatically, create impossible scenes, and blend multiple exposures for HDR effects. Understanding perspective, lighting consistency, and shadow creation makes your composites believable and impactful.</p><h2>Professional Workflow Optimization</h2><p>Efficiency matters in professional environments. You\'ll discover keyboard shortcuts, custom brushes, action creation, and batch processing techniques that dramatically speed up your workflow. Learning to organize your workspace and utilize Photoshop\'s newest AI-powered features keeps you competitive in the digital marketplace.</p><p><strong>Course Outcomes:</strong> Execute professional-level photo retouching, create complex digital compositions, and develop an efficient workflow that saves hours on every project.</p>', 12, 'https://skilladminapi.ashlya.com/uploads/blog_images/20250702044222_image_1.png', 1, '2025-07-02', '2 min read', 1, 1, 0, '2025-07-01 17:12:33', '2025-07-01 23:08:10', 'photoshop-masterclass-digital-image-manipulation-pro-from-basic-edits-to-creative-masterpieces', 'published'),
(15, 'Complete Digital Marketing Bootcamp: 360-Degree Digital Strategy Master Every Aspect of Modern Digital Marketing', 'Digital marketing encompasses numerous specialized skills, platforms, and strategies. This comprehensive bootcamp provides a holistic understanding of the digital marketing ecosystem, from foundational concepts to advanced implementation strategies that drive real business results.', '<p>Digital marketing encompasses numerous specialized skills, platforms, and strategies. This comprehensive bootcamp provides a holistic understanding of the digital marketing ecosystem, from foundational concepts to advanced implementation strategies that drive real business results.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:724/483;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409674/gpt4o_images/xnns5n27anycrsn6p4aw.png\" alt=\"Digital marketing analytics dashboard overview\" width=\"724\" height=\"483\"></figure><p>Digital marketing analytics dashboard overview</p><h2>Strategic Foundation and Planning</h2><p>Successful digital marketing begins with solid strategic planning. You\'ll learn to develop comprehensive buyer personas, map customer journeys, and create integrated marketing funnels that guide prospects from awareness to conversion. Understanding these fundamentals ensures every tactic serves a larger strategic purpose.</p><h2>Search Engine Optimization (SEO) Mastery</h2><p>Organic search remains one of the most valuable traffic sources. The course covers technical SEO, keyword research, content optimization, and link building strategies. You\'ll learn to audit websites for SEO opportunities and implement changes that improve search rankings and drive qualified traffic.</p><h2>Search Engine Marketing (SEM) and PPC</h2><p>Paid advertising provides immediate visibility and measurable results. Master Google Ads campaign creation, keyword bidding strategies, ad copywriting, and landing page optimization. Understanding quality scores, conversion tracking, and budget management maximizes your advertising ROI.</p><h2>Social Media Marketing Excellence</h2><p>Each social platform requires unique approaches and content strategies. Learn to create engaging content for Facebook, Instagram, LinkedIn, Twitter, and emerging platforms. Understanding organic reach, community management, and social advertising ensures your brand maintains strong social presence.</p><h2>Email Marketing and Marketing Automation</h2><p>Email remains one of the highest-ROI marketing channels. You\'ll master list building, segmentation, automated drip campaigns, and performance optimization. Learning to integrate email marketing with other channels creates cohesive customer experiences.</p><h2>Analytics and Performance Measurement</h2><p>Data drives successful marketing decisions. Master Google Analytics, Facebook Analytics, and other measurement tools to track campaign performance, identify optimization opportunities, and demonstrate marketing ROI to stakeholders.</p><p><strong>Course Outcomes:</strong> Develop and execute comprehensive digital marketing strategies, manage multi-channel campaigns effectively, and use data to continuously improve marketing performance.</p>', 13, 'https://skilladminapi.ashlya.com/uploads/blog_images/20250702044328_image_2.png', 1, '2025-07-02', '2 min read', 1, 6, 0, '2025-07-01 17:13:38', '2025-07-22 14:21:24', 'complete-digital-marketing-bootcamp-360-degree-digital-strategy-master-every-aspect-of-modern-digital-marketing', 'published');
INSERT INTO `blog_posts` (`id`, `title`, `excerpt`, `content`, `category_id`, `image`, `author_id`, `date`, `read_time`, `featured`, `views`, `likes`, `created_at`, `updated_at`, `slug`, `status`) VALUES
(16, 'Facebook Ads Complete Course: Master Facebook Advertising from A-Z Generate Maximum ROI from the World\'s Largest Social Platform', 'Facebook\'s advertising platform offers unparalleled targeting capabilities and massive reach. This comprehensive course teaches you to leverage Facebook\'s sophisticated advertising tools to generate leads, drive sales, and build brand awareness efficiently.', '<p>Facebook\'s advertising platform offers unparalleled targeting capabilities and massive reach. This comprehensive course teaches you to leverage Facebook\'s sophisticated advertising tools to generate leads, drive sales, and build brand awareness efficiently.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:724/724;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409723/gpt4o_images/hzd3btxbelncompqg9me.png\" alt=\"Facebook Ads Manager campaign dashboard\" width=\"724\" height=\"724\"></figure><p>Facebook Ads Manager campaign dashboard</p><h2>Platform Setup and Foundation</h2><p>Success begins with proper account structure and setup. You\'ll learn to configure Facebook Business Manager, install and verify the Facebook Pixel, and organize campaigns, ad sets, and ads for optimal performance and easy management. Understanding account structure prevents common mistakes that can derail campaigns.</p><h2>Advanced Audience Targeting</h2><p>Facebook\'s targeting capabilities are its greatest strength. Master demographic targeting, interest-based audiences, behavioral targeting, and custom audiences created from your existing customer data. Learning to create lookalike audiences and implement retargeting campaigns dramatically improves campaign efficiency.</p><h2>Creative Excellence and Ad Formats</h2><p>Compelling ad creative drives campaign success. The course covers image selection, video creation, copywriting best practices, and testing methodologies. You\'ll learn to utilize various ad formats—single image, carousel, video, collection, and instant experience ads—to match your marketing objectives.</p><h2>Campaign Optimization and Scaling</h2><p>Successful campaigns require continuous optimization. Learn to analyze performance metrics, identify winning ad variations, and scale successful campaigns while maintaining efficiency. Understanding Facebook\'s algorithm and delivery optimization helps you work with the platform rather than against it.</p><h2>Advanced Strategies and Troubleshooting</h2><p>Master advanced techniques like dynamic product ads, lead generation campaigns, and event optimization. Learn to troubleshoot common issues, handle account restrictions, and adapt to platform changes. Understanding Facebook\'s policies and best practices ensures long-term account health.</p><p><strong>Course Outcomes:</strong> Create profitable Facebook ad campaigns, generate qualified leads and sales, and scale successful campaigns while maintaining strong ROI.</p>', 2, 'https://skilladminapi.ashlya.com/uploads/blog_images/20250702044444_image_3.png', 1, '2025-07-02', '2 min read', 0, 1, 0, '2025-07-01 17:15:07', '2025-07-02 04:14:19', 'facebook-ads-complete-course-master-facebook-advertising-from-a-z-generate-maximum-roi-from-the-worlds-largest-social-platform', 'published'),
(17, 'Music Mastering FL Studio: Professional Music Mastering Techniques Achieve Industry-Standard Sound Quality', 'Music mastering is the final step that transforms good recordings into professional, radio-ready tracks. Using FL Studio\'s comprehensive mastering suite, you\'ll learn to enhance your music\'s clarity, loudness, and overall impact while maintaining artistic integrity.\n\n', '<p>Music mastering is the final step that transforms good recordings into professional, radio-ready tracks. Using FL Studio\'s comprehensive mastering suite, you\'ll learn to enhance your music\'s clarity, loudness, and overall impact while maintaining artistic integrity.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:724/483;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409790/gpt4o_images/tv19kvg3dww4dwod4nsl.png\" alt=\"FL Studio music mastering workspace\" width=\"724\" height=\"483\"></figure><p>FL Studio music mastering workspace</p><h2>Understanding the Mastering Process</h2><p>Mastering serves multiple purposes: enhancing sonic quality, ensuring consistency across an album, and preparing tracks for various distribution formats. You\'ll learn to approach mastering with fresh ears, understanding how it differs from mixing and when to apply specific techniques.</p><h2>Essential Mastering Tools and Plugins</h2><p>FL Studio provides a comprehensive mastering toolkit. Master the use of EQs for tonal balance, compressors for dynamic control, and limiters for loudness maximization. Understanding specialized tools like multiband compressors, stereo imaging processors, and harmonic enhancers expands your creative possibilities.</p><h2>LUFS and Loudness Standards</h2><p>Modern mastering requires understanding loudness standards for different platforms. Learn about LUFS measurements, dynamic range, and platform-specific requirements for Spotify, Apple Music, YouTube, and other streaming services. Proper loudness management ensures your tracks sound consistent across all playback systems.</p><h2>Critical Listening and Reference Techniques</h2><p>Developing critical listening skills is essential for effective mastering. Learn to use reference tracks, understand frequency balance, and identify common mastering problems. Training your ears to hear subtle differences enables you to make precise adjustments that enhance your music.</p><h2>Advanced Mastering Workflows</h2><p>Professional mastering requires efficient workflows and quality control procedures. Learn to organize your mastering session, create multiple masters for different purposes, and implement quality assurance checks. Understanding when to use automation and how to prepare final masters for distribution ensures professional results.</p><p><strong>Course Outcomes:</strong> Master tracks to industry standards, understand loudness requirements for various platforms, and develop the critical listening skills necessary for professional mastering work.</p>', 6, 'https://skilladminapi.ashlya.com/uploads/blog_images/20250702044621_image_4.png', 1, '2025-07-02', '2 min read', 0, 2, 0, '2025-07-01 17:16:31', '2025-08-11 09:08:31', 'music-mastering-fl-studio-professional-music-mastering-techniques-achieve-industry-standard-sound-quality', 'published'),
(18, ' YouTube Mastery: Grow Your YouTube Channel Successfully Build a Thriving YouTube Presence That Generates Revenue', 'YouTube has evolved from a video sharing platform to a legitimate business opportunity. This comprehensive course teaches you to create engaging content, grow your subscriber base, and monetize your channel effectively while building a sustainable long-term presence.', '<p>YouTube has evolved from a video sharing platform to a legitimate business opportunity. This comprehensive course teaches you to create engaging content, grow your subscriber base, and monetize your channel effectively while building a sustainable long-term presence.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:724/724;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409833/gpt4o_images/bhastfbggzrav8zr1tqm.png\" alt=\"YouTube Analytics dashboard for content creators\" width=\"724\" height=\"724\"></figure><p>YouTube Analytics dashboard for content creators</p><h2>Channel Strategy and Niche Selection</h2><p>Successful YouTube channels begin with clear strategy and focused niche selection. Learn to identify profitable niches, understand your target audience, and develop content themes that attract engaged subscribers. Understanding YouTube\'s algorithm and how it promotes content helps inform your strategic decisions.</p><h2>Content Creation Excellence</h2><p>Great content is the foundation of channel growth. Master video planning, scriptwriting, filming techniques, and editing workflows that keep viewers engaged. Learning to create compelling thumbnails, write effective titles, and structure videos for maximum retention directly impacts your channel\'s performance.</p><h2>YouTube SEO and Discoverability</h2><p>YouTube is the world\'s second-largest search engine, making SEO crucial for growth. Learn keyword research specific to YouTube, optimization techniques for titles and descriptions, and tag strategies that improve discoverability. Understanding how to leverage trending topics and optimize for suggested videos increases your content\'s reach.</p><h2>Audience Engagement and Community Building</h2><p>Building a loyal community requires consistent engagement and value delivery. Learn to respond to comments effectively, create community posts, and use YouTube\'s interactive features like polls and community tabs. Understanding how to collaborate with other creators and cross-promote content accelerates growth.</p><h2>Monetization Strategies</h2><p>Multiple revenue streams maximize your YouTube income. Master YouTube Partner Program requirements, AdSense optimization, sponsorship negotiations, affiliate marketing, and merchandise sales. Learning to diversify income sources creates financial stability while building your brand.</p><p><strong>Course Outcomes:</strong> Develop a successful YouTube content strategy, grow an engaged subscriber base, optimize videos for maximum discoverability, and implement multiple monetization strategies.</p>', 7, 'https://skilladminapi.ashlya.com/uploads/blog_images/20250702044712_image_5.png', 1, '2025-07-02', '2 min read', 0, 1, 0, '2025-07-01 17:17:25', '2025-07-02 02:16:30', 'youtube-mastery-grow-your-youtube-channel-successfully-build-a-thriving-youtube-presence-that-generates-revenue', 'published'),
(19, 'ChatGPT for Productivity: AI-Powered Workflow Optimization Revolutionize Your Work Efficiency with Artificial Intelligence', 'Artificial Intelligence is transforming how we work, and ChatGPT leads this revolution. This course teaches you to leverage AI tools effectively, automate routine tasks, and enhance your productivity across various professional domains while maintaining quality and authenticity.', '<p>Artificial Intelligence is transforming how we work, and ChatGPT leads this revolution. This course teaches you to leverage AI tools effectively, automate routine tasks, and enhance your productivity across various professional domains while maintaining quality and authenticity.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:724/724;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409872/gpt4o_images/t9qohafqxrlxekf2gwmr.png\" alt=\"ChatGPT productivity interface with AI prompts\" width=\"724\" height=\"724\"></figure><p>ChatGPT productivity interface with AI prompts</p><h2>Understanding AI Capabilities and Limitations</h2><p>Effective AI use begins with understanding what these tools can and cannot do. Learn to identify tasks suitable for AI assistance, recognize potential limitations, and maintain quality control in AI-generated content. Understanding these boundaries helps you utilize AI effectively while avoiding common pitfalls.</p><h2>Advanced Prompt Engineering</h2><p>The quality of AI output depends heavily on input quality. Master the art of prompt engineering—crafting specific, detailed instructions that generate useful results. Learning different prompt types, conversation structuring, and iterative refinement techniques dramatically improves AI assistance quality.</p><h2>Content Creation and Writing Enhancement</h2><p>AI excels at supporting various writing tasks. Learn to use ChatGPT for brainstorming, outline creation, draft writing, editing assistance, and style adaptation. Understanding how to maintain your voice while leveraging AI support creates more efficient writing workflows without sacrificing authenticity.</p><h2>Research and Analysis Automation</h2><p>Transform how you gather and analyze information using AI assistance. Learn to create research frameworks, analyze complex documents, summarize lengthy materials, and generate insights from data. These skills are invaluable for students, researchers, and professionals who work with large amounts of information.</p><h2>Business Process Optimization</h2><p>AI can streamline numerous business processes. Master email drafting, meeting summarization, project planning, and customer service enhancement using AI tools. Learning to integrate AI into existing workflows increases efficiency without disrupting established processes.</p><h2>Ethical AI Use and Best Practices</h2><p>Responsible AI use requires understanding ethical considerations and best practices. Learn about bias recognition, fact-checking requirements, attribution needs, and privacy considerations. Understanding these aspects ensures your AI use remains professional and responsible.</p><p><strong>Course Outcomes:</strong> Implement AI tools to dramatically increase productivity, automate routine tasks effectively, and enhance work quality while maintaining professional standards.</p>', 1, 'https://skilladminapi.ashlya.com/uploads/blog_images/20250702044928_image_7.png', 1, '2025-07-02', '2 min read', 0, 3, 0, '2025-07-01 17:19:40', '2025-07-14 04:13:16', 'chatgpt-for-productivity-ai-powered-workflow-optimization-revolutionize-your-work-efficiency-with-artificial-intelligence', 'published'),
(20, 'Vlogging Mastery: Create Engaging Video Content Build Your Personal Brand Through Compelling Video Storytelling', 'Vlogging combines personal storytelling with video production skills to create authentic, engaging content that builds genuine connections with audiences. This comprehensive course teaches you to develop your unique voice, master technical aspects, and grow a loyal following.\n\n', '<p>Vlogging combines personal storytelling with video production skills to create authentic, engaging content that builds genuine connections with audiences. This comprehensive course teaches you to develop your unique voice, master technical aspects, and grow a loyal following.</p><p>&nbsp;</p><figure class=\"image\"><img style=\"aspect-ratio:724/483;\" src=\"https://pplx-res.cloudinary.com/image/upload/v1751409941/gpt4o_images/smh7xkpr5vbqga1urm54.png\" alt=\"Professional vlogging equipment and setup\" width=\"724\" height=\"483\"></figure><p>Professional vlogging equipment and setup</p><h2>Finding Your Unique Voice and Niche</h2><p>Successful vloggers have distinctive perspectives and consistent messaging. Learn to identify your unique strengths, develop your on-camera personality, and choose topics that genuinely interest you while appealing to specific audiences. Authenticity is crucial—viewers can sense genuineness and respond accordingly.</p><h2>Essential Equipment and Technical Setup</h2><p>Quality vlogging doesn\'t require expensive equipment, but understanding your tools is essential. Learn camera selection (including smartphone options), audio recording, lighting techniques, and basic gear organization. Understanding technical fundamentals ensures your content looks and sounds professional regardless of budget.</p><h2>Storytelling and Content Structure</h2><p>Great vlogs tell compelling stories, even when covering everyday activities. Master narrative arc development, pacing techniques, and content structuring that maintains viewer interest. Learning to balance entertainment with information creates content that both engages and provides value.</p><h2>Filming Techniques and Production Skills</h2><p>Develop essential filming skills including shot composition, camera movement, B-roll creation, and interview techniques. Understanding basic cinematography principles elevates your content quality and creates more engaging viewing experiences.</p><h2>Post-Production and Editing Excellence</h2><p>Editing transforms raw footage into polished content. Master essential editing techniques including pacing, music selection, color correction, and audio enhancement. Learning efficient editing workflows saves time while maintaining quality standards.</p><h2>Audience Building and Engagement</h2><p>Growing a vlogging audience requires consistent effort and strategic thinking. Learn to analyze your audience, optimize publishing schedules, engage with comments effectively, and collaborate with other creators. Understanding platform-specific strategies for YouTube, Instagram, and TikTok maximizes your reach.</p><h2>Monetization and Business Development</h2><p>Transform your vlogging passion into sustainable income through sponsorships, affiliate marketing, merchandise sales, and direct audience support. Learning to negotiate partnerships and maintain authenticity while monetizing ensures long-term success without alienating your audience.</p><p><strong>Course Outcomes:</strong> Develop a distinctive vlogging style, create consistently engaging content, build a loyal audience, and monetize your vlogging efforts while maintaining authenticity and viewer trust.</p><h2>Conclusion: Your Digital Skills Journey Starts Here</h2><p>These comprehensive courses represent a complete digital skills education designed to meet today\'s professional demands. Whether you\'re starting your career, changing fields, or enhancing existing skills, each course provides practical, immediately applicable knowledge taught by industry experts.</p><p>The digital landscape continues evolving rapidly, making continuous learning essential for professional success. These courses provide not just current skills, but foundational understanding that adapts to future technological changes. Investment in these skills pays dividends throughout your career, opening opportunities and increasing earning potential across numerous industries.</p><p>Ready to transform your digital capabilities? Choose the course that aligns with your goals and begin your journey toward enhanced productivity, creativity, and professional success. Your future self will thank you for the investment you make today.</p>', 1, 'https://skilladminapi.ashlya.com/uploads/blog_images/20250702045024_image_8.png', 1, '2025-07-02', '3 min read', 0, 14, 0, '2025-07-01 17:20:38', '2025-08-11 09:06:30', 'vlogging-mastery-create-engaging-video-content-build-your-personal-brand-through-compelling-video-storytelling', 'published');

-- --------------------------------------------------------

--
-- Table structure for table `blog_post_tags`
--

CREATE TABLE `blog_post_tags` (
  `post_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_post_tags`
--

INSERT INTO `blog_post_tags` (`post_id`, `tag_id`) VALUES
(1, 5),
(1, 6),
(1, 11),
(2, 2),
(2, 7),
(2, 13),
(3, 3),
(3, 4),
(3, 5),
(4, 1),
(4, 8),
(4, 10),
(15, 23),
(16, 24),
(17, 25),
(18, 26),
(19, 8),
(20, 27);

-- --------------------------------------------------------

--
-- Table structure for table `blog_subscribers`
--

CREATE TABLE `blog_subscribers` (
  `id` int(11) NOT NULL,
  `email` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_subscribers`
--

INSERT INTO `blog_subscribers` (`id`, `email`, `created_at`) VALUES
(1, 'john.doe@example.com', '2025-05-18 12:49:55'),
(2, 'jane.smith@example.com', '2025-05-18 12:49:55'),
(3, 'michael.johnson@example.com', '2025-05-18 12:49:55'),
(4, 'sarah.williams@example.com', '2025-05-18 12:49:55'),
(5, 'david.brown@example.com', '2025-05-18 12:49:55');

-- --------------------------------------------------------

--
-- Table structure for table `blog_tags`
--

CREATE TABLE `blog_tags` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `slug` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_tags`
--

INSERT INTO `blog_tags` (`id`, `name`, `created_at`, `slug`) VALUES
(1, 'Technology', '2025-05-18 12:49:55', ''),
(2, 'Design', '2025-05-18 12:49:55', ''),
(3, 'Interview', '2025-05-18 12:49:55', ''),
(4, 'Job Search', '2025-05-18 12:49:55', ''),
(5, 'Career', '2025-05-18 12:49:55', ''),
(6, 'Web Development', '2025-05-18 12:49:55', ''),
(7, 'UI/UX', '2025-05-18 12:49:55', ''),
(8, 'AI', '2025-05-18 12:49:55', ''),
(9, 'Next.js', '2025-05-18 12:49:55', ''),
(10, 'Education', '2025-05-18 12:49:55', ''),
(11, 'JavaScript', '2025-05-18 12:49:55', ''),
(12, 'React', '2025-05-18 12:49:55', ''),
(13, 'Development', '2025-05-18 12:49:55', ''),
(14, 'nepal', '2025-05-19 08:27:01', 'nepal-20250519195701'),
(15, 'windsurf', '2025-05-19 08:27:01', 'windsurf-20250519195701'),
(16, 'nepal tag', '2025-05-21 06:05:50', 'nepal-tag'),
(17, 'hello', '2025-05-22 02:02:58', 'hello'),
(18, 'code', '2025-05-22 04:46:18', 'code'),
(19, 'mylatest', '2025-05-22 21:23:53', 'mylatest'),
(20, 'mmm', '2025-05-22 22:26:47', 'mmm'),
(21, 'tripti', '2025-05-22 23:28:58', 'tripti'),
(22, 'Capcut', '2025-07-01 17:09:22', 'capcut'),
(23, 'digital marketing', '2025-07-01 17:13:38', 'digital-marketing'),
(24, 'Facebook Ads', '2025-07-01 17:15:07', 'facebook-ads'),
(25, 'music', '2025-07-01 17:16:31', 'music'),
(26, 'youtube', '2025-07-01 17:17:25', 'youtube'),
(27, 'blogging', '2025-07-01 17:20:38', 'blogging');

-- --------------------------------------------------------

--
-- Table structure for table `blog_view_logs`
--

CREATE TABLE `blog_view_logs` (
  `id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `user_agent` varchar(255) NOT NULL,
  `view_date` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_view_logs`
--

INSERT INTO `blog_view_logs` (`id`, `post_id`, `ip_address`, `user_agent`, `view_date`) VALUES
(1, 3, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-05-22 11:17:19'),
(3, 1, '127.0.0.1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', '2025-05-22 11:31:48'),
(25, 13, '172.68.203.137', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-01 23:07:27'),
(26, 14, '172.68.203.136', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-01 23:08:10'),
(27, 1, '172.68.203.135', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-02 00:05:46'),
(28, 18, '172.68.203.137', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-02 02:16:30'),
(29, 20, '172.68.203.137', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-02 02:16:54'),
(30, 17, '172.68.203.136', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-02 02:17:28'),
(31, 15, '172.68.203.134', 'Mozilla/5.0 (Linux; Android 13; IN_Note1 Build/TQ3A.230901.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/137.0.7151.115 Mobile Safari/537.36 median', '2025-07-02 02:53:58'),
(32, 19, '172.68.203.137', 'Mozilla/5.0 (Linux; Android 13; IN_Note1 Build/TQ3A.230901.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/137.0.7151.115 Mobile Safari/537.36 median', '2025-07-02 04:12:48'),
(33, 16, '172.68.203.144', 'Mozilla/5.0 (Linux; Android 13; IN_Note1 Build/TQ3A.230901.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/137.0.7151.115 Mobile Safari/537.36 median', '2025-07-02 04:14:19'),
(34, 15, '104.23.216.2', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-02 04:14:26'),
(35, 13, '172.68.203.143', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-02 04:28:05'),
(36, 15, '172.68.203.143', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-02 06:48:13'),
(37, 20, '172.68.203.137', 'Mozilla/5.0 (Linux; Android 13; IN_Note1 Build/TQ3A.230901.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.63 Mobile Safari/537.36 median', '2025-07-02 12:00:56'),
(38, 20, '104.23.216.58', 'Mozilla/5.0 (Linux; Android 13; IN_Note1 Build/TQ3A.230901.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.63 Mobile Safari/537.36 median', '2025-07-02 13:07:34'),
(39, 20, '172.68.203.145', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-02 14:43:41'),
(40, 19, '172.68.203.137', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36', '2025-07-03 03:11:39'),
(41, 20, '172.68.203.136', 'Mozilla/5.0 (Linux; Android 13; IN_Note1 Build/TQ3A.230901.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.63 Mobile Safari/537.36 median', '2025-07-04 02:35:34'),
(42, 20, '172.68.234.77', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-08 02:44:48'),
(43, 15, '162.158.22.35', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-08 03:28:48'),
(44, 15, '172.70.108.6', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-08 05:00:43'),
(45, 20, '172.69.76.176', 'Mozilla/5.0 (Linux; Android 13; IN_Note1 Build/TQ3A.230901.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.63 Mobile Safari/537.36 median', '2025-07-09 08:57:28'),
(46, 20, '172.69.76.178', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-13 03:36:14'),
(47, 20, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-13 08:12:30'),
(48, 20, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-13 15:35:27'),
(49, 20, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 02:51:35'),
(50, 19, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 04:13:16'),
(51, 20, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 04:17:59'),
(52, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 04:21:31'),
(53, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 04:27:32'),
(54, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 06:32:37'),
(55, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-20 18:22:24'),
(56, 20, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-20 18:23:59'),
(57, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 01:01:29'),
(58, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 02:48:50'),
(59, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 03:10:01'),
(60, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 03:10:07'),
(61, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 05:13:41'),
(62, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-22 13:42:33'),
(63, 15, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-22 14:21:24'),
(64, 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-25 22:03:39'),
(65, 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-03 06:05:00'),
(66, 10, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-03 06:07:13'),
(67, 20, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-11 09:06:30'),
(68, 17, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-11 09:08:31');

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Mathematics', 'Mathematical subjects including Algebra, Geometry, Calculus, and Statistics', '2025-01-14 15:20:33', '2025-01-14 15:20:33'),
(2, 'Science', 'Natural sciences including Physics, Chemistry, and Biology', '2025-01-14 15:20:33', '2025-01-14 15:20:33'),
(3, 'English', 'English Language and Literature studies', '2025-01-14 15:20:33', '2025-01-14 15:20:33'),
(4, 'Social Studies', 'History, Geography, Civics, and Political Science', '2025-01-14 15:20:33', '2025-01-14 15:20:33'),
(5, 'Computer Science', 'Programming, Digital Literacy, and Information Technology', '2025-01-14 15:20:33', '2025-01-14 15:20:33'),
(6, 'Languages', 'Nepali, Hindi, and other regional languages', '2025-01-14 15:20:33', '2025-01-14 15:20:33'),
(7, 'Arts & Creative', 'Art, Music, Drama, and Creative Writing', '2025-01-14 15:20:33', '2025-01-14 15:20:33'),
(8, 'Physical Education', 'Sports, Health, and Physical Fitness', '2025-01-14 15:20:33', '2025-01-14 15:20:33');

-- --------------------------------------------------------

--
-- Table structure for table `courses`
--

CREATE TABLE `courses` (
  `id` int(11) NOT NULL,
  `institute_id` int(11) DEFAULT NULL COMMENT 'Institute offering this course',
  `primary_instructor_id` int(11) DEFAULT NULL COMMENT 'Primary instructor for this course',
  `title` varchar(255) NOT NULL,
  `course_code` varchar(50) DEFAULT NULL COMMENT 'Unique course code within institute',
  `max_students` int(11) DEFAULT 0 COMMENT 'Maximum students allowed',
  `certificate_template` varchar(500) DEFAULT NULL COMMENT 'Certificate template URL',
  `is_public` tinyint(1) DEFAULT 1 COMMENT 'Whether course is publicly visible',
  `approval_status` enum('draft','pending_review','approved','rejected','archived') DEFAULT 'approved',
  `approved_by` int(11) DEFAULT NULL COMMENT 'Admin who approved the course',
  `approved_at` timestamp NULL DEFAULT NULL COMMENT 'When course was approved',
  `subtitle` varchar(500) DEFAULT NULL,
  `description` text NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `discount` decimal(10,2) DEFAULT 0.00,
  `final_price` decimal(10,2) GENERATED ALWAYS AS (`price` - `discount`) STORED,
  `image_url` varchar(1000) DEFAULT NULL,
  `video_preview_url` varchar(1000) DEFAULT NULL,
  `level` enum('Beginner','Intermediate','Advanced','Expert') NOT NULL,
  `category_id` int(11) NOT NULL,
  `type` enum('Self-paced','Instructor-led','Hybrid') NOT NULL,
  `language` varchar(50) DEFAULT 'English',
  `duration_hours` int(11) DEFAULT 0,
  `total_lessons` int(11) DEFAULT 0,
  `total_resources` int(11) DEFAULT 0,
  `prerequisites` text DEFAULT NULL,
  `outcomes` text DEFAULT NULL,
  `target_audience` text DEFAULT NULL,
  `publication_date` date NOT NULL,
  `status` enum('draft','active','inactive','archived') DEFAULT 'active',
  `rating` float DEFAULT 0,
  `reviews_count` int(11) DEFAULT 0,
  `enrollments_count` int(11) DEFAULT 0,
  `is_featured` tinyint(1) DEFAULT 1,
  `is_top_selling` tinyint(1) DEFAULT 0,
  `is_trending` tinyint(1) DEFAULT 0,
  `tags` varchar(255) DEFAULT NULL,
  `difficulty_score` float DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `instructor_id` int(100) NOT NULL,
  `instructor_name` varchar(1000) NOT NULL DEFAULT 'Ashlya Academy',
  `grade_level` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `courses`
--

INSERT INTO `courses` (`id`, `institute_id`, `primary_instructor_id`, `title`, `course_code`, `max_students`, `certificate_template`, `is_public`, `approval_status`, `approved_by`, `approved_at`, `subtitle`, `description`, `price`, `discount`, `image_url`, `video_preview_url`, `level`, `category_id`, `type`, `language`, `duration_hours`, `total_lessons`, `total_resources`, `prerequisites`, `outcomes`, `target_audience`, `publication_date`, `status`, `rating`, `reviews_count`, `enrollments_count`, `is_featured`, `is_top_selling`, `is_trending`, `tags`, `difficulty_score`, `created_at`, `updated_at`, `instructor_id`, `instructor_name`, `grade_level`) VALUES
(1, 1, 1, 'Grade 6 Full Course', NULL, 0, NULL, 1, 'approved', 1, '2025-09-01 04:56:55', 'Complete Basic Level curriculum covering all core subjects', 'Comprehensive Basic Level education for Grade 6 following Nepal\'s national curriculum with integrated learning approach', 2000.00, 300.00, 'https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Beginner', 1, 'Self-paced', 'English', 233, 32, 10, 'Basic literacy and numeracy skills', 'Master foundational knowledge and skills for Grade 6 level', 'Grade 6 students in Nepal following NEB curriculum', '2024-01-01', 'active', 4.2, 160, 600, 1, 0, 0, 'grade6,fullcourse,nepal,curriculum,basic', 2, '2025-01-14 09:35:33', '2025-09-01 04:56:55', 1, 'Ashlya Academy', 6),
(2, 1, 1, 'Grade 7 Full Course', NULL, 0, NULL, 1, 'approved', 1, '2025-09-01 04:56:55', 'Complete Basic Level curriculum covering all core subjects', 'Comprehensive Basic Level education for Grade 7 following Nepal\'s national curriculum with integrated learning approach', 2200.00, 300.00, 'https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Beginner', 1, 'Self-paced', 'English', 246, 32, 10, 'Successful completion of Grade 6', 'Master foundational knowledge and skills for Grade 7 level', 'Grade 7 students in Nepal following NEB curriculum', '2024-01-01', 'active', 4.3, 170, 650, 1, 0, 0, 'grade7,fullcourse,nepal,curriculum,basic', 2.4, '2025-01-14 09:35:33', '2025-09-01 04:56:55', 1, 'Ashlya Academy', 7),
(3, 1, 1, 'Grade 8 Full Course', NULL, 0, NULL, 1, 'approved', 1, '2025-09-01 04:56:55', 'Complete Basic Level curriculum covering all core subjects', 'Comprehensive Basic Level education for Grade 8 following Nepal\'s national curriculum with integrated learning approach', 2400.00, 300.00, 'https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Beginner', 1, 'Self-paced', 'English', 254, 32, 10, 'Successful completion of Grade 7', 'Master foundational knowledge and skills for Grade 8 level', 'Grade 8 students in Nepal following NEB curriculum', '2024-01-01', 'active', 4.3, 180, 700, 1, 0, 0, 'grade8,fullcourse,nepal,curriculum,basic', 2.8, '2025-01-14 09:35:33', '2025-09-01 04:56:55', 1, 'Ashlya Academy', 8),
(4, 1, 1, 'Grade 9 Full Course', NULL, 0, NULL, 1, 'approved', 1, '2025-09-01 04:56:55', 'Complete Secondary Level curriculum with elective options', 'Comprehensive Secondary Level education for Grade 9 with compulsory and optional subjects following Nepal\'s curriculum framework', 3000.00, 300.00, 'https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Intermediate', 1, 'Self-paced', 'English', 301, 37, 12, 'Successful completion of Grade 8', 'Prepare for SEE examination and higher secondary education', 'Grade 9 students in Nepal following NEB curriculum', '2024-01-01', 'active', 4.4, 190, 750, 1, 0, 0, 'grade9,secondary,nepal,curriculum', 3.2, '2025-01-14 09:35:33', '2025-09-01 04:56:55', 1, 'Ashlya Academy', 9),
(5, 1, 1, 'Grade 10 Full Course', NULL, 0, NULL, 1, 'approved', 1, '2025-09-01 04:56:55', 'Complete Secondary Level curriculum with elective options', 'Comprehensive Secondary Level education for Grade 10 with compulsory and optional subjects following Nepal\'s curriculum framework', 3300.00, 300.00, 'https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Intermediate', 1, 'Self-paced', 'English', 310, 37, 12, 'Successful completion of Grade 9', 'Prepare for SEE examination and higher secondary education', 'Grade 10 students in Nepal following NEB curriculum', '2024-01-01', 'active', 4.4, 200, 800, 1, 1, 0, 'grade10,secondary,nepal,curriculum', 3.6, '2025-01-14 09:35:33', '2025-09-01 04:56:55', 1, 'Ashlya Academy', 10),
(6, NULL, NULL, 'Grade 11 Management Stream', NULL, 0, NULL, 1, 'approved', NULL, NULL, 'Business, Economics, and Accounting focused curriculum', 'Specialized management stream covering business studies, economics, accountancy, and related subjects for career preparation in commerce', 4000.00, 300.00, 'https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Advanced', 1, 'Self-paced', 'English', 294, 33, 11, 'SEE passed with minimum 2.0 GPA, interest in business and commerce', 'Develop business acumen, accounting skills, and economic understanding for commerce careers', 'Grade 11 students in Nepal following NEB curriculum', '2024-01-01', 'active', 4.4, 210, 850, 1, 1, 1, 'grade11,management,business,economics,accounting,nepal', 4, '2025-01-14 09:35:33', '2025-08-25 09:15:49', 1, 'Ashlya Academy', 11),
(7, NULL, NULL, 'Grade 12 Science Stream', NULL, 0, NULL, 1, 'approved', NULL, NULL, 'Physics, Chemistry, Biology, and Mathematics focused curriculum', 'Advanced science stream covering physics, chemistry, biology, and mathematics for students preparing for engineering, medicine, and science careers', 4500.00, 300.00, 'https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'Expert', 1, 'Self-paced', 'English', 674, 62, 20, 'SEE passed with minimum 2.4 GPA, strong foundation in mathematics and science', 'Build strong foundation in sciences for engineering, medical, and research careers', 'Grade 12 students in Nepal following NEB curriculum', '2024-01-01', 'active', 4.5, 220, 900, 1, 1, 1, 'grade12,science,physics,chemistry,biology,mathematics,nepal', 4.4, '2025-01-14 09:35:33', '2025-08-25 09:15:49', 1, 'Ashlya Academy', 12);

--
-- Triggers `courses`
--
DELIMITER $$
CREATE TRIGGER `update_institute_course_count` AFTER INSERT ON `courses` FOR EACH ROW BEGIN 
    IF NEW.institute_id IS NOT NULL THEN
        UPDATE institutes 
        SET total_courses = (
            SELECT COUNT(*) FROM courses 
            WHERE institute_id = NEW.institute_id AND approval_status = 'approved'
        ) 
        WHERE id = NEW.institute_id;
    END IF;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `course_audio_content`
--

CREATE TABLE `course_audio_content` (
  `id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `file_path` varchar(500) NOT NULL,
  `duration` int(11) NOT NULL,
  `file_size` int(11) NOT NULL,
  `position` int(11) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `language` varchar(10) NOT NULL DEFAULT 'English' COMMENT 'Language of the audio content (English, Hindi, Nepali, etc.)'
) ;

--
-- Dumping data for table `course_audio_content`
--

INSERT INTO `course_audio_content` (`id`, `topic_id`, `title`, `file_path`, `duration`, `file_size`, `position`, `created_at`, `language`) VALUES
(1, 1, 'Introduction to Web Development Concepts', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3', 842, 16384, 1, '2025-07-24 19:26:38', 'English'),
(2, 1, 'History of the Web', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-2.mp3', 1253, 24576, 2, '2025-07-24 19:26:38', 'English'),
(3, 1, 'Modern Web Development Ecosystem', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-3.mp3', 1105, 21504, 3, '2025-07-24 19:26:38', 'English'),
(4, 2, 'HTML Structure and Elements', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-4.mp3', 924, 18432, 1, '2025-07-24 19:26:38', 'English'),
(5, 2, 'Semantic HTML', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-5.mp3', 1365, 26624, 2, '2025-07-24 19:26:38', 'English'),
(6, 2, 'HTML Best Practices', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-6.mp3', 1078, 20480, 3, '2025-07-24 19:26:38', 'English'),
(7, 3, 'CSS Selectors and Properties', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-7.mp3', 1146, 22528, 1, '2025-07-24 19:26:38', 'English'),
(8, 3, 'CSS Box Model Explained', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-8.mp3', 832, 16384, 2, '2025-07-24 19:26:38', 'English'),
(9, 3, 'Responsive Design with CSS', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-9.mp3', 1684, 32768, 3, '2025-07-24 19:26:38', 'English'),
(10, 3, 'CSS Frameworks Overview', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-10.mp3', 1248, 24576, 4, '2025-07-24 19:26:38', 'English'),
(11, 4, 'JavaScript Basics', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-11.mp3', 1532, 30720, 1, '2025-07-24 19:26:38', 'English'),
(12, 4, 'Working with DOM', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-12.mp3', 1684, 32768, 2, '2025-07-24 19:26:38', 'English'),
(13, 4, 'Event Handling in JavaScript', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-13.mp3', 1435, 28672, 3, '2025-07-24 19:26:38', 'English'),
(14, 4, 'Asynchronous JavaScript', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-14.mp3', 1876, 36864, 4, '2025-07-24 19:26:38', 'English'),
(15, 4, 'Modern JavaScript Features', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-15.mp3', 1542, 30720, 5, '2025-07-24 19:26:38', 'English'),
(16, 5, 'React Introduction', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-16.mp3', 1154, 22528, 1, '2025-07-24 19:26:38', 'English'),
(17, 5, 'Components and Props', 'https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_700KB.mp3', 1365, 26624, 2, '2025-07-24 19:26:38', 'English'),
(18, 5, 'State and Lifecycle', 'https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_1MG.mp3', 1678, 32768, 3, '2025-07-24 19:26:38', 'English'),
(19, 5, 'Hooks in React', 'https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_2MG.mp3', 1845, 36864, 4, '2025-07-24 19:26:38', 'English'),
(20, 6, 'Database Design Overview', 'https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_5MG.mp3', 1286, 25600, 1, '2025-07-24 19:26:38', 'English'),
(21, 6, 'Normalization Explained', 'https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3', 1542, 30720, 2, '2025-07-24 19:26:38', 'English'),
(22, 6, 'Indexing Strategies', 'https://github.com/rafaelreis-hotmart/Audio-Sample-files/raw/master/sample.mp3', 1124, 22528, 3, '2025-07-24 19:26:38', 'English'),
(23, 7, 'Flutter Introduction', 'https://freetestdata.com/wp-content/uploads/2023/02/file_example_MP3_2MG.mp3', 1346, 26624, 1, '2025-07-24 19:26:38', 'English'),
(24, 7, 'Widget Fundamentals', 'https://freetestdata.com/wp-content/uploads/2023/02/file_example_MP3_5MG.mp3', 1565, 30720, 2, '2025-07-24 19:26:38', 'English'),
(25, 7, 'State Management in Flutter', 'https://freetestdata.com/wp-content/uploads/2023/02/file_example_MP3_1MG.mp3', 1784, 34816, 3, '2025-07-24 19:26:38', 'English'),
(26, 7, 'Building UI with Flutter', 'https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_700KB.mp3', 1635, 32768, 4, '2025-07-24 19:26:38', 'English'),
(27, 8, 'Cloud Computing Basics', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3', 1324, 25600, 1, '2025-07-24 19:26:38', 'English'),
(28, 8, 'Service Models Explained', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-2.mp3', 1485, 29696, 2, '2025-07-24 19:26:38', 'English'),
(29, 8, 'Cloud Deployment Strategies', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-3.mp3', 1265, 24576, 3, '2025-07-24 19:26:38', 'English'),
(30, 8, 'Cloud Security Considerations', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-4.mp3', 1542, 30720, 4, '2025-07-24 19:26:38', 'English'),
(31, 9, 'Data Science Workflow', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-5.mp3', 1486, 29696, 1, '2025-07-24 19:26:38', 'English'),
(32, 9, 'Exploratory Data Analysis', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-6.mp3', 1754, 34816, 2, '2025-07-24 19:26:38', 'English'),
(33, 9, 'Machine Learning Algorithms', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-7.mp3', 1965, 39936, 3, '2025-07-24 19:26:38', 'English'),
(34, 9, 'Evaluating ML Models', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-8.mp3', 1453, 28672, 4, '2025-07-24 19:26:38', 'English'),
(35, 9, 'Data Visualization Techniques', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-9.mp3', 1542, 30720, 5, '2025-07-24 19:26:38', 'English'),
(36, 10, 'Cybersecurity Fundamentals', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-10.mp3', 1345, 26624, 1, '2025-07-24 19:26:38', 'English'),
(37, 10, 'Common Security Threats', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-11.mp3', 1576, 31744, 2, '2025-07-24 19:26:38', 'English'),
(38, 10, 'Security Best Practices', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-12.mp3', 1432, 28672, 3, '2025-07-24 19:26:38', 'English'),
(39, 10, 'Incident Response', 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-13.mp3', 1268, 24576, 4, '2025-07-24 19:26:38', 'English'),
(41, 125, 'Units and Dimensions', 'http://localhost:5002/uploads/course_audio/audio_125_20250726_170852.wav', 575, 26953, 1, '2025-07-26 05:38:52', 'Nepali'),
(42, 125, 'Error Analysis ?', 'http://localhost:5002/uploads/course_audio/audio_125_20250726_193814.wav', 579, 27165, 2, '2025-07-26 08:08:14', 'English'),
(43, 125, 'Percentage Change Calculations', 'http://localhost:5002/uploads/course_audio/audio_125_20250726_194732.wav', 457, 21465, 3, '2025-07-26 08:17:32', 'English'),
(44, 126, 'Vector Part 1: Fundamentals', 'http://localhost:5002/uploads/course_audio/audio_126_20250726_195415.wav', 441, 20704, 1, '2025-07-26 08:24:15', 'English'),
(45, 126, 'Vector Part 2: Algebra and Multiplication', 'http://localhost:5002/uploads/course_audio/audio_126_20250726_200117.wav', 695, 32610, 2, '2025-07-26 08:31:17', 'English'),
(46, 126, 'Vector Part 3: Advanced Applications and Problems', 'http://localhost:5002/uploads/course_audio/audio_126_20250726_200831.wav', 548, 25708, 3, '2025-07-26 08:38:31', 'English'),
(47, 127, 'Projectile Motion Part 2: Core Formulas & Relations', 'http://localhost:5002/uploads/course_audio/audio_127_20250726_204010.wav', 527, 24714, 2, '2025-07-26 09:10:11', 'English'),
(48, 127, 'Projectile Motion Part 1: Fundamentals & Trajectory', 'http://localhost:5002/uploads/course_audio/audio_127_20250726_204225.wav', 510, 23923, 1, '2025-07-26 09:12:25', 'English'),
(49, 127, 'Projectile Motion Part 3: Advanced Concepts & Problems', 'http://localhost:5002/uploads/course_audio/audio_127_20250726_205007.wav', 623, 29207, 3, '2025-07-26 09:20:08', 'English'),
(51, 127, 'Projectile', 'http://localhost:5002/uploads/course_audio/audio_127_20250813_200541.m4a', 300, 17870, 1, '2025-08-13 08:35:41', 'Nepali'),
(52, 35, 'kkk', 'http://localhost:5002/uploads/course_audio/audio_35_20250813_201138.m4a', 300, 17870, 1, '2025-08-13 08:41:39', 'Nepali');

-- --------------------------------------------------------

--
-- Table structure for table `course_instructors`
--

CREATE TABLE `course_instructors` (
  `id` int(11) NOT NULL,
  `course_id` int(11) NOT NULL,
  `instructor_id` int(11) NOT NULL,
  `role` enum('primary','secondary','guest','assistant') NOT NULL DEFAULT 'secondary',
  `responsibilities` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Specific responsibilities for this course' CHECK (json_valid(`responsibilities`)),
  `compensation_type` enum('fixed','percentage','hourly','none') DEFAULT 'none',
  `compensation_amount` decimal(10,2) DEFAULT 0.00,
  `status` enum('active','inactive','completed') DEFAULT 'active',
  `assigned_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `started_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Multiple instructors assigned to courses';

--
-- Dumping data for table `course_instructors`
--

INSERT INTO `course_instructors` (`id`, `course_id`, `instructor_id`, `role`, `responsibilities`, `compensation_type`, `compensation_amount`, `status`, `assigned_at`, `started_at`, `completed_at`) VALUES
(1, 1, 1, 'primary', NULL, 'none', 0.00, 'active', '2025-09-01 04:56:55', NULL, NULL),
(2, 2, 1, 'primary', NULL, 'none', 0.00, 'active', '2025-09-01 04:56:55', NULL, NULL),
(3, 3, 1, 'secondary', NULL, 'none', 0.00, 'active', '2025-09-01 04:56:55', NULL, NULL),
(4, 1, 2, 'secondary', NULL, 'none', 0.00, 'active', '2025-09-01 04:56:55', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `course_notes_content`
--

CREATE TABLE `course_notes_content` (
  `id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `markdown_format` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `course_notes_content`
--

INSERT INTO `course_notes_content` (`id`, `topic_id`, `content`, `markdown_format`, `created_at`, `updated_at`) VALUES
(1, 1, '# Introduction to Web Development\n\nWeb development is the work involved in developing a website for the Internet or an intranet. Web development can range from developing a simple single static page of plain text to complex web applications, electronic businesses, and social network services.\n\n## Key Technologies\n\n### Frontend\n- HTML: Structure of web pages\n- CSS: Styling and layout\n- JavaScript: Interactive elements\n\n### Backend\n- PHP, Python, Node.js, Ruby\n- Databases: MySQL, MongoDB\n\n## Getting Started\n\nTo start with web development, you need:\n1. A text editor or IDE\n2. Understanding of HTML and CSS\n3. Basic knowledge of programming concepts\n4. A web browser for testing', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(2, 2, '# HTML Fundamentals\n\nHTML (Hypertext Markup Language) is the standard markup language for documents designed to be displayed in a web browser.\n\n## Basic Structure\n```html\n<!DOCTYPE html>\n<html>\n<head>\n    <title>Page Title</title>\n</head>\n<body>\n    <h1>This is a Heading</h1>\n    <p>This is a paragraph.</p>\n</body>\n</html>\n```\n\n## Common Elements\n- `<div>` - A division or section\n- `<span>` - An inline container\n- `<img>` - An image\n- `<a>` - A hyperlink\n- `<ul>`, `<ol>`, `<li>` - Lists\n\n## Semantic Elements\n- `<header>` - Document header\n- `<footer>` - Document footer\n- `<article>` - Independent content\n- `<section>` - Thematic grouping of content\n- `<nav>` - Navigation links', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(3, 3, '# CSS Styling Basics\n\nCSS (Cascading Style Sheets) is a style sheet language used for describing the presentation of a document written in HTML.\n\n## Syntax\n```css\nselector {\n    property: value;\n}\n```\n\n## Ways to Include CSS\n1. **Inline CSS** - Using the style attribute\n2. **Internal CSS** - Using the `<style>` tag in the head section\n3. **External CSS** - Using an external .css file\n\n## Common Properties\n- `color` - Text color\n- `background-color` - Background color\n- `font-size` - Size of the font\n- `margin` - Space around elements\n- `padding` - Space inside elements\n- `border` - Border around elements\n\n## Box Model\nEvery element in HTML is a box that consists of:\n- Content\n- Padding\n- Border\n- Margin', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(4, 4, '# JavaScript Fundamentals\n\nJavaScript is a programming language that enables interactive web pages and is an essential part of web applications.\n\n## Variables\n```javascript\n// Variable declaration\nlet name = \"John\";\nconst age = 30;\nvar isStudent = true;\n```\n\n## Functions\n```javascript\n// Function declaration\nfunction greet(name) {\n    return \"Hello, \" + name + \"!\";\n}\n\n// Arrow function\nconst multiply = (a, b) => a * b;\n```\n\n## Control Structures\n```javascript\n// Conditional statements\nif (age >= 18) {\n    console.log(\"Adult\");\n} else {\n    console.log(\"Minor\");\n}\n\n// Loops\nfor (let i = 0; i < 5; i++) {\n    console.log(i);\n}\n```\n\n## DOM Manipulation\n```javascript\n// Selecting elements\nconst element = document.getElementById(\"myId\");\n\n// Modifying content\nelement.innerHTML = \"New content\";\n\n// Adding event listeners\nelement.addEventListener(\"click\", function() {\n    alert(\"Element clicked!\");\n});\n```', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(5, 5, '<h1>Introduction to React.js</h1>\n<p>React is a JavaScript library for building user interfaces, particularly single-page applications.</p>\n<h2>Key Concepts</h2>\n<ul>\n    <li><strong>Components:</strong> Reusable, self-contained pieces of code</li>\n    <li><strong>Props:</strong> Data passed to components</li>\n    <li><strong>State:</strong> Internal data storage within a component</li>\n    <li><strong>JSX:</strong> JavaScript XML syntax</li>\n</ul>\n<h2>Creating a Component</h2>\n<pre><code>import React from \'react\';\n\nfunction Welcome(props) {\n    return &lt;h1&gt;Hello, {props.name}&lt;/h1&gt;;\n}\n\nexport default Welcome;</code></pre>', 0, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(6, 6, '# Database Design Principles\n\n## Normalization\n\nNormalization is the process of organizing data in a database to reduce redundancy and improve data integrity.\n\n### First Normal Form (1NF)\n- Eliminate duplicative columns from the same table\n- Create separate tables for each group of related data\n- Identify each row with a unique column or set of columns (primary key)\n\n### Second Normal Form (2NF)\n- Meet all requirements of 1NF\n- Remove subsets of data that apply to multiple rows and place them in separate tables\n- Create relationships between these new tables and their predecessors through foreign keys\n\n### Third Normal Form (3NF)\n- Meet all requirements of 2NF\n- Remove columns that are not dependent on the primary key\n\n## ER Diagrams\n\nEntity-Relationship (ER) diagrams are graphical representations of database designs. They include:\n\n- **Entities**: Objects or concepts that contain data\n- **Attributes**: Properties of entities\n- **Relationships**: Connections between entities\n\n## Indexing\n\nIndexes improve database performance by allowing the database server to find and retrieve specific rows much faster.\n\n### Types of Indexes:\n- **Primary Key**: Unique identifier for each row\n- **Unique Index**: Prevents duplicate entries in a column\n- **Composite Index**: Index on multiple columns\n- **Full-Text Index**: For searching text contents efficiently', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(7, 7, '# Mobile App Development with Flutter\n\n## What is Flutter?\n\nFlutter is Google\'s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.\n\n## Key Features\n\n- **Hot Reload**: Make changes and see them instantly\n- **Native Performance**: Flutter compiles to native code\n- **Rich Widget Library**: Pre-built UI components\n- **Cross-Platform**: One codebase for multiple platforms\n\n## Basic Structure of a Flutter App\n\n```dart\nimport \'package:flutter/material.dart\';\n\nvoid main() {\n  runApp(MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: \'Flutter Demo\',\n      theme: ThemeData(\n        primarySwatch: Colors.blue,\n      ),\n      home: MyHomePage(title: \'Flutter Demo Home Page\'),\n    );\n  }\n}\n```\n\n## Widgets\n\nEverything in Flutter is a widget. Widgets can be:\n\n- **StatelessWidget**: Immutable, cannot change their state\n- **StatefulWidget**: Can change their state during the lifetime of the widget\n\n## State Management\n\nFlutter offers several ways to manage state:\n\n1. **setState()**: For simple state management\n2. **Provider**: For moderate complexity\n3. **Bloc/Cubit**: For complex applications\n4. **Redux/MobX**: Alternative approaches', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(8, 8, '# Cloud Computing Fundamentals\n\n## What is Cloud Computing?\n\nCloud computing is the delivery of computing services?including servers, storage, databases, networking, software, analytics, and intelligence?over the Internet (\"the cloud\") to offer faster innovation, flexible resources, and economies of scale.\n\n## Service Models\n\n### Infrastructure as a Service (IaaS)\n- Provides virtualized computing resources\n- Examples: AWS EC2, Google Compute Engine, Azure VMs\n\n### Platform as a Service (PaaS)\n- Provides platforms allowing customers to develop, run, and manage applications\n- Examples: Heroku, Google App Engine, Azure App Service\n\n### Software as a Service (SaaS)\n- Delivers software applications over the internet\n- Examples: Google Workspace, Microsoft 365, Salesforce\n\n## Deployment Models\n\n### Public Cloud\n- Services offered over the public internet\n- Available to anyone who wants to purchase them\n\n### Private Cloud\n- Cloud infrastructure operated solely for a single organization\n- Can be managed internally or by a third party\n\n### Hybrid Cloud\n- Combination of public and private clouds\n- Allows data and applications to be shared between them\n\n## Key Benefits\n\n- **Cost Efficiency**: Pay-as-you-go pricing\n- **Scalability**: Easy to scale resources up or down\n- **Reliability**: Data backup, disaster recovery, and business continuity\n- **Performance**: Regular upgrades to the latest technology\n- **Security**: Policies, technologies, and controls that strengthen security', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(9, 9, '# Data Science and Machine Learning Basics\n\n## What is Data Science?\n\nData Science is an interdisciplinary field that uses scientific methods, processes, algorithms, and systems to extract knowledge and insights from structured and unstructured data.\n\n## The Data Science Process\n\n1. **Data Collection**: Gathering data from various sources\n2. **Data Cleaning**: Handling missing values, outliers, and inconsistencies\n3. **Exploratory Data Analysis (EDA)**: Understanding patterns, relationships, and trends\n4. **Feature Engineering**: Creating new features from existing ones\n5. **Modeling**: Building predictive models using machine learning algorithms\n6. **Evaluation**: Assessing model performance\n7. **Deployment**: Implementing the model in a production environment\n\n## Common Machine Learning Algorithms\n\n### Supervised Learning\n- **Linear Regression**: Predicts continuous values\n- **Logistic Regression**: Used for binary classification\n- **Decision Trees**: Tree-like model of decisions\n- **Random Forest**: Ensemble of decision trees\n- **Support Vector Machines (SVM)**: Classifies data by finding the hyperplane\n\n### Unsupervised Learning\n- **K-means Clustering**: Groups similar data points together\n- **Hierarchical Clustering**: Creates a tree of clusters\n- **Principal Component Analysis (PCA)**: Reduces dimensionality\n\n## Tools and Libraries\n\n- **Python**: The most popular language for data science\n- **Libraries**: NumPy, Pandas, Matplotlib, Scikit-learn, TensorFlow, PyTorch\n- **Jupyter Notebooks**: Interactive computing environment\n- **R**: Statistical programming language\n- **SQL**: For database querying and manipulation', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(10, 10, '# Cybersecurity Fundamentals\n\n## What is Cybersecurity?\n\nCybersecurity is the practice of protecting systems, networks, and programs from digital attacks. These attacks are usually aimed at accessing, changing, or destroying sensitive information, extorting money from users, or interrupting normal business processes.\n\n## Types of Cyber Threats\n\n### Malware\n- **Viruses**: Malicious code that attaches to clean code and spreads\n- **Ransomware**: Blocks access to data until a ransom is paid\n- **Spyware**: Collects information without user knowledge\n\n### Social Engineering\n- **Phishing**: Fraudulent attempts to obtain sensitive information\n- **Pretexting**: Creating a fabricated scenario to obtain information\n- **Baiting**: Offering something enticing to entrap a victim\n\n### Network Attacks\n- **DDoS**: Overwhelming a system to make it unavailable\n- **Man-in-the-Middle**: Intercepting and possibly altering communication\n- **SQL Injection**: Inserting malicious code into SQL statements\n\n## Security Measures\n\n### Authentication\n- **Passwords**: Strong, unique passwords for each account\n- **Two-Factor Authentication (2FA)**: Additional layer of security\n- **Biometrics**: Fingerprints, facial recognition\n\n### Protection\n- **Firewalls**: Monitor and filter network traffic\n- **Antivirus Software**: Detect and remove malware\n- **Encryption**: Convert information into a code to prevent unauthorized access\n\n### Practices\n- **Regular Updates**: Keep software and systems up to date\n- **Backup**: Regular data backups to prevent data loss\n- **Training**: Educate users about security risks and best practices', 1, '2025-07-25 01:11:38', '2025-07-25 01:11:38'),
(18, 126, '# 🚀 The Ultimate Vector Guide for IOE Entrance\n\nWelcome to the comprehensive guide on Vectors, tailored specifically for the Institute of Engineering (IOE) entrance exam. This document goes beyond the basics to cover advanced concepts, problem-solving strategies, and the kind of questions you\'ll face.\n\n---\n\n## 1. The Foundation: Scalars, Vectors, and Tensors\n\n### 1.1. Scalars vs. Vectors: The Core Distinction\n\n| Feature | Scalars | Vectors |\n| :--- | :--- | :--- |\n| **Definition** | Quantities with **magnitude only**. | Quantities with both **magnitude and direction**. |\n| **Algebra** | Follow simple arithmetic. | Obey specific laws of **vector algebra**. |\n| **Key Examples** | • Distance, Speed, Mass, Time<br>• Work, Energy, Power<br>• **Electric Potential**, Potential Difference<br>• **Electric/Magnetic Flux**<br>• Electric Current | • Displacement, Velocity, Acceleration, Force<br>• Momentum, Impulse<br>• **Electric/Magnetic Field Intensity**<br>• **Potential Gradient**, Temperature Gradient<br>• **Current Density** ($\\vec{J}$) |\n\n**IOE Tip:** Be careful with similar-sounding terms. *Potential* is a scalar, but *Potential Gradient* ($\\vec{E} = -\\nabla V$) is a vector. *Current* is a scalar, but *Current Density* is a vector.\n\n### 1.2. Tensors: Beyond Scalars and Vectors\n\nA tensor is a more general quantity whose magnitude can vary with direction.\n* **Definition:** A physical quantity that requires more than one direction to be fully described, or whose value depends on the chosen coordinate system.\n* **IOE Priority:** If a question asks to classify a quantity like Moment of Inertia and \"Tensor\" is an option, **it is the most correct answer**. If not, it\'s treated as a scalar for simplicity.\n* **Common Tensors:**\n    * **Moment of Inertia (I):** Its value depends on the axis of rotation.\n    * **Stress & Strain:** Describe forces and deformations within a material.\n    * **Modulus of Elasticity (Y, B, K)**\n    * **Coefficient of Viscosity ($\\eta$)**\n    * **Refractive Index ($\\mu$)** (in anisotropic crystals)\n\n### 1.3. The Area Vector\n\nArea can be treated as a vector, which is crucial for flux calculations in electromagnetism.\n* **Direction:** The area vector is always **perpendicular (normal)** to the surface.\n* **Open Surface:** The direction is ambiguous and depends on the context (e.g., defined by the Right-Hand Rule).\n* **Closed Surface (e.g., a sphere):** The direction is always taken as the **outward normal**.\n\n---\n\n## 2. Types and Representation of Vectors\n\n### 2.1. Fundamental Vector Types\n\n* **Position Vector ($\\vec{r}$):** A vector that specifies the location of a point in space relative to a fixed origin. In Cartesian coordinates, $\\vec{r} = x\\hat{i} + y\\hat{j} + z\\hat{k}$.\n* **Displacement Vector ($\\Delta\\vec{r}$):** The change in position. It points from the initial position to the final position. $\\Delta\\vec{r} = \\vec{r}_{final} - \\vec{r}_{initial}$.\n* **Unit Vector ($\\hat{a}$):** A dimensionless vector with a magnitude of 1, used purely to indicate direction. $\\hat{a} = \\frac{\\vec{a}}{|\\vec{a}|}$.\n* **Null Vector ($\\vec{0}$):** A vector with zero magnitude and an arbitrary/undefined direction.\n* **Polar Vectors:** Have a clear starting point and act along a line (e.g., Force, Displacement).\n* **Axial Vectors (Pseudovectors):** Represent rotational effects and act along the axis of rotation. Their direction is given by the **Right-Hand Thumb/Screw Rule**. (e.g., Torque, Angular Velocity).\n\n### 2.2. Direction Cosines\n\nFor a vector $\\vec{A} = A_x\\hat{i} + A_y\\hat{j} + A_z\\hat{k}$ making angles $\\alpha, \\beta, \\gamma$ with the x, y, and z axes respectively:\n* The direction cosines are:\n    * $l = \\cos\\alpha = \\frac{A_x}{|\\vec{A}|}$\n    * $m = \\cos\\beta = \\frac{A_y}{|\\vec{A}|}$\n    * $n = \\cos\\gamma = \\frac{A_z}{|\\vec{A}|}$\n* **Crucial Identity:** $l^2 + m^2 + n^2 = \\cos^2\\alpha + \\cos^2\\beta + \\cos^2\\gamma = 1$.\n\n---\n\n## 3. Vector Algebra: The Engine of Problem-Solving\n\n### 3.1. Addition and Subtraction\n\n| Operation | Resultant Formula | Key Insights for IOE |\n| :--- | :--- | :--- |\n| **Addition** | $|\\vec{a}+\\vec{b}| = \\sqrt{a^2 + b^2 + 2ab\\cos\\theta}$ | Resultant is maximum at $\\theta=0^\\circ$ and minimum at $\\theta=180^\\circ$. |\n| **Subtraction** | $|\\vec{a}-\\vec{b}| = \\sqrt{a^2 + b^2 - 2ab\\cos\\theta}$ | Represents the vector from the tip of $\\vec{b}$ to the tip of $\\vec{a}$. |\n\n#### IOE Hot-Spot: Comparing Sum and Difference\n\n* If $\\theta$ is **acute** ($0^\\circ \\le \\theta < 90^\\circ$), then $|\\vec{a}+\\vec{b}| > |\\vec{a}-\\vec{b}|$.\n* If $\\theta = 90^\\circ$, then $|\\vec{a}+\\vec{b}| = |\\vec{a}-\\vec{b}| = \\sqrt{a^2+b^2}$.\n* If $\\theta$ is **obtuse** ($90^\\circ < \\theta \\le 180^\\circ$), then $|\\vec{a}+\\vec{b}| < |\\vec{a}-\\vec{b}|$.\n\n#### Special Cases for Equal Magnitude Vectors ($|\\vec{a}|=|\\vec{b}|=A$)\n\nThese are huge time-savers in MCQs.\n* **Sum:** $|\\vec{a}+\\vec{b}| = 2A\\cos(\\theta/2)$\n* **Difference:** $|\\vec{a}-\\vec{b}| = 2A\\sin(\\theta/2)$\n* If $|\\vec{a}+\\vec{b}| = A$, then $\\theta = 120^\\circ$.\n* If $|\\vec{a}-\\vec{b}| = A$, then $\\theta = 60^\\circ$.\n\n### 3.2. Resolution of Vectors\n\nAny vector can be broken down into components. The most useful are **rectangular components**.\n* **2D:** $\\vec{A} = (A\\cos\\theta)\\hat{i} + (A\\sin\\theta)\\hat{j}$\n* **3D:** $\\vec{A} = A_x\\hat{i} + A_y\\hat{j} + A_z\\hat{k}$\n* **Key Fact:** The magnitude of a rectangular component of a vector can never be greater than the magnitude of the vector itself.\n\n---\n\n## 4. Vector Multiplication: The Key to Physics Applications\n\n### 4.1. Scalar (Dot) Product: $\\vec{a} \\cdot \\vec{b}$\n\n**Result:** A Scalar\n**Formula:** $\\vec{a} \\cdot \\vec{b} = ab\\cos\\theta = a_x b_x + a_y b_y + a_z b_z$\n\n#### Core Applications for IOE:\n\n1.  **To find the angle between two vectors:**\n    $\\cos\\theta = \\frac{\\vec{a} \\cdot \\vec{b}}{|\\vec{a}||\\vec{b}|}$\n    * **Condition for Perpendicularity:** $\\vec{a} \\cdot \\vec{b} = 0$.\n\n2.  **To find Projection and Component:**\n    * **Projection** of $\\vec{A}$ on $\\vec{B}$ (a scalar length): $A\\cos\\theta = \\frac{\\vec{A} \\cdot \\vec{B}}{|\\vec{B}|} = \\vec{A} \\cdot \\hat{B}$\n    * **Component Vector** of $\\vec{A}$ along $\\vec{B}$ (a vector): $(A\\cos\\theta)\\hat{B} = \\left(\\frac{\\vec{A} \\cdot \\vec{B}}{|\\vec{B}|^2}\\right)\\vec{B}$\n\n### 4.2. Vector (Cross) Product: $\\vec{a} \\times \\vec{b}$\n\n**Result:** A Vector, perpendicular to both $\\vec{a}$ and $\\vec{b}$.\n**Magnitude:** $|\\vec{a} \\times \\vec{b}| = ab\\sin\\theta$\n**Direction:** Given by the Right-Hand Rule.\n\n#### Core Applications for IOE:\n\n1.  **To find a vector perpendicular to a plane:**\n    The cross product $\\vec{a} \\times \\vec{b}$ is perpendicular to the plane containing $\\vec{a}$ and $\\vec{b}$. A unit vector is $\\hat{n} = \\frac{\\vec{a} \\times \\vec{b}}{|\\vec{a} \\times \\vec{b}|}$.\n\n2.  **To check for collinearity (parallel/anti-parallel vectors):**\n    $\\vec{a} \\times \\vec{b} = \\vec{0}$.\n\n3.  **To calculate Area:**\n    * Area of Parallelogram with adjacent sides $\\vec{a}, \\vec{b}$: $|\\vec{a} \\times \\vec{b}|$\n    * Area of Triangle with adjacent sides $\\vec{a}, \\vec{b}$: $\\frac{1}{2}|\\vec{a} \\times \\vec{b}|$\n    * Area of Parallelogram with diagonals $\\vec{d_1}, \\vec{d_2}$: $\\frac{1}{2}|\\vec{d_1} \\times \\vec{d_2}|$\n\n4.  **Physics Applications:**\n    * Torque: $\\vec{\\tau} = \\vec{r} \\times \\vec{F}$\n    * Angular Momentum: $\\vec{L} = \\vec{r} \\times \\vec{p}$\n    * Lorentz Force: $\\vec{F} = q(\\vec{v} \\times \\vec{B})$\n\n---\n\n## 5. Advanced Topics & IOE Problem Hot-Spots\n\n### 5.1. Relative Velocity: Rain-Man & River-Boat Problems\n\nThese are classic IOE questions. The key is the formula: $\\vec{v}_{AB} = \\vec{v}_A - \\vec{v}_B$.\n\n* **Rain-Man Problem:** A man walking in rain. $\\vec{v}_{rain, man} = \\vec{v}_{rain} - \\vec{v}_{man}$. To not get wet, the man must hold his umbrella in the direction opposite to $\\vec{v}_{rain, man}$.\n* **River-Boat Problem:**\n    * **Shortest Time:** To cross the river in the shortest time, the swimmer must swim perpendicular to the river flow. Time $t = \\frac{d}{v_s}$, where $d$ is river width and $v_s$ is swimming speed. The drift will be $x = v_r \\times t$.\n    * **Shortest Path (Zero Drift):** To cross without drifting, the swimmer must swim upstream at an angle $\\theta$ such that the component of their velocity cancels the river velocity ($v_s \\sin\\theta = v_r$). This is only possible if $v_s > v_r$.\n\n### 5.2. Equilibrium and Lami\'s Theorem\n\n* **Condition for Equilibrium:** The vector sum of all forces is zero ($\\sum \\vec{F} = 0$). Graphically, the force vectors form a closed polygon.\n* **Lami\'s Theorem:** For three forces in equilibrium, $\\frac{F_1}{\\sin\\alpha} = \\frac{F_2}{\\sin\\beta} = \\frac{F_3}{\\sin\\gamma}$, where $\\alpha$ is the angle opposite to $F_1$, etc.\n\n### 5.3. Scalar and Vector Triple Product\n\nThis is an advanced topic that can give you an edge.\n\n* **Scalar Triple Product (Box Product):** $\\vec{A} \\cdot (\\vec{B} \\times \\vec{C})$\n    * **Geometric Meaning:** Represents the **volume of the parallelepiped** formed by the three vectors.\n    * **Condition for Coplanarity:** If three vectors lie on the same plane, the volume is zero. Thus, $\\vec{A} \\cdot (\\vec{B} \\times \\vec{C}) = 0$. This is the most tested concept from this topic.\n\n* **Vector Triple Product:** $\\vec{A} \\times (\\vec{B} \\times \\vec{C})$\n    * **Result:** A vector that lies in the plane of $\\vec{B}$ and $\\vec{C}$.\n    * **BAC-CAB Rule:** $\\vec{A} \\times (\\vec{B} \\times \\vec{C}) = \\vec{B}(\\vec{A}\\cdot\\vec{C}) - \\vec{C}(\\vec{A}\\cdot\\vec{B})$.\n\n### 5.4. Change in a Vector\n\nThis is a very common question type, especially in mechanics. For a vector $\\vec{A}$ that rotates by an angle $\\theta$ while its magnitude $A$ remains constant:\n* **The change is:** $\\Delta\\vec{A} = \\vec{A}_{final} - \\vec{A}_{initial}$\n* **Magnitude of the change:** $|\\Delta\\vec{A}| = 2A\\sin(\\theta/2)$\n* **Applications:**\n    * **Uniform Circular Motion:** Change in velocity after rotating by $\\theta$ is $2v\\sin(\\theta/2)$.\n    * **Elastic Collision with a Wall:** Change in momentum of a ball hitting a wall at angle $\\alpha$ with the normal and reflecting is $2p\\cos\\alpha$.\n\n---\n\n## 6. Solved IOE-Style Examples\n\n### Example 1: Dot Product & Projections\n**Q:** Given vectors $\\vec{P} = 2\\hat{i} - \\hat{j} + 2\\hat{k}$ and $\\vec{Q} = 4\\hat{i} - 3\\hat{k}$. Find (a) the angle between them and (b) the scalar projection of $\\vec{P}$ on $\\vec{Q}$.\n\n**Solution:**\n(a) **Angle:**\n1.  Find the dot product: $\\vec{P} \\cdot \\vec{Q} = (2)(4) + (-1)(0) + (2)(-3) = 8 - 6 = 2$.\n2.  Find the magnitudes:\n    $|\\vec{P}| = \\sqrt{2^2 + (-1)^2 + 2^2} = \\sqrt{4+1+4} = \\sqrt{9} = 3$.\n    $|\\vec{Q}| = \\sqrt{4^2 + 0^2 + (-3)^2} = \\sqrt{16+9} = \\sqrt{25} = 5$.\n3.  Use the formula: $\\cos\\theta = \\frac{\\vec{P} \\cdot \\vec{Q}}{|\\vec{P}||\\vec{Q}|} = \\frac{2}{3 \\times 5} = \\frac{2}{15}$.\n    So, $\\theta = \\cos^{-1}\\left(\\frac{2}{15}\\right)$.\n\n(b) **Projection:**\n1.  Projection of $\\vec{P}$ on $\\vec{Q}$ is $\\frac{\\vec{P} \\cdot \\vec{Q}}{|\\vec{Q}|}$.\n2.  Substitute values: $\\frac{2}{5}$.\n\n### Example 2: Cross Product & Area\n**Q:** Find a unit vector perpendicular to both $\\vec{A} = \\hat{i} + \\hat{j} - \\hat{k}$ and $\\vec{B} = 2\\hat{i} - \\hat{j} + 3\\hat{k}$.\n\n**Solution:**\n1.  A vector perpendicular to both is their cross product, $\\vec{C} = \\vec{A} \\times \\vec{B}$.\n2.  Calculate the determinant:\n    $\\vec{C} = \\begin{vmatrix} \\hat{i} & \\hat{j} & \\hat{k} \\\\ 1 & 1 & -1 \\\\ 2 & -1 & 3 \\end{vmatrix} = \\hat{i}(3-1) - \\hat{j}(3 - (-2)) + \\hat{k}(-1-2) = 2\\hat{i} - 5\\hat{j} - 3\\hat{k}$.\n3.  Find the magnitude of $\\vec{C}$: $|\\vec{C}| = \\sqrt{2^2 + (-5)^2 + (-3)^2} = \\sqrt{4+25+9} = \\sqrt{38}$.\n4.  The unit vector is $\\hat{n} = \\frac{\\vec{C}}{|\\vec{C}|} = \\frac{2\\hat{i} - 5\\hat{j} - 3\\hat{k}}{\\sqrt{38}}$.\n\n### Example 3: Change in Momentum\n**Q:** A ball of mass 2 kg moving at 10 m/s hits a wall at an angle of 60° with the wall and reflects at the same angle. Find the magnitude of the change in momentum.\n\n**Solution:**\n1.  **Angle with the normal:** The angle with the wall is 60°, so the angle with the normal is $\\alpha = 90^\\circ - 60^\\circ = 30^\\circ$.\n2.  **Initial Momentum:** $p = mv = 2 \\times 10 = 20$ kg m/s.\n3.  **Formula for change:** The change in momentum for reflection is $|\\Delta\\vec{p}| = 2p\\cos\\alpha$.\n4.  **Calculate:** $|\\Delta\\vec{p}| = 2(20)\\cos(30^\\circ) = 40 \\times \\frac{\\sqrt{3}}{2} = 20\\sqrt{3}$ kg m/s.\n\n---\n\n## 7. Final Revision: Formula Quick-Sheet\n\n| Concept | Formula | When to Use |\n| :--- | :--- | :--- |\n| **Vector Sum** | $|\\vec{A}+\\vec{B}| = \\sqrt{A^2+B^2+2AB\\cos\\theta}$ | Finding resultant of two vectors. |\n| **Vector Difference** | $|\\vec{A}-\\vec{B}| = \\sqrt{A^2+B^2-2AB\\cos\\theta}$ | Relative velocity, change in a vector. |\n| **Sum (Equal Mag.)** | $|\\vec{A}+\\vec{A}| = 2A\\cos(\\theta/2)$ | Quick calculation for two equal vectors. |\n| **Difference (Equal Mag.)**| $|\\vec{A}-\\vec{A}| = 2A\\sin(\\theta/2)$ | Change in velocity/momentum in UCM. |\n| **Dot Product** | $\\vec{A}\\cdot\\vec{B} = AB\\cos\\theta = A_xB_x+...$ | Finding angle, projection, work done. |\n| **Cross Product** | $|\\vec{A}\\times\\vec{B}| = AB\\sin\\theta$ | Finding area, torque, perpendicular vector. |\n| **Perpendicularity** | $\\vec{A} \\cdot \\vec{B} = 0$ | To prove two vectors are orthogonal. |\n| **Collinearity** | $\\vec{A} \\times \\vec{B} = \\vec{0}$ | To prove two vectors are parallel. |\n| **Coplanarity** | $\\vec{A} \\cdot (\\vec{B} \\times \\vec{C}) = 0$ | To prove three vectors lie on the same plane. |\n| **Area of Parallelogram**| $Area = |\\vec{A} \\times \\vec{B}|$ (sides) or $\\frac{1}{2}|\\vec{d_1}\\times\\vec{d_2}|$ (diagonals) | Geometry problems. |\n| **Relative Velocity** | $\\vec{v}_{AB} = \\vec{v}_A - \\vec{v}_B$ | Rain-man, river-boat, two-body motion. |', 1, '2025-07-25 21:30:13', '2025-07-25 22:48:33'),
(19, 125, '# Unit, Dimension, Error & Percentage Change\n\nThis note covers the fundamental concepts of physical quantities, their dimensions, error analysis in measurements, and how to calculate percentage changes, which are crucial topics for physics entrance exams.\n\n---\n\n## 1. Units and Dimensions\n\n### 1.1 Fundamental Quantities and Dimensions\n\n[cite_start]**Dimension** refers to the powers to which fundamental quantities must be raised to represent a physical quantity[cite: 3].\n\n[cite_start]Here are the seven fundamental quantities recognized by the International System of Units (SI)[cite: 5].\n\n| Fundamental Quantity  | SI Unit  | Symbol | Dimension |\n| --------------------- | -------- | ------ | :-------: |\n| Length                | Meter    | m      |   `[L]`   |\n| Mass                  | Kilogram | kg     |   `[M]`   |\n| Time                  | Second   | s      |   `[T]`   |\n| Temperature           | Kelvin   | K      |  `[K]` or `[θ]`  |\n| Luminous Intensity    | Candela  | cd     |  `[cd]` or `[J]`  |\n| Electric Current      | Ampere   | A      |  `[A]` or `[I]`  |\n| Amount of Substance   | Mole     | mol    | `[N]` or `[mol]` |\n\n### 1.2 Derived Quantities and Their Dimensions\n\nMany physical quantities have the same dimensions. Understanding these groups is key to solving problems quickly.\n\n| Set of Physical Quantities                                  | Dimensional Formula        |\n| ----------------------------------------------------------- | -------------------------- |\n| Acceleration, Gravitational Field Strength, g               | [cite_start]`$[LT^{-2}]$` [cite: 6]              |\n| Linear Momentum, Impulse                                    | [cite_start]`$[MLT^{-1}]$` [cite: 6]             |\n| Work, Energy, Torque, Couple, Moment, Heat, Work Function    | [cite_start]`$[ML^2T^{-2}]$` [cite: 6]           |\n| Angular Velocity, Frequency, Velocity Gradient, Decay Constant | [cite_start]`$[T^{-1}]$` [cite: 6]               |\n| Force, Thrust, Weight, Tension, Energy Gradient             | [cite_start]`$[MLT^{-2}]$` [cite: 6]             |\n| Pressure, Stress, Modulus of Elasticity, Energy Density     | [cite_start]`$[ML^{-1}T^{-2}]$` [cite: 6]        |\n| Intensity of Radiation, Solar Constant                      | [cite_start]`$[MT^{-3}]$` [cite: 9]              |\n| Gravitational Potential, Specific Latent Heat               | [cite_start]`$[L^2T^{-2}]$` [cite: 9]            |\n| `CR`, `L/R`, `√(LC)` (Time Constants)                        | [cite_start]`$[T]$` [cite: 9, 94]                   |\n| Speed `(v)`: `1/√(μ₀ε₀)`, `E/B`                             | [cite_start]`$[LT^{-1}]$` [cite: 9]              |\n| Energy `(E)`: `hf`, `(1/2)LI²`, `(1/2)CV²`, `qV`, `I²Rt`, `V²/R * t` | [cite_start]`$[ML^2T^{-2}]$` [cite: 9]           |\n| Power `(P)`: `Fv`, `I²R`, `VI`, `V²/R`                         | [cite_start]`$[ML^2T^{-3}]$` [cite: 9]           |\n\n---\n\n## 2. Dimensional Analysis and Problems\n\n[cite_start]The **Principle of Homogeneity** states that we can only add, subtract, or equate physical quantities that have the same dimensions[cite: 114, 117]. Any valid physical equation must be dimensionally consistent.\n\n[cite_start]**Note:** Arguments of trigonometric (`sin`, `cos`), logarithmic (`log`), and exponential (`e`) functions are always dimensionless[cite: 146, 147, 148, 150].\n\n### Example 1: Dimensions of Capacitance (C)\n\n[cite_start]**Question:** What is the dimensional formula for capacitance? [cite: 20]\n\n**Solution:**\nWe can use the formula for energy stored in a capacitor, which relates energy (E), charge (q), and capacitance (C). [cite_start]A common formula is $q = CV$, and energy can be expressed as $E = \\frac{q^2}{2C}$[cite: 23, 27].\n[cite_start]Rearranging for C, we get $C = \\frac{q^2}{2E}$[cite: 27].\n[cite_start]The dimension of charge `q` is `[IT]` or `[AT]`[cite: 27].\n[cite_start]The dimension of energy `E` is `$[ML^2T^{-2}]$`[cite: 6].\n\nNow, let\'s find the dimension of C:\n[cite_start]$[C] = \\frac{[q^2]}{[E]} = \\frac{[A^2T^2]}{[ML^2T^{-2}]} = [M^{-1}L^{-2}T^4A^2]$ [cite: 28]\n\n[cite_start]**Answer:** The dimension of capacitance is `$[M^{-1}L^{-2}T^4A^2]$`[cite: 22, 28].\n\n### Example 2: Van der Waals Equation\n\n[cite_start]**Question:** In the Van der Waals equation, $(P + \\frac{a}{V^2})(V-b) = RT$, find the dimensions of the constants \'a\' and \'b\'[cite: 151].\n\n**Solution:**\nAccording to the principle of homogeneity:\n1.  [cite_start]The term $\\frac{a}{V^2}$ must have the same dimensions as Pressure (P)[cite: 151].\n2.  [cite_start]The term `b` must have the same dimensions as Volume (V)[cite: 151].\n\nFor constant \'a\':\n[cite_start]$[P] = [\\frac{a}{V^2}]$ [cite: 151]\n$[ML^{-1}T^{-2}] = \\frac{[a]}{[L^3]^2} = \\frac{[a]}{[L^6]}$\n[cite_start]$[a] = [ML^{-1}T^{-2}][L^6] = [ML^5T^{-2}]$ [cite: 165]\n\nFor constant \'b\':\n[cite_start]$[b] = [V] = [L^3]$ [cite: 166]\n\n**Answer:** The dimension of \'a\' is `$[ML^5T^{-2}]$` and \'b\' is `$[L^3]$`.\n\n### Example 3: Finding Dimensions from a Custom Equation\n\n**Question:** The velocity of a body is given by $v = A + \\frac{Bt}{C-t^2}$. [cite_start]Find the dimensions of A, B, and C[cite: 118, 119].\n\n**Solution:**\n1.  [cite_start]**Dimension of A:** From the principle of homogeneity, `[A]` must be the same as `[v]`[cite: 125].\n    [cite_start]$[A] = [v] = [LT^{-1}]$ [cite: 125]\n\n2.  [cite_start]**Dimension of C:** The term $t^2$ is subtracted from C. Therefore, `[C]` must be the same as `[t^2]`[cite: 133].\n    [cite_start]$[C] = [t^2] = [T^2]$ [cite: 133]\n\n3.  [cite_start]**Dimension of B:** The entire term $\\frac{Bt}{C-t^2}$ must have the dimension of velocity `[v]`[cite: 119, 136].\n    [cite_start]$[v] = \\frac{[B][t]}{[C]}$ [cite: 136]\n    $[LT^{-1}] = \\frac{[B][T]}{[T^2]}$\n    $[LT^{-1}] = \\frac{[B]}{[T]}$\n    [cite_start]$[B] = [LT^{-1}][T] = [L]$ [cite: 128]\n\n**Answer:** The dimensions are: `[A] = [LT^{-1}]`, `[B] = [L]`, and `[C] = [T^2]`.\n\n### Example 4: Expressing a Quantity in a New System\n\n[cite_start]**Question:** If Force (F), Length (L), and Time (T) are taken as fundamental units, what is the dimension of mass (m)? [cite: 78]\n\n**Solution:**\nWe start with the basic formula relating these quantities:\n[cite_start]$F = m \\times a$ (Force = mass × acceleration) [cite: 83]\n$[F] = [m] \\times [a]$\n$[F] = [m] \\frac{[L]}{[T^2]}$\n[cite_start]$[F] = [m][L][T^{-2}]$ [cite: 84]\n\nNow, rearrange to solve for `[m]`:\n[cite_start]$[m] = \\frac{[F]}{[L][T^{-2}]} = [F^1L^{-1}T^2]$ [cite: 87]\n\n**Answer:** The dimension of mass is `$[FL^{-1}T^2]$`.\n\n---\n\n## 3. Error Analysis\n\n[cite_start]**Error** is the deviation of a measured value from the true or standard value[cite: 177]. [cite_start]The maximum possible error is always added[cite: 178].\n\n### Rules for Propagation of Errors\n\n1.  [cite_start]**Addition and Subtraction:** If $X = A \\pm B$, the absolute error is the sum of the individual absolute errors[cite: 183].\n    [cite_start]$\\Delta X = \\pm (\\Delta A + \\Delta B)$ [cite: 184]\n\n2.  [cite_start]**Multiplication and Division:** If $X = A \\times B$ or $X = A / B$, the fractional error is the sum of the individual fractional errors[cite: 185, 188].\n    [cite_start]$\\frac{\\Delta X}{X} = \\pm \\left( \\frac{\\Delta A}{A} + \\frac{\\Delta B}{B} \\right)$ [cite: 187, 191]\n\n3.  [cite_start]**Quantities with Powers:** If $X = \\frac{A^m B^n}{C^p}$, the fractional error is calculated by summing the fractional errors, each multiplied by its respective power[cite: 192].\n    [cite_start]$\\frac{\\Delta X}{X} = \\pm \\left( m\\frac{\\Delta A}{A} + n\\frac{\\Delta B}{B} + p\\frac{\\Delta C}{C} \\right)$ [cite: 194]\n\n### Example 1: Resistors in Series and Parallel\n\n**Question:** Two resistors $R_1 = (20 \\pm 0.2) \\Omega$ and $R_2 = (30 \\pm 0.3) \\Omega$ are connected. [cite_start]Find the equivalent resistance with error limits for (a) series and (b) parallel connections[cite: 195].\n\n**Solution (a) Series:**\n[cite_start]$R_s = R_1 + R_2 = 20 + 30 = 50 \\Omega$ [cite: 196]\n[cite_start]$\\Delta R_s = \\Delta R_1 + \\Delta R_2 = 0.2 + 0.3 = 0.5 \\Omega$ [cite: 197]\n[cite_start]**Answer (Series):** $R_{eq} = (50 \\pm 0.5) \\Omega$ [cite: 197]\n\n**Solution (b) Parallel:**\n[cite_start]$R_p = \\frac{R_1 R_2}{R_1 + R_2} = \\frac{20 \\times 30}{20 + 30} = \\frac{600}{50} = 12 \\Omega$ [cite: 199]\n[cite_start]To find the error, we use the rule for multiplication and division[cite: 200, 202].\n[cite_start]$\\frac{\\Delta R_p}{R_p} = \\frac{\\Delta R_1}{R_1} + \\frac{\\Delta R_2}{R_2} + \\frac{\\Delta(R_1+R_2)}{R_1+R_2}$ [cite: 202]\n[cite_start]$\\frac{\\Delta R_p}{R_p} = \\frac{0.2}{20} + \\frac{0.3}{30} + \\frac{0.2+0.3}{50} = 0.01 + 0.01 + \\frac{0.5}{50} = 0.02 + 0.01 = 0.03$ [cite: 202, 203]\n[cite_start]$\\Delta R_p = 0.03 \\times R_p = 0.03 \\times 12 = 0.36 \\Omega$ [cite: 204]\n[cite_start]**Answer (Parallel):** $R_{eq} = (12 \\pm 0.36) \\Omega$ [cite: 205]\n\n### Example 2: Error in \'g\' from a Simple Pendulum\n\n**Question:** The length of a simple pendulum is measured with a +3% error, and the time period is measured with a -4% error. [cite_start]Calculate the percentage error in the measurement of acceleration due to gravity (g)[cite: 236].\n\n**Solution:**\n[cite_start]The formula for the time period of a simple pendulum is $T = 2\\pi\\sqrt{\\frac{l}{g}}$[cite: 240].\n[cite_start]Squaring both sides gives $T^2 = 4\\pi^2\\frac{l}{g}$[cite: 241].\n[cite_start]Rearranging for g: $g = 4\\pi^2\\frac{l}{T^2}$[cite: 241].\n\nNow, we find the percentage error. [cite_start]Note that for error calculation, we always add the errors, regardless of the sign of the individual measurement errors[cite: 178].\n$\\frac{\\Delta g}{g} \\times 100\\% = \\left( \\frac{\\Delta l}{l} + 2\\frac{\\Delta T}{T} \\right) \\times 100\\%$\n[cite_start]Percentage error in g = (% error in l) + 2 × (% error in T) [cite: 244]\n[cite_start]$= 3\\% + 2 \\times (4\\%) = 3\\% + 8\\% = 11\\%$ [cite: 245]\n\n[cite_start]**Answer:** The maximum possible percentage error in g is **11%**[cite: 245].\n\n---\n\n## 4. Percentage Change\n\n### Case 1: Very Small Percentage Changes (< 5%)\n\n[cite_start]When the percentage change in a variable is very small, the percentage change in the function can be approximated by multiplying the power of the variable with its percentage change[cite: 250].\n\n[cite_start]**Example:** If the linear momentum (p) of a body is increased by 0.6%, by how much will its kinetic energy (KE) increase? [cite: 256, 257]\n\n**Solution:**\n[cite_start]We know that $KE = \\frac{p^2}{2m}$, so $KE \\propto p^2$[cite: 260].\nThe power of `p` is 2.\nPercentage increase in KE ≈ (Power of p) × (% increase in p)\n[cite_start]≈ $2 \\times 0.6\\% = 1.2\\%$ [cite: 258]\n\n[cite_start]**Answer:** The kinetic energy will increase by approximately **1.2%**[cite: 258].\n\n### Case 2: Significant Percentage Changes (> 5%)\n\n[cite_start]When the percentage changes are large, we must use the full formula[cite: 261]. If a variable `V` is increased by `x%`, the new value is $V\' = V(1 + \\frac{x}{100})$. The percentage change in a function $F \\propto V^n$ is:\n\n[cite_start]$\\text{Percentage Change} = \\left[ \\left( \\frac{100+x}{100} \\right)^n - 1 \\right] \\times 100\\%$ [cite: 264, 263]\n\n[cite_start]**Example:** If the linear momentum (p) of a body is increased by 100%, what is the percentage increase in its kinetic energy (KE)? [cite: 266]\n\n**Solution:**\n[cite_start]Here, $x = 100$ and the power is $n=2$ (since $KE \\propto p^2$)[cite: 270, 272].\n[cite_start]$\\text{Percentage Increase in KE} = \\left[ \\left( \\frac{100+100}{100} \\right)^2 - 1 \\right] \\times 100\\%$ [cite: 274]\n$= \\left[ \\left( \\frac{200}{100} \\right)^2 - 1 \\right] \\times 100\\%$\n[cite_start]$= \\left[ (2)^2 - 1 \\right] \\times 100\\%$ [cite: 275]\n[cite_start]$= [4 - 1] \\times 100\\%$ [cite: 275]\n[cite_start]$= 3 \\times 100\\% = 300\\%$ [cite: 275]\n\n[cite_start]**Answer:** The kinetic energy will increase by **300%**[cite: 275].', 1, '2025-07-25 21:30:13', '2025-07-26 10:40:23'),
(20, 127, '# Projectile Motion: The Complete Guide for IOE Entrance\n\nThis guide provides a structured and in-depth understanding of projectile motion, covering all the essential concepts, formulas, and problem-solving techniques required for the IOE entrance exam.\n\n---\n\n### 1. What is Projectile Motion?\n\n[cite_start]A **projectile** is any object that is thrown or projected into the air and then moves under the influence of gravity alone[cite: 2]. We make a few key assumptions for simplifying our calculations:\n* [cite_start]Acceleration due to gravity (`g`) is constant (both in magnitude and direction)[cite: 7].\n* Air resistance is negligible.\n\n[cite_start]The path followed by a projectile is called its **trajectory**, which is always a parabola[cite: 15, 27].\n\n[cite_start]**The Golden Rule:** Analyze horizontal and vertical motion **independently**[cite: 6].\n* [cite_start]**Horizontal Motion (x-axis):** No acceleration ($a_x = 0$)[cite: 9]. [cite_start]The horizontal velocity is always **constant**[cite: 11, 12].\n* [cite_start]**Vertical Motion (y-axis):** Constant downward acceleration due to gravity ($a_y = -g$)[cite: 7].\n\n---\n\n### 2. Ground-to-Ground Projection\n\n[cite_start]This is the most common scenario, where a projectile is launched from the ground and lands back on the ground[cite: 16].\n\nLet\'s say a projectile is launched with an initial velocity **u** at an angle **θ** with the horizontal.\n\n* [cite_start]**Initial Horizontal Velocity ($u_x$):** $u_x = u \\cos\\theta$ [cite: 19]\n* [cite_start]**Initial Vertical Velocity ($u_y$):** $u_y = u \\sin\\theta$ [cite: 19]\n\n#### a) Equation of Trajectory\n\n[cite_start]This equation describes the parabolic path of the projectile[cite: 15].\n\nWe know:\n1.  [cite_start]Horizontal distance: $x = u_x t = (u \\cos\\theta) t \\implies t = \\frac{x}{u \\cos\\theta}$ [cite: 23]\n2.  [cite_start]Vertical distance: $y = u_y t - \\frac{1}{2}gt^2$ [cite: 25]\n\nSubstitute the value of `t` from (1) into (2):\n[cite_start]$y = (u \\sin\\theta) \\left(\\frac{x}{u \\cos\\theta}\\right) - \\frac{1}{2}g\\left(\\frac{x}{u \\cos\\theta}\\right)^2$ [cite: 31]\n\nThis gives us the two standard forms of the trajectory equation:\n\n> [cite_start]**Equation 1:** $y = x \\tan\\theta - \\frac{g x^2}{2u^2 \\cos^2\\theta}$ [cite: 27, 32]\n>\n> [cite_start]**Equation 2 (in terms of Range, R):** $y = x \\tan\\theta \\left(1 - \\frac{x}{R}\\right)$ [cite: 27, 416]\n\n#### b) Time of Flight (T)\n\n[cite_start]This is the total time the projectile remains in the air[cite: 33]. [cite_start]The net vertical displacement for a ground-to-ground projection is zero[cite: 37, 38].\nUsing $s_y = u_y t - \\frac{1}{2}gt^2$:\n[cite_start]$0 = (u \\sin\\theta) T - \\frac{1}{2}gT^2$ [cite: 34]\n$T \\left(u \\sin\\theta - \\frac{1}{2}gT\\right) = 0$\nSince $T \\neq 0$, we get:\n\n> [cite_start]**Time of Flight (T):** $T = \\frac{2u \\sin\\theta}{g} = \\frac{2u_y}{g}$ [cite: 35]\n\n* **Time to reach maximum height ($t_a$):** This is half of the total time of flight. $t_a = \\frac{T}{2} = \\frac{u\\sin\\theta}{g}$\n\n#### c) Maximum Height (H)\n\n[cite_start]This is the highest vertical distance reached by the projectile[cite: 83]. [cite_start]At this point, the final vertical velocity ($v_y$) is zero[cite: 86].\nUsing $v_y^2 = u_y^2 + 2a_y s_y$:\n[cite_start]$0^2 = (u \\sin\\theta)^2 + 2(-g)H$ [cite: 89, 90, 92]\n\n> [cite_start]**Maximum Height (H):** $H = \\frac{u^2 \\sin^2\\theta}{2g} = \\frac{u_y^2}{2g}$ [cite: 95]\n\n#### d) Horizontal Range (R)\n\n[cite_start]This is the total horizontal distance covered during the time of flight[cite: 52].\nUsing $s_x = u_x t$:\n[cite_start]$R = (u \\cos\\theta) T = (u \\cos\\theta) \\left(\\frac{2u \\sin\\theta}{g}\\right)$ [cite: 53, 54]\n\n> [cite_start]**Horizontal Range (R):** $R = \\frac{u^2 (2\\sin\\theta\\cos\\theta)}{g} = \\frac{u^2 \\sin(2\\theta)}{g} = \\frac{2u_x u_y}{g}$ [cite: 55]\n\n* [cite_start]**Maximum Range:** The range is maximum when $\\sin(2\\theta) = 1$ [cite: 60][cite_start], which means $2\\theta = 90^\\circ$, so $\\theta = 45^\\circ$[cite: 56, 61].\n    > [cite_start]$R_{max} = \\frac{u^2}{g}$ (for $\\theta = 45^\\circ$) [cite: 57]\n* [cite_start]**Complementary Angles:** The range is the same for two angles of projection, $\\theta$ and $(90^\\circ - \\theta)$, for the same initial speed `u`[cite: 64, 65, 67].\n\n---\n\n### 3. Important Relations & Special Cases\n\n#### a) Relation between R and H\n\n[cite_start]A very useful formula for quick calculations[cite: 162]:\n$R = \\frac{u^2 (2\\sin\\theta\\cos\\theta)}{g}$ and $H = \\frac{u^2 \\sin^2\\theta}{2g}$\nDividing R by H and rearranging gives:\n\n> [cite_start]$R = 4H \\cot\\theta$ [cite: 161, 166]\n\n**Special Case:** If Range equals Maximum Height ($R=H$):\n[cite_start]$H = 4H \\cot\\theta \\implies \\cot\\theta = \\frac{1}{4} \\implies \\tan\\theta = 4$ [cite: 168, 170, 171]\n[cite_start]$\\theta = \\tan^{-1}(4) \\approx 76^\\circ$ [cite: 172]\n\n#### b) Velocity at Any Time `t`\n\n* [cite_start]**Horizontal velocity ($v_x$):** $v_x = u \\cos\\theta$ (always constant) [cite: 108]\n* [cite_start]**Vertical velocity ($v_y$):** $v_y = u \\sin\\theta - gt$ [cite: 109]\n* [cite_start]**Resultant velocity ($\\vec{v}$):** $\\vec{v} = v_x \\hat{i} + v_y \\hat{j} = (u \\cos\\theta)\\hat{i} + (u \\sin\\theta - gt)\\hat{j}$ [cite: 112, 113]\n* **Speed:** $|\\vec{v}| = \\sqrt{v_x^2 + v_y^2}$\n* [cite_start]**Angle with horizontal ($\\alpha$):** $\\tan\\alpha = \\frac{v_y}{v_x} = \\frac{u\\sin\\theta - gt}{u\\cos\\theta}$ [cite: 100, 102]\n\n#### c) When is velocity perpendicular to initial velocity?\n\n[cite_start]The condition is $\\vec{v} \\cdot \\vec{u} = 0$[cite: 123].\n[cite_start]$\\big((u \\cos\\theta)\\hat{i} + (u \\sin\\theta - gt)\\hat{j}\\big) \\cdot \\big((u \\cos\\theta)\\hat{i} + (u \\sin\\theta)\\hat{j}\\big) = 0$ [cite: 122, 123]\n[cite_start]$u^2\\cos^2\\theta + u^2\\sin^2\\theta - (gt)(u\\sin\\theta) = 0$ [cite: 124]\n[cite_start]$u^2 = gut\\sin\\theta$ [cite: 125]\n\n> [cite_start]**Time when $\\vec{v} \\perp \\vec{u}$:** $t = \\frac{u}{g \\sin\\theta}$ [cite: 116, 126]\n\n---\n\n### 4. Projection from a Height (H)\n\n#### Case 1: Projected Horizontally\n\n[cite_start]A body is thrown horizontally with speed `u` from a height `H`[cite: 311].\n* Initial horizontal velocity: $u_x = u$\n* [cite_start]Initial vertical velocity: $u_y = 0$ [cite: 325]\n\n* **Time to reach ground (T):**\n    [cite_start]Use $s_y = u_y t + \\frac{1}{2}a_y t^2$[cite: 312]. Taking downward as positive displacement (`H`) and downward acceleration (`g`):\n    [cite_start]$H = (0)T + \\frac{1}{2}gT^2 \\implies T = \\sqrt{\\frac{2H}{g}}$ [cite: 314]\n* **Horizontal Range (R):**\n    [cite_start]$R = u_x T \\implies R = u \\sqrt{\\frac{2H}{g}}$ [cite: 333, 334]\n* **Velocity on striking the ground:**\n    $v_x = u$\n    [cite_start]$v_y = gt$ [cite: 339]\n    Resultant Speed: $|\\vec{v}| [cite_start]= \\sqrt{v_x^2 + v_y^2} = \\sqrt{u^2 + (gT)^2} = \\sqrt{u^2 + 2gH}$ [cite: 343, 346]\n    [cite_start]Angle of strike ($\\alpha$): $\\tan\\alpha = \\frac{v_y}{v_x} = \\frac{gT}{u} = \\frac{\\sqrt{2gH}}{u}$ [cite: 340]\n\n#### Case 2: Projected at an Angle $\\theta$\n\n* **Angle of Elevation (Upwards):**\n    [cite_start]$u_x = u\\cos\\theta$, $u_y = u\\sin\\theta$[cite: 285].\n    [cite_start]Use $s_y = u_y t + \\frac{1}{2}a_y t^2$[cite: 281]. The net vertical displacement is `-H`.\n    [cite_start]$-H = (u\\sin\\theta)t - \\frac{1}{2}gt^2$[cite: 282]. This is a quadratic equation in `t` which can be solved.\n* **Angle of Depression (Downwards):**\n    [cite_start]$u_x = u\\cos\\theta$, $u_y = -u\\sin\\theta$[cite: 306, 307, 321].\n    [cite_start]$-H = (-u\\sin\\theta)t - \\frac{1}{2}gt^2 \\implies H = (u\\sin\\theta)t + \\frac{1}{2}gt^2$[cite: 308, 309].\n\n---\n\n### 5. Energy and Momentum\n\n#### At the Highest Point (H):\n* [cite_start]Velocity is purely horizontal: $v = u\\cos\\theta$[cite: 84].\n* [cite_start]**Kinetic Energy ($KE_H$):** $KE_H = \\frac{1}{2}m(u\\cos\\theta)^2 = (\\frac{1}{2}mu^2)\\cos^2\\theta = KE_{initial} \\cos^2\\theta$[cite: 433].\n* [cite_start]**Potential Energy ($PE_H$):** $PE_H = mgH = mg\\left(\\frac{u^2\\sin^2\\theta}{2g}\\right) = (\\frac{1}{2}mu^2)\\sin^2\\theta = KE_{initial} \\sin^2\\theta$[cite: 445, 446, 447].\n* **Change in Momentum (from launch to H):**\n    [cite_start]$\\Delta\\vec{P} = \\vec{P}_f - \\vec{P}_i = (mu\\cos\\theta)\\hat{i} - (mu\\cos\\theta\\hat{i} + mu\\sin\\theta\\hat{j}) = -mu\\sin\\theta\\hat{j}$[cite: 458, 462, 463].\n    Magnitude: $|\\Delta\\vec{P}| [cite_start]= mu\\sin\\theta$[cite: 464].\n\n#### For the Entire Flight (Ground to Ground):\n* [cite_start]**Change in Kinetic Energy:** $\\Delta KE = 0$ (since speed is the same)[cite: 532].\n* [cite_start]**Change in Potential Energy:** $\\Delta PE = 0$[cite: 532].\n* **Change in Momentum:**\n    [cite_start]$\\vec{v}_f = u\\cos\\theta\\hat{i} - u\\sin\\theta\\hat{j}$ [cite: 513]\n    [cite_start]$\\vec{v}_i = u\\cos\\theta\\hat{i} + u\\sin\\theta\\hat{j}$ [cite: 430]\n    [cite_start]$\\Delta\\vec{P} = m(\\vec{v}_f - \\vec{v}_i) = m(-2u\\sin\\theta\\hat{j})$[cite: 529, 530, 533].\n    Magnitude: $|\\Delta\\vec{P}| [cite_start]= 2mu\\sin\\theta$[cite: 531, 534].\n\n---\n\n### 6. Example Problems\n\n**Example 1:** A cricket ball is hit at $45^\\circ$ to the horizontal with a kinetic energy of K. What is the kinetic energy at the highest point?\n\n**Solution:**\n[cite_start]At the highest point, $v = u\\cos\\theta$[cite: 431].\n[cite_start]$KE_{highest} = \\frac{1}{2}m(u\\cos\\theta)^2 = (\\frac{1}{2}mu^2)\\cos^2\\theta = K \\cos^2\\theta$[cite: 433].\nGiven $\\theta = 45^\\circ$, $\\cos(45^\\circ) = \\frac{1}{\\sqrt{2}}$.\n$KE_{highest} = K \\left(\\frac{1}{\\sqrt{2}}\\right)^2 = \\frac{K}{2}$.\n\n**Example 2:** A body is projected with velocity $\\vec{u} = (3\\hat{i} + 4\\hat{j})$ m/s. Find the horizontal range. [cite_start](Assume $g=10$ m/s²) [cite: 262]\n\n**Solution:**\nFrom the vector, we have:\n[cite_start]$u_x = 3$ m/s [cite: 263]\n[cite_start]$u_y = 4$ m/s [cite: 263]\n[cite_start]Using the formula $R = \\frac{2u_x u_y}{g}$[cite: 270]:\n[cite_start]$R = \\frac{2 \\times 3 \\times 4}{10} = \\frac{24}{10} = 2.4$ m[cite: 270].\n\n[cite_start]**Example 3:** For a projectile, the range R is equal to the maximum height H. Find the angle of projection[cite: 168].\n\n**Solution:**\n[cite_start]We use the relation $R = 4H\\cot\\theta$[cite: 161].\n[cite_start]Given $R=H$[cite: 168]:\n[cite_start]$H = 4H\\cot\\theta$ [cite: 170]\n$1 = 4\\cot\\theta$\n[cite_start]$\\tan\\theta = 4$ [cite: 171]\n[cite_start]$\\theta = \\tan^{-1}(4)$[cite: 172].', 1, '2025-07-25 21:30:13', '2025-07-25 22:55:57');

-- --------------------------------------------------------

--
-- Table structure for table `course_reviews`
--

CREATE TABLE `course_reviews` (
  `id` int(11) NOT NULL,
  `course_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `rating` int(1) DEFAULT NULL CHECK (`rating` between 1 and 5),
  `review` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `video_id` int(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_reviews`
--

INSERT INTO `course_reviews` (`id`, `course_id`, `user_id`, `rating`, `review`, `created_at`, `video_id`) VALUES
(1, 1, 101, 5, 'Great course for beginners! The concepts are well explained.', '2023-01-05 04:15:00', 1),
(2, 1, 102, 4, 'Good course, but could use more examples.', '2023-01-10 08:15:00', 1),
(3, 2, 103, 5, 'Excellent course for advanced learners.', '2023-02-20 03:15:00', 1);

--
-- Triggers `course_reviews`
--
DELIMITER $$
CREATE TRIGGER `update_reviews_count_after_review_delete` AFTER DELETE ON `course_reviews` FOR EACH ROW BEGIN
    DECLARE new_reviews_count INT;

    -- Count the number of reviews for the associated course
    SELECT COUNT(*) INTO new_reviews_count
    FROM course_reviews
    WHERE course_id = OLD.course_id;

    -- Update the reviews_count in the courses table
    UPDATE courses
    SET reviews_count = new_reviews_count
    WHERE id = OLD.course_id;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `update_reviews_count_after_review_insert` AFTER INSERT ON `course_reviews` FOR EACH ROW BEGIN
    DECLARE new_reviews_count INT;

    -- Count the number of reviews for the associated course
    SELECT COUNT(*) INTO new_reviews_count
    FROM course_reviews
    WHERE course_id = NEW.course_id;

    -- Update the reviews_count in the courses table
    UPDATE courses
    SET reviews_count = new_reviews_count
    WHERE id = NEW.course_id;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `update_reviews_count_after_review_update` AFTER UPDATE ON `course_reviews` FOR EACH ROW BEGIN
    DECLARE new_reviews_count INT;

    -- Count the number of reviews for the associated course
    SELECT COUNT(*) INTO new_reviews_count
    FROM course_reviews
    WHERE course_id = NEW.course_id;

    -- Update the reviews_count in the courses table
    UPDATE courses
    SET reviews_count = new_reviews_count
    WHERE id = NEW.course_id;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `course_tags`
--

CREATE TABLE `course_tags` (
  `course_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `course_tags`
--

INSERT INTO `course_tags` (`course_id`, `tag_id`) VALUES
(1, 1),
(1, 8),
(1, 17),
(1, 21),
(1, 35),
(1, 39),
(2, 1),
(2, 9),
(2, 10),
(2, 11),
(2, 12),
(2, 35),
(2, 39),
(3, 1),
(3, 13),
(3, 35),
(3, 39),
(4, 1),
(4, 14),
(4, 35),
(4, 39),
(5, 2),
(5, 8),
(5, 16),
(5, 22),
(5, 35),
(6, 2),
(6, 9),
(6, 10),
(6, 11),
(6, 12),
(6, 36),
(7, 2),
(7, 13),
(7, 36),
(8, 3),
(8, 8),
(8, 16),
(8, 17),
(8, 36),
(9, 3),
(9, 9),
(9, 10),
(9, 11),
(9, 36),
(10, 4),
(10, 8),
(10, 16),
(10, 17),
(10, 36),
(11, 4),
(11, 10),
(11, 23),
(11, 36),
(12, 4),
(12, 11),
(12, 29),
(12, 36),
(13, 4),
(13, 12),
(13, 31),
(13, 32),
(13, 36),
(14, 5),
(14, 8),
(14, 16),
(14, 19),
(14, 37),
(15, 5),
(15, 10),
(15, 24),
(15, 26),
(15, 37),
(16, 6),
(16, 8),
(16, 18),
(16, 37),
(16, 40),
(17, 6),
(17, 10),
(17, 23),
(17, 25),
(17, 37),
(18, 6),
(18, 11),
(18, 28),
(18, 29),
(18, 37),
(19, 7),
(19, 8),
(19, 18),
(19, 20),
(19, 38),
(19, 40),
(20, 7),
(20, 10),
(20, 27),
(20, 38),
(20, 40);

-- --------------------------------------------------------

--
-- Table structure for table `discussion_votes`
--

CREATE TABLE `discussion_votes` (
  `id` int(11) NOT NULL,
  `discussion_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `vote_type` enum('up','down') NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `discussion_votes`
--

INSERT INTO `discussion_votes` (`id`, `discussion_id`, `user_id`, `vote_type`, `created_at`) VALUES
(1, 3, 60, 'down', '2025-07-26 09:15:02'),
(3, 4, 60, 'up', '2025-07-26 09:15:06');

-- --------------------------------------------------------

--
-- Table structure for table `doubts`
--

CREATE TABLE `doubts` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `likes` int(11) DEFAULT 0,
  `views` int(11) DEFAULT 0,
  `is_solved` tinyint(1) DEFAULT 0,
  `course_id` int(11) DEFAULT NULL,
  `topic_id` int(11) DEFAULT NULL,
  `video_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `doubts`
--

INSERT INTO `doubts` (`id`, `title`, `content`, `user_id`, `created_at`, `updated_at`, `likes`, `views`, `is_solved`, `course_id`, `topic_id`, `video_id`) VALUES
(11, 'How to implement authentication in Next.js?', 'I am trying to implement authentication in my Next.js application. I have tried using NextAuth.js but I am facing issues with the session management. Can someone help me understand how to properly set up authentication?', 1, '2025-07-13 05:23:37', '2025-07-13 06:52:59', 5, 26, 0, NULL, NULL, NULL),
(12, 'Python list comprehension vs for loops', 'When should I use list comprehension instead of traditional for loops in Python? Are there performance benefits? I need to process large datasets efficiently.', 2, '2025-07-13 05:23:37', '2025-07-13 05:23:37', 8, 42, 1, NULL, NULL, NULL),
(13, 'CSS Grid vs Flexbox', 'What are the main differences between CSS Grid and Flexbox? When should I use one over the other for layout design?', 4, '2025-07-13 05:23:37', '2025-07-13 05:23:37', 15, 89, 1, NULL, NULL, NULL),
(14, 'MySQL query optimization techniques', 'My database queries are running slow. What are some techniques to optimize MySQL queries for better performance?', 5, '2025-07-13 05:23:37', '2025-07-13 05:23:37', 7, 36, 0, NULL, NULL, NULL),
(15, 'How to handle API rate limiting?', 'I am building an application that uses external APIs. How should I handle rate limiting to ensure my application does not get blocked?', 1, '2025-07-13 05:23:37', '2025-07-13 05:23:37', 4, 19, 0, NULL, NULL, NULL),
(16, 'Best practices for React component structure', 'What are the best practices for structuring React components? How should I organize my components for better maintainability?', 2, '2025-07-13 05:23:37', '2025-07-13 05:23:37', 9, 45, 1, NULL, NULL, NULL),
(17, 'Understanding JavaScript closures', 'Can someone explain JavaScript closures in simple terms? I am having trouble understanding how they work and when to use them.', 4, '2025-07-13 05:23:37', '2025-07-13 05:23:37', 11, 58, 0, NULL, NULL, NULL),
(18, 'Responsive design best practices', 'What are the current best practices for responsive web design? How can I ensure my website looks good on all devices?', 5, '2025-07-13 05:23:37', '2025-07-13 05:23:37', 14, 72, 1, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `doubt_answers`
--

CREATE TABLE `doubt_answers` (
  `id` int(11) NOT NULL,
  `doubt_id` int(11) NOT NULL,
  `content` text NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `likes` int(11) DEFAULT 0,
  `is_accepted` tinyint(1) DEFAULT 0,
  `is_by_mentor` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `doubt_answer_likes`
--

CREATE TABLE `doubt_answer_likes` (
  `answer_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Triggers `doubt_answer_likes`
--
DELIMITER $$
CREATE TRIGGER `update_answer_likes_count` AFTER INSERT ON `doubt_answer_likes` FOR EACH ROW BEGIN
  UPDATE doubt_answers SET likes = likes + 1 WHERE id = NEW.answer_id;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `update_answer_likes_count_on_delete` AFTER DELETE ON `doubt_answer_likes` FOR EACH ROW BEGIN
  UPDATE doubt_answers SET likes = likes - 1 WHERE id = OLD.answer_id;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `doubt_bookmarks`
--

CREATE TABLE `doubt_bookmarks` (
  `doubt_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `doubt_likes`
--

CREATE TABLE `doubt_likes` (
  `doubt_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Triggers `doubt_likes`
--
DELIMITER $$
CREATE TRIGGER `update_doubt_likes_count` AFTER INSERT ON `doubt_likes` FOR EACH ROW BEGIN
  UPDATE doubts SET likes = likes + 1 WHERE id = NEW.doubt_id;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `update_doubt_likes_count_on_delete` AFTER DELETE ON `doubt_likes` FOR EACH ROW BEGIN
  UPDATE doubts SET likes = likes - 1 WHERE id = OLD.doubt_id;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `doubt_tags`
--

CREATE TABLE `doubt_tags` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `count` int(11) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `doubt_tags`
--

INSERT INTO `doubt_tags` (`id`, `name`, `count`, `created_at`) VALUES
(1, 'JavaScript', 0, '2025-07-13 05:07:04'),
(2, 'Python', 0, '2025-07-13 05:07:04'),
(3, 'React', 0, '2025-07-13 05:07:04'),
(4, 'Next.js', 0, '2025-07-13 05:07:04'),
(5, 'Database', 0, '2025-07-13 05:07:04'),
(6, 'CSS', 0, '2025-07-13 05:07:04'),
(7, 'HTML', 0, '2025-07-13 05:07:04'),
(8, 'API', 0, '2025-07-13 05:07:04'),
(9, 'Backend', 0, '2025-07-13 05:07:04'),
(10, 'Frontend', 0, '2025-07-13 05:07:04'),
(11, 'UI/UX', 0, '2025-07-13 05:07:04'),
(12, 'Performance', 0, '2025-07-13 05:07:04'),
(13, 'Security', 0, '2025-07-13 05:07:04'),
(14, 'Testing', 0, '2025-07-13 05:07:04'),
(15, 'Deployment', 0, '2025-07-13 05:07:04');

-- --------------------------------------------------------

--
-- Table structure for table `doubt_tag_relation`
--

CREATE TABLE `doubt_tag_relation` (
  `doubt_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Triggers `doubt_tag_relation`
--
DELIMITER $$
CREATE TRIGGER `update_tag_count` AFTER INSERT ON `doubt_tag_relation` FOR EACH ROW BEGIN
  UPDATE doubt_tags SET count = count + 1 WHERE id = NEW.tag_id;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `update_tag_count_on_delete` AFTER DELETE ON `doubt_tag_relation` FOR EACH ROW BEGIN
  UPDATE doubt_tags SET count = count - 1 WHERE id = OLD.tag_id;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `enrollments`
--

CREATE TABLE `enrollments` (
  `id` int(11) NOT NULL,
  `course_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `enrolled_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `progress` int(11) DEFAULT 0,
  `is_completed` tinyint(1) DEFAULT 0,
  `expiry_date` datetime DEFAULT NULL,
  `payment_status` enum('paid','free','pending','failed') DEFAULT 'paid',
  `payment_amount` decimal(10,2) DEFAULT 0.00,
  `payment_id` varchar(255) DEFAULT NULL,
  `completion_date` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL COMMENT 'Admin ID who created the enrollment',
  `notes` text DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `enrollments`
--

INSERT INTO `enrollments` (`id`, `course_id`, `user_id`, `enrolled_at`, `progress`, `is_completed`, `expiry_date`, `payment_status`, `payment_amount`, `payment_id`, `completion_date`, `created_by`, `notes`, `updated_at`) VALUES
(8, 3, 60, '2025-05-21 08:06:08', 0, 0, '2026-05-20 00:00:00', 'paid', 39.99, NULL, NULL, 1, 'Nothing', '2025-07-13 17:57:55'),
(9, 2, 60, '2025-05-21 08:06:08', 0, 0, '2026-05-21 00:00:00', 'paid', 39.99, NULL, NULL, 1, 'Nothing', '2025-07-13 17:57:49'),
(10, 9, 60, '2025-05-21 08:06:08', 0, 0, '2026-05-21 00:00:00', 'paid', 39.99, NULL, NULL, 1, 'Nothing', '2025-07-13 17:57:49'),
(11, 29, 60, '2025-05-21 08:06:08', 0, 0, '2026-05-21 00:00:00', 'paid', 39.99, NULL, NULL, 1, 'Nothing', '2025-07-13 17:57:49');

--
-- Triggers `enrollments`
--
DELIMITER $$
CREATE TRIGGER `update_enrollments_count_after_enrollment_delete` AFTER DELETE ON `enrollments` FOR EACH ROW BEGIN
    DECLARE new_enrollments_count INT;

    -- Calculate the new enrollments count for the associated course
    SELECT COUNT(*) INTO new_enrollments_count
    FROM enrollments
    WHERE course_id = OLD.course_id;

    -- Update the enrollments_count in the courses table
    UPDATE courses
    SET enrollments_count = new_enrollments_count
    WHERE id = OLD.course_id;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `update_enrollments_count_after_enrollment_insert` AFTER INSERT ON `enrollments` FOR EACH ROW BEGIN
    DECLARE new_enrollments_count INT;

    -- Calculate the new enrollments count for the associated course
    SELECT COUNT(*) INTO new_enrollments_count
    FROM enrollments
    WHERE course_id = NEW.course_id;

    -- Update the enrollments_count in the courses table
    UPDATE courses
    SET enrollments_count = new_enrollments_count
    WHERE id = NEW.course_id;
END
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `update_enrollments_count_after_enrollment_update` AFTER UPDATE ON `enrollments` FOR EACH ROW BEGIN
    DECLARE new_enrollments_count INT;

    -- Calculate the new enrollments count for the associated course
    SELECT COUNT(*) INTO new_enrollments_count
    FROM enrollments
    WHERE course_id = NEW.course_id;

    -- Update the enrollments_count in the courses table
    UPDATE courses
    SET enrollments_count = new_enrollments_count
    WHERE id = NEW.course_id;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `event_schedule`
--

CREATE TABLE `event_schedule` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `schedule_time` time NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `event_schedule`
--

INSERT INTO `event_schedule` (`id`, `event_id`, `schedule_time`, `title`, `description`) VALUES
(1, 1, '10:00:00', 'Opening Ceremony', 'Join us for the opening of the event.'),
(2, 1, '11:00:00', 'Keynote Speech', 'Listen to our keynote speaker, John Doe.'),
(3, 1, '13:00:00', 'Lunch Break', 'Enjoy a catered lunch and network with other attendees.'),
(4, 2, '09:00:00', 'Workshop: Data Science 101', 'A hands-on workshop for beginners in data science.');

-- --------------------------------------------------------

--
-- Table structure for table `event_speakers`
--

CREATE TABLE `event_speakers` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `speaker_name` varchar(255) NOT NULL,
  `speaker_image_url` varchar(500) NOT NULL,
  `speaker_description` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `event_speakers`
--

INSERT INTO `event_speakers` (`id`, `event_id`, `speaker_name`, `speaker_image_url`, `speaker_description`) VALUES
(1, 1, 'John Doe', 'https://example.com/images/john_doe.jpg', 'John is a renowned keynote speaker with over 20 years of experience.'),
(2, 1, 'Jane Smith', 'https://example.com/images/jane_smith.jpg', 'Jane is a well-known author and speaker in the tech industry.'),
(3, 2, 'Alice Brown', 'https://example.com/images/alice_brown.jpg', 'Alice specializes in data science and has spoken at many international events.');

-- --------------------------------------------------------

--
-- Table structure for table `images`
--

CREATE TABLE `images` (
  `id` int(11) NOT NULL,
  `uuid` varchar(36) NOT NULL,
  `original_filename` varchar(255) NOT NULL,
  `storage_path` varchar(500) NOT NULL,
  `mime_type` varchar(100) NOT NULL,
  `file_size` int(11) NOT NULL,
  `reference_type` varchar(50) DEFAULT NULL,
  `reference_id` int(11) DEFAULT NULL,
  `status` enum('active','deleted') DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `institutes`
--

CREATE TABLE `institutes` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL COMMENT 'Institute name',
  `slug` varchar(255) NOT NULL COMMENT 'URL-friendly name',
  `description` text DEFAULT NULL COMMENT 'Institute description',
  `logo_url` varchar(500) DEFAULT NULL COMMENT 'Institute logo image URL',
  `banner_url` varchar(500) DEFAULT NULL COMMENT 'Institute banner/cover image URL',
  `website` varchar(255) DEFAULT NULL COMMENT 'Institute website URL',
  `email` varchar(255) NOT NULL COMMENT 'Institute contact email',
  `phone` varchar(50) DEFAULT NULL COMMENT 'Institute contact phone',
  `address` text DEFAULT NULL COMMENT 'Institute physical address',
  `city` varchar(100) DEFAULT NULL COMMENT 'City',
  `state` varchar(100) DEFAULT NULL COMMENT 'State/Province',
  `country` varchar(100) DEFAULT 'Nepal' COMMENT 'Country',
  `postal_code` varchar(20) DEFAULT NULL COMMENT 'Postal/ZIP code',
  `registration_number` varchar(100) DEFAULT NULL COMMENT 'Official registration number',
  `tax_number` varchar(100) DEFAULT NULL COMMENT 'Tax identification number',
  `founded_year` year(4) DEFAULT NULL COMMENT 'Year institute was founded',
  `license_number` varchar(100) DEFAULT NULL COMMENT 'Educational license number',
  `institute_type` enum('school','college','university','training_center','coaching_center','individual','corporate','government') NOT NULL DEFAULT 'training_center',
  `status` enum('pending','active','inactive','suspended','rejected') NOT NULL DEFAULT 'pending',
  `is_verified` tinyint(1) DEFAULT 0 COMMENT 'Whether institute is verified',
  `verified_at` timestamp NULL DEFAULT NULL COMMENT 'When institute was verified',
  `verification_date` timestamp NULL DEFAULT NULL COMMENT 'Date of verification',
  `verified_by` int(11) DEFAULT NULL COMMENT 'Admin who verified the institute',
  `settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Institute-specific settings and preferences' CHECK (json_valid(`settings`)),
  `social_links` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Social media links' CHECK (json_valid(`social_links`)),
  `features` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Institute features and amenities' CHECK (json_valid(`features`)),
  `total_instructors` int(11) DEFAULT 0 COMMENT 'Total number of instructors',
  `total_courses` int(11) DEFAULT 0 COMMENT 'Total number of courses',
  `total_students` int(11) DEFAULT 0 COMMENT 'Total number of enrolled students',
  `average_rating` decimal(3,2) DEFAULT 0.00 COMMENT 'Average institute rating',
  `total_reviews` int(11) DEFAULT 0 COMMENT 'Total reviews count',
  `created_by` int(11) NOT NULL COMMENT 'User who created the institute',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Educational institutes and organizations';

--
-- Dumping data for table `institutes`
--

INSERT INTO `institutes` (`id`, `name`, `slug`, `description`, `logo_url`, `banner_url`, `website`, `email`, `phone`, `address`, `city`, `state`, `country`, `postal_code`, `registration_number`, `tax_number`, `founded_year`, `license_number`, `institute_type`, `status`, `is_verified`, `verified_at`, `verification_date`, `verified_by`, `settings`, `social_links`, `features`, `total_instructors`, `total_courses`, `total_students`, `average_rating`, `total_reviews`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'Ashlya Academy', 'ashlya-academy', 'Leading educational institute providing comprehensive learning solutions', NULL, NULL, NULL, 'info@ashlya.com', '+977-1-4567890', NULL, NULL, NULL, 'Nepal', NULL, NULL, NULL, '2020', NULL, 'training_center', 'active', 1, NULL, NULL, NULL, NULL, NULL, '[\"Online Learning\", \"Certificate Programs\", \"Expert Instructors\"]', 0, 0, 0, 0.00, 0, 1, '2025-09-01 04:53:37', '2025-09-01 04:53:37'),
(2, 'Tech Skills Institute', 'tech-skills-institute', 'Professional technology and digital skills training', NULL, NULL, NULL, 'contact@techskills.edu.np', '+977-1-5678901', NULL, NULL, NULL, 'Nepal', NULL, NULL, NULL, '2019', NULL, 'training_center', 'active', 1, NULL, NULL, NULL, NULL, NULL, '[\"Hands-on Training\", \"Industry Experts\", \"Job Placement Support\"]', 0, 0, 0, 0.00, 0, 1, '2025-09-01 04:53:37', '2025-09-01 04:53:37'),
(3, 'Digital Learning Center', 'digital-learning-center', 'Modern digital education and skill development', NULL, NULL, NULL, 'hello@digitallearning.com.np', '+977-1-6789012', NULL, NULL, NULL, 'Nepal', NULL, NULL, NULL, '2021', NULL, 'training_center', 'pending', 0, NULL, NULL, NULL, NULL, NULL, '[\"Interactive Learning\", \"Flexible Schedule\", \"Certification Programs\"]', 0, 0, 0, 0.00, 0, 1, '2025-09-01 04:53:37', '2025-09-01 04:53:37');

-- --------------------------------------------------------

--
-- Table structure for table `institute_analytics`
--

CREATE TABLE `institute_analytics` (
  `id` int(11) NOT NULL,
  `institute_id` int(11) NOT NULL,
  `period_type` enum('daily','weekly','monthly','yearly') NOT NULL,
  `period_start` date NOT NULL,
  `period_end` date NOT NULL,
  `new_enrollments` int(11) DEFAULT 0,
  `total_enrollments` int(11) DEFAULT 0,
  `course_completions` int(11) DEFAULT 0,
  `revenue` decimal(12,2) DEFAULT 0.00,
  `new_instructors` int(11) DEFAULT 0,
  `total_instructors` int(11) DEFAULT 0,
  `new_courses` int(11) DEFAULT 0,
  `total_active_courses` int(11) DEFAULT 0,
  `student_satisfaction_score` decimal(3,2) DEFAULT 0.00,
  `metrics_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Additional analytics data' CHECK (json_valid(`metrics_data`)),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Institute performance analytics';

-- --------------------------------------------------------

--
-- Table structure for table `institute_courses`
--

CREATE TABLE `institute_courses` (
  `id` int(11) NOT NULL,
  `institute_id` int(11) NOT NULL,
  `course_id` int(11) NOT NULL,
  `display_order` int(11) DEFAULT 0,
  `is_featured` tinyint(1) DEFAULT 0,
  `custom_price` decimal(10,2) DEFAULT NULL COMMENT 'Institute-specific pricing',
  `custom_description` text DEFAULT NULL COMMENT 'Institute-specific description',
  `status` enum('active','inactive','archived') DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Course management within institutes';

--
-- Dumping data for table `institute_courses`
--

INSERT INTO `institute_courses` (`id`, `institute_id`, `course_id`, `display_order`, `is_featured`, `custom_price`, `custom_description`, `status`, `created_at`) VALUES
(1, 1, 1, 1, 1, NULL, NULL, 'active', '2025-09-01 04:56:55'),
(2, 1, 2, 2, 1, NULL, NULL, 'active', '2025-09-01 04:56:55'),
(3, 1, 3, 3, 0, NULL, NULL, 'active', '2025-09-01 04:56:55');

-- --------------------------------------------------------

--
-- Table structure for table `institute_members`
--

CREATE TABLE `institute_members` (
  `id` int(11) NOT NULL,
  `institute_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `role` enum('owner','admin','instructor','moderator','content_creator','support') NOT NULL DEFAULT 'instructor',
  `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Specific permissions for this member' CHECK (json_valid(`permissions`)),
  `status` enum('active','inactive','pending','suspended') NOT NULL DEFAULT 'pending',
  `title` varchar(100) DEFAULT NULL COMMENT 'Job title within institute',
  `department` varchar(100) DEFAULT NULL COMMENT 'Department or division',
  `invited_by` int(11) DEFAULT NULL COMMENT 'User who invited this member',
  `invitation_token` varchar(100) DEFAULT NULL COMMENT 'Invitation token for pending invitations',
  `invitation_expires_at` timestamp NULL DEFAULT NULL COMMENT 'When invitation expires',
  `joined_at` timestamp NULL DEFAULT NULL COMMENT 'When member actually joined',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Institute team members and their roles';

--
-- Dumping data for table `institute_members`
--

INSERT INTO `institute_members` (`id`, `institute_id`, `user_id`, `role`, `permissions`, `status`, `title`, `department`, `invited_by`, `invitation_token`, `invitation_expires_at`, `joined_at`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'owner', NULL, 'active', NULL, NULL, NULL, NULL, NULL, '2025-09-01 04:53:37', '2025-09-01 04:53:37', '2025-09-01 04:53:37'),
(2, 1, 2, 'instructor', NULL, 'active', NULL, NULL, NULL, NULL, NULL, '2025-09-01 04:53:37', '2025-09-01 04:53:37', '2025-09-01 04:53:37'),
(3, 2, 1, 'admin', NULL, 'active', NULL, NULL, NULL, NULL, NULL, '2025-09-01 04:53:37', '2025-09-01 04:53:37', '2025-09-01 04:53:37');

-- --------------------------------------------------------

--
-- Table structure for table `institute_reviews`
--

CREATE TABLE `institute_reviews` (
  `id` int(11) NOT NULL,
  `institute_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `course_id` int(11) DEFAULT NULL COMMENT 'Specific course if review is course-related',
  `rating` tinyint(4) NOT NULL CHECK (`rating` >= 1 and `rating` <= 5),
  `title` varchar(255) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `is_verified` tinyint(1) DEFAULT 0 COMMENT 'Verified review flag',
  `is_featured` tinyint(1) DEFAULT 0 COMMENT 'Featured review flag',
  `helpful_count` int(11) DEFAULT 0 COMMENT 'Number of helpful votes',
  `status` enum('pending','approved','rejected','hidden') DEFAULT 'pending',
  `moderated_by` int(11) DEFAULT NULL COMMENT 'Admin who moderated this review',
  `moderated_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Reviews and ratings for institutes';

--
-- Triggers `institute_reviews`
--
DELIMITER $$
CREATE TRIGGER `update_institute_rating` AFTER INSERT ON `institute_reviews` FOR EACH ROW BEGIN 
    UPDATE institutes 
    SET average_rating = (
        SELECT AVG(rating) FROM institute_reviews 
        WHERE institute_id = NEW.institute_id AND status = 'approved'
    ),
    total_reviews = (
        SELECT COUNT(*) FROM institute_reviews 
        WHERE institute_id = NEW.institute_id AND status = 'approved'
    )
    WHERE id = NEW.institute_id;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `institute_settings`
--

CREATE TABLE `institute_settings` (
  `id` int(11) NOT NULL,
  `institute_id` int(11) NOT NULL,
  `allow_public_courses` tinyint(1) DEFAULT 1,
  `require_course_approval` tinyint(1) DEFAULT 1,
  `allow_instructor_signup` tinyint(1) DEFAULT 0,
  `auto_approve_instructors` tinyint(1) DEFAULT 0,
  `primary_color` varchar(7) DEFAULT '#3B82F6',
  `secondary_color` varchar(7) DEFAULT '#8B5CF6',
  `custom_css` text DEFAULT NULL COMMENT 'Custom CSS for institute branding',
  `welcome_message` text DEFAULT NULL,
  `course_completion_message` text DEFAULT NULL,
  `certificate_message` text DEFAULT NULL,
  `payment_methods` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Accepted payment methods' CHECK (json_valid(`payment_methods`)),
  `default_currency` varchar(3) DEFAULT 'NPR',
  `tax_rate` decimal(5,2) DEFAULT 0.00,
  `email_from_name` varchar(100) DEFAULT NULL,
  `email_from_address` varchar(255) DEFAULT NULL,
  `email_templates` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Custom email templates' CHECK (json_valid(`email_templates`)),
  `integrations` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Third-party integrations' CHECK (json_valid(`integrations`)),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Institute-specific settings and configurations';

--
-- Dumping data for table `institute_settings`
--

INSERT INTO `institute_settings` (`id`, `institute_id`, `allow_public_courses`, `require_course_approval`, `allow_instructor_signup`, `auto_approve_instructors`, `primary_color`, `secondary_color`, `custom_css`, `welcome_message`, `course_completion_message`, `certificate_message`, `payment_methods`, `default_currency`, `tax_rate`, `email_from_name`, `email_from_address`, `email_templates`, `integrations`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 0, 0, '#3B82F6', '#8B5CF6', NULL, NULL, NULL, NULL, NULL, 'NPR', 0.00, NULL, NULL, NULL, NULL, '2025-09-01 04:56:55', '2025-09-01 04:56:55');

-- --------------------------------------------------------

--
-- Table structure for table `instructors`
--

CREATE TABLE `instructors` (
  `id` int(11) NOT NULL,
  `institute_id` int(11) DEFAULT NULL COMMENT 'Associated institute',
  `user_id` int(11) DEFAULT NULL COMMENT 'Associated user account',
  `name` varchar(255) NOT NULL,
  `bio` text DEFAULT NULL,
  `specializations` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Teaching specializations' CHECK (json_valid(`specializations`)),
  `qualifications` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Educational qualifications' CHECK (json_valid(`qualifications`)),
  `experience_years` int(11) DEFAULT 0 COMMENT 'Years of teaching experience',
  `hourly_rate` decimal(10,2) DEFAULT NULL COMMENT 'Hourly teaching rate',
  `availability` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Teaching availability schedule' CHECK (json_valid(`availability`)),
  `linkedin_url` varchar(255) DEFAULT NULL COMMENT 'LinkedIn profile URL',
  `github_url` varchar(255) DEFAULT NULL COMMENT 'GitHub profile URL',
  `portfolio_url` varchar(255) DEFAULT NULL COMMENT 'Portfolio website URL',
  `status` enum('active','inactive','pending','suspended') DEFAULT 'pending',
  `is_featured` tinyint(1) DEFAULT 0 COMMENT 'Featured instructor flag',
  `profile_image_url` varchar(1000) DEFAULT NULL,
  `rating` float DEFAULT 0,
  `total_courses` int(11) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `instructors`
--

INSERT INTO `instructors` (`id`, `institute_id`, `user_id`, `name`, `bio`, `specializations`, `qualifications`, `experience_years`, `hourly_rate`, `availability`, `linkedin_url`, `github_url`, `portfolio_url`, `status`, `is_featured`, `profile_image_url`, `rating`, `total_courses`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Bishal Regmi', 'A passionate creator specializing in Graphic Designing and Video Editing, Ashvik brings visuals to life with a creative edge and technical precision.', '[\"Web Development\", \"JavaScript\", \"React\"]', '[\"Bachelor in Computer Science\", \"Full Stack Developer Certification\"]', 5, NULL, NULL, NULL, NULL, NULL, 'active', 0, 'http://ashlyaapi.stemcenterktm.com/skilldarbar_storage/1741763533640%20(1).jpg', 4.9, 10, '2025-01-14 15:03:28', '2025-09-01 04:53:37'),
(2, 1, 2, 'Chheda Lal CHaudhary', 'A certified digital marketing expert focused on Meta Ads. Sarthak empowers businesses with result-driven strategies to boost online reach and conversions.', '[\"Digital Marketing\", \"Meta Ads\", \"Social Media\"]', '[\"Digital Marketing Certification\", \"Meta Blueprint Certified\"]', 3, NULL, NULL, NULL, NULL, NULL, 'active', 0, 'http://ashlyaapi.stemcenterktm.com/skilldarbar_storage/WhatsApp%20Image%202025-05-12%20at%2019.21.28_c535b9d2.jpg', 4.6, 6, '2025-05-22 06:18:25', '2025-09-01 04:53:37'),
(3, 2, 4, 'Pukar Phulara', 'An experienced WordPress Developer dedicated to building responsive, high-performance websites. Aaditya blends functionality with aesthetics to create impactful digital experiences.', '[\"WordPress Development\", \"Web Design\", \"PHP\"]', '[\"WordPress Developer Certification\", \"PHP Programming Certificate\"]', 4, NULL, NULL, NULL, NULL, NULL, 'active', 0, 'http://ashlyaapi.stemcenterktm.com/skilldarbar_storage/472275339_573049835597049_2866111553641808328_n.jpg', 4.7, 8, '2025-05-22 06:18:25', '2025-09-01 04:56:55');

--
-- Triggers `instructors`
--
DELIMITER $$
CREATE TRIGGER `update_institute_instructor_count` AFTER INSERT ON `instructors` FOR EACH ROW BEGIN 
    IF NEW.institute_id IS NOT NULL THEN
        UPDATE institutes 
        SET total_instructors = (
            SELECT COUNT(*) FROM instructors 
            WHERE institute_id = NEW.institute_id AND status = 'active'
        ) 
        WHERE id = NEW.institute_id;
    END IF;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `live_classes`
--

CREATE TABLE `live_classes` (
  `id` int(11) NOT NULL,
  `course_id` int(11) NOT NULL,
  `instructor_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `scheduled_start_time` datetime NOT NULL,
  `scheduled_end_time` datetime NOT NULL,
  `actual_start_time` datetime DEFAULT NULL,
  `actual_end_time` datetime DEFAULT NULL,
  `jitsi_room_name` varchar(255) NOT NULL,
  `jitsi_room_password` varchar(100) DEFAULT NULL,
  `max_participants` int(11) DEFAULT 100,
  `status` enum('scheduled','live','completed','cancelled') DEFAULT 'scheduled',
  `recording_enabled` tinyint(1) DEFAULT 1,
  `recording_url` varchar(500) DEFAULT NULL,
  `meeting_notes` text DEFAULT NULL,
  `thumbnail_url` varchar(500) DEFAULT NULL,
  `is_public` tinyint(1) DEFAULT 0 COMMENT 'If true, non-enrolled users can view',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `live_classes`
--

INSERT INTO `live_classes` (`id`, `course_id`, `instructor_id`, `title`, `description`, `scheduled_start_time`, `scheduled_end_time`, `actual_start_time`, `actual_end_time`, `jitsi_room_name`, `jitsi_room_password`, `max_participants`, `status`, `recording_enabled`, `recording_url`, `meeting_notes`, `thumbnail_url`, `is_public`, `created_at`, `updated_at`) VALUES
(19, 1, 60, 'JavaScript Fundamentals - Variables and Functions', 'Deep dive into JavaScript variables, scope, and function declarations. Learn how to write clean, efficient JavaScript code with practical examples and exercises.', '2025-08-26 22:34:19', '2025-08-27 00:04:19', NULL, NULL, '2ccf2147d46ab36ee5f7d4cb398e0551bf1599f39c1b3df6eefc5445cb217ed9', NULL, 50, 'live', 1, NULL, NULL, 'https://images.unsplash.com/photo-1593720213428-28a5b9e94613?w=500&h=300&fit=crop', 0, '2025-08-26 16:49:19', '2025-08-26 17:23:04'),
(20, 2, 60, 'React Components and State Management', 'Master React component lifecycle, state management with hooks, and building interactive user interfaces. Hands-on coding session with real-world examples.', '2025-08-27 00:34:19', '2025-08-27 02:04:19', NULL, NULL, 'skilldarbar-react-components-today', NULL, 40, 'live', 1, NULL, NULL, 'https://images.unsplash.com/photo-1633356122544-f134324a6cee?w=500&h=300&fit=crop', 0, '2025-08-26 16:49:19', '2025-08-26 17:40:37'),
(21, 2, 60, 'Advanced JavaScript - Async/Await and Promises', 'Learn asynchronous programming in JavaScript. Understand promises, async/await, and how to handle API calls effectively in modern web applications.', '2025-08-27 22:34:19', '2025-08-28 00:04:19', NULL, NULL, 'skilldarbar-js-async-tomorrow', 'async2025dev', 45, 'live', 1, NULL, NULL, 'https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=500&h=300&fit=crop', 0, '2025-08-26 16:49:19', '2025-08-26 17:04:59'),
(22, 2, 60, 'Python Data Structures and Algorithms', 'Comprehensive overview of Python data structures including lists, dictionaries, sets, and tuples. Introduction to basic algorithms and time complexity.', '2025-08-25 22:34:19', '2025-08-26 00:04:19', NULL, NULL, 'skilldarbar-python-ds-completed', 'python2025learn', 60, 'completed', 1, 'https://example.com/recordings/python-ds-completed.mp4', NULL, 'https://images.unsplash.com/photo-1526379095098-d400fd0bf935?w=500&h=300&fit=crop', 0, '2025-08-26 16:49:19', '2025-08-26 16:49:19'),
(23, 2, 60, 'Introduction to Web Development - Free Masterclass', 'Free introductory session covering HTML, CSS, and JavaScript basics. Perfect for beginners who want to start their web development journey.', '2025-08-28 22:34:19', '2025-08-29 00:04:19', NULL, NULL, 'skilldarbar-webdev-intro-free', 'webdev2025free', 100, 'scheduled', 1, NULL, NULL, 'https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=500&h=300&fit=crop', 1, '2025-08-26 16:49:19', '2025-08-26 16:49:19'),
(24, 2, 60, 'Database Design and MySQL Optimization', 'Learn database design principles, normalization, indexing strategies, and query optimization techniques for MySQL databases.', '2025-08-29 22:34:19', '2025-08-30 00:04:19', NULL, NULL, 'skilldarbar-mysql-design-future', 'mysql2025opt', 35, 'scheduled', 1, NULL, NULL, 'https://images.unsplash.com/photo-1544383835-bda2bc66a55d?w=500&h=300&fit=crop', 0, '2025-08-26 16:49:19', '2025-08-26 16:49:19');

-- --------------------------------------------------------

--
-- Table structure for table `live_class_chat`
--

CREATE TABLE `live_class_chat` (
  `id` int(11) NOT NULL,
  `live_class_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `message` text NOT NULL,
  `message_type` enum('text','emoji','system','file') DEFAULT 'text',
  `file_url` varchar(500) DEFAULT NULL,
  `reply_to_message_id` int(11) DEFAULT NULL,
  `is_private` tinyint(1) DEFAULT 0,
  `private_to_user_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `live_class_participants`
--

CREATE TABLE `live_class_participants` (
  `id` int(11) NOT NULL,
  `live_class_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `joined_at` datetime DEFAULT NULL,
  `left_at` datetime DEFAULT NULL,
  `attendance_duration` int(11) DEFAULT 0 COMMENT 'Duration in minutes',
  `participation_score` decimal(5,2) DEFAULT 0.00 COMMENT 'Engagement score 0-100',
  `is_presenter` tinyint(1) DEFAULT 0,
  `can_share_screen` tinyint(1) DEFAULT 0,
  `can_use_chat` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `live_class_participants`
--

INSERT INTO `live_class_participants` (`id`, `live_class_id`, `user_id`, `joined_at`, `left_at`, `attendance_duration`, `participation_score`, `is_presenter`, `can_share_screen`, `can_use_chat`, `created_at`, `updated_at`) VALUES
(7, 20, 60, '2025-08-31 13:37:18', '2025-08-27 08:07:39', 0, 0.00, 0, 0, 1, '2025-08-26 17:17:35', '2025-08-31 07:52:18'),
(25, 21, 60, '2025-08-26 23:25:05', '2025-08-26 23:25:39', 0, 0.00, 0, 0, 1, '2025-08-26 17:38:25', '2025-08-26 17:40:39');

-- --------------------------------------------------------

--
-- Table structure for table `mocktestresults`
--

CREATE TABLE `mocktestresults` (
  `result_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `mocktest_id` int(11) DEFAULT NULL,
  `score` int(11) DEFAULT NULL,
  `date_taken` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `mocktestresults`
--

INSERT INTO `mocktestresults` (`result_id`, `user_id`, `mocktest_id`, `score`, `date_taken`) VALUES
(1, 1, 1, 80, '2025-01-17 15:24:30'),
(2, 1, 2, 70, '2025-01-17 15:24:30'),
(3, 2, 1, 90, '2025-01-17 15:24:30'),
(4, 2, 3, 85, '2025-01-17 15:24:30');

-- --------------------------------------------------------

--
-- Table structure for table `mocktests`
--

CREATE TABLE `mocktests` (
  `mocktest_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `mocktests`
--

INSERT INTO `mocktests` (`mocktest_id`, `title`, `description`, `created_at`, `updated_at`) VALUES
(16, 'Permutation & Combination Fundamentals Quiz', 'Quiz on complete foundation of Permutation and Combination including basic concepts, theory, formulae, and fundamental principles of counting', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(17, 'Counting Principle Quiz', 'Quiz on comprehensive coverage of Counting Principle with numerical problems, applications, and problem-solving techniques', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(18, 'Permutation Numericals Quiz', 'Quiz on extensive practice with permutation problems including power classes, quick revision, and exam-focused numericals', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(19, 'Combination Numericals Quiz', 'Quiz on complete coverage of combination problems with power classes, 5-mark questions, and exam-oriented solutions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(20, 'Exercise Solutions Quiz', 'Quiz on complete solutions to textbook exercises 1.2 and 1.3 with step-by-step explanations', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(21, 'Exam Preparation & Sure Questions Quiz', 'Quiz on most important and sure-shot questions with crystal clear explanations for exam success', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(22, 'Binomial Theorem Quiz', 'Quiz on complete coverage of Binomial Theorem with proof, concepts, and applications', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(23, 'Course Introduction & Syllabus Quiz', 'Quiz on complete syllabus discussion and evaluation scheme for Applied Physics course covering B.E. Civil-I & B.E. Computer-II Semester', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(24, 'Evaluation Scheme & Question Pattern Quiz', 'Quiz on detailed discussion on evaluation scheme and question pattern for Applied Physics exams', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(25, 'Mechanical Oscillation Quiz', 'Quiz on comprehensive coverage of mechanical oscillation with numerical analysis and problem solving', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(26, 'Wave Motion Quiz', 'Quiz on complete analysis of wave motion with numerical problems and solutions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(27, 'Acoustics Quiz', 'Quiz on detailed study of acoustics with numerical analysis and practical applications', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(28, 'Capacitor & Dielectrics Quiz', 'Quiz on comprehensive coverage of capacitors and dielectrics with numerical problem solving', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(29, 'Clausius-Mossotti Relation Quiz', 'Quiz on full derivation and numerical analysis of Clausius-Mossotti relation', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(30, 'Electromagnetism Quiz', 'Quiz on important numerical analysis and problem solving in electromagnetism', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(31, 'Optical Fiber Quiz', 'Quiz on important numerical problems and applications of optical fiber technology', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(32, 'Quantum Mechanics - Wave Function Normalization Quiz', 'Quiz on comprehensive coverage of wave function normalization in quantum mechanics', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(33, 'Thermodynamics - First Law Quiz', 'Quiz on important numerical collection on first law of thermodynamics', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(34, 'Thermodynamics - Second Law Quiz', 'Quiz on comprehensive numerical analysis of second law of thermodynamics', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(35, 'Thermal Conductivity & Heat Transfer Quiz', 'Quiz on complete numerical collection on thermal conductivity and heat transfer mechanisms', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(36, 'Thermal Physics - Grand Revision Quiz', 'Quiz on comprehensive grand revision session covering all thermal physics topics', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(37, 'Black Body Radiation - Stefan\'s Law Quiz', 'Quiz on heat transfer numericals focusing on Stefan\'s law of black body radiation', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(38, 'Introduction to Applied Mechanics Quiz', 'Quiz on fundamental concepts and differences between Kinematics and Kinetics in Applied Mechanics', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(39, 'Equations of Motion and Particle Kinematics Quiz', 'Quiz on understanding particle motion through equations of motion and rectangular component analysis', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(40, 'Curvilinear Motion Components Quiz', 'Quiz on analysis of tangential, normal, radial and transverse components in curvilinear motion', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(41, 'Projectile Motion and Kinematics Problems Quiz', 'Quiz on comprehensive study of projectile motion with extensive numerical problem solving', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(42, 'Introduction to Kinetics and Force Analysis Quiz', 'Quiz on understanding kinetics principles, dynamic equilibrium and D\'Alembert\'s principle', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(43, 'Advanced Kinetics and Free Body Diagrams Quiz', 'Quiz on advanced applications of kinetics principles with free body diagram analysis', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(44, 'Oxidation Numbers and Redox Reactions Quiz', 'Quiz on how to find oxidation numbers and balance redox reactions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(45, 'Limiting Reagent Problems Quiz', 'Quiz on solving limiting reagent problems with step-by-step approach', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(46, 'Organic Chemistry Fundamentals Quiz', 'Quiz on IUPAC nomenclature and important organic reactions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(47, 'Structural Chemistry Concepts Quiz', 'Quiz on understanding homologous series and structural isomerism', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(48, 'Applied Physics Practical Experiments Quiz', 'Quiz on a collection of practical experiments for Applied Physics, covering various concepts and procedures.', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(49, 'Robotics Projects Quiz', 'Quiz on innovative robotics projects focusing on practical applications and system development.', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(50, 'Light Fidelity & Wireless Detection Projects Quiz', 'Quiz on innovative physics projects related to light-based communication (Li-Fi) and wireless current detection.', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(51, 'Hydraulic & Mechanical Physics Projects Quiz', 'Quiz on a collection of physics projects demonstrating principles of hydraulics, mechanics, and motion.', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(52, 'Gravitation & GPS Projects Quiz', 'Quiz on physics projects focusing on Newton\'s Law of Gravitation and the Global Positioning System (GPS).', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(53, 'Electronics & Circuitry Physics Projects Quiz', 'Quiz on projects involving the design and construction of various electronic circuits and systems.', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(54, 'Integration Quiz', 'Quiz on Integration Grade-11 Mathematics NEB || Online Physics & Maths Tutor || Complete Solution By CLC Sir', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(55, 'Properties of Determinants Quiz', 'Quiz on Properties of Determinants', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(56, 'Determinants Problems - Important Quiz', 'Quiz on Important Determinants Problems', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(57, 'Top 06 Problems of Determinants Quiz', 'Quiz on Top 06 Problems of Determinants With Crystal Clear Concept || Grade-11 Mathematics || CLC Tutorials', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(58, 'Introduction to Limits & Important Formulas Quiz', 'Quiz on Introduction to Limits & Important Formulas', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(59, 'Theorems of Limits Quiz', 'Quiz on Theorems of Limits', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(60, 'Limits of Algebraic Functions Quiz', 'Quiz on Limits of Algebraic Functions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(61, 'Limits of Exponential & Logarithmic Functions Quiz', 'Quiz on Limits of Exponential & Logarithmic Functions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(62, 'Continuity of Functions Quiz', 'Quiz on Continuity of Functions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(63, 'Limits of Trigonometric Functions Quiz', 'Quiz on Limits of Trigonometric Functions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(64, 'Introduction to Derivatives & Important Formulae Quiz', 'Quiz on Introduction to Derivatives & Important Formulae', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(65, 'Derivative from First Principle Quiz', 'Quiz on Derivative from First Principle', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(66, 'Derivatives of Exponential & Logarithmic Functions from First Principle Quiz', 'Quiz on Derivatives of Exponential & Logarithmic Functions from First Principle', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(67, 'Derivatives of Algebraic Functions Quiz', 'Quiz on Derivatives of Algebraic Functions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(68, 'Derivatives of Trigonometric Functions Quiz', 'Quiz on Derivatives of Trigonometric Functions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(69, 'Implicit Differentiation Quiz', 'Quiz on Implicit Differentiation', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(70, 'Derivative of Inverse Trigonometric Functions Quiz', 'Quiz on Derivative of Inverse Trigonometric Functions', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(71, 'Derivative from Chain Rule Quiz', 'Quiz on Derivative from Chain Rule', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(72, 'Full Course Revision Series Part-01 Quiz', 'Quiz on Full Course Revision Series Part-01', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(73, 'Full Course Revision Series Part-02 Quiz', 'Quiz on Full Course Revision Series Part-02', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(74, 'Extra Important Numericals Part#03 Quiz', 'Quiz on Extra Important Numericals Part#03', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(75, 'Integration By Parts Quiz', 'Quiz on Integration By Parts', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(76, 'Introduction to Physics and Measurement Quiz', 'Quiz on fundamental concepts of physical quantities, dimensional analysis, accuracy, and precision.', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(77, 'Vectors Quiz', 'Quiz on concepts of scalars and vectors, vector addition, resolution of vectors, and dot and cross products.', '2025-07-13 19:12:39', '2025-07-13 19:12:39'),
(78, 'Kinematics Quiz', 'Quiz on the study of motion, including projectile motion, equations of motion, and relative motion.', '2025-07-13 19:12:39', '2025-07-13 19:12:39');

-- --------------------------------------------------------

--
-- Table structure for table `modelset`
--

CREATE TABLE `modelset` (
  `id` int(11) NOT NULL,
  `course_id` int(11) NOT NULL COMMENT 'Course this model set belongs to',
  `title` varchar(255) NOT NULL COMMENT 'Model set title',
  `description` text DEFAULT NULL COMMENT 'Model set description',
  `question_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'Array of question IDs in this model set' CHECK (json_valid(`question_ids`)),
  `time_limit` int(11) NOT NULL DEFAULT 60 COMMENT 'Time limit in minutes',
  `total_marks` int(11) NOT NULL DEFAULT 0 COMMENT 'Total marks for this model set',
  `total_questions` int(11) NOT NULL DEFAULT 0 COMMENT 'Total number of questions',
  `difficulty_level` enum('easy','medium','hard','mixed') DEFAULT 'mixed' COMMENT 'Overall difficulty level',
  `category` varchar(100) DEFAULT 'General' COMMENT 'Model set category',
  `instructions` text DEFAULT NULL COMMENT 'Special instructions for this model set',
  `passing_marks` int(11) DEFAULT 0 COMMENT 'Minimum marks to pass',
  `negative_marking` tinyint(1) DEFAULT 0 COMMENT 'Whether negative marking is enabled',
  `negative_marks_per_wrong` decimal(3,2) DEFAULT 0.25 COMMENT 'Marks deducted per wrong answer',
  `shuffle_questions` tinyint(1) DEFAULT 1 COMMENT 'Whether to shuffle question order',
  `show_result_immediately` tinyint(1) DEFAULT 0 COMMENT 'Show result after quiz completion',
  `allow_review` tinyint(1) DEFAULT 1 COMMENT 'Allow reviewing answers after completion',
  `max_attempts` int(11) DEFAULT 1 COMMENT 'Maximum attempts allowed per user',
  `created_by` int(11) DEFAULT NULL COMMENT 'User ID who created this model set',
  `is_active` tinyint(1) DEFAULT 1 COMMENT 'Whether this model set is active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Model test sets with advanced quiz features';

--
-- Dumping data for table `modelset`
--

INSERT INTO `modelset` (`id`, `course_id`, `title`, `description`, `question_ids`, `time_limit`, `total_marks`, `total_questions`, `difficulty_level`, `category`, `instructions`, `passing_marks`, `negative_marking`, `negative_marks_per_wrong`, `shuffle_questions`, `show_result_immediately`, `allow_review`, `max_attempts`, `created_by`, `is_active`, `created_at`, `updated_at`) VALUES
(5, 29, 'Test Model Set', 'Test Description', '[\"4\"]', 60, 1, 1, 'medium', 'Practice Test', '• Read each question carefully before selecting your answer.\n• Each question carries equal marks unless specified otherwise.\n• There is no negative marking unless mentioned.\n• You can review and change your answers before final submission.\n• The timer will automatically submit your test when time expires.\n• Click \"Submit Test\" when you have completed all questions.', 1, 1, 0.25, 1, 1, 1, 1, 1, 1, '2025-08-04 05:11:41', '2025-08-04 05:11:41'),
(6, 2, 'Test 2', 'Test 2', '[1, 2, 3]', 60, 3, 3, 'medium', 'Practice Test', '• Read each question carefully before selecting your answer.\n• Each question carries equal marks unless specified otherwise.\n• There is no negative marking unless mentioned.\n• You can review and change your answers before final submission.\n• The timer will automatically submit your test when time expires.\n• Click \"Submit Test\" when you have completed all questions.', 2, 1, 0.25, 1, 1, 0, 3, 1, 1, '2025-08-04 05:38:47', '2025-08-04 06:42:46');

-- --------------------------------------------------------

--
-- Table structure for table `modelset_attempts`
--

CREATE TABLE `modelset_attempts` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `modelset_id` int(11) NOT NULL,
  `session_id` varchar(50) NOT NULL COMMENT 'Unique session identifier',
  `score_percentage` decimal(5,2) NOT NULL DEFAULT 0.00,
  `total_marks_obtained` decimal(8,2) NOT NULL DEFAULT 0.00,
  `total_marks_possible` int(11) NOT NULL DEFAULT 0,
  `total_questions` int(11) NOT NULL DEFAULT 0,
  `correct_answers` int(11) NOT NULL DEFAULT 0,
  `wrong_answers` int(11) NOT NULL DEFAULT 0,
  `unanswered` int(11) NOT NULL DEFAULT 0,
  `time_taken` int(11) NOT NULL DEFAULT 0 COMMENT 'Time taken in seconds',
  `time_limit` int(11) NOT NULL DEFAULT 0 COMMENT 'Time limit in seconds',
  `attempt_number` int(11) NOT NULL DEFAULT 1,
  `started_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `is_completed` tinyint(1) DEFAULT 0,
  `answers_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Detailed answers data' CHECK (json_valid(`answers_data`)),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='User attempts for model test sets';

--
-- Dumping data for table `modelset_attempts`
--

INSERT INTO `modelset_attempts` (`id`, `user_id`, `modelset_id`, `session_id`, `score_percentage`, `total_marks_obtained`, `total_marks_possible`, `total_questions`, `correct_answers`, `wrong_answers`, `unanswered`, `time_taken`, `time_limit`, `attempt_number`, `started_at`, `completed_at`, `is_completed`, `answers_data`, `created_at`, `updated_at`) VALUES
(9, 60, 5, 'modelset_5_60_1754308943', 100.00, 1.00, 1, 1, 1, 0, 0, 3, 3600, 1, '2025-08-04 12:02:23', '2025-08-04 12:02:23', 1, '{\"4\": \"0\"}', '2025-08-04 12:02:23', '2025-08-04 12:02:23'),
(10, 60, 6, 'modelset_6_60_1754309170', 100.00, 3.00, 3, 3, 3, 0, 0, 8, 3600, 1, '2025-08-04 12:06:10', '2025-08-04 12:06:10', 1, '{\"1\": \"2\", \"2\": \"1\", \"3\": \"1\"}', '2025-08-04 12:06:10', '2025-08-04 12:06:10'),
(11, 60, 6, 'modelset_6_60_1754972277', 58.33, 1.75, 3, 3, 2, 1, 0, 8, 3600, 2, '2025-08-12 04:17:57', '2025-08-12 04:17:57', 1, '{\"1\": \"0\", \"2\": \"1\", \"3\": \"0\"}', '2025-08-12 04:17:57', '2025-08-12 04:17:57'),
(12, 60, 6, 'modelset_6_60_1756626302', 100.00, 3.00, 3, 3, 3, 0, 0, 29, 3600, 3, '2025-08-31 07:45:02', '2025-08-31 07:45:02', 1, '{\"1\": \"0\", \"2\": \"0\", \"3\": \"0\"}', '2025-08-31 07:45:02', '2025-08-31 07:45:02');

-- --------------------------------------------------------

--
-- Table structure for table `modelset_question_responses`
--

CREATE TABLE `modelset_question_responses` (
  `id` int(11) NOT NULL,
  `attempt_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `selected_option` varchar(10) DEFAULT NULL COMMENT 'Selected option (A, B, C, D, etc.)',
  `selected_option_text` text DEFAULT NULL COMMENT 'Text of selected option',
  `correct_option` varchar(10) NOT NULL COMMENT 'Correct option',
  `correct_option_text` text DEFAULT NULL COMMENT 'Text of correct option',
  `is_correct` tinyint(1) NOT NULL DEFAULT 0,
  `marks_awarded` decimal(5,2) NOT NULL DEFAULT 0.00,
  `marks_possible` int(11) NOT NULL DEFAULT 1,
  `time_taken` int(11) DEFAULT 0 COMMENT 'Time taken for this question in seconds',
  `question_order` int(11) DEFAULT 0 COMMENT 'Order in which question appeared',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Individual question responses for model test attempts';

--
-- Dumping data for table `modelset_question_responses`
--

INSERT INTO `modelset_question_responses` (`id`, `attempt_id`, `question_id`, `selected_option`, `selected_option_text`, `correct_option`, `correct_option_text`, `is_correct`, `marks_awarded`, `marks_possible`, `time_taken`, `question_order`, `created_at`) VALUES
(21, 9, 4, '0', NULL, '0', NULL, 1, 1.00, 1, 3, 0, '2025-08-04 12:02:23'),
(22, 10, 3, '1', NULL, '1', NULL, 1, 1.00, 1, 2, 0, '2025-08-04 12:06:10'),
(23, 10, 1, '2', NULL, '2', NULL, 1, 1.00, 1, 2, 0, '2025-08-04 12:06:10'),
(24, 10, 2, '1', NULL, '1', NULL, 1, 1.00, 1, 2, 0, '2025-08-04 12:06:10'),
(25, 11, 1, '0', NULL, '0', NULL, 1, 1.00, 1, 2, 0, '2025-08-12 04:17:57'),
(26, 11, 2, '1', NULL, '0', NULL, 0, -0.25, 1, 2, 0, '2025-08-12 04:17:57'),
(27, 11, 3, '0', NULL, '0', NULL, 1, 1.00, 1, 2, 0, '2025-08-12 04:17:57'),
(28, 12, 1, '0', NULL, '0', NULL, 1, 1.00, 1, 9, 0, '2025-08-31 07:45:02'),
(29, 12, 2, '0', NULL, '0', NULL, 1, 1.00, 1, 9, 0, '2025-08-31 07:45:02'),
(30, 12, 3, '0', NULL, '0', NULL, 1, 1.00, 1, 9, 0, '2025-08-31 07:45:02');

-- --------------------------------------------------------

--
-- Table structure for table `note_discussions`
--

CREATE TABLE `note_discussions` (
  `id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `is_question` tinyint(1) DEFAULT 0,
  `is_resolved` tinyint(1) DEFAULT 0,
  `parent_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `note_discussions`
--

INSERT INTO `note_discussions` (`id`, `topic_id`, `user_id`, `title`, `content`, `is_question`, `is_resolved`, `parent_id`, `created_at`, `updated_at`) VALUES
(1, 2, 60, 'How can i solve this', 'How can i solve this', 1, 0, NULL, '2025-07-25 13:46:59', '2025-07-25 13:46:59'),
(2, 2, 60, '', 'Easy', 0, 0, 1, '2025-07-25 13:53:13', '2025-07-25 13:53:13'),
(3, 1, 60, 'What is Physics', 'What is Physics', 1, 0, NULL, '2025-07-26 09:14:12', '2025-07-26 09:14:12'),
(4, 1, 60, 'What is Physics', 'What is Physics', 1, 0, NULL, '2025-07-26 09:14:12', '2025-07-26 09:14:12'),
(5, 1, 60, 'What is Physics', 'What is Physics', 1, 0, NULL, '2025-07-26 09:14:12', '2025-07-26 09:14:12'),
(6, 1, 60, '', 'Nice qun', 0, 0, 5, '2025-07-26 09:15:14', '2025-07-26 09:15:14');

-- --------------------------------------------------------

--
-- Table structure for table `options`
--

CREATE TABLE `options` (
  `option_id` int(11) NOT NULL,
  `question_id` int(11) DEFAULT NULL,
  `option_text` varchar(255) NOT NULL,
  `is_correct` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `options`
--

INSERT INTO `options` (`option_id`, `question_id`, `option_text`, `is_correct`) VALUES
(301, 81, 'The number of combinations of n items taken r at a time.', 0),
(302, 81, 'The number of permutations of n items taken r at a time.', 1),
(303, 81, 'The number of subsets of n items.', 0),
(304, 81, 'The number of ways to choose r items from n items.', 0),
(305, 82, 'If one event can occur in m ways and another event can occur in n ways, then both events can occur in m+n ways.', 0),
(306, 82, 'If one event can occur in m ways and another event can occur in n ways, then both events can occur in m*n ways.', 1),
(307, 82, 'The sum of all possible outcomes.', 0),
(308, 82, 'The difference between the number of ways two events can occur.', 0),
(309, 83, '11!', 0),
(310, 83, '34650', 1),
(311, 83, '360', 0),
(312, 83, '11! / (4! * 4! * 2!)', 0),
(313, 84, 'If an event can occur in m ways and n ways, then the total number of ways is m*n.', 0),
(314, 84, 'If an event can occur in m ways or n ways, where the ways are mutually exclusive, then the total number of ways is m+n.', 1),
(315, 84, 'The number of ways to arrange items.', 0),
(316, 84, 'The number of ways to select items.', 0),
(317, 85, '6', 0),
(318, 85, '8', 0),
(319, 85, '12', 1),
(320, 85, '2', 0),
(321, 86, '120', 0),
(322, 86, '60', 1),
(323, 86, '24', 0),
(324, 86, '5', 0),
(325, 87, '5', 0),
(326, 87, '25', 0),
(327, 87, '120', 1),
(328, 87, '1', 0),
(329, 88, '5!', 0),
(330, 88, '120', 0),
(331, 88, '60', 1),
(332, 88, '24', 0),
(333, 89, '35', 0),
(334, 89, '210', 1),
(335, 89, '7', 0),
(336, 89, '21', 0),
(337, 90, 'n! / r!', 0),
(338, 90, 'n! / (r! * (n-r)!)', 1),
(339, 90, 'n! / (n-r)!', 0),
(340, 90, 'n * r', 0),
(341, 91, '10', 0),
(342, 91, '40', 0),
(343, 91, '210', 1),
(344, 91, '100', 0),
(345, 92, '15', 0),
(346, 92, '30', 1),
(347, 92, '8', 0),
(348, 92, '60', 0),
(349, 93, 'Solution provided in video.', 0),
(350, 93, 'Solution depends on the specific problem in the textbook.', 1),
(351, 93, 'It is always 10.', 0),
(352, 93, 'It is always 5.', 0),
(353, 94, 'Always use permutation.', 0),
(354, 94, 'Always use combination.', 0),
(355, 94, 'First identify if order matters. If yes, use permutation. If no, use combination. Break down complex problems into smaller parts.', 1),
(356, 94, 'Guess the answer.', 0),
(357, 95, 'Ignore the restrictions.', 0),
(358, 95, 'Treat the restricted items as a single unit or subtract unfavorable arrangements from total arrangements.', 1),
(359, 95, 'Add more restrictions.', 0),
(360, 95, 'Multiply by the number of restrictions.', 0),
(361, 96, 'Not reading the question carefully.', 0),
(362, 96, 'Confusing when to use permutation versus combination.', 1),
(363, 96, 'Calculating too quickly.', 0),
(364, 96, 'Using a calculator.', 0),
(365, 97, 'If the problem involves numbers, it is permutation.', 0),
(366, 97, 'If the problem involves letters, it is combination.', 0),
(367, 97, 'If the arrangement or order of items is important, it is a permutation. If only the selection of items matters, it is a combination.', 1),
(368, 97, 'If the problem is long, it is permutation.', 0),
(369, 98, 'A simple addition problem.', 0),
(370, 98, 'A question involving arranging letters with repetitions or selecting a team with specific conditions.', 1),
(371, 98, 'A question about the history of mathematics.', 0),
(372, 98, 'A question about basic arithmetic.', 0),
(373, 99, '(a+b)^n = sum from k=0 to n of (nCk * a^(n-k) * b^k)', 1),
(374, 99, '(a+b)^n = a^n + b^n', 0),
(375, 99, '(a+b)^n = n! * a * b', 0),
(376, 99, '(a+b)^n = (nCk) * a^(n-k) * b^k', 0),
(377, 100, '5', 0),
(378, 100, '10', 1),
(379, 100, '1', 0),
(380, 100, '20', 0),
(381, 101, '32x^3y^3', 0),
(382, 101, '160x^3y^3', 1),
(383, 101, '-160x^3y^3', 0),
(384, 101, '64x^3y^3', 0),
(385, 102, 'To teach advanced programming.', 0),
(386, 102, 'To provide fundamental knowledge of physics principles applicable to engineering disciplines.', 1),
(387, 102, 'To explore historical physics theories.', 0),
(388, 102, 'To prepare for medical entrance exams.', 0),
(389, 103, 'B.E. Civil-I & B.E. Computer-II Semester', 1),
(390, 103, 'B.Sc. Physics', 0),
(391, 103, 'M.Sc. Applied Physics', 0),
(392, 103, 'Diploma in Electrical Engineering', 0),
(393, 104, 'Organic Chemistry', 0),
(394, 104, 'Mechanical Oscillation', 1),
(395, 104, 'Thermodynamics', 0),
(396, 104, 'Quantum Mechanics', 0),
(397, 105, 'Always 50%.', 0),
(398, 105, 'Always 100%.', 0),
(399, 105, 'The weightage depends on the specific university guidelines.', 1),
(400, 105, 'It is negligible.', 0),
(401, 106, 'One section.', 0),
(402, 106, 'Three sections.', 0),
(403, 106, 'Two sections: A and B, or similar.', 1),
(404, 106, 'Four sections.', 0),
(405, 107, 'No, they are rarely included.', 0),
(406, 107, 'Only theoretical questions are asked.', 0),
(407, 107, 'Yes, numerical problems are a significant part.', 1),
(408, 107, 'Only conceptual questions are asked.', 0),
(409, 108, 'Motion in a straight line.', 0),
(410, 108, 'A type of periodic motion where the restoring force is directly proportional to the displacement and acts in the opposite direction.', 1),
(411, 108, 'Motion with constant acceleration.', 0),
(412, 108, 'Random motion.', 0),
(413, 109, 'A car moving on a road.', 0),
(414, 109, 'A mass-spring system or a simple pendulum.', 1),
(415, 109, 'A ball rolling down a hill.', 0),
(416, 109, 'A satellite orbiting Earth.', 0),
(417, 110, '1 second', 0),
(418, 110, '2.007 seconds', 1),
(419, 110, '0.5 seconds', 0),
(420, 110, '10 seconds', 0),
(421, 111, 'The movement of water.', 0),
(422, 111, 'The propagation of a disturbance from one point to another without the bodily transfer of matter.', 1),
(423, 111, 'The flow of electric current.', 0),
(424, 111, 'The vibration of an object.', 0),
(425, 112, 'Wave speed = frequency + wavelength', 0),
(426, 112, 'Wave speed = frequency - wavelength', 0),
(427, 112, 'Wave speed = frequency * wavelength', 1),
(428, 112, 'Wave speed = frequency / wavelength', 0),
(429, 113, '1 m/s', 0),
(430, 113, '340 m/s', 1),
(431, 113, '34 m/s', 0),
(432, 113, '100 m/s', 0),
(433, 114, 'The study of light.', 0),
(434, 114, 'The branch of physics that deals with the study of sound, including its production, transmission, and effects.', 1),
(435, 114, 'The study of heat.', 0),
(436, 114, 'The study of electricity.', 0),
(437, 115, 'The time it takes for sound to travel a certain distance.', 0),
(438, 115, 'The time required for the sound intensity to decay by 60 dB after the sound source is stopped.', 1),
(439, 115, 'The time it takes for sound to reach its maximum intensity.', 0),
(440, 115, 'The time it takes for sound to echo.', 0),
(441, 116, 'Photography', 0),
(442, 116, 'Concert hall design or noise control.', 1),
(443, 116, 'Cooking', 0),
(444, 116, 'Gardening', 0),
(445, 117, 'A device that generates electricity.', 0),
(446, 117, 'A device that stores electrical energy in an electric field.', 1),
(447, 117, 'A device that converts light into electricity.', 0),
(448, 117, 'A device that measures current.', 0),
(449, 118, 'The ability of a material to conduct electricity.', 0),
(450, 118, 'The maximum electric field that a dielectric material can withstand without breaking down.', 1),
(451, 118, 'The resistance of a material to current flow.', 0),
(452, 118, 'The amount of charge a material can hold.', 0),
(453, 119, '10 mC', 0),
(454, 119, '1 mC', 1),
(455, 119, '0.1 mC', 0),
(456, 119, '1000 mC', 0),
(457, 120, 'To calculate the resistance of a wire.', 0),
(458, 120, 'It relates the macroscopic dielectric constant of a material to the microscopic polarizability of its constituent atoms or molecules.', 1),
(459, 120, 'To determine the speed of light.', 0),
(460, 120, 'To measure temperature.', 0),
(461, 121, 'The material is a perfect conductor.', 0),
(462, 121, 'The material is isotropic and the local electric field is uniform.', 1),
(463, 121, 'The material is a semiconductor.', 0),
(464, 121, 'The material is at absolute zero temperature.', 0),
(465, 122, 'Temperature has no effect.', 0),
(466, 122, 'Temperature affects the polarizability of molecules, thus influencing the dielectric constant.', 1),
(467, 122, 'Increasing temperature always decreases the dielectric constant.', 0),
(468, 122, 'Increasing temperature always increases the dielectric constant.', 0),
(469, 123, 'It describes the force between two charges.', 0),
(470, 123, 'It states that a changing magnetic field induces an electromotive force (EMF) in a conductor.', 1),
(471, 123, 'It describes the force on a current-carrying wire in a magnetic field.', 0),
(472, 123, 'It states that magnetic monopoles exist.', 0),
(473, 124, 'It states that the direction of the induced current is such that it aids the change in magnetic flux.', 0),
(474, 124, 'It states that the direction of the induced current is such that it opposes the change in magnetic flux that produced it.', 1),
(475, 124, 'It describes the relationship between current and magnetic field.', 0),
(476, 124, 'It states that electric fields produce magnetic fields.', 0),
(477, 125, '0.5 V', 0),
(478, 125, '5 V', 1),
(479, 125, '50 V', 0),
(480, 125, '0.05 V', 0),
(481, 126, 'Light scattering within the fiber.', 0),
(482, 126, 'The phenomenon where light traveling in a denser medium strikes the boundary of a rarer medium at an angle greater than the critical angle and reflects back into the denser medium.', 1),
(483, 126, 'Light passing through the fiber without any reflection.', 0),
(484, 126, 'Light being absorbed by the fiber material.', 0),
(485, 127, 'Copper wire and aluminum wire.', 0),
(486, 127, 'Single-mode fiber and multi-mode fiber.', 1),
(487, 127, 'Thick fiber and thin fiber.', 0),
(488, 127, 'Transparent fiber and opaque fiber.', 0),
(489, 128, 'Low cost.', 0),
(490, 128, 'Easy installation.', 0),
(491, 128, 'High bandwidth and low signal loss.', 1),
(492, 128, 'Resistance to electromagnetic interference.', 0),
(493, 129, 'The integral of the wave function must be zero.', 0),
(494, 129, 'The integral of the square of the magnitude of the wave function over all space must be equal to 1.', 1),
(495, 129, 'The wave function must be a real number.', 0),
(496, 129, 'The wave function must be constant.', 0),
(497, 130, 'It makes calculations easier.', 0),
(498, 130, 'It ensures that the probability of finding the particle somewhere in space is 1.', 1),
(499, 130, 'It simplifies the Schrödinger equation.', 0),
(500, 130, 'It determines the energy of the particle.', 0),
(501, 131, 'By setting A to 1.', 0),
(502, 131, 'By finding the value of A such that the integral of |Psi(x)|^2 from -infinity to +infinity is 1.', 1),
(503, 131, 'By taking the derivative of Psi(x).', 0),
(504, 131, 'By integrating Psi(x).', 0),
(505, 132, 'Energy can neither be created nor destroyed.', 0),
(506, 132, 'The change in internal energy of a system is equal to the heat added to the system minus the work done by the system (ΔU = Q - W).', 1),
(507, 132, 'Heat always flows from a hotter to a colder body.', 0),
(508, 132, 'Entropy of an isolated system always increases.', 0),
(509, 133, 'A process where temperature is constant.', 0),
(510, 133, 'A process where pressure is constant.', 0),
(511, 133, 'A process in which no heat is exchanged between the system and its surroundings.', 1),
(512, 133, 'A process where volume is constant.', 0),
(513, 134, '70 J', 0),
(514, 134, '30 J', 0),
(515, 134, '-30 J', 1),
(516, 134, '-70 J', 0),
(517, 135, 'The total energy of an isolated system is constant.', 0),
(518, 135, 'The total entropy of an isolated system can only increase over time, or remain constant in ideal cases; it never decreases.', 1),
(519, 135, 'Heat cannot flow from a colder to a hotter body without external work.', 0),
(520, 135, 'It is impossible to achieve absolute zero temperature.', 0),
(521, 136, 'A cycle that produces the most work.', 0),
(522, 136, 'A theoretical thermodynamic cycle that describes the most efficient possible heat engine.', 1),
(523, 136, 'A cycle that involves only isothermal processes.', 0),
(524, 136, 'A cycle that involves only adiabatic processes.', 0),
(525, 137, 'Yes, always.', 0),
(526, 137, 'Only if it is a reversible engine.', 0),
(527, 137, 'No, according to the Second Law of Thermodynamics.', 1),
(528, 137, 'Only if the temperature difference is infinite.', 0),
(529, 138, 'The ability of a material to absorb heat.', 0),
(530, 138, 'The property of a material that indicates its ability to conduct heat.', 1),
(531, 138, 'The ability of a material to reflect heat.', 0),
(532, 138, 'The amount of heat stored in a material.', 0),
(533, 139, 'Absorption, reflection, transmission.', 0),
(534, 139, 'Conduction, convection, and radiation.', 1),
(535, 139, 'Evaporation, condensation, melting.', 0),
(536, 139, 'Expansion, contraction, vibration.', 0),
(537, 140, 'Conduction', 0),
(538, 140, 'Convection', 0),
(539, 140, 'Radiation', 1),
(540, 140, 'All of the above', 0),
(541, 141, 'A theory about the origin of gases.', 0),
(542, 141, 'A model that describes gases as a large number of microscopic particles (atoms or molecules) in constant, random motion.', 1),
(543, 141, 'A theory about the chemical reactions of gases.', 0),
(544, 141, 'A model that describes gases as continuous fluids.', 0),
(545, 142, 'F=ma', 0),
(546, 142, 'E=mc^2', 0),
(547, 142, 'PV = nRT', 1),
(548, 142, 'V=IR', 0),
(549, 143, 'Inversely proportional to temperature.', 0),
(550, 143, 'Directly proportional to temperature.', 1),
(551, 143, 'Independent of temperature.', 0),
(552, 143, 'Proportional to the square of temperature.', 0),
(553, 144, 'The energy radiated is proportional to temperature.', 0),
(554, 144, 'The total energy radiated per unit surface area of a black body per unit time is directly proportional to the fourth power of its absolute temperature.', 1),
(555, 144, 'The energy radiated is inversely proportional to temperature.', 0),
(556, 144, 'The energy radiated is proportional to the square of temperature.', 0),
(557, 145, 'A body that reflects all light.', 0),
(558, 145, 'An idealized physical body that absorbs all incident electromagnetic radiation, regardless of frequency or angle of incidence.', 1),
(559, 145, 'A body that emits only visible light.', 0),
(560, 145, 'A body that is perfectly transparent.', 0),
(561, 146, '2 times', 0),
(562, 146, '4 times', 0),
(563, 146, '8 times', 0),
(564, 146, '16 times', 1),
(565, 147, 'Kinematics deals with forces, Kinetics does not.', 0),
(566, 147, 'Kinematics describes motion without considering forces, while Kinetics deals with motion and the forces causing it.', 1),
(567, 147, 'There is no difference.', 0),
(568, 147, 'Kinematics is for static objects, Kinetics for moving objects.', 0),
(569, 148, 'To study the properties of materials.', 0),
(570, 148, 'To analyze and predict the behavior of bodies under the action of forces.', 1),
(571, 148, 'To design electrical circuits.', 0),
(572, 148, 'To understand chemical reactions.', 0),
(573, 149, 'Force', 0),
(574, 149, 'Displacement, velocity, or acceleration.', 1),
(575, 149, 'Mass', 0),
(576, 149, 'Energy', 0),
(577, 150, 'F = ma', 0),
(578, 150, 'v = u + at', 1),
(579, 150, 'E = mc^2', 0),
(580, 150, 'P = VI', 0),
(581, 151, 'Components resolved along a curved path.', 0),
(582, 151, 'Components of motion resolved along mutually perpendicular axes (e.g., x and y).', 1),
(583, 151, 'Components resolved along a single axis.', 0),
(584, 151, 'Components resolved along the direction of force.', 0),
(585, 152, '2 m/s', 0),
(586, 152, '5 m/s', 0),
(587, 152, '10 m/s', 1),
(588, 152, '25 m/s', 0),
(589, 153, 'The component perpendicular to velocity.', 0),
(590, 153, 'The component of acceleration that is parallel to the velocity vector, indicating a change in speed.', 1),
(591, 153, 'The component that causes rotation.', 0),
(592, 153, 'The component that is constant.', 0),
(593, 154, 'The component that is parallel to velocity.', 0),
(594, 154, 'The component of acceleration that is perpendicular to the velocity vector, indicating a change in direction.', 1),
(595, 154, 'The component that causes linear motion.', 0),
(596, 154, 'The component that is always zero.', 0),
(597, 155, 'Motion perpendicular to the origin.', 0),
(598, 155, 'Motion along the line connecting the particle to the origin.', 1),
(599, 155, 'Motion tangential to the origin.', 0),
(600, 155, 'Motion around the origin.', 0),
(601, 156, 'Motion in a straight line.', 0),
(602, 156, 'The motion of an object thrown or projected into the air, subject only to the acceleration of gravity.', 1),
(603, 156, 'Motion in a circle.', 0),
(604, 156, 'Motion with constant velocity.', 0),
(605, 157, 'A straight line', 0),
(606, 157, 'A circle', 0),
(607, 157, 'A parabola', 1),
(608, 157, 'An ellipse', 0),
(609, 158, '1 second', 0),
(610, 158, '2 seconds', 1),
(611, 61, '4 seconds', 0),
(612, 61, '0.5 seconds', 0),
(613, 159, 'It states that action and reaction are equal and opposite.', 0),
(614, 159, 'It states that the sum of the external forces and the inertial forces acting on a body is zero.', 1),
(615, 159, 'It describes the conservation of momentum.', 0),
(616, 159, 'It describes the conservation of energy.', 0),
(617, 160, 'A state where the body is at rest.', 0),
(618, 160, 'A state where the net force and net moment acting on a body are both zero, even if the body is moving.', 1),
(619, 160, 'A state where the body is accelerating.', 0),
(620, 160, 'A state where the body is rotating.', 0),
(621, 161, 'Statics deals with moving bodies, kinetics with resting bodies.', 0),
(622, 161, 'Statics deals with bodies at rest or in constant velocity, while kinetics deals with bodies in accelerated motion.', 1),
(623, 161, 'Statics is a branch of mathematics, kinetics is a branch of physics.', 0),
(624, 161, 'There is no difference.', 0),
(625, 162, 'To calculate the volume of a body.', 0),
(626, 162, 'To isolate a body from its surroundings and show all the external forces acting on it.', 1),
(627, 162, 'To determine the material properties of a body.', 0),
(628, 162, 'To measure the temperature of a body.', 0),
(629, 163, 'Only applied forces.', 0),
(630, 163, 'Gravity and normal forces.', 1),
(631, 163, 'Only friction.', 0),
(632, 163, 'Only tension.', 0),
(633, 164, 'Parallel to the inclined surface.', 0),
(634, 164, 'Perpendicular to the inclined surface.', 1),
(635, 164, 'Vertically downwards.', 0),
(636, 164, 'Horizontally.', 0),
(637, 165, '0', 0),
(638, 165, '+1', 0),
(639, 165, '-2', 1),
(640, 165, '-1', 0),
(641, 166, 'Fe^2+ + MnO4^- -> Fe^3+ + Mn^2+', 0),
(642, 166, '5Fe^2+ + MnO4^- + 8H^+ -> 5Fe^3+ + Mn^2+ + 4H2O', 1),
(643, 166, 'Fe^2+ + MnO4^- + H2O -> Fe^3+ + Mn^2+', 0),
(644, 166, 'Fe^2+ + MnO4^- -> Fe^3+ + Mn^2+ + H2O', 0),
(645, 167, 'Increase in oxidation number.', 0),
(646, 167, 'Decrease in oxidation number.', 1),
(647, 167, 'No change in oxidation number.', 0),
(648, 167, 'Loss of electrons.', 0),
(649, 168, 'The reactant that is in excess.', 0),
(650, 168, 'The reactant that is completely consumed in a chemical reaction and limits the amount of product formed.', 1),
(651, 168, 'The reactant that has the highest molecular weight.', 0),
(652, 168, 'The reactant that is a catalyst.', 0),
(653, 169, 'H2', 0),
(654, 169, 'O2', 1),
(655, 169, 'H2O', 0),
(656, 169, 'Neither', 0),
(657, 170, 'By comparing their initial masses.', 0),
(658, 170, 'Calculate the moles of product formed from each reactant, the reactant that produces the least amount of product is the limiting reagent.', 1),
(659, 170, 'By checking their physical state.', 0),
(660, 170, 'By observing the color change.', 0),
(661, 171, 'Methanol', 0),
(662, 171, 'Ethanol', 1),
(663, 171, 'Propanol', 0),
(664, 171, 'Butanol', 0),
(665, 172, 'A group of atoms that are always found together.', 0),
(666, 172, 'A specific group of atoms within a molecule that is responsible for the characteristic chemical reactions of that molecule.', 1),
(667, 172, 'A group of atoms that determines the color of a molecule.', 0),
(668, 172, 'A group of atoms that are always in a straight chain.', 0),
(669, 173, 'Neutralization', 0),
(670, 173, 'Precipitation', 0),
(671, 173, 'Addition, substitution, or elimination.', 1),
(672, 173, 'Redox', 0),
(673, 174, 'A series of compounds with different functional groups.', 0),
(674, 174, 'A series of organic compounds with the same functional group but differing by a CH2 unit.', 1),
(675, 174, 'A series of inorganic compounds.', 0),
(676, 174, 'A series of compounds with the same molecular formula.', 0),
(677, 175, 'Compounds with different molecular formulas.', 0),
(678, 175, 'Compounds that have the same molecular formula but different structural arrangements of atoms.', 1),
(679, 175, 'Compounds that have the same structure but different molecular formulas.', 0),
(680, 175, 'Compounds that are mirror images of each other.', 0),
(681, 176, 'Pentane', 0),
(682, 176, 'Isobutane (2-methylpropane)', 1),
(683, 176, 'Propane', 0),
(684, 176, 'Cyclobutane', 0),
(685, 177, 'To measure temperature.', 0),
(686, 177, 'To measure small lengths with high precision.', 1),
(687, 177, 'To measure mass.', 0),
(688, 177, 'To measure time.', 0),
(689, 178, 'Eat food in the lab.', 0),
(690, 178, 'Wear safety goggles.', 1),
(691, 178, 'Run in the lab.', 0),
(692, 178, 'Touch hot equipment directly.', 0),
(693, 179, 'To measure the current.', 0),
(694, 179, 'To verify Ohm\'s Law and determine the resistance of a conductor.', 1),
(695, 179, 'To measure the voltage.', 0),
(696, 179, 'To calculate power.', 0),
(697, 180, 'A wheel.', 0),
(698, 180, 'Actuators, sensors, and a controller.', 1),
(699, 180, 'A battery.', 0),
(700, 180, 'A motor.', 0),
(701, 181, 'To provide power to the robot.', 0),
(702, 181, 'To gather information about the robot\'s environment.', 1),
(703, 181, 'To move the robot.', 0),
(704, 181, 'To store data.', 0),
(705, 182, 'Art creation.', 0),
(706, 182, 'Industrial automation or household cleaning.', 1),
(707, 182, 'Cooking.', 0),
(708, 182, 'Gardening.', 0),
(709, 183, 'Light Fidelity, a wireless communication technology that uses light to transmit data.', 1),
(710, 183, 'Light amplification by stimulated emission of radiation.', 0),
(711, 183, 'A type of fiber optic cable.', 0),
(712, 183, 'A new type of display technology.', 0),
(713, 184, 'By detecting changes in temperature.', 0),
(714, 184, 'By detecting the magnetic field produced by current flow.', 1),
(715, 184, 'By detecting sound waves.', 0),
(716, 184, 'By detecting light intensity.', 0),
(717, 185, 'Lower cost.', 0),
(718, 185, 'Easier setup.', 0),
(719, 185, 'Higher bandwidth and more secure in certain environments.', 1),
(720, 185, 'Longer range.', 0),
(721, 186, 'Pressure is inversely proportional to area.', 0),
(722, 186, 'Pressure applied to an enclosed fluid is transmitted undiminished to every portion of the fluid and the walls of the containing vessel.', 1),
(723, 186, 'Fluid always flows from high pressure to low pressure.', 0),
(724, 186, 'The volume of a fluid is constant.', 0),
(725, 187, 'By using a motor to lift heavy objects.', 0),
(726, 187, 'By applying a small force over a small area to generate a large force over a large area.', 1),
(727, 187, 'By converting electrical energy into mechanical energy.', 0),
(728, 187, 'By using compressed air.', 0),
(729, 188, 'A chemical reaction.', 0),
(730, 188, 'A lever or a pulley system.', 1),
(731, 730, 'A plant growing.', 0),
(732, 730, 'A cooking recipe.', 0),
(733, 189, 'Every particle attracts every other particle with a force proportional to their masses.', 0),
(734, 189, 'Every particle in the universe attracts every other particle with a force that is directly proportional to the product of their masses and inversely proportional to the square of the distance between their centers.', 1),
(735, 189, 'Gravity is a force that pushes objects apart.', 0),
(736, 189, 'The force of gravity is constant everywhere.', 0),
(737, 190, 'By using a single satellite.', 0),
(738, 190, 'By receiving signals from multiple satellites to triangulate a receiver\'s position on Earth.', 1),
(739, 190, 'By measuring the Earth\'s magnetic field.', 0),
(740, 190, 'By using radio waves from ground stations.', 0),
(741, 191, '0 m/s^2', 0),
(742, 191, '9.8 m/s^2', 1),
(743, 191, '100 m/s^2', 0),
(744, 191, '1 m/s^2', 0),
(745, 192, 'A component that stores charge.', 0),
(746, 192, 'An electrical component that limits or regulates the flow of electrical current in an electronic circuit.', 1),
(747, 192, 'A component that amplifies voltage.', 0),
(748, 192, 'A component that generates light.', 0),
(749, 193, 'A circuit where components are connected in parallel.', 0),
(750, 193, 'A circuit in which components are connected end-to-end, so that the current flows through each component sequentially.', 1),
(751, 193, 'A circuit with multiple paths for current.', 0),
(752, 193, 'A circuit that only uses resistors.', 0),
(753, 194, 'Connect the LED directly to the battery.', 0),
(754, 194, 'Connect the positive terminal of the battery to the resistor, then to the anode of the LED, and the cathode of the LED to the negative terminal of the battery.', 1),
(755, 194, 'Connect the resistor in parallel with the LED.', 0),
(756, 194, 'Connect the LED to the resistor, and then to the positive terminal of the battery.', 0),
(757, 195, 'x^3 + C', 0),
(758, 195, '(x^3)/3 + C', 1),
(759, 195, '2x + C', 0),
(760, 195, 'x^2/2 + C', 0),
(761, 196, 'It states that every function has an integral.', 0),
(762, 196, 'It links the concepts of differentiating a function and integrating a function.', 1),
(763, 196, 'It states that every function has a derivative.', 0),
(764, 196, 'It defines the area under a curve.', 0),
(765, 197, '0', 0),
(766, 197, '1', 1),
(767, 197, '2', 0),
(768, 197, '0.5', 0),
(769, 198, 'A matrix.', 0),
(770, 198, 'A scalar value that can be computed from the elements of a square matrix.', 1),
(771, 198, 'A vector.', 0),
(772, 198, 'A set of numbers.', 0),
(773, 199, '1', 0),
(774, 199, '0', 1),
(775, 199, 'Undefined', 0),
(776, 199, 'Depends on the matrix.', 0),
(777, 200, 'It doubles the determinant.', 0),
(778, 200, 'It changes the sign of the determinant.', 1),
(779, 200, 'It squares the determinant.', 0),
(780, 200, 'It has no effect.', 0),
(781, 201, 'x=2', 0),
(782, 201, 'x=0', 1),
(783, 201, 'x=-2', 0),
(784, 201, 'x=4', 0),
(785, 202, '2', 0),
(786, 202, '-2', 1),
(787, 202, '10', 0),
(788, 202, '4', 0),
(789, 203, '1', 0),
(790, 203, '0', 1),
(791, 203, 'Undefined', 0),
(792, 203, 'Depends on other rows.', 0),
(793, 204, 'Row operations only.', 0),
(794, 204, 'Cofactor expansion or Sarrus\'s rule.', 1),
(795, 204, 'Multiplying all elements.', 0),
(796, 204, 'Adding all elements.', 0),
(797, 205, 'A method for factoring polynomials.', 0),
(798, 205, 'A method for solving systems of linear equations using determinants.', 1),
(799, 205, 'A method for finding eigenvalues.', 0),
(800, 205, 'A method for matrix multiplication.', 0),
(801, 206, 'The system has no solution.', 0),
(802, 206, 'The system has infinitely many solutions.', 0),
(803, 206, 'The system has a unique solution.', 1),
(804, 206, 'The system is inconsistent.', 0),
(805, 207, 'The value of the function at a specific point.', 0),
(806, 207, 'The value that a function approaches as the input (or x) approaches a certain value.', 1),
(807, 207, 'The maximum value of a function.', 0),
(808, 207, 'The derivative of a function.', 0),
(809, 208, 'A form that is always zero.', 0),
(810, 208, 'An expression whose limit cannot be determined by simply substituting the limiting value (e.g., 0/0, infinity/infinity).', 1),
(811, 208, 'A form that is always infinity.', 0),
(812, 208, 'A form that has a unique solution.', 0),
(813, 209, 'lim (x->c) x = 0', 0),
(814, 209, 'lim (x->c) x = c', 1),
(815, 209, 'lim (x->c) x = infinity', 0),
(816, 209, 'lim (x->c) x = 1', 0),
(817, 210, 'lim (f(x) + g(x)) = lim f(x) * lim g(x)', 0),
(818, 210, 'lim (f(x) + g(x)) = lim f(x) + lim g(x)', 1),
(819, 210, 'lim (f(x) + g(x)) = lim f(x) - lim g(x)', 0),
(820, 210, 'lim (f(x) + g(x)) = lim f(x) / lim g(x)', 0),
(821, 211, 'lim (c*f(x)) = c + lim f(x)', 0),
(822, 211, 'lim (c*f(x)) = c * lim f(x)', 1),
(823, 211, 'lim (c*f(x)) = c / lim f(x)', 0),
(824, 211, 'lim (c*f(x)) = lim f(x)', 0),
(825, 212, 'L + M', 0),
(826, 212, 'L - M', 0),
(827, 212, 'L * M', 1),
(828, 212, 'L / M', 0),
(829, 213, '4', 0),
(830, 213, '9', 1),
(831, 213, '11', 0),
(832, 213, '7', 0),
(833, 214, '0', 0),
(834, 214, '1', 0),
(835, 214, '2', 1),
(836, 214, 'Undefined', 0),
(837, 215, 'Substitution', 0),
(838, 215, 'Graphing', 0),
(839, 215, 'Factoring and cancelling common terms.', 1),
(840, 215, 'Trial and error.', 0),
(841, 216, '0', 0),
(842, 216, '1', 0),
(843, 216, 'Infinity', 1),
(844, 216, 'Undefined', 0),
(845, 217, '0', 0),
(846, 217, '1', 0),
(847, 217, '-Infinity', 1),
(848, 217, 'Undefined', 0),
(849, 218, 'Finding integrals.', 0),
(850, 218, 'Evaluating limits of indeterminate forms by taking derivatives of the numerator and denominator.', 1),
(851, 218, 'Solving differential equations.', 0),
(852, 218, 'Graphing functions.', 0),
(853, 219, 'f(c) is defined.', 0),
(854, 219, 'lim (x->c) f(x) exists.', 0),
(855, 219, 'f(c) is defined, lim (x->c) f(x) exists, and lim (x->c) f(x) = f(c).', 1),
(856, 219, 'The function is differentiable at c.', 0),
(857, 220, 'A discontinuity where the function goes to infinity.', 0),
(858, 220, 'A discontinuity where the left-hand and right-hand limits exist but are not equal.', 1),
(859, 220, 'A discontinuity that can be removed by redefining the function at a single point.', 0),
(860, 220, 'A discontinuity where the function is undefined.', 0),
(861, 221, 'Yes', 0),
(862, 221, 'No', 1),
(863, 221, 'Only if x is positive.', 0),
(864, 221, 'Only if x is negative.', 0),
(865, 222, '0', 0),
(866, 222, '1', 1),
(867, 222, 'Infinity', 0),
(868, 222, 'Undefined', 0),
(869, 223, '1', 0),
(870, 223, '0', 1),
(871, 223, 'Infinity', 0),
(872, 223, 'Undefined', 0),
(873, 224, 'To find the derivative of a function.', 0),
(874, 224, 'To find the limit of a function by comparing it with two other functions whose limits are known.', 1),
(875, 224, 'To determine the continuity of a function.', 0),
(876, 224, 'To evaluate definite integrals.', 0),
(877, 225, 'The area under the curve.', 0),
(878, 225, 'The slope of the tangent line to the function\'s graph at a given point.', 1),
(879, 225, 'The y-intercept of the function.', 0),
(880, 225, 'The x-intercept of the function.', 0),
(881, 226, 'd/dx (x^n) = x^(n+1) / (n+1)', 0),
(882, 226, 'd/dx (x^n) = n*x^(n-1)', 1),
(883, 226, 'd/dx (x^n) = n*x^n', 0),
(884, 226, 'd/dx (x^n) = x^n', 0),
(885, 227, '6x^2', 0),
(886, 227, '6x', 1),
(887, 227, '3x', 0),
(888, 227, 'x^3', 0),
(889, 228, 'f\'(x) = f(x+h) - f(x)', 0),
(890, 228, 'f\'(x) = lim (h->0) [f(x+h) - f(x)] / h', 1),
(891, 228, 'f\'(x) = (f(x) - f(h)) / h', 0),
(892, 228, 'f\'(x) = lim (h->0) f(x+h) / h', 0),
(893, 229, 'x', 0),
(894, 229, '2x', 1),
(895, 229, 'x^3', 0),
(896, 229, '2', 0),
(897, 230, 'Because it was the first method discovered.', 0),
(898, 230, 'Because it uses the fundamental definition of the derivative based on limits.', 1),
(899, 230, 'Because it is the easiest method.', 0),
(900, 230, 'Because it is the most accurate method.', 0),
(901, 231, 'x*e^x', 0),
(902, 231, 'e^x', 1),
(903, 231, 'e^(x-1)', 0),
(904, 231, '1/e^x', 0),
(905, 232, 'x', 0),
(906, 232, '1/x', 1),
(907, 232, 'ln(x)', 0),
(908, 232, 'x*ln(x)', 0),
(909, 233, 'lim (h->0) (e^h + 1) / h = 1', 0),
(910, 233, 'lim (h->0) (e^h - 1) / h = 1', 1),
(911, 233, 'lim (h->0) (e^h) / h = 1', 0),
(912, 233, 'lim (h->0) (e^h - e) / h = 1', 0),
(913, 234, '4x^2 - 2', 0),
(914, 234, '12x^2 - 2', 1),
(915, 234, '3x^2 - 2', 0),
(916, 234, 'x^4 - x^2 + 5x', 0),
(917, 235, 'd/dx (u*v) = u\'v - uv\'', 0),
(918, 235, 'd/dx (u*v) = u\'v + uv\'', 1),
(919, 235, 'd/dx (u*v) = u\'v', 0),
(920, 235, 'd/dx (u*v) = uv\'', 0),
(921, 236, '2x(x-3) + (x^2+1)', 0),
(922, 236, '3x^2 - 6x + 1', 1),
(923, 236, 'x^3 - 3x^2 + x - 3', 0),
(924, 236, '2x - 3', 0),
(925, 237, '-cos(x)', 0),
(926, 237, 'cos(x)', 1),
(927, 237, 'tan(x)', 0),
(928, 237, 'sec(x)', 0),
(929, 238, 'sin(x)', 0),
(930, 238, '-sin(x)', 1),
(931, 238, 'tan(x)', 0),
(932, 238, 'cot(x)', 0),
(933, 239, 'sin(x)', 0),
(934, 239, 'cos(x)', 0),
(935, 239, 'sec^2(x)', 1),
(936, 239, 'cot(x)', 0),
(937, 240, 'To find the area under a curve.', 0),
(938, 240, 'To find the derivative of a function that is not explicitly solved for y in terms of x.', 1),
(939, 240, 'To solve linear equations.', 0),
(940, 240, 'To integrate functions.', 0),
(941, 241, 'x/y', 0),
(942, 241, '-x/y', 1),
(943, 241, '2x + 2y', 0),
(944, 241, '0', 0),
(945, 242, 'The product rule.', 0),
(946, 242, 'The chain rule.', 1),
(947, 242, 'The quotient rule.', 0),
(948, 242, 'The power rule.', 0),
(949, 243, '-1 / sqrt(1 - x^2)', 0),
(950, 243, '1 / sqrt(1 - x^2)', 1),
(951, 243, 'cos^-1(x)', 0),
(952, 243, '1 / (1 + x^2)', 0),
(953, 244, '-1 / (1 + x^2)', 0),
(954, 244, '1 / (1 + x^2)', 1),
(955, 244, 'cot^-1(x)', 0),
(956, 244, 'sec^-1(x)', 0),
(957, 245, '(-infinity, infinity)', 0),
(958, 245, '(-1, 1)', 1),
(959, 245, '[ -1, 1 ]', 0),
(960, 245, '(0, infinity)', 0),
(961, 246, 'd/dx (f(g(x))) = f\'(x) * g\'(x)', 0),
(962, 246, 'd/dx (f(g(x))) = f\'(g(x)) * g\'(x)', 1),
(963, 246, 'd/dx (f(g(x))) = g\'(f(x)) * f\'(x)', 0),
(964, 246, 'd/dx (f(g(x))) = f\'(x) + g\'(x)', 0),
(965, 247, '3(2x + 1)^2', 0),
(966, 247, '6(2x + 1)^2', 1),
(967, 247, '(2x + 1)^2', 0),
(968, 247, '3(2x + 1)^2 * 2', 0),
(969, 248, 'cos(x^2)', 0),
(970, 248, '2x cos(x^2)', 1),
(971, 248, '-sin(x^2)', 0),
(972, 248, 'x^2 cos(x^2)', 0),
(973, 249, 'Advanced integration techniques.', 0),
(974, 249, 'Reviewing fundamental concepts and common problem types.', 1),
(975, 249, 'Solving complex differential equations.', 0),
(976, 249, 'Introduction to new topics.', 0),
(977, 250, 'It is a very long class.', 0),
(978, 250, 'Intensive and focused learning to cover key topics quickly.', 1),
(979, 250, 'It only covers easy problems.', 0),
(980, 250, 'It is a class for power users.', 0),
(981, 251, 'By providing extra homework.', 0),
(982, 251, 'By providing exam-oriented questions and clear explanations.', 1),
(983, 251, 'By giving less material to study.', 0),
(984, 251, 'By making the exams easier.', 0),
(985, 252, 'Only basic concepts.', 0),
(986, 252, 'Advanced topics and more complex problem-solving techniques.', 1),
(987, 252, 'Only theoretical aspects.', 0),
(988, 252, 'Only numerical problems.', 0),
(989, 253, 'To make the course longer.', 0),
(990, 253, 'To provide a concise and effective summary for quick preparation.', 1),
(991, 253, 'To introduce new concepts quickly.', 0),
(992, 253, 'To replace regular classes.', 0),
(993, 254, 'No, only for advanced students.', 0),
(994, 254, 'Yes, it is designed for all students preparing for exams.', 1),
(995, 254, 'No, only for beginners.', 0),
(996, 254, 'Only for students who struggle with math.', 0),
(997, 255, 'Only very easy problems.', 0),
(998, 255, 'Random, important numericals with crystal clear concepts.', 1),
(999, 255, 'Only theoretical questions.', 0),
(1000, 255, 'Only problems from the textbook.', 0),
(1001, 256, 'Solutions are given randomly.', 0),
(1002, 256, 'A variety of problems from different sub-topics are solved.', 1),
(1003, 256, 'The problems are chosen without any specific order.', 0),
(1004, 256, 'The solutions are generated randomly.', 0),
(1005, 257, 'By providing only answers.', 0),
(1006, 257, 'By applying concepts to diverse problems and providing detailed solutions.', 1),
(1007, 257, 'By making the problems very difficult.', 0),
(1008, 257, 'By only showing the final result.', 0),
(1009, 258, 'To differentiate products of functions.', 0),
(1010, 258, 'To integrate products of functions.', 1),
(1011, 258, 'To integrate sums of functions.', 0),
(1012, 258, 'To find the derivative of a product.', 0),
(1013, 259, 'integral(u dv) = uv + integral(v du)', 0),
(1014, 259, 'integral(u dv) = uv - integral(v du)', 1),
(1015, 259, 'integral(u dv) = u\'v - uv\'', 0),
(1016, 259, 'integral(u dv) = u + v', 0),
(1017, 260, 'e^x + C', 0),
(1018, 260, 'x*e^x - e^x + C', 1),
(1019, 260, 'x*e^x + C', 0),
(1020, 260, 'e^x - x*e^x + C', 0),
(1021, 261, 'A quantity that can be seen.', 0),
(1022, 261, 'A property of a phenomenon, body, or substance that can be quantified by measurement.', 1),
(1023, 261, 'A quantity that has no units.', 0),
(1024, 261, 'A quantity that is always constant.', 0),
(1025, 262, 'To calculate the mass of an object.', 0),
(1026, 262, 'To check the consistency of equations and derive relationships between physical quantities.', 1),
(1027, 262, 'To measure temperature.', 0),
(1028, 262, 'To determine the speed of light.', 0),
(1029, 263, 'Accuracy means reproducibility, precision means closeness to true value.', 0),
(1030, 263, 'Accuracy refers to how close a measurement is to the true value, while precision refers to the reproducibility of measurements.', 1),
(1031, 263, 'There is no difference.', 0),
(1032, 263, 'Accuracy and precision are the same thing.', 0),
(1033, 264, 'A quantity that has only direction.', 0),
(1034, 264, 'A quantity that has only magnitude.', 1),
(1035, 264, 'A quantity that has both magnitude and direction.', 0),
(1036, 264, 'A quantity that changes over time.', 0),
(1037, 265, 'A quantity that has only magnitude.', 0),
(1038, 265, 'A quantity that has both magnitude and direction.', 1),
(1039, 265, 'A quantity that has no units.', 0),
(1040, 265, 'A quantity that is always constant.', 0),
(1041, 266, '1', 0),
(1042, 266, '0', 1),
(1043, 266, 'The product of their magnitudes.', 0),
(1044, 266, 'Undefined', 0),
(1045, 267, 'The total distance traveled.', 0),
(1046, 267, 'The shortest distance from the initial to the final position of an object.', 1),
(1047, 267, 'The speed of an object.', 0),
(1048, 267, 'The acceleration of an object.', 0),
(1049, 268, '0 m/s^2', 0),
(1050, 268, 'Approximately 9.8 m/s^2', 1),
(1051, 268, '1 m/s^2', 0),
(1052, 268, '100 m/s^2', 0),
(1053, 269, 'The velocity of an object in a vacuum.', 0),
(1054, 269, 'The velocity of an object with respect to another object or frame of reference.', 1),
(1055, 269, 'The absolute velocity of an object.', 0),
(1056, 269, 'The average velocity of an object.', 0);

-- --------------------------------------------------------

--
