Wednesday, March 4, 2015

SQL Server 2014 Express LocalDB

No comments:

Microsoft SQL Server 2014 Express LocalDB is an execution mode of SQL Server Express targeted to program developers. LocalDB installation copies a minimal set of files necessary to start the SQL Server Database Engine. Once LocalDB is installed, developers initiate a connection by using a special connection string. When connecting, the necessary SQL Server infrastructure is automatically created and started, enabling the application to use the database without complex or time consuming configuration tasks. Developer Tools can provide developers with a SQL Server Database Engine that lets them write and test Transact-SQL code without having to manage a full server instance of SQL Server. An instance of SQL Server Express LocalDB is managed by using the SqlLocalDB.exe utility. SQL Server Express LocalDB should be used in place of the SQL Server Express user instance feature which is deprecated.

https://msdn.microsoft.com/en-us/library/hh510202.aspx

Friday, February 28, 2014

Sample MS SQL trigger code

No comments:
CREATE TRIGGER trg_users
ON  dbo.users
FOR  INSERT,UPDATE
AS
BEGIN
    RAISERROR('This is a test', 16, 1)
END
GO

Sunday, December 15, 2013

Bring back New Tab page in Google Chrome browser

No comments:
Goto:
1. chrome://flags/
2. Search for: Enable Instant Extended API Mac, Windows, Chrome OS
3. Select Disable from the drop-down below.
4. Click the Relaunch now button below

Wednesday, July 10, 2013

God Mode in Windows 7

No comments:
Hello Friend,
Did you tried God Mode in windows. Its fun..
Just create a folder with the name as below.
GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

Saturday, May 4, 2013

share WiFi internet in windows to another device - Hotspot

No comments:

Create using the following command in command prompt with administrator privileges:
netsh wlan set hostednetwork mode=allow ssid=myhostedwifi key=mypassword123* keyusage=persistent 


To start:
Type "netsh wlan start hostednetwork" in notpad without " and save as start.bat

To Stop:
Type "netsh wlan stop hostednetwork" in notpad without " and save as stop.bat

Run above bat files with administrator privileges.

Then share your internet connection with Microsoft Virtual WiFi Miniport Adapter in Network Connections

Thursday, February 21, 2013

Scan files in hard disk

No comments:
C# sample code below:


class Program
    {
        static void Main(string[] args)
        {
            try
            {
                string dir = @"C:\";
                TreeScan(dir);
                Console.ReadLine();
            }
            catch(Exception e)
            {
                Console.WriteLine("Error:" + e.Message);
                Console.Beep();
                Console.ReadLine();
            }
        }

        private static void TreeScan(string dir)
        {
            Console.WriteLine();
            Console.WriteLine("Files in: " + dir);
            foreach (string f in Directory.GetFiles(dir))
            {
                Console.WriteLine(f);
            }
            foreach (string d in Directory.GetDirectories(dir))
            {
                Console.WriteLine(d);
                Console.WriteLine();
                Console.WriteLine();
                TreeScan(d);
            }
        }
    }

Saturday, January 19, 2013

How to set filters in Gmail to move Facebook and other automated emails away from your inbox

2 comments:

Go to Gmail Settings by clicking the gear ion on the top left
  • Take Filters tab
  • On the page bottom click Create new filter
  • In the From filter type facebookmail.com
  • Click Create filter with this search » and in the next screen check skip the inbox and Apply the label and create a label by typing a label name like Facebook mails and click the Create button
  • Select the Checkbox Also apply filter to # matching conversations and click the Create filter button.

Repeat the above step with m.facebook.com

You can do these steps for: foursquare.com, dropbox.com, twitter.com, linkedin.com, soundcloudmail.com

Thursday, August 16, 2012

Windows 8 images

3 comments:
docked message app and visual studio express for web
Docked message app and visual studio express 2012 RC for web

visual studio express for web and docked apps
visual studio express for web and docked apps

windows 8 start screen
Windows 8 start screen

windows 8 Twitter app tweeTRO
Windows 8 Twitter app tweeTRO

Wednesday, August 15, 2012

Access Windows 8 with TeamViewer for Android

No comments:

Access Windows 8 RC with TeamViewer for Android:

Install TeamViewer in windows 8 Release Preview and Android, and just connect..

Monday, August 13, 2012

Remove Blog Title from Blog Posts

No comments:
Take Edit Html from Blog Setting..

Find: 
<title><data:blog.pageTitle/></title>

And replace it with: 
<b:if cond='data:blog.pageType == "index"'>
<title><data:blog.title/></title>
<b:else/>
<title><data:blog.pageName/></title>
</b:if>

