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

Archive for 2013

WordPress idea of Responsive (yech) UI Themes

Posted by jpluimers on 2013/01/08

Not sure why unresponsive sites claim to use Responsive UI Themes, but WordPress has a whole new twist on it:

Black bands around your screen...

Black bands on your screen are so last century…

Luckily most other sites have better ides, see this Google Image Search.

–jeroen

via: A Week of Responsive Themes — Blog — WordPress.com.

Posted in Opinions | Leave a Comment »

Delphi Code Monkey: Why Delphi developers should learn Objective-C and XCode

Posted by jpluimers on 2013/01/08

I’ve requested the feed of Delphi Code Monkey by Warren Postma to be added to DelphiFeeds.

In the mean time, read this post, it is awesome: Delphi Code Monkey: Why Delphi developers should learn Objective-C and XCode.

–jeroen

Posted in Delphi, Development, Software Development | Tagged: , , , , | 4 Comments »

Delphi and C# compiler oddities

Posted by jpluimers on 2013/01/08

When developing in multiple languages, it sometimes is funny to see how they differ in compiler oddities.

Below are a few on const examples.

Basically, in C# you cannot go from a char const to a string const, and chars are a special kind of int.

In Delphi you cannot go from a string to a char. Read the rest of this entry »

Posted in .NET, ASCII, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Development, Encoding, Software Development, Unicode | Leave a Comment »

Amended steps for converting a GPT partitioned USB stick to MBR (via Convert GPT Disk to MBR Disk – Windows 7 Forums)

Posted by jpluimers on 2013/01/07

Experimenting with ESXi5, I accidentally got a GPT formatted USB stick that no XP systems could handle.

I used Convert GPT Disk to MBR Disk – Windows 7 Forums to convert it back to MBR.

I needed to perform these DiskPart steps on a Windows 7 machine, as

  • the disk management UI in Windows 7 wouldn’t list “convert to MBR” (probably it shows this option only on non-removable media)
  • the DiskPart Windows XP doesn’t recognize GPT (should have been obvious to me, but still)

–jeroen

Posted in ESXi5, Power User, VMware, VMware ESXi, Windows, Windows 7, Windows XP | Leave a Comment »

TURKTRUST Incident Raises Renewed Questions About CA System | threatpost

Posted by jpluimers on 2013/01/05

A small quote from the very interesting  TURKTRUST Incident Raises Renewed Questions About CA System | threatpost article:

“Subordinate certificates have long been identified as a point of weakness in the CA system. They are typically granted unconstrained power to issue certificates for any domain name. Thus, a leak of one subordinate certificate is seen as equivalent to a leak of authority equivalent to all CAs combined. Worse, subordinate certificates need not be explicitly trusted by the software that authenticates encrypted SSL connections typically your web browser. They inherit their trust from the explicitly trusted CAs that have been vetted by your browser vendor,” Steve Schultze, associate director of the Center for Information Technology Policy at Princeton University, wrote in an analysis of the TURKTRUST incident.

A CA (Certificate Authority) issues certificates, most of which are used for domain validation by web-browsers, email and applications. This allows you to make sure when you communicate with your bank (through a web browser or banking app on your phone) to verify the server of the bank is in fact the server of your bank. Or your email program really talks to the server of your email provider and not some intermediate that spoofs your mails.

