Why a pendrive/harddrive has less storage space than promised?
Have you ever noticed how manufacturers and our dealers continue to do this again and again without getting sued?

They are not marketing it falsely, but smartly!

While manufacturing a pendrive/harddrive they consider:

1 MB = 1000 KB
1 GB = 1000 MB
1 TB = 1000 GB and so on.

However, our computers work on base 2 and for them:

1 MB = 1024 KB
1GB = 1024 MB
1 TB = 1024 GB

This difference in the method of computation is responsible for this “missing space.”

I’ll take an example of my 16GB Sandisk pendrive. 
From Sandisk manufacturer’s point of view, the 16GB will have 16*1000*1000*1000 = 16,000,000,000 bytes.

From a computer’s point of view, 16GB is actually
16*1024*1024*1024 = 17,179,869,184 bytes.

So, my Sandisk pendrive that promises to have 16 GB storage space will actually displays 14.9GB.
 17,179,869,184 – 16,000,000,000 = 1,179,869,184 bytes (1.1 GB) less storage space when connected to a computer.
How to free used ports on windows

“netstat” command is used to check which program is using which port.
Here are steps to forcefully free used ports.


1) Search cmd and run it as Admin Mode by choosing “Run as administrator” on right click.

2) Type following command and hit enter 

    netstat –ano 

This will provide a list of ports, along with the PID (process ID) that has those ports open.

   (Shortcut: netstat -ano | findstr portNumber)

3) Now Check the process id corresponding to which you want to free port

    taskkill /PID XXX 

4) To forcefully kill

    taskkill /F /PID XXX

Virus : One line code to hang your friend’s PC
MS-DOS is very powerful Operating System that makes you able to create batch files the .bat file. Batch files are created to run instructions in a batch. So many pranks and the virus can be created using this. This post will guide you how to create a simple virus prank that will hang anyone’s PC. Try this on your friend’s PC to annoy them 😛


1) Open any text editor (Notepad) and Type

2) Save it as a batch file that is file extension must be .bat.

3) This step is optional to check what is going to happen. Open task manager by pressing Ctrl + Alt + Del and click on performance tab to view the changes those are going to happen.

4) Run the batch file.

5) Within the few seconds, the performance of your machine will be degraded and 100% memory will be full and within a minute your machine will be hanged.


In Windows, “%0” is the name of the currently executing Batch File. By executing %0|%0, we are recursively calling the Batch File, thereby creating many processes and utilizing CPU resources up to a point where CPU cannot offer more resources to the processes which will be created(forked) after a certain amount of time.

AngularJS Interview Questions
Here are AngularJS interview questions that will help you to crack AngularJS technical interview.

1) What is AngularJS ?

2) Features of AngularJS ?

3) Difference between MVVM and MVC and MVP ?

4) What is single page application ?

5) How angular bootstrap ?

6) How to manual bootstrap angularjs ?

7) AngularJS Initialization & rendering process ?

8) Running order of







9) jqLite vs jQuery ?

10) Types of binding ?

11) Two way data binding ?

12) ng-model directive ?

13) Why ng init is used ?

14) Difference Between expression{{}} and ng-bind ?

15) ng-repeat is used for ?

16) What if duplicate element in ng-rpeat ?

17) How to display unique element in ng-repeat ?

18) How to apply switch case in angular ?

19) Difference between service and factory ?

20) Is service and factory singleton object ?

21) How angular has implement singleton pattern in factory and service ?

22) One scanerio where services can’t be used ?

23)What is the meaning of # in the URL?

24) UI Routing ?

25) Abstract state in UI routing ?

26) ng routing vs ui routing ?

27) Authorizaion in ng-routing ?

28) Difference between scope and $scope ?

29) Benfit of controller As ?

30) Lazy loading of controllers ?

31) How to check current running controller ?

32) Communication between two controllers

33) What are the ajax calls?

34) What is asynchronous means?

35) What are promises ?

36) What are interceptors ?

37) What is dependency injection? How to add dependency in angularjs?

38) What is digest cycle and how you can stop it ?

39) How to check digest cycle is in progress ?

40) What is $destroy ?

41) What is ng-transclude ?

42) How you can all method of controller in directive ?

43) Different types of directives ?

44) Controller vs link in directive ?

45) Pre link vs Post Link vs Compile functions ?

46) What is best way to manipulate DOM and how can we do ?

47) Directive restrict type ?

48) Events in angularjs ?

49) Restrict types in angularjs ?

50) Custom exceptions in angularjs ?

51) Filters in angularjs ?

52) Custom filter in angularjs ?

53) What are decorators ?

54) Providers in angularjs ?

55) Session management in angularjs ?

56) Authentication and Authorization in angualrjs?

57) What is localization? How can we achieve the localization ?

58) What is local Storage?

59) What is session storage?

60) What is the difference between the local Storage and session Storage?

61) How to speed up rendering UI ?

62) Directory structure of angular js app ?

63) Best practices of angualrjs ?

64) How to remove ng-classes and directive information from DOM ?

65) What is angular 2 ?

66) Difference between angularjs 1.x and 2 ?

67) How angular 2 is rendering DOM ?

68) What is grunt? Why we use it?

69) Why we use grunt other than minification?

70) What is gulp?

71) What are the new things in available in html5?

So above are the AngularJS interview questions that were asked during the technical round for different companies. For more detail on AngularJS visit official website.

Further Reading

Play YouTube videos on VLC media player
If you want to play Youtube videos on your VLC media player installed on your desktop computer then this article will guide you through simple steps.


1) Copy the Youtube video URL. Right-click on the video and click on ‘Copy video URL’ link. It will copy the URL to your clipboard.
2) Open VLC player and select File > ‘Open Network’ menu option.
3) Paste the link in the URL textbox and click on ‘Open’ button.
4) Tada !!! The youtube video starts playing in your VLC player directly.

Now you can increase the volume up to 200% and enjoy the video. No need to grab those headphones. 

Here is video tutorial

Javascript Interview Questions

After javascript can be executed on the server side, it has become very popular. So for better understanding and quality code, there are few concepts that a developer must know. So here are javascript interview questions generally asked in the interviews

1) What is event bubbling and capturing?

2) Best practices in javascript?

3) How to reduce the loading time of web page without concerning too much refactoring?

4) If two div on the page has the same id(“mydiv”) then getelementbyid(“mydiv”) will refer to ?

5) How to handle large JSON on UI if rendering is slow?

6) The result of accessing undeclared variable?

7) Parent/Child communication in javascript ?

8) How to make Ajax call?

9) What is setTimeout?

10) What are closures?

11) What is a prototype in javascript?

12) Scope in javascript?

13) How to define the class in javascript?

14) How can promises be implemented in javascript?

15) # and ! in URL?

16) What are callbacks?

17) Suppose we have an error in production which is not producible on Local and we don’t have access to the production and we have only minified file the production then how you can track the error?

18) What is async and defer?

19) How to find the inner classes of a div by using javascript?

20) What is the difference between promise and callback?

21) What is view engine?

22) What are bind filters and reduce map in js?

23) Difference between primitive and non-primitives data types?

24) How javascript interpret DOM that is rendering order or control flow?

25) What is the hoisting?

26) Difference between following two snippets

function abc(){
  return “Sunil”
var abc = function(){
   return “Sunil”;
27) Inheritance in javascript?
28) Local scope and block level scope in javascript?

29) What is lexical scope?

Further Reading