git pull
git commit –am “comments”
| RUN apt-get -y install debconf-utils | |
| RUN add-apt-repository -y ppa:webupd8team/java | |
| RUN apt-get update | |
| RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections | |
| RUN apt-get -y install oracle-java8-installer |
| export class GeoMock { | |
| constructor() { | |
| if (typeof navigator === "undefined" || navigator === null) { | |
| window.navigator = {}; | |
| } | |
| if (navigator.geolocation == null) { | |
| window.navigator.geolocation = {}; | |
| } | |
| navigator.geolocation.delay = 1000; | |
| navigator.geolocation.shouldFail = true; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Test</title> | |
| <link rel="stylesheet" href=""> | |
| <style> | |
| body { background-color: rice; } | |
| ul { |
| /** | |
| * Given an array of coins type, and an array of quatity for each type, | |
| * find out the possible sums. | |
| */ | |
| function Set() { | |
| this.set = {}; | |
| } | |
| Set.prototype.add = function(value) { | |
| if (!this.set[value]) this.set[value] = true; | |
| } |
| /** | |
| * Question - Given an image represented by an N x N matrix, where | |
| * each pixel in the image is 4 bytes, write a method to rotate the | |
| * image by 90 degress. Can you do this in place? | |
| * | |
| * rotateCopy() method is a brute force method to transpose one item | |
| * at a time and return a new array. It is very slow. The time | |
| * complexity is O(N^2), and it take as N^2 * [0-2^32) bits of memory. | |
| * | |
| * rotate() method performs a cyclic swap on the edges on each layer. |
| var _ = require('underscore'); | |
| module.exports = function(Customer) { | |
| Customer.getRolesById = function (id, cb) { | |
| Customer.getApp(function (err, app) { | |
| if (err) throw err; | |
| var RoleMapping = app.models.RoleMapping; | |
| var Role = app.models.Role; | |
| RoleMapping.find({ where : { principalId: id }}, function (err, roleMappings) { | |
| var roleIds = _.uniq(roleMappings |
| require([ | |
| 'app/config', | |
| 'dojo/ready', | |
| 'dojo/on', | |
| 'dojo/dom', | |
| 'esri/arcgis/OAuthInfo', | |
| 'esri/IdentityManager'], | |
| function( | |
| config, | |
| ready, |
The source code for the tutorial on