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 April, 2014

CleanMgr: Disk Cleanup Wizard addon lets users delete outdated Windows update files

Posted by jpluimers on 2014/04/10

Not only for Windows 7 SP1, as it works on newer Windows versions too:

The article lists many steps, but these are the ones you don’t want to miss:

  • Start the Disk Cleanup wizard by running ‘CleanMgr‘ as Administrator
  • Make sure you press the “Cleanup system files” button:
    this will restart CleanMgr as administrator and include obsolete Windows Update files in the scan.

Both scanning and cleaning can take quite a while, and you often have to reboot afterwards.

You automate parts of the non-administrator process, but the automation task does not support the “Cleanup system files” option. Normally I’d rather see what it wants to cleanup, so I have not used this automation way yet..

–jeroen

via: Disk Cleanup Wizard addon lets users delete outdated Windows updates on Windows 7 SP1.

Posted in Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2 | Leave a Comment »

OS X FullDebugMode support added by Sebastian Zierer (Thanks!) in FastMM / Code / Commit [r67]

Posted by jpluimers on 2014/04/10

I just discovered that almost 2 weeks ago, the FastMM code repository added support for these defines in Mac OS X in Commit [r67].:

  • FullDebugMode
  • LogErrorsToFile
  • LogMemoryLeakDetailToFile

This is great news!

Note: this is not a full FastMM release, but since the original change by Sebastian Zierer has been done about half a year ago, the code is pretty stable.

Thanks mnasman for mentioning this on Delphi Redit, and Ralf Stocker for announcing this in the Non-Tech newsgroup.

–jeroen

via: FastMM / Code / Commit [r67].

Posted in Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, FastMM, Software Development | 2 Comments »

Mac OS X: Tools that enable keyboard shortcuts to move a window from one monitor to another (via: Ask Different)

Posted by jpluimers on 2014/04/10

One of the frustrating things about using a Mac, is the pain to find keyboard shortcuts for everyday tasks.

Having had RSI in the early 1990s, I’ve learned to use the keyboard for virtually everything. So I’m used to find keyboard shortcuts on most operating systems, or write scripts to make common tasks easier.

On most *nix or Windows systems, those shortcuts are either there, easy to enable or tools are there to enable them.

For OS X, somehow this seems much harder, so I’m always glad to bumped into answers to questions like

Is there a keyboard shortcut to move a window from one monitor to another? – OSX/Ask Different.

From the answers in that question it is clear this is not built-in behaviour in OS X.

Also the answers show a few tools that can (some free, some paid). So those are on my research list.

But I’m already glad to know that these tools are available.

I’m also going to dig a bit more into Hands-on with OS X Mavericks: Multiple-display support | Macworld, as I’m sure there are some subtle things with multi-monitor setups that I’ve  not yet found myself.

–jeroen

via: osx – Is there a keyboard shortcut to move a window from one monitor to another? – Ask Different.

Posted in Apple, Keyboards and Keyboard Shortcuts, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | 3 Comments »

.NET UI Automation examples: The managed way to retrieve text under the cursor (mouse pointer) (via: The Old New Thing)

Posted by jpluimers on 2014/04/10

Some interesting UI Automation examples: The managed way to retrieve text under the cursor (mouse pointer).

  • find the text under the mouse cursor
  • run a the calc command
  • showing automation properties under the mouse cursor

–jeroen

via: The managed way to retrieve text under the cursor (mouse pointer) – The Old New Thing – Site Home – MSDN Blogs.

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

VMware ESXi: renaming a VM and VMDK

Posted by jpluimers on 2014/04/09

This turned out to be much more manual work than I hoped: renaming a VM and the VMDK used by the VM in ESXi.

If you prefer to do all steps by hand on the command-line plus two vi sessions for the vmx* files and the main vmdk file: Just one more esxi-guy: How to Rename a Virtual Machine with the CLI in esxi 5.0.

If you have vCenter, you can do it from the guy. Note for Free ESXi users: vCenter is a payed product, but there is a trial of vCenter.

A bit less manual work, but a bit more scripting from the console (if you are comfortable with that) is at Howto: Rename a VM – Yellow Bricks to which you might want to add the script mentioned at Rename multiple files by replacing a particular pattern in the filenames using a shell script – Stack Overflow.

You can also script from vMA or vCLI: VMware KB: Renaming a virtual machine disk (VMDK) via the vSphere Management Assistant (vMA) or vSphere CLI (vCLI).

–jeroen

Posted in ESXi4, ESXi5, ESXi5.1, ESXi5.5, Power User, VMware, VMware ESXi | Leave a Comment »

DDDebug Memory Profiler heading towards 1.0 (via: Stefan Meisner – Google+)

