Skip to main content

Posts

Showing posts from July, 2018

Why The Internet is using two addressing schemes (IP and MAC) instead of a single addressing scheme?

Why The Internet is using  two addressing schemes (IP and MAC)  instead of a single addressing scheme?  The Internet is made up with different layers of the internet protocol suite.A Mac Address is the physical address of network interface assigned by manufacture. It isused to bring information to that computer on Layer 2 of the OSI model.Since MAC address scheme is flat addressing scheme If the internet is made up only using flat addressing scheme identification of a host would have been very inefficient. IP addressing scheme is hierarchical in nature, so identification of a host is much efficient. IP addresses are used on layer 3 and using the network portion of the IP address you will first identify which network the host is in and then with the host portion of the IP address you will find the exact host within that network. If internet have to use only IP address since IP address are signed manually to each device,it require higher infrastructural cost to implement such a net

Essentials things to do after installing Ubuntu 18.04

Essentials things to do after installing Ubuntu 18.04 Those steps will smooth your experience with Ubuntu 18.04 Bionic Beaver 1. Update the system To update Ubuntu 18.04, press Super Key (Windows Key) to launch the Activity Overview and look for Software Updater. Run it to check for updates. Alternatively  user terminal to update and upgrade ( Use Ctrl+Alt+T): $ sudo apt update && sudo apt upgrade 2. Enable additional repositories for more software Go to Activity Overview by pressing Super Key (Windows key), and search for Software & Updates: Under the Ubuntu Software tab, make sure you have checked all of the Main, Universe, Restricted and Multiverse repository checked. Now move to the Other Software tab, check the option of Canonical Partners 3. Install media codecs Using terminal ( Use Ctrl+Alt+T):  $ sudo apt install ubuntu-restricted-extras 4. Prolong your battery and prevent overheating Let’s move on to prevent overheating

Useful C++ code snippets

Setting up  Precision to given decimal point   “std:setprecision()”  method used along with  “std:fixed” provides precision of  outputting floating point numbers correct to decimal numbers mentioned in the parameter  of the setprecision method. header file #include <iomanip> std:setprecision() defined no of digits in number. Without using std:fixed() method setprecision()  will   limit whole numbers digits to given precision. In order to print precision of decimal point both setprecision() and fixed() method using before printing values, code snippet : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 // setprecision example #include <iostream> // std::cout, std::fixed #include <iomanip> // std::setprecision int main (){ double doubeleValue = 3.34535 ; std::cout << std::setprecision( 4 ) ; std::cout << doubeleValue<< '\n' ; // Output : 3.345 -wit