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,861 other subscribers

Archive for 2012

A few nice PDFs on fonts and font designer handwriting

Posted by jpluimers on 2012/08/10

In my early software developer years, I have been into scaleable fonts, PostScript and PDF very much.

Over the years, I kept an eye on that, and recently I found a few nice PDFs about fonts and designer handwriting:

–jeroen

Posted in About, PDF, Personal, Power User, Typography | Leave a Comment »

.NET/C#: ExpandEnvironmentStrings equivalent is Environment.ExpandEnvironmentVariables; expands environment strings

Posted by jpluimers on 2012/08/09

A while ago, I needed a way to defer settings to environment variables in a .NET application written in C#.

The easiest way to do this is to keep the same syntax as for expanding environment variables in batch files: use the %ENVIRONMENTVARIABLE% syntax (not the delayed expansion !ENVIRNMENTVARIABLE! syntax).

The reason is that there is a Windows API function ExpandEnvironmentStrings that handles all the expansion magic.

Don’t P/Invoke that function yourself, as there is already a very nice Environment.ExpandEnvironmentVariables wrapper since the .NET framework 1.1 that handles all the gory details for you (like marshalling the strings, making sure that lpDst contains enough space for the expansion).

–jeroen

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

.NET/C#: workaround to solve small glitch with Visual Studio 2010, CodeRush with and string resources

Posted by jpluimers on 2012/08/08

CodeRush has a nice refactoring to extract a C# string into a resource.

There is a small glitch that when you press undo after that, and there was no string file in your project, then the empty resource file is not always saved.

Upon building your project, you will get an error like this:

---------------------------
Microsoft Visual Studio
---------------------------
The item 'Resources.resx' does not exist in the project directory. It may have been moved, renamed or deleted.
---------------------------
OK
---------------------------

The Resources.resx file is not visible in your Solution Explorer, so you cannot delete it there.

You have to manually edit your .csproj file and remove the Resources.resx reference there.

I’ve had this happen only a couple of times, and cannot yet reproduce this. Until I can reproduce, this is a workaround to remedy the effects.

–jeroen

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

Correlation of Delphi Release/Update dates and activity on SourceForge project “RAD Studio Demo Code”

Posted by jpluimers on 2012/08/07

Now that the there are RadStudio XE3 demos available at SourceForge.net Repository – [radstudiodemos] Index of /branches/RadStudio_XE3, and a post on a Delphi Event in New Zeeland rumours of an eminent Delphi/RAD Studio XE3 version start to raise.

It is fun to watch the activity stats on the SourceForge project RAD Studio Demo Code and correlate them to the Delphi release and update dates.

I made PNG images of two graphs. Click on them to enlarge, or click on the links to get to the statistics pages.

Note that when the span is wide enough, activity gets summed to the start of the month (first picture).

Project statistics graphs

Project Statistics: RAD Studio Demo Code –
from 2009-10-01 until 2012-10-01
.
Project Statistics: RAD Studio Demo Code –
from 2012-07-15 until 2012-08-15
.

Correlation

The real fun is the correlation with the Delphi Release Dates – Delphi Programming and the Delphi update dates from the Delphi Registered User Downloads.:

Year-Month Date Delphi/
RAD Studio
version
Release/Update
2009-12 2009-12-14 2010 Update 4/5
2010-08 2010-08-30 XE Release
2011-07;2011-08 2011-09-02 XE2 Release
2011-11 2011-11-01 XE2 Update 2
2012-04 2012-05-18 XE2 Update 4 + Hotfix
2012-07 2012-??-?? XE3? Release?

–jeroen

via: RAD Studio Demo Code | Free software downloads at SourceForge.net.

Posted in Delphi, Delphi 2010, Delphi XE, Delphi XE2, Development, Software Development | 5 Comments »

Pricetracker/-watch/-drop alters/-history charts for Newegg.com, Amazon.com, Best Buy, BackCountry.com, Zzounds.com

Posted by jpluimers on 2012/08/06

Cool: sites that allow you to do track prices, get history charts, get alerts for price drops, etc. Got there through SSD prices in steady, substantial decline – The Tech Report.

Your account works at all of our price tracking sites:

And your account will work at any new sites we launch!

The SSD price drop together with the HDD Prices Not Expected to Decline Until 2014 makes me think: if/when I should finally ditch my RAID 5 storage server and build an ZFS server with server hybrid storage (which is totally different from desktop hybrid storage).

Many of the great references at Understanding how to use SSD as Hybrid Storage Pools for ZFS point to the old sun.com site, and suffer from link rot. A few I found back: Read the rest of this entry »

Posted in Hardware, Internet, LifeHacker, Power User, SSD | Leave a Comment »

