<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Afzal Imam</title>
    <description>The latest articles on DEV Community by Afzal Imam (@afzalimam09).</description>
    <link>https://dev.to/afzalimam09</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F673093%2F9b9811f9-4829-475d-8f0f-31839d3296cb.jpeg</url>
      <title>DEV Community: Afzal Imam</title>
      <link>https://dev.to/afzalimam09</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/afzalimam09"/>
    <language>en</language>
    <item>
      <title>Real Time Comment System Using Node.js, Express.js, Socket.io and MongoDB</title>
      <dc:creator>Afzal Imam</dc:creator>
      <pubDate>Tue, 26 Jul 2022 11:29:38 +0000</pubDate>
      <link>https://dev.to/afzalimam09/real-time-comment-system-using-nodejs-expressjs-socketio-and-mongodb-1hl3</link>
      <guid>https://dev.to/afzalimam09/real-time-comment-system-using-nodejs-expressjs-socketio-and-mongodb-1hl3</guid>
      <description>&lt;p&gt;Hey friends, today I am going to show you, how to create a Real time comment system using Node.js, Express.js, Socket.io and MongoDB. This is really a awesome project to learn basics of Websocket and socket.io. If you want to know more about this project, please read this complete article. In this post I'll also share the code that I have written to develop this project.&lt;/p&gt;

&lt;p&gt;In this real time comment system, if you write a comment on a post then instantly that comment will appear to the other connected users that are on that post without refreshing the page. I have also used MongoDB to store the comments of users with their name.&lt;/p&gt;

&lt;p&gt;Note: If you are interested in reading poetry, you can &lt;a href="https://pdfbooks.myeduwaves.com/2022/07/leaves-of-grass-by-walt-whitman-pdf.html" rel="noopener noreferrer"&gt;Download Leaves of Grass by Walt Whitman PDF&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fapflcgaag0r2c2t9xip8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fapflcgaag0r2c2t9xip8.png" alt="Image description" width="800" height="403"&gt;&lt;/a&gt;&lt;br&gt;
When you visit the live demo of this website which is &lt;a href="https://comment-now.herokuapp.com/" rel="noopener noreferrer"&gt;Real time comment system&lt;/a&gt;, first of all you have to enter your username in prompt then only you can comment on the blog page. Of course you can do user authentication or login facility by your own which I have not implemented in this project.&lt;/p&gt;

&lt;p&gt;I have used Node.js, Express.js for backend and Socket.io package for real time communication and MongoDB to store the data into databases. To create frontend I have used HTML and some basic CSS and JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real time comment system using Express and Socket.io [Source Codes]
&lt;/h2&gt;

&lt;p&gt;To create this project in your system you need to download Node.js and MongoDB. If its all ready in your system then you don't have to download any thing. Otherwise make sure you first of all download Node.js and MongoDB. Which you can download from their website.&lt;/p&gt;

&lt;p&gt;After that just visit this &lt;a href="https://github.com/codersgyan/realtime-comment-system" rel="noopener noreferrer"&gt;Github repo&lt;/a&gt; and clone or download the zip file.&lt;/p&gt;

&lt;p&gt;Open the downloaded file in VS code or your favorite code editor. Open terminal and run command &lt;code&gt;npm i&lt;/code&gt; to download all the packages. After that just run the command &lt;code&gt;npm run dev&lt;/code&gt; to run the project. That's all, your project will be live on localhost 3000.&lt;/p&gt;

&lt;p&gt;So that's all this friend.&lt;br&gt;
Thank You.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>websocket</category>
      <category>mongodb</category>
    </item>
    <item>
      <title>Add Tags Input Box in HTML CSS &amp; JavaScript</title>
      <dc:creator>Afzal Imam</dc:creator>
      <pubDate>Thu, 30 Sep 2021 16:28:56 +0000</pubDate>
      <link>https://dev.to/afzalimam09/add-tags-input-box-in-html-css-javascript-3i12</link>
      <guid>https://dev.to/afzalimam09/add-tags-input-box-in-html-css-javascript-3i12</guid>
      <description>&lt;p&gt;A tags input is a user interface (UI) component that allows the user to add or insert multiple entries as tags into an input field. In this project (Tags Input in JavaScript), as you can see on the webpage, there is an input box with some tags, button, and tags counter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are a Java Programmer and want to solve HackerRank Java Problems and if you face any difficulty then check &lt;a href="https://codesolution.myeduwaves.com/2021/09/hackerrank-java-solutions.html" rel="noopener noreferrer"&gt;HackerRank Java Solutions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can remove each tag by clicking on a close icon or remove all tags at once by clicking on the Remove All button. You can insert a maximum of 10 tags only and duplicate tags won’t be added in the input field.&lt;/p&gt;

&lt;h1&gt;
  
  
  Tags Input Box in JavaScript [Source Codes]
&lt;/h1&gt;

&lt;p&gt;To create Tags Input in HTML CSS &amp;amp; JavaScript. First, you need to create three Files: HTML, CSS &amp;amp; JavaScript files. After creating these files just paste the following codes into your file.&lt;/p&gt;

