The Wiert Corner – irregular stream of Wiert stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20120127-Microsoft-Visual-Studio-2010-New-Work-Item-menu-still-loading...-(try-again-in-a-moment)

    20120127-Microsoft-Visual-Studio-2010-Cannot-navigate-to-definition.Disable-this-productivity-power-tool

    20120127-Microsoft-Visual-Studio-2010-Cannot-navigate-to-definition

    More Photos
  • Pages

  • All categories

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

    Join 366 other followers

Archive for November, 2010

Volgende week woensdag: Hands-On Delphi Developer Workshop (8 december 2010, 08:30-17:00 Jaarbeurs Utrecht)

Posted by jpluimers on 2010/11/29

Volgende week woensdag geef ik tijdens de Hands-On Delphi Developer Workshop een sessie over Delphi Productiviteit

Er zijn nog een aantal plaatsen vrij.
Deze unieke dag kost slechts EUR 69,95 exclusief BTW, dus pak die kans!

Mijn sessie is de laatste van de dag; eerder zijn deze sprekers aan bod:

  • Danny Wind van de DelphiCompany: Cloud Data Storage Using Azure
  • Pawel Glowacki van Embarcadero: DataSnap (Engelstalig)
  • Bruno Fierens van TMS Software: Ontwikkel Office 2007/ Office 2010 style applicaties

Het doel van mijn sessie is om interactief met wat opdrachten te zien hoe je productief kunt zijn in Delphi.
Er is genoeg ruimte voor discussie, dus heb je zelf ook tips: kom er gerust mee!

Ik begin te laten zien wat ik minimaal aan mijn Delphi ontwikkelstraat toevoeg om een productief basis-systeem op te zetten.
Delphi specifieke tools als GExperts en ModelMaker Code Explorer komen aan bod, maar ook externe tools als Everything en SysInternals: tools die zowel geïntegreerd als los te gebruiken zijn.

Verder ga ik in op de versiebeheer integratie van SVN in Delphi: wat als er nieuwe versies zijn, hoe ziet u verschillen met oude versies, etc.
Er is voldoende gelegenheid om zelf aan de hand van opdrachten met een aantal van deze tools ervaring op te doen.
Tijdens de opdrachten doet u vaardigheden op met refactorings, vergelijkingen, unit testen, etc.

Ook toon ik een een aantal interessante sites die binnen de Delphi community erg gewaardeerd worden.
Genoeg dus om – ook na deze dag – uw kennis verder verrijken.

–jeroen

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

Generate XSD from XML – XSD.EXE versus on-line tools

Posted by jpluimers on 2010/11/23

Quite a while ago, I wrote about the XSD.EXE tool to generate wrapper classes from an XSD file.

Recently, I had to create an XSD based on some XML.
Actually: a client was implementing a tool, that could export some of the data as XML.
That XML had to go into their database.
But the tool vendor told the client that the underlying XSD was ‘not supported’ (odd: why allow exporting XML and then not provide something supporting as the XSD?).

Anyway, the data was not that difficult, but having an XSD at hand made the import process a lot easier.
So lets see how to get a starting XSD from an of XML files (in practice, you would do this with a couple of XML files, then collect the best pieces into your final XSD). Read the rest of this entry »

Posted in .NET, Delphi, Development, Software Development, XML, XML/XSD, XSD | 1 Comment »

Streaming your mp3 collection through an Icecast server using ezstream

Posted by jpluimers on 2010/11/22

With more and more devices supporting media streaming, it is nice to have an audio streaming service in your home.

Setting this up on Windows is pretty straight forward.
What you need is this:

  1. A subdirectory tree with all your songs in MP3 format
  2. Icecast
  3. EzStream
  4. A streaming capable player (Windows Media Player will do)

Lets string these together.

Read the rest of this entry »

Posted in Media Streaming, Power User | Leave a Comment »

NetBIOS Suffixes (16th Character of the NetBIOS Name)

Posted by jpluimers on 2010/11/19

I always forget this, so here is the source on why NETBIOS names cannot be longer than 15 characters in a Microsoft environment:

Microsoft, however, limits NetBIOS names to 15 characters and uses the 16th character as a NetBIOS suffix.

–jeroen

