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

Archive for 2014

Microsoft’s new open source direction for C# and .NET (and native compilation too): Anders Hejlsberg explains « Tim Anderson’s ITWriting

Posted by jpluimers on 2014/05/02

I totally agree with Tim Anderson here:

Open source, native code compilation, and an innovative compiler: it adds up to huge changes for C# and .NET, positive ones as far as I can tell.

–jeroen

via: Microsoft’s new open source direction for C# and .NET (and native compilation too): Anders Hejlsberg explains « Tim Anderson’s ITWriting.

Posted in .NET, .NET 4.5, C#, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

dockStubz+: 30-pin Pass-Through Adapter with side Micro-USB port and USB/FireWire charge conversion circuitry

Posted by jpluimers on 2014/05/02

Interesting device I want to try out (probably from Amazon.com: CableJive dockStubz+).

It is a 30-pin Pass-Through adapter for iPod/iPhone/iPad (lets call them iDevice).

Reasons to get one (or more depending on the number of devices/chargers you use regularly):

  • Use the connector to connect a compatible device, while still charging through the side micro-USB power port on the adapter.
  • Charge modern iDevice with old chargers and old iDevice with modern chargers.
  • Put your iDevice in a dock even when you have a bumper or case around it.

A few pictures showing their use are below.

Basically, there are two verions of charging circuitry: USB based and FireWire based.

I will make sure to get the + version, as it combines these two:

dockStubz+ model includes charge conversion circuitry for those older docks and accessories that don’t charge while they are connected. Safely connect your mobile device to any dock and get the charging you need.

–jeroen

via: dockStubz Charge Converter and 30-pin Pass-Through Adapter.

 (een larger)

Posted in Apple, iOS, iPad, iPhone, iPod, iPod touch, Power User | Leave a Comment »

Happy 50th birthday BASIC! (via: BASIC at Dartmouth)

Posted by jpluimers on 2014/05/01

Though a lot of people dislike the language, it survived until today.

So: happy 50th birthday BASIC!

BASIC Begins at Dartmouth

At 4 a.m. on May 1, 1964, in the basement of College Hall, Professor John Kemeny and a student programmer simultaneously typed RUN on neighboring terminals. When they both got back correct answers to their simple programs, time-sharing and BASIC were born.

–jeroen

via:

Posted in BASIC, Development, Software Development | 1 Comment »

SDB:System upgrade – openSUSE

Posted by jpluimers on 2014/05/01

SDB:System upgrade – openSUSE.

Every once in a while, I feel like I have been living under a stupid rock.

This was one of these cases. About 5 years ago, openSUSE added this feature:

openFATE – #305634: Debian-like dist-upgrade live system full version upgrade.

It is awesome, requires a bit of twiddling and afterwards you have a system that:

  • was updated in-place while live
  • is the most current openSUSE version

I don’t know of any drawbacks yet (will soon try it). If I find ones, I will post a new entry here.

The basic steps are like these: Read the rest of this entry »

Posted in *nix, Development, Linux, openSuSE, Power User, Scripting, sed script, Software Development, SuSE Linux | Leave a Comment »

Lowering in language design, part one | Fabulous adventures in coding

Posted by jpluimers on 2014/04/30

I’ll keep an eye on this series by Eric Lippert: Lowering in language design, part one | Fabulous adventures in coding.

–jeroen

Posted in Development, Software Development | Leave a Comment »

Redirect to another web-site using a frame/frameset

Posted by jpluimers on 2014/04/30

Every once in a while, you have a domain but the hosting is at another party that does not allow setting the “Host header” for name based virtual hosting.

So then you want to redirect the page to the hosting party, preferably with keeping the URL in the address bar.
Some how, when searching how to do this (I do it once every couple of years), I always miss the WikiPedia entry at the bottom of this post.

Basically, there are a couple of ways for this:

  1. frameset
  2. head meta refresh
  3. JavaScript window.location.href (which is different from top.location.href)

Only the first one keeps the current URL in the address bar of the browser. The other ones will show the new target url in the address bar.

Notes:

  • in HTML5, the noframes part is not allowed any more.
  • the meta refresh has no extra quotes around the URL, the quotes are around the full text of “0; url=http://TARGET.URL/PATH”

Examples:

Read the rest of this entry »

Posted in Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »

Google Maps: Blue and Yellow Stars For (via: Kristian Köhntopp – Google+)

Posted by jpluimers on 2014/04/29

