Disk Space Usage CentOs Linux

Check File System Disk Space Usage : df
Display Information of all File System Disk Space Usage : df -a
Show Disk Space Usage in Human Readable Format : df -h
Display Information of /home File System : df -hT /home
Display Information of File System in Bytes : df -k
Display Information of File System in MB : df -m
Display Information of File System in GB : df -h
Display File System Inodes : df -i
Display File System : df -T
Include Certain File System : df -t ext
Exclude Certain File System : df -x ext
Display Information of df Command: df --help

jQuery bind() vs .live() vs .delegate() vs .on()

All these 4 jQuery methods are used for attaching events to selectors or elements. But they all are different from each other.

.bind(): This is the easiest and quick method to bind events. But the issue with bind() is that it doesn’t work for elements added dynamically that matches the same selector. bind() only attach events to the current elements not future element. Above that it also has performance issues when dealing with a large selection.

.live(): This method overcomes the disadvantage of bind(). It works for dynamically added elements or future elements. Because of its poor performance on large pages, this method is deprecated as of jQuery 1.7 and you should stop using it. Chaining is not properly supported using this method.

.delegate(): The .delegate() method behaves in a similar fashion to the .live() method, but instead of attaching the selector/event information to the document, you can choose where it is anchored and it also supports chaining.

.on(): Since live was deprecated with 1.7, so new method was introduced named “.on()”. This method provides all the goodness of previous 3 methods and it brings uniformity for attaching event handlers.

jQuery Difference Between .empty(), .remove() and .detach()

All these methods .empty(), .remove() and .detach() are used for removing elements from DOM but they all are different.

.empty(): This method removes all the child element of the matched element where remove() method removes set of matched elements from DOM.

.remove(): Use .remove() when you want to remove the element itself, as well as everything inside it. In addition to the elements themselves, all bound events and jQuery data associated with the elements are removed.

.detach(): This method is the same as .remove(), except that .detach() keeps all jQuery data associated with the removed elements. This method is useful when removed elements are to be reinserted into the DOM at a later time.

jQuery Difference Between body onload() And document.ready()

document.ready() function is different from body onload() function for 2 reasons.

  • We can have more than one document.ready() function in a page where we can have only one body onload function.
  • document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page.

jQuery Advantages

  • Easy to use and learn.
  • Easily expandable.
  • Cross-browser support (IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+)
  • Easy to use for DOM manipulation and traversal.
  • Large pool of built in methods.
  • AJAX Capabilities.
  • Methods for changing or applying CSS, creating animations.
  • Event detection and handling.
  • Tons of plug-ins for all kind of needs.


MySQLi is an improved version of the older PHP MySQL driver, offering various benefits.

The developers of the PHP programming language recommend using MySQLi when dealing with MySQL server versions 4.1.3 and newer

The MySQLi extension provides various benefits with respect to its predecessor, the most prominent of which  are:

  • An object-oriented interface
  • Object Mapping
  • Support for prepared statements
  • Support for multiple statements
  • Support for transactions
  • Enhanced debugging support
  • Embedded server support
  • More powerful Functionality

Differences Between Abstract Class And Interface

  • In abstract classes this is not necessary that every method should be abstract. But in interface every method is abstract.
  • Multiple and multilevel both type of inheritance is possible in interface. But single and multilevel inheritance is possible in abstract classes.
  • Method of php interface must be public only. Method in abstract class in php could be public or protected both.
  • In abstract class you can define as well as declare methods. But in interface you can only defined your methods.

Beginners' Guide