via NetBIOS Suffixes (16th Character of the NetBIOS Name).

Posted in Power User | Leave a Comment »

TFS: moving files using the TF.EXE command-line utility (Team Foundation System)

Posted by jpluimers on 2010/11/18

I recently needed to move around a bunch of files in TFS to a new directory structure.

Doing that from within the Visual Studio 2010 IDE was tedious, so I wrote a batch-file like below.
This batch file should also work for Team Foundation System 2005 and 2008.
Notes:

  • %~dp1 fetches the drive + directory from %1.
  • %~nx1 fetches the filename + extension from %1.
  • relative target directories work better than absolute ones
  • the batch-file assumes it executes with the current directory is %sourceDirectory%

Read the rest of this entry »

Posted in Development, Source Code Management, TFS (Team Foundation System) | Leave a Comment »

A truckload of RDP documentation

Posted by jpluimers on 2010/11/17

Recently, I came across this truckload of documentation around the Remote Desktop Protocol (RDP/MSTSC/RDPCLIP, etc):

Hope it helps a few people finding your way around RDP :-)

–jeroen

Posted in Power User | Leave a Comment »

Hardware Will Cut You

Posted by jpluimers on 2010/11/16

Amanda Wozniak on hardware design (which is almost, but not quite entirely unlike software design).

Quote from a viewer:

Very cool, fast paced intro. Its odd to hear about hardware design from software based world we now have – i started when things were reversed and it was/is near impossible to convey that there are different design processes. I wish production sw folks would realize that prototype != production, but once sw works sorta, it ships. Also interesting views on CAD SW and how unlike photoshop, houdini, etc it is. Perhaps the industry is ripe for a package that does recognize last 15yrs of software improvements.

Quote from the video:

If you want start tinkering around, get an Arduino. It is like 30 bucks…. Arduino is like electronics for artists. If artists can do it, so can you.

–jeroen

via Hardware Will Cut You.

Posted in Development, Hardware Development, Hardware Interfacing | Leave a Comment »

Dropbox Cache – Thats a whole lot of cache! « Dropbox Forums

Posted by jpluimers on 2010/11/15

Actually, the quote below is not true for the DropBox version 0.7.110 that most people use:
Your cache may contain directories older than 3 days.

only remote deletions are moved to the cache (and only stay for 3 days :-)

My cache was only half a gigabyte (about 10% of my actual dropbox size), but many people report much bigger caches.

It is easy to clear your DropBox cache, no matter on what OS you use it.

–jeroen

via Dropbox Cache – Thats a whole lot of cache! « Dropbox Forums.

Posted in Power User | Leave a Comment »

Solution for error “13.05.00″ fuser jam on HP 9500/9500hdn

Posted by jpluimers on 2010/11/12

When you get this error on your HP Color LaserJet 9500/9500HDN repeatedly, and the solutions mentioned here don’t help, then check also the inside of the fuser (HP part number C8556A).

Steps to check:

  1. Turn off the printer
  2. Take the fuser out of the printer
  3. Wait for the fuser to cool down
  4. Open the fuser using the green tip (see picture below)
  5. Pry out the paper
  6. Close the fuser
  7. Insert the fuser in the printer
  8. Turn on the printer
  9. Perform a test print on the printer

This took me quite a while to figure out, as the paper gets stuck on the opposite side of the fuser, not at the side where you can open the inside of the fuser.

Hope this helps a few people :-)

–jeroen

via: “13.05.00″ fuser jam 9500hdn – Google Search.

Note: click on the image to see a bigger version.

HP Color LaserJet 9500/9500hdn fuser (part number C8556A)

HP Color LaserJet 9500/9500hdn fuser (part number C8556A)

Posted in Hardware, Power User | 2 Comments »

PowerShell: the 2 most common error messages for starters

Posted by jpluimers on 2010/11/11

I’ve waited for PowerShell to become pretty mature before diving into it:
Version 2 has been out for a year, no service packs have been needed, so time to get into it.

PowerShell code can be stored in scripts.
The convention is to use the .ps1 extension for that (even when running PowerShell 2.0. Lesson learned: don’t put version numbers in file extensions).

