Posts

Showing posts from January, 2024

Install android studio in ubuntu

Install android studio in ubuntu guide you through the process of installing Android Studio on Ubuntu. Please follow these steps: Download Android Studio: Visit the https://developer.android.com/studio . Click on the "Download Android Studio" button. Extract the downloaded file: Open a terminal and navigate to the directory where you downloaded Android Studio. Extract the archive using the following command: bash tar -xvzf android-studio-*.tar.gz Move Android Studio to a suitable location: Move the extracted folder to a location where you want to install Android Studio. For example: bash sudo mv android-studio /opt Set up environment variables: Open your ~/.bashrc or ~/.zshrc file using a text editor (e.g., nano , vim , or gedit ). Add the following lines at the end of the file: bash export ANDROID_HOME= $HOME /Android/Sdk export PATH= $PATH : $ANDROID_HOME /emulator export PATH= $PATH : $ANDROID_HOME /tools export PATH= $PATH : $ANDROID_HOME /tools/bin export PATH= $...

How to Hide .class file in displaying in Vscode EXPLORER page

  How to prevent .class files from appearing in the Project Explorer in VS Code Method 1: Workspace Settings: Open Workspace Settings: Press F1 or Ctrl+Shift+P (Cmd+Shift+P on macOS) and select "Preferences: Open Workspace Settings" . Add Exclusion Pattern: Locate the "Files: Exclude" setting. Add the following pattern: **/*.class Save the settings. Method 2: User Settings (Optional): Open User Settings: Press F1 or Ctrl+Shift+P (Cmd+Shift+P on macOS) and select "Preferences: Open Settings (JSON)" . Add Exclusion Pattern: Add the same pattern to the "files.exclude" array: JSON { "files.exclude" : { "**/*.class" : true }   }  Save the settings.

Create ReactJS Vite and Django project

Image
Create ReactJS Vite and Django project YouTube Video https://youtu.be/eXrwF4LXF5c Create ReactJS Vite project frontend - name of the project npm create vite@latest cd frontend npm install npm run dev Create and Activate Virtual Environment virtualenv env cd env source bin/activate pip install django djangorestframework django-cors-headers serializer cd .. Create Django project backend - name of the project django -admin startproject backend cd backend/ Run the Development Server python3 manage .py migrate python3 manage .py runserver python3 manage .py createsuperuser Create a App called post python3 manage .py startapp post Update Backend Settings In backend/backend/settings.py : INSTALLED_APPS = [ # ..., 'rest_framework' , 'corsheaders' , 'post' , # ..., ] CORS_ALLOWED_ORIGINS = [ 'http://localhost:5173' , # Adjust as per your frontend URL ] MIDDLEWARE = [ #... 'corsheaders...

Java Program to Round of the Float value and return it in Integer in Java

Image
Java Program to Round of the Float value and return it in Integer in Java    Code: import java . util .* ; public class RoundOfTheValue { public static void main ( String [] args ) { Scanner sc = new Scanner ( System . in ); float data = sc . nextFloat (); System . out . println ( Math . round ( data )); } }  Sample Input/Output:  

Eliminate the decimal part of a number in Java

Image
 Eliminate the decimal part of a number in Java   Java Program to eliminate the point value: import java . util .* ; class RemovePointValue { public static void main ( String [] args ) { Scanner sc = new Scanner ( System . in ); float data = sc . nextFloat (); System . out . println (( int ) data ); } }  Sample Input/Output: