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 October, 2011

MonoTouch 5.0 released: iOS 5 support for Mono on the iOS 5 release day

Posted by jpluimers on 2011/10/13

With the and iOS 5 release today and the MonoDevelop 2.8 release last week, there is also a new MonoTouch 5.0 released that binds the two and allows you to develop iOS 5 using Mono.

Almost like a mirracle: on the iOS 5 release day, MonoTouch 5 gets released. Lot’s of new stuff to play with, just read the announcement :)

Quote: “If you already have MonoTouch, simply launch MonoDevelop and you will be prompted to update – it’s that easy!

Be sure to also read the new MonoTouch 5 documentation on new iOS  5 features and the comprehensive API diff between MonoTouch 4.2 and 5.0.

–jeroen

via: MonoTouch 5.0 – MonoTouch.

Posted in .NET, C#, Development, Mobile Development, MonoTouch, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | Leave a Comment »

Last weekend, Dennis Ritchie, passed away at age 70.

Posted by jpluimers on 2011/10/13

Another pioneer in the IT passed away: at age 70, Dennis Ritchie (aka dmr), pioneer, creator of the C programming language and key developer of Unix died this weekend.

Within a week, two pioneering IT people went. Let’s remember them for what they were and wish the people left behind all the best.

–jeroen

via: Dennis Ritchie, 1941-2011: Computer scientist, Unix co-creator, C programming language designer – Boing Boing.

Posted in About, Development, Opinions, Personal | Leave a Comment »

batch files: getting information from your Windows AD

Posted by jpluimers on 2011/10/13

If you have the Windows Server Resource Kit tools installed, then dsget and dsquery can get you some valuable information about the current user and computer.

Below is a sample batch file that shows that dsquery gets you [Wayback/Archive] DNs, and dsget gets you detailed information for a certain type of DN.

You can use pipes (and sometimes you need to [Wayback/Archive] escape the pipes) to pass information from dsquery to dsget.
dsget will happily accept multiple DNs (each on a new line), so you can use text-files with DNs too.

@echo on
    :: this assumes that dsquery, dsget, etc are in the same directory as the batch file
    ::escape pipe with caret
    for /f "tokens=* delims= " %%a in ('%~dp0dsquery user -samid %USERNAME% ^| %~dp0dsget user -desc ^| find /V "dsget succeeded"') do (
    set description=%%a
    )
    ::trim last two spaces
    if "%description:~-2%"=="  " set description=%description:~0,-2%
    echo !%description%!

–jeroen

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

MonoDevelop 2.8 is Here! via: Xamarin blog

Posted by jpluimers on 2011/10/12

Last week, Xamarin released version 2.8 of the MonoDevelop development environment.

Biggest feature is xCode 4 support (which integrated the Interface Builder therefore broke MonoDevelop 2.6).

Since it is hard to run xCode 3 on Mac OS X Lion (Mac OS X Lion more than prefers xCode 4), and you need at least xCode 4.2 beta to develop for iOS 5, this welcome upgrade when you are staying current on Mac OS X.

You can use MonoDevelop to create .NET applications for:

  • iOS (iPhone/iPad/iPod-touch)
  • Mac OS X
  • Android
  • Windows
  • ASP.NET

Be sure to read the MonoDevelop 2.8 release notes, as even the list of Major Highlights is long:

  • C# 4.0
  • Defaults to the 4.0 profile.
  • New Garbage Collection engine
  • New Frameworks:
    • Parallel Framework
    • System.XAML
  • Threadpool exception behavior has changed to match .NET 2.0
    • potentially a breaking change for a lot of Mono-only software
    • See information below in the “Runtime” section.
  • New Microsoft open sourced frameworks bundled:
    • System.Dynamic
    • Managed Extensibility Framework
    • ASP.NET MVC 2
    • System.Data.Services.Client (OData client framework)
  • Performance
    • Large performance improvements
    • LLVM support has graduated to stable
      • Use mono-llvm command to run your server loads with the LLVM backend
  • Preview of the Generational Garbage Collector
  • Version 2.0 of the embedding API
  • WCF Routing
  • .NET 4.0’s CodeContracts
  • Removed the 1.1 profile and various deprecated libraries.
  • OpenBSD support integrated
  • ASP.NET 4.0
  • Mono no longer depends on GLIB

–jeroen

via: MonoDevelop 2.8 is Here! « Xamarin.

Posted in .NET, C#, Development, Mono for Android, MonoTouch, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 1 Comment »

Impersonation on the iSeries: Changing Profile User

Posted by jpluimers on 2011/10/12

When running on Windows, changing the current user is called impersionation.

There are various ways to do this in Windows, including

On the iSeries, there is only one way, as everything goes through the same API: use QSYGETPH (Get Profile Handle) to verify a username/password combination and obtain a handle to the authentication token, then use QWTSETP (Set Profile Handle) to change the user currently signed on, as for instance mentioned by Colin Williams directing to the CHGCURUSR tool on FreeRpgTools.com and an article on Swapping AS/400 User Profiles by Shannon O’Donnel that comes with source code.

