Monday, May 28, 2012

Apache, PHP, MySql for development purposes in Windows

No comments:

Important: The Following is for development machine only.

Apache - httpd-2.2.22-win32-x86-no_ssl.msi Link: http://httpd.apache.org/download.cgi
PHP - php-5.2.17-Win32-VC6-x86.zip Link: http://windows.php.net/download/
MySql - mysql-installer-5.5.24.0.msi Link: http://www.mysql.com/downloads/installer/

Slected: Apache module + PHP V6-Thread Safe

(I) Configuring Apache

1. Install Apache

2. add the following in [Apache]\conf\httpd.conf
LoadModule php5_module "C:/php/php5apache2_2.dll"
<IfModule dir_module>
    DirectoryIndex index.php
</IfModule>
<IfModule mime_module>
AddType application/x-httpd-php .php
</IfModule>
3. Restart Apache

Your webroot will be at [Apache]\htdocs. You can change this path by editing the lines mentioned below in [Apache]\conf\httpd.conf
Eg:
DocumentRoot "C:/.../Apache Software Foundation/Apache2.2/htdocs" to
DocumentRoot "D:/ htdocs"
and
<Directory "C:/.../Apache Software Foundation/Apache2./htdocs"> to
<Directory "D:/htdocs">

(II) Configuring PHP

1. Extacted PHP zip to 'C:\php'

2. copy and rename [php]\php.ini-dist to [php]\php.ini

3. add the following in php.ini
extension=php_mysql.dll
extension_dir = "c:\php\ext"
4. copy [php]\libmysql.dll and [php]\php.ini to [Apache]\bin

5. Restart Apache

(III) Configuring MySql

Install as per your requirement.

Wednesday, May 23, 2012

Open Google Chrome browser in incognito mode by default

2 comments:
Step:

1. Create a shortcut of Google Chrome browser
2. Right click the shortcut and click Properties
3. Add  --incognito to the end of the Target



That's all !!!

Sunday, May 20, 2012

Google Maps JavaScript API v3 Example in asp.net

No comments:


