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

Asphyre Sphinx 2: X-platform game development for Delphi XE2 and/or FPC

Posted by jpluimers on 2011/12/15

Just found out that during my holiday, Asphyre Sphinx 2 was released: a free 2D/3D framework for X-platform game development that comes with full source code.

It is based on FireMonkey supports Delphi XE2 Update 1 and up, and FPC (and yes: it supports on iOS too).

Interesting stuff!

–jeroen

Via: Asphyre Sphinx 2.

Posted in Delphi, Development, Software Development | Leave a Comment »

Overview of .NET Framework, CLR and Visual Studio version numbers – via StackOverflow.com

Posted by jpluimers on 2011/12/14

I love StackOverflow.com; since they clean out duplicate questions very well, it now is becoming a very good site for reference materials as well.

I won’t duplicate the tables of .NET CLR/Framework and Visual Studio version numbers here as it will age: the tables linked below will somehow be updated by someone. The real power of SO.

–jeroen

Via: How do the .NET Framework, CLR and Visual Studio version numbers relate to each other? – Stack Overflow.

Posted in .NET, Development, Power User, Software Development | Leave a Comment »

WinForms UserControl and Visual Studio 2010 debugging – The process cannot access the file … because it is being used by another process – Stack Overflow

Posted by jpluimers on 2011/12/13

When doing WinForms development in Visual Studio 2010 (including SP1), be aware of a bug with UserControls that hamper debugging; sometimes you get an error like this:

Error 9 Unable to copy file "obj\x86\Debug\MyProject.exe" to "bin\Debug\MyProject.exe". The process cannot access the file 'bin\Debug\MyProject.exe' because it is being used by another process.

When using SysInternals’ Process Explorer to see which process has handles open to MyProject, you will see that devenv.exe (The Visual Studio IDE) is the culprit: sometimes it has a lot of handles open.

The workaround is simple: close all UserControls before debugging your WinForms application.

A real pity, as UserControls are a very useful feature when developing software (many platforms use the same paradigm, .NET certainly wasn’t the first to introduce it, and it is available in for instance WPF as well).

Note that there are other causes of the same error message, but for me this was the issue.

–jeroen

Via: visual studio 2010 – VisualStudio2010 Debugging – The process cannot access the file … because it is being used by another process – Stack Overflow.

Posted in .NET, C#, Development, Software Development, VB.NET, Visual Studio 2010, Visual Studio and tools | 2 Comments »

StayAwake – Android Market: keeps your device

Posted by jpluimers on 2011/12/12

The StayAwake Android app seems to work way better then the “Applications – Development – Stay Awake” setting that the help forum hints for.

The latter will quickly drain my battery when I unplug my Android device.

So far, it looks like the StayAwake app won’t drain my battery  when the device is unplugged. Thanks to the XDA developers forum post that pointed me to it.

–jeroen

via: StayAwake – Android Market.

Posted in Android Devices, Power User | Leave a Comment »

huge “duh” coming up: Dilbert Punch Line Mashups

Posted by jpluimers on 2011/12/09

Over the last 5 years or so, I have followed Dilbert by RSS feed as their website got to cumbersome to use.

So I completely missed the “Dilbert Punch Line Mashups: Write your own Dilbert Punch Line from a Dilbert comic strip“.

For instance, Mashup 131126 is the finishing of 2011-08-08:

Dilbert Punch Line Mashups: Write your own Dilbert Punch Line from a Dilbert comic strip

How Duh is that?

–jeroen

Via: Dilbert Punch Line Mashups: Write your own Dilbert Punch Line from a Dilbert comic strip – www.Dilbert.com.

Posted in About, Personal | Leave a Comment »

Microsoft Office 365 – I always wonder: what will happen on februari 29, 2012 when the year has 366 days?

Posted by jpluimers on 2011/12/09

I always wondered hat will happen with Microsoft Office 365 on Februari 29, 2012 or December 31st, 2012 when it is a learp year with 366 days?

–jeroen

via: 2012 leap year and Microsoft Office 365 – Wikipedia, the free encyclopedia.

Posted in Opinions, Power User | 1 Comment »

Restarting InterBase from the command-line on Windows and Mac

Posted by jpluimers on 2011/12/08

I recently wrote this script for like the upteenth time, so now it is on bo.codeplex.com and in my BIN directory on Windows and in my sh directory on my Mac.

Note for the scripts in this post:

Windows

restart-InterBase.cmd:

net stop IBG_gds_db
net stop IBS_gds_db
net start IBG_gds_db
net start IBS_gds_db

It restarts only the default instance.

Usually it is enough to restart the Guarduan (IBG_gds_db), but sometimes that hangs, so I restart both the Guardian and the DB service (IBS_gds_db).

You can do the same with Firebird of course, and adapt for non-default instances: just find the right service names using a script like this:

sc query

then search the output for entries matching InterBase or Firebird like these:

