Search This Blog

Monday, July 19, 2010

How to create Rounded border of a div?

Css is as follow :

-moz-border-radius : 10px;

How to prevent Back button in browser?

Write down below lines in script tag in your page.
        function noback() {
            window.history.forward();
        }
        noback();
        window.onload = noback;     
        window.onunload = function() { void (0); }



For example suppose you have one page "Signout.aspx", your write down this code in this page. This page signs out user from the site then redirects to your home page so from the home page user cannot come again to "Signout.aspx" page.

How can we calculate execution time of particular function?

  • Create DateTime dtStart = DateTime.Now;
  • Call the function you want to test.
  • After calling function write DateTime dtEnd = DateTime.Now;
  • Now create TimeSpan object to know the difference between starting time and ending time.
          TimeSpan ts = dtEnd - dtStart;


     Example:

     DateTime dtStart = DateTime.Now;
     functionName(params);
     DateTime dtEnd = DateTime.Now;
     TimeSpan ts = dtEnd - dtStart;

Saturday, July 17, 2010

How to get Event Arguments in code behind?

You can get Event arguments using below syntax :

string mystring = Request["__EVENTARGUMENT"]

New Browser : Epic Nation's First Browser Lunched By Indian for Indians

The first-ever browser of the country has been achieved by Hidden Reflex, a software and web application product startup based in Bangalore.

Epic Browser is a Internet web browser which is built on the Mozilla platform, Epic has certain striking features that make it a unique browser altogether. It's Looks like



Some of its unique features are:
  • An inbuilt anti-virus, powered by ESET, whose NOD 32 product is very  popular the world over.
  • India centric with support for 12 different Indian languages including  Hindi, Gujarati, Marathi, Kannada, Telugu, Bengali, Tamil, Malayalam, Urdu and Punjabi.
  • Indic app allows for typing in these Indian languages.
  • More than 1500 themes ranging from freedom fighters to film stars to represent the unity in diversity of the country.
  • A word processor to create or edit documents.
  • India specific news from popular publications.
  • Social Networking sites like Facebook and Twitter on the sidebar,  apart from YouTube( watchable in a pop-up window), Gmail and Yahoo and live cricket score.
  • Other useful sidebar widgets include Travel, Stocks, Maps, and Jobs.
  • File backup and My Computer utilities.
  • Can add your To Do's and set Timers.

Friday, July 16, 2010

How to AddTo/CopyTo folder on rightclick of folder in Windows Xp/Vista/7?

When you want to move a file but don’t have the other folder open already. You have to open it then copy your this folder. But now no worries when other folder is not open.


Only add registry in your pc and you will get option of Copy To and Move To on right click of the folder.


Download it from below link : 

http://greenhackers.blogspot.com/2010/05/add-copy-tomove-to-on-win-7vistaxp.html#more

Opacity doesnt work in ie?

Opacity attribute does not work in internet explorer?

There is a alternate for it.

Filter : alpha(opacity = 80);

While for firefox its works as opacity = 80.

Thursday, July 15, 2010

How to break the space separated values in SQL Server?

Declare @vTable Table(id int,val varchar(100))
 
Insert into @vTable Values (1,'Jeni Jeni1 Jeni123')
Insert into @vTable Values (2,'Jeni1 Jeni2 jeni3')
 
Now if you want to break the space separated values in the above table as;

ID Val
1 Jeni
1 Jeni1
1 Jeni123
2 Jeni1
2 Jeni2
2 Jeni3

Run following query in Sqlserver and get result.

Declare @vTable Table(id int,val varchar(100))
 
Insert into @vTable Values (1,'Jeni Jeni1 Jeni123')
Insert into @vTable Values (2,'Jeni1 Jeni2 jeni3')


;with wcte (id,val,strpos) as

(
Select id,substring(val,0,case when charindex(' ',val,0) = 0 then Len(val) else charindex(' ',val,0) + 1 end) as val
,charindex(' ',val,0) + 1 strpos from @vTable
Union all
Select b.id,substring(b.val,strpos,case when charindex(' ',b.val,strpos) = 0 then Len(b.val) else charindex(' ',b.val,strpos) - strpos end) as val
,charindex(' ',b.val,strpos) + 1 strpos
from @vTable b
Inner Join wcte on wcte.id = b.ID
and wcte.strpos <> 1
)Select id,Val from wcte order by id

 
  

Firefox 3.6 Features

Awesome Bar

 A quick way to get to the sites you love—even the ones with addresses you only vaguely remember. Type in term into location bar and the autocomplete function includes possible matching sites from your browsing history, as well as sites you’ve bookmarked and tagged in a drop down.

For example, you could enter the tag: “investments” to find “www.fool.com”. The Awesome Bar learns as you use it—over time, it adapts to your preferences and offers better fitting matches. Since its initial release in Firefox 3.0 we’ve tweaked it to give you greater control over the results (including privacy settings) and increased performance so you find what you need even faster.

Tags

