Saturday, September 29, 2007

Return random rows using Sql query

Return random rows using Sql query

SELECT TOP 5 * FROM album ORDER BY NEWID()

Reloading A Page in javascript

Reloading A Page in javascript

location.reload();
reloading by preventing caching:location.search = "?" + Math.random();

Redirecting a browser using javascript

Redirecting a browser using javascript


location.href = "newPage.html";

OR

<meta http-equiv="Refresh" content="X; URL=Y" />


OR

location.replace("newPage.html"); (This refreshes browser history)

prevent caching in javascript

prevent caching in javascript


document.write("<img src=\"yourimage.gif?" + Math.random() + "\" />");

Here Math.random() is the key here since its always different per load and enforces a different version!!.

Math.random() returns a random number between 0 and 1 (Eg:0.something..)

Get Browser Type using Javascript

Get Browser Type using Javascript

<script language="JavaScript"
type="text/javascript">

function getBrowserType() {
var bo = navigator.userAgent;
var browserType = "unknown";
if (bo.indexOf("Opera") > -1) {
browserType = "Opera";
} else if (bo.indexOf("Safari") > -1) {
browserType = "Safari";
} else if (bo.indexOf("Konqueror") > -1) {
browserType = "Konqueror";
} else if (bo.indexOf("Gecko") > -1) {
browserType = "Mozilla";
} else if (bo.indexOf("MSIE") > -1) {
browserType = "Internet Explorer";
}
//window.alert(browserType);
return browserType;
}
</script>


To get version no you may use the following (but have to exact version no):
window.alert(navigator.userAgent);


Result might look like:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en;
rv:1.8.0.3) Gecko/20060426 Firefox 1.5.0.3
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.4) Gecko/20030619 Netscape/7.1 (ax)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
.NET CLR 2.0.50727)
Mozilla/5.0 (compatible; Konqueror/3.4; FreeBSD)
KHTML/3.4.2 (like Gecko)
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en)
AppleWebKit/418 (KHTML, like Gecko)
Safari/417.9.3
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en)
AppleWebKit/312.8 (KHTML, like Gecko)
Safari/312.6
Opera/9.00 (Windows NT 5.1; U; en)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
en) Opera 9.00



Currently the following type of browser are available:

Internet Explorer
Mozilla Browsers
Konqueror (KDE)
Apple Safari
Opera Browser

Cache dataset in asp.net

Cache dataset in asp.net
===================


use the namespace : System.Web.Caching.Cache

Add dataset to cache :
Cache.Insert("yourDataSet",ds,null,DateTime.Now.AddSeconds(15),System.TimeSpan.Zero);

Remove dataset from cache:
Cache.Remove("yourDataSet");

load dataset from cache:

if(Cache["CustomersDataSet"] != null) {
ds = (DataSet)Cache["yourDataSet"];
}
else {
//logic to insert dataset to cache (i.e. load dataset and put it into cache)
}

Saturday, September 22, 2007

ASP.NET 2 life cycle listing

Application: BeginRequest
Application: PreAuthenticateRequest
Application: AuthenticateRequest
Application: PostAuthenticateRequest
Application: PreAuthorizeRequest
Application: AuthorizeRequest
Application: PostAuthorizeRequest
Application: PreResolveRequestCache
Application: ResolveRequestCache
Application: PostResolveRequestCache
Application: PreMapRequestHandler
Page: Construct
Application: PostMapRequestHandler
Application: PreAcquireRequestState
Application: AcquireRequestState
Application: PostAcquireRequestState
Application: PreRequestHandlerExecute
Page: AddParsedSubObject
Page: CreateControlCollection
Page: AddedControl
Page: AddParsedSubObject
Page: AddedControl
Page: ResolveAdapter
Page: DeterminePostBackMode
Page: PreInit
Control: ResolveAdapter
Control: Init
Control: TrackViewState
Page: Init
Page: TrackViewState
Page: InitComplete
Page: LoadPageStateFromPersistenceMedium
Control: LoadViewState
Page: EnsureChildControls
Page: CreateChildControls
Page: PreLoad
Page: Load
Control: DataBind
Control: Load
Page: EnsureChildControls
Page: LoadComplete
Page: EnsureChildControls
Page: PreRender
Control: EnsureChildControls
Control: PreRender
Page: PreRenderComplete
Page: SaveViewState
Control: SaveViewState
Page: SaveViewState
Control: SaveViewState
Page: SavePageStateToPersistenceMedium
Page: SaveStateComplete
Page: CreateHtmlTextWriter
Page: RenderControl
Page: Render
Page: RenderChildren
Control: RenderControl
Page: VerifyRenderingInServerForm
Page: CreateHtmlTextWriter
Control: Unload
Control: Dispose
Page: Unload
Page: Dispose
Application: PostRequestHandlerExecute
Application: PreReleaseRequestState
Application: ReleaseRequestState
Application: PostReleaseRequestState
Application: PreUpdateRequestCache
Application: UpdateRequestCache
Application: PostUpdateRequestCache
Application: EndRequest
Application: PreSendRequestHeaders
Application: PreSendRequestContent

