Tuesday, December 14, 2010

Modifying the FrontPage Date/Time Web Component


 

I thought this might be something useful in the future as I deal with MS Frontpage and Sharepoint designer at the moment.

http://blogs.msdn.com/b/lisawoll/archive/2004/12/17/323871.aspx

A good reference to look up to.

Wednesday, September 22, 2010

CSS Hover Effect

I find this article informative so I am linking the site to my blog so I won't forget:

http://veerle-v2.duoh.com/blog/comments/css_hover_effect/

Thursday, April 29, 2010

Tool for uploading Excel file in Coldfusion

This tool needs to be purchased before using it but this is really cool. For all CF enthusiasts who needs to upload from excel files, check this out.

What Is CFX_Excel2Query?

Transform a Microsoft Excel file into a ColdFusion query without installing Excel on your server! This tag is written in 100% java, so there is no need for the dreaded COM. This tag works best with simple Excel files, but many have had luck with extremely complex files.

Usage

<cfx_excel2query
file=
"[path_to_xls_file]"
firstRowIsHeader=
"[true|false]"
sheet_name=
"[worksheet_name]"
sheet_num=
"[worksheet_number]"
startRow=
"[starting_row]"
maxRows=
"[max_rows]"
longNames=
"[true|false]"
r_qResults=
"[query_variable_name]">


Attribute

Req'd

Description

file

Yes

full path the Microsoft Excel file

r_qResults

Yes

the variable in which to store the resulting query

firstRowIsHeader

No

specifies whether or not the first row of the Microsoft Excel file should be used for the column names in the query

sheet_name

No

specifies a specific worksheet name (case sensitive) to use from the Microsoft Excel file

sheet_num

No

specifies a worksheet by a number (zero-based; first sheet is zero, second sheet is 1, etc) - If sheet_num and sheet_name are both specified, sheet_num is used.

columnlist

No

the list of column names in their original order is returned to the variable you choose here (especially useful when firstRowIsHeader)

startRow

No

The row number, starting at 1, you would like to start from

maxRows

No

The total number of rows from startRow that you want to return

longNames

No

Use zero padding on column names (i.e. column001,column002,..,columnN)

Tuesday, April 13, 2010

How to get the first day of the week in SQL Server

CREATE FUNCTION [dbo].[udf_GetFirstDayOfWeek](
@pInputDate DATETIME
)
RETURNS DATETIME
BEGIN

SET @pInputDate = CONVERT(VARCHAR(10), @pInputDate, 111)
RETURN DATEADD(DD, 1 - DATEPART(DW, @pInputDate),
@pInputDate)

END
GO