The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,839 other subscribers

Unix/Linux ln command, I always forget of the left part is the file or link (it is the file)

Posted by jpluimers on 2013/12/06

Like forgetting about the tar syntax, I usually forget which is the left parameter in an ln command (the file or link? it is the file!)

Thanks [WayBackcyberciti.biz:

There are two types of links

  • symbolic links: Refer to a symbolic path indicating the abstract location of another file
  • hard links : Refer to the specific location of physical data.

To create a symbolic link in Unix or Linux, at the shell prompt, enter the following command:

ln -s {target-filename} {symbolic-filename}

–jeroen

via: How to: Linux / UNIX create soft link with ln command.

Posted in *nix, Cygwin, Endian, Linux, Power User, SuSE Linux | 2 Comments »

Owly CI should team up with Ohloh

Posted by jpluimers on 2013/12/05

This was originally scheduled for December 1st at noon and therefore made it to the “Missed Schedule” list as well:

Two interesting sites I found recently:

OwlyCI is like NuGet for Delphi. They add Delphi open source repositories, and provide them as installable packages, and shows build statistics.

Ohloh provides statistics (including build statistics!) for open source repositories (any language and environment)  and shows various other statistics like check in counts, LoC, etc. Koders merged into Oholoh about a year ago.

I think they should team up (:

–jeroen

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

.NET/C#: Some links on validation/guarding/checking

Posted by jpluimers on 2013/12/05

From my link archive:

–jeroen

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 »

SQL Server: some links on BULK IMPORT format files

Posted by jpluimers on 2013/12/04

From my link archive:

Note that for importing decimal/numeric columns, you have two options:

  1. Cast through FLOAT using a FORMAT file
  2. Use OpenRowSet with VARCHAR, then CAST afterwards
    Weird rounding for decimal while doing a bulk insert from a CSV.

Some more links on this:

–jeroen

Posted in Algorithms, CSV, Database Development, Development, Floating point handling, Software Development, SQL Server, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

Windows Development: Switching JIT debuggers (via: Stack Overflow)

Posted by jpluimers on 2013/12/03

StackOverflow user User Sertac Akyuz posted a small Delphi snippet showing how to switch the Windows JIT debugger.

I’ll need to complete it somewhere, but since the concept is interesting, here is his answer:

Write a simple application that would launch the debugger you want in case of an application crash.

Register your app in

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug

In case of an 64bit OS, also to the following key

HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug

add/modify the string named Debugger with value:

"C:..\Win32\Debug\Project1.exe" %ld %ld

A very simple application:

procedure TForm1.FormCreate(Sender: TObject);
begin
  ComboBox1.Items.Add('BDS 16');
  ComboBox1.Items.Add('BDS 15');
  ComboBox1.Items.Add('WinDbg');
  ComboBox1.Items.Add('VS');
  // etc..
  ComboBox1.ItemIndex := 0;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  proc: THandle;
begin
  Assert(ParamCount >= 2);
  proc := OpenProcess(SYNCHRONIZE, False, StrToInt(ParamStr(1)));
  case ComboBox1.ItemIndex of
    0: ShellExecute(0, '', 'C:\..\RAD Studio\9.0\bin\bds.exe',
          PChar(Format('/attach:%s;%s', [ParamStr(1), ParamStr(2)])), '',
          SW_SHOWNORMAL);
    1 : // etc..
    2: ShellExecute(0, '', 'C:\Program Files (x86)\..\windbg.exe',
          PChar(Format('-p %s -e %s -g', [ParamStr(1), ParamStr(2)])), '',
          SW_SHOWNORMAL);
    3: ShellExecute(0, '', 'C:\Windows\system32\VSJitDebugger.exe',
          PChar(Format('-p %s -e %s', [ParamStr(1), ParamStr(2)])), '',
          SW_SHOWNORMAL);
    //..
  end;
  if Bool(proc) then begin
    WaitForSingleObject(proc, INFINITE);
    Application.Terminate;
  end;
end;

–jeroen

via: windows – Switching JIT debuggers? – Stack Overflow.

Posted in .NET, Delphi, Development, Software Development, Visual Studio and tools | Leave a Comment »

Garmin Forerunner 305 GPS – Mac data analysis and blogging | Jon Worth

Posted by jpluimers on 2013/12/02

Indeed, the TrailRunner software is much nicer than the Garmin stuff. It needs the Garmin stuff (in order to download the data from the ForeRunner), and for that you need to have a good quality USB cable, otherwise the Forerunner will charge, but not transfer data).

So if you have a Mac, download TrailRunner – Mac OS X route planning and journaling for iPhone, Nike+ SportBand, Garmin ForeRunner GPS.

–jeroen

via: Garmin Forerunner 305 GPS – Mac data analysis and blogging | Jon Worth.

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, Power User | Leave a Comment »

Mac: Restarting the Mac OS X Dock, Finder, Spaces or Menubar | Stefan Ernst

Posted by jpluimers on 2013/11/29

Only a few more posts left in my “Missed Schedule” backlog. This one was from September 28, and I just needed it again today as Spotlight had some visual leftovers on one of my VMware Fusion desktops.

Thanks to Stefan Ernst:

The Finder crashed:

killall -KILL Finder

The Dock,  DashBoard Widgets, or Spaces (on 10.5/10.6 – Leopard/Snow Leopard) crashed:

killall -KILL Dock

The Menubar crashed/refuses to be clickable, Spotlight misbehaves or some Menu Extra popup does not disappear:

killall -KILL SystemUIServer

One that I found myself: Read the rest of this entry »

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, Power User, SpotLight | Leave a Comment »

Any workaround for this SQL Server Management Studio threading issue?

Posted by jpluimers on 2013/11/29

I just got this error when SQL Server Management Studio 2012 was complaining about the owner of a certain SQL Server 2012 database and tried to copy that message to the clipboard:

This message cannot be copied to the clipboard.
Additional information
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.
Ensure that your Main function has STAThreadAttribute marked on it. (System.Windows.Forms)

Is there anyone who knows how to workaround this issue in SSMA?

–jeroen

Posted in Database Development, Development, Software Development, SQL Server, SQL Server 2012 | Tagged: , | Leave a Comment »

Office Communicator 2007 Keyboard Shortcuts – Communicator – Office.com

Posted by jpluimers on 2013/11/29

I wasn’t aware that Office Communicator supported keyboard shortcuts for text formatting in the chat window.

Since I normally use RDP/MSTSC connections to a work machine (the laptop often moves around which means that network connections aren’t
“persistent”), which means that every once in a while a key like Shift, Alt, Ctrl, or Windows hangs.

That’s how I found out why sometimes the font in the chat window changed a bit: most often the font became strike through, which corresponds to Ctrl-T.

Three things that Microsoft should improve here:

Read the rest of this entry »

Posted in Communicator, Keyboards and Keyboard Shortcuts, Office, Power User, Windows | Leave a Comment »

GertDuino: Raspberry Pi + Arduino in one.

Posted by jpluimers on 2013/11/28

http://www.raspberrypi.org/archives/5308

On my research list…

–jeroen

Posted in Uncategorized | Leave a Comment »