Saturday, September 1, 2007

Reinstall IIS using command (for coders)

Reinstall IIS using command (for coders)

D:\WXPOS\Microsoft.net\Framework\v2.0.50727> aspnet_regiis -i
>
iisreset

use aspnet_regiis /? for help

tic tac toe (tic-tac-toe) in C

tic tac toe in C
============


#include <stdio.h>
#include <graphics.h>
#include <stdlib.h>
#include <conio.h>


int rowcol[9]={1,2,3,4,5,6,7,8,9};

void main(){

int gdriver,gmode,errorcode;
int is;
int i,temp;
int bool;
char ch[2];
bool=0;
gdriver=EGA;
gmode=EGAHI;
/*initialize the graphics driver*/
initgraph(&gdriver,&gmode,"");
/* error handling for graphics driver */
errorcode = graphresult();
if ( errorcode != grOk ) {
printf("Graphics Error \n %s",grapherrormsg(errorcode));
printf("\n Press any key to halt:");
getch();
exit(1);
}

setbkcolor(11);
setcolor(1);
settextstyle(0,0,2);
outtextxy(40,40,"WELCOME TO THE GAME OF SUNCHOKRI");
/*
for(is=1000;is>500;is--){
sound(is);
delay(250);
}
nosound();
*/

setcolor(12);

outtextxy(150,120,"BY ----");
/* preloader logic in c programming */
setcolor(1);
i=0;
while(i!=600){
preloader(i);
delay(300);
i++;
}


sleep(2);
cleardevice();
mainscreen();
positionofx();
chanceofplayer(bool);

/*if q is pressed quit the game */
while((*ch=getch())!='q') {
/*if n is pressed new game*/
if(*ch=='n'){
for(is=0;is<9;is++){
rowcol[is]=is+1;
}
bool=0;
cleardevice();
mainscreen();
positionofx();
chanceofplayer(bool);
}

temp=atoi(ch) ;
if (temp==0){
}
else {

if (rowcol[temp-1]==11 rowcol[temp-1]==22){
}
else {
if(bool==0){
rowcol[temp-1]=11;
}
else
{
rowcol[temp-1]=22;
}
cleardevice();
mainscreen();
positionofx();
if(bool==0){
bool=1;
}
else
{
bool=0;
}
chanceofplayer(bool);
}
}
}
/*
getch(); */

/*closing or deallocating graphic driver*/
closegraph();
}

/*main background screen*/
mainscreen() {
setbkcolor(12);
rectangle(10,10,620,250);
setcolor(14);
settextstyle(0,0,4);
outtextxy(35,300,"S U N C H O K R I");
setcolor(9);
settextstyle(0,0,2);
outtextxy(105,220,"Player 1 :11 Player 2 :22");
setcolor(15);
settextstyle(0,0,1);
outtextxy(0,0,"Author: ----SG");
/* small rectagle for sunchokri.. */
setcolor(WHITE);
rectangle(20,20,300,200);
rectangle(50,50,90,80);
rectangle(100,50,140,80);
rectangle(150,50,190,80);

rectangle(50,120,90,90);
rectangle(100,120,140,90);
rectangle(150,120,190,90);

rectangle(50,160,90,130);
rectangle(100,160,140,130);
rectangle(150,160,190,130);


outtextxy(399,60,"q TO QUIT GAME");
outtextxy(399,80,"n FOR NEW GAME");
}

