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
public Thermometer(FEZ_Pin.AnalogIn pin, int interval, int min, int max) | |
{ | |
// Set reading parameters | |
_interval = interval; | |
_minScale = min; | |
_maxScale = max; | |
// Initialise thermometer sensor | |
_sensor = new AnalogIn((AnalogIn.Pin)pin); | |
_sensor.SetLinearScale(_minScale, _maxScale); |
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
public Thermometer(FEZ_Pin.AnalogIn pin, int interval, int min, int max) | |
{ | |
// Set reading parameters | |
_interval = interval; | |
_minScale = min; | |
_maxScale = max; | |
// Initialise thermometer sensor | |
_sensor = new AnalogIn((AnalogIn.Pin)pin); | |
_sensor.SetLinearScale(_minScale, _maxScale); |
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 | |
Migrates a Azure Virtual Machine to another subscription or data centre | |
.DESCRIPTION | |
Shutsdown the source VM | |
Exports the VM config to a temporary file | |
Loops through all Azure disks attached to the source VM | |
Schedules an async copy of the underlying VHD to the destination storage account | |
- optionally overwrites existing VHD in destination if it exists |
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
workflow AutoShutdownWorkflow | |
{ | |
#$VerbosePreference = "continue" | |
# Automation Settings | |
$pscreds = Get-AutomationPSCredential -Name "runbook-account" | |
$subscriptionName = "[subscription name here]" | |
$tagName = "autoShutdown" | |
# Authenticate using WAAD credentials |
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
%dw 1.0 | |
%output application/dw | |
--- | |
( | |
payload | |
) |
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
<ns0:invoiceResponse xmlns:ns0="http://ns0.com.au/api/invoices"> | |
<ns0:invoices> | |
<ns0:invoice> | |
<ns0:date>2016-01-01T12:00:00</ns0:date> | |
<ns0:billingHours>240</ns0:billingHours> | |
</ns0:invoice> | |
<ns0:invoice> | |
<ns0:date>2016-01-02T12:00:00</ns0:date> | |
<ns0:billingHours>540</ns0:billingHours> | |
</ns0:invoice> |
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
%dw 1.0 | |
%namespace ns0 http://ns0.com.au/api/invoices | |
--- | |
{ | |
ns0#invoiceResponse: { | |
ns0#invoices: { | |
ns0#invoice: { | |
ns0#date: "2016-01-01T12:00:00", | |
ns0#billingHours: "240" | |
}, |
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
<ns0:invoiceResponse xmlns:ns0="http://ns0.com.au/api/invoices"> | |
<ns0:invoices/> | |
</ns0:invoiceResponse> |
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
%dw 1.0 | |
%namespace ns0 http://ns0.com.au/api/invoices | |
--- | |
{ | |
ns0#invoiceResponse: { | |
ns0#invoices: "" | |
} | |
} |
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
%dw 1.0 | |
%output application/json | |
%namespace ns0 http://ns0.com.au/api/invoices | |
--- | |
( | |
payload.ns0#invoiceResponse.ns0#invoices.*ns0#invoice map ((invoice , indexOfInvoice) -> { | |
invoiceNo: indexOfInvoice, | |
invoiceDate: invoice.ns0#date as :datetime as :string {format: "dd/MM/YYYY HH:mm:ss"}, | |
billingTime: invoice.ns0#billingHours | |
}) |
OlderNewer