Jun 28, 2011

How to make Firefox the default browser?

comments
If you have more then one browser like IE, FF, Safari or Chrome then windows or any other operating system needs to know which browser to use by default?

This article will show you the step how to set firefox as default browser.
From the menu bar select on Tools → Options and it will open following screen



Figure 1
As per above figure select advance option from options then go to General tab.

In the system defaults panel there is a button with captions Check Now Just click it and it will ask for the confirmation, click on OK button and you are done. You can see confirmation dialog box like Figure 2


Figure 2.
Note: MSN Messenger and other applications may open Internet Explorer regardless of which browser is the default. Also, Internet service providers like PeoplePC Online, Juno and NetZero may provide connection software that automatically launches Internet Explorer.


read more

Jun 7, 2011

Table and Stored Procedure helptext using Keyboard - SQL Server Keyboard Shortcut

comments

In the world of programming keyboard shortcuts are very useful for fast developing either in SQL server, DotNet or any programming language or any database.
In my project I always use SQL Server for backend and for editing or viewing SP or Database Table structure I used right click on Database object and then select either design as Figure 1 or modify as Figure 2 option. But it’s little bit lengthy procedure for getting a result.

Figure 1

Figure 2
So I was searching for shortcuts using that we can easily get the desire result and I found that.
How to do that for Table?
In my Sample Database there is one table Customer_Orders. Just  drag that table to query window or copy the name of table and paste it to query window. Then select it and just press Alt+F1 it’s default from Management Studio and it will show each and every details in result area like Figure 3.


 Figure 3

How to do that for Sps?
In my Sample Database there is one Sp getAllOrders. Just  drag that sp to query window or copy the name of sp and paste it to query window.  Append sp_helptext at the beginning of the sp name with space and select all and press F5 key and it will show the result in below pane.
Still it’s required 2 to 3 actions so set some default key for sp_helptext command using below steps.
Step 1 Go to Toolsà Options menu like Figure 4

Figure 4
In Figure 4 from left panel select keyboard option and from right side Ctrl+F1 has empty table cell. Add sp_helptext command there and press ok. Here you can set some keyboard shortcuts if you want like Ctrl+F2, Ctrl + F3 and more
Now open new query window drag sp name on query window and select it and press Ctrl+F1 and you can see result like Figure 5.

Figure 5


Figure 6
Above Figure 5 and Figure 6 both are same but still there is a little and important difference so let me take an opportunity to explain that difference. In Figure 5 the result is displaying in grid and in Figure 6 result is displaying as a plain text. If you check at the top then there is tooltip in yellow strip with text Results to Grid and Results to Text. Both options are at the top of the query window. If you see the result in grid view then you will loose the formation of the sp like indentation, spacing, beautify etc. But if you view result in plain text format then it will preserve all the format when you have created or modified sp.

read more

May 6, 2011

How to Exclude your Own Visits From Blogger Stats?

0 comments
When we are developing any blog or website then normally we want to watch the traffic on our site or blog. There are lots of traffic source tracker sites and tools are available on the net, but I found 2 more effective tools where we can check our traffic stat very easily. 1 is Google Analytic and second one is Blog Stat which is recently launched in blogger platform.

Blogger stats is excellent way to track world wide traffic on you blogger blog. It is now built in facility by http://blogger.com and very much similar to Google Analytic and it will be similar because both are from Google only.

Benefit of Blogger stat
Main benefit of blogger stat is you do not need to add any external code to track your traffic source like hitstat, google analytics, sitemeter etc.

In Google analytic is was easy to exclude your own visits but how to exclude your own visit from blogger stat?

So here the step by step guide to exclude your own visit from blogger stat.

First go to http://www.blogger.com and login there.

From dash board might you have more then 1 blog so find your blog where you want to exclude your stat and click on stat tab on that blog details like below figure 1


Figure 1

Now in overview section(tab) on stat tab there is page view details at right side like pageview today etc under that widget you can see don't track own visit link, see below figure 2


Figure 2

now once you click on that link don't track own visit it will open on small popup with 2 radio button.
Track my pageview and
Don't track my pageview