Tuesday, August 7, 2012

Comparison between twitter and wireless

No comments:

IN:

Twitter:
  1. To Say something to all, just tweet
  2. To tell someone, just mention them in your tweet
  3. To send message privately, just direct message them
  4. To watch another group of people, just take that list
Wireless:
  1. To say something, just press button and say
  2. To tell someone just say their name and say your message
  3. To send message, just press someone’s wireless number and call
  4. To listen to another group, just change your channel in your wireless

Monday, June 4, 2012

Story of Appreciation

No comments:

As received:

This is a powerful message in our modern society.
We seem to have lost our bearing & our sense of appreciation.
**Story of Appreciation**


One young academically excellent person went to apply for a managerial position in a big company.

He passed the first interview, the director did the last interview, made the last decision.

The director discovered from the CV that the youth's academic achievements were excellent all the way, from the secondary school until the postgraduate research,
 never had a year when he did not score.
The director asked,
"Did you obtain any scholarships in school?"
the youth answered "none".
The director asked,
 " Was it your father who paid for your school fees?"
The youth answered,
"My father passed away when I was one year old, it was my mother who paid for my school fees.
The director asked,
 " Where did your mother work?"
The youth answered,
 "My mother worked as clothes cleaner.
The director requested the youth to show his hands.
The youth showed a pair of hands that were smooth and perfect.
The director asked,
 " Have you ever helped your mother wash the clothes before?"
The youth answered,
"Never, my mother always wanted me to study and read more books.
Furthermore, my mother can wash clothes faster than me.
The director said,
"I have a request. When you go back today, go and clean your mother's hands, and then see me tomorrow morning.*

The youth felt that his chance of landing the job was high. When he went back, he happily requested his mother to let him clean her hands. His mother felt strange, happy but with mixed feelings, she showed her hands to the kid.
The youth cleaned his mother's hands slowly. His tear fell as he did that. It was the first time he noticed that his mother's hands were so wrinkled, and there were so many bruises in her hands. Some bruises were so painful that his mother shivered when they were cleaned with water.
This was the first time the youth realized that it was this pair of hands that washed the clothes everyday to enable him to pay the school fee. The bruises in the mother's hands were the price that the mother had to pay for his graduation, academic excellence and his future.
After finishing the cleaning of his mother's hands, the youth quietly washed all the remaining clothes for his mother.
That night, mother and son talked for a very long time.
Next morning, the youth went to the director's office.
The Director noticed the tears in the youth's eyes, asked:
" Can you tell me what have you done and learned yesterday in your house?"
The youth answered,
 " I cleaned my mother's hand, and also finished cleaning all the remaining clothes'
The Director asked,
 " please tell me your feelings."
The youth said,

Number 1,
 I know now what is appreciation. Without my mother, there would not the successful me today.

Number 2,
 by working together and helping my mother, only I now realize how difficult and tough it is to get something done.

Number 3,
I have come to appreciate the importance and value of family relationship.

The director said,
" This is what I am looking for to be my manager. I want to recruit a person who can appreciate the help of others, a person who knows the sufferings of others to get things done, and a person who would not put money as his only goal in life. You are hired.

Later on, this young person worked very hard, and received the respect of his subordinates. Every employee worked diligently and as a team. The company's performance improved tremendously.

A child, who has been protected and habitually given whatever he wanted, would develop"entitlement mentality" and would always put himself first. He would be ignorant of his parent's efforts.

When he starts work, he assumes that every person must listen to him, and when he becomes a manager, he would never know the sufferings of his employees and would always blame others.

For this kind of people, who may be good academically, may be successful for a while, but eventually would not feel sense of achievement.

He will grumble and be full of hatred and fight for more. If we are this kind of protective parents, are we really showing love or are we destroying the kid instead?*You can let your kid live in a big house, give him a Driver & Car for going around, Eat a Good Meal, learn Piano, Watch a Big Screen TV. But when you are Cutting Grass, please let them experience it. After a Meal, let them Wash their Plates and Bowls together with their Brothers and Sisters. Tell them to Travel in Public Bus, It is not because you do not have Money for Car or to Hire a Maid, but it is because you want to Love them in a right way. You want them to understand, no matter how rich their parents are, one day their hair will Grow Grey, same as the Mother of that young person. The most important thing is your kid learns how to appreciate the effort and experience the difficulty and learns the ability to work with others to get things done. You would have forwarded many mails to many and many of them would have back mailed you too...but try and forward this story to as many as possible...this may change somebody's fate...

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?