Saturday, 3 June 2023




<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>codewith harry</title>
<link href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css"
                    rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ"
crossorigin="anonymous">
<style>
.nav-item{
  padding: 7px;
 }
  .bi{
                margin-right: 26px;
            }
           
        </style>
</head>

<body>
    <nav class="navbar navbar-expand-lg p-4 bg-body-tertiary">
        <div class="container-fluid">
<a class="navbar-brand m-0 text-primary " href="https://youtube.com/@GetCodr">
            getcodr</a>
  <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
  data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
         aria-expanded="false"
      aria-label="Toggle navigation">
       <span class="navbar-toggler-icon"></span>
            </button>
<div class="collapse navbar-collapse  pl-3 " id="navbarSupportedContent">
        <ul class="navbar-nav ms-auto mb-2  mx-4  mb-lg-0">
                    <li class="nav-item">
<a class="nav-link active ml-0" aria-current="page"
                 href="https://youtube.com/@GetCodr"> Home</a>
      </li>
                    <li class="nav-item">
                        <a class="nav-link ml-0" href="#">Courses</a>
                    </li>

                    <li class="nav-item">
                        <a class="nav-link" href="#">Tutorial</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">Blog</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">Notes</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">Contact</a>
                    </li>
                    <li class="nav-item">
       <a class="nav-link" href="https://youtube.com/@GetCodr">MyGear</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">Work With Us</a>
                    </li>
                    <li class="nav-item">
      <a class="nav-link rounded bg-primary text-light mr-0" href="#">Login</a>
                    </li>
                    <li class="nav-item ">
      <a class="nav-link rounded text-light bg-primary mr-0"
                        href="https://youtube.com/@GetCodr">SignUp</a>
                    </li>

                </ul>
            </div>
        </div>
        <br style="color: rgb(164, 20, 20);">
    </nav>
    <hr style="margin: 0;">
    <nav class="navbar navbar-expand-lg p-2  bg-body-tertiary">
        <div class="container-fluid ">
            <a class="navbar-brand mr-0" href="https://youtube.com/@GetCodr">
                <svg xmlns="http://www.w3.org/2000/svg" width="71" height="24"
    fill="currentColor" class="bi bi-house pr-25" viewBox="0 0 16 16">
                    <path
  d="M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L2
  8.207V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V8.207l.646.647a.5.5 0 0 0
    .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.707
     1.5ZM13 7.207V13.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V7.207l5-5 5 5Z" />
</svg></i></a>
  <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
  data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
             aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
    <div class="collapse navbar-collapse pl-3" id="navbarSupportedContent">
     <ul class="navbar-nav  mb-2 m-auto vishnu p-20  mb-lg-0">
           <li class="nav-item ">
 <a class="nav-link active ml-0 text-primary" aria-current="page" href="#">Home</a>
                    </li>
                    <li class="nav-item ">
                 <a class="nav-link ml-0 text-primary" href="#">Courses</a>
                    </li>

                    <li class="nav-item ">
                        <a class="nav-link text-primary" href="#">Tutorial</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-primary" href="#">Blog</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-primary" href="#">Notes</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-primary" href="#">Contact</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-primary" href="#">MyGear</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-primary" href="#">Work With Us</a>
                    </li>

                </ul>
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"
            fill="currentColor" class="bi bi-search " viewBox="0 0 16 16">
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85
     3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12
        6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/>
  </svg>
            </div>
        </div>
    </nav>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap
            .bundle.min.js"
 integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
  crossorigin="anonymous"></script>
</body>
</html>

                                    My YouTube Channel
                                       getcodr

JavaScript Practice: Five Questions with Solutions || JS Practice

 

      
     Q.1  Write a JavaScript program to display the
      current day and time in the following format.  
      Sample Output : Today is : Tuesday.
      Current time is : 10 PM : 30 : 38
      Solution :-
      let days = ["Sunday","Monday","Tuesday","Wendays",
      "Thursday","Friday","Saturday",]
    let curDate = new Date() ;
    let  day = curDate.getDay();
    document.write("Today is : "+ days[day]) ;
    let H = curDate.getHours();
    let M = curDate.getMinutes();
    let S = curDate.getSeconds();
      document.write(`Current time is : ${H} PM : ${M} : ${S}`) ;
 

      Q.2 Write a JavaScript program to print the current
      window contents.
    <button onclick="window.print()">Click</button>


   Q.3 Write a JavaScript program to get the current date.  
        Expected Output :
        mm-dd-yyyy, mm/dd/yyyy or dd-mm-yyyy, dd/mm/yyyy
     Solution
     let curDate = new Date();
      let mm = curDate.getMonth();
      let dd = curDate.getDay();
      let yyyy = curDate.getFullYear();
      if(dd<10){
        dd = "0"+dd ;
      }
      if(mm<10){
        mm = "0"+mm ;
      }
      document.write(`${mm}-${dd}-${yyyy} <br>`);
      document.write(`${mm}/${dd}/${yyyy} <br>`);
      document.write(`${dd}-${mm}-${yyyy} <br>`);
      document.write(`${dd}/${mm}/${yyyy} <br>`);
     


      Q.4 Write a JavaScript program to find the area of
         a triangle where three sides are 5, 6, 7.  
      Solution
     let a = 5 ;
     let b = 6 ;
     let c = 7 ;
      let s = (a + b + c)/2 ;
      let A = Math.sqrt(s*(s-a)*(s-b)*(s-c)) ;
      document.write(A) ;
       

        Q.5 Write a JavaScript program to determine whether a
           given year is a leap year in the Gregorian calendar.
        Solution
     
       function leapyear(year)
       {
        return (year % 100 === 0) ? (year % 400 === 0) : (year % 4 === 0);
      }
        console.log(leapyear(2016));
        console.log(leapyear(2000));
        console.log(leapyear(1700));
        console.log(leapyear(1800));

