Set div at center of the screen CSS.

If you know the dimensions of div.

.centered {
  position: fixed;  /*IE6 position:absolute */
  top: 50%;
  left: 50%;
  margin-top: -50px; /* Half of the Height of div*/
  margin-left: -100px; /* Half of the Width of div*/
}

If you Don't know the dimensions of div.

.centered {
  position: fixed; /*IE6 position:absolute */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

System.LimitException: DML currently not allowed


System.LimitException: DML currently not allowed VisualForce.


This Error because of allowDML is false for VisulaForce Component.

Resolution: Set allowDML="true" in component. 

Difference between angular.copy() and assignment (=).

$cope.context = 'some text';
$scope.master = context;
Thus in the later case, if you we're to change something in $scope.master you would also change context.
But in $scope.master = angular.copy($scope.context);
 angular.copy() performs a deep copy of the argument - essentially creating a new object - whereas using the assignment operator = just assigns reference's.
For more details on angular.copy visit Here.