I bumped into this a while ago, but since I’ve been doing quite a bit of research lately, it’s worth repeating.
–jeroen
Source: TwistedDoodles • The truth about Eureka. (I say bollocks… A lot!)
Posted by jpluimers on 2018/08/30
I bumped into this a while ago, but since I’ve been doing quite a bit of research lately, it’s worth repeating.
–jeroen
Source: TwistedDoodles • The truth about Eureka. (I say bollocks… A lot!)
Posted in Development, Fun, LifeHacker, Power User, science, Software Development | Leave a Comment »
Posted by jpluimers on 2018/08/30
Interesting question that raise some good tips: [WayBack] How to read data from old delphi application Paradox databases without BDE? I search for freeware or open source solution. – Jacek Laskowski – Google+
–jeroen
Posted in Database Development, Delphi, Development, Paradox, Software Development | Leave a Comment »
Posted by jpluimers on 2018/08/30
A first-hand look from the .NET engineering teams: [WayBack] Handling a new era in the Japanese calendar in .NET | .NET Blog
Very important if your software has to do anything with Japan, which – for global software and web applications – can be a lot.
Via: [WayBack] If you thought Y2K, leap years, easter and lent were complex, take a look at the Japanese era challenge… – Lars Fosdal – Google+
–jeroen
Posted in .NET, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2018/08/29
I stumbled over this commit message in [WayBack] “extended the TestAttribute with “Expected” property (#181)” which isn’t phrased correctly, but adds a very nice feature.
The feature is about WillRaiseAttribute:
constructor WillRaiseAttribute.Create(AExpectedException: ExceptClass; const AInheritance: TExceptionInheritance);
This allows tests like these:
[WillRaise(EOutOfMemory)]
procedure FailMe;
[WillRaise(EHeapException, exDescendant)]
procedure FailMeToo;
[WillRaise(Exception, exDescendant)]
procedure FailAny;
[WillRaise(EOutOfMemory)]
[Ignore('I am not behaving as I should')]
procedure IgnoreMeCauseImWrong;
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2018/08/29
A while ago, I needed several enum types in the same unit with overlapping enumeration values.
Putting each in an encompassing type wasn’t possible and I didn’t want to put each in their own unit.
Luckily, Delphi 2009 introduced the “scoped enum” feature effectively promoting the enumeration type into a scope or namespace.
It is only available at the source code level, as – at least up until Delphi 10.1 Berlin – it is not part of the compiler settings in the project options (see screenshot below).
Since the below was hard to find combined with the word “namespace” I’ve quoted it in full (note an earlier version of the post had a typo here as it was copied from the Delphi 2009 documentation which had SCOPEDEUNMS wrong):
Type Switch Syntax {$SCOPEDENUMS ON}, or {$SCOPEDENUMS OFF} Default {$SCOPEDENUMS OFF} Scope LocalRemarks
The $SCOPEDENUMS directive enables or disables the use of scoped enumerations in Delphi code. More specifically, $SCOPEDENUMS affects only definitions of new enumerations, and only controls the addition of the enumeration’s value symbols to the global scope.
In the {$SCOPEDENUMS ON} state, enumerations are scoped, and enum values are not added to the global scope. To specify a member of a scoped enum, you must include the type of the enum. For example:
type TFoo = (A, B, Foo); {$SCOPEDENUMS ON} TBar = (A, B, Bar); {$SCOPEDENUMS OFF} begin WriteLn(Integer(Foo)); WriteLn(Integer(A)); // TFoo.A WriteLn(Integer(TBar.B)); WriteLn(Integer(TBar.Bar)); WriteLn(Integer(Bar)); // Error end;Note that this is also valid:
Writeln(Integer(TFoo.A));Even though TFoo was not declared with $SCOPEDENUMS ON, the A value can still be explicitly resolved using the enumeration name.
Posted in Delphi, Development, Software Development | 4 Comments »
Posted by jpluimers on 2018/08/28
Since I always forget that you can add a service reference by hand-pasting the full path to a local WSDL file, then hit Go: [WayBack] .net – How to generate service reference with only physical wsdl file – Stack Overflow
–jeroen
Posted in .NET, Development, Software Development, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2018/08/28
As G+ refused to put this in a comment at [WayBack] Does anybody know whether the Embarcadero blogs have got individual RSS feeds? And what’s the URL of the RSS feed for all blogs? … – Thomas Mueller (dummzeuch) – Google+:
No RSS logo is visible for me on the blog pages, but inspecting the source reveals the 404 link below; deducting from that I got 200 results:
- 200: https://community.embarcadero.com/blogs/tags/tag/delphi?format=feed&type=rss
- 200: https://community.embarcadero.com/blogs/tags/tag?format=feed&type=rss
- 200: https://community.embarcadero.com/blogs/tags?format=feed&type=rss
- 200: https://community.embarcadero.com/blogs?format=feed&type=rss
- 200: https://community.embarcadero.com?format=feed&type=rss
- 200: https://community.embarcadero.com/blogs/blogger/listings/haruyuki-m23657?format=feed&type=rss
- 200: https://community.embarcadero.com/blogs/blogger/listings?format=feed&type=rss
- 200: https://community.embarcadero.com/blogs/blogger?format=feed&type=rss
- 200: https://community.embarcadero.com/article/news?format=feed&type=rss
- 200: https://community.embarcadero.com/article?format=feed&type=rss
- 200: https://community.embarcadero.com/answers?format=feed&type=rss
What doesn’t work for RSS (CC +Marco Cantù) as you get 404:
- events
- individual questions
- individual blog posts
Failure examples:
–jeroen
Posted in Delphi, Development, Software Development | 4 Comments »
Posted by jpluimers on 2018/08/28
Since it was not possible to install PowerShell 3 on ancient Windows Server 2003 and Windows Server 2003 R2 machines, I opted for this workaround during the time they were being retired:
I’ve investigating how much work it will be to migrate the machine, as opposed to adapting the scripts with Poshcode/Jaykul modules (of which many have external dependencies that I’d need to check first). It’s about the same order of magnitude, so I’ll be migrating the machine earlier. In the mean time, a different machine will run the scripts and access the required data over a network share.
Source: [WayBack] Is it possible to install PowerShell 3 on a Windows Server 2003 or 2003 R2? – Super User
Posted in CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2018/08/27
[WayBack] I am on a Mac that is bound to an AD Domain. The AD Domain has a 90 days password expiration policy. When will my password expire? $ cat bin/is-passwor… – Kristian Köhntopp – Google+
For my link archive:
| #! /bin/bash — | |
| validFor=$(( 90 * 86400 )) | |
| domainPrefix='/Active Directory/DOMAIN/doma.in/" | |
| lastPW=$(dscl "/$domainPrefix" -read /Users/$USER | awk '/SMBPasswordLastSet/ { print $NF }') | |
| unixPW=$(($lastPW / 10000000 – 11644473600 + $validFor)) | |
| expireDate=$(date -r $unixPW) | |
| echo "Password expires $expireDate" |
Script copied to [WayBack] Kristian Köhntopp: I am on a Mac that is bound to an AD Domain. The AD Domain has a 90 days password expiration policy. When will my password expire? · GitHub
–jeroen
Posted in *nix, Apple, bash, Development, Mac, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, Power User, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2018/08/23
It looks like the Delphi [WayBack] TFileStream.Create does not have an overload that allows you to create or append. Luckily, [Archive.is] TFile.Open allows you to do this when passing the correct [Archive.is] TFileMode enumeration value:
TempStream := TFile.Open(TempPath, TFileMode.fmOpenOrCreate, TFileAccess.faReadWrite, TFileShare.fsRead);
I still wonder why that never made it into a TFileStream.Create overload, or why these overloads fail to use enumerations or sets of modes.
–jeroen
Posted in Delphi, Development, Software Development | 6 Comments »