Skip to main content

Posts

Showing posts from January 20, 2019

Node.js URL Module

Node.js URL Module In Node.js  URL module used splits up a web address into readable parts. Include Node.js URL Module var url = require('url'); Parse an address with url.parse() function. Example var url = require('url'); var adr = 'http://localhost:8080/home.htm?year=2019&month=january'; var q = url.parse(adr, true); console.log(q.host); //returns 'localhost:8080' console.log(q.pathname); //returns '/home.htm' console.log(q.search); //returns '?year=2019&month=january' var qdata = q.query; //returns an object: { year: 2019, month: 'january' } console.log(qdata. january); //returns 'january' Node.js File Server Create two file named home.html and contact.html home.html <!DOCTYPE html> <html> <body> <h1>Rozgardesh</h1> <p>Education for everyone</p> </body> </html> contact.html ...

Number system

Number system (Basic) 1. Addition : The mother of all calculation. Performing addition is no big deal for anyone but doing it at a pace of 5 to 10 times faster, which is required in competitive exams like CAT is surely a heck of work.  Following method also called as number-line method discussed below enables doing addition without carry-over and with proper practice increases addition capacity multi folds. Suppose we have to add 78 and 86,  #How to progress? Start with addition of two 2 digit numbers, then try adding multiple 2 digit number and finally multiple digits numbers.  2. Subtraction : As subtraction is extension of addition, the trick is just an extension of method discussed above. Suppose we have to subtract 38 from 72, treat it as what we have to add to 38 to get 72. Again number line system comes to rescue.                First we find the number which have to be added to 38 toe...