Having lots of scripting and programming experience, I was a PowerShell beginner, and similar people usually bump into a few error messages.

Luckily, lots of people have gone through that phase, so there is lots of help on the internet.
So this post is not only to show you about some common things you bump into when starting with PowerShell, but also about the power of the internet as a collective pool of knowledge.

This was the first error message I bumped into:

C:\bin>powershell first-script.ps1
The term ‘first-script.ps1′ is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
At line:1 char:16
+ first-script.ps1 <<<<

A message by mosoto (Marcel J. Ortiz Soto) answered this as one of the first in the search results for “is not recognized as a cmdlet, function, operable program, or script file”.
The reason for this error is that unlike cmd.exe (but similar to unix shells), PowerShell does not include the current working directory (.) in the search path.

Solution: prepend the directory for your script file, in this case by prefixing it with “.\”.

This immediately leads to PowerShell rookie error message 2:

C:\bin>powershell .\first-script.ps1
File C:\bin\first-script.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
At line:1 char:18
+ .\first-script.ps1 <<<<

Even though searching for “cannot be loaded because the execution of scripts is disabled on this system” quickly reveals a few posts describing the cause, the error message gives a hint: get-help about_signing.

Executing this on the command-prompt gets youa lot of help about signing:

c:\bin>PowerShell get-help about_signing

This is the summary:

  • PowerShell scripts can be signed.
  • PowerShell as a global execution policy defaulting to Restricted.
  • By default, PowerShell does not want to run any scripts at all.
  • You can assign these values to the execution policy: Restricted, AllSigned, RemoteSigned and Unrestricted
    (note the policy is global, so changing this changes it for your whole system)

This is how you ask for the current policy:

C:\bin>powershell Get-ExecutionPolicy

This is how you set the current policy to only require remote scripts to be signed:

C:\bin>powershell Set-ExecutionPolicy RemoteSigned

Now you can run unsigned local scripts.
Beware: if anyone sends you a virus in an unsigned PowerShell script, that can now be executed too!

Hope this helps a few other PowerShell rookies too :-)

–jeroen

Posted in CommandLine, Development, PowerShell, Software Development | Leave a Comment »

Free ebook: Programming Windows Phone 7, by Charles Petzold – Microsoft Press – Site Home – MSDN Blogs

Posted by jpluimers on 2010/11/10

If you want to do Windows Phone 7 development, then get this book: Programming Windows Phone 7 by Charles Petzod.
The eBook and source code are free:

This book is a gift from the Windows Phone 7 team at Microsoft to the programming community, and I am proud to have been a part of it. Within the pages that follow, I show you the basics of writing applications for Windows Phone 7 using the C# programming language with the Silverlight and XNA 2D frameworks.

Yes, Programming Windows Phone 7 is truly a free download, but for those readers who still love paper—as I certainly do—this book will also be available (for sale)

In addition to C# and VB.NET, you can also do this in Delphi Prism.

Cool times ahead, because now there are 4 major competitors (in no particular order):

  • iPhone
  • Android
  • Windows Phone 7
  • Symbian

I left out the competitors of the past, as they soon will be deprecated.

–jeroen

via Free ebook: Programming Windows Phone 7, by Charles Petzold – Microsoft Press – Site Home – MSDN Blogs.

Posted in .NET, C#, Delphi, Development, Prism, Software Development | 1 Comment »

More on Delphi x64 by twitter kylix_rd (Allen Bauer)

Posted by jpluimers on 2010/11/09

As a continuation of the previous assembly, the new twitter kylix_rd messages on Delphi x64 (and some reactions by Danny Thorpe):

To save people from browsing Twitter history:

kylix_rd:

Interesting x64 fun fact: RIP relative addressing. Some instructions that use a 32bit offset, are interpreted as [RIP+offs].
7 nov

@danny_thorpe Add x64 and it happens even more.
7 nov

Because of the way the Intel instructions are encoded, it is possible to encode the same effective instruction in different ways.
7 nov

You know what would have made the x64 “REX” prefix moniker even better? They could have called it T-REX.
7 nov

As much as people like to deride the aging x86 architecture, I gotta admit that AMD did a fine job of stretching it into 64bit land.
7 nov

