Archive for the 'Programming' Category

July 24, 2008

Three little characters  designed to make your life hell

On more than one occasion these characters  have turned up just when everything else seems fine.  Like a tiny weeney scratch on a new car, one that only you know about, these little bastards turn up and take the rest of the day to diagnose. 
So what  is for?

 cannot be smoked or [...]

July 7, 2008

Limiting text input to characters and digits

To remove stuff such as punction and spaces (or anything you want) from a text box before sending to the server for validation you can use code like this, first the HTML:-

<input
name="name"
onblur="this.value = entrycheck(this.value)"
type="text"
size="20">

And then the following Javascript will remove invalid characters when the user moves to another field:-

<script type="text/javascript">
function namecheck(theInput) [...]

April 24, 2008

ASP code to block multiple ranges of IP’s from your site

It wasn’t long before I needed to expand upon banning a few IP’s. I needed to be able to ban whole networks so here’s the Q&D solution:-
First create a text file called ipsec.txt and enter some IP’s you wish to ban, to ban a network just leave off the end of the IP class [...]

April 22, 2008

Write ASP and need a way to block IP’s from your site?

This demonstrates how to ban a single IP address, later, I’ll show how to ban whole networks but chances are you will be able to work that out for yourself anyway after reading this anyway.
If global.asa does not exist then create it and add the following:

sub session_onstart
 
ip = request.servervariables("Remote_Addr")
 
select case ip
[...]

December 5, 2007

Software Engineering Tips For Startups

Seven years ago I tried to persuade my business partners and investors not to outsource our startup development to Oracle, but at the time ‘the city’ could not understand how two or three passionate programmers could compare with the might of a 20 strong team of Oracle professionals.
BlueBlog Alex article Software Engineering Tips For Startups [...]