Dynamic calculator using Javascript

This is the example I will comment on it after some time









10203040

Result :

Read More!

Again Game of Color


Again Game of color.
Now I have discovered vary nice use of my yesterdays post "Game of Color"
One can change the blog color just by rolling mouse on color strip provied.

See this Just Roll over mouse on the strip bellow.

Read More!

Game of Colors


Hi all

This what a simple example what you can create some intresting User Interface using javascript and CSS.I have used all div tags and one line javascript function to create this color piano.

Please find source here.






Please Copy folowing javascript code in your page header or script area or .js file

function changeColor(obj)
{
if(obj){
document.getElementById('mainColor').style.backgroundColor =obj.style.backgroundColor;
}
}



Please copy this HTML code in your page body.





Note : This is vary important to know if you are developing a web application that "table" take more time than of "div" tag in any brouser. Read More!

Select last or any position record in sql select statement

Another intresting trick to select last or any position record using sql select stament.
select max(numberField) from TableName
where salary not in (select max(numberField) from TableName);

select *
from TableName testName
where 2 = (select count(*) from TableName b where a.salary <>

Read More!

Check case sensetive string in sql select statement

There is problem while checking case sensetive string in SQL select statement.
We can use a keyword "BINARY" in such case.

Syntax :

select *
from
tableName
where
fieldName = BINARY 'value'
OR

select fieldList
from
tableName
where
fieldName = BINARY 'value'

Where
fieldList : Comma saperated List of fields to select.
tableName : Name of table to select fields form.
fieldName : Field name of which we are checking string.
value : Value to cros check.

Eg :-
If we have a table as
Table Name : EmployeeMaster
Field List :
EmployeeName : varchar (50)
EmployeeCode : varchar (10)

Now we want to select Employees having name exactly 'JON' and case sensetive.

Then SQL select statement will be

select
EmployeeCode,EmployeeName
from
EmployeeMaster
where
EmployeeName = BINARY 'JON'

Note : I have checked this statement in MySql.There might be other way in other RDBMS. Read More!