@davidheff Undetermined. There are plenty of reasons to deliver them separately. Either way will have no impact on the results.
2 Nov

Be ready for 64 bit: In Delphi XE, this “Component.Tag := NativeInt(Self);” will just recompile in 64 bit.
2 Nov

@davidheff Oh don’t worry… there will be plenty who will find that “limiting”, if only in concept and not in the real world :-)
2 Nov

x64 Fun Fact: JMP opcodes/offsets are identical to 32bit. Can only xfer control to an address +/- 2GB away. Thus the PE image size limit.
2 Nov

danny_thorpe:

@kylix_rd I remember digging through the x64 specs. Fun times til mgmt shut it down. Still have my Amd x64 laptop circa 2003 or so.
8 nov

@kylix_rd You just noticed? :P
8 nov

davidheff:

@kylix_rd is it still on course to be a cross-compiler as announced by Nick – single 32 bit compiler that can create 32 and 64 bit images
from Stavanger, Rogaland
2 Nov Favorite Retweet Reply

@kylix_rd Actually, I wonder whether the compiler wouldn’t give out first at such a monstrous demand
from Stavanger, Rogaland
2 Nov

@kylix_rd Think most of us should be able to avoid creating 2GB images!!!!
from Stavanger, Rogaland
2 Nov

–jeroen

via Allen Bauer (kylix_rd) on Twitter
Danny Thorpe (danny_thorpe) on Twitter
David Heffernan (davidheff) on Twitter

Posted in Delphi, Development, kylix_rd, SocialMedia, Software Development, Twitter | 5 Comments »

Updating your Endian FireWall Community Edition appliance

Posted by jpluimers on 2010/11/08

When updating one of my Endian FireWall Community Edition VMs, I found out that one of my test VMs was still at version 2.2rc3.

Two important points: The update site (which you can use if you registered) tells you to follow 5 steps to keep your Endian Firewall Community up to date, but forgets to:

  1. point you to the Endian documentation on enabling SSH
  2. mention that one of the steps is conditional, and the condition is phrased “If your Endian Firewall Community is older than version 2.2“.
    Note that all the 2.2 rc versions are considered older than version 2.2, so in those cases, you also need to perform this:

Read the rest of this entry »

Posted in *nix, Endian, Power User | Leave a Comment »

#vodafone #3G #UMTS transparent http proxy #fail: it breaks the #hyves on-line mail system

Posted by jpluimers on 2010/11/05

When connecting through Vodafone 3G/UMTS, it leads all http traffic through a transparent proxy.

In The Netherlands, hyves is a pretty popular social network (especially for maintaining the family and friends part of your networks).
Vodafone 3G/UMTS breaks the email functionality of hyves.

The Vodafone transparent proxy loads http://1.2.3.4/bmi-int-js/bmi.js, and I bitten by this proxy before, so it was pretty easy to find the cause.
There is no work around (apart from RDP-ing into a remote machine and doing all the browsing from there).

I’ll blog about what Vodafone does in a future blog post, because they do a couple of things that I think are pretty rude.
But more on that later.

Most important thing to know that if something doesn’t work that normally works, and the only difference is that you are connected through Vodafone 3G/UMTS, then it is probably their transparent HTTP proxy breaking it.

–jeroen

Posted in Opinions, Power User | Leave a Comment »

Delphi refactoring bugs – need input

Posted by jpluimers on 2010/11/04

One of the reasons that people are wary of using Delphi refactorings, is that some of them are not always reliable.

The only way to get them resolved is filing good bug reports.
But filing a good bug report is difficult: you need reproducible cases, and finding those can be tough.

Some of the refactorings can only be done by tools that have access to the complete compiler.
Which means that 3rd party tools like Model Maker Code Explorer, Castalia, cnPack and others cannot provide.

So I need some help in filing bugs centered around the refactoring topic:

  • Indicate weak points of the various refactorings
  • Help finding reproducible steps

Here are a few examples I filed recently:

  1. “No statements are selected” when performing “Extract Method” refactoring from case statement
  2. Complete case statement extracted when performing “Extract Method” refactoring from case statement
  3. Refactoring “Find Unit” often does not work any more

Please put your suggestions in the comments!

–jeroen