/* logic of various functions in c */
preloader(int i) {
outtextxy(i,300,"");
}

positionofx(){
char x[10];
setcolor(YELLOW);

itoa(rowcol[8],x,10);
/*last row */
outtextxy(165,140,x);
itoa(rowcol[7],x,10);
outtextxy(115,140,x);
itoa(rowcol[6],x,10);
outtextxy(65,140,x);

/*second last row */
itoa(rowcol[5],x,10);
outtextxy(165,100,x);
itoa(rowcol[4],x,10);
outtextxy(115,100,x);
itoa(rowcol[3],x,10);
outtextxy(65,100,x);

/*first row */
itoa(rowcol[2],x,10);
outtextxy(165,60,x);
itoa(rowcol[1],x,10);
outtextxy(115,60,x);
itoa(rowcol[0],x,10);
outtextxy(65,60,x);
}

chanceofplayer(int bool1 ) {
char s[1];
if(bool1==0){
bool1=1; }
else
{
bool1=2; }

itoa(bool1,s,10);
setcolor(4);
outtextxy(33,33,"Turn of player : ");
outtextxy(173,33,s);

/* logic for winning the game */
if((rowcol[0]==11 && rowcol[1]==11 && rowcol[2]==11)(rowcol[3]==11 && rowcol[4]==11 && rowcol[5]==11)(rowcol[6]==11&&rowcol[7]==11&&rowcol[8]==11)(rowcol[0]==11&&rowcol[4]==11&&rowcol[8]==11)(rowcol[2]==11&&rowcol[4]==11&&rowcol[6]==11)){
outtextxy(399,100, "1 WINS");
sound(350);
delay(2000);
nosound();
}
else if((rowcol[0]==22&&rowcol[1]==22&&rowcol[2]==22)(rowcol[3]==22&&rowcol[4]==22&&rowcol[5]==22)(rowcol[6]==22&&rowcol[7]==22&&rowcol[8]==22)(rowcol[0]==22&&rowcol[4]==22&&rowcol[8]==22)(rowcol[2]==22&&rowcol[4]==22&&rowcol[6]==22)){
outtextxy(399,100, "2 WINS");
sound(350);
delay(2000);
nosound();
}
else if((rowcol[0]==22&&rowcol[3]==22&&rowcol[6]==22)(rowcol[1]==22&&rowcol[4]==22&&rowcol[7]==22)(rowcol[2]==22&&rowcol[5]==22&&rowcol[8]==22)){
outtextxy(399,100, "2 WINS");
sound(350);
delay(2000);
nosound();
}
else if((rowcol[0]==11&&rowcol[3]==11&&rowcol[6]==11)(rowcol[1]==11&&rowcol[4]==11&&rowcol[7]==11)(rowcol[2]==11&&rowcol[5]==11&&rowcol[8]==11)){
outtextxy(399,100, "1 WINS");
sound(350);
delay(2000);
nosound();
}
else{
outtextxy(399,100,"NO RESULT");
}
}

shared files program in C

shared files program in C

/* shared file example 1 */


#include <fcntl.h>
#include <stdio.h>


main()
{
int fp;
char buff[20];
fp=open("testfile",O_RDONLY);
if(fork()==0)
{
read(fp,buff,10);
buff[10]=0;
puts(buff);
}

else
{
wait(0);
read(fp,buff,10);
buff[10]=0;
puts(buff);
}

}

/*shared file example 2 */

#include <fcntl.h>
#include <stdio.h>


main()
{
FILE *fp;
char buff[20];
fp=fopen("testfile","r");
if(fork()==0)
{
fgets(buff,10,fp);
buff[10]=0;
puts(buff);
}

else
{
wait(0);
fgets(buff,10,fp);
buff[10]=0;
puts(buff);

}

}

/*lock file */


#include <fcntl.h>
#include <stdio.h>


main()
{
int fd;
fd=open("Lockset",O_RDWR);
lockf(fd,F_LOCK,0);
printf("Process %d locked the file \n",getpid());
if(fork()==0)
{
lockf(fd,F_LOCK,0);
printf("Process %d locked the file \n",getpid());
printf("Child Process is over\n");
}

else
{
sleep(5);
printf("Process %d is over\n",getpid());

}

}

