The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for January, 2014

Word 2007/2010/2013: Enabling the Word Developer Tab on the ribbon (via: Andrew Coates ::: MSFT – Site Home – MSDN Blogs)

Posted by jpluimers on 2014/01/16

This is one of the things I tend to forget, as you do it once per machine, and the place to do it is not logical to me.

I mainly use it to quickly record a Macro (boy, I wish Office had a TemporaryMacro feature like Visual Studio had. Alas no more: Macro Recording/Playback has been removed in Visual Studio 2012).

The logical place for me would be to have a context-menu on the ribbon where you can enable the Developer tab.

Anyway, this is how to enable the Developer tab in Word 2007/2010/2013: Read the rest of this entry »

Posted in Development, Office, Office 2007, Office 2010, Office 2013, Power User, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Word | Leave a Comment »

.NET/C#: you cannot do string? because Nullable is for value type, and string is a reference type

Posted by jpluimers on 2014/01/15

At clients, I see quite a few people being confused by this compiler error message:

Error 1 The type 'string' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'System.Nullable'

One of the reasons about the confusion is that a string variable behaves like a value type, but in fact is a reference type because their values can consume a huge amount of memory (thanks User codekaizen).

A few interesting questions on that on StackOverflow:

Anyway, back to the error message above.

Lots of people are confused by it, just see a few questions on StackOverflow: Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Jon Skeet, Software Development | Leave a Comment »

Reminder: find out which Windows 7 drivers work for ScanSnap S510 from Fujitsu

Posted by jpluimers on 2014/01/14

One of the few Windows XP machines left is main usage is for the Fujitsu ScanSnap S510 scanner that I have been using for years: it is small, does duplex scanning, emits searchable PDFs through an embedded Adobe Acrobat and Abby ScanSnap Edition OCR license. The Scan button on the scanner “just works” and allows for a “Scan Now, organize later” workflow.

Just Works: if a user is logged in on the Windows machine, which usually is the case.

Next to that, it is used for internet browsing and remote desktop access to VMs in the various clouds: it is more than adequate for that with dual Dell UltraSharp U2407WFP monitors at 1920×1200. The extra 120 pixels over “modern” 1080p do make a difference you know.

I never bothered to upgrade the machine, as it works so nicely and I have had bad experience replacing systems that include embedded licenses: it usually doesn’t work.

Of course I could buy a new ScanSnap iX500, but I don’t want to increase the electronic waste unless I’ve researched if it is possible to get the ScanSnap S510 working on Windows 7 or 8.x, or even on one of my Macs.

So here are some links for further research on a light-weight solution: Read the rest of this entry »

Posted in Apple, Fujitsu ScanSnap, Hardware, ix500, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Scanners, Windows, Windows 7, Windows 8 | 1 Comment »

SQL Server: strange way of getting query statistics.

Posted by jpluimers on 2014/01/14

Last year, I had a very odd project at a client.

Their monitoring software was quite odd, and there was no time to create/test/implement a module for it doing SQL query performance measurement any better.

The odd software had two ways of looking at queries:

  • in a succeed/fail fashion
  • in a count(*) fashion

Don’t ask why it was that way, the monitor was hysterically grown.

So below is a small query script that does what the odd monitoring software can do: provide a select with rows indicating the query response time.

What is does is insert into the #sma temporary table a number of records depending on the query duration.
The partition here is 1 record per 125 milliseconds, aiming for four partitions (green, yellow, orange, red) in half a second.

Note the maximum accuracy is about 3.3 milliseconds.

The script is based on these SQL server features:

I might add a try/catch to fake a finally in case the #sma insert fails. Read the rest of this entry »

Posted in Database Development, Development, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

Steps for shrinking a vmware disk for a Windows guest VM inside VMware Workstation of VMware Fusion

Posted by jpluimers on 2014/01/13

Another one from the “missed schedule” series, this one was originally scheduled for 20130927.

These articles were not very clear on the actual steps to take:

The steps I tried: Read the rest of this entry »

Posted in Fusion, Power User, VMware, VMware Workstation, Windows, Windows 7, Windows 8 | Leave a Comment »

Windows security Token Bloat

Posted by jpluimers on 2014/01/13

This can happen when your Windows Security Token bloat has struck:

… the problem could be minor, or relatively major. You may get weird access denied messages, applications crashing, or strange entries in your event logs. Or worse yet a SID for a group that has a ‘deny permission’ on an object could be dropped into the virtual bit bucket, allowing a user to access a resource they are not supposed to access.

