The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • 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

Oh wow. Apparently all S3 buckets are also BitTorrent trackers.

Posted by jpluimers on 2015/05/16

Interesting:

There is no extra charge for use of BitTorrent with Amazon S3. Data transfer via the BitTorrent protocol is metered at the same rate as client/server delivery. To be precise, whenever a downloading BitTorrent client requests a “piece” of an object from the…

Note

You can get torrent only for objects that are less than 5 GB in size.

via Using BitTorrent with Amazon S3 – Amazon Simple Storage Service.

–jeroen

via Oh wow. Apparently all S3 buckets are also BitTorrent trackers..

Posted in Amazon S3, Cloud Apps, Cloud Development, Development, Internet, Power User | Leave a Comment »

From batch file or shortcut: start Windows Update (via: Windows 7 Help Forums)

Posted by jpluimers on 2015/05/15

Call either of these from a batch file or Windows shortcut to end up at the Windows Update screen in the Control Panel:

%windir%\System32\rundll32.exe url.dll,FileProtocolHandler wuapp.exe
%windir%\explorer.exe shell:::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}

Notes:

  • I’ve tested this in Windows 7, 8.x and 9 and it works fine in all these.
  • Unlike Control Printers calling Control Updates does not work.
  • I suspect there are many more magic GUID values you could use for other functions because the built-in syntax has been there for a long time.

–jeroen

via: Windows Update Shortcut – Create in Windows 7 – Windows 7 Help Forums.

Posted in Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2 | Leave a Comment »

Insightful : SE-Radio Episode 225 Brendan Gregg on Systems Performance by…

Posted by jpluimers on 2015/05/14

Insightful :

SE-Radio Episode 225 Brendan Gregg on Systems Performance by Software Engineering Radio – The Podcast for Professional Software Developers

https://player.fm/1QFJsZ

On dtrace, stack tracing bottlenecks, CPU cached vs non cached being the new bottleneck like uncached/cached disk IO used to be, heat-maps of performance and much more.

He wrote a great book too: Systems Performance: Enterprise and the Cloud: Brendan Gregg: 9780133390094: Amazon.com: Books.

–jeroen

via: Insightful : SE-Radio Episode 225 Brendan Gregg on Systems Performance by….

Posted in Development, Software Development | Leave a Comment »

Resolve issues automatically when users push code in Bitbucket and GitHub

Posted by jpluimers on 2015/05/14

I tend to forget some of the keywords you can put into BitBucket commit messages to relate them to certain issues/bugs/tickets

Read the rest of this entry »

Posted in BitBucket, Development, GitHub, Software Development, Source Code Management | Leave a Comment »

On the Delphi TCommandParser class for parsing command-lines and arguments (via: Suggestions for how to define command line parameters – Stack Overflow)

Posted by jpluimers on 2015/05/13

A while ago, I posted [WayBack] the below StackOverflow answer. Recently a friend asked me about command-line parsing in Delphi, so here is the re-run:

Delphi contains a really nice unit called CommandParser with a [WayBack] TCommandParser class that does commandline parsing for you. Since it has [WayBack] virtually no documentation, here are a few things to get started. It works even in Delphi 2007.

I have a HiddenExecutable example at our open source bo repository.

Basically you:

  • TComponent that contains the properties you want to expose as commandline parameters (that is THiddenExecuteSettings in the HiddenExecuteSettingsUnit
  • a commandline parser controller. In our case THiddenExecuteArguments in theTHiddenExecuteArgumentsUnit (in retrospect not such a good name) that contains an InitCommandLine method that sets up a TCommandParser instance passing it your TComponent
  • It then executes a couple of [WayBack] AddSwitch calls to setup the parameters with both abbreviated and full commandline switches (like h and help)
  • ProcessCommandLine method on the TCommandParser instance to process the commandline and fill the properties of your TComponent (in my example, this is done in the ProcessCommandLine method).

Now comes the fun:

  • TCommandParser has a HelpText method that fully automatically assembles a helptext based upon what you fed it with the AddSwitch methods.
  • TCommandParser also has a SaveOptions method that allows you to save the current settings of your TComponent into a settings file.

The Delphi units you need are these which you can get from the Embarcadero [WayBack] radstudiodemos.sourceforge.net demo repository:

CommandParser in '...\radstudiodemos.sourceforge.net\branches\RadStudio_XE2\Delphi\Database\dbExpress\Utils\CommandParser.pas',
PropertyHelpers in '...\radstudiodemos.sourceforge.net\branches\RadStudio_XE2\Delphi\Database\dbExpress\DbxDataPump\PropertyHelpers.pas',
ParseIds in '...\radstudiodemos.sourceforge.net\branches\RadStudio_XE2\Delphi\Database\dbExpress\DbxDataPump\ParseIds.pas',

Edit: [WayBack] John Kaster wrote a nice [WayBack] article on EDN that includes [WayBack] more details on using the TCommandParser.

Note the above mentioned code mostly is on [WayBack] https://bitbucket.org/jeroenp/wiert.me/src/tip/Native/Delphi/Apps/Console/HiddenExecuteConsoleProject

Since Delphi XE7, this unit does not ship with Delphi any more, but it is still at [WayBack] RAD Studio Demo Code / Code / [r2029] /branches/RadStudio_XE6/Object Pascal/Database/dbExpress/Utils/CommandParser.pas.

–jeroen

via: [WayBack] delphi – Suggestions for how to define command line parameters – Stack Overflow.

Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 4 Comments »

Batch file: Finds the location of xsd.exe by running the vsvars32.bat of the youngest installed Visual Studio

Posted by jpluimers on 2015/05/12

Boy, Microsoft made it hard to find the location of xsd.exe!

It is actually located like here:

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\xsd.exe

But that is nowhere on the default path, nor in the registry.

What happens during installation of Visual Studio and/or the Microsoft SDK, is that the vsvars32.bat file of Visual Studio is updated so it can add the location of many tools (including xsd.exe) to the PATH.

So the trick is to find the youngest Visual Studio first, then run the according vsvars32.bat, and then xsd.exe is on the path.


:: Dynamically finds the installed xsd.exe, then calls it with the passed parameters
:: test these environment variables that have 110 or 120 in them (future enhancements: support more Visual Studio versions):
:: Visual Studio .NET 2002: VS70COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio .NET\Common7\Tools\
:: Visual Studio .NET 2003: VS71COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\Tools\
:: Visual Studio 2005: VS80COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\
:: Visual Studio 2008: VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
:: Visual Studio 2010: VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
:: Visual Studio 2012: VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
:: Visual Studio 2013: VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
:: They contain `vsvars32.bat` which will update the `PATH` so it includes where `xsd.exe` resides
setlocal enabledelayedexpansion
:: delayed expansion allows for the exclamation marks
:: see http://ss64.com/nt/delayedexpansion.html
:: see http://stackoverflow.com/questions/22857407/windows-batch-how-to-assign-variable-with-dynamic-name
for %%v in (70 71 80 90 100 110 120 130) do if not [!VS%%vCOMNTOOLS!]==[] set VSCOMNTOOLS=!VS%%vCOMNTOOLS!
call :do call "!VSCOMNTOOLS!vsvars32.bat"
call :do where xsd.exe
xsd.exe %*
endlocal
goto :eof
:do
echo %*
%*
goto :eof

view raw

Run-Xsd.exe.bat

hosted with ❤ by GitHub

–jeroen

via:

Read the rest of this entry »

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), Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio 2013, Visual Studio 2014, Visual Studio and tools, XML/XSD, XSD | 1 Comment »