On the iSeries, when you are done, you should use QSYRLSPH (Release Profile Handle) when done impersonating, and you need to get the handle from the original user profile if you want to return to it.

The IBM documentation contains a small sample with QSYGETPH, QWTSETP and QSYSRLSPH that sets and restores the profile handle (edit 20120214: it got moved to http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Fapis%2Fapiexushand.htm)

Note that on both Windows ans iSeries, impersonation within a process/thread will make it run in the new context, but the process still keeps the identity of the user that started the process.

If you want to change that, then on both you need to start a new process from the impersonated thread.

In Windows, you can combine the impersionation and the creation of a new process by using the CreateProcessWithLogonW function (as mentioned at the Old New Thing by Raymond Chan). I’ve yet to find an equivalent on the iSeries.

–jeroen

Posted in .NET, C#, Delphi, Development, iSeries, Software Development | Leave a Comment »

EKON 15 conference news and discount (German text at the end of the blog post): Cary Jensen presents the keynote @caryjensen #ekon

Posted by jpluimers on 2011/10/11

EKON 15 – first day has many English sessions

From 26 till 28 of October, I’ll be speaking at the 15th EKON conference at the Renaissance Hotel in Düsseldorf, Germany.

I just sat next to the conference organizer, and he proudly announced that well known and long time Delphi guru Cary Jensen will be presenting the keynote on the evolution of Delphi from Delphi 1 to XE2.

I still have the disks marked “Wasabi” and “Mango” from the early 90s (and funny that Microsoft is using the same name for a 7.5 product, where Delphi 1 was a real revolution).

Next to the German sessions, there will be English sessions as well: Cary also does his other sessions that day (on cross platform development, windows services, and RESTful webservices).

Being a German conference, most of the other sessions will be in German, but it is good that the English ones are all in one day: you get a one-day visit to conference as a non-German speaker, get a discount and visit the beautiful city of Dusseldorf (especially the Altstadt is recommended).

Contact me for more information on discounts: there are both discounts for the English day and the full the whole conference.

On the EKON 15 site there is a nice conference planner and session overview.

Last but not least, on friday after the conference, Edwin van der Kraan and I will present a full day Delphi XE2 workshop covering x64, new VCL and of course FireMonkey cross platform development (so bring your Mac and iOS devices with you!).

15. EKON Konferenz – Delphi XE2 und mehr…

Vom 26. bis zum 28. Oktober findet die 15. Entwickler Konferenz (EKON) im Renaissance Hotel in Düsseldorf statt. Ich werde als Speaker ebenfalls vor Ort sein.

Als ich gerade mit dem Organisator der Konferenz zusammen saß, verkündete er mir stolz, dass Cary Jensen, bekannter und langjähriger Delphi-Guru, auf der EKON 15 eine Keynote zu Delphis Evolution von Delphi 1 zu XE2 halten wird.

Ich bin immer noch im Besitz von Disketten aus den frühen 90er Jahren, die mit „Wasabi“ und „Mango“ beschriftet sind (witzig dabei ist, dass Microsoft den gleichen Namen für ein 7.5-Produkt nutzt, während es bei Delphi 1.0 eine richtige Revolution gab).

Neben den deutschen Sessions werden auf der EKON auch Sessions auf English angeboten: Cary wird unter anderem auch über Cross-Plattform-Entwicklung, Windows Services und RESTful Web Services sprechen.

Zwar werden die meisten Sessions auf Deutsch gehalten, jedoch gibt es diesmal eine Besonderheit bei den englischen Sessions: Diese finden an einem Tag statt!
Somit können auch die Nicht-Deutschsprachigen für ermäßigten Eintritt an den Sessions auf Englisch teilnehmen und ganz nebenbei die schöne Innenstadt Düsseldorfs erkunden
(besonders die Altstadt ist sehr empfehlenswert).

Zu guter Letzt präsentieren Edwin van der Kraan und ich am Freitag einen ganztägigen XE2 Power Workshop zu x64, New VCL und natürlich zur FireMonkey Cross-Plattform-Entwicklung (bringen Sie also Ihre Macs und iOS-Geräte mit!).

Bei weiteren Fragen, Interesse und Infos über die Ermäßigungen können Sie mich gerne kontaktieren (Ermäßigte Preise gibt es sowohl für den English-Day als auch für die Gesamtkonferenz). Auf der Website finden Sie eine übersichtlichen Zeitplaner, die Sessions im Überblick und alle weiter Informationen zur Entwickler Konferenz.

–jeroen

Posted in About, Conferences, Delphi, Development, EKON, Event, Personal, Travel | Leave a Comment »

Bring back support for Smart Device Extensions – Customer Feedback for Microsoft

Posted by jpluimers on 2011/10/11

Having done quite a bit of Windows CE development work in .NET, I totally support the below UserVoice request: re-add support for Windows CE in Visual Studio 2010.

Please vote both the underlying Microsoft connect request, and the uservoice entryif you support it too!

Bring back support for Smart Device Extensions

