Skip to content

Instantly share code, notes, and snippets.

View kotaoching's full-sized avatar

Kenson kotaoching

View GitHub Profile
@kotaoching
kotaoching / portalContentConfig
Created January 6, 2016 02:31
portalContentConfig
var portalContentConfig = {
//*** search modes (all content, web content only)
viewQueries: {
web: ' -type:"Layer" -type: "Map Document" -type:"Map Package" -type:"Basemap Package" -type:"Mobile Basemap Package" -type:"Mobile Map Package" -type:"ArcPad Package" -type:"Project Package" -type:"Project Template" -type:"Desktop Style" -type:"Pro Map" -type:"Layout" -type:"Explorer Map" -type:"Globe Document" -type:"Scene Document" -type:"Published Map" -type:"Map Template" -type:"Windows Mobile Package" -type:"Layer Package" -type:"Explorer Layer" -type:"Geoprocessing Package" -type:"Application Template" -type:"Code Sample" -type:"Geoprocessing Package" -type:"Geoprocessing Sample" -type:"Locator Package" -type:"Workflow Manager Package" -type:"Windows Mobile Package" -type:"Explorer Add In" -type:"Desktop Add In" -type:"File Geodatabase" -type:"Feature Collection Template"',
gis: ' -type:"Code Attachment" -type:"Featured Items" -type:"Symbol Set" -type:"Color Set" -type:"Windows Viewer Add In" -typ
@kotaoching
kotaoching / default.vcl
Created December 1, 2014 03:39
varnish 4.0.2
#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and http://varnish-cache.org/trac/wiki/VCLExamples for more examples.
@kotaoching
kotaoching / Clip Raster1
Last active December 20, 2015 06:38
Arcgie Engine - Clip Raster
public static void ClipRasterWithPolygon(string path, string rasterfileName, string shapefilename, string outputFolder, string Format, string outputFile)
{
//This function takes the geometry from a shape file and clip a raster based on the geometry.
//Although the clipping geometry is not limited to a polygon geometry type and there is not a hard code
//limit of number of geometics in the shape file, it is recommened that the shape file contains
//one clipping polygon or a few polygons that you defined as you clipping
//area.
//Open the raster to be clipped
IRasterDataset2 rasterDS = (IRasterDataset2)openRasterDataset(path, rasterfileName);
// <summary>
/// 地图输出栅格图片的简单方法,返回输出的文件名
/// </summary>
/// <param name="pActiveView"></param>
/// <returns></returns>
public static string ExportImage(IActiveView pActiveView)
{
SaveFileDialog pSaveFileDialog = new SaveFileDialog();
pSaveFileDialog.Filter = "JPEG(*.jpg)|*.jpg|AI(*.ai)|*.ai|BMP(*.BMP)|*.bmp|EMF(*.emf)|*.emf|GIF(*.gif)|*.gif|PDF(*.pdf)|*.pdf|PNG(*.png)|*.png|EPS(*.eps)|*.eps|SVG(*.svg)|*.svg|TIFF(*.tif)|*.tif";
###
Module dependencies.
###
express = require 'express'
routes = require './routes'
http = require 'http'
path = require 'path'
app = express()