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
| import {Injectable, provide} from 'angular2/core'; | |
| import {Observable} from 'rxjs'; | |
| const GEOLOCATION_ERRORS = { | |
| 'errors.location.unsupportedBrowser': 'Browser does not support location services', | |
| 'errors.location.permissionDenied': 'You have rejected access to your location', | |
| 'errors.location.positionUnavailable': 'Unable to determine your location', | |
| 'errors.location.timeout': 'Service timeout has been reached' | |
| }; |
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
| /* | |
| In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
| server, but for some reason omit a client connecting to it. I added an | |
| example at the bottom. | |
| Save the following server in example.js: | |
| */ | |
| var net = require('net'); |
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
| <?php | |
| /* | |
| ** Converts HSV to RGB values | |
| ** βββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| ** Reference: http://en.wikipedia.org/wiki/HSL_and_HSV | |
| ** Purpose: Useful for generating colours with | |
| ** same hue-value for web designs. | |
| ** Input: Hue (H) Integer 0-360 | |
| ** Saturation (S) Integer 0-100 |