Posted by jpluimers on 2014/04/09

Just in case his blog is not yet on DelphiFeeds, there is this interesting post by Stefan Meisner – Google+ – DDDebug Memory Profiler heading towards 1.0 Version.

A license is only EUR 79!

–jeroen

Posted in Delphi, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | Leave a Comment »

How can a partition be full if du does not show it is? (via: linux – Super User) #OpenSuSE #btrfs #snapshots

Posted by jpluimers on 2014/04/09

A long time ago I asked this OpenSuSE/Linux question: How can a partition be full if du does not show it is? – Linux on Super User.

With help of the OpenSuSE forums, I did figure out the source of the problem and solution, but I totally forgot to blog about it.

So below it is, just in case SuperUser ever shuts down, or the StackOverflow moderators are taking over SuperUser as well.

But first the comments in the questions about where I found the source and solution:

I found it through the openSUSE forums: it uses btrfs and snapshots. So the snapshots take up a lot of space. And I need to find out a way to delete old snapshots. forums.opensuse.org/english/get-technical-help-here/…

and

I think I found it: nrtm.org/index.php/2012/03/13/…

I wasn’t alone, so here are some more useful links and links from people asking for help:

–jeroen

PS: here is my SE question on it: linux – How can a partition be full if du does not show it is? – Super User.

Read the rest of this entry »

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, SuSE Linux | Tagged: | 1 Comment »

Need to draw an ASCII diagram? ASCIIFlow is awesome:… (via: Ilya Grigorik – Google+)

Posted by jpluimers on 2014/04/09

ASCIIFlow.com:  Brilliant!

And from the comments PlantUML which generates UML diagrams from text, of which the sequence diagrams can also be generated as ASCII (the others only as images).

Finally there is ditaa which goes from ASCII diagrams to images. The complete circle is done (:

--jeroen

via: Ilya Grigorik – Google+ – Need to draw an ASCII diagram? ASCIIFlow is awesome:….

Posted in ASCII art / AsciiArt, Development, Diagram, Fun, LifeHacker, PlantUML, Power User, Software Development, UML | 2 Comments »

Big Ball of Mud | Jeroen on software

Posted by jpluimers on 2014/04/09

Just bumped into this Big Ball of Mud article by (another) Jeroen on software (this Jeroen is Jeroen De Dauw).

It is a very nice article with annotations on the (very old, but still very prevalent Big Ball of Mud design pattern of which a lot of software projects suffer).

I didn’t know about the design pattern yet, but have seen it in so many places, and even helped quite a few of them to become less big, and contain less mud. If the article and paper are tool long, you can read a WikiPedia BBM abstract.

I’m glad that the .NET/Delphi based suite of projects I landed on recently – though containing quite a bit of legacy – is different. Still a lot of improvements to be made, but it is very manageable.

–jeroen

Posted in .NET, Delphi, Development, Software Development | Tagged: | 1 Comment »

The C language specification describes an abstract computer, not a real one – The Old New Thing – Site Home – MSDN Blogs

Posted by jpluimers on 2014/04/09

Interesting read:

The C language specification describes an abstract computer, not a real one – The Old New Thing – Site Home – MSDN Blogs.

In other words: any language that merges null behaviour in the underlying storage will have a problem somwehere.

So if you want to have true nullable types, your null flag should be stored outside the underlying storage.

The .NET framework 2 and up, most database management systems and many other environment support that.

But most languages don’t support it for pointer types. So there will be portions of address spaces either inaccessible, or only accessible when skipping the null pointer checks.

Note that the thread above contains some very interesting bits, for instance this one:

Matt 28 Mar 2013 5:58 PM #

@MarkY “Dereferencing null is undefined?  Cool!  I thought it was guaranteed to crash, just like a false assertion or something.  So crashing is the OS guarantee, not the language guarantee apparently.”

Nope. It’s not an OS guarantee either. The OS won’t ever normally allocate memory at address zero, but there’s nothing to stop you telling it to. Try doing “VirtualAlloc(1, 4096, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE)” on your pre-Windows8 machine.

In fact, this is the reason why null-dereferences in kernel mode are often exploitable as elevation of privilege attacks. The null-page is mappable and within the user-addressable region of memory, so if the kernel dereferences a null pointer, it reads attacker controllable data.

And btw, this is the reason why on Linux and Windows8+ you can’t map the null-page.

–jeroen

via: The C language specification describes an abstract computer, not a real one – The Old New Thing – Site Home – MSDN Blogs.

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Borland C++, Borland Pascal, C, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, C++ Builder, Database Development, Delphi, Development, Pascal, Quick Pascal, Software Development, Turbo Pascal, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 8.0, VB.NET 9.0 | Leave a Comment »