If fraudulent certificates get issued for certain domains (sometimes specific like http://www.google.com, sometimes generic like *.yahoo.com, or *.*.com), then you cannot trust those domains any more, nor your communication with them. So communication with your bank could be intercepted and changed, thereby loosing money.

That’s exactly what happened in 2011 and late 2012:

The heart of the problem is twofold:

  1. if a CA somehow (by mistake, hacking or whatever) issues a rogue certificate, it takes a relatively long time to find out it is rogue. In the mean time, everyone trust the rogue certificate, and a lot of damage can be done.
  2. it takes a relatively long time for people to patch their systems making the window of opportunity even bigger (heck, I regularly see systems that have not been patched for months or years).

While a IETF proposal to log all intermediate and end-entity certificates tries to fix 1., make sure you fix 2. by keeping your systems patched.

–jeroen

via TURKTRUST Incident Raises Renewed Questions About CA System | threatpost.

Posted in Opinions | Tagged: , , , , , , , , , , , , | Leave a Comment »

Happy new year! My 2012 blog in review

Posted by jpluimers on 2013/01/04

Wow, it seems that the most popular posts have nothing to do with software development (:

Happy new year everyone!

–jeroen

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

About 55,000 tourists visit Liechtenstein every year. This blog was viewed about 260,000 times in 2012. If it were Liechtenstein, it would take about 5 years for that many people to see it. Your blog had more visits than a small country in Europe!

Click here to see the complete report.

Posted in About, Personal, Power User, SocialMedia, WordPress | Tagged: , , , , , , , , | Leave a Comment »

Forcing Java Update on Windows

Posted by jpluimers on 2013/01/04

Sometimes the Java Update checker crashes in the middle of something.

The long solution to restart it is to logoff/logon or reboot/logon and wait for it to come up.

The short solution is to manually restart it (you probably need to be Administrator to do this though) using either of these commands:

"%CommonProgramFiles%\Java\jucheck.exe" -auto
"%CommonProgramFiles%\Java\Java Update\jucheck.exe" -auto
"%CommonProgramFiles(x86)%\Java\jucheck.exe" -auto
"%CommonProgramFiles(x86)%\Java\Java Update\jucheck.exe" -auto

To keep it simple: The exact command depends (:

  • if you run on an x86 machine or not, or – on an x64 machine – which of the Java versions (x86 or x64) you have installed
  • if the jucheck.exe is in the Java directory itself, or in a Java Update directory

–jeroen

Posted in Development, Java, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003 | Leave a Comment »

Wordify: .NET/C# – Convert enums to human readable values – Stack Overflow

Posted by jpluimers on 2013/01/03

You’d hope that a method like Wordify with the signature below would be simple right?

public static string Wordify(string pascalCaseString)

Not so. Read the rest of this entry »

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

Adding the localized [BUILTIN\Administrators] as SQL Server and giving them SA equivalent rights

Posted by jpluimers on 2013/01/02

On development machines it can be comfortable to add the local Administrators group to SQL Server, and make them equivalent to SA (SQL Server Administrator).

This especially as SA is disabled by default when you install using Windows Authentication mode (which is the default). You can Change Server Authentication Mode to include SQL Server mode, but then you still have to enable SA (you can even rename SA)

This is basically what you want to do:

CREATE LOGIN [BUILTIN\Administrators] FROM WINDOWS WITH DEFAULT_DATABASE=[master];
EXEC master..sp_addsrvrolemember @loginame = N'BUILTIN\Administrators', @rolename = N'sysadmin';
GRANT CONTROL SERVER TO [BUILTIN\Administrators];

There are a few gotchas here:

  • The name of the group BUILTIN\Administrators depends on the localization of your system.
    This is one of the reasons I usually advise clients to have server systems run on the most common ENU (English USA) localization of Windows.
    Another reason is that it is far easier to find information ENU English Messages back on the internet.
  • You need to be SQL Server Administrator to begin with.
    There is a little trick to get this done: you can stop the SQL Server service, then restart SQL Server it in single-user mode.
    In single-user mode, members from the BUILTIN\Administrators group can connect as a member of the sysadmin fixed server role.
  • If you want to access SQL Server as member from BUILTIN\Administrators, you need to run your SQL client tools with the UAC elevated permission (otherwise the Administrative bit is not set, and the BUILTIN\Administrators is not recognized).

That’s what the batch file below solves.

You need to start it as member of BUILTIN\Administrators with elevated privilege (the easiest way is to run it from an elevated command prompt).

It will: Read the rest of this entry »

Posted in Batch-Files, Database Development, Development, Scripting, Software Development, SQL Server, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

.NET regular expressions classic: to compile or not to compile?

Posted by jpluimers on 2013/01/01

Every time I use regular expressions (or post about them), it makes me think about the classic RegEx post by Jeff Atwood: to compile or not to compile.

BTW: Happy 2013!

–jeroen

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