The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • 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

Archive for the ‘Software Development’ Category

Use SetString if your source memory reagion with characters is not null-terminated…

Posted by jpluimers on 2020/03/03

Too many people forget this (including myself) every now and then) so here is a reminder to use the [WayBackSetString method when assigning strings from memory regions having characters but no null terminator:

Anyway, assuming that you use a Unicode Delphi you want to use SetString in its place:

SetString(password, PWideChar(Credential.CredentialBlob), Credential.CredentialBlobSize div 2);

It was by David Heffernan commenting on [WayBack] I have this code sample on StackOverflow using a function WideCharToWideString… I can’t seem to find anything on this function… – Nils Guillermin – Google+.

Note that like the above Delphi 2009 link (where it is a WideChar function to Unicode string conversion function), it was also available in Delphi 2007 and earlier as [WayBack] SetString.

–jeroen

 

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

Very nice “Appendix A. Introduction to TCP/IP security” on digests, hashing, encryption, asymetric/symmetric, VPN and much more

Posted by jpluimers on 2020/03/03

For me this is still a primary starting point in case I need to know something about security which has clear pictures: [WayBack] Appendix A. Introduction to TCP/IP security (sg245383.pdf/ftp://ftp.www.ibm.com/…/sg245383.pdf, thanks to Jac Las) all on one web page.

The links are to the “Digital signatures” portion, as that’s what I needed at the time, but they are just anchors in the page.

These were the diagrams I was after:

If you want much more in-depth slide then, then go for [WayBackCryptography, from Theory to Practice which you can find back searching for IBM “Cryptography, from Theory to Practice” or “sign then hash” or “hash then sign”.

It is very different from the equally interesting presentation

–jeroen

Posted in Development, Encryption, Power User, Security, Software Development | 2 Comments »

R Notes for Professionals book

Posted by jpluimers on 2020/02/28

One day I will likely need R, so here is the [WayBackR Notes for Professionals book.

The R Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA.

It is a [WayBack] PDF download.

Via: [WayBack] R Notes for Professionals: a free 400+ pages book compiled from Stack Overflow Documentation released under Creative Commons BY-SA… – ThisIsWhyICode – Google+

–jeroen

Posted in Development, Software Development | Leave a Comment »

GitHub – mgedmin/check-manifest: Tool to check the completeness of MANIFEST.in for Python packages

Posted by jpluimers on 2020/02/27

I will need thi sone day: [WayBack] GitHub – mgedmin/check-manifest: Tool to check the completeness of MANIFEST.in for Python packages

Are you a Python developer? Have you uploaded packages to the Python Package Index? Have you accidentally uploaded broken packages with some files missing? If so, check-manifest is for you.

Via: [WayBack] check-manifest: a tool to check the completeness of MANIFEST.in for Python packages  – ThisIsWhyICode – Google+

–jeroen

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

What are the size restrictions for the VCL controls like TPanel and TPaintBox…

Posted by jpluimers on 2020/02/27

Via [WayBack] What are the size restrictions for the VCL controls like TPanel and TPaintBox.? Are they documented anywhere? I’m talking about placing these on a TScro… – Thomas Mueller (dummzeuch) – Google+:

Some Windows messages use the LPARAM to carry width and height, which allows only 16 bit for each.

So 32k-1 (or decimal 32767) is the maximum size of a GDI based visual element in Windows.

–jeroen

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

emulation – How to safely remove/uninstall Android Virtual Device .img files added by Visual Studio Emulator for Android – Stack Overflow

Posted by jpluimers on 2020/02/26

Me at [WayBack] emulation – How to safely remove/uninstall Android Virtual Device .img files added by Visual Studio Emulator for Android – Stack Overflow:

Since after uninstalling the “Visual Studio Emulator for Android” component, you cannot get to the “AVD Manager” any more, you have to manually delete this directory:

%LocalAppData%\Microsoft\VisualStudioEmulator

This works for both Visual Studio 2017 and Visual Studio 2015.

In addition, you might want to run “AppWiz.cpl“, then remove “Android SDK Tools”, which is also not automatically removed by the Visual Studio installer (at least not in Visual Studio 2015).

This will get rid of the multi-gigabyte folder %ProgramFiles(x86)%\Android\android-sdk\

If you still need Android emulation, read these:

–jeroen

Posted in .NET, Development, Software Development, Visual Studio 2015, Visual Studio 2017, Visual Studio and tools | Leave a Comment »

What is the easiest way of getting Delphi to accept a newly added file as a frame and to treat it as such? – Stack Overflow

Posted by jpluimers on 2020/02/26

As this is still an issue with current Delphi versions: every now and then it looses which designers are needed for a frame:

[WayBack] What is the easiest way of getting Delphi to accept a newly added file as a frame and to treat it as such? – Stack Overflow (by Brian Frost)

<DCCReference Include="x\y\z\myFrame.pas">
  <Form>frameMy</Form> 
  <FormType>dfm</FormType>
  <DesignClass>TFrame</DesignClass>
</DCCReference>

Then check your .dfm file to see if it starts with the correct inherited or object as per Delphi – TInterfacedDataModule revisted – use ‘inherited’ in your .dfm files when your datamodules look like forms in the designer.

Oh and at design time, be very careful embedding frames. Better not to do it at all and for certain: do not embed frames in a nested way: [WayBack] Frames in 10.2.2 Hi Has anyone else had issues with frames under 10.2.2? The project seems to have lost its links to the frames? If I went to the Too… – Vince Bartlett – Google+

–jeroen

Posted in Delphi, Development, Software Development | 1 Comment »

Not all XSD mappings to programming language constructs are possible

Posted by jpluimers on 2020/02/26

This post is a reminder to myself that not all mappings from XSD to programming languages are possible.

There are many impossible cases, so this is just a general reminder.

A Delphi specific case for instance is the mapping of enumerations: one reason is that XSD enumerations are case sensitive, but the Delphi language is not: [WayBackUsing XML Enumerations with Delphi XML Data Binding Wizard – Stack Overflow.

More generic examples from my answer to the above question:

  • In XSD you can derive from an existing type in two ways: extending it and limiting it. Object Oriented languages only allow you extend when deriving.
  • Delphi is not alone in these kinds of limitations. Generating wrappers from XSD schema’s is the field of specialized tools, even in the Java or .NET world.

I’ve seen horrible things with wildcards that are sort of mappable to Java, but not to C#. This could likely go on for much longer…

–jeroen

Posted in C#, Delphi, Development, Java, Java Platform, Software Development, XML, XML/XSD, XSD | 2 Comments »

Delphi Conference 2018 – Barnsten.com

Posted by jpluimers on 2020/02/25

I missed this one, so I was glad I archived it because I was curious for Daan van der Werf – Delphi op de werkvloer “Groothandel & Magazijn”.

So here it is: [WayBack] Delphi Conference 2018 – Barnsten.com, with fixed and archived links where possible.

Presentations and code from the Delphi Conference 2018

–jeroen

Posted in Conferences, Delphi, Development, Event, Software Development | 2 Comments »

One Story Per “Sprint” – John Cutler – Medium

Posted by jpluimers on 2020/02/25

Food for thought: what is the hardest thing in your sprints, why, can you make it less hard?

[WayBackOne Story Per “Sprint” – John Cutler – Medium:

Delivering a “potentially releasable increment” after N days is not “hard”. It is not rocket science. (Almost) any team can do it.

Via: [WayBack] One Story Per “Sprint” – John Cutler – Medium – Marjan Venema – Google+

it is not funny to always feel behind; that it actually is detrimental to productivity to focus solely on efficiency, working hard and being hero’s; that it might be a good idea to start with changing your perspective and doing something which has a chance of being successful (doing a single story) and build from there.

It is not about looking busy, but it is about getting things done without having any fears.

–jeroen

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