Posted by jpluimers on 2016/07/27
It comes down to these cases for XML elements having maxOccurs="1" (which the default for maxOccurs):
- adding
nillable="true" will convert from a regular type to a nullable type.
- adding
minOccurs="0" will add boolean …Specified properties in the generated C# for each element.
- you can have both
nillable="true" and minOccurs="0" in an element which gets you a nullable type and a …Specified property.
Note I’m not considering fixed or default here, nor attributes (that have use instead of minOccurs/maxOccurs, but do not allow for nillable) nor larger values of maxOccurs (which both xsd.exe and xsd2code regard as unbounded).
From the above, XML has a richer type system than C#, so in XML there are subtle a differences between:
- an explicit
nil in the XML element
- the XML element being absent
- the XML element being empty.
Hopefully later more text and examples to show how to actually work with this.
Delphi related to minOccurs:
Note that xsd2code.codeplex.com (unlike XmlGen#) has at least two forks at github:
From the specs:
–jeroen
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Conference Topics, Conferences, Development, Event, Software Development, XML, XML/XSD, XSD | Leave a Comment »
Posted by jpluimers on 2016/07/26
A while ago, StackOverflow user Kobus Smit did some brilliant editorial work that – due to current state of StackOverflow – sort of fired backwards: his question got marked as duplicate before he could post his excellent answer. After that answer was posted, the oh-so pride SO-demi gods never took any energy to revisit to see which answers were best.
His simple question:
How can my Delphi app easily write to the Windows Event Log?What is the difference between TEventLogger and ReportEvent? How do I use the ReportEvent function?
Which somehow should be encompassed by this Delphi 5 question (apparently that 15+ year old Delphi version is still considered current by the SO demi-gods).
The answer summarises and extends existing answers spread out over StackOverflow and adds an EventLog git repository wrapping the ReportEvent and RegisterEventSource (which somehow is always a pain: Delphi services for instance often forget that).
Lesson learned when doing editorial work:
- prepare both the answer and question in markdown off-line
- ensure you mention in the question that the answer is meant as collection of “best of” answers found elsewhere
- post the question and answer in rapid succession
- cross your fingers for the StackOverflow demi-gods being in a good mood
–jeroen
via: Writing to the Windows Event Log using Delphi – Stack Overflow
Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 1 Comment »
Posted by jpluimers on 2016/07/26
Every methodology has their own. I like the ones in the picture, of which the teacher obviously didn’t get them at all. Maybe because COP 3331 is about Object Oriented Design?
- Denial
- Bargaining
- Anger
- Depression
- Acceptance
Sounds familiar?
–jeroen
via: Name and describe the five key phases of software development….

COP 3331
Posted in Development, Software Development | Leave a Comment »
Posted by jpluimers on 2016/07/25

PowerShell 4.0 is madly in love with “English (United States)”
A long time ago I started writing up my blog post like this in March 2015 when I bumped into this the first time when upgrading from PowerShell 2 to PowerShell 4:
It seems there is no real workaround:
Good and not so good news: after reading the below linked posts, this is what works:
- PowerShell 4 and up works fine with any [Wayback] Lucida Console size (including 12) and boldness
- only when the “Language for non-Unicode programs” is set to “English (United States)”.
- PowerShell 4 works fine with [Wayback] Consolas on any size and boldness
- for any “Language for non-Unicode programs”
So if you’re like me and switch between “Dutch (Netherlands)” and “English (Ireland)” a lot (both use the EURO as currency, but have distinct enough other locale settings to cover a lot of European stuff) then you need to get used to the Consolas font.
Source:
Edit 20210930: a possible solution
I need to fire up some old systems having PowerShell v3 or v4 on them to test the below possible solution.
Read the rest of this entry »
Posted in CommandLine, Development, Font, Lucida Console, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9 | Leave a Comment »
Posted by jpluimers on 2016/07/25
Interesting:
just for completeness:
testssl.sh is a nice, console-based tool to check ssl-setups of any ssl/ts – enabled servers, in oposite to ssllabs
It helped me solving this:
Host: http://www.beginend.net
Reason: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
Within the testssl.sh directory, you can use this to test with many cyphers:
OPENSSL=./openssl-bins/openssl-1.0.2-chacha.pm/openssl32-1.0.2pm-krb5.chacha+poly ./testssl.sh www.example.com
–jeroen
via
Posted in *nix, https, OpenSSL, Power User, Security | Leave a Comment »
Posted by jpluimers on 2016/07/24
Interesting read: De veelbelovende warboel van usb-c – Achtergrond – Tweakers.
This Dutch article explains about the clusterfuck of USB standards and why USB-C cables in the end might be a good thing.
Watch your cables!
–jeroen
Posted in Hardware, Power User, USB, USB-C | Leave a Comment »
Posted by jpluimers on 2016/07/22
One of the things I figured out with Windows 7 and up is that when logging in over RDP an existing user would be disconnected unlike Windows XP that would logoff the existing user.
If you want them to logoff there are basically two options:
I will dig into the scripts one day as I’ve not needed this too often (I use Task Manager for now).
–jeroen
Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows XP | Leave a Comment »
Posted by jpluimers on 2016/07/22
In case I bump into vSphere/ESXi machines that have hyper threading (HT) enabled:
–jeroen
Posted in ESXi4, ESXi5, ESXi5.1, ESXi5.5, ESXi6, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2016/07/21
On the research list: TIdSchedulerOfThreadPool (now that TIdThreadMgrPool is gone).
Need to manage the lifetime of these as I don’t want the threads to live forever, but also don’t want to make the instantiation cost too high.
Most likely I want to wait for them to finish as well upon process exit, so this might be worth a look as well:
–jeroen
Source: delphi – Building Multi threaded TCP/IP Server – Stack Overflow
Posted in Delphi, Development, Software Development | 4 Comments »
Posted by jpluimers on 2016/07/21
Most developers I speak to have trapped into a case of copy/pasting some source code containing quotation marks from documentation or post immediately failing on curly quotes like left double quotation marks (“) and right double quotation marks (”) that should have been regular double quotation marks (").
I’ve tried to search for a way to automate the replacement process to “ASCII quotation marks”, but not found an on-line engine yet. The best I could find was this post: java – Replacing unicode punctuation with ASCII approximations – Stack Overflow.
Note it’s not only the auto-correct of office applications. For instance “blog engines” like WordPress do that too, unless you add a code or pre around them:
- code:
"blog engines"
- pre:
"blog engines"
Very irritating, but apparently nowadays beauty trumps accuracy.
–jeroen
via: xampp – Apache Prefixing Path to Virtual Hosts Path – Stack Overflow.
Posted in Development, Software Development, Source Code Management | Leave a Comment »