The Wiert Corner – irregular stream of stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

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

    Join 1,297 other followers

How Can I Determine Which Version of Word is Installed on a Computer? – Hey, Scripting Guy! Blog – Site Home – TechNet Blogs

Posted by Jeroen Pluimers on 2014/07/24

Late binding sometimes is your friend:

Set objWord = CreateObject("Word.Application")
Wscript.Echo "Version: " & objWord.Version
Wscript.Echo "Build: " & objWord.Build
objWord.Quit

The accompanying Delphi code:

uses
  System.Win.ComObj;

procedure TTestVersionAgnosticWordMainForm.GetWordApplicationInfoButtonClick(Sender: TObject);
var
  WordApplication: OleVariant;
  Version: OleVariant;
  Build: OleVariant;
begin
  WordApplication := CreateOleObject('Word.Application');
  try
    try
      Version := WordApplication.Version;
      Build := WordApplication.Build;
      LogMemo.Lines.Add(Version);
      LogMemo.Lines.Add(Build);
    finally
      WordApplication.Quit;
    end;
  finally
    WordApplication := Unassigned; // release it
  end;
end;

–jeroen

via: How Can I Determine Which Version of Word is Installed on a Computer? – Hey, Scripting Guy! Blog – Site Home – TechNet Blogs.

Posted in Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Scripting, Software Development, VBScript | 2 Comments »

Delphi syntax for TODO list (via: How set up todo list categories in Delphi 2010 – Stack Overflow)

Posted by Jeroen Pluimers on 2014/07/23

A while ago, some of the TODO comments in my source code disappeared from the TODO list.

I wondered why, so I found this question: How set up todo list categories in Delphi 2010?.

The Delphi TODO item syntax in source code comments is like this (thanks Nelson H C Nepomuceno):

{ TODO 1 -cImportant :Do this!}
// TODO 1 -cImportant: Do this!

My comment there, after I found out I had done a stupid global search replace involving colons:

The important thing is the colon somewhere after the TODO. If you do not have the colon, then the TODO list will not show the comment. Anything after the colon will be the action item in the TODO list.

–jeroen

via: How set up todo list categories in Delphi 2010 – Stack Overflow.

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | Leave a Comment »

The StackOverflow Pascal/DelphiSyntax Highlighter

Posted by Jeroen Pluimers on 2014/07/22

Found out where the StackOverflow Pascal has its origins: What happened to comments in syntax highlighter? – Meta Stack Overflow.

Like any syntax highlighter, it is not perfect (only a Delphi compiler driven highlighter would have a chance to be perfect), but it does a pretty good job and gets better over time.

–jeroen

Posted in Borland Pascal, Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, FreePascal, Pascal, Software Development, Turbo Pascal | Leave a Comment »

Using inotify-wait to check filesystem events

Posted by Jeroen Pluimers on 2014/07/21

Thanks to Using inotify-wait to check filesystem events I got pointed to How to use inotify-tools to trigger scripts on filesystem events which is now on my research list.

–jeroen

Note that Kristian later on commented this:

The solution shown in the article has race conditions and should not be used.

It is based on

while :
do
inotifywait $options && run-backup
done

and that means that while the backup runs, the directory in question is unmonitored. When the backup finishes, new changes may have been accumulating during backup run, but without being picked up by the backup.

A proper solution would do something like

inotifywait -m $options | while read line
do
do-something-that-logs-multile-changes-and-triggers-backup-once
done

The important thing is that “inotifywait -m” does not terminate and hence no changes will be lost. It is wrong to run the backup once in full for each change, though.

 

Posted in *nix, *nix-tools, Linux, Monitoring, Power User, SuSE Linux | Leave a Comment »

Good starting point for RAID information

Posted by Jeroen Pluimers on 2014/07/21

Accurate information about RAID is scattered around the internet.

This is a good starting point IBM’s Understanding RAID technology.

–jeroen

Posted in Power User, RAID | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 1,297 other followers

%d bloggers like this: