Am currently figuring out how to model different payment types for a client in a database to store their sales data. There are a lot of common attributes, and we may well need to sum transactions across type.
Turns out that the DevExpress installer does not integrate DXGrid with Express editions of Visual Studio. Solution is:
1.Manually add references for following assemblies:
2. Manually add namespace to XAML:
You can then add your
element as usual.
DevExpress Support also say that you can manually add the following assemblies to the Toolbox to achieve designer support, but that didn’t work for me:
C:Program FilesDevExpress 2009.2ComponentsSourcesDevExpress.DLLDevExpress.Wpf.Editors.v9.2.dll
C:Program FilesDevExpress 2009.2ComponentsSourcesDevExpress.DLLDevExpress.Wpf.Grid.v9.2.dll
When you on a solution with several assmblies in .NET, you’ll find yourself maintaining multiple copies of AssemlyInfo.cs, each of which contain a lot of common attributes such as:
You may also wish to make
AssemblyVersion uniform accross your build.
A useful technique in this situation is the following:
1. Copy the common attributes out into a new file, called something like ‘GlobalAssemblyInfo.cs’
2. Delete these common attributes from the original AssemblyInfo.cs files
3. Save your GlobalAssemblyInfo.cs file somewhere useful, e.g. in the same folder as your solution file
4. In each project, add GlobalAssmblyInfo.cs through the IDE as a linked file, rather than a straight addition.
It turns out there is a subtlety in the syntax for HyperTerminal 5.1:
>hypertrm /t 127.0.0.1:21
Will open a HyperTerminal session on address 127.0.0.1, port 21
Will try and open 127.0.0.1.ht and complain when it is not present.
Just started using these in a large project I am maintaining – very useful for working with event sinks that get called every time *anything* happens.
School boy error for the day was thinking in VB rather than C# for my loop condition: ‘i=6’ has changed rather than ‘i==6’ has changed
Assignment never changes, as I found, waiting in vain for my debug window to appear!
Had a problem with VB6 crashing immediately upon opening. Tried rebooting, running in Windows Safe Mode, no joy. Fixed after an hour searching the news groups – turns out the procedure is as follows:
1. Try logging in as a different user. If VB6 runs, you have corrupt registry settings. Replace your own settings with those of the user that works, from
2. Try disabling all addins manually. (Apparently this is often the problem). To do this:
To disable Add-ins manually, make backups, then set all values to 0 in the following file:
Also, set all LoadBehavior for all Add-ins to 0 for the following key in the registry:
All of this information came from an invalulable post here:
Today I was tormented by the following error from IIS:
HTTP 403.1 Forbidden: Execute Access Forbidden
I checked the directory security permissions in Windows, gave everyone under the sun god-like permissions on the whole folder tree, checked anonymous authentication, checked the server logs … but still this error came.
It turns out it was because I had “.com” in the folder nameÂ – something it would have taken a couple of months to figure out without Google:
Forum post on Velocity Reviews (new window)
Not very exciting, but lesson learned today:
NET USE D: [MY PATH] * /USER:[USER NAME] /PERSISTENT:NO
The asterisk means I’ve stopped locking my NT account out every week or so, since it prompts for a password, rather than trying to log in without one, failing, and then prompting me.
Just hit an interesting problem with the replacement argument of Regex.Replace. The issue was that I was passing in variable content to this argument, and it turned out thatÂ dollar signs could occur in the content I was passing in. These were interpreted as backreferences, which gave me very different results to the ones I was expecting.
With hindsight, this is kind of obvious, and the solution is simply to replace any single dollar signs in the variable content with repeated dollar signs, as described here:
MSDN on Replacement Substitutions (new window)
See if you can spot any whiff of this looking at the documentation for the method though:
MSDN on Regex.Replace(String, String, String, RegexOptions) (new window)
Is being discussed at work. Interesting criticism here of the basic approach:
Whenever I read this kind of thing, it always leaves me with a lot of respect for security professionals – I just don’t have this instinct for trouble.