Posts filed under 'Programming'

Convert Microsoft Word Characters

I’ve written a JavaScript function a while ago that converts Microsoft Word Characters (crap) to valid HTML characters. Till today I didn’t realize how valuable the function is, it could probably do with some expansion on what it converts so any help to improve is much appreciated.

Continue Reading 1 comment March 31, 2009

Why use JavaScript Form Field Validation?

You can be sure that any user that completes a form will make some data entry mistake, mistakes you want to catch before submitting the data to the database server or other mechanism.

Continue Reading Add comment March 30, 2009

JavaScript Form Validation Framework

We’ve just made a JavaScript Form Validation Framework freely available for download.

Continue Reading Add comment March 26, 2009

MS SQL Date Time to Epoch

I know it’s been a while for you programmers out there, but here is an MS SQL function that converts Date Time to Epoch.

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER FUNCTION [dbo].[fn_dateTimeToEpoch] (
 @dateTime DATETIME
)
RETURNS BIGINT
AS
BEGIN

 DECLARE @epochDay BIGINT
 DECLARE @epochSecond INT

 – epoch ‘01-01-1900 00:00:00′
 – one day 86400 seconds

 SET @epochDay = DATEDIFF( day, ‘01-01-1900 00:00:00′, @dateTime )
 – get the remainder
 SET @epochSecond = DATEDIFF( second, ‘01-01-1900 00:00:00′, DATEADD( day, -@epochDay, @dateTime ) )

 – convert to seconds
 RETURN ( @epochDay * 86400 ) + @epochSecond

END

 

Leave a message if you want the Epoch to Date Time function.

3 comments August 25, 2008

ColdFusion Memory Leak, you think?

Got lots of memory consumption and have no idea where it’s going? Thinking it might be a memory leak in ColdFusion?

Continue Reading Add comment February 29, 2008

cfchart – CFIDE/GraphData.cfm problems

Got cfchart – /CFIDE/GraphData.cfm problems?

 

If you’re running into problems with <cfchart> you’re more than likely experiencing problems with the mappings. On a productions machine you don’t want to expose the CFIDE to the public, so you remove it! However, ColdFusion needs access to some files to process the <cfchart> and display it.

 Luckily it’s easy enough to fix this problem by creating zero-byte files for internal ColdFusion processes. These files are empty files, so they should not pose any security thread.

Follow the following steps to create the files

  1. Open Windows Explorer.
  2. Navigate to the web_root/CFIDE directory, typically located at \inetpub\wwwroot\CFIDE.
  3. Create a blank file named GraphData.cfm.
  4. Create a directory called main.
  5. Navigate to the new directory atweb_root/CFIDE/main.
  6. Create a blank file titled ide.cfm.
  7. Repeat steps B-F for any additional instances ofweb_root/CFIDE.

You should be fine after that.

4 comments February 13, 2008

Create random list in ColdFusion (Randomizer)

Looking for a way to generate a random list of values?

Continue Reading Add comment February 12, 2008

ColdFusion asynchronous calls (event gateway)

Do you have some methods that require lots of processing, but don’t want the customer to have to wait for the result?

Continue Reading 2 comments February 1, 2008

Application.cfc event methods order (order called in)

For anyone wanting to know in what order the methods in the application.cfc are called. 

The methods in the Application.cfc are called in the following order when a request is made:

  1. onApplicationStart (skips this method if called before, i.e. it’s only called once)
  2. onSessionStart (skips this method if called before, i.e. it’s only called once)
  3. onRequestStart
  4. onRequestEnd

onApplicationEnd is triggered when the application times out

onSessionEnd is triggered when the session times out

onError is triggered when an error occurs

Add comment February 1, 2008

Securing ColdFusion (tips)

I’ve started to write a document for OWASP about ColdFusion security which I hope will be included on the site when I finish it.

Any feedback is more than welcome, if you’d like to see anything included about ColdFusion Security, let me know and I’ll do my best to include it.

Some of the items covered are:

  1. SQL Injection
  2. Database Logins
  3. Logging
  4. XSS (Cross Site Scripting)
  5. Cookie Hijacking
  6. Proper Error Handling
  7. Input Validation
  8. Securing Protected Areas
  9. Forms being submitted outside of your domain
  10. Automated data mining

The document about ColdFusion security can be downloaded here. Please note that the document is still a work in progress.

This document is sponsored by www.clickfind.com.au

ColdFusion Security

Add comment January 23, 2008

Next Posts Previous Posts


Email Subscription

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Categories

Archives

Recent comments

Blogroll

Top Rated

Top Clicks

Category Cloud

Advertising Brisbane SEO clickfind Business Directory ColdFusion Environmental initiatives Google Google Adwords Google Analytics In the media JavaScript JavaScript Form Validation Marketing MS SQL Other Programming Search Engine Optimization & Marketing Yahoo

Tags

alexa alexa ranking analytics anchor text links australia Australian Search Engines bartercard base bbx brisbane business directories business directory business directory review cfc clickfind ColdFusion forum gadget Google hash html internet traffic keywords list local search markup MS SQL online marketing pagerank PR Programming RSS search engine search engines security SEO spellcheck spelling stored procedure tool trust tutorial validation website design www.mergermarket.com

Blog Stats

Top Posts

Authors

RSS Start Listing