Thanks Joshep Prajapati for pointing me to this great page which can do a lot of XML related things:
–jeroen
via: Generate XSD from XML – XSD.EXE versus on-line tools – take 2 « The Wiert Corner.
Posted by jpluimers on 2015/10/14
Thanks Joshep Prajapati for pointing me to this great page which can do a lot of XML related things:
–jeroen
via: Generate XSD from XML – XSD.EXE versus on-line tools – take 2 « The Wiert Corner.
Posted in Development, Software Development, XML, XML/XSD, XSD | 3 Comments »
Posted by jpluimers on 2015/10/13
So I won’t forget:
Even though this does not work on most USA T-Shirt sites, it works on this Dutch one: T-Shirt Ontwerpen – t-shirt zelf ontwerpen | Spreadshirt.
–jeroen
PS:
Posted in ASCII, Development, Encoding, Software Development, Unicode | Leave a Comment »
Posted by jpluimers on 2015/10/07
A long time ago, there was an interesting discussion here: I was wondering, that what is the closest value to the Zero floating point can have.
Recently I needed to do some calculations on series where getting close to zero could become a problem.
In practice it depends a lot on what you are doing. Sometimes absolute Epsilons are best, but at other times relative difference is much more applicable.
Then there is also a Machine Epsilon: a way to derive an Epsilon from a data type that works in all languages and platforms.
–jeroen
Posted in .NET, Algorithms, C, C#, C++, Delphi, Development, Floating point handling, Software Development | 1 Comment »
Posted by jpluimers on 2015/10/06
Get the path to the most recent msbuild.exe from the registry:
| @echo off | |
| :: http://stackoverflow.com/questions/328017/path-to-msbuild | |
| :: http://www.csharp411.com/where-to-find-msbuild-exe/ | |
| :: http://timrayburn.net/blog/visual-studio-2013-and-msbuild/ | |
| :: http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx | |
| setlocal | |
| :vswhereModernTry | |
| :: https://github.com/Microsoft/vswhere/wiki/Find-MSBuild | |
| :: Normal output example of `vswhere -legacy -latest -property installationPath` has no trailing back-slash: | |
| :: `C:\Program Files (x86)\Microsoft Visual Studio 14.0\` | |
| for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do ( | |
| set InstallDir=%%i | |
| ) | |
| :: without ENABLEEXTENSIONS, %InstallDir% is only available outside the above loop. | |
| for %%v in (15.0, 14.0) do ( | |
| if exist "%InstallDir%\MSBuild\%%v\Bin\MSBuild.exe" ( | |
| set msBuildExe="%InstallDir%\MSBuild\%%v\Bin\MSBuild.exe" | |
| goto :finish | |
| ) | |
| ) | |
| :manualTry | |
| :: order of the versions is important: get the most recent one | |
| for %%v in (14.0, 12.0, 4.0, 3.5, 2.0) do ( | |
| for /f "usebackq tokens=2* delims= " %%c in (`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath`) do ( | |
| set msBuildExe="%%dMSBuild.exe" | |
| goto :finish | |
| ) | |
| ) | |
| :vswhereLegacyTry | |
| :: -legacy is not compatible with -products or -requires | |
| :: note there is no Visual Studio 13.0 (just like there is no Office 13.0) likely because USA superstition. | |
| :: https://en.wikipedia.org/wiki/Microsoft_Visual_Studio#History | |
| :: msbuild was introduced in Visual Studio 8.0: https://en.wikipedia.org/wiki/MSBuild#History | |
| :: Legacy output example of `vswhere -legacy -latest -property installationPath` has trailing back-slash: | |
| :: `C:\Program Files (x86)\Microsoft Visual Studio 14.0\` | |
| for /f "usebackq tokens=*" %%i in (`vswhere -legacy -latest -property installationPath`) do ( | |
| set InstallDir=%%i | |
| ) | |
| :: without ENABLEEXTENSIONS, %InstallDir% is only available outside the above loop. | |
| for %%v in (14.0, 12.0, 11.0, 10.0, 9.0, 8.0) do ( | |
| if exist "%InstallDir%MSBuild\%%v\Bin\MSBuild.exe" ( | |
| set msBuildExe="%InstallDir%MSBuild\%%v\Bin\MSBuild.exe" | |
| goto :finish | |
| ) | |
| ) | |
| :: nothing found | |
| :finish | |
| endlocal & if not [%msBuildExe%]==[] if exist %msBuildExe% ( echo %msBuildExe% ) |
| for /f "usebackq tokens=*" %%c in (`"%~dp0get-msbuildExe-path.bat"`) do ( | |
| call %%c %* | |
| ) |
With help from:
This needs adoption for Visual Studio 2017 (15.0) and up; see the comments at the above gist:
–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), Delphi, Delphi 10 Seattle, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2015/10/01
Of course NUnit will emit NUnit compatible XML, but other tools do too.
To verify if such XML is indeed compliant to the NUnit standard, there is an XML Schema for it which – at the time of writing – the latest version was here:
Many CI tools map the resulting XML into some form of output. To get HTML output, XSLT is a logical choice, but there are other means too. Here are a few links to get started converting the output:
–jeroen
Posted in Agile, Development, Software Development, Unit Testing | Leave a Comment »
Posted by jpluimers on 2015/09/30
ReSharper has a whole set of nice keyboard shortcuts, which includes Ctrl + Shift + , for View Recent Edits.
This overwrites the Zoom Out half of the default Visual Studio zoom keyboard shortcuts (thanks Carlos Muñoz):
Ctrl + Shift + . to zoom in and Ctrl + Shift + , to zoom out.
They don’t keep an alternative for Zoom Out, and unlike most tools I know that allow for zooming, there is no keyboard accessible menu entry for Zoom Out in Visual Studio.
So you have to use your mouse to go in the lower left of your editor window in order to Zoom Out (thanks ashteele for putting that in an SO question):
Or you can reconfigure the old shortcut (thanks Aaron Ransley):
through
Tools->Options->Environment->Keyboardand map “View.ZoomIn” and “View.ZoomOut“
–jeroen
Posted in .NET, Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio 2013, Visual Studio 2014, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2015/09/29
Below are the captions, read the full article as it is very well written.
Why your code is hard to understand
- Problem #1, Overly Complex Mental Models
- Problem #2, Poor Translation of Semantic Models into Code
- Class Structure and Names
- Variable, Parameter and Method Names
- Single Responsibility Principle (SRP)
- Appropriate Comments
- Problem #3, Not Enough Chunking
- Problem #4, Obscured Usage
- Problem #5, No Clear Path Between the Different Models
- Problem #6, Inventing Algorithms
–jeroen
Posted in .NET, Delphi, Development, Software Development, Web Development | 5 Comments »
Posted by jpluimers on 2015/09/28
I’ve seen this question coming up a few times, and bumped into this at a client recently: the UAC dialog coming up when debugging a 32-bit executable.
This is caused (more details below) by Installer Detection Technology introduced in Windows Vista (with UAC) and tightened in more modern Windows versions.
The solution is to either:
For software you don’t have source code for, you can alter the manifest with a requestedExecutionLevel element: Fixing the way Vista Auto-detects Installers – Ben’s Writing.
A few links on Installer Detection Technology in Windows:
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Delphi, Delphi 10 Seattle, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, RemObjects C#, Software Development | 1 Comment »
Posted by jpluimers on 2015/09/25
I missed this last May, but revisiting some old G+ posts I saw Allen Bauer commenting:
Current working theory of Nullable<T>.
Nullable<T> = record
...
property Value: T read FValue; default;
...
end;Using the default directive to “hoist” the operators of “T”. Currently the default directive only works for array properties by “hoisting” the ‘[]’ operator. Marking a non-array property with default will make the containing type behave as that type.
This, coupled with some intrinsic compiler knowledge of the Nullable<T> type will make Nullable<T> work without any addition of keywords or other standard functions or procedures.
Using the “default” directive on a non-array property will work for any type, except for having the null-propagation semantics.
When considering language features, I try and not only make it work for the intended purpose, but also broaden reach of any supporting feature. In the above scenario, even user-defined operators on “T” will be properly hoisted and used.
So hopefully, one day there will me more than Nullable<T> in Spring.pas which has been around for quite a while now..
–jeroen
Source: Delphi’s New Feature Desired: Nullable Types and Null Propagation Nullable…
Posted in Delphi, Development, Software Development | 5 Comments »
Posted by jpluimers on 2015/09/25
Very smart case insensitive way answered by jeb:
if NOT "%foo%"=="%foo:bar=%" echo FOUND
–jeroen
via windows – Find out whether an environment variable contains a substring – Stack Overflow.
Posted in Batch-Files, Console (command prompt window), Development, Power User, Scripting, Software Development, Windows | Leave a Comment »
lextm commented on Mar 9, 2017 •
vswhereis now recommended to locate MSBuild 15,https://github.com/Microsoft/vswhere
n9 commented on May 17, 2017
vswhere -products *to get standalone installation of BuildTools. (See Microsoft/vswhere#61.)