This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.DESCRIPTION | |
PowerShell cron expression parser, to check if a date/time matches a cron expression | |
Format: | |
<min> <hour> <day-of-month> <month> <day-of-week> | |
.PARAMETER Expression | |
A cron expression to validate | |
.PARAMETER DateTime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE currency; | |
-- Create table variable | |
CREATE TABLE currency ( | |
name VARCHAR(20), | |
code VARCHAR(3), | |
symbol VARCHAR(5) | |
); | |
ALTER TABLE currency CONVERT TO CHARACTER SET utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' | |
. "$here\$sut" | |
Describe "Compare-Hashtable" { | |
Context "When both are empty" { | |
$Left, $Right = @{}, @{} | |
It "should return nothing" { | |
Compare-Hashtable $Left $Right | Should BeNullOrEmpty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Resize an image | |
.DESCRIPTION | |
Resize an image based on a new given height or width or a single dimension and a maintain ratio flag. | |
The execution of this CmdLet creates a new file named "OriginalName_resized" and maintains the original | |
file extension | |
.PARAMETER Width | |
The new width of the image. Can be given alone with the MaintainRatio flag | |
.PARAMETER Height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kendo.data.binders.class = kendo.data.Binder.extend({ | |
init: function (target, bindings, options) { | |
kendo.data.Binder.fn.init.call(this, target, bindings, options); | |
// get list of class names from our complex binding path object | |
this._lookups = []; | |
for (var key in this.bindings.class.path) { | |
this._lookups.push({ | |
key: key, | |
path: this.bindings.class.path[key] |