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

Archive for the ‘Software Development’ Category

Windows library search order (EXE/DLL/module) (via “The Old New Thing”) and max PATH length

Posted by jpluimers on 2013/08/27

From The Old New Thing:

Recall that the library search path searches directories in the following order:

  1. The directory containing the application EXE.
  2. The system32 directory.
  3. The system directory.
  4. The Windows directory.
  5. The current directory.
  6. The PATH.

Note that the PATH environment variable has a limited length, which can be impacted by the installation programs you use and the Windows versions you use.

To be on the safe side, use 1024 or 1920.

I found various limitations: Read the rest of this entry »

Posted in Development, Microsoft Surface on Windows 7, Power User, 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 | Leave a Comment »

Database Workbench 4.4.1 released (via: News @ Upscene Productions)

Posted by jpluimers on 2013/08/22

I like this Delphi program very much: it is one of the database tools with the widest support of back-ends, and friendliest user interface I know.

Oh, and it is by a great Dutch company too: UpScene (:

So this is their release information:

2013-08-19:

Database Workbench 4.4.1 released

This new release of Database Workbench brings new features and fixes for issues reported by our users.

The free Lite Editions will be released later.

Multi-DBMS developer tool

Database Workbench works natively with:

  • Oracle Database
  • Microsoft SQL Server
  • Sybase SQL Anywhere
  • MySQL
  • Firebird
  • InterBase
  • NexusDB

More information about Database Workbench is available at the Database Workbench page, download your copy today via our downloads page, pricing information is available.

This release includes fixes for the InterBase, Firebird, MySQL and Microsoft SQL Server modules, as well as general fixes and small new features.

The full details and list of changes in 4.4.1 is available here.

–jeroen

via: News @ Upscene Productions.

Posted in Database Development, Delphi, Development, Firebird, InterBase, MySQL, OracleDB, Software Development, SQL, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, Sybase | 2 Comments »

.NET/VB.NET: solving the error “The system cannot find the file specified.” “\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.vb”

Posted by jpluimers on 2013/08/22

Bumped into this error a while ago in Visual Studio 2010:

Kind Error
Number 80
Description Unable to open module file ‘C:\Users\username\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.vb’: The system cannot find the file specified.
File C:\Users\username\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.vb
Line 1
Column 1
Project VbPowerPack

(I replaced the column separators by line separators to make it more readable)

The code was using the VBPowerPack download I wrote about before, but that appeared to be irrelevant.

This is how I solved it:

  1. Build -> Clean Solution
  2. Build -> Rebuild Solution
  3. File -> Close Solution
  4. View -> Start Page
  5. Open most recent solution from the Start Page

I’m not the only one that has this problem every now and then.

Thanks to these posts that helped me out with the above solution:

–jeroen

via: “The system cannot find the file specified.” “\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.vb”

Posted in .NET, .NET 4.0, Development, Software Development, VB.NET, VB.NET 10.0, Visual Studio 2010, Visual Studio and tools | 4 Comments »

Made it to the Embarcadero MVP Directory

Posted by jpluimers on 2013/08/21

20130822-Embarcadero-MVPIt has been in the queue for a really long time. In fact, all started when chatting with Anders Ohlsson during the inception of the Embarcadero MVP program.

But then the paper work (you know, the thing with written signatures, fax machines, etc) got buried under some projects that lasted both a lot longer than initially anticipated, and were far more consuming also meaning I could not make it to the developer conferences I originally planned.

Recently, I dug out the paper work, then found out that Jim McKeeth – now leading the MVP program at Embarcadero – could lessen the paperwork substantially.

A few manual steps were still involved on both sides, but now I am on the MVP Directory | General.

There is more to it. This fall, I will not only be making it to, but also speaking during at least 3, maybe more Delphi related events in Europe:

Given the time frame, and increase of information about a Delphi for Android product, it might be out or available for beta blogging by then. You can sign up for the beta here, and according to the roadmap it is estimated for release later this year. I hope to be able to play with that soon enough to at least demo a few bits and pieces of it using my Nexus 4 and HTC Sensation on some of those events.

Hope to see some of you there!

–jeroen.

Posted in Delphi, Delphi XE4, Development, Software Development | 3 Comments »

.NET/C#: LineSplit tool for splitting large text files every number of lines

Posted by jpluimers on 2013/08/21

c# – How to split a text file into multiple files? – Stack Overflow.

c# – File.ReadLines without locking it? – Stack Overflow.

c# – Whats the fastest wto read a file by one line at a moment – Stack Overflow.

Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

shorter version of batch file: getting directory and parent directory

Posted by jpluimers on 2013/08/17

Two years ago, I posted a batch file that gets the parent directory of the batch file that runs.

It was convoluted, using substrings and intermediate environment variables so you needed setlocal.

This one does not any more: for both the directory of the batch file, and the parent directory of that directory, one-liners suffice:


echo batchfile=%0
echo full=%~f0
setlocal
for %%d in (%~dp0.) do set Directory=%%~fd
echo Directory=%Directory%
for %%d in (%~dp0..) do set ParentDirectory=%%~fd
echo ParentDirectory=%ParentDirectory%
endlocal

–jeroen

via: batch files: getting directory and parent directory « The Wiert Corner – irregular stream of stuff.

Posted in Batch-Files, Development, Scripting, Software Development | Tagged: , , , | 1 Comment »

Paint.NET v3.5.11 is now available (via: Paint.NET Blog)

Posted by jpluimers on 2013/08/17

Programmers scale: time versus project completeness

Programmers scale: time versus project completeness

I totally agree that Paint.NET is the best free image and photo editor on Windows.

Writing quality software takes time, not only when writing it in spare time like Rick Brewster does. Getting things “right” is a tedious process and often will set you back: just watch the graph on the right.

So I’m not surprised that it took a very long time after the first Paint.NET 4.0 idea in 2008 to get “close” to a release.

And indeed, it looks like Rick has become much closer which will please many people waiting for Paint .NET 4.

I’m really glad with the announcement that Paint.NET v3.5.11 BETA is now available – Paint.NET Discussion & Questions – Paint.NET Forum.

Edit: while writing this, the final Paint.NET v3.5.11 came out.

It paves the way for Paint .NET 4.0 update in the future, and fixes/improves quite a few things.

A few quotes from it:

This is probably not the update you were expecting I need to push out an update to v3.5 in preparation for the eventual release of v4.0 […] releasing a “beta” today […] I’ll be pushing out the Final/RTM in a few days.

The primary goal of this update is preparing for the v4.0 release: v3.5.10 will not be able to offer the v4.0 update, but v3.5.11 will. […]

Here are the changes for this release:

  • Fixed: The Gaussian Blur effect was incorrectly calculating alpha values for non-opaque pixels. (http://forums.getpaint.net/index.php?/topic/18483-gaussian-blur-mistreats-alpha/)
  • Improved performance of the Sharpen effect by about 25%
  • Improved performance of the Median effect by about 30%
  • Improved performance of the Fragment effect by about 40%
  • Improved performance of the Unfocus effect by about 100%
  • Reduced memory usage when many selection manipulation operations are in the history/undo stack (the undo data is now saved to disk)
  • The built-in updater now supports upgrading to paint.net 4.0 (once it’s available)

There have been rumors floating around that Paint.NET is “dead.” This is not true!

–jeroen

via: Paint.NET Blog | The best free image and photo editor. By Rick Brewster..

Posted in .NET, .NET 3.5, .NET 4.0, Algorithms, Development, Floating point handling, Power User, 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 | Tagged: , , | Leave a Comment »

Reminder to self: Unspecified Error in Delphi 2007 on Windows 8 (via: ACMer)

Posted by jpluimers on 2013/08/15

I might need this for some really old stuff, so here is a reminder: Unspecified Error in Delphi 2007 on Windows 8 | ACMer.

It does work on Windows 7: Problem installing Delphi 2007 on Windows 7 64 Bit Enterprise – Stack Overflow.

–jeroen

Posted in Delphi, Delphi 2007, Development, Power User, Software Development, Windows, Windows 8 | Leave a Comment »

command line – create empty text file from a batch file (via: Stack Overflow)

Posted by jpluimers on 2013/08/15

StackOverflow has [WayBack] quite a [WayBackfew questions [WayBackon creating [WayBackempty text files from a batch file.

Most answers involve the [WayBack] NUL special file (which is not available on one special version of Windows [WayBackWindows Fundamentals for Legacy PCs, but can easily be retrofitted).

[WayBack] This is the solution I use most often:

type NUL > EmptyFile.txt

–jeroen

via: [WayBackcommand line – How to create empty text file from a batch file? – Stack Overflow.

Posted in Batch-Files, Development, Scripting, Software Development | 2 Comments »

.NET/C#: UnitPrefixes class that facilitates distinguishing decimal and binary file/drive/memory size (mega versus mibi, etc)

Posted by jpluimers on 2013/08/14

Everyone knows there is a size difference between a gigabyte of memory, and a gigabyte of disk space.

The former is 102410241024, the latter is 100010001000.

To facilitate this, I’ve created a C# class UnitPrefixes containing quite a few constants and readonly values.

The class is below, but a few interesting facts first:

  • Most values are const, but a few are readonly static variables because they cannot calculated at compile time (the C# compiler by design does very limited calculations at compile time; it is complex enough as it already is).
    As Jon Skeet explains, there are some other differences between const and readonly static, which is why I favour const.
  • Though all consts are positive, I could have used UInt32 and UInt64, but the .NET framework favours signed Int32 and Int64 types for parameters, so to avoid casting, I used the signed ones.
  • There is no Int128 or UInt128, but there is System.Numerics.BigInteger which I use for values too large for 64-bit integers.
    Note that BigInteger is relatively new, so this code will only work in C# 4 or higher, and requires .NET 4 or higher.
    This is also the place where I use the public readonly static fields, as I need to call the BigInteger constructor to initialize it.
  • I used the Decimal type, as the mantissa holds up to 28 digits of accuracy.

I used the Wikipedia pages Binary Prefix and Metric Prefix (I could also have used File Size) for the unit names and abbreviations.

Note that BitsPerByte is a const I needed too, and I will probably add constants for 512 and 4096, as you see those often in computing as well.

The below sample code is also available as a changeset on BeSharp.CodePlex.com. Read the rest of this entry »

Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 4.0, C# 5.0, Conference Topics, Conferences, Development, Event, Jon Skeet, Software Development | Tagged: , | Leave a Comment »