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,860 other subscribers

Archive for September, 2018

TJoe’s personal favorite in form, function, and simplicity… paper plane!

Posted by jpluimers on 2018/09/21


TJoe’s personal favorite in form, function, and simplicity.

Joe Heche is completely right:

  1. Just look at the plane.
  2. Then try to imagine how far it will go.
  3. Now watch the video below.
  4. Then compare it to how to build the longest flying paper plane building videos and flight videos after that.

Isn’t the one on the right brilliant?

Source: National Paper Airplane Day TJoe’s personal favorite in form, function, and simplicity…

Thanks Joe!

–jeroen

Read the rest of this entry »

Posted in Fun, LifeHacker, Power User | Leave a Comment »

20 things you didn’t know you could do with Search

Posted by jpluimers on 2018/09/20

After [WayBack] 20 years of Google: [WayBack] 20 things you didn’t know you could do with Search: Read the rest of this entry »

Posted in Google, GoogleSearch, Power User | Leave a Comment »

The 10 commandments of navigating code reviews | TechBeacon

Posted by jpluimers on 2018/09/20

[WayBack] The 10 commandments of navigating code reviews | TechBeacon:

How to survive, and thrive, in the sometimes-caustic world of code reviews.

Summary:

  1. Thou shalt not take it personally
  2. Thou shalt not marry thy code
  3. Thou shalt consider all feedback
  4. Thou shalt articulate thy rationale
  5. Thou shalt be willing to compromise
  6. Thou shalt contribute to others’ code reviews
  7. Thou shalt treat submitters how thou would like to be treated
  8. Thou shalt not be intimidated by the number of comments
  9. Thou shalt not repeat the same mistakes
  10. Thou shalt embrace the nits

Via: [WayBack] Kevlin Henney – Google+: The 10 commandments of navigating code reviews

–jeroen

Posted in Agile, Conference Topics, Conferences, Development, Event, Software Development | Leave a Comment »

MahdiSafsafi/ImmersiveColors: Easy way to access Windows 10 Immersive colors

Posted by jpluimers on 2018/09/20

Source: MahdiSafsafi/ImmersiveColors: Easy way to access Windows 10 Immersive colors

via: [WayBack] This is just what I tried to find, but could not figure out what those colors are called :)But anyways some Delphi-superhero has done all work for us… – Tommi Prami – Google+

–jeroen

Posted in Color (software development), Delphi, Development, Software Development | Leave a Comment »

SVN Git Mirror – cloning SVN into git and keeping them in sync

Posted by jpluimers on 2018/09/20

Based on

More references and ideas:

jeroen

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

Reminder to self: check if this has been solved – [RSP-19557] TParallel.Join does not create enough threads – Embarcadero Technologies

Posted by jpluimers on 2018/09/19

Delphi 10.1 Berlin broke [RSP-19557] TParallel,Join does not create enough threads – Embarcadero Technologies. It was reported 9 months ago, and since it took quite some longer than a year for a new Delphi version to be released, I wonder if it is fixed by now.

Related:

–jeroen

 

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

Vysor standalone downloads

Posted by jpluimers on 2018/09/19

I wrote about Vysor before, but totally forgot to mention that for like 2 years there have been (initially beta) standalone versions of Vysor based on the Electron framework that is also used by the Atom.io editor and Visual Studio code.