semaphore program in C

Semaphore program in C

/* basic semaphore example 1 */

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <stdio.h>


main()
{
int sid;
int key,nsem;
key=(key_t)0x30;
nsem=1;
sid=semget(key,nsem,IPC_CREAT0777);
printf("\nSemaphore was created with the id = %d\n",sid);

}

/* basic semaphore example 2*/

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <stdio.h>


main()
{
int sid;
int key,nsem;
key=(key_t)0x30;
nsem=1;
sid=semget(key,nsem,IPC_CREAT0666);
printf("\nSemaphore was created with the id = %d\n",sid);
sleep(15);
semctl(sid,0,IPC_RMID,0);
}


/* readers */

#include <sys/types.h>
#include <sys/sem.h>
#include <sys/ipc.h>
#include <stdio.h>


void sem_wait (int);
void sem_signal(int);


main(){
int rdcnt,wrt,mutex;
key_t rdkey=0x20;
key_t wrkey=0x30 ;

rdcnt = semget(rdkey,1,0666IPC_CREAT);
wrt = semget(wrkey,1,0666IPC_CREAT);
mutex = semget(0x40 ,1,0666IPC_CREAT);

semctl(mutex,0,SETVAL,1);
printf("\nStarting to Read.....");
sem_wait(mutex);
sem_signal(rdcnt);
sleep(10);
printf("\nReading Finished");
sem_wait(rdcnt);
sem_signal(mutex);

}


void sem_wait(int id){
struct sembuf buf = { 0,-1,0};
semop(id,&buf,1);
}

void sem_signal(int id){
struct sembuf buf = { 0,1,0};
semop(id,&buf,1);


}

screen saver in C random circles lines - c program

screen saver in C random circles lines - c program

#include <stdio.h>
#include <graphics.h>
#include <stdlib.h>
#include <conio.h>


char ch;
/****************************************/
/* for line */
int lrandx, lrandy, lrandxx, lrandyy;
/* for rectangle */
int rrandx, rrandy, rrandxx, rrandyy;
/* for circle*/
int crandx, crandy, cradius;
/* random colour and shape generation */
int shape;
int col;

int gdriver,gmode,errorcode;
/*****************************************/
void main(){
gdriver=EGA;
gmode=EGAHI;
/*initialize the graphics driver*/
initgraph(&gdriver,&gmode,"");
/* error handling for graphics driver */
errorcode = graphresult();
if (errorcode != grOk ) {
printf("Graphics Error \n %s",grapherrormsg(errorcode));
printf("\n Press any key to halt:");
getch();
exit(1);
}
/* setting initiation of text and background color */
initialscreen();
while (!kbhit()) /* do nothing */ {
sleep(0.5);
mainscreen();
/*
outtextxy(133,44,"Sss");
*/
}
/*closing or deallocating graphic driver*/
closegraph();
}


/*main background screen*/
mainscreen() {
shape=rand()%3;
col=rand() % 14;
if (shape==0) {
rrandx=rand() % 600;
rrandy=rand() % 600;
rrandxx=rand() % 800;
rrandyy=rand() % 800;
setcolor(col);
rectangle(rrandx, rrandy, rrandxx, rrandyy);
}
else if (shape==1) {
lrandx=rand() % 200;
lrandy=rand() % 200;
lrandxx=rand() % 200;
lrandyy=rand() % 200;
setcolor(col);
line(lrandx, lrandy, lrandxx, lrandyy);
}
else {
crandx=rand() % 600;
crandy=rand() % 600;
cradius=rand() % 100;
setcolor(col);
circle(crandx, crandy, cradius);
}
return 0;
}

initialscreen() {
setbkcolor(4);
setcolor(1);
settextstyle(0,0,2);
outtextxy(40,40,"SCREEN SAVER...");
setcolor(11);
outtextxy(150,120,"---- computer bapu");
sleep(2);
cleardevice();
return 0;
}

character generation in C - program

Character generation in C - program

