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

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 | 11 Comments »

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 | 3 Comments »

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 (see below).
  • 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 if not specified, the policy is global, so changing this changes it for your whole system, so better define the scope)

Documentation is at:

If you set the execution policy in all scopes to Undefined and the Group Policy is not set, the default execution policy, Restricted, is effective for all users of the computer.

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, Conference Topics, Conferences, Development, Event, PowerShell, Software Development | 2 Comments »