Scheduling IIS to restart each night automatically

Monday, July 28th, 2008

Going to try using a .bat file and the net commands such as

NET STOP W3SVC
NET START W3SVC

these were useful:

http://www.ss64.com/nt/net_service.html

http://dontknow-syndrome.blogspot.com/2008/01/dos-dir-cmd.html

Adding JavaScript to selenium scripts

Monday, July 28th, 2008

When you need to add a little bit of extra functionality to a selenium script such as adding a random number you need to have a look at this:

http://release.openqa.org/selenium-core/0.8.0/reference.html#storedVars

Stored Variables

The commands store, storeValue and storeText can be used to store a variable value for later access. Internally, these variables are stored in a map called “storedVars”, with values keyed by the variable name. These commands are documented in the command reference.

Variable substitution

Variable substitution provides a simple way to include a previously stored variable in a command parameter. This is a simple mechanism, by which the variable to substitute is indicated by ${variableName}. Multiple variables can be substituted, and intermixed with static text.

Example:

store Mr title
storeValue nameField surname
store ${title} ${surname} fullname
type textElement Full name is: ${fullname}

Javascript evaluation

Javascript evaluation provides the full power of javascript in constructing a command parameter. To use this mechanism, the entire parameter value must be prefixed by ‘javascript{’ with a trailing ‘}’. The text inside the braces is evaluated as a javascript expression, and can access previously stored variables using the storedVars map detailed above. Note that variable substitution cannot be combined with javascript evaluation.

Example:

store javascript{’merchant’ + (new Date()).getTime()} merchantId
type textElement javascript{storedVars['merchantId'].toUpperCase()}

Disk output caching ASP.NET

Tuesday, July 15th, 2008

Starting to push the memory so really need to do this:

http://weblogs.asp.net/scottgu/archive/2005/12/13/433081.aspx

C# Null-Coalescing Operator

Tuesday, July 15th, 2008

You learn somthing new everyday - that’s what I love about this job… any way the C# null-coalescing operator

You can easily default a value if it is null by doing the following:

string fileName = tempFileName ?? "Untitled";

Very useful - I always prefer to write one line of code rather than many the above is much nicer than:

string fileName = tempFileName != null ?
                                 tempFileName : "Untitled";

This is a nice article about this subject: http://davidhayden.com/blog/dave/archive/2006/07/05/NullCoalescingOperator.aspx

Papervision 3d and video

Saturday, July 12th, 2008

http://www.cornflex.org/?p=1

Deploying PHP with capisrano

Friday, July 11th, 2008

Can’t be bothered with manually deploying projects any more!

http://www.simplisticcomplexity.com/2006/8/16/automated-php-deployment-with-capistrano/

Improving ASP.NET Performance

Wednesday, July 9th, 2008

Really good article on things to improve asp.net performance!

http://www.codeproject.com/KB/aspnet/10ASPNetPerformance.aspx

Wake On LAN web based magic packet sender

Tuesday, July 8th, 2008

http://www.remotewakeup.com/en/index.php

Flash Graphs and Charts

Monday, July 7th, 2008

I have a requirement to create some charts and graphs in flash so thought I would do a little bit of googling first. I found the following:

Open source flash charting with helpers in the main web languages:

http://teethgrinder.co.uk/open-flash-chart-2/

3D anyone?

https://www.cynergysystems.com/blogs/page/andrewtrice?entry=visualizing_data_in_multiple_dimensions

Drawing nice shapes with JavaScript

Monday, July 7th, 2008

It is amazing what you can do with JavaScript:

http://azarask.in/blog/post/contextfreejs-algorithm-ink-making-art-with-javascript/