Tuesday, July 29

Irony of Science in Eid al-Fitr

In today’s world, the science has grown incredibly that we have Hubble Space Telescope  launched into space watching the universe in different spectrums. We have satellites for weather predictions; we have Terrestrial Space observatory Telescope's watching for flares in sun and climate in Jupiter. We have even accurately and safely landed man on the moon. 

We can even accurately predicate solar and lunar eclipse, the exact points in earth where it would be visible. We have even predicated the next arrival of Halley's Comet  and also the distance away from the earth. The next arrival of Halley's Comet is on 28th July 2061, and then on 7th May, 2134  and it will pass within 13.9 million km from earth.

Halley's Comet May 29 1910


In spite of all these feats, we still haven’t been able to predicate accurately the Eid al-Fitr. In India, all banks and govt office calendars marked 28th July as Eid al-Fitr holiday but it was predicted a day earlier.

The date of Eid al-Fitr for a region is confirmed by the sighting of the new moon.in that particular region. In countries like India, where even the whole nation has same time-zone can't still predicate when the new moon will occur.

Saturday, July 26

How much is the Advertisment Revenues in Media


Advertisment is the primary revenue for most media.


Industries that are spending  in online medium.
  • Electronics
  • Fashion - Men
  • Fashion - Woman
  • Baby Care
  • Video Games
  • Fitness
  • Health Care
  • Car
  • Bike
  • Jewellery
  • Dating

Sunday, July 13

To insert debug code in all functions using regular expression


Lets illustrate with a Javascript  Source Code and Notepad++ IDE

Regular Expression to Find functions

((\w*)\s*[:|=]\s*function\(\w*\)\s*\{)

Debug Code to insert inside each functions

console.log("functionName");

Regular Expression to Insert Debug Code inside Functions

$1 \n\tconsole\.log\("$2"\)\;

Note: Please enable "Regular expression" and ". matches newline" in Search Mode in Replace box in Notepad++ for inserting inside more than 1 function using regular expression.


A sample Javascript before inserting Debug code

var SyntaxHighlighter = function() {
    var sh = {
        all: function(params)
        {
            attachEvent(
                window,'description'
            );
        }
    };
}();

Javascript code after inserting Debug code using Regular Expression

var SyntaxHighlighter = function() {
      console.log("SyntaxHighlighter");
    var sh = {
        all: function(params)
        {
            console.log("all");
            attachEvent(
                window,'description'
            );
        }
    };
}();


To know more about How this Regular Expression Works and Customisation