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

ISO 8601 Date, Time and DateTime in Delphi (was: Simple example to show DateTime.Now in ISO 8601 format on ideone.com | Online C# Compiler & Debugging Tool)

Posted by jpluimers on 2011/08/18

In the past I wrote about a Simple example to show DateTime.Now in ISO 8601 format on ideone.com | Online C# Compiler & Debugging Tool , using ISO 8601 in batch-files, and how ISO 8601 is used in Google Calendar URLs.

Time to write something about ISO 8601 Date, Time and DateTime and Delphi.

First of all the DateUtils unit contains a bunch of routines (for instance DecodeDateWeek) that understand ISO 8601 week numbers, where:

  • Weeks start at Monday
  • The first week of a year contains (these are equivalent):
    • The first thursday in that year
    • Has at least 4 days in that year
    • Contains the 4th of January

Otherwise the week containing January 1st is week 52 or 53 of the previous year

ISO 8601 also specifies how to format Dates, Times,  DateTimes and durations according to some basic principles.

XML uses ISO 8601 to format Date, Time and DateTime and some other formats as text too.

So it is no wonder that since Delphi 6, it contains a XSBuiltIns unit covering (among other things) ISO 8601 formatting.

Given the many Delphi ISO 8601 relates questions on StackOverflow of which I answered two, and my need for ISO 8601 DateTime conversion for exporting Excel XML, here is are some samples to get started in the unit below (and in this codeplex changeset).

The unit covers Date, Time and DateTime.
You can write similar code for Duration.

Oops, I covered it already in ISO 8601: Delphi way to convert XML date and time to TDateTime and back (via: Stack Overflow)

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, ISO 8601, Power User, Software Development | 4 Comments »

Why is LTE equipment being installed in an Apple Store? — Engadget

Posted by jpluimers on 2011/08/17

Interesting: is Apple going to include LTE in their next product line?

Not that we will have LTE in The Netherlands soon, we won’t, we only have one test network at Tele2 :)

–jeroen

Via: Why is LTE equipment being installed in an Apple Store? — Engadget.

Posted in iOS, iPad, iPhone, Power User | Leave a Comment »

some reflections on #Delphi #FireMonkey support for #iOS based on the #FPC compiler that caused quite a surprise

Posted by jpluimers on 2011/08/17

When looking over a few forums, it seems that the way Delphi XE2 will support FireMonkey on iOS (by using FPC aka the FreePascal Compiler) was very surprising, even for the FPC dev team.

Actually, Embarcadero’s Michael Swindell posted some very interesting reactions on the Lazarus forum and his series of comments on Jon Lennart Aasenden blog entry discussing Delphi XE2 and iOS.

Recommended reading!

A lot of pieces of the puzzle fall into place now: Embarcadero aquiring KSDev (that made DXScene/VXScene), and the support in FPC 2.5.1 for a more Delphi Language compatible syntax, and Objective Pascal binding to Objective C as indicated by Phil Hess. VGScene already supported iOS using FPC in Delphi Mode, as this thread on the embarcadero forums also indicates, so it is logical that FireMonkey does too.

Embarcadero, FreePascal and RemObjects are in parallel (and sometimes cooperation) working on cross platform compiler development.
For the Mobile world, ARM (for iOS) and Java (Android, BlackBerry) are very important.

Clearly, Borland was far ahead of its time when they demonstrated their dcc32j Delphi to Java bytecode compiler proof of concept at BorCon conferences back when their opening evenents had great videos (I think it was both at BorCon 1998 and BorCon 1997), and not so great shifts (the Inprise identity crisis).

The same holds for the Sun’s slogan “the network is the computer” (actually by John Gage): basically that was about predecessors of Cloud computing.

Things from the past come back, sometimes presented as “new”, a few (partially from this Evolution of Pascal programmers.stackexchange.com thread):

All of those are (partial repetitions) of technologies that help you build systems. The trick is how to be able to quickly learn and apply those technologies (as opposed to add a bunch of TLAs or FLABs wich are about the only thing that most modern “recruiters” use to match résumés/CVs to positions).

