Thursday, September 4, 2008

How to change "about:config" in firebox,netscape,google chrome Using Javascript

If you want to change about:config through javascript here is examble,

var browserName=navigator.appName; 
var browserVer=parseInt(navigator.appVersion);
var popsMode;
if (browserName=="Netscape" && browserVer>=5) {
    alert(browserName);
    alert(browserVer);
    popsMode=true;
    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
      if (prefs.getPrefType("dom.disable_window_open_feature.resizable") == prefs.PREF_BOOL){
        popsMode = prefs.getBoolPref("dom.disable_window_open_feature.resizable");
      }
   if (popsMode==true) {
   prefs.setBoolPref("dom.disable_window_open_feature.resizable",false);
   alert(popsMode);
   }
 }

Tuesday, July 22, 2008

Birth Date Calculation in Excel

Open Excel Sheet

Age Differnce from Current Date

Enter your date of birth in A1 Field format(mm-dd-yyyy)

Copy and paste the below formula in A2 Field

=DATEDIF(A1,TODAY(),"y")&" years, "&DATEDIF(A1,TODAY(),"ym")&" months, "&DATEDIF(A1,TODAY(),"md")&" days"

Age Differnce from paricular date

Enter your date of birth in A1 Field format(mm-dd-yyyy)

Enter the particular Date in A2 Field

Copy and paste the below formula in A2 Field

=DATEDIF(A1,A2,"y")&" years, "&DATEDIF(A1,A2,"ym")&" months, "&DATEDIF(A1,A2,"md")&" days"

Thursday, July 17, 2008