For example, you can label the site http://timesofindia.indiatimes.com/ with the “news” tag as well as the “foreign investments” tag, plus give www.nytimes.com the “news” tag, too. When you enter “news” into the location bar, both sites will be shown as results. A single site can have multiple tags, and there’s no limit to the number of tags you can create. You may not remember the exact name of a site, but with a tag, you’ll be able to find it in a way that makes sense to you.

One-Click Bookmarking screenshot

One-Click Bookmarking

Manage your bookmarks a lot or a little. One click on the star icon at the end of the location bar bookmarks a site. Two clicks and you can choose where to save it and whether to tag it. File bookmarked sites in easy-to-access folders and organize according to theme (like “job search” or “favorite shopping”). Find your bookmarked sites in a flash by entering the tag, page or bookmark name into the location bar. The more you use your tags and bookmark names in the location bar, the more the system will adapt to your preferences.
Smart Bookmarks screenshot

Download Manager

A pause and resume feature means there’s no need to wait for a download to finish before you disconnect. So, if you’re halfway through the latest White Stripes album and it’s time to catch the bus, just pause and pick up downloading when you get home. The resume function also works if your system crashes or is forced to restart. The manager shows your download progress and lets you search your files by name or the Web address where the download came from.

Spell Checking

A built-in spell checker lets you enter text directly into Web pages—like blog posts and Web-based email—without worrying about typos and misspellings. Work directly with the Web and save yourself a step.
Spell Checking screenshot

Session Restore

Restart the browser without losing your place after you install an add-on or software update. And, if Firefox or your computer unexpectedly closes, you don’t have to spend time recovering data or retracing your steps through the Web. If you’re in the middle of typing an email, you’ll pick up where you left off, even down to the last word you typed. Session Restore instantly brings back your windows and tabs, restoring text you entered and any in-progress downloads, and we’ve updated it to make sure you get back to what you were doing even more quickly than before.

Full Zoom

Visit your favorite shopping site page and read the caption under the picture—or view the picture itself in a size you can see. An elegant new zoom feature lets you swoop in and see entire web pages. They scale in the way you’d expect them to, with all the elements of a page’s layout expanding equally, so you can zero in on what matters.

Smart Keywords

Search the Web in record time with smart keywords. With a few clicks you can assign keywords to search engines, and then simply enter your key and search words in the location bar. With this feature, typing “book home building” can search Amazon.com, and take you right to books about home building without ever pausing at the homepage.

Improved Text Rendering

Read your language as it’s written—more like real life. With a new graphics engine, Arabic, Persian, Punjabi and other script languages now render in a remarkably seamless way.

Downloadable Fonts

View a wider variety of fonts on Web sites while you surf. Site designers and developers can create custom fonts that will be displayed and rendered properly even if you don’t have the font installed on your computer.



Tuesday, July 6, 2010

Difference between Undefined value and null value.

Undefined states that variable has been declared but not defined yet i.e. not assigned a value yet.

while null is an assignment value. where variable has no value it assigns null to that variable
null is an assignment value. It can be assigned to a variable as a representation of no value.

undefined is a type itself (undefined) while null is an object.
Unassigned variables are initialized by JavaScript with a default value of undefined.
JavaScript never sets a value to null. That must be done programmatically.

How to remove projects in Visual Studio Project list?

Follow  the steps :

1 ) Go to Run.
2) Write regedit.
3) Click to HKEY_CURRENT_USER
4) After click on looking for this path - Software > Microsoft > Visual Studio > 9.0 > ProjectMRUList.
    It shows you all projects shown in visual studio startup screen.
5) Remove Projects which you want.
  

How to search text of Triggers, Store Procedures and Functions?

Run the follow query in SqlServer and get result.

DECLARE @SEARCHSTRING VARCHAR(255)

SELECT @SEARCHSTRING = 'CREATE'

SELECT DISTINCT sysobjects.name AS [Object Name] ,
case when sysobjects.xtype = 'P' then 'Stored Proc'
when sysobjects.xtype = 'TF' then 'Function'
when sysobjects.xtype = 'TR' then 'Trigger'
end as [Object Type]
FROM sysobjects,syscomments
WHERE
sysobjects.id = syscomments.id AND
sysobjects.type in ('P','TF','TR')AND
sysobjects.category = 0
AND CHARINDEX(@SEARCHSTRING,syscomments.text)>0

You can get all textes of store procedures, functions and triggers from the follow query.

SELECT  *  FROM  syscomments

How to find all trigger name in SQL Server

Run the follow Select query to find all triggers in SqlServer and get result.

SELECT T2.[name] TableName, T1.[name] TriggerName,
CASE
WHEN T2.deltrig = T1.id THEN 'Delete'
WHEN T2.instrig = T1.id THEN 'Insert'
WHEN T2.updtrig = T1.id THEN 'Update'
END 'TriggerType'
FROM sysobjects T1 JOIN sysobjects T2
ON T1.parent_obj = T2.[id]
WHERE T1.xtype='TR'
GO