Facebook

P vs NP for Newbies.


So you must have heard of P vs NP a lot if you are a computer science student, And if you failed to understand it so far like I was till now, here is the explanation in it-can-not-made-more-simpler words


Assuming You had played Super Mario...

You know how sometimes you can get stuck on a stage in Mario, and you spend hours and hours and hours trying to get to the end of the stage, but you just can't seem to figure it out?

How do you Identify a fake Facebook profile.




According to a report there are approx 83 million fake facebook profiles on the site. No no...it's not me who come up with this figure.  As I said 'a report' says that.

And over 45 million accounts are duplicate, means who forgot their credentials and created another account.

Play a song as soon as someone comes online


Today we are going to create a very simple and small script which plays a song when someone starts their system i.e. as soon as they come online (Of-course you both should be in same network. i.e their system should be reachable form yours) .

So have you heard of ping command. Yes? Great. We will use this command only.

How to use a function from one file into another file in C


So lets say there is some function which you need to use in many programs of your project. One way is to copy paste the code in each and every file. But this will increase the size of every file and what if there are thousands of file. I am sure you would not like it. Also C is the programming language which needs very less space and is used in application which require minimum space. So copying same code in every file seems not a viable option. 


Also what if one day you need to change the code a bit. Oh man ! You are doomed. Better go for a vacation and meanwhile your boss will give this editing task to someone else. 


Unix is Fun


who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; fsck; more; yes; more; gasp; yes; uptime; umount; sleep






StopWatch and other Hacks




Say Yes to all confirmations


So sometimes it happens that you are installing some package or compiling some source code and it asks for your confirmation
Do you want to continue (y/n)?
 so instead of pressing 'y' everytime you just can do this

Let Linux speak for you


Now let your Linux speak for you.
 
There is a utility in linux called 'espeak' using which you can let it speak. Its more or less same as 'Narrator' in Windows.

Syntax is :

Download YouTube video in One Go




How to download single video - 


$ youtube-dl   is a very powerful utility in Linux to download videos from Youtube or other similar sites.


To download just one video use the below syntax


Train on Your Terminal



Did it ever happened to you that instead of typing 'ls' for listing the files in a directory , you type 'sl' in hurry and got the no-so-pleasant error saying that 

"The program 'sl' is currently not installed.  You can install it by typing:
sudo apt-get install sl


How many times IIITD has been searched

What is Trending on Google Search India Right Now








StarWars in Terminal




This is for Geeks and Nerds only. Others may not found it interesting.

To watch StarWars  in command-line terminal, run the below command 

$ telnet  towel.blinkenlights.nl

How to Reset the Root password of any Ubuntu Machine.



You might need to change the root password of your Ubuntu Machine, May be you forgot the password or you want to Log-in into your friend's system and you don't know the password.

Here is the trick to achieve this.

1. Restart the system.

Sharing files in Linux.


Wanna Share some file with your friend ? Here are three methods.

1. The traditional way. Transfer files to Pen Drive and then your friend copy it to their system. This is the best way to share if both system are not in same network.

Cons - 

  • File is copied 2 times.
  • What if file size is more than size of pen drive.


2. Install apache 2. 

Why IIIT-Delhi for M.tech CSE?

Like you all aspirants of M.tech, I also had many questions last year.
This article here is an attempt to help you find answers for most of your questions.
All opinions are my own which may differ from others. These Q&A doesn't offer any promise from Institute's end. Please verify any fact, statistics or numbers from your end too.