Posts

How to Check for NVIDIA GPU and Set It Up in Ubuntu

Image
If you want to run deep learning models or GPU-accelerated tasks on Ubuntu, having an NVIDIA GPU and the correct drivers is essential. This guide will help you check if a GPU is available and set it up properly for PyTorch. 1 Check if your system has an NVIDIA GPU Open a terminal and run: lspci | grep -i nvidia ✅ If output appears , your system has an NVIDIA GPU. 0000:01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce MX350] (rev a1) ❌ If no output , your system either doesn't have a GPU or it's disabled in BIOS. 💡 Tip: Take note of your GPU model. You'll need it to choose the correct driver. 2 Check if NVIDIA drivers are installed Run: nvidia-smi ✅ If working , you will see a table with GPU info, driver version, and CUDA version: +-----------------------------------------------------------------------------+ | N...

Linux Commands

Linux Commands Cheat Sheet Linux Commands Cheat Sheet Essential commands for developers and system administrators This comprehensive cheat sheet covers the most commonly used Linux commands for file management, system administration, networking, and more. 📁 File & Directory Commands Navigation pwd Show current directory ls List files ls -l List with details ls -a Include hid...

use TLS in laravel

refer these https://laravel.com/docs/12.x/valet#securing-sites https://cpriego.github.io/valet-linux/requirements

Understanding Mobile Application Framework Components

Understanding Mobile Application Framework Components When developing mobile applications, frameworks provide essential components that simplify app development and ensure smooth performance. Some of the key components include: Communication Manager Synchronization Manager Background Sync Scheduler Data Optimization Security Manager Application Installer Remote Data Access Local Database Manager These are mostly system-level or framework-provided features. Let’s break down how different mobile frameworks provide these components or their equivalents. 1. Android (Native Java/Kotlin) Language: Java or Kotlin Component Android Equivalent Communication Manager HttpURLConnection, Retrofit, Volley Synchronization Manager SyncAdapter, WorkManager Background Sync Scheduler WorkManager, JobScheduler Data Optimization Caching (Room, SharedPreferences), GZIP, efficient queries ...

Phases of sql query

  FROM & JOIN Phase The DBMS starts by looking at the FROM users u table. It then performs a LEFT JOIN with borrows b : For each row in users , it tries to find matching rows in borrows where u.id = b.user_id . If a user has no borrows, that user still appears, but with NULL in b.* . 👉 At this stage, we have a wide table with u.id, u.name, b.id, b.issued_date, b.status . WHERE Filtering  If you had a WHERE clause, it would be applied here, filtering individual rows before grouping. Since we’re not using WHERE , all rows pass through. GROUP BY Phase Rows are grouped by u.id, u.name . Each group corresponds to one user . Example: If user #5 has 3 borrow rows, those rows are grouped into a single "bucket." Aggregate Functions (COUNT) For each group (each user), COUNT(b.id) is calculated. Important: COUNT(b.id) counts only non-NULL values . If a user has no borrows, b.id is NULL → count becomes 0 . ...

Running a Maven Web Application in IntelliJ with Tomcat

Image
Running a Maven Web Application in IntelliJ with Tomcat Running a Maven Web Application in IntelliJ with Tomcat Step 1: Configure Tomcat in IntelliJ Go to File → Settings → Build, Execution, Deployment → Application Servers . Click + → Select Tomcat Server (Local) . Point IntelliJ to your Tomcat installation folder. Step 2: Create a Run/Debug Configuration Go to Run → Edit Configurations . Click + → Select Tomcat Server → Local . Under Deployment , click + → select Artifact . Choose your WAR file ( dbsample:war exploded ) → OK. Name the configuration (e.g., Tomcat-dbsample ). Step 3: Run the Application Click the green Run ▶️ (or Debug 🐞) button. IntelliJ will start Tomcat and deploy your dbsample app automatically. Open your browser and go to: http://localhost:8080/dbsample ✅ That’s it! You now have your Maven Webap...

How to Remove a File or Folder from Git Without Losing It Locally

How to Remove a File or Folder from Git Without Losing It Locally How to Remove a File or Folder from Git Without Losing It Locally Safely untrack sensitive or noisy files (like .env ) from your repository while keeping them on your machine. When working on projects, you often have files that shouldn’t be tracked by Git , such as .env files containing sensitive credentials or configuration data. Committing these files can expose secrets and clutter your repository. But what if they are already tracked? You can safely remove them from Git while keeping them on your local machine . Here’s how. Remove the file from Git index Use the --cached option to untrack the file: Copy git rm --cached .env --cached tells Git to remove the file from version co...