#include <graphics.h>
#include <conio.h>
#include <math.h>
void generatecharback();
void generatechar(char);
void main()
{
int gdriver, gmode;

gdriver=DETECT;
gmode=EGAHI;
initgraph(&gdriver,&gmode,"");
setbkcolor(4);
generatecharback();
generatechar('B');
outtextxy(203, 200, "char generation");
getch();
closegraph();
}

void generatecharback(){
int i=0;
int j=0;
for(i=0;i<=7;i++){
for(j=0;j<=7;j++){
putpixel(i+100,j+100,8);
}
}
}
void generatechar() {
int charray[1][65]={{1,1,1,1,1,1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0}};
int i,j,k;
k=0;
for(i=0;i<=7;i++){
for(j=0;j<=7;j++){
if(charray[0][k]==1){
putpixel(j+100,i+100,WHITE);
}
k++;
}
}
}

forking i.e examples in C (fork program)

forking i.e example in C (fork program)
===============================


/*forking example 1 */
#include<sys/types.h>
main()
{
int i;
int j;
fork();

printf("\n%d\n",getpid());
printf("\n%d\n",getppid());
getchar();

}

/*forking example 2 */
main()
{
int i=fork();
if(i==0)
{
printf("I'm the child.My PID is %d\n",getpid());
printf("And my parent's PID is %d\n",getppid());
}
else
{
printf("I'm the Parent.My PID is %d\n",getpid());
printf("And my parent's PID is %d\n",getppid());
wait();
}
exit(0);
}


/*forking example 3 */

main()
{
int i=fork();
if(i==0)
{
printf("I'm the child.My PID is %d\n",getpid());
printf("And my parent's PID is %d\n",getppid());

sleep(5);

printf("I'm the child.My PID is %d\n",getpid());
printf("And my parent's PID is %d\n",getppid());
}
else
{
sleep(2);
printf("I'm the Parent.My PID is %d\n",getpid());
printf("And my parent's PID is %d\n",getppid());
}
}

/*forking example 4 */

#include<sys/types.h>
main()
{
int j;
int pid=fork();
if(pid==0)
for(j=0;j<30000;j++)
printf("\n%10d\tChild",j);

else
for(j=0;j<30000;j++)
printf("\n%10d\tParent",j);
}


/*forking example 5*/

#include<sys/types.h>
main()
{
int j;
if(fork()==0)
{
printf("\nFirst Child Executing");
for(j=0;j<10000;j++)
;
printf("\nFirst Child is dying now\n" );
}
else
{
if(fork()==0)
{
printf("Second Child Executing");
for(j=0;j<10000;j++)
;
printf("\nSecond Child is dying now\n" );
}
else
{

printf("\nI'm the BOSS here\n");
printf("\nThe first child to die is %d\n",wait(0));

for(j=0;j<10000;j++)
;
printf("\nThe Second child to die is %d\n",wait(0));

printf("But nothing is in my hand!\n");
}

}

}

/*forking example 6*/

main()
{
int pid;
int i=10;
pid=fork();
if(pid==0)
{
printf("\nThe value of I in child is \t%d\n",i);
i+=10;
printf("\nThe (inc)value of I in child is \t%d\n",i);

}

else
{
wait(0);
printf("\nThe value of I in parent is \t%d\n",i);
}
}

/*forking example 7*/

main()
{
int i=10;
if(fork()==0)
printf("\nThe address of i in child is %X \n",&i);
else
printf("\nThe address of i in parent is %X \n",&i);

}


/*forking example 8*/

#include<sys/types.h>
main()
{
if(fork()>0)
{
printf("I'm the parent\n");
sleep(10);
}


}


Do's and Don't in Web Design

Do's and Don't in Web Design
=======================


Technology Related
================


