Posts

Flutter: Simple Flutter Navigation app UI

Image
  Crafting a Simple Flutter App: My Nav App In this blog post, we’ll walk you through creating a basic yet essential Flutter application with a bottom navigation bar. This guide will help you understand the core components of Flutter and how to structure your app for scalability and usability.    Introduction Flutter is a powerful framework for building cross-platform mobile applications. In this tutorial, we’ll create a simple app with a bottom navigation bar featuring four primary sections: Home, Automate, Store, and Profile. We'll provide the complete code along with explanations to help you understand how everything fits together.   Setting Up Your Flutter Project First, ensure you have Flutter installed. If not, follow the [official installation guide](https://flutter.dev/docs/get-started/install). Once installed, create a new Flutter project: flutter create my_nav_app cd my_nav_app The Code Here’s the complete code for our simple Flutter app: import 'package:fl...

VS Code usefull settings

Editor: Trim Auto Whitespace Editor: Hover: Enabled

Uninstall MySQL server and client from Ubuntu

Image
 Uninstall MySQL server and client from Ubuntu   sudo service mysql stop sudo apt-get remove --purge mysql-server mysql-client mysql-common sudo apt-get autoremove sudo apt-get autoclean sudo rm -rf /var/lib/mysql/ sudo rm -rf /etc/mysql/ RE-INSTALL  sudo apt-get install mysql-server mysql-client If in case you got this error in trying to login:  sudo systemctl stop mysql.service sudo mkdir -p /var/run/mysqld sudo chown mysql:mysql /var/run/mysqld sudo mysqld_safe --skip-grant-tables --skip-networking & sudo mysql -u root  CHANGE THE ROOT PASSWORD: FLUSH PRIVILEGES; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; exit; sudo pkill mysqld_safe mysql -u root -p "provide your password and login"            

My Linux Software i use

 My Linux Software i use   Normal use Software: sudo snap install vlc sudo snap install code --classic sudo apt install git    

How to Upload file in React and convert to json and upload to local MongoDB

 How to Upload file in React and convert to json and upload to local MongoDB App.js // App.js import React, { useState } from 'react'; function App() {   const [message, setMessage] = useState('');   const [file, setFile] = useState(null);   const handleFileChange = (event) => {     setFile(event.target.files[0]);   };   const handleUpload = () => {   if (!file) {     console.error('No file selected.');     return;   }   const formData = new FormData();   formData.append('file', file);   formData.append('filename', file.name); // Append filename to FormData   fetch('http://localhost:5000/upload', {     method: 'POST',     body: formData,   })     .then(response => response.text())     .then(data => {       setMessage(data);       setFile(null); // Reset file ...

How to Write a Hello Node App with ReactJS

Image
 How to Write a Hello Node App with ReactJS                             1. Create a ReactJS App. npx create-react-app hello-app cd hello-app npm start 2. Create a Backend NodeJS file structure.     Inside your `hello-react` project create a folder backend/server.js   server.js const express = require('express'); const cors = require('cors'); const app = express(); app.use(cors()); app.get('/hello', (req, res) => {   res.setHeader('Content-Type', 'text/plain');   res.send('Hello, world!\n'); }); const PORT = process.env.PORT || 5000; app.listen(PORT, () => console.log(`Server running on port ${PORT}`));     App.js import React, { useState } from 'react'; function App() {   const [message, setMessage] = useState('');   const handleClick = () => {     var url = 'http://localhost:5000...