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 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/21
If you are on .NET, migrate to .NET Core. If you start with .NET, start with .NET Core.
Based on:
–jeroen
Edit: nice comment on [WayBack] If you are on .NET, migrate to .NET Core. If you start with .NET, start with .NET Core. Based on: [WayBack] Nick Craver on Twitter: “This is worth repea… – Jeroen Wiert Pluimers – Google+:
We are porting Continua CI to .net core 2.1, I’ve been working on it for a few months now (along with other things of course), I had to contribute to a few open source projects to help get all our dependencies onto .net core, and for the most part it’s been pretty easy. I did have to change the windows service stuff, and since there is no WCF server stuff in .net core we have to find a replacement for that for server to agent communications (still exploring options, but probably going with halibut).What hasn’t (and still isn’t) easy is porting MVC4/5 stuff to asp.net core. So many little changes that drive me absolutely potty. I was getting so frustrated that I had to put it aside for a while and work on other things, just to get my sanity back!
Posted in .NET, .NET Core, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2018/08/21
When you run on Windows: [WayBack] Full Duplex Asynchronous Read/Write with Named Pipes – CodeProject
via:
–jeroen
Posted in .NET, C#, Development, Software Development, WinForms | Leave a Comment »
Posted by jpluimers on 2018/08/16
Cool feature borrowed from Notepad, which can read files locked by other references (for instance a process having the handle open): [WayBack] c# – Notepad beats them all? – Stack Overflow.
The example from the answer is in .NET, but can be used in a native environment as well (Notepad is a native application).
Notepad reads files by first mapping them into memory, rather than using the “usual” file reading mechanisms presumably used by the other editors you tried. This method allows reading of files even if they have an exclusive range-based locks.
You can achieve the same in C# with something along the lines of:
using (var f = new FileStream(processIdPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) using (var m = MemoryMappedFile.CreateFromFile(f, null, 0, MemoryMappedFileAccess.Read, null, HandleInheritability.None, true)) using (var s = m.CreateViewStream(0, 0, MemoryMappedFileAccess.Read)) using (var r = new StreamReader(s)) { var l = r.ReadToEnd(); Console.WriteLine(l); }
Via: [WayBack] Maintaining Notepad is not a full-time job, but it’s not an empty job either – The Old New Thing
–jeroen
Posted in .NET, Delphi, Development, Software Development, The Old New Thing, Windows Development | Leave a Comment »
Posted by jpluimers on 2018/08/09
[WayBack] Why Skylake CPUs Are Sometimes 50% Slower – How Intel Has Broken Existing Code – Alois Kraus reports that the PAUSE instruction on Intel Skylake architecture takes an order of magnitude longer than on previous architectures.
This impacts spinlock code in .NET 4.x and .NET Core 2, and likely impacts other spinlock code as well. The .NET core fix gets back-ported to .NET 4.x.
Since Delphi XE, the Delphi RTL code has borrowed ideas from .NET implementing this kind of code, so I filed [WayBack] QualityCentral: 144063 PAUSE instruction on Intel Skylake takes order of magnitude longer: important for SpinWait/SpinLock code (because Google can index it).
It is no coincidence that a Senior Scaleability Engineer at Booking.com mentioned it on his G+ stream ([WayBack] The “Pause” instruction changed timing dramatically in Skylake. Spinlock implementation based on pause will need adjustments. – Kristian Köhntopp – Google+) as changes like this can heavily impact server systems.
–jeroen
via: [WayBack] The “Pause” instruction changed timing dramatically in Skylake. Spinlock implementation based on pause will need adjustments.I hope a fix for this will be back-ported for many Delphi versions. – Jeroen Wiert Pluimers – Google+
Posted in .NET, .NET 4.0, Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2018/07/18
I was looking for a HTML pretty printer (…) but in Visual Studio code, that is called code formatting, which supports many languages out of the box (including HTML) without requiring extensions like Atom.io (see below).
The shortcuts are at [WayBack] How do you format code in Visual Studio Code (VSCode) – Stack Overflow.
For Mac OS X/OS X/MacOS they are (the second one only appears when you have a code selection):
- document:
Shift–Option–F- selection:
Command–KCommand–F
Posted in Development, Software Development, Visual Studio and tools, vscode Visual Studio Code | Leave a Comment »
Posted by jpluimers on 2018/07/10
If you’re new to C#, below is a good series of articles to get started.
Even if you’re not so new, there are quite some interesting bits to learn from them:
–jeroen
Posted in C#, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2018/07/04
Since I forget where they hid the [WayBack] Visual Studio – Add File As Link feature, two images from the linked post:

Add button with two more options: Add; Add as Link (note Show Previous Versions is a feature of non-Home version of Windows Vista and up).
A step by step instruction is at [WayBack] c# – Add File as a Link on Visual Studio – Debug vs Publish – Stack Overflow.
–jeroen
Posted in .NET, Development, Software Development, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2018/06/29
I forgot to schedule the post below. It is still relevant if you create a machine with lots of Delphi versions on it.
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, Database Development, Delphi, Delphi 2007, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Firebird, InterBase, Power User, Software Development, Windows, Windows 8 | 2 Comments »
Posted by jpluimers on 2018/06/21
Very often, I see people ask for how to embed multi-line strings in a Delphi source file.
The short answer is: you can’t.
The long answer is: you can’t and if you want you have to hack your way around.
The answer should be: just like any of these languages that do support multiline strings:
Many languages support this through a feature called HEREDOC.
Now in Delphi and other languages like Java are building ugly workarounds like for instance this one: [WayBack] RAD Studio Tip: Using resource scripts to organize project dependencies. – Chapman World.
–jeroen
Posted in .NET, C#, Delphi, Development, JavaScript/ECMAScript, Python, Ruby, Scripting, Software Development | 17 Comments »