When your WiFi fails, use Device Manager to disable/enable the Wireless LAN device

Posted by jpluimers on 2012/08/06

I’ve seen this happen on various brands of hardware, and various flavours of operating systems:

over time (usually a few days or even weeks of use) suddenly your WiFi connection doesn’t want to connect to some or any of your wireless networks. Most often this happens when you wake up your machine from sleep.

What doesn’t work is flipping the Wireless LAN device off and on using a physical switch.

What usually works for Mac, Windows and even Android is either of these (from least intrusive to most intrusive): Read the rest of this entry »

Posted in Power User, Windows, Windows 7, Windows Vista, Windows XP | Leave a Comment »

OpenVPN connect to the same LAN (bridged mode) (via: The VPN Menu — Endian UTM Appliance v2.4 documentation)

Posted by jpluimers on 2012/08/03

Another research item:

Need to provide access through OpenVPN to the same LAN as where the OpenVPN server runs on.

This is unusual, and requires a bridged OpenVPN solution.

Jürgen Schmidt wrote a nice article on this in 2008.

Endian community edition seems to support this out of the box:

Server configuration

In this panel you can enable the OpenVPN server and define in which zone it should run.

OpenVPN server enabled

Click this to make sure the OpenVPN server is started.

Bridged

If you want to run the OpenVPN server in one of the existing zones check this box. ..

note:

If the OpenVPN server is not bridged you must set the
firewall rules in the VPN firewall to make sure clients
can access any zone - unless you do not want them to.

VPN subnet

This option is only available if you disable bridged mode, which allows you to run the OpenVPN server in its own subnet that can be specified here.

Bridge to

If bridged mode has been selected here you can choose to which zone the OpenVPN server should be bridged.

Dynamic IP pool start address

The first possible IP address in the network of the selected zone that should be used for the OpenVPN clients.

Dynamic IP pool end address

The last possible IP address in the network of the selected zone that should be used for the OpenVPN clients.

–jeroen

via: The VPN Menu — Endian UTM Appliance v2.4 documentation.

Posted in *nix, Endian, Linux, OpenVPN, Power User | Leave a Comment »

Clearing the CodeRush SolutionCache directory from your roaming profile @CodeRush (via: The Curly Brace: How to Clear DevExpress CodeRush Assembly and Solution Cache)

Posted by jpluimers on 2012/08/02

Your CodeRush SolutionCache folder (which is in your roaming profile, how bad!) can grow to multi-gigabyte proportions as it is not auto-cleaned.

This can lead to very long times for doing logon/logoff in a corporate network.

Mike Christian describes how to clean it.

Note that as of a few versions ago, the AssemblyCache is now a subfolder inside the SolutionCache folder.

Another reason to clean it is when CodeRush starts acting weird.

–jeroen

via: The Curly Brace: How to Clear DevExpress CodeRush Assembly and Solution Cache.

Posted in .NET, C#, Development, Software Development, VB.NET, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

Dear fellow social media users, please post screen shots as PNG, not as JPEG image files

Posted by jpluimers on 2012/08/01

I still see many people post screen shots as JPEG images.

JPEG images introduce distortion, and usually are bigger than PNG images.

The PNG images are more crisp, and have more vibrant colors.

So dear fellow social media users: please post screen shots as PNG images.

Comparison: the JPEG on the left is 120 kilobyte, the PNG on the right only 60 kilobyte and looks much better.

JPEG PNG 

Posted in G+: GooglePlus, LinkedIn, Power User, SocialMedia, Twitter, WordPress | 4 Comments »

on my .NET research list: Mini (Raspberry Pi) and Micro (Arduino)

Posted by jpluimers on 2012/08/01

Computing on not so common platforms it so much fun, especially when you can use familiar tools for it.

A couple of years ago, I did a fun project with an USB WebCam, a Pololu USB servo controller, two servo motors, a servo relay and a laser pointer. The device would point the laser pointer at the biggest moving object in the WebCam view, and flash the laser pointer at it.

All code was C# running on Windows.

Basically there are two classes on “small” devices that run .NET code (apart from smartphones and tablets):

  • Raspberry Pi:
    Mini devices with more than a couple of megabytes memory running a kind of regular .NET Framework.
  • Arduino:
    Micro devices with maximum of a couple of dozen kilobytes memory (a megabyte if you are really lucky) running the .NET Micro Framework

This might be a chance to lift it to a new level and embed everything in one device (:

The cool thing about the .NET Micro Framework is that you can do real time stuff.

–jeroen

via:

Posted in .NET, Arduino, Development, Hardware Development, Raspberry Pi, Software Development | 2 Comments »