isNaN(value) function
Well, isNan function determines whther a value is number or not.. if it is not a number, it returs true else it returns false...
eg: ISNAN("Hello") returns true
ISNAN(123) returns false
And in certain cases, javascript returns NAN in your textbox even though its a number,if you are pressing tab key.. if that is the case inorder to avoid it..just assign the next textbox value to 0 where it appears as NAN.
i.e. document.getelementbyid("idname").value =0;
This will do the trick...
Happy coding...
January 17, 2010
extract decimals from an integer
Here number is 1.35
decno=mynumber.substring(mynumber.indexOf('.'), mynumber.length);
Use the substring function to extract from the "." till the length of the number field, which gives you the result :
.35
Happy coding...
decno=mynumber.substring(mynumber.indexOf('.'), mynumber.length);
Use the substring function to extract from the "." till the length of the number field, which gives you the result :
.35
Happy coding...
January 5, 2010
Printscreens in Miscrosoft Note 2007
tips for taking perfect printscreens using microsoft note 2007
STEP1:
As img below

STEP2:
Click Window key with S -> Select area u want prntscreen
Img effects (use step 3: else go to step 4)
STEP3:
Img effects -> powerpoint 2007 -> slideshow -> ctrl+v ->format tab -> Select image ->Drop Shadow rectangle -> ctrl + c
Step4:
Open MSoffice -> ctrl+v
STEP1:
As img below
STEP2:
Click Window key with S -> Select area u want prntscreen
Img effects (use step 3: else go to step 4)
STEP3:
Img effects -> powerpoint 2007 -> slideshow -> ctrl+v ->format tab -> Select image ->Drop Shadow rectangle -> ctrl + c
Step4:
Open MSoffice -> ctrl+v
January 4, 2010
Alternate row colors in Crystal Reports
Coloring row fields for an IFIELD object in crystal report
coloring a particular field in crystal report... we must be thinking programatically coloring an IFIELD(database) object is pretty difficult thing to do... its very simple...
STEP 1:
Rght click the IFIELD object name EMPID -> clck format editor -> border -> background -> click on formula editor ->
if {DataTable1.EMPID} <> "" then
cryellow else
crnocolor
if employeeid is not a null field , it highlights the field with yellow, else it gives no color.
below is the example image
January 3, 2010
Extract date from datetime in sql
How do we extract date part from datetime in sql???
below is the query to do that....
select convert(varchar(10), '10/21/2009 23:15:0000',110)
it returns the resultset as:
10/21/2009
below is the query to do that....
select convert(varchar(10), '10/21/2009 23:15:0000',110)
it returns the resultset as:
10/21/2009
error to use a section registered as allowDefinition='MachineToApplication' beyond application level
Convert string dd/mm/yyyy to mm/dd/yyyy
Step1:
Declare an Array to store the datevalues from a string
Step2:
Assign it to the string declarations and append the string with "/"
And reuse the date anywhere in your file according to your need.
Dim sArr()
sArr = stringdate.Split("/")
Dim dd As String = sArr(0).ToString
Dim mm As String = sArr(1).ToString()
Dim yyyy As String = sArr(2).ToString().Substring(0, 4)
Dim sDate As String = mm + "/" + dd + "/" + yyyy
This code snippet is basically useful in situations where UK dateformat is to be used, other than US culture.And We can call this function whereever needed, just for display purpose or conversion purpose.
Happy Coding.
Declare an Array to store the datevalues from a string
Step2:
Assign it to the string declarations and append the string with "/"
And reuse the date anywhere in your file according to your need.
Dim sArr()
sArr = stringdate.Split("/")
Dim dd As String = sArr(0).ToString
Dim mm As String = sArr(1).ToString()
Dim yyyy As String = sArr(2).ToString().Substring(0, 4)
Dim sDate As String = mm + "/" + dd + "/" + yyyy
This code snippet is basically useful in situations where UK dateformat is to be used, other than US culture.And We can call this function whereever needed, just for display purpose or conversion purpose.
Happy Coding.