So here they are (:

Over time, these have been updated with new versions.

Web site source: https://github.com/koush/vysor.io

–jeroen

History:

Related:

Posted in Android, Android Devices, Development, Mobile Development, Power User, Vysor | Leave a Comment »

When a Delphi TCP server causes sudden EIdConnClosedGracefully Exceptions on the client

Posted by jpluimers on 2018/09/19

I always forget which sides of the connection throw this error, but the client side does as explained in [WayBackdelphi – Troubleshooting EIdConnClosedGracefully Exceptions? – Stack Overflow by [WayBackRemy Lebeau the main Indy contributor:

EIdConnClosedGracefully means the other party … has disconnected its end of the connection. Once that exception has been raised, you cannot send more data to the other party. You must reconnect first.

Read the rest of this entry »

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

I tend to forget there is a record intialiser TPair.Create(Key, Value) – via: delphi – TDictionary populated during create example code – Stack Overflow

Posted by jpluimers on 2018/09/18

I tend to forget that since TPair – introduced in Delphi 2009 – has had a TPair.Create(Key, Value)record initialiser since Delphi 2010, though only fully documented since Delphi XE4:

With some spart short methods, Cosmin Prund shows a really nice helper at [WayBack] delphi – TDictionary populated during create example code – Stack Overflow allowing a call like this:

  with TDictHelper<Integer, string> do
    Dict := Make([P(1, 'one'), P(2, 'two')]);

His answer has all the details (including describing the pros and conse), so here is only the helper:

uses
  SysUtils, Generics.Collections;

type
  TDictHelper<Key, Value> = class
  public
    class function P(const K:Key; const V:Value): TPair<Key, Value>;
    class function Make(init: array of TPair<Key, Value>): TDictionary<Key, Value>;overload;
    class function Make(KeyArray: array of Key; ValueArray: array of Value): TDictionary<Key, Value>;overload;
  end;

{ TDictHelper<Key, Value> }

class function TDictHelper<Key, Value>.Make(init: array of TPair<Key, Value>): TDictionary<Key, Value>;
var P: TPair<Key, Value>;
begin
  Result := TDictionary<Key, Value>.Create;
  for P in init do
    Result.AddOrSetValue(P.Key, P.Value);
end;

class function TDictHelper<Key, Value>.Make(KeyArray: array of Key;
  ValueArray: array of Value): TDictionary<Key, Value>;
var i:Integer;
begin
  if Length(KeyArray) <> Length(ValueArray) then
    raise Exception.Create('Number of keys does not match number of values.');
  Result := TDictionary<Key, Value>.Create;
  for i:=0 to High(KeyArray) do
    Result.AddOrSetValue(KeyArray[i], ValueArray[i]);
end;

class function TDictHelper<Key, Value>.P(const K: Key;
  const V: Value): TPair<Key, Value>;
begin
  Result := TPair<Key, Value>.Create(K, V);
end;

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 7 Comments »

Locating the 7z.exe command-line tool on Windows

Posted by jpluimers on 2018/09/18

From one of my scripts: it will find a  64-bit 7z.exe if it was installed as part of the 7-zip installer, then run it with the parameters provided to the batch file.

  setlocal
  
:verify7zip
:: registry trick from http://www.robvanderwoude.com/files/sortdate2_nt.txt
:: extra trick: tokens=2* allows to get the  3rd (and beyond: space delimited!) value in one variable %%b
  for /F "tokens=2*" %%a IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip" /v Path64 2^>nul') do set sevenZipDirectoryPath=%%b
  call :checkMissingSetting sevenZipDirectoryPath     || goto :help
  
  set sevenZipExeFilePath=%sevenZipDirectoryPath%7z.exe
  if not exist "%sevenZipExeFilePath%" call :showError "No 7-zip executable at %sevenZipExeFilePath%" || goto :help
  
:run7zip
  "%sevenZipExeFilePath%" %*

  endlocal
  goto :end
  
:checkMissingSetting
  if not defined %1 call :notifyMissingSetting %1 && exit /b 1
  call :showSetting %1
  exit /b 0
  goto :end

:notifyMissingSetting
  echo Registry didn't provide the environment variable "%1"
  goto :end
  
:showError
  :: remove double quotes using tilde trick:
  echo %~1
  
:help
  echo Syntax: %0 7z.exe-commandline-parameters
  goto :end

:end

–jeroen

Posted in 7zip, Batch-Files, Compression, Development, Power User, Scripting, Software Development | Leave a Comment »