The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • Pages

  • All categories

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

    Join 1,839 other subscribers

alias suse_version for getting the openSUSE version – openSUSE

Posted by jpluimers on 2014/05/19

I always forget where SuSE keeps its’ version number.

Hence my alias:

alias suse_version='cat /etc/SuSE-release'

–jeroen

via: SDB:Find openSUSE version – openSUSE.

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

Reduce size of guest vmdk disks with VMware Fusion 4.1.3 on OS X 10.8 | aitrusblog

Posted by jpluimers on 2014/05/16

Reminder to self: how to decrease vmdk disk size of guest OS (check if it works with Windows guests) using VMware Fusion on Mac OS X.

–jeroen

via: Reduce size of guest vmdk disks with VMware Fusion 4.1.3 on OS X 10.8 | aitrusblog.

Posted in Apple, Fusion, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, OS X 10.8 Mountain Lion, Power User, VMware | Leave a Comment »

.NET remnants of the past: Visual Studio .NET 2003 cannot start debugging as the assembly is missing

Posted by jpluimers on 2014/05/15

Boy, was this Visual Studio .NET 2003 stuff a long time ago.
Bumped into this one:


---------------------------
Microsoft Development Environment
---------------------------
Visual Studio cannot start debugging because the debug target 'C:\develop\VS-2003\VS-2003-BASE\Source\AppTest\bin\Debug\AppTest.exe' is missing. Please build the project and retry.
---------------------------
OK
---------------------------

Indeed, Visual Studio was right: it didn’t understand the Release build existed like Visual Studio 2005 and up does:

C:\develop\VS-2003\VS-2003-BASE\Source\AppTest\obj\Release\AppTest.exe

–jeroen

Posted in .NET, .NET 1.x, C#, C# 1.0, Development, Software Development, Visual Studio 2003, Visual Studio and tools | Leave a Comment »

.NET/C#: Ctrl+R+R toggles wrap in Visual Studio.NET 2003 (via: Stack Overflow)

Posted by jpluimers on 2014/05/14

A while ago, I had to do some emergency fixing in Visual Studio .NET 2003 as – despite it is unsupported – a client was still using it.

By habit, I tried to rename a variable using the Ctrl+R+R shortcut for Refactor Rename. It didn’t work, and I was not surprised: this refactoring was introduced in Visual Studio 2005.

A while later, I started to notice that WordWrap was turned on in the code editor.

It took me a few minutes and a quick search to find out the two are related:

Visual studio 2003: ctrl+R+R is the shortcut to toggle WordWrap in the code editor.

Thanks Micah for answering that!

–jeroen

via How can I toggle word wrap in Visual Studio.NET? – Stack Overflow.

Posted in .NET, .NET 1.x, C#, C# 1.0, Development, Software Development, Visual Studio 2003, Visual Studio and tools | Leave a Comment »

Using dsquery and dsget to get computer information from a domain

Posted by jpluimers on 2014/05/13

This article is a very brief example of how to use dsquery/dsget/find to get computer information from in the active direrctory of a domain.

The main aim for myself is to condense the information here, and have some links for background information.

If you have the right credentials then the below batch file works very well.

It uses these tools:

  • dsquery to query the active directory on your domain controller for the existence and Distinguished Name (or ID/path) of various objects (in this example dsquery computer to check if a computer exists in a domain)
  • dsget which can get you various detail information about an object (for instance dsget computer used in this example))
  • find to raise the correct errorlevel (and indicate if we indeed found a CN – or Common Name – from a distinguished name)

The ds* tools do not raise any errorlevel, so that’s what find is used for.

Further reading: Read the rest of this entry »

Posted in Batch-Files, Development, Power User, Scripting, Software Development, 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 »

MacBook Air/Retina equivalent of Ctrl+Shift+Eject is Ctrl+Shift+Fn+Power (via: Apple Support Communities)

Posted by jpluimers on 2014/05/12

Recent Retina and MacBook Air’s do not have an optical drive, so they do without the Eject button on the keyboard.

The quick keyboard shortcut Control+Shift+Eject is not directly available, so what is the replacement?

