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 »
Posted by jpluimers on 2013/01/07
Experimenting with VMware ESXi5, I accidentally got a GPT formatted USB stick that no Windows XP systems could handle.
I used [Wayback/Archive] 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 »
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:
- 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.
- 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: browser vendor, ca certificate, ca certificates, certificate authority, domain validation, email provider, fake certificates, google, internet, software, ssl connections, technology, web browsers | Leave a Comment »
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: annual report, blog, blogging, excerpt, happy new year, helper monkeys, new year, software development, technology | Leave a Comment »
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 »
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 »
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 »
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 »
Posted by jpluimers on 2012/12/31
Boy, this free AirDroid App makes managing your Android so much more productive as you can do everything from the web-browser on your desktop.
The web-browser makes a secure connection to a small web-server on your Android device.
- with full desktop screen resolution
- upload files
- send messages
- install applications
- manage contacts
- …
Highly recommended!
–jeroen
via: AirDroid-Enjoy your Android Experience over the air.
Posted in Android Devices, Power User | Leave a Comment »
Posted by jpluimers on 2012/12/31
A lot of scripts you find on the internet have hardcoded Windows account names or groups, for instance BUILTIN\Administrators
Those don’t work on many localized Windows versions, as part of the account names have been translated as well. Not only Administrators is translated, but BUILTIN can be translated too. Basically, expect everything in Windows to be translated as part of the localization process.
Some people keep translations lists, but that is not the real solution.
The real solution is that each such group, account or other identifier stems from a SID or Security ID.
Many of those SIDs are the same on any machine, or structured the same within a domain.
Microsoft has a list of these called Well-known security identifiers in Windows operating systems.
That list isn’t in a format most Windows tools use it, so I generated the list below that is more suitable.
The list below is based on a Windows 7 machine. Other versions or editions give slightly different results, but it is a good start.
At the bottom is the batch file that I used to generate this table. That file is adapted from the Microsoft list above.
The batch file depends on a few tools and tricks: 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 | 1 Comment »