Classic that are now available freely for reading/listing (via: About Us | Open Culture)

Posted by jpluimers on 2015/05/11

A while ago, my good friend Arjen Lentz pointed me to the free e-books section on OpenCulture.

I didn’t have time back then, and now I finally do and am truly impressed. So here is a plug:

What is Open Culture’s Mission?

Open Culture brings together high-quality cultural & educational media for the worldwide lifelong learning community. Web 2.0 has given us great amounts of intelligent audio and video. It’s all free. It’s all enriching. But it’s also scattered across the web, and not easy to find. Our whole mission is to centralize this content, curate it, and give you access to this high quality content whenever and wherever you want it. Some of our major resource collections include:

–jeroen

via About Us | Open Culture.

Posted in About, LifeHacker, Opinions, Personal, Power User | Leave a Comment »

Nieuwe term voor WLZ zorg thuis: “Zorg met verblijf”

Posted by jpluimers on 2015/05/10

Om het met de AWBZ, WLZ, WMO en trekkingsrecht (zo ingewikkeld dat het nog niet op Wikipedia staat) allemaal makkelijker te maken heet WLZ zorg thuis nu soms “Zorg met verblijf”.

Het CAK (voorheen Centraal administratiekantoor, maar is die term niet waard: ze “vergeten” zaken uit hun administratie op het moment dat hen dat uit komt) noemt het “Zorg met verblijf” in hun correspondentie, maar het zorgkantoor rept hier met geen woord over in hun correspondentie.

Als je dan de folder die het CAK bijsluit goed leest is er een speciaal onderdeel van “Zorg met verblijf” dat “Volledig pakket thuis” heet. Die vindt je dan wel weer terug op de site van het zorgkantoor, maar niet in de correspondentie. Als je onder “ik wil zorg” kijkt, dan begrijp ik dat veel zorgbehoevenden door de bomen het bos niet meer zien.

De overheid: makkelijker kunnen we het niet maken.

–jeroen

Posted in About, Curatele, Opinions, Personal | Leave a Comment »

Debugging problems with the network proxy (via: The Chromium Projects)

Posted by jpluimers on 2015/05/08

In this case, another tool didn’t obtain the right Proxy settings.

Chrome to the rescue as chrome://net-internals/#proxy shows you the system proxy settings:

When browsers are experiencing network problems, generally the first thing to test is your network proxy settings. Misconfigured settings, or misbehaving settings, can have a profound impact on your network traffic possibly resulting in pages not loading at all.

Main take aways: chrome://net-internals/#proxy

Since then, I created this small batch file:

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | findstr proxy

And this one to edit the settings:

"C:\Windows\system32\rundll32.exe" shell32.dll,Control_RunDLL inetcpl.cpl,,4

It will open the same Window that your Control Panel or Internet Explorer uses to manage connection and proxy settings.
From there click the “LAN Settings” button to edit the proxy configuration.

–jeroen

via: Debugging problems with the network proxy – The Chromium Projects.

Posted in Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP, Windows-Http-Proxy | Leave a Comment »

Allow tests to be grouped by class, category, and namespace in Test Explorer – Customer Feedback for Microsoft

Posted by jpluimers on 2015/05/07

Usually I setup the grouping and filtering of the Test Explorer like this:

I really wish there was a multi-level grouping possibility here (:

–jeroen

via: Allow tests to be grouped by class, category, and namespace in Test Explorer – Customer Feedback for Microsoft.

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