SERVICE_NAME: IBG_gds_db
DISPLAY_NAME: InterBase XE Guardian gds_db
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

SERVICE_NAME: IBS_gds_db
DISPLAY_NAME: InterBase XE Server gds_db
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

Mac OS X

You can find the name of your Interbase service when you look at the user-installed services:

bash-3.2$ cd /Library/StartupItems/InterBase_gds_db/
bash-3.2$ ls -l
total 16
-rwxr-xr-x  1 root  wheel  636 Oct 21 15:44 InterBase_gds_db
-rwxr-xr-x  1 root  wheel  204 Sep 14  2007 StartupParameters.plist
bash-3.2$ cat StartupParameters.plist
{
  Description     = "InterBase Server";
  Provides        = ("InterBase Database Server");
  Requires        = ("DirectoryServices");
  Uses            = ("Disks", "NFS");
  OrderPreference = "None";
}
bash-3.2$

You can restart the InterBase Database Server using this command:

sudo SystemStarter -vdD restart "InterBase Database Server"

The SystemStarter -vdD parameters make the output add verbose, debugging information and dependencies.
–jeroen

Posted in Database Development, Development, InterBase | Leave a Comment »

Trouble with Google Reader and GEXperts RSS feed :)

Posted by jpluimers on 2011/12/07

While catching up my feeds after an astonishing holiday around the Antarctic Peninsula (some photos at Flickr), I bumped into a Google Reader issue with the GExperts.com RSS feed: all posts seem to be stamped 20111117T0555.

Funny, as I remember being late to report GExperts 1.35 for Delphi XE2 was released a while a go :)

It reminded me to ask Thomas to publish the XE2 version of his Experimental GExperts build though.

Lets hope he is faster than me catching up :)

--jeroen

via: Google Reader feed for GExperts.org.

Posted in About, Antarctic, Delphi, Development, Personal, Software Development, Travel | 7 Comments »

SQL Server inverse of (equals) is ((not equals) or (is NULL)

Posted by jpluimers on 2011/12/07

Usually getting queries right with SQL Server comes down to handling NULL correctly.

For instance, on this table:

MYTABLE
ID LAST_NAME
6 COUNT(*)
1 FOO
2 BAR
3 FOO
4 **NULL**
5 BAR
6 FOO

What are the results of these SELECT statements

SELECT COUNT (*)
FROM MYTABLE

SELECT COUNT (*)
FROM MYTABLE
WHERE     (LAST_NAME = 'FOO')

SELECT COUNT (*)
FROM MYTABLE
WHERE     (LAST_NAME <> 'FOO')

SELECT COUNT (*)
FROM MYTABLE
WHERE     NOT (LAST_NAME = 'FOO')

You might think they are like these, as LASTNAME <> ‘FOO’ looks like the inverse of LASTNAME = ‘FOO’:

  • 6
  • 3
  • 3
  • 3

But in fact the results are these:

  • 6
  • 3
  • 2
  • 2

When you look closely to the SQL statements below, you will see that the inverse of EQUALS contains an IS NULL, the same for the inverse of NOT EQUALS:

SELECT COUNT (*)
FROM MYTABLE

-- inverse of NOT EQUALS
SELECT COUNT (*)
FROM MYTABLE
WHERE     (LAST_NAME = 'FOO') OR (LAST_NAME IS NULL)

SELECT COUNT (*)
FROM MYTABLE
WHERE     (LAST_NAME <> 'FOO')

SELECT COUNT (*)
FROM MYTABLE
WHERE     (LAST_NAME = 'FOO')

-- inverse of EQUALS
SELECT COUNT (*)
FROM MYTABLE
WHERE     (LAST_NAME <> 'FOO') OR (LAST_NAME IS NULL)

-- inverse of EQUALS
SELECT COUNT (*)
FROM MYTABLE
WHERE     (NOT (LAST_NAME = 'FOO')) OR (LAST_NAME IS NULL)
  • 6
  • 4
  • 2
  • 3
  • 3
  • 3

Lesson learned: always take into account NULL when trying to formulate your SQL comparisons well.

–jeroen

Posted in Database Development, Development, SQL Server, SQL Server 2000, SQL Server 2008 | Leave a Comment »

When writing applications, include Keyboard Shortcuts for both the CUA and Windows/Apple shortcuts

Posted by jpluimers on 2011/12/06

When you write applications, it is important to include both the CUA and the Windows/Apple keyboard shortcuts, and get the tab order of keyboard accessible user elements right.

Many modern applications seem to put less and less emphasis on the most efficient user input device: the keyboard.

You should: it makes your application much more pleasant to use.

I wrote about CUA before, but the Windows and Mac shortcuts are just as important.

A small table (please post a comment if you know additions):

Read the rest of this entry »

Posted in .NET, Delphi, Development, Hardware, IBM SAA CUA, Keyboards and Keyboard Shortcuts, KVM keyboard/video/mouse, Power User, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | Leave a Comment »