Skip to main content

Popular posts from this blog

JavaScript Hash function

 java Script hash  code for genrating sam number as  function hashCode ( string ) { let hash = 0 ; if (string. length == 0 ) { return hash; } for ( let i = 0 ; i < string. length ; i++) { let char = string. charCodeAt (i); hash = ((hash<< 5 )-hash)+char; hash = hash & hash; } return hash; } let input = document . querySelector ( "#input" ) let output = document . querySelector ( "#output" ) input. addEventListener ( "keyup" , () => { output. value = hashCode (input. value ) }) html < p > Enter text here </ p > < input type = "text" id = "input" > < p > 'Random' number outputted here </ p > < input type = "text" disabled = "disabled" value = "" id = "output" >

Responsive Nav Bar

 Responsive Nav Bar  review of navbar Font Awsome cdn link   < script   src = "https://kit.fontawesome.com/6d985e968b.js"   crossorigin = "anonymous" ></ script > CSS < style >              * {                  padding :  0 ;                  margin :  0 ;                  list-style : none;                  box-sizing : border-box;             }              .navbar {            ...

Image Upload by using Node Js and Multer

 Image Upload by using Node Js and Multer Require package const   const  multer = require( 'multer' ) const  path = require( 'path' )multer = require( 'multer' ) const  path = require( 'path' ) For Save in Folder  Do static path  app.use(express.static(__dirname +  './public' )); app.use( '/uploads' , express.static( 'uploads' )); Multer part,Multer middleware  const  storage = multer.diskStorage({      // Destination to store image          destination: (req,file,cb) => { cb ( null  ,  "./uploads" )     } ,       filename: (req, file, cb)  =>  {          // console.log(file)           cb( null ,fi...