Kristian Köhntopp had a note post about Google Maps: Blue and Yellow Stars which he could not remove from within Google Maps.

In the end these appear to be bookmarks that you have to remove from Google Bookmarks.

He calls this a “complete UI disaster” to which I totally agree.

Thanks Kristian for sorting that out, as I did give up on that one.

–jeroen

via: Kristian Köhntopp – Google+ – Google Maps: Blue and Yellow Stars For some reasons there….

 

Posted in Google, GoogleBookmarks, GoogleMaps, Power User | Leave a Comment »

Linux: getting the correct license file for AntiVir

Posted by jpluimers on 2014/04/29

I needed AntiVir on an openSUSE workstation.

Too bad the default installation package from YaST installed an old license: AntiVir would not work, and I was getting emails like these at regular intervals:

<br />Date: Thu, 25 Apr 2014 08:57:11 +0200<br />From: Cron Daemon &lt;root@....&gt;<br />To: root@....<br />Subject: Cron &lt;root@...&gt; /usr/lib/AntiVir/guard/avupdate-guard --product=Scanner &gt; /dev/null<br /><br />Error: No valid license was found<br />

After searching the web for a while, I found a lot of posts with wrong information, basically coming down to these 2:

At the bottom of the post, you will find a small shell script that I use to keep the hbedv.key up-to-date.

First some more about HBEDV, then how I found about the new download location, and a command to show you the current license information. Read the rest of this entry »

Posted in *nix, bash, Development, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux, wget | 3 Comments »

Asperges in Lijnden

Posted by jpluimers on 2014/04/29

Grond onder de rook van Amsterdam perfect voor asperges http://www.parool.nl/parool/nl/4/AMSTERDAM/article/detail/3643503/2014/04/28/Grond-onder-de-rook-van-Amsterdam-perfect-voor-asperges.dhtml

Hoofdweg, nummer 132, in Lijnden

–jeroen

Posted in Uncategorized | Leave a Comment »

Easiest way to grant/query “Log on as a service” to a Windows user from the command-line? (my question on Super User)

Posted by jpluimers on 2014/04/28

I want to script an install where a service needs to be run as a user. I want to be able to specify the user.

Creating the user is easy through the [Wayback/Archive] NET USER /ADD command.

Specifying the user for the service can also be done: the [Wayback/ArchiveSC CONFIG command [Wayback/Archiveallows this (thanks [Wayback/Archive] wmz and [Wayback/Archive] ofiris).

Now the missing link: granting the user the [Wayback/Archive] “Log on as a service” privilege as a [Wayback/Archivelogon right (SeServiceLogonRight). Is there a command for this? Or a simple script for PowerShell?

(I know only Local Service can do this out of the box, and [Wayback/Archiveno other accounts by default are, but I want to have control over the account and what other privileges that account has).

Edit: solved. Thanks [Wayback/Archive] Mathias R. Jessen.

Here is the solution, including a few comments.

The easiest way to do this from a command line is definitely using NTRights.exe from the Windows Server 2003 Resource Toolkit.

ntrights +r SeServiceLogonRight -u jeroen -m \%COMPUTERNAME%

I changed the command-line a bit:

ntrights +r SeServiceLogonRight -u %USERNAME% -m \%COMPUTERNAME%

Note that

whoami /all

doesn’t show any change (not even after a reboot, it does not matter if you run it with or without UAC token).

secpol.msc

does show the change however, and does not require UAC (follow the tree to “Security Settings -> Local Policies -> User Rights Management -> Log on as a service” to see the users having the permission).

–jeroen

via: [Wayback/Archive] Easiest way to grant “Log on as a service” to a Windows user from the command-line? – Super User.

PS: Later I found out it is way easier to query the right:

accesschk.exe /accepteula -q -a SeServiceLogonRight

It will list the users having that right, for instance:

        IIS APPPOOLClassic .NET AppPool
        NT SERVICEALL SERVICES
        VCS-CIContinuaCI

There are similar rights one might want to query:

SeBatchLogonRight
SeDenyBatchLogonRight
SeInteractiveLogonRight
SeDenyInteractiveLogonRight
SeServiceLogonRight
SeDenyServiceLogonRight
SeNetworkLogonRight
SeDenyNetworkLogonRight

Thanks [Wayback/Archivetwasbrillig for explaining that at as answer to [Wayback/Archivepowershell – How to view user privileges using windows cmd? – Stack Overflow

Posted in Batch-Files, CommandLine, Development, Power User, PowerShell, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Vista | Leave a Comment »