select second option don's track my page view and click on save button like below figure and you are done. Now blogger will exclude you own visit from traffic source details.



read more

May 5, 2011

How to Prevent or disable copy content of your blog/site

2 comments


If you want that visitor will not be able to copy your content from web page then it's easy using JavaScript.
It's not full proof way there are other alternate they can copy but it will not be easy way for them to copy content by just selecting required content, right click and click on copy.
Just add following JavaScript code to your blog templates and it will be secure that other user will not be able to copy content easily.
Just go to Blogger Dashboard.
Click on Design Tab –> then click on Page element.
Now you can see add a gadget link many places. Just click any one of them and select HTML and Javascript widget and paste following code to opened dialog box.


<script type="text/javascript">
    var donotconsidortag = ["input", "textarea", "select"]
    donotconsidortag = donotconsidortag.join("|")
    function unableToSelect(e) {
        if (donotconsidortag.indexOf(e.target.tagName.toLowerCase()) == -1)
            return false
    }
    function ableToSelect() {
        return true
    }
    if (typeof document.onselectstart != "undefined")
        document.onselectstart = new Function("return false")
    else {
        document.onmousedown = unableToSelect
        document.onmouseup = ableToSelect
    }
</script>

Then save the templates and check it. If it's working fine then you are done else you have made some mistake, to correct it repeat the process.

Enjoy the post. If you like my post then either left a comment or do subscribe my rss in you favourite rss feed reader to get latest update from me.

read more

May 1, 2011

Generating a random number in JavaScript

0 comments

Today I was working in a DayPilot project it was something like Google or outlook calender. In that project when I was creating or editing event, it was using java script popup. But it was showing old value rather than new or updated value when popup open. This was happening due to JavaScript because it was running from cache. 
How to fill new or updated value in control it was a big concern? So what I had done is just create one random number and append it at the end of URL so every time new http request will be different in browser and it will not run from cache.

So now how to generate a random number?

Lets begin by looking back. As discussed in this post to generate a random number in JavaScript, the code:

var randomnumber=Math.random();

Math.random(x) : 
                  This is the function which will return next random number between 0.0 to 0.999999 so this will generate decimal number every time. If we require integer number then we can convert it using either round or floor function.

Math.round(x)
                  The round() method rounds a number to the nearest integer.

Math.floor(x)
                   The floor() method rounds a number DOWNWARDS to the nearest integer, and returns the result.

So finally we can use it as like this


randomnumber = Math.floor(Math.random());
or

randomnumber = Math.round(Math.random());

it will return value between 0 to 9


read more

Apr 27, 2011

The New Google Analytics Available to Everyone

0 comments

The New Google Analytics Available to Everyone

Hey Google has recently launched the newer version of the Google Analytic to track the site or blog traffic.

I am very happy after seeing the newer version of Google Analytics and Google has announced that it is in beta stage and available to every user in all the languages.

New look of the Dashboard



How to check newer version of the Google Analytics

Sign in to your Google Analytic and see the link at top right of your account

Check below screen shot for more details.


New version of Google Analytic has some enhancements as below.
  • A redesigned Google Analytics platform to enable major new functionality
  • A streamlined interface to make it easier to get to the information you want
  • Improved report performance for faster reports
Currently, we are showcasing the following features in the new version of Analytics:
  • A completely redesigned, faster interface.
  • Multiple dashboards—build a custom dashboard for each department.
  • Event Goals! Track your PDF downloads as goals with events, or configure 2 minutes play time on a video as a goal.
  • More powerful custom reports—you can pre-filter reports and build additional data views.
  • New Term Cloud visualization.

Some features will be introduce in Google Analytic very soon as below

  • Exporting reports to PDF
  • Emailing reports
  • Migrating a custom report from the current Analytics version to the new version
  • Linking a new AdWords or AdSense account
  • In-Page Analytics
For more details please go to here

Some screen shot from new analytic







read more

Author Profile

Total Pageviews

Categories

Followers

 
Top Programming   Sites Technology Top Blogs Technology blogs Technology Blogs

Sponsors