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

Archive for January, 2017

Windows batch file – setting space as delimiter when parsing files

Posted by jpluimers on 2017/01/04

for /f "tokens=* delims= " %%f in (myfile) do

If you put delims as the last parameter, then an ending space will be included as delimiter (at the start or in the middle it won’t).

A great tip by jeb and Joey in an answer for windows – Batch file FOR /f tokens – Stack Overflow

–jeroen

Posted in Batch-Files, Pingback, Scripting, Software Development, Stackoverflow | Leave a Comment »

Any opinions on Men’s Insulated Coat – SCOTTeVEST

Posted by jpluimers on 2017/01/03

Any more people having experience with these?

I’m welcoming any opinions on:

  • comfort
  • size (are sizes like L or XL larger or smaller than most other L or XL clothing; would L or XL better it fit a 1.84m tall person with average waist)
  • durability
  • what happens when you go sit in a bus/aircraft with all the pockets filled
  • what if you drop the jacket with the pockets filled with laptop/ipad/…

The OTG Jacket for Men is a warm jacket with the hidden SCOTTeVEST features of concealed pockets. Carry your gadgets with you, and maintain your style, while keeping warm outside.

[WayBackMen’s Insulated Coat – SCOTTeVEST

via

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Technical Debt – Dilbert Comic Strip on 2017-01-03 | Dilbert by Scott Adams

Posted by jpluimers on 2017/01/03

Is it funny because it so true? Would it be funnier if it weren’t true?

  • Boss: Did you finish the software yet?
  • Dilbert: No, I’m still paying off the technical debt from the last programmer you rushed.
  • Boss: I don’t know what that means.
  • Dilbert: Well, that explains a lot.

[WayBackTechnical Debt – Dilbert Comic Strip on 2017-01-03 | Dilbert by Scott Adams

–jeroen

Read the rest of this entry »

Posted in Development, Fun, Technical Debt | Leave a Comment »

Compiler Explorer – how various C++ compilers translate code into various machine code targets

Posted by jpluimers on 2017/01/03

The first implementation of Compiler Explorer supports many versions of the gcc, clang and icc compilers on ARM, ARM64, AVR and x86 targets.

On the left you type your C++ code, on the right you see the resulting assembler code optionally with byte code and colorised so you can correlate the C++ lines with the assembly.

A great way to start the year: learning new things!

Related:

–jeroen

via:

Some videos:

Read the rest of this entry »

Posted in ARM, Assembly Language, C++, Conference Topics, Conferences, Development, Event, Software Development, x86 | Leave a Comment »

Regularly forcing Microsoft Silverlight to be a hidden Windows Update

Posted by jpluimers on 2017/01/03

I got a bit fed-up with the deprecated Microsoft Silverlight reappearing as KB3056819 in each Windows Update within minutes of hiding it (I’m not alone on this, it does this when you have configured to favour the Microsoft Update Servers – that also update Office – in favour of the Windows Update Servers).

Two really odd things:

  1. In the past, I hid “Skype for Windows desktop 7.3 (KB2876229)” which stayed hidden.
  2. I never installed Silverlight, there is no Silverlight on the system (I checked the registry, file system with Everything and more), but the update keeps re-appearing (like KB960353 does for others).

So I wanted a script that every minute could check for a Microsoft Silverlight update, then hide it.

That appeared a lot more cumbersome than I anticipated, hence this blog post.

The reason is that unlike many other operating systems, Windows does not come with a build-in package manager that you can script (there is Windows Installer, but is’s not easily scriptable).

Read the rest of this entry »

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

Great tutorial on how to split older Git commits: http://bit.ly/1rE72cI -…

Posted by jpluimers on 2017/01/02

A long time ago (2014!), [WayBack] Great tutorial on how to split older Git commits: http://bit.ly/1rE72cI – should be used with care, but this can be a lifesaver and a really useful trick… – Ilya Grigorik – Google+ pointed me the below tutorial.

It has been in my drafts since then, but recently I found it back when I needed to rebase unpushed commits. Indeed it’s a great tutorial!

Executing the git rebase --interactive concepts can be tricky as they are on a way higher level than regular git work. So sometimes you want to exit vim notifying git to stop the current action. The easiest way I found was this vim command I found at [WayBackHow to abort a git rebase in interactive editor (thanks [WayBack] Telmo Costa!):

:cx

Via the tutorial, I also bumped into a few advanced git add features:

Another very powerfull feature is git add -p a.k.a. git add --patch which allows you to stage parts (or hunks) of a file.

[WayBackgit add -p: The most powerful git feature you’re not using yet

You can go even further with git add --interactive as this blog post shows:

[WayBackgit add –patch and –interactive

Back to the tutorial:

[WayBackGoing back in time to split older commits by thoughtram

Rebasing in Git allows you to go back in time to split older commits. In this article we’ll explore how to do exactly that!

git rebase --interactive

git rebase –interactive

Before the tutorial explains how to amend git commits, it covers these git rebase --interactive commands:

  • pick
  • reword
  • edit
  • squash
  • fixup

Note that squash will combine the commit on that line with the commit on the line above it.

There is one more little trick: to limit the number of commits (that’s normally limited to the unpushed ones), add like HEAD~4 which limits it to 4 commits.

Finally you can even use this for cherry picking, which I need to put on my research list: [WayBackgit: obtain the benefits of git rebase --interactive for cherry picks – Stack Overflow

Further reading:

–jeroen

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

When a Windows 7 or Windows 8.x update takes forever…

Posted by jpluimers on 2017/01/02

Via:

 – G+

Windows 7 Disk Images – Is it just me I have noticed that my Windows 7 backup disk images fail when Windows update applies security updates, if the images are more than 2 “Monthly RollUps” old. When I click the update webpage for help, Microsoft the server returnes a “page not found”. Is Microsoft trying to tell me something?

I noticed this as well for VMs that I hardly use (and can be dormant for months): updating them takes forever and I could not find the cause.

The cause seems Microsoft changing the locations for updates, but not having the updater update in the old location any more: [WayBackChanges to Security Update Links – MSRC.

Solution: manually download the update MSU files for your Windows + architecture combination in a directory, copying a batch file there, then run the batch file.

More details at “Solution to the long search for Windows Updates on a newly installed Windows 8.1, 7 SP1 or Vista SP2”:

Yes, you have to fiddle a bit with the WUAUSERV service, but then everything should work out well.

–jeroen

via: [WayBackWindows 7 Disk Images – Is it just me I have noticed that my Windows 7 backup…

Posted in Power User, Windows, Windows 7, Windows 8.1 | Leave a Comment »

The difference in changing your primary email of an Apple ID and a Microsoft Account

Posted by jpluimers on 2017/01/01

The difference in changing your primary email of an Apple ID and a Microsoft ID:

  • Microsoft Account still requires you to sign in with your (now defunct) old e-mail address as that *is* your primary ID but sends email to your new e-mail addres.
  • Apple ID forgets about your old-email address and requires you to use the new e-mail address to sign in.

Small but important difference…

–jeroen

Posted in Apple, Power User, Windows | Leave a Comment »

Wisdom is a love affair with questions. Knowledge is a love affair with answers…

Posted by jpluimers on 2017/01/01

Happy new year everyone!

Wisdom is a love affair with questions. Knowledge is a love affair with answers.- Julio Olalla – Marjan Venema – Google+

[WayBack]

–jeroen

Posted in Fun, Quotes | Leave a Comment »

Geek And Poke: Architectural Best Practices – annual rings

Posted by jpluimers on 2017/01/01

Geek And Poke: Architectural Best Practices – annual rings

Happy new year!

–jeroen

via: Aus der Abteilung “Universelle – Wahrheiten” – Jens Schwehn – Google+

PS: Bigger pictures at 1 and 2.

 

Posted in Development, Software Development | Leave a Comment »