Skip to content

Instantly share code, notes, and snippets.

@stoolrossa
stoolrossa / Node_Express_Leaflet_PostGIS_View.haml
Created February 2, 2014 11:20
Node.js + Express + Leaflet + PostGIS View
%html
%head
%title LeanMap
%script{ type: 'text/javascript', src: 'javascripts/jquery-1.6.2.min.js' }
%script{ type: 'text/javascript', src: 'javascripts/leaflet.js' }
%link{ rel: 'stylesheet', href: 'javascripts/leaflet.css' }
%body
%div{ id: 'mapContainer', style: 'width: 800px; height: 600px;' }
:javascript
var map;
@stoolrossa
stoolrossa / Node_Express_Leaflet_PostGIS_Controller.js
Created February 2, 2014 11:17
Node.js + Express + Leaflet + PostGIS Controller
/**
* Module dependencies.
*/
var express = require('express');
var pg = require('pg');
var app = module.exports = express.createServer();
// Configuration
[TestClass]
public class given_a_drink_order_when_the_customer_orders_at_sunday_626pm : DrinkOrderContext
{
private decimal result;
public override void When()
{
base.When();
// setup clock to be 6:26pm on Sunday 30th of the June 2013
[TestClass]
public class given_a_drink_order_when_the_customer_orders_at_friday_513 : DrinkOrderContext
{
private decimal result;
public override void When()
{
base.When();
// setup clock to be 5:13pm on Friday 28th of the June 2013
public class DrinkOrderContext : SpecificationContext
{
protected Mock<IPriceList> drinksMenu;
protected Mock<IClock> clock;
protected List<Order> orders;
protected decimal halfPrice = 17.05m;
protected decimal fullPrice = 34.10m;
public override void Given()
{
[TestClass]
public abstract class SpecificationContext
{
[TestInitialize]
public void Init()
{
Given();
When();
}
[TestClass]
public class PriceListTest
{
[TestMethod]
public TestLookupPrice()
{
// Arrange
var priceList = new PriceList();
// Act
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using Blog.SoeExample.Service;
using Blog.SoeExample.Repository;
namespace Blog.SoeExample.Installer
{
public class ServiceInstaller : IWindsorInstaller
{
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using ESRI.ArcGIS.Geodatabase;
namespace Blog.SoeExample.Installer
{
public class ArcObjectsInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
using System;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.SOESupport;
namespace Blog.SoeExample.Model
{
public class Parcel : IModel
{
public IGeometry Geometry { get; set; }
public string Description { get; set; }