This file contains hidden or 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 class Organisation | |
| { | |
| public const string Name = "App:Organisation"; | |
| public string Email { get; set; } = String.Empty; | |
| public string Phone { get; set; } = String.Empty; | |
| } | |
| ... |
This file contains hidden or 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 class TestController : Controller | |
| { | |
| private IConfiguration _configuration; | |
| public TestController(IConfiguration configuration) | |
| { | |
| _configuration = configuration; | |
| Debug.WriteLine($"Config (MyKey): {_configuration.GetSection("MyKey")}"); | |
| Debug.WriteLine($"Config (App:Name): {_configuration.GetSection("App:Name")}"); | |
| Debug.WriteLine($"Config (App:Organisation:Email): {_configuration.GetSection("App:Organisation:Email")}"); |
This file contains hidden or 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
| { | |
| "Logging": { | |
| "LogLevel": { | |
| "Default": "Information", | |
| "Microsoft.AspNetCore": "Warning" | |
| } | |
| }, | |
| "AllowedHosts": "*", | |
| "MyKey": "My appsettings key value", | |
| "App": { |
This file contains hidden or 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 cqlHoc = (Component) => { | |
| return (props) => { | |
| const { layer, attr, remainingProps } = props; | |
| const generateCql = (attr, values) => `${attr} IN (${values.map(_ => `'${_}'`).join(',')})`; | |
| return <Component | |
| {...remainingProps} | |
| onChange={(selected) => { | |
| layer.setCql(generateCql(attr, selected)); | |
| }} |
This file contains hidden or 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
| function DisplayPosts({posts}) { | |
| return ( | |
| <ul> | |
| { posts.map(({id, text}) => (<li key={id}>{text}</li>)) } | |
| </ul> | |
| ); | |
| } | |
| function loaderHoc(Component) { | |
| return class LoaderComponent extends React.Component { |
This file contains hidden or 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 subCategoryHoc = (Component) => { | |
| return (props) => { | |
| const { onCountryChange, onCityChange } = props; | |
| const [selectedOption, setSelectedOption] = useState("canada"); | |
| const cities = { | |
| "canada": ["Toronto", "Quebec City", "Vancouver"], | |
| "china": ["Shanghai", "Beijing", "Guangzhou"], | |
| "japan": ["Sapporo", "Tokyo", "Yokohama"], | |
| "us": ["New York", "Los Angeles", "Chicago"], | |
| }; |
This file contains hidden or 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
| <configProtectedData defaultProvider="defaultProvider"> | |
| <providers> | |
| <add name="defaultProvider" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=4.0.30319.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" keyContainerName="Project_KeyContainer" useMachineContainer="true" /> | |
| </providers> | |
| </configProtectedData> |
This file contains hidden or 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
| <Target Name="executeEncryptionInHost" AfterTargets="AddIisSettingAndFileContentsToSourceManifest"> | |
| <Message Text="Executing encryption batch script" /> | |
| <ItemGroup> | |
| <MsDeploySourceManifest Include="runCommand"> | |
| <path>E:\scripts\run_encrypt.bat</path> | |
| </MsDeploySourceManifest> | |
| </ItemGroup> | |
| </Target> |
This file contains hidden or 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
| runByFeatures(features) { | |
| if (features.type !== "Feature") return undefined; | |
| let polygon = turf.polygon(features.geometry.coordinates); | |
| const unitsOption = {units: 'kilometers'}; | |
| let polyline, length, bbox, percentage1, percentage2, fraction, point1, point2, bearing; | |
| let point1a, point1b, point2a, point2b, line1, line2; | |
| let largest, diagonalLength; | |
| polyline = turf.polygonToLineString(polygon); |
This file contains hidden or 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
| SELECT B.geom, COUNT(A.id) as count FROM | |
| ( | |
| SELECT (ST_SquareGrid(0.1, | |
| ST_GeomFromText('POLYGON((103.605655941305 1.15876249278089,103.605655941305 1.47078321442792,104.088483621717 1.47078321442792,104.088483621717 1.15876249278089,103.605655941305 1.15876249278089))', 4326) | |
| )).*) B | |
| LEFT JOIN cluster_locations A ON ST_Intersects(A.geom, B.geom) | |
| GROUP BY B.geom |
NewerOlder