&lt;p&gt;First, create an HTML file with the name of index.html and paste the given codes into your HTML file. Remember, you’ve to create a file with .html extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;!-- Coding By CodingNepal - youtube.com/codingnepal --&amp;gt;
&amp;lt;html lang="en" dir="ltr"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8"&amp;gt;
    &amp;lt;title&amp;gt;Add Tags Input Box | CodingNepal&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;!-- Unicons CDN Link for Icons --&amp;gt;
    &amp;lt;link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.0/css/thinline.css"&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div class="wrapper"&amp;gt;
      &amp;lt;div class="title"&amp;gt;
        &amp;lt;img src="tag.svg" alt="icon"&amp;gt;
        &amp;lt;h2&amp;gt;Tags&amp;lt;/h2&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="content"&amp;gt;
        &amp;lt;p&amp;gt;Press enter or add a comma after each tag&amp;lt;/p&amp;gt;
        &amp;lt;ul&amp;gt;&amp;lt;input type="text" spellcheck="false"&amp;gt;&amp;lt;/ul&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="details"&amp;gt;
        &amp;lt;p&amp;gt;&amp;lt;span&amp;gt;10&amp;lt;/span&amp;gt; tags are remaining&amp;lt;/p&amp;gt;
        &amp;lt;button&amp;gt;Remove All&amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second, create a CSS file with the name of style.css and paste the given codes in your CSS file. Remember, you’ve to create a file with .css extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&amp;amp;display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #5372F0;
}
::selection{
  color: #fff;
  background: #5372F0;
}
.wrapper{
  width: 496px;
  background: #fff;
  border-radius: 10px;
  padding: 18px 25px 20px;
  box-shadow: 0 0 30px rgba(0,0,0,0.06);
}
.wrapper :where(.title, li, li i, .details){
  display: flex;
  align-items: center;
}
.title img{
  max-width: 21px;
}
.title h2{
  font-size: 21px;
  font-weight: 600;
  margin-left: 8px;
}
.wrapper .content{
  margin: 10px 0;
}
.content p{
  font-size: 15px;
}
.content ul{
  display: flex;
  flex-wrap: wrap;
  padding: 7px;
  margin: 12px 0;
  border-radius: 5px;
  border: 1px solid #a6a6a6;
}
.content ul  li{
  color: #333;
  margin: 4px 3px;
  list-style: none;
  border-radius: 5px;
  background: #F2F2F2;
  padding: 5px 8px 5px 10px;
  border: 1px solid #e3e1e1;
}
.content ul li i{
  height: 20px;
  width: 20px;
  color: #808080;
  margin-left: 8px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 50%;
  background: #dfdfdf;
  justify-content: center;
}
.content ul input{
  flex: 1;
  padding: 5px;
  border: none;
  outline: none;
  font-size: 16px;
}
.wrapper .details{
  justify-content: space-between;
}
.details button{
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  padding: 9px 15px;
  border-radius: 5px;
  background: #5372F0;
  transition: background 0.3s ease;
}
.details button:hover{
  background: #2c52ed;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Last, create a JavaScript file with the name of script.js and paste the given codes in your JavaScript file. Remember, you’ve to create a file with .js extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const ul = document.querySelector("ul"),
input = document.querySelector("input"),
tagNumb = document.querySelector(".details span");

let maxTags = 10,
tags = ["coding", "nepal"];

countTags();
createTag();

function countTags(){
    input.focus();
    tagNumb.innerText = maxTags - tags.length;
}

function createTag(){
    ul.querySelectorAll("li").forEach(li =&amp;gt; li.remove());
    tags.slice().reverse().forEach(tag =&amp;gt;{
        let liTag = `&amp;lt;li&amp;gt;${tag} &amp;lt;i class="uit uit-multiply" onclick="remove(this, '${tag}')"&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/li&amp;gt;`;
        ul.insertAdjacentHTML("afterbegin", liTag);
    });
    countTags();
}

function remove(element, tag){
    let index  = tags.indexOf(tag);
    tags = [...tags.slice(0, index), ...tags.slice(index + 1)];
    element.parentElement.remove();
    countTags();
}

function addTag(e){
    if(e.key == "Enter"){
        let tag = e.target.value.replace(/\s+/g, ' ');
        if(tag.length &amp;gt; 1 &amp;amp;&amp;amp; !tags.includes(tag)){
            if(tags.length &amp;lt; 10){
                tag.split(',').forEach(tag =&amp;gt; {
                    tags.push(tag);
                    createTag();
                });
            }
        }
        e.target.value = "";
    }
}

input.addEventListener("keyup", addTag);

const removeBtn = document.querySelector(".details button");
removeBtn.addEventListener("click", () =&amp;gt;{
    tags.length = 0;
    ul.querySelectorAll("li").forEach(li =&amp;gt; li.remove());
    countTags();
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s all, now you’ve successfully created an Add Tags Input Box in HTML CSS &amp;amp; JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This post is taken from codingnepal youtube channel.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>File Upload with Progress Bar HTML CSS &amp; JavaScript</title>
      <dc:creator>Afzal Imam</dc:creator>
      <pubDate>Thu, 05 Aug 2021 11:16:51 +0000</pubDate>
      <link>https://dev.to/afzalimam09/file-upload-with-progress-bar-html-css-javascript-7em</link>
      <guid>https://dev.to/afzalimam09/file-upload-with-progress-bar-html-css-javascript-7em</guid>
      <description>&lt;p&gt;Hey friends, today in this blog you’ll how to Upload File with Progress in HTML CSS &amp;amp; JavaScript.&lt;/p&gt;

&lt;p&gt;In this project (File Upload JavaScript with Progress Bar), as you can see in the preview image, there are two pictures of the file uploader. In the first one, there is a dashed border container with an icon and text to browse the file to upload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recommended Book&lt;/strong&gt;: &lt;a href="https://pdfbooks.myeduwaves.com/2020/07/rich-dad-poor-dad-pdf-free-download.html" rel="noopener noreferrer"&gt;Rich Dad Poor Dad Pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you click on this container an open file window will open and you can select any file to upload. Once you select the file then you can see in the second picture, there is shown your file uploading status with filename, uploaded percent, progress bar, etc. and there is the history of the uploaded files with filename, size, etc.&lt;/p&gt;

&lt;p&gt;I hope you want to get source codes or files of this project but don’t worry I have given all to source codes to the bottom of the page. But before copy-paste the codes, let’s talk about the important codes and concepts behind creating this file uploader.&lt;/p&gt;

&lt;p&gt;In the JavaScript file, I used the change event to get the user selected filename and then called the &lt;code&gt;uploadFile(filename)&lt;/code&gt; function with passing the filename as an argument. Inside &lt;code&gt;uploadFile()&lt;/code&gt; function, using Ajax I sent the selected file to the PHP. As you can have seen on the codes, I used upload property and progress event to get file loaded value and file total size.&lt;/p&gt;

&lt;p&gt;In the PHP file, I received the file and added the current time before the filename to make the filename dynamic and moved this file to the files folder using PHP inbuilt function &lt;code&gt;move_uploaded_file&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  File Upload JavaScript with Progress Bar [Source Codes]
&lt;/h2&gt;

&lt;p&gt;To create this project (File Upload JavaScript). First, you need to create four Files: &lt;strong&gt;HTML, CSS, JavaScript &amp;amp; PHP files&lt;/strong&gt;. After creating these files just paste the following codes into your file. Remember, you’ve to create a folder with php name and inside this folder, you’ve to create php file a name of &lt;code&gt;upload.php&lt;/code&gt; and a files folder to saved all uploaded files.&lt;/p&gt;

&lt;p&gt;First, create an HTML file with the name of &lt;code&gt;index.html&lt;/code&gt; and paste the given codes into your HTML file. Remember, you’ve to create a file with &lt;code&gt;.html&lt;/code&gt; extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;File Upload JavaScript with Progress Ba&amp;lt;/title&amp;gt;
  &amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;div class="wrapper"&amp;gt;
    &amp;lt;header&amp;gt;File Uploader JavaScript&amp;lt;/header&amp;gt;
    &amp;lt;form action="#"&amp;gt;
      &amp;lt;input class="file-input" type="file" name="file" hidden&amp;gt;
      &amp;lt;i class="fas fa-cloud-upload-alt"&amp;gt;&amp;lt;/i&amp;gt;
      &amp;lt;p&amp;gt;Browse File to Upload&amp;lt;/p&amp;gt;
    &amp;lt;/form&amp;gt;
    &amp;lt;section class="progress-area"&amp;gt;&amp;lt;/section&amp;gt;
    &amp;lt;section class="uploaded-area"&amp;gt;&amp;lt;/section&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second, create a CSS file with the name of &lt;code&gt;style.css&lt;/code&gt; and paste the given codes in your CSS file. Remember, you’ve to create a file with &lt;code&gt;.css&lt;/code&gt; extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&amp;amp;display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #6990F2;
}

::selection{
  color: #fff;
  background: #6990F2;
}
.wrapper{
  width: 430px;
  background: #fff;
  border-radius: 5px;
  padding: 30px;
  box-shadow: 7px 7px 12px rgba(0,0,0,0.05);
}
.wrapper header{
  color: #6990F2;
  font-size: 27px;
  font-weight: 600;
  text-align: center;
}
.wrapper form{
  height: 167px;
  display: flex;
  cursor: pointer;
  margin: 30px 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 5px;
  border: 2px dashed #6990F2;
}
form :where(i, p){
  color: #6990F2;
}
form i{
  font-size: 50px;
}
form p{
  margin-top: 15px;
  font-size: 16px;
}

section .row{
  margin-bottom: 10px;
  background: #E9F0FF;
  list-style: none;
  padding: 15px 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
section .row i{
  color: #6990F2;
  font-size: 30px;
}
section .details span{
  font-size: 14px;
}
.progress-area .row .content{
  width: 100%;
  margin-left: 15px;
}
.progress-area .details{
  display: flex;
  align-items: center;
  margin-bottom: 7px;
  justify-content: space-between;
}
.progress-area .content .progress-bar{
  height: 6px;
  width: 100%;
  margin-bottom: 4px;
  background: #fff;
  border-radius: 30px;
}
.content .progress-bar .progress{
  height: 100%;
  width: 0%;
  background: #6990F2;
  border-radius: inherit;
}
.uploaded-area{
  max-height: 232px;
  overflow-y: scroll;
}
.uploaded-area.onprogress{
  max-height: 150px;
}
.uploaded-area::-webkit-scrollbar{
  width: 0px;
}
.uploaded-area .row .content{
  display: flex;
  align-items: center;
}
.uploaded-area .row .details{
  display: flex;
  margin-left: 15px;
  flex-direction: column;
}
.uploaded-area .row .details .size{
  color: #404040;
  font-size: 11px;
}
.uploaded-area i.fa-check{
  font-size: 16px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Third, create a JavaScript file with the name of &lt;code&gt;script.js&lt;/code&gt; and paste the given codes into your JavaScript file. Remember, you’ve to create a file with &lt;code&gt;.js&lt;/code&gt; extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const form = document.querySelector("form"),
fileInput = document.querySelector(".file-input"),
progressArea = document.querySelector(".progress-area"),
uploadedArea = document.querySelector(".uploaded-area");

form.addEventListener("click", () =&amp;gt;{
  fileInput.click();
});

fileInput.onchange = ({target})=&amp;gt;{
  let file = target.files[0];
  if(file){
    let fileName = file.name;
    if(fileName.length &amp;gt;= 12){
      let splitName = fileName.split('.');
      fileName = splitName[0].substring(0, 13) + "... ." + splitName[1];
    }
    uploadFile(fileName);
  }
}

function uploadFile(name){
  let xhr = new XMLHttpRequest();
  xhr.open("POST", "php/upload.php");
  xhr.upload.addEventListener("progress", ({loaded, total}) =&amp;gt;{
    let fileLoaded = Math.floor((loaded / total) * 100);
    let fileTotal = Math.floor(total / 1000);
    let fileSize;
    (fileTotal &amp;lt; 1024) ? fileSize = fileTotal + " KB" : fileSize = (loaded / (1024*1024)).toFixed(2) + " MB";
    let progressHTML = `&amp;lt;li class="row"&amp;gt;
                          &amp;lt;i class="fas fa-file-alt"&amp;gt;&amp;lt;/i&amp;gt;
                          &amp;lt;div class="content"&amp;gt;
                            &amp;lt;div class="details"&amp;gt;
                              &amp;lt;span class="name"&amp;gt;${name} • Uploading&amp;lt;/span&amp;gt;
                              &amp;lt;span class="percent"&amp;gt;${fileLoaded}%&amp;lt;/span&amp;gt;
                            &amp;lt;/div&amp;gt;
                            &amp;lt;div class="progress-bar"&amp;gt;
                              &amp;lt;div class="progress" style="width: ${fileLoaded}%"&amp;gt;&amp;lt;/div&amp;gt;
                            &amp;lt;/div&amp;gt;
                          &amp;lt;/div&amp;gt;
                        &amp;lt;/li&amp;gt;`;
    uploadedArea.classList.add("onprogress");
    progressArea.innerHTML = progressHTML;
    if(loaded == total){
      progressArea.innerHTML = "";
      let uploadedHTML = `&amp;lt;li class="row"&amp;gt;
                            &amp;lt;div class="content upload"&amp;gt;
                              &amp;lt;i class="fas fa-file-alt"&amp;gt;&amp;lt;/i&amp;gt;
                              &amp;lt;div class="details"&amp;gt;
                                &amp;lt;span class="name"&amp;gt;${name} • Uploaded&amp;lt;/span&amp;gt;
                                &amp;lt;span class="size"&amp;gt;${fileSize}&amp;lt;/span&amp;gt;
                              &amp;lt;/div&amp;gt;
                            &amp;lt;/div&amp;gt;
                            &amp;lt;i class="fas fa-check"&amp;gt;&amp;lt;/i&amp;gt;
                          &amp;lt;/li&amp;gt;`;
      uploadedArea.classList.remove("onprogress");
      uploadedArea.insertAdjacentHTML("afterbegin", uploadedHTML);
    }
  });
  let data = new FormData(form);
  xhr.send(data);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Last, create a PHP file with the name of &lt;code&gt;message.php&lt;/code&gt; and paste the given codes into your PHP file. Remember, you’ve to create a file with &lt;code&gt;.php&lt;/code&gt; extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
  $file_name =  $_FILES['file']['name'];
  $tmp_name = $_FILES['file']['tmp_name'];
  $file_up_name = time().$file_name;
  move_uploaded_file($tmp_name, "files/".$file_up_name);
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So this is all for today. I hope you like this. you can check more useful post at &lt;a href="https://codewithimam.blogspot.com/2021/04/singly-linked-list-menu-driven-program-in-c.html" rel="noopener noreferrer"&gt;Code With Imam&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All the Best!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Create Custom Captcha in HTML CSS &amp; JavaScript</title>
      <dc:creator>Afzal Imam</dc:creator>
      <pubDate>Wed, 04 Aug 2021 03:03:58 +0000</pubDate>
      <link>https://dev.to/afzalimam09/create-custom-captcha-in-html-css-javascript-1mim</link>
      <guid>https://dev.to/afzalimam09/create-custom-captcha-in-html-css-javascript-1mim</guid>
      <description>&lt;p&gt;Hey friends, today in this blog, you’ll learn how to create Custom Captcha in HTML CSS &amp;amp; JavaScript. In the earlier blog, I have shared how to Detect User Browser using JavaScript, and it’s time to create a simple captcha program.&lt;/p&gt;

&lt;p&gt;Mostly, Captcha is used on the comment or contact form of the websites to restrict robots (bot) from commenting on a blog post or sending a message to the admin. There can be random images or codes in the captcha, and the users must have to select correct images or match the codes to complete their task.&lt;/p&gt;

&lt;p&gt;In this small project [Custom Captcha in JavaScript], there is an image with the random 6 characters and numbers. You can also refresh the captcha code and get a new one using the reload button.&lt;/p&gt;

&lt;p&gt;In the input field, you have to enter the captcha codes that are shown on the image. If your codes matched with the captcha codes, then there is appears a success message else there appears an error message. If you’ve matched the codes, then after 4 seconds there will be generated a new one captcha code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recommended Book:&lt;/strong&gt; &lt;a href="https://pdfbooks.myeduwaves.com/2020/07/rich-dad-poor-dad-pdf-free-download.html" rel="noopener noreferrer"&gt;Rich Dad Poor Dad Pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you liked this simple captcha program and want to get source codes but don’t worry I have given codes and source code files at the bottom of this page from where you can copy-paste codes the source code files.&lt;/p&gt;

&lt;p&gt;But before copying codes, let’s understand the basic codes and concepts of this program. At first, in the JavaScript file, I have stored all characters and numbers in the array, then inside for loop, using Math.random() function I got 6 random characters from the given array.&lt;/p&gt;

&lt;p&gt;And passed these codes or characters in the captcha by adding space between each character. After this, I got user-entered values, split them, and joined them with space (‘ ‘) so users don’t need to enter spaces to match the codes.&lt;/p&gt;

&lt;p&gt;Once I joined the user values then I matched this user value with the captcha codes. If the value is not matched I’ve shown an error message, and if the value is matched I’ve shown a success message and generate the new random codes after 4 seconds using the setTimeout() function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create Custom Captcha in JavaScript [Source Codes]
&lt;/h2&gt;

&lt;p&gt;To create this program &lt;strong&gt;[Custom Captcha in JavaScript]&lt;/strong&gt;. First, you need to create three Files: &lt;strong&gt;HTML, CSS &amp;amp; JavaScript File&lt;/strong&gt;. After creating these files just paste the following codes into your file.&lt;/p&gt;

&lt;p&gt;First, create an HTML file with the name of &lt;strong&gt;index.html&lt;/strong&gt; and paste the given codes into your HTML file. You’ve to create a file with .html extension and remember the image that is used on this program will not appear.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;!-- Coding By CodingNepal - youtube.com/codingnepal --&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;Custom Captcha in JavaScript | CodingNepal&amp;lt;/title&amp;gt;
  &amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
  &amp;lt;!-- Font Awesome CDN Link for Icons --&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;div class="wrapper"&amp;gt;
    &amp;lt;header&amp;gt;Captcha in JavaScript&amp;lt;/header&amp;gt;
    &amp;lt;div class="captcha-area"&amp;gt;
      &amp;lt;div class="captcha-img"&amp;gt;
        &amp;lt;img src="captcha-bg.png" alt="Captch Background"&amp;gt;
        &amp;lt;span class="captcha"&amp;gt;&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;button class="reload-btn"&amp;gt;&amp;lt;i class="fas fa-redo-alt"&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;form action="#" class="input-area"&amp;gt;
      &amp;lt;input type="text" placeholder="Enter captcha" maxlength="6" spellcheck="false" required&amp;gt;
      &amp;lt;button class="check-btn"&amp;gt;Check&amp;lt;/button&amp;gt;
    &amp;lt;/form&amp;gt;
    &amp;lt;div class="status-text"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Last, create a JavaScript file with the name of script.js and paste the given codes in your JavaScript file. Remember, you’ve to create a file with .js extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const captcha = document.querySelector(".captcha"),
reloadBtn = document.querySelector(".reload-btn"),
inputField = document.querySelector(".input-area input"),
checkBtn = document.querySelector(".check-btn"),
statusTxt = document.querySelector(".status-text");

//storing all captcha characters in array
let allCharacters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
                     'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd',
                     'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
                     't', 'u', 'v', 'w', 'x', 'y', 'z', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
function getCaptcha(){
  for (let i = 0; i &amp;lt; 6; i++) { //getting 6 random characters from the array
    let randomCharacter = allCharacters[Math.floor(Math.random() * allCharacters.length)];
    captcha.innerText += ` ${randomCharacter}`; //passing 6 random characters inside captcha innerText
  }
}
getCaptcha(); //calling getCaptcha when the page open
//calling getCaptcha &amp;amp; removeContent on the reload btn click
reloadBtn.addEventListener("click", ()=&amp;gt;{
  removeContent();
  getCaptcha();
});

checkBtn.addEventListener("click", e =&amp;gt;{
  e.preventDefault(); //preventing button from it's default behaviour
  statusTxt.style.display = "block";
  //adding space after each character of user entered values because I've added spaces while generating captcha
  let inputVal = inputField.value.split('').join(' ');
  if(inputVal == captcha.innerText){ //if captcha matched
    statusTxt.style.color = "#4db2ec";
    statusTxt.innerText = "Nice! You don't appear to be a robot.";
    setTimeout(()=&amp;gt;{ //calling removeContent &amp;amp; getCaptcha after 2 seconds
      removeContent();
      getCaptcha();
    }, 2000);
  }else{
    statusTxt.style.color = "#ff0000";
    statusTxt.innerText = "Captcha not matched. Please try again!";
  }
});

function removeContent(){
 inputField.value = "";
 captcha.innerText = "";
 statusTxt.style.display = "none";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s all, now you’ve successfully created a Custom Captcha in &lt;strong&gt;HTML CSS &amp;amp; JavaScript&lt;/strong&gt;. So this is all for today. &lt;br&gt;
Thanks!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Also Read&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://dev.to/afzalimamias/6-key-lesson-s-to-learn-from-rich-dad-poor-dad-for-programmers-4knp"&gt;6 Key Lesson’s to Learn From Rich Dad Poor Dad for Programmers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For more details please visit &lt;a href="https://codewithimam.blogspot.com/" rel="noopener noreferrer"&gt;Code With Imam&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>captcha</category>
    </item>
    <item>
      <title>Draggable Div Element in HTML CSS &amp; JavaScript</title>
      <dc:creator>Afzal Imam</dc:creator>
      <pubDate>Wed, 04 Aug 2021 02:49:14 +0000</pubDate>
      <link>https://dev.to/afzalimam09/draggable-div-element-in-html-css-javascript-2nd6</link>
      <guid>https://dev.to/afzalimam09/draggable-div-element-in-html-css-javascript-2nd6</guid>
      <description>&lt;p&gt;Hey friends, today in this blog, you’ll learn how to create a Draggable Div Element in HTML CSS &amp;amp; JavaScript. In the earlier blog, I have shared how to create a Custom Captcha in JavaScript, and now it’s time to create an easy draggable div using pure JavaScript.&lt;/p&gt;

&lt;p&gt;The draggable div element means you can move the particular element anywhere on the document or page by dragging it. In our simple project [Draggable Div Element in JavaScript], as you can see in the preview image, there is a modal box with a header, icon, title, and description.&lt;/p&gt;

&lt;p&gt;You can move this modal box anywhere on the page by dragging it on the header part. When you start dragging this model, the cursor will change into a “move” icon to inform the user that this div is now dragging. You can only move this modal box by dragging it on the header.&lt;/p&gt;

&lt;h2&gt;
  
  
  Draggable Div Element in JavaScript [Source Codes]
&lt;/h2&gt;

&lt;p&gt;To create this small project [Draggable Div Element]. First, you need to create two Files: &lt;strong&gt;HTML &amp;amp; CSS files&lt;/strong&gt;. After creating these files just paste the following codes into your file.&lt;/p&gt;

&lt;p&gt;First, create an HTML file with the name of index.html and paste the given codes into your HTML file. Remember, you’ve to create a file with .html extension.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;!-- Coding By CodingNepal - youtube.com/codingnepal --&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;Draggable Div Element in JavaScipt | CodingNepal&amp;lt;/title&amp;gt;
  &amp;lt;link rel="stylesheet" href="style.css"&amp;gt;
  &amp;lt;!-- Linking BoxIcon for Icon --&amp;gt;
 &amp;lt;link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;div class="wrapper"&amp;gt;
    &amp;lt;header&amp;gt;Draggable Div&amp;lt;/header&amp;gt;
    &amp;lt;div class="content"&amp;gt;
      &amp;lt;div class="icon"&amp;gt;&amp;lt;i class='bx bx-move'&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;div class="title"&amp;gt;Draggable Div&amp;lt;/div&amp;gt;
      &amp;lt;p&amp;gt;This is a draggable div which is created using HTML CSS &amp;amp; JavaScript. You can move this div anywhere on the document or page.&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;script&amp;gt;
    const wrapper = document.querySelector(".wrapper"),
    header = wrapper.querySelector("header");

    function onDrag({movementX, movementY}){
      let getStyle = window.getComputedStyle(wrapper);
      let leftVal = parseInt(getStyle.left);
      let topVal = parseInt(getStyle.top);
      wrapper.style.left = `${leftVal + movementX}px`;
      wrapper.style.top = `${topVal + movementY}px`;
    }

    header.addEventListener("mousedown", ()=&amp;gt;{
      header.classList.add("active");
      header.addEventListener("mousemove", onDrag);
    });

    document.addEventListener("mouseup", ()=&amp;gt;{
      header.classList.remove("active");
      header.removeEventListener("mousemove", onDrag);
    });
  &amp;lt;/script&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second, create a CSS file with the name of style.css and paste the given codes in your CSS file. Remember, you’ve to create a file with .css extension.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&amp;amp;display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body{
  background: #6F36FF;
}
::selection{
  color: #fff;
  background: #6F36FF;
}
.wrapper{
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 450px;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  transform: translate(-50%, -50%);
  box-shadow: 10px 10px 15px rgba(0,0,0,0.06);
}
.wrapper header{
  font-size: 23px;
  font-weight: 500;
  padding: 17px 30px;
  border-bottom: 1px solid #ccc;
}
.wrapper header.active{
  cursor: move;
  user-select: none;
}
.wrapper .content{
  display: flex;
  padding: 30px 30px 40px 30px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}
.content .icon{
  height: 95px;
  width: 95px;
  border-radius: 50%;
  border: 5px solid #6F36FF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.content .icon i{
  color: #6F36FF;
  font-size: 60px;
}
.content .title{
  margin: 15px 0;
  font-size: 29px;
  font-weight: 500;
}
.content p{
  font-size: 16px;
  text-align: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Also Read:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://dev.to/afzalimamias/6-key-lesson-s-to-learn-from-rich-dad-poor-dad-for-programmers-4knp"&gt;6 Key Lesson’s to Learn From Rich Dad Poor Dad for Programmers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So this was all about today post. For more details visit &lt;a href="https://codewithimam.blogspot.com/" rel="noopener noreferrer"&gt;CodeWithImam&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>div</category>
    </item>
    <item>
      <title>6 Key Lesson’s to Learn From Rich Dad Poor Dad for Programmers</title>
      <dc:creator>Afzal Imam</dc:creator>
      <pubDate>Fri, 30 Jul 2021 04:35:49 +0000</pubDate>
      <link>https://dev.to/afzalimam09/6-key-lesson-s-to-learn-from-rich-dad-poor-dad-for-programmers-4knp</link>
      <guid>https://dev.to/afzalimam09/6-key-lesson-s-to-learn-from-rich-dad-poor-dad-for-programmers-4knp</guid>
      <description>&lt;p&gt;For any person in the world to achieve financial freedom, it is most important to have a strong financial education.&lt;/p&gt;

&lt;p&gt;According to experts, the best way to increase financial education is to read books. This is the reason that many books in the world are written on this topic and the most popular book named &lt;a href="https://pdfbooks.myeduwaves.com/2020/07/rich-dad-poor-dad-pdf-free-download.html" rel="noopener noreferrer"&gt; Rich Dad Poor Dad &lt;/a&gt;, written by American author Robert Kiyosaki, is also one of those books. A lot of people read this book to achieve their goals and become successful in life.&lt;/p&gt;

&lt;p&gt;That is why it is considered one of the most famous books in the world in terms of financial education. In today's post, I will tell you 6 important lessons and a summary of this book.&lt;/p&gt;

&lt;p&gt;The story of the book Rich Dad Poor Dad is based on author Robert Kiyosaki's own life. In this book, he writes about his two fathers, one of whom is his real father, whom he has given the title of Poor Dad, and the other is his mouth-bolt father who is actually his friend's father and he is named Rich Dad in the book.&lt;/p&gt;

&lt;p&gt;In fact, his real father is a very educated and hard-working person, a teacher by profession and financially very weak. That's why Robert calls him Poor Dad in the book.&lt;/p&gt;

&lt;p&gt;On the other hand, his mouth-bolt father has studied only till class VIII. But due to strong financial education, he is counted among the biggest and richest businessman of his city. That's why Robert calls him Rich Dad in the book.&lt;/p&gt;

&lt;p&gt;In this entire story, Robert's rich dad gives him six important lessons at different stages of his life for 30 years which are very important to succeed in life, become rich and stay rich forever.&lt;/p&gt;

&lt;p&gt;6 lessons told by Robert's rich dad can make any person rich and successful in the world, no matter how poorly educated is that person. So let us tell you about the same six lessons written by Robert in the book.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson No 1. Rich Don't Work For Money, Money Work For Them
&lt;/h2&gt;

&lt;p&gt;Robert's rich dad explains that most of the people in the world have been trapped in a particular circle for many decades and he calls this circle the Rat Race. In fact, most of the people in the world today only want to study in a good college, find a good job, get married and then keep paying for things like home and car from their salary for the rest of their lives.&lt;/p&gt;

&lt;p&gt;People do not realize that they work hard in this kind of life, but only someone else gets the benefit of their hard work. Many people are also unhappy to be a part of this Rat Race. But still, because of the fear, greed and responsibilities of their mind, they compulsively remain a part of it.&lt;/p&gt;

&lt;p&gt;Rich Dad says that a person should first get out of this Rat Race by eliminating his fear and then do something in which you should not work for money but make money work for you. There is an old saying that money attracts money. In the same way, you also need to do something in your life in which only your money can earn for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson No 2. Keeping Money Is More Important Than Making It
&lt;/h2&gt;

&lt;p&gt;You will get to see many such sportsmen and celebrities in the world who were once very rich. But today they have nothing. In fact, people go from rich to poor in this way because they lack financial education. They do not have the skill to maintain and grow money.&lt;/p&gt;

&lt;p&gt;Giving an example of this financial illiteracy, Rich Dad says that all over the world a house is considered an asset, whereas according to him, a house is not an asset but a liability. Because assets are those that increase your money even more over time, whereas in the case of a house you have to pay its EMI and loan for many years. Due to which money does not come in your pocket but only goes.&lt;/p&gt;

&lt;p&gt;Rich dad considers only those things as assets that make you earn money sitting at home. They say that only earning money is not enough to become rich, but it is most important to learn how to maintain and grow your money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson No 3. Get In Your Business Along With Your Job
&lt;/h2&gt;

&lt;p&gt;When a person gets his favourite job, he makes up his mind to do it for the rest of his life and then without thinking anything, he spends his whole life doing that job.&lt;/p&gt;

&lt;p&gt;Rich dad says that if any person in the world wants, he can do any other work along with his job and can also become the king of a new business empire without leaving his job.&lt;/p&gt;

&lt;p&gt;Now to understand this, we can take the example of Ray Kroc, the founder of the world's largest fast-food chain company McDonald's. If any of us are asked this question, from which business does Ray Kroc earn money? Then the answer of all of us would be that from the fast-food business. But actually, Ray Kroc's main business is not fast food but real estate. Because while expanding the business of McDonald's, he has become the biggest real estate owner in the whole world today. Along with doing fast food business, he has created such an empire of real estate which makes him really rich today.&lt;/p&gt;

&lt;p&gt;In the same way, a common man can also create some such assets and source of income along with doing his job, which will earn money for him. Some examples have also been given by the writer, which includes starting a business, investing in the stock market, investing money in real estate, and buying properties that profit.&lt;/p&gt;

&lt;p&gt;By adopting any one of these methods, you can create a new source of income for yourself. Even Rich Dad advises every person to do this because only then does a person become really rich.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson No 4. Taxes Are For Only Middle Class And Poors
&lt;/h2&gt;

&lt;p&gt;In this lesson Rich Dad explains the history of tax, he says that the tax was actually a system designed to bridge the gap between the rich and the poor i.e. initially only the rich were taxed and that tax money was used for the poor people facilities.&lt;/p&gt;

&lt;p&gt;But gradually the middle and upper-middle class also started paying taxes and if we talk about today, then this matter has been completely reversed. Because today rich people save themselves from paying taxes by using their brains and cunning and the highest tax that is deposited in the account of the government is given by the middle and upper-middle class only.&lt;/p&gt;

&lt;p&gt;Rich businessmen and industrialists first earn money and then spend that money to fulfil all their needs and aspirations and in the end, if anything is left then they pay tax with that money. Whereas the middle and upper-middle-class people earn money as well as pay taxes and then spend whatever is left on them in the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson No 5. The Rich Invent Money
&lt;/h2&gt;

&lt;p&gt;Jeff Bezos, Bill Gates, Mark Zuckerberg, Elon Musk and if we talk about India, then Dhirubhai Ambani, Shiv Nadar and Azim Premji are some of the names who have brought a business or idea inside the world, about which no one had thought of this before. These people have invested money with the same revolutionary idea.&lt;/p&gt;

&lt;p&gt;Before any other person could find any opportunity present in the market, these people found that opportunity and took action on it immediately. That is why it is said that these people did not earn money but invent it. Because it brought things into the world that was not already here. Similarly, you should also think not only about earning money but also about inventing money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson No 6: Rich Learns All The Time And Know How To Sell Their Ideas
&lt;/h2&gt;

&lt;p&gt;Many such people in America make and sell a much better burger than that of McDonald's at the same price. But not every person understands how one of his products or ideas is sold on a large scale. That's why even after making a good pizza burger than McDonald's, he can sell it only in a limited area or in limited quantity. Whereas McDonald's sells its burgers all over the world without any limit. In fact, through this last lesson, the author explains to us that rich people never stop learning new things and new skills. Because of this habit, they always know how their product or their idea can be sold on a large scale in the world.&lt;/p&gt;

&lt;p&gt;So this was all about this post. All the lessons of the book Rich Dad Poor Dad are very useful for a programmer as well as general person.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>books</category>
      <category>leadership</category>
      <category>motivation</category>
    </item>
  </channel>
</rss>