Microsoft caused outrage when without warning or explanation they dropped support for the Smart Device Extensions. Meaning that there is no support for both managed (Compact Framework) and unmanaged (C++) development for the Windows CE platform.

Microsoft promised support would be added by the time VS2010 was released but then back tracked, to date the official line is use VS2008. This product is nearly 4 years old, it is becoming increasingly more impractical to use VS2008 solely for the purpose of developing for the Windows CE platform. Many development teams invested heavily in the benefit of having a single UI for both embedded and desktop development, with the advent of the Compact Framework skill sets and more importantly the code base could easily be shared across platforms. This is now no longer true, as the desktop development/source control/build/test environments have moved on the embedded development environment is stuck in the past. This means duplication of code, duplication of effort and increased cost.

Anyone wanting to start developing for Windows CE has to first buy an MSDN subscription because you can no longer buy VS2008 retail.

As support for Smart Devices has been inherent in VS since VS2003 many people have been caught out when upgrading to VS2010, in many cases those who make their living in the embedded world are now stuck with no upgrade path. Microsoft has refused to comment or discuss the future of embedded development, this silence has forced many to look at alternative platforms.

One of the top voted suggestions on the Connect site was to restore Smart Device Extension support in VS2010, Microsoft has ignored this in typical fashion.

See the Connect Item.

–jeroen

via Bring back support for Smart Device Extensions – Customer Feedback for Microsoft.

Posted in .NET, .NET CF, Development, Mobile Development, Software Development, Windows CE | 3 Comments »

Forcing decimal dot (.) for number parsing

Posted by jpluimers on 2011/10/11

Small but useful, especially in countries that have something else than a dot (.) as decimal digit separator (all of the green countries: probably more than you’d thought).

The C# sourcecode is really simple use a NumberFormatInfo instance (or an instance of another class implementing IFormatProvider) in a Single.ToString call:

                float number = 3.1415;
                NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
                numberFormatInfo.NumberDecimalSeparator = ".";
                numberFormatInfo.NumberGroupSeparator = string.Empty;
                string numberString = number.ToString(numberFormatInfo);

The classes implementing IFormatProvider are CultureInfo, DateTimeFormatInfo and NumberFormatInfo.

–jeroen

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

Mac practical joke: How to Invert Colors on a Mac – wikiHow

Posted by jpluimers on 2011/10/10

Press CtrlOptionCommand8 in your colleagues keyboard and watch them getting their inverted colours back :)

It is like the 3-finger salute on Windows, but much much nicer, as the inversion is all done on the GPU hardware :)

–jeroen

Via: How to Invert Colors on a Mac – wikiHow.

Posted in Apple, Fun, Keyboards and Keyboard Shortcuts, LifeHacker, Mac, Mac OS X / OS X / MacOS, 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, Power User | Leave a Comment »

Adest Night of Music was een heerlijk feest #anom foto’s komen on-line @adestmusica (dank @Bvdmusic, @Cbalfoort)

Posted by jpluimers on 2011/10/10

Afgelopen zaterdagavond een spetterend feest gehad met Adest’s Night of Music.

Na het duikdrama van afgelopen week, stond ik er ‘s middags bij de generale repetitie toch met gemengde gevoelens: ik wilde wel, maar kon ik het ook waarmaken? Nu kan ik terugkijken of een meer dan geslaagd feest. Hoewel ik zelf niet helemaal de kwaliteit heb geleverd die ik had willen leveren, maakte de rest dat meer dan goed.

In de middag een goede generale gehad, waarbij Charissa Balfoort met mijn camera wat foto’s geschoten heeft.

Wat een opening met Ben van Dijk en Song for Japan, direct gevolgd door een knallende “Where Eagles Sing” van de Drum- en Showband.

Daarna de Jeugdband met hun nieuwe show Zapp Around, daarna samen met Partyband Ain’t no Secret.

De slagwerksectie van de Drum- en Showband ging door met Stinkin’ Garbage, een spektakelstuk dat tijdens de afterparty – onder het mom “we want more” nog een keer werd overgedaan.

Daarna was het de beurt aan Ben van Dijk met de blazers van de Drum- en Showband om drie mooie combinaties van bastrombone en begeleiding te spelen: Blue Topaz, Oblivion en Capriccio.

Tijdens de pauze was saxofonist Wouter Kiers al lekker bezig om tussen het publiek wat sound bites te spelen.

De Stageband ging na de pauze helemaal met hem los: een reeks swingende nummers beginnend bij American Patrol en eindigend met Splanky.

Na het leeghalen van het podium, was het weer de beurt aan de Drum- en Showband met hun Tattoo on Stage show: de eerste keer dat zoiets in Nederland werd gedaan.

Daarna kwam Ben van Dijk om samen met hen de afsluiting Cry me a River te spelen, dat na luid applaus nog eens herhaald werd.

De afterparty was voor Partyband Ain’t no Secret, die tot in de kleine uurtjes lekker door ging.

Terugkijkend op dit heerlijke feest: dat hadden we veel eerder moeten doen :)

–jeroen

Media:

Posted in About, Adest Musica, Personal | Leave a Comment »