<head runat="server">
    <title>Google Maps JavaScript API v3 Example in asp.net</title>
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true"></script>
    <script type="text/javascript">

        google.maps.event.addDomListener(window, 'load', initialize); //run when after page load
        var map;
        var markercode;
        var markermyLatlng;
        var markermyLatlngCount=0;

        function initialize() {
            var Lat=<%= dbLat %>;
            var Lon=<%= dbLon %>;
            var myOptions = {
                center: new google.maps.LatLng(Lat, Lon),
                zoom: 10,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);


            markercode = new google.maps.Marker({
                draggable:false,
                animation: google.maps.Animation.DROP,
                map:map,
                position: new google.maps.LatLng(Lat, Lon),
                title:"mattanchery - from code page!"
            });

            google.maps.event.addListener(markercode, 'click', toggleBounce);
        }

        function toggleBounce() {
            if (markercode.getAnimation() != null) {
                markercode.setAnimation(null);
            } else {
                markercode.setAnimation(google.maps.Animation.BOUNCE);
            }
        }

        function BtnLocateMe_onclick() {
            var myLatlng;
            if (navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(function (position) {
                    myLatlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);

                    if(markermyLatlngCount==0){
                        markermyLatlng = new google.maps.Marker({
                            draggable:true,
                            animation: google.maps.Animation.DROP,
                            map:map,
                            position: myLatlng,
                            title:"I am here!"
                        });
                        markermyLatlngCount=markermyLatlngCount+1;
                    }
                    else
                    {
                        map.setCenter(myLatlng);              
                    }
                },
                function () {
                    handleNoGeolocation(true);
                });
            } else {
                handleNoGeolocation(false);
            }
        }

        function handleNoGeolocation(errorFlag) {
            if (errorFlag) {
                var content = 'Error: The Geolocation service failed or blocked.';
            } else {
                var content = 'Error: Your browser doesn\'t support geolocation.';
            }
            alert(content);
         }

    </script>
    <style type="text/css">
        #map_canvas
        {
            height: 543px;
            width: 754px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="BtnLocateMe" type="button" value="Locate Me" onclick="BtnLocateMe_onclick()" />
    <div id="map_canvas"></div>
    </div>
    </form>
</body>

CODE:


    public string dbLat = "9.964455";
    public string dbLon = "76.253099";
    protected void Page_Load(object sender, EventArgs e)
    {


    }

Tuesday, May 15, 2012

Have You Ever Evaluated your Home for Safety?

No comments:

Have You Ever Evaluated your Home for Safety?
If NOT,
Here are simple but effective measures that can help improve the safety at your home.
Use this checklist as a guide to find and fix hazards in your home. 


  •    Do you have a first-aid kit stocked with emergency items?
  •    Do you practice a home fire escape plan twice a year so everyone in your family knows at least two exits out of every room and where to meet outside in case of an emergency?
  •    Do you test your smoke alarms once a month to make sure they are working, and replace the batteries every year?
  •    Have you installed smoke alarms on every level of your home and near every sleeping area?
  •    Are all stairs and steps free from clutter, well lit and protected with a secure hand-rail?
  •    Do you keep all paths and walkways clear of clutter and well lit?
  •    Have you installed grab bars in bath and shower stalls and do you use a non-slip mat or have adhesive safety strips or decals inside bathtubs and showers?
  •    Have you posted emergency numbers next to every phone in your home?
  •    Do dangerous products, including cleaning products, medications and chemicals, have child resistant caps and kept away from food?
  •    Are medicines kept in their original containers with the original labels?
  •    Do you constantly supervise children in or near water, such as pools, ponds, bathtubs, buckets, etc.?
  •    Do you keep your water heater setting at 120 degrees Fahrenheit or less?
  •    Do you always pull the car out of the garage after starting it?
  •    Have you moved objects, such as tires and gardening tools that are leaning against walls?
  •    Do you store tools, gardening supplies and automotive parts in a secure cabinet or high shelf out of reach of children?
  •    Are all matches and lighters stored in a locked cabinet?
  •    Have you installed child safety locks on cabinets where hazardous products and medications are stored?
  •    Have you installed baby gates at the top and bottom of stairwells?
  •    Do you keep all plastic wrapping, such as dry-cleaning bags, produce bags and trash bags, away from children?
  •    Have you placed furniture, including cribs and playpens and beds, away from windows?
  •    Have you installed window guards with an emergency release to prevent young children from falling out of upper windows?
  •    Are electrical outlets covered with safety caps?
  •    Do you keep small items such as jewelry, buttons, safety pins, coins and small batteries away from children?

How do you see the importance of walking around the car before driving?!

No comments:

You can see in this picture, this young child in the wheel well of the truck. A Pike crew working for another Utility found this child while conducting a CIRCLE OF SAFETY of the company truck the crew members were driving. I don’t want to think about what would have happened if the employee had gotten in the truck and drove off without doing a walk around. Please share this eye opening, bone chilling photo and experience with your work groups.



This crew has also reported children climbing into the back of company vehicles. Keep in mind children will be out of school on summer break soon so be sure to watch out for them!!

Just another reason for us to do the vehicle CIRCLE OF SAFETY before driving off in our personal vehicles.

Monday, May 14, 2012

Complicated Mathematics

No comments:
OFFICE ARITHMETIC

Smart boss + smart employee = profit

Smart boss + dumb employee = production

Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
_____________________________

ROMANCE MATHEMATICS  

Smart man + smart woman = romance
 

Smart man + dumb woman = affair

Dumb man + smart woman = marriage

Dumb man + dumb woman = pregnancy
______________________________


SHOPPING MATH


A man will pay $20 for a $10 item he needs.

A woman will pay $10 for a $20 item that she doesn't need.
_____________________________


GENERAL EQUATIONS & STATISTICS 


A woman worries about the future until she gets a husband.

A man never worries about the future until he gets a wife

A successful man is one who makes more money than his wife can spend.

A successful woman is one who can find such a man.
_____________________________ 


HAPPINESS


To be happy with a man, you must understand him a lot and love him a little.

To be happy with a woman, you must love her a lot and not try to understand her at all.
______________________________ 


LONGEVITY


Married men live longer than single men do, but married men are a lot more willing to die.
______________________________ 


PROPENSITY TO CHANGE


A woman marries a man expecting he will change, but he doesn't.

A man marries a woman expecting that she won't change, and she does.
_____________________________


DISCUSSION TECHNIQUE
 

A woman has the last word in any argument.

Anything a man says after that is the beginning of a new argument. 

_____________________________

HOW TO STOP PEOPLE FROM BUGGING YOU ABOUT GETTING MARRIED 


Old aunts used to come up to me at weddings, poking me in the ribs and cackling, telling me, "You're next."
 
They stopped after I started doing the same thing to them at funerals.

Saturday, May 12, 2012

Just for fun

No comments:










Some nostalgic pictures

No comments:
15th August 1947, First News Paper of INDEPENDENT INDIA…

DAIRY MILK CHOCOLATE 1905 TO 1999…

Stalin, Lenin and Trotsky…


An Awesome paint of Leonardo da vinci…

The front page of the April 16, 1912 evening edition of the Boston Globe, detailing the Titanic Disaster is shown…

The Elephant Rock - 1858…

Star Cinema ( now at Pakistan ) 1943…

Shooting-the-mgm-lion-logo-in-1924…

Incomplete Howrah bridge 1935…

Howrah Bridge under construction... 1942...

HOWRAH BRIDGE…

Calcutta bus stand near Howrah bridge, most likely on the Howrah station side of the Hooghly River 1944…

view of the hoogly river at 1880…

Last time Netaji was arrested by British police…

A rare one of Netaji Subhash Chandra Bose and his wife Eimilie Shenkl…

Gandhi ji with his wife Kasturba Gandhi…

the crown of India…

Maharani of Jaipur Gayatri Devi - 1940's…

The last train , Dhaka to Calcutta!!! Taken in 1947…

British India and Afghanistan border - 1934…

Gandhi-ji with Netaji 1932…

Jawaharlal Nehru, Bhulabhai Desai, and Rajendra Prasad (Center) at the AICC Session, April 1939…

Chatim talay gurudeber janmodin 1937…

Rabindranath Thakur…

Sharat Chandra with Surendranath…

Bagha Jatin…

deho rakhchen thakur ramkrishna paramahansa deb…

rare picture of the family of maa sarada devi…

1968 shayam bazar more…


Family of Indira Gandhi…

July 1983  Indira Gandhi felicitates Kapil Dev, captain of Indian cricket team…

Satyajit Roy only 22 years old , picture taken at 1943…

Asha, Mukesh , Lata , Kishore & Manna…

rare picture of Kishore kumar & Bhupen Hazarika…

awesome picture of RK, dilip sahab and Dev anand…

Amit ji with his mom Teji bachan....

Jaya with her son & daughter…

Final Journey to Heaven.....Bhupen Hazarika…


C. V. Raman - The Great Indian Physicist
Sir Chandrasekhara Venkata Raman, FRS (7 November 1888 – 21 November 1970) was an Indian physicist. He was the recipient of the Nobel Prize for Physics in 1930 for the discovery that when light traverses a transparent material, some of the light that is deflected changes in wavelength. This phenomenon is now called Raman scattering and is the result of the Raman effect…


The original picture of Jhansi Rani Laxmi Bai. This picture has been taken by German photographer Hoffman 160 years ago…


This was how the Taj Mahal was protected from bomber jets in 1942 during world war.
It was covered with huge scaffold, to make it look like a stockpile of bamboo and misguide bombers.

The covering is still incomplete in this photo. The whole of Taj Mahal was covered but this picture shows only the main dome covered. The govt. didn't allow any photographers later to shoot the final scaffold cover.

During the India-Pakistan war in 1971, it was protected by covering it with a green cloth and making it almost invisible i.e. camouflaged within the greenery around it.
Even in 2001, after the Sep 11 attack, Archaeological Survey of India took up the precautionary measure to cover it with cloth and it took them more than 20 days to do that!!