Powershell Version

Command to display Powershell version:
$Host.Version

OR (if running version 2 or greater):
(get-host).version

Anonymous data structure in VB

Dim customerIDs As Object = {New With {.customerID = "0001"}, New With {.customerID = "0002"}, New With {.customerID = "0003"}}

German - English: Mogelpackung

German: Mogelpackung
English:

  • false advertising
  • false promise
  • sham package

Happy numbers in Perl

Here is my implementation in Perl for determining whether a number is a Happy Numbers or not.


#!perl

use strict;
use warnings;
use YAML;
use feature qw(say);

sub is_happy {
my $number = shift @_;
my @seen = @{shift @_ // []};

# One is a happy number
if ($number == 1) {
return 1;
};

Light on Dark Theme for Notepad++

Chris Kempson's Tomorrow-Theme is an excellent light-on-dark theme to use when coding.

Pages

Subscribe to Phil Quinn RSS