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
/** | |
* Splits a Pascal-Case word into individual words separated by spaces. | |
* @param {Object} word | |
* @returns {String} | |
*/ | |
function splitPascalCase(word) { | |
var wordRe = /($[a-z])|[A-Z][^A-Z]+/g; | |
return word.match(wordRe).join(" "); | |
} |
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
function generateScoreColorCss() { | |
/// <summary>Generates CSS style element that colors address candidate scored elements add adds the element to <head>.</summary> | |
/// <returns type="jQuery"> | |
var i, output = $("<style>"), css; | |
function generateStyle(min, max, color) { | |
var style = []; | |
for (i = min; i <= max; i++) { | |
if (i > min) { style.push(","); } | |
style.push(".score-" + i); |
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
/// <summary> | |
/// <para>ArcGIS Server 10.1 introduced a bug that causes the output format to always be set to "json" | |
/// even if another format (e.g., "xml") is specified via the "f" parameter in the HTTP request. | |
/// This method reads the "f" parameter from the <paramref name="operationInput"/> and sets the | |
/// <paramref name="outputFormat"/> to be the same value as the "f" parameter.</para> | |
/// <para>If there is no "f" parameter in <paramref name="operationInput"/> then | |
/// <paramref name="outputFormat"/> will retain its original value.</para> | |
/// </summary> | |
/// <param name="boundVariables"></param> | |
/// <param name="outputFormat"></param> |
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
/** | |
* Converts a value to a string appropriate for entry into a CSV table. E.g., a string value will be surrounded by quotes. | |
* @param {string|number|object} theValue | |
* @param {string} sDelimiter The string delimiter. Defaults to a double quote (") if omitted. | |
*/ | |
function toCsvValue(theValue, sDelimiter) { | |
var t = typeof (theValue), output; | |
if (typeof (sDelimiter) === "undefined" || sDelimiter === null) { | |
sDelimiter = '"'; |
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
/** | |
* Writes the properties of an object to a definition list. | |
* @param Any type of object. | |
* @return {string} Returns a definition list for most objects. Returns an ordered list for Arrays. Strings and Dates will return a string. | |
*/ | |
function objectToList(obj) { | |
var name, output, t, v; | |
t = typeof(obj); |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Web.Script.Serialization; | |
namespace LayerTypeDetector | |
{ | |
class Program |
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
/* | |
* Jeff Jacobson, CGIS, ITS3 | |
* 2008-09 | |
*/ | |
using System.Text.RegularExpressions; | |
using System; | |
namespace Wsdot.Cgis.Extensions | |
{ |
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
// This RegEx should match any valid state route identifier. | |
var _SR_REGEX = /^(\d{3})(?:((?:AR)|(?:C[DI])|(?:C[O])|(?:F[DI])|(?:LX)|(?:[PQRS][\dU])|(?:RL)|(?:SP)|(?:TB)|(?:TR)|(?:PR)|(?:F[ST])|(?:ML))([A-Z0-9]{0,6}))?$/i; | |
/* | |
==RRTs (Related Roadway Type)== | |
AR Alternate Route | |
CD Collector Distributor (Dec) | |
CI Collector Distributor (Inc) | |
CO Couplet | |
FI Frontage Road (Inc) |
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
using System; | |
using System.Collections.Generic; | |
using ESRI.ArcGIS.Carto; | |
using ESRI.ArcGIS.esriSystem; | |
using ESRI.ArcGIS.Geodatabase; | |
using ESRI.ArcGIS.Server; | |
namespace Wsdot.ArcObjects.Extensions | |
{ | |
public static class ArcObjectsLinqExtensions |
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
namespace Wsdot.GIS.Geometry.Conversion | |
{ | |
using System; | |
using System.Collections.Generic; | |
using ESRI.ArcGIS.SOAP; | |
using Microsoft.SqlServer.Types; | |
public static class SqlGeoemtryExtensions | |
{ | |
/// <summary> |