Eric Elliott's "Composing Software" Series
A collection of links to the excellent"Composing Software" series of medium stories by Eric Elliott.
<TextField | |
id="creditCardNumber" | |
label="Credit Card Number" | |
name="card_number" | |
placeholder="xxxx xxxx xxxx xxxx" | |
value={card_number} | |
onChange={handleChange} | |
InputProps={{ | |
inputComponent: InputMaskingCreditCard, | |
}} |
var Keys = { | |
backspace: 8, | |
tab: 9, | |
enter: 13, | |
shift: 16, | |
esc: 27, | |
space: 32, | |
pageUp: 33, | |
pageDown: 34, | |
end: 35, |
var guid = function () { | |
var id = ''; | |
var i; | |
var random; | |
for (i = 0; i < 32; i++) { | |
random = Math.random() * 16 | 0; | |
if (i === 8 || i === 12 || i === 16 || i === 20) { | |
id += '-'; | |
} | |
id += (i === 12 ? 4 : (i === 16 ? (random & 3 | 8) : random)).toString(16); |
$xmlFileName "Path to XML File"; | |
[xml]$xmlDoc = Get-Content $xmlFileName | |
$xmlDoc.App.Secret = "Some Value" | |
$xmlDoc.Save($xmlFileName) |
$xmlFileName "Path to XML File"; | |
[xml]$xmlDoc = Get-Content $xmlFileName | |
$xmlDoc.APP.Secret = "Some Value" | |
$xmlDoc.Save($xmlFileName) |
<App> | |
<Secret></Secret> | |
</App> |
function XmlDocTransform($xml, $xdt) | |
{ | |
if (!$xml -or !(Test-Path -path $xml -PathType Leaf)) { | |
throw "File not found. $xml"; | |
} | |
if (!$xdt -or !(Test-Path -path $xdt -PathType Leaf)) { | |
throw "File not found. $xdt"; | |
} | |
$scriptPath = (Get-Variable MyInvocation -Scope 1).Value.InvocationName | split-path -parent |
"<FolderPathOfMsDeploy>\msdeploy.exe" -verb:sync -source:package="<FilePathOfWDP>" -dest:auto="<RootUrlOfSitecoreInstance>" -setParam:"IIS Web Application Name"="<IISWebAppName>" -setParam:"AzureStorageConnectionString"="<AzureStorageConnectionString>" -setParam:"AzureStorageContainerName"="<AzureStorageBlobContainerName>" -setParam:"DefaultProvider"="azure" -enableRule:DoNotDeleteRule -verbose |
A collection of links to the excellent"Composing Software" series of medium stories by Eric Elliott.
# $Connection object will be diposed. | |
Using-Object($Connection = New-Object System.Data.SQLClient.SQLConnection($ConnectionString)) { | |
#code goes here. | |
} |