interactive subway map

42

Upload: konstantin-chukhlomin

Post on 08-Aug-2015

100 views

Category:

Software


2 download

TRANSCRIPT

SubwayInteractive map

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

Dijkstra’s algorithm

var stage = new Kinetic.Stage({ container: ‘container’, width: 500, height: 500});

var layer = new Kinetic.Layer();

var circle = new Kinetic.Circle({ x: 100, y: 100, radius: 10, fill: 'red', stroke: 'black', strokeWidth: 1 draggable: true, dragBoundFunc: function(pos) { return { x: pos.x - pos.x % 10, y: pos.y - pos.y % 10 }; }});

layer.add(circle);circle.draw();

# -*- mode: ruby -*-# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

config.vm.box = "lucid32"

config.vm.network "private_network", ip: "192.168.33.14"

end

$ vagrant upBringing machine 'default' up with 'virtualbox' provider...==> default: Clearing any previously set forwarded ports...==> default: Fixed port collision for 22 => 2222. Now on port 2200.==> default: Clearing any previously set network interfaces...==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly==> default: Forwarding ports... default: 22 => 2200 (adapter 1)==> default: Booting VM...==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2200 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection timeout. Retrying... default: Warning: Remote connection disconnect. Retrying...==> default: Machine booted and ready!==> default: Checking for guest additions in VM...==> default: Configuring and enabling network interfaces...==> default: Mounting shared folders... default: /vagrant => /Users/konstantinchukhlomin/PhpstormProjects/subway==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`==> default: to force provisioning. Provisioners marked to run always will still run.

Dependency Manager for PHPNode Packaged Modules

{ "name": "subway", "version": "0.0.0", "description": "", "main": "index.js", "dependencies": { "grunt": "^0.4.5" }, "devDependencies": { "bower": "~1.3.7", "grunt": "~0.4.5", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-nodeunit": "~0.3.3", "grunt-contrib-uglify": "~0.4.0", "grunt-contrib-concat": "~0.4.0", "grunt-contrib-cssmin": "~0.10.0", "grunt-contrib-copy": "~0.5.0" }, "scripts": { "test": "echo \"...\" && exit 1" }, "repository": { "type": "git", "url": "..." }, "author": "...", "license": "..."}

{ "name": "chuhlomin/subway", "description": "", "minimum-stability": "dev", "license": "", "require": { "silex/silex": "~1.2", "twig/twig": ">=1.8,<2.0-dev", "symfony/twig-bridge": "~2.3", "doctrine/dbal": "2.2.*", "danielmewes/php-rql": "dev-master" }}

package.json

composer.json

The PHP micro-framework based on the Symfony2 ComponentsSILEX

0|red|300|100|Van Cordlandt Park 242 St|left|0,01|red|300|120|238 St|left|0,02|red|300|140|231 St|left|0,03|red|300|160|225 St|left|0,04|red|260|200|215 St|left|0,05|red|260|220|207 St|left|0,06|red|260|280|181 St|left|0,07|red|260|240|Dyckman St|left|0,0

nodes.csv

lines.csvorange|12orange|12green|12grey|12green|12

BowerA package manager

for the webThe JavaScript

Task Runner

GRUNT

bower.json Gruntfile.js{ "name": "subway", "version": "0.0.0", "homepage": "", "license": "...", "private": true, "ignore": [ "**/.*", "node_modules", "bower_components", "test", "tests" ], "dependencies": { "handlebars": "1.3.0", "jquery": "2.1.1", "bootstrap": "~3.1.1", "typeahead.js": "0.10.2", "fancyselect": "*", "flat-ui-official": "2.1.*" }}

module.exports = function(grunt) { grunt.initConfig( { cssmin: { combine: { files: { 'web/css/main.min.css': [ 'web/css/src/fancySelect.css', 'web/css/src/view.css' ], 'web/css/edit.min.css': [ 'bower_components/flat-ui-official/bootstrap/css/bootstrap.css', 'bower_components/flat-ui-official/css/flat-ui.css', 'web/css/src/edit.css' ] } } }, } ); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.registerTask('default', ['cssmin']);};

Kids, do not repeat this on real project

An open-source distributed database built with love.