Do try to make the site using only divs and css (Don't use table tags atall!!)
Do try to use AJAX whereever applicable
Do follow Web 2 style!! (big and clear navigation..)
Do try to use a small image and use it as a background of a div/page .. i.e ... use repeat property so that the image may fill a large div and this will load very fast (Eg: 2 x 10 size image for gradient effect)
Do test your application in 3 browser before deploying (Firefox, Internet Explorer 6 and Internet Explorer 7 ---- If a site looks ok in firefox its most likely that it would run everywhere else)
Do use web design tools like macromedia dreamweaver.
Do try to place images and media files in folders and subfolders
Do avoid use of activex components
Do use flash swf file supporting version 6.0. (flash 6.0. is more common word wide) although the latest versions are rapidly gaining popularity.
Don't overuse ajax
Don't use animation too much..only use animation wherever relevant
Do try to use multiple themes, which can be selected by the user (red,blue,back,green...check msn site)
Do try to use the new generation technique of using xml, xslt (for advance users) including templating and skinning (is more applicable for very large sites which is partly static and dynamic [Is currently used in various cms packages])
Do use cross-platform javascripts/dhtml for varous purposes (Eg: validation, calling background sound, animation, cookie setting etc)
Do try to use preloaders if the site is heavy!!..
Do avoid popups!!..


General
=======
Do close popup screens
Do stop sounds
Don't try to mislead seach engines
Don't try to misleadingly attract visitors
Do register your site
Do read the stats
Don't count hits (may be a refresh..)
Do put contact info on your pages (clearly!!!)
Do try to use robots (robot.txt is used by search engines to get a list of all the directories/files you want search engine to index)
Do Try to use domain to come popular (In subdomains there are lots of restrictions)

Content
=======
Do know your audience
(Whenever you make a site target some set of people Eg: religion, programming etc)
Do provide topics
(divide a particular page into topics Eg: introduction, explaination etc..)
Do briefly describe your things
Do use correct spelling
Don't use meaningless words
Don't use jargon
(words used by particular groups but hard to understand by many)
Don't write technical
Do use important text on your main page
Do present the issues right away (good representation of data here)
Do use a descriptive title (very important for search engines)
Do use small pages (avoid long scrollers..)
Don't split topics (don't divide a topic into 100 sub topics..)
Do use implicit text for your links
(Try to write your text in such a way that a link is a natural part of
the sentence.)
Do comment on your links
Do update your pages
Do show date of update
Do ask for feedback
Don't show any page under construction (try to be complete and then publish)

Navigation
==========

Do use explicit addressing (try to specify up, down, left right, previous etc kink of links)
Do check your links (use a tool to check it for u..)
Don't change links (link renaming a file since it might be indexed by the search engine or may be a link at other site)
Do always supply textual links
Do suply a link to home
Do use navigational aids at the top and the bottom
Do use a table of contents
Do create a “what's new” page
Do use short routes
Do keep menu items related
Don't link to irrelevant pages
Don't repeat links too often
Don't use ambivalent navigation (it should not be a spagattei/noodles kind of links!!)
Don't create dead end pages (page without a link)
Don't frame other sites (don't load other site within a frame..the site won't go with the look and feel)


Design
=====

Do use a consistent look and feel
Do use recurring visual element
Don't use dark backgrounds
Don't cram your pages
Don't push your table out of the screen
Don't overuse frames
Do vertical align the content of table cells
Don't mix horizontal aligning


Bandwidth
=========

Do use few colors in your GIF's
Do use high compression in JPEG
Do reserve space for images
Do provide thumbnails for large images
Do reuse images
Don't reference images from other sites
Do provide size informationo
Don't use large textual images
Don't use wordprocessors


Presenting Text
===============

Don't use blink (old days..)
Don't use columns for text
Don't use small serif letters
Don't use all capitals
Don't overuse bold text
Don't overuse italics
Don't use small fonts
Don't use too many fonts
Do use punctuation
Don't hide your links
Do use all lowercase or all uppercase links
Do separate adjacent textual links
Do limit the size of predefined text
Do limit the width of text
Do use textual dates
Do provide a visual email address


Images and colors
=================

Do use transparency
Do use interlacing
Don't use too many images
Do make your graphics reproducible
Do break up images
Do combine backgroundimages and background-colours
Do use a browser safe palette
Don't use too many colors
Don't override only one standard colour

Compatibility
===============
Do supply alt's for your images
Do use alt text for areas
Do use alt text for areas
Do use NOFRAMES
Do use comments for javascript
don't be selective with browsers
Do test Java applets with all browsers
Do test with fewer screen colors
Do test with lowres
Do validate
Don't rely on plugins
Do check for browser version
Do warn for important cookies
Do offer alternative views



-taken from various resources plus my additions..