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
<html> | |
<head> | |
<script> | |
let userLatitude = parseFloat('45.532032'); | |
let userLongitude = parseFloat('-73.595368'); | |
let stationsInfosEndpoint = 'https://api-core.bixi.com/gbfs/en/station_information.json'; | |
let stationsStatusEndpoint = 'https://api-core.bixi.com/gbfs/en/station_status.json'; | |
let xhr = new XMLHttpRequest(); |
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
function applyCostPerimeter(userAttributes) { | |
if (userAttributes.hasOwnProperty('manually.admin') || userAttributes.hasOwnProperty('saml.admin')) { | |
return { | |
"costPerimeterDefinition" : null, | |
"roles" : ['ADMIN'], | |
}; | |
} else { | |
return { | |
"costPerimeterDefinition" : { |
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
{ | |
"metadata": {}, | |
"data": { | |
"Azure/uksouth": { | |
"Virtual Machines": { | |
"Compute Hours": { | |
"Standard_D12_v2 VM": { | |
"cost": { | |
"pricingModelWithSupportCharges": 4.37 | |
} |
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
[ | |
{ | |
"user:Environment": ["Production"], | |
"user:Application": ["Project A"], | |
"user:Component": [".*frontend.*"] | |
} | |
] |
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
[ | |
{ | |
"user:Environment": ["Development"], | |
"user:Application": ["Project A"] | |
} | |
] |
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
[ | |
{ | |
"user:Environment": ["Production"], | |
"user:Application": ["Project A","Project B"], | |
"user:Component": ["Frontend"] | |
}, | |
{ | |
"user:Environment": ["Development"], | |
"user:Application": ["Project B"], | |
"user:Component": ["Backend"] |
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
Snippet Name: Android Behavior - WPF Style | |
Platform(s): Xamarin.Android | |
Function: Reproduce the beloved WPF behaviors in Android | |
Snippet: | |
public abstract class Behavior<T> : View where T:View | |
{ | |
int _viewId; | |
protected Behavior(Context context, IAttributeSet attrs) |