A few people that answered this are jr00ck and Evil Rob:

For newer Retina and MacBook Air’s, control+shift+fn+power button replaces control+shift+eject.

In fact you can even press Fn+Power and get a small dialog that lets you choose what to do and offers a “Reopen windows when logging back in” checkbox:
Read the rest of this entry »

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, OS X 10.8 Mountain Lion, Power User | Leave a Comment »

TCP/IP 40th Anniversary

Posted by jpluimers on 2014/05/11

One day late, but still: happy TCP/IP 40th Anniversary.

Posted in Communications Development, Development, Internet protocol suite, Power User, TCP | Leave a Comment »

Solution for HP LaserJet 4050 Can’t select Tray 1 in driver (via: Enterprise Business Community)

Posted by jpluimers on 2014/05/09

This happened to a client as well: the stock Windows Vista PCL5 driver for an IP-connected HP LaserJet 4050TN would not allow you to select a paper tray. Not for default settings, nor for printing preferences.

The solution: download the HP PCL6 driver for Windows Vista from HP LaserJet 4050 Printer series –  Download drivers and software .

Question:

LJ 4050n – Can’t select Tray 1 in driver

I have a 4050n connected to a small LAN, with 3 XP-Pro SP2 machines. These all print directly using standard TCP/IP ports. They were installed using the PCL5e driver downloaded from HP ( 4.27.4050.410 12 Dec 2003 ) This all basically works.

The only problem is I cannot select tray 1. The ‘paper source’ drop-down is greyed out at ‘auto select’. Printer always prints from tray 2 ( A4 Plain. )

Answer:

Try the PCL6 for a 4000TN, the printer still works if a 4050 has a 4000 driver loaded, had similar problems just used the 4000 driver.

–jeroen

via: HP Communities – LJ 4050n – Can’t select Tray 1 in driver – Enterprise Business Community.

Posted in HP Printer Drivers, Power User, Printer drivers, Windows, Windows Vista | Leave a Comment »

This is madness. University textbook at full price but without ownership (via: Jan Wildeboer – Google+)

Posted by jpluimers on 2014/05/08

Having to buy a book at full price, then having to return it when your semester is finished sounds so wrong on so many levels, even if you get DRM licenses access to the content:

one of the best quotes on DRM ever: But, as Professor James Grimmelmann noted, “we know from sad experience that gerbils have better life expectancy than DRM platforms.”

–jeroen

via: Jan Wildeboer – Google+ – This is madness. University textbook at full price but….

Posted in Opinions | Leave a Comment »

.NET uses banker’s rounding as default as it follows IEEE 754 (via: Stack Overflow)

Posted by jpluimers on 2014/05/08

It is almost 3 years that Ostemar wrote an interesting answer on Stack Overflow to the question

Why does .NET use banker’s rounding as default? – Stack Overflow.

Few people (even many programmers don’t!) know about rounding and how it can influence software, let alone what bankers rounding does so lets set a few things straight first.

Rounding matters. Depending on the kinds of software you write, it matters a little, or a lot.

For instance, in these categories, it can matter an awful lot:

  • Financial applications
  • Statistical applications

Bankers rounding means rounding half even. Which means that #.5 will round to the even number closest to #.

In bankers rounding, 1.5 rounds to 2, 3.5 to 4 as does 4.5, -1.5 rounds to -2, -3.5 to -4 as does -4.5.

This is called “unbiased” because for reasonable distributions of y values, the expected (average) value of the rounded numbers is the same as that of the original numbers.

This is contrary to what the majority of people are accustomed to: Round half away from zero is taught in most countries (even for the Dutch, despite the alias “Dutch Rounding” for round half to even).

Round half away from zero rounds 1.5 rounds to 2, 3.5 to 4 and 4.5 to 5. Negative numbers round like this: -1.5 rounds to -2, -3.5 to -4 as does -4.5 to -5.

This is only free of overall bias if the original numbers are positive or negative with equal probability.

In short, .NET uses bankers rounding because it follows the IEEE 754 rounding rules.

This was his answer: Read the rest of this entry »

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | 3 Comments »