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
/// <summary> | |
/// Create valid <see cref="IGeometry"/> list from the incoming | |
/// JSON. | |
/// </summary> | |
/// <param name="geometryType">Only a single type of geometry is supported in each | |
/// query result, so the <paramref name="json"/> value is limited to one of the | |
/// <see cref="EsriGeometryType"/>s.</param> | |
/// <param name="json">JSON query result from <see cref="DownloadResource"/> which | |
/// is the raw JSON string.</param> | |
/// <returns>A list of point, polyline, polygon geometries in the same order |
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
/// <summary> | |
/// Parses the results of a query operation against the layer | |
/// in to <see cref="Feature"/>s. | |
/// </summary> | |
/// <param name="dataSourceFields">List of valid fields</param> | |
/// <param name="geometryType"></param> | |
/// <param name="json"></param> | |
/// <returns></returns> | |
/// <remarks>Because the collection of fields can vary between each layer and even | |
/// between query results for each layer this actually has a two phased approach to loading |
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
[Test] | |
public void Throwing_an_exception_prevents_anything_from_being_saved() | |
{ | |
Assert.Throws<Exception>(() => | |
{ | |
using (ISession session = NHibernateHelper.OpenSession()) | |
{ | |
Person person = ObjectMother.ValidPerson(); | |
Person person2 = ObjectMother.ValidPersonTwo(); |
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
#!/usr/bin/env python | |
import csv | |
import time | |
import cx_Oracle | |
# Parses USPS addresses from voter addresses | |
# and inserts them into VR_LOCATION table ready | |
# for geocoding. Does batches by zipcode | |
def LoadZips(): | |
zipcodes = [] |
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
using System; | |
using System.DirectoryServices; | |
using System.Security.Principal; | |
using System.Web.UI; | |
namespace BookWeb | |
{ | |
public partial class Main : MasterPage | |
{ | |
protected void Page_Load(object sender, EventArgs e) |
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
public static MemoryStream CreateTempImage(int width, int height) | |
{ | |
using (var image = new Bitmap(width, height, PixelFormat.Format32bppArgb)) | |
{ | |
string text = String.Format("{0:s}", DateTime.Now); | |
Graphics graphics = Graphics.FromImage(image); | |
var brush = new SolidBrush(Color.Red); | |
graphics.FillRectangle(brush, 0, 0, image.Width, image.Height); | |
var font = new Font("Arial", 18, FontStyle.Bold); |
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
using System; | |
using System.IO; | |
namespace Woolpert.Compression | |
{ | |
/// <summary> | |
/// Zips files up | |
/// </summary> | |
public interface IFileZipUtility | |
{ |
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
using ESRI.ArcGIS.Geometry; | |
using GisSharpBlog.NetTopologySuite.IO; | |
namespace Spatial.Formats | |
{ | |
/// <summary> | |
/// This class is used to convert a GeoAPI Geometry to ESRI and vice-versa. | |
/// It can also convert a ESRI Geometry to WKB/WKT and vice-versa. | |
/// </summary> | |
/// <remarks>Copied wholesale from this forum post, then converted to |
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
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
ILogFactory factory = new NLogFactory(); | |
Log.InitializeLogFactory(factory); | |
ContainerBootstrapper.BootstrapStructureMap(); | |
if (Environment.CommandLine.ToLower().Contains("-console")) | |
{ |
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
using System; | |
using StructureMap; | |
using Topshelf; | |
using Topshelf.Configuration; | |
namespace GisQueryDirectHost | |
{ | |
internal class Program | |
{ | |
private static void Main(string[] args) |
OlderNewer