Some notes:

  1. Set Delphi “Block Indent” to 3
  2. Refactor – Extract method: it uses a Block Indent of 2.

Posted in Delphi, Development, Software Development | 6 Comments »

Some ASX information in order to create a partical XSD schema of it

Posted by jpluimers on 2010/11/03

I tried searching for an XSD or other schema that describes ASX (Advanced Stream Redirector) files, but somehow could not find them.

The ASX files can be used to generate a playlist, but they are a bit richer in content than the WPL (Windows Media Player Playlist) file format.

So here is a post with some references to ASX files, examples, documentation and an XSD you could use for ASX files, and why ASX is not valid XML, it is just well-formed. Read the rest of this entry »

Posted in .NET, C#, Delphi, Development, Software Development, XML, XML/XSD, XSD | 2 Comments »

Interesting Delphi questions on StackOverflow by Ian Boyd in constructors, methods and directives.

Posted by jpluimers on 2010/11/02

Last month, Ian Boyd posted a series of interesting questions on StackOverflow.

They all handle specific situations on methods (especially constructors), classes and directives.

He used them to get a more detailed picture of how that all fits together.

Interesting reading!

–jeroen

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

More Delphi x64 bits – Allen Bauer (kylix_rd) on Twitter

Posted by jpluimers on 2010/11/01

To save people from browsing Twitter history:

danny_thorpe:

@davidheff @kylix_rd x64 has SSE2 for FP ops. 8 directly addressable 64bit XMM FP registers. 8087 FP ops emulated in microcode, deprecated

28 Oct

@kylix_rd You mean critical mass isn’t church service on Christmas and Easter?

27 Oct

@kylix_rd Bah. What do they know about floating point? :P MSVC turns off all the FP hardware (exceptions) by default already!

27 Oct

@kylix_rd Yes, we did. The reason was Extendeds don’t exist at all in CLR. x64 FP ops only supporting 64 bit floats is justification

27 Oct

@kylix_rd Ok, so your cause/effect statement was incomplete. :P Shame to see extendeds go. How to count all atoms in the universe now?

27 Oct

@kylix_rd That doesn’t follow. You could still pass extendeds on the stack (not using the x87 register stack)

27 Oct

kylix_rd:

@davidheff Yes. Alignment is critical. Even the stack must remain properly aligned. Its all part of the ABI.

27 Oct

@davidheff SSE instructions and the xmm0:xmm15 registers.

27 Oct

@danny_thorpe That and the fact that MS strongly discourages the use of the FP coproc on 64 bit Windows.

27 Oct

@danny_thorpe Extendeds don’t align well, FP ops would dumb them down, sub-optimal codegen, are other reasons to drop them.

27 Oct

http://goo.gl/D0Kv. “The x87 register stack is unused. … must be considered volatile across function calls” So, Extended = Double.

27 Oct

As speculated, the Tag property will become a NativeInt.

27 Oct

@malcolmgroves @seanbdurkin And if we change the underlying implementation, don’t complain… mkay?

27 Oct

The elephants in the room. Max 64bit PE image size 4GB. Extended = Double (since xmm0-xmm4 are for FP param passing).

27 Oct

Number of calling conventions in x64 – 1. pascal, register, cdecl, stdcall… gone, treated as nop.

26 Oct

Wow… just a few tweets about D64 and I get flooded with new followers. Welcome to all my new followers from the last 24 hours.

26 Oct

Most common 64bit data models, LP64 and LLP64. Windows = LLP64, Linux, OSX = LP64. D64/Windows = LLP64.

26 Oct

64bit gotcha: SizeOf(THandle/HWND/HMODULE/Hxxxx) = SizeOf(Pointer) = 8. This isn’t valid: Value := Integer(Handle).

26 Oct

Type sizes for 64: SizeOf(Integer)=4, SizeOf(NativeInt)=SizeOf(Pointer)=8,

26 Oct

If you must… Value := Integer(TList[x]) -> Value := NativeInt(TList[x]). Even better, TList.

26 Oct

via Allen Bauer (kylix_rd) on Twitter
Danny Thorpe (danny_thorpe) on Twitter

Posted in Delphi, Development, kylix_rd, SocialMedia, Software Development, Twitter | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 366 other followers