Friday, 2 June 2023

JavaScript Questions For Practice || JavaScript Practice || Important Question

 


JavaScript Questions For Practice || JavaScript Practice || Important Question || Practice Set

 
Q. 1  Write a JavaScript program to display the current day and time in the following
         format?        
        Sample Output : Today is : Tuesday.
        Current time is : 10 PM : 30 : 38  

// Solutions

// Make a Weeks Array
let weeks=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] ;
// For Get Current Date
let curdate = new Date() ;
// For Get Current Day
let days = weeks[curdate.getDay()] ;
// For Get Hour
let h = curdate.getHours();
// For Get  Minutes
let m = curdate.getMinutes();
// For Get Seconds  
let s = curdate.getSeconds();

// First Output
console.log("Today is : " + days) ;
// we use template literls also
console.log(`Today is : ${days}`) ;
// Second Output
console.log("Current time is " + h + " PM "+" : " + m +" : " + s );
// we use template literls also
console.log(`Current time is   ${h} PM  :  ${m}  : ${s}`);


   Q.2 Write a JavaScript program to print the current window contents ?
    
    solution :-

    <body>
    <p>Click the button to print the current page.</p>
    <button onclick="print_page()">Click For Print</button>
    </body>
    
     <script>
          function print_page()
        {
            window.print();
        }
     </script>

       
         Q.3 Write a JavaScript program to get the current date.  
         Expected Output :
         mm-dd-yyyy, mm/dd/yyyy or dd-mm-yyyy, dd/mm/yyyy

   Solution :-

         <script>
        let d = new Date();
        let mm = d.getMonth();
        let dd = d.getDay();
        let yy = d.getFullYear();

        if (mm < 10) {
            mm = '0' + mm;
        }
        if (dd < 10) {
            dd = '0' + dd;
        }

        d = mm + '-' + dd + '-' + yy;
        console.log(d);

        d = mm + '/' + dd + '/' + yy;
        console.log(d);

        d = dd + '-' + mm + '-' + yy;
        console.log(d);

        d = dd + '/' + mm + '/' + yy;
        console.log(d);
        document.write(date)
    </script>

                                getcodr


JavaScript Jokes and Quirky Code: Top 10 Quotes and Funny Snippets || JavaScript Jokes and Code Quotes

   JavaScript Jokes and Code Quotes   

                        



1, Any fool can write code that a computer can understand. 

      Good programmers  write code that humans can understand.


 2. JavaScript is the duct tape of the internet.


3 . Debugging is like being the detective in a crime movie 

        where you are also the murderer.


 4. In JavaScript, there is a beautiful, elegant, highly expressive language

         that is buried under a steaming pile of good intentions and blunders.


5 . If debugging is the process of removing software bugs,

         then programming must be the process of putting them in.


6 . The best thing about a boolean is even if you are wrong,

         you are only off by a bit.


7 . JavaScript is the assembly language of the web.


8 . Always code as if the guy who ends up maintaining your code 

        will be a violent psychopath who knows where you live.


9 . There are only two hard things in computer science:

         cache invalidation and naming things.


10 . I'm not a great programmer;

         I'm just a good programmer with great habits.


Thursday, 1 June 2023

How To Make Compounds In React.Js || Learn React.JS


 H                      
                           How To Make Compounds In React.Js




                             Heading.jsx file

import React from 'react' ;
function Heading(){
    return <h1>This is getcodr from youtube </h1>
};
export default Heading ;


                   Para.jsx file

import React from 'react' ;
function Para(){
    return (<p>This is an paragarph , it's tell us about getcodr youtube channel.
    getcodr is a small youtube channel who's trying to create a value in this world</p>) ;
}
export default Para ;

                   List.jsx file

import React from 'react' ;
function List(){
    return (
    <ol>
        <li>vishnu </li>
        <li>Sharma </li>
        <li>from </li>
        <li>getcodr </li>
    </ol> )
} ;
export default List ;

                   App.js File  

import React from 'react' ;
import Heading from './Heading' ;
import Para from './Para';
import List from './List' ;

function App() {
 return(
 <>
    <Heading />
    <Para />
    <List />
</>
  ) ;
}
export default App ;

              index.js file    

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

ReactDOM.render(
<App />,
 document.getElementById('root')
 ) ;



                            my youtube channel
                                    getcodr

HTML Form: User Registration Example || Learn HTML

 How To Create Form Using HTML 


 

 <!DOCTYPE html>
<html>
<head>
  <title>HTML Form Example</title>
</head>
<body>
  <h1>User Registration Form</h1>

  <form>
    <label for="username">Username:</label>
    <input type="text" id="username" name="username" required><br>

    <label for="password">Password:</label>
    <input type="password" id="password" name="password" required><br>

    <label for="gender">Gender:</label>
    <select id="gender" name="gender">
      <option value="male">Male</option>
      <option value="female">Female</option>
      <option value="other">Other</option>
    </select><br>

    <label for="email">Email:</label>
    <input type="email" id="email" name="email" required><br>

    <label for="message">Message:</label>
    <textarea id="message" name="message" required></textarea><br>

    <input type="submit" value="Submit">
  </form>
</body>
</html>

</body>
</html>


This is me