Some of the things above have died, or are not in wide use any more.
That is OK: Life can’t have ups without having downs, and without some form of long wavelength repetitions: that’s what makes the journey so interesting (just think about the financial markets, there will be good times…).

Using FPC for iOS opens the road to develop applications using a very productive environment consisting of the Delphi IDE and the FPC compiler in a short while from now.

–jeroen

PS: two more events that I will be attending and/or speaking:

PS2: Now it probably is more clear why I bought and installed my Mac Mini Server last year :)

Posted in .NET, C#, Delphi, Development, Java, Software Development | 6 Comments »

#Unlocking non-branded #HTC #Sensation: HTCdev – #Unlock #Bootloader

Posted by jpluimers on 2011/08/16

For fellow non-branded HTC Sensation users: HTC now allows unlocking your bootloader: HTCdev – Unlock Bootloader.

–jeroen

Posted in Android Devices, HTC, Power User | Leave a Comment »

Revisited: .NET/C# – TEE filter that also runs on Windows (XP) Embedded « The Wiert Corner – irregular stream of Wiert stuff

Posted by jpluimers on 2011/08/16

More than a year ago, I wrote about .NET/C# – TEE filter that also runs on Windows (XP) Embedded.

Since then, I have made two changes to the code (which is below and in this CodePlex changeset):

  1. using file modes FileAccess.Write and FileShare.Read, which allows you to load the output files with tools opening them in a read-only, deny none mode
  2. optional flush of the files every CRLF pair, or every 4096 bytes

Read the rest of this entry »

Posted in .NET, C#, Development, Software Development | 2 Comments »

Back to the 80s: Apple Pascal on the Lisa Machine

Posted by jpluimers on 2011/08/15

Talking about Pascal history: Index of /pdf/apple/lisa/pascal_monitor.

That was then, soon it will become easy to write Pascal apps for Apple iOS using Delphi XE2 :)

–jeroen

Posted in BitSavers.org, Delphi, Development, History, Software Development | 2 Comments »

Nice deal: ANWB – Ledenvoordeel – Yellowbrick – gratis registratie

Posted by jpluimers on 2011/08/15

Handig als je lid bent: ANWB – Ledenvoordeel – Yellowbrick gratis registratie.

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Tomazy’s Software Development Blog: Testing modal windows in Delphi

Posted by jpluimers on 2011/08/14

Tomazy’s Software Development Blog: Testing modal windows in Delphi.

Recommended reading!

–jeroen

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

Nice gadget: 5Port USB Power Metal Ethernet Network Hub Switch BL-S805-U – DinoDirect.com

Posted by jpluimers on 2011/08/12

Sometimes you are in situations where the number of power outlets and the number of LAN connections is limited.

That’s where the 5 Port USB Powered Ethernet Network Switch BL-S805-U from DinoDirect comes in handy.

It was the only reasonably priced USB powered ethernet switch I could find, and it works like a charm.

Highly recommended :)

Thanks to the BrightHub article that pointed me to it!

–jeroen

via: 5Port USB Power Metal Ethernet Network Hub Switch BL-S805-U – DinoDirect.com

Posted in Gadget, Power User | Leave a Comment »

#fail #rookzone #astmapatient #schiphol personeel weigert in te grijpen

Posted by jpluimers on 2011/08/11

Ik sprak enkele Schiphol medewerkers aan, nadat ik een longpatient hoestend en proestend zich een baan door de massa rokers had zien bewegen, of ze de rokers uit de rookvrije zone naar de (overdekte!) rokerszone wilden sturen.

Wat ik letterlijk te horen kreeg: “We laten die mensen lekker staan, want als we ze wegsturen, staan ze er over 3 minuten weer”.

Ofwel: Schiphol voldoet niet aan haar verplichtingen en laat longpatienten in de kou staan.

Ook na aandringen dat ik het erg op prijs zou stellen, bleven ze bij hun standpunt.

Toen ik aangaf dat ik dan foto’s zou publiceren, gaven ze aan dat dat mocht.

Dus bij deze:

Foto van de rokers om het bord “rookvrije zone” (rechts onder de rest van de overkapping stonden er zeker nog 20):

Foto van de (ook overdekte!) lege rookzone:

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