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
Write-Host "Environment Variable Substitution" | |
$variables = gci $env:$env:APPLICATION_PREFIX* | Select-Object -Property Key, Value | |
$configPath = "$env:APPLICATION_PATH\$env:CONFIG_FILE" | |
Write-Output "Loading config file from $configPath" | |
$appSettings = Get-Content -Raw $configPath | ConvertFrom-Json | |
foreach($variable in $variables) { |
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
foreach (var salesRep in salesReps) | |
{ | |
var summary = new SalesSummary { SalesRep = salesRep }; | |
var repTransactions = transactions.Where(x => x.SalesRep == salesRep); | |
summary.Y2DSold = repTransactions.Where(x => x.Date >= new DateTime(dateTimeNow.Year, 1, 1)) | |
.Select(x => CalculateTransaction(x)) |
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
Object shares = getValueFromField("SHARES"); | |
Shares = (string)shares; |
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
Object shares = getValueFromField("SHARES"); | |
Shares = shares?.ToString(); |
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
const HoC = Component => EnhancedComponent; |
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
const withClassName = Component => props => ( | |
<Component {...props} className="my-class" /> | |
); |
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
const Profile = ({ username, age }) => ( | |
<div> | |
<div>Username: {username}</div> | |
<div>Age; {age}</div> | |
</div> | |
); | |
Profile.propTypes = { | |
username: string, | |
age: number | |
}; |
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
const Profile = ({ name }) => ( | |
<div> | |
<div>Name: {name}</div> | |
</div> | |
); | |
Profile.propTypes = { | |
name: string | |
}; | |
const ProfileWithRenamedUsername = renameProp('username', 'name')(Profile); |
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
const enhance = compose( | |
flattenProp('user'), | |
renameProp('username', 'name') | |
); | |
// Combine HOC's (from Recompose or custom) with compose | |
const EnhancedProfile = enhance(Profile); |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch via NPM", | |
"runtimeExecutable": "npm", | |
"cwd": "${workspaceFolder}/hello-world", | |
"runtimeArgs": [ |
OlderNewer