Summary of fixes for token bloat:

  1. Use global or universal groups instead of domain local.
  2. Increase the MaxTokenSize on all computers
  3. Convert security groups to distribution groups if they are only used for email lists.

There is a hard-coded limit of 1,024 SIDs for the Kerberos PAC (privilege attribute certificate)

Kerberos token size still remain to 64k in windows7 / win2008r2.

This is what UWWI did to avoid token bloat: UWWI Token Bloat – IAM – UW Information Technology Wiki.

–jeroen

via:

Posted in Power User, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Pre-build trick does not work to circumvent [BRCC32 Error] xxx.vrc(1): error creating xxx.res (via: Embarcadero Discussion Forums & StackOverflow)

Posted by jpluimers on 2014/01/10

Ever since around Delphi 2007, it started to use temporary .VRC files to re-build the project .RES file.

It confuses people, and with reason as the only public information about it on the dockwiki seems to be in the Version Info page (though there is more on the other embarcadero sites).

The reason is that parts of the .RES file are no more leading in the process of getting them from your project options to the final binary (EXE/DLL/BPL/…) of your project.

Delphi XE3 for instance can have these resource structures in the .VRC file:

Except for type 24, Delphi XE2 seems to have the same kinds of resource types.

All in all, most if not all of the .RES files are being auto-generated for at least a couple of years now so there is less and less need to put it under version control.

The problem is that if for one reason or the other, your project .RES file becomes readonly, and you get errors like mentioned in Why does a projects res file need to ….

[BRCC32 Error] xxx.vrc(1): error creating xxx.res

.RES in VCS or not?

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Event, QC, Resource Files and Scripts (.res/.rc), Software Development | Leave a Comment »

RaidSonic Icy Box IB-2222SSK, SAS/SATA II Wechselrahmen (20295) in Festplatten & SSDs: Wechselrahmen | heise online Preisvergleich

Posted by jpluimers on 2014/01/10

Interesting to stuff 4 2.5 inch SAS/SATA drives (up to 15mm height) in a 5.25 slot.

RaidSonic Icy Box IB-2222SSK, SAS/SATA II Wechselrahmen (20295) in Festplatten & SSDs: Wechselrahmen | heise online Preisvergleich.

–jeroen

Posted in Uncategorized | Leave a Comment »

*nix networking – lsof: How to tell what process has a specific port open on Linux (via: Server Fault)

Posted by jpluimers on 2014/01/10

I usually used netstat with some grep filter for this, but Brandon Titus showed at StackOverflow that the lsof command is much easier to use:

lsof command should be able to do this just fine. Just use this:

lsof -i :<port_number>
lsof -i udp:<port_number>
lsof -i tcp:<port_number>

and all of the processes should come up.

The lsof commands work on SUSE, Max OS X, CygWin and many other environments.

(update 20160304: added more arguments and links)

Two other commands I use often:

netstat -tulpn | sort

(for connected and listening tcp/udp ports it shows processes and port numbers; see the netstat parameters for more details, note that -u includes udp and -l adds listening sockets)

rpcinfo -p ; rpcinfo -s

(shows the ports used by rpcbind)

Note that one day I’ll learn the iproute2 equivalents (many of which have non descriptive 2 letter names like ip, iw, ss, tc, maybe because iproute2), but as OS X still doesn’t have iproute2, I’m hesitating. Anyway, that day:

–jeroen

via

Posted in *nix, Apple, Cygwin, Linux, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.8 Mountain Lion, Power User, SuSE Linux | 1 Comment »

Jessica Taylor – Timeline Photos

Posted by jpluimers on 2014/01/10

Jessica TaylorGo to the Google maps link and click on the double arrows!https://maps.google.com/maps?hl=en&ll=51.492159%2C-0.19092&spn=0.005291%2C0.013937&sll=51.492140%2C-0.193028&layer=c&cid=12502927659667388442&panoid=c9UMhWP_MWm9U0L48xEjYw&cbp=13%2C291.8%2C%2C0%2C18.86&gl=US&t=m&cbll=51.492132%2C-0.192862&z=17

For me it only works if I open the link in an incognito Chrome window.

https://maps.google.com/maps?hl=en&ll=51.492159%2C-0.19092&spn=0.005291%2C0.013937&sll=51.492140%2C-0.193028&layer=c&cid=12502927659667388442&panoid=c9UMhWP_MWm9U0L48xEjYw&cbp=13%2C291.8%2C%2C0%2C18.86&gl=US&t=m&cbll=51.492132%2C-0.192862&z=17

–jeroen

via Jessica Taylor – Timeline Photos.

Posted in About | Leave a Comment »