I think I’m going to have add a post category for ‘vista annoyances’!
Why when I extract a zip file with the in-built windows compression utility, does it take a ridiculously long time to complete! I’m fed up with this now, I’m installing 7Zip.
I think I’m going to have add a post category for ‘vista annoyances’!
Why when I extract a zip file with the in-built windows compression utility, does it take a ridiculously long time to complete! I’m fed up with this now, I’m installing 7Zip.
I don’t do a great deal of classic ASP any more, but today I had to knock up a quick function to try and filter out those annoying form spammers. You know the ones, feedback forms submitted with just URLs pointing to pr0n and viagra sites!
Anyway, I came up with a function that counts URLs in a block of text –
Function UrlCount(text)
dim strRegex
strRegex = "(https?://)?(([0-9a-z_!~*'().&=+$%-]+: )?
[0-9a-z_!~*'().& =+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|
([0-9a-z_!~*'()-]+.)*([0-9a-z] [0-9a-z-]{0,61})?[0-9a-z].[a-z]
{2,6}) (:[0-9]{1,4})?((/?)|(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)"
'Prepare a regular expression object
Set myRegExp = New RegExp
myRegExp.IgnoreCase = True
myRegExp.Global = True
myRegExp.Pattern = strRegex
Set myMatches = myRegExp.Execute(text)
UrlCount = myMatches.count
Set myMatches = nothing
Set myRegExp = nothing
End Function
Thanks to this url regex I had it sorted in no time 🙂
Usage –
If UrlCount(variablecontainingfieldvaluetocheck) > 1 then ' you could use 2+ above if you don't want to be so strict ' do something nasty like drop a 404 End If
Anyway, let me know if you find it useful or have any suggestions for improvement.
Well, I’ve been using vista now for long enough to have experienced a few of it’s annoyances –
So, both network related. On a brighter note, I’m really pleased with the way vista seems to connect to and authenticate to, remote machines via UNC paths. On XP this was a real pain, you’d type in a path, wait a number of minutes for an authentication dialog, enter your credentials then wait a further extended length of time. This now seems almost instant on vista which is really nice.
UPDATE: I think I may have fixed the second one, while in ‘Network and Internet > Network Connections’ I right clicked the dial-up connection (looking for a disable option) and saw an option for ‘Cancel as default connection’ option, let’s hope that fixes it!
UPDATE: It didn’t 😦
So, what’s annoying you with vista?
I’ve recently upgraded to vista on my laptop at work and am getting increasingly annoyed by one ‘broken’ aspect. Why can I no longer drag files from an explorer window into a ‘Solution Explorer’ in VS?
I’m assuming it’s something to do with them running as slightly different users as I have to run VS ‘as administrator’, well that’s what MS advises anyway.
I do hope this is fixed soon!
It’s been a while since I’ve posted anything and to be honest things have been pretty hectic.
Hopefully that’s about to change so expect updates soon 🙂