Pages
Categories
Old Posts
- November 2011 (1)
- June 2011 (1)
- March 2011 (1)
- January 2011 (1)
- November 2010 (3)
- May 2010 (1)
- March 2010 (1)
- February 2010 (1)
- December 2009 (4)
- November 2009 (1)
- October 2009 (1)
Author Archives: david
MySQL NET Connector 6.3.6 bugs with Visual Studio 2010
Just wasted a day trying to fix things after installing mysql connector 6.3.6 which has managed code for vs 2010 and net 4. The problem is that this version reconfigures VS 2010. After which, VS stops working properly: 1. Add Connection wizard just closes as soon as you enter any server connection details – so [...]
Posted in Uncategorized Leave a comment
Logging: how to get Class and Method names
When logging errors is helps to have the Class and method names where the exception was thrown without using string constants that are a pain to maintain. The code to get the names is Current assembly and class name = Me.GetType.FullName Current class name = Me.GetType.Name Current method (function or sub) = System.Reflection.MethodBase.GetCurrentMethod().Name
Posted in VB.NET Leave a comment
The Benefits of Stored Procedures
The ‘debate’ over Stored Procedures comes up a lot, mostly in the PHP forums I frequent and I have become tired of repeating myself. So this post summarises the benefits and reasons for using Stored Procedures and I can just point people to it in future. Benefits of Stored Procedures Precompiled execution. The Database Server [...]
Posted in Uncategorized Leave a comment
How to run Xcopy with elevated privileges
A COM class to run xcopy as an admin.
How to run code as another user
A COM class that enables code execution under a different user identity. It makes it really easy to run code with elevated priviledges in eg VBA as well as NET.
Open a file in VB.NET
To open a file in it’s default application all you need is one line of code: System.Diagnostics.Process.Start("www.mysite.com") or System.Diagnostics.Process.Start("N:\myfile.pdf")
John Cleese on Proportional Representation
Given the kind of crap we are bound to see and read in the next few weeks, here is an explanation of the real issue:
Posted in Uncategorized Tagged general election, it's a joke, PR, proportional representation Leave a comment
Capitalise all Words in VBA
Easy to do with Pearl-type regular expressions but a knotty problem in VBA. I present an elegent solution that utalises VBScript regular expression 5.5 and can handle real names with apostrophies and hyphens.
The Most Truth That I Know
If we could conquer greed then we would conquer need. This is the most truth that I know. I only wish it could be so.
Some cool Flash widgets
Just came across some cool Flash widgets on abowman.com, check them out. Pengiuns: they follow your mouse around. Fish: click on the pond to feed the fish [edit]turns out it was the FollowSite plugin that was slowing up my blog – lousy plugin that does not work[/edit]
Posted in Uncategorized Leave a comment
Play a game and donate water
Try it out: Play a game online and do some good while you’re at it.
Posted in Uncategorized Leave a comment
Act on Global Warming
Get active about global warming and the failure of the Copenhagen conference, click the logo and send an email to our ‘leaders’. /* begin styles for RSS Feed */ .rss-box-action { margin: 0em; width: 160px; background-color: #E2EBD8; /* Change above line to changer background color of the panel */ border: 0px solid ##FFFFFF; } .rss-box-action [...]
Calculate the Running Balance
How to calculate the running balance on a ledger using self-joins.
Find user’s most recent post in each thread
One common problem that my sequence method can help to solve is how to display the most recent entry that a user has made in each thread that the user has contributed to: SELECT * FROM posts WHERE usedid = $userid AND postid IN (SELECT t1.postid, COUNT(t1.postid) AS sequence, t1.postid <= t2.postid AS flg FROM [...]
How to Sequence each Sub-set of Records
How to find/display/keep/delete the first/last n posts/records/entries for each user by using a sequence.
I am a “TC Winner”