Thursday, April 24, 2008

HTML Tips ....Links WithOut Underline....!!!

Create a style sheet like this first,

<style type="text/css">

<!--

.links { text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #000066}

-->

</style>

Now Use links as class for <a>

<a href="index.htm" class="links">Home</a>

Monday, April 21, 2008

PHP Tips On The Way.....

$_SERVER[--------];
Tips With SERVER....


To get host name

$hostname = $_SERVER['HTTP_HOST'];

To Get Remote Host Address

$remotehostadr = $_SERVER['REMOTE_ADDR'];



Saturday, April 19, 2008

PostGreSql Tips 2

PostGreSql Tips 2

USE OF FUNCTION EPOCH



SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-08');
Result: 982384720 --secoonds till 2001-02-16 20:38:40-08 from 1970-01-01 00:00:00-00

SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours');
Result: 442800 --seconds in interval 5 days 3 hours


Here is how you can convert an epoch value back to a time stamp:

SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 982384720 * INTERVAL '1 second';

Friday, April 18, 2008

An Open Letter To Malayalam Film Star Mamooty

An Open Letter To Malayalam Film Star Mamooty

Topic Is Here
http://fci.wikia.com/wiki/Open_Letter_To_Mammooty


PostGreSql Tips 1

DATE FUNCTIONS IN POSTGRESQL


day

The day (of the month) field (1 - 31)

SELECT EXTRACT(DAY FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 16

decade

The year field divided by 10

SELECT EXTRACT(DECADE FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 200

dow

The day of the week (0 - 6; Sunday is 0) (for timestamp values only)

SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 5

Note that extract's day of the week numbering is different from that of the to_char function.


doy

The day of the year (1 - 365/366) (for timestamp values only)

SELECT EXTRACT(DOY FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 47

Java Script Tips 1

Time Date Function In JavaScript

# Create new Date object. This is created thus:

var date_variable = new Date;

# From this object, extract the various elements of Date such as the Year, Month, Time, etc. using the methods defined in the Date class. The syntax for extraction:

var new_variable = date_variable.methodName();

The extracted value is stored in the variable new_variable. The various methods and their function are described below:

Method Name Function

getYear() Returns the year
getMonth() Returns the month(0-12)
getDay() Returns the day(0-7: where 0 refers to Sunday, 1 to Monday and so on)
getDate() Returns the date(0-31)
getHour() Returns the hour(0-24)
getMinutes() Returns the minutes(0-60)
getSeconds() Returns the seconds(0-60)