text:
![screenshot](https://raw.githubusercontent.com/Zhangdroid/Gokotta/master/resources/screenshot.png)

Gokotta is a simple music player, built by [electron](http://electron.atom.io/) and [vue](http://vuejs.org/).

**Note: This project is still in developing with many bugs, and using some experimental features. DO NOT use it on production**

support format: **mp3, aac and wav**

## Download

MacOS: [https://github.com/Zhangdroid/Gokotta/releases](https://github.com/Zhangdroid/Gokotta/releases)

Linux and Windows will be coming soon.

## Usage

Just click `add` and chose your music folder.

## Install

```
git clone https://github.com/Zhangdroid/Gokotta.git
cd Gokotta && npm install
```

## Run

Run this two commands in **different** console tabs:

```
npm run dev-server
npm run dev
```

## Package

```
npm run release
```

Or run this command for all platform:

```
npm run release-all
```

## TODO

* [x] Search
* [x] Setting
* [ ] Support Windows and Linux
* [ ] Custom list
* [ ] Plugin support
* [ ] Core Plugin(lyric, ID3 editor, Equalizer...)

## Credits

* [Electron](http://electron.atom.io/)
* [Vue](http://vuejs.org/)
* [wavesurfer.js](http://wavesurfer-js.org/)
* [musicmetadata](https://github.com/leetreveil/musicmetadata)
* [node-vibrant](https://www.npmjs.com/package/node-vibrant)
* [Logo](https://github.com/Zhangdroid/Gokotta/blob/master/src/assets/images/logo.png) from [http://logodust.com/](http://logodust.com/)

## License

[MIT License](https://github.com/Zhangdroid/Gokotta/blob/master/LICENSE)

redpajama_set_name: RedPajamaGithub


text:
"""Utilities for handling IEEE 754 floating point special values

This python module implements constants and functions for working with
IEEE754 double-precision special values.  It provides constants for
Not-a-Number (NaN), Positive Infinity (PosInf), and Negative Infinity
(NegInf), as well as functions to test for these values.

The code is implemented in pure python by taking advantage of the
'struct' standard module. Care has been taken to generate proper
results on both big-endian and little-endian machines. Some efficiency
could be gained by translating the core routines into C.

See <http://babbage.cs.qc.edu/courses/cs341/IEEE-754references.html>
for reference material on the IEEE 754 floating point standard.

Further information on this package is available at
<http://www.analytics.washington.edu/statcomp/projects/rzope/fpconst/>.

------------------------------------------------------------------
Author:    Gregory R. Warnes <Gregory.R.Warnes@Pfizer.com>
Date:      2005-02-24
Version:   0.7.2
Copyright: (c) 2003-2005 Pfizer, Licensed to PSF under a Contributor Agreement
License:   Licensed under the Apache License, Version 2.0 (the"License");
	   you may not use this file except in compliance with the License.
	   You may obtain a copy of the License at

	       http://www.apache.org/licenses/LICENSE-2.0

	   Unless required by applicable law or agreed to in
	   writing, software distributed under the License is
	   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
	   CONDITIONS OF ANY KIND, either express or implied.  See
	   the License for the specific language governing
	   permissions and limitations under the License.
------------------------------------------------------------------
"""

__version__ = "0.7.2"
ident = "$Id: fpconst.py,v 1.16 2005/02/24 17:42:03 warnes Exp $"

import struct, operator

# check endianess
_big_endian = struct.pack('i',1)[0] != '\x01'

# and define appropriate constants
if(_big_endian):
    NaN    = struct.unpack('d', '\x7F\xF8\x00\x00\x00\x00\x00\x00')[0]
    PosInf = struct.unpack('d', '\x7F\xF0\x00\x00\x00\x00\x00\x00')[0]
    NegInf = -PosInf
else:
    NaN    = struct.unpack('d', '\x00\x00\x00\x00\x00\x00\xf8\xff')[0]
    PosInf = struct.unpack('d', '\x00\x00\x00\x00\x00\x00\xf0\x7f')[0]
    NegInf = -PosInf

def _double_as_bytes(dval):
    "Use struct.unpack to decode a double precision float into eight bytes"
    tmp = list(struct.unpack('8B',struct.pack('d', dval)))
    if not _big_endian:
        tmp.reverse()
    return tmp

##
## Functions to extract components of the IEEE 754 floating point format
##

def _sign(dval):
    "Extract the sign bit from a double-precision floating point value"
    bb = _double_as_bytes(dval)
    return bb[0] >> 7 & 0x01

def _exponent(dval):
    """Extract the exponentent bits from a double-precision floating
    point value.

    Note that for normalized values, the exponent bits have an offset
    of 1023. As a consequence, the actual exponentent is obtained
    by subtracting 1023 from the value returned by this function
    """
    bb = _double_as_bytes(dval)
    return (bb[0] << 4 | bb[1] >> 4) & 0x7ff

def _mantissa(dval):
    """Extract the _mantissa bits from a double-precision floating
    point value."""

    bb = _double_as_bytes(dval)
    mantissa =  bb[1] & 0x0f << 48
    mantissa += bb[2] << 40
    mantissa += bb[3] << 32
    mantissa += bb[4]
    return mantissa

def _zero_mantissa(dval):
    """Determine whether the mantissa bits of the given double are all
    zero."""
    bb = _double_as_bytes(dval)
    return ((bb[1] & 0x0f) | reduce(operator.or_, bb[2:])) == 0

##
## Functions to test for IEEE 754 special values
##

def isNaN(value):
    "Determine if the argument is a IEEE 754 NaN (Not a Number) value."
    return (_exponent(value)==0x7ff and not _zero_mantissa(value))

def isInf(value):
    """Determine if the argument is an infinite IEEE 754 value (positive
    or negative inifinity)"""
    return (_exponent(value)==0x7ff and _zero_mantissa(value))

def isFinite(value):
    """Determine if the argument is an finite IEEE 754 value (i.e., is
    not NaN, positive or negative inifinity)"""
    return (_exponent(value)!=0x7ff)

def isPosInf(value):
    "Determine if the argument is a IEEE 754 positive infinity value"
    return (_sign(value)==0 and _exponent(value)==0x7ff and \
            _zero_mantissa(value))

def isNegInf(value):
    "Determine if the argument is a IEEE 754 negative infinity value"
    return (_sign(value)==1 and _exponent(value)==0x7ff and \
            _zero_mantissa(value))

##
## Functions to test public functions.
##

def test_isNaN():
    assert( not isNaN(PosInf) )
    assert( not isNaN(NegInf) )
    assert(     isNaN(NaN   ) )
    assert( not isNaN(   1.0) )
    assert( not isNaN(  -1.0) )

def test_isInf():
    assert(     isInf(PosInf) )
    assert(     isInf(NegInf) )
    assert( not isInf(NaN   ) )
    assert( not isInf(   1.0) )
    assert( not isInf(  -1.0) )

def test_isFinite():
    assert( not isFinite(PosInf) )
    assert( not isFinite(NegInf) )
    assert( not isFinite(NaN   ) )
    assert(     isFinite(   1.0) )
    assert(     isFinite(  -1.0) )

def test_isPosInf():
    assert(     isPosInf(PosInf) )
    assert( not isPosInf(NegInf) )
    assert( not isPosInf(NaN   ) )
    assert( not isPosInf(   1.0) )
    assert( not isPosInf(  -1.0) )

def test_isNegInf():
    assert( not isNegInf(PosInf) )
    assert(     isNegInf(NegInf) )
    assert( not isNegInf(NaN   ) )
    assert( not isNegInf(   1.0) )
    assert( not isNegInf(  -1.0) )

# overall test
def test():
    test_isNaN()
    test_isInf()
    test_isFinite()
    test_isPosInf()
    test_isNegInf()

if __name__ == "__main__":
    test()


text:
/*global exports:true*/
"use strict";

var Syntax = require('esprima-fb').Syntax;
var utils = require('jstransform/src/utils');

var FALLBACK_TAGS = require('./xjs').knownTags;
var renderXJSExpressionContainer =
  require('./xjs').renderXJSExpressionContainer;
var renderXJSLiteral = require('./xjs').renderXJSLiteral;
var quoteAttrName = require('./xjs').quoteAttrName;

var trimLeft = require('./xjs').trimLeft;

/**
 * Customized desugar processor.
 *
 * Currently: (Somewhat tailored to React)
 * <X> </X> => X(null, null)
 * <X prop="1" /> => X({prop: '1'}, null)
 * <X prop="2"><Y /></X> => X({prop:'2'}, Y(null, null))
 * <X prop="2"><Y /><Z /></X> => X({prop:'2'}, [Y(null, null), Z(null, null)])
 *
 * Exceptions to the simple rules above:
 * if a property is named "class" it will be changed to "className" in the
 * javascript since "class" is not a valid object key in javascript.
 */

var JSX_ATTRIBUTE_TRANSFORMS = {
  cxName: function(attr) {
    throw new Error(
      "cxName is no longer supported, use className={cx(...)} instead"
    );
  }
};

/**
 * Removes all non-whitespace/parenthesis characters
 */
var reNonWhiteParen = /([^\s\(\)])/g;
function stripNonWhiteParen(value) {
  return value.replace(reNonWhiteParen, '');
}

function visitReactTag(traverse, object, path, state) {
  var jsxObjIdent = utils.getDocblock(state).jsx;
  var openingElement = object.openingElement;
  var nameObject = openingElement.name;
  var attributesObject = openingElement.attributes;

  utils.catchup(openingElement.range[0], state, trimLeft);

  if (nameObject.type === Syntax.XJSNamespacedName && nameObject.namespace) {
    throw new Error('Namespace tags are not supported. ReactJSX is not XML.');
  }

  var isReact = jsxObjIdent !== 'JSXDOM';

  // We assume that the React runtime is already in scope
  if (isReact) {
    utils.append('React.createElement(', state);
  }

  // Only identifiers can be fallback tags or need quoting. We don't need to
  // handle quoting for other types.
  var didAddTag = false;

  // Only identifiers can be fallback tags. XJSMemberExpressions are not.
  if (nameObject.type === Syntax.XJSIdentifier) {
    var tagName = nameObject.name;
    var quotedTagName = quoteAttrName(tagName);

    if (FALLBACK_TAGS.hasOwnProperty(tagName)) {
      // "Properly" handle invalid identifiers, like <font-face>, which needs to
      // be enclosed in quotes.
      var predicate =
        tagName === quotedTagName ?
          ('.' + tagName) :
          ('[' + quotedTagName + ']');
      utils.append(jsxObjIdent + predicate, state);
      utils.move(nameObject.range[1], state);
      didAddTag = true;
    } else if (tagName !== quotedTagName) {
      // If we're in the case where we need to quote and but don't recognize the
      // tag, throw.
      throw new Error(
        'Tags must be valid JS identifiers or a recognized special case. `<' +
        tagName + '>` is not one of them.'
      );
    }
  }

  // Use utils.catchup in this case so we can easily handle XJSMemberExpressions
  // which look like Foo.Bar.Baz. This also handles unhyphenated XJSIdentifiers
  // that aren't fallback tags.
  if (!didAddTag) {
    utils.move(nameObject.range[0], state);
    utils.catchup(nameObject.range[1], state);
  }

  if (isReact) {
    utils.append(', ', state);
  } else {
    utils.append('(', state);
  }

  var hasAttributes = attributesObject.length;

  var hasAtLeastOneSpreadProperty = attributesObject.some(function(attr) {
    return attr.type === Syntax.XJSSpreadAttribute;
  });

  // if we don't have any attributes, pass in null
  if (hasAtLeastOneSpreadProperty) {
    utils.append('Object.assign({', state);
  } else if (hasAttributes) {
    utils.append('{', state);
  } else {
    utils.append('null', state);
  }

  // keep track of if the previous attribute was a spread attribute
  var previousWasSpread = false;

  // write attributes
  attributesObject.forEach(function(attr, index) {
    var isLast = index === attributesObject.length - 1;

    if (attr.type === Syntax.XJSSpreadAttribute) {
      // Close the previous object or initial object
      if (!previousWasSpread) {
        utils.append('}, ', state);
      }

      // Move to the expression start, ignoring everything except parenthesis
      // and whitespace.
      utils.catchup(attr.range[0], state, stripNonWhiteParen);
      // Plus 1 to skip `{`.
      utils.move(attr.range[0] + 1, state);
      utils.catchup(attr.argument.range[0], state, stripNonWhiteParen);

      traverse(attr.argument, path, state);

      utils.catchup(attr.argument.range[1], state);

      // Move to the end, ignoring parenthesis and the closing `}`
      utils.catchup(attr.range[1] - 1, state, stripNonWhiteParen);

      if (!isLast) {
        utils.append(', ', state);
      }

      utils.move(attr.range[1], state);

      previousWasSpread = true;

      return;
    }

    // If the next attribute is a spread, we're effective last in this object
    if (!isLast) {
      isLast = attributesObject[index + 1].type === Syntax.XJSSpreadAttribute;
    }

    if (attr.name.namespace) {
      throw new Error(
         'Namespace attributes are not supported. ReactJSX is not XML.');
    }
    var name = attr.name.name;

    utils.catchup(attr.range[0], state, trimLeft);

    if (previousWasSpread) {
      utils.append('{', state);
    }

    utils.append(quoteAttrName(name), state);
    utils.append(': ', state);

    if (!attr.value) {
      state.g.buffer += 'true';
      state.g.position = attr.name.range[1];
      if (!isLast) {
        utils.append(', ', state);
      }
    } else {
      utils.move(attr.name.range[1], state);
      // Use catchupNewlines to skip over the '=' in the attribute
      utils.catchupNewlines(attr.value.range[0], state);
      if (JSX_ATTRIBUTE_TRANSFORMS.hasOwnProperty(attr.name.name)) {
        utils.append(JSX_ATTRIBUTE_TRANSFORMS[attr.name.name](attr), state);
        utils.move(attr.value.range[1], state);
        if (!isLast) {
          utils.append(', ', state);
        }
      } else if (attr.value.type === Syntax.Literal) {
        renderXJSLiteral(attr.value, isLast, state);
      } else {
        renderXJSExpressionContainer(traverse, attr.value, isLast, path, state);
      }
    }

    utils.catchup(attr.range[1], state, trimLeft);

    previousWasSpread = false;

  });

  if (!openingElement.selfClosing) {
    utils.catchup(openingElement.range[1] - 1, state, trimLeft);
    utils.move(openingElement.range[1], state);
  }

  if (hasAttributes && !previousWasSpread) {
    utils.append('}', state);
  }

  if (hasAtLeastOneSpreadProperty) {
    utils.append(')', state);
  }

  // filter out whitespace
  var childrenToRender = object.children.filter(function(child) {
    return !(child.type === Syntax.Literal
             && typeof child.value === 'string'
             && child.value.match(/^[ \t]*[\r\n][ \t\r\n]*$/));
  });
  if (childrenToRender.length > 0) {
    var lastRenderableIndex;

    childrenToRender.forEach(function(child, index) {
      if (child.type !== Syntax.XJSExpressionContainer ||
          child.expression.type !== Syntax.XJSEmptyExpression) {
        lastRenderableIndex = index;
      }
    });

    if (lastRenderableIndex !== undefined) {
      utils.append(', ', state);
    }

    childrenToRender.forEach(function(child, index) {
      utils.catchup(child.range[0], state, trimLeft);

      var isLast = index >= lastRenderableIndex;

      if (child.type === Syntax.Literal) {
        renderXJSLiteral(child, isLast, state);
      } else if (child.type === Syntax.XJSExpressionContainer) {
        renderXJSExpressionContainer(traverse, child, isLast, path, state);
      } else {
        traverse(child, path, state);
        if (!isLast) {
          utils.append(', ', state);
        }
      }

      utils.catchup(child.range[1], state, trimLeft);
    });
  }

  if (openingElement.selfClosing) {
    // everything up to />
    utils.catchup(openingElement.range[1] - 2, state, trimLeft);
    utils.move(openingElement.range[1], state);
  } else {
    // everything up to </ sdflksjfd>
    utils.catchup(object.closingElement.range[0], state, trimLeft);
    utils.move(object.closingElement.range[1], state);
  }

  utils.append(')', state);
  return false;
}

visitReactTag.test = function(object, path, state) {
  return object.type === Syntax.XJSElement;
};

exports.visitorList = [
  visitReactTag
];


text:
using System.Web;
using System.Web.Mvc;

namespace LegacyMvcApplication
{
    public class FilterConfig
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());
        }
    }
}


text:
@interface PBPasteboardPayloadSender : NSObject

@property (strong, readonly) NSData *data;
@property (assign, readonly) NSUInteger offset;

+ (PBPasteboardPayloadSender *)payloadSenderWithData:(NSData *)data ofType:(PBPasteboardPayloadType)type;
+ (PBPasteboardPayloadSender *)payloadSenderWithString:(NSString *)string;

- (id)initWithData:(NSData *)data ofType:(PBPasteboardPayloadType)type;

- (void)resetOffset;
- (NSData *)nextChunk;

@end


text:
'use strict';

angular.module('nomnomV1App')
	.service('modalService', function($modal, $q) {
		// AngularJS will instantiate a singleton by calling "new" on this function

		var isModalOpen = false;

		var _createModal = function(templateUrl, controller, size, parameters) {

			var task = $q.defer();

			isModalOpen = true;

			var modalInstance = $modal.open({
				templateUrl: templateUrl,
				controller: controller,
				size: size || 'lg',
				backdrop: 'static',
				resolve: {
					parameters: function() {
						return parameters;
					}
				}
			});

			modalInstance.result.then(function(modalResult) {
				isModalOpen = false;
				task.resolve(modalResult);
			}, function() {
				isModalOpen = false;
				task.reject();
			});

			return task.promise;
		};

		return {
			showConfirmModal: function(parameters) {
				return _createModal('app/modalService/confirmModal/confirmModal.html', 'ConfirmModalCtrl', 'lg', parameters);
			}

		};

	});


text:
namespace irr
{
namespace core
{

	//! Specifies a 2 dimensional size.
	template <class T>
	class dimension2d
	{
		public:
			//! Default constructor for empty dimension
			dimension2d() : Width(0), Height(0) {}
			//! Constructor with width and height
			dimension2d(const T& width, const T& height)
				: Width(width), Height(height) {}

			//! Equality operator
			bool operator==(const dimension2d<T>& other) const
			{
				return Width == other.Width && Height == other.Height;
			}

			//! Inequality operator
			bool operator!=(const dimension2d<T>& other) const
			{
				return ! (*this == other);
			}

			//! Set to new values
			dimension2d<T>& set(const T& width, const T& height)
			{
				Width = width;
				Height = height;
				return *this;
			}

			//! Divide width and height by scalar
			dimension2d<T>& operator/=(const T& scale)
			{
				Width /= scale;
				Height /= scale;
				return *this;
			}

			//! Divide width and height by scalar
			dimension2d<T> operator/(const T& scale) const
			{
				return dimension2d<T>(Width/scale, Height/scale);
			}

			//! Multiply width and height by scalar
			dimension2d<T>& operator*=(const T& scale)
			{
				Width *= scale;
				Height *= scale;
				return *this;
			}

			//! Multiply width and height by scalar
			dimension2d<T> operator*(const T& scale) const
			{
				return dimension2d<T>(Width*scale, Height*scale);
			}

			//! Get area
			T getArea() const
			{
				return Width*Height;
			}

			//! Width of the dimension.
			T Width;
			//! Height of the dimension.
			T Height;
	};

	//! Typedef for an f32 dimension.
	typedef dimension2d<f32> dimension2df;
	//! Typedef for an integer dimension.
	typedef dimension2d<s32> dimension2di;

} // end namespace core
} // end namespace irr

#endif


text:
<?php
class UsersRecipesController extends AppController {

	var $name = 'UsersRecipes';

	function index() {
		$this->UsersRecipe->recursive = 0;
		$this->set('usersRecipes', $this->paginate());
	}

	function view($id = null) {
		if (!$id) {
			$this->Session->setFlash(__('Invalid users recipe', true));
			$this->redirect(array('action' => 'index'));
		}
		$this->set('usersRecipe', $this->UsersRecipe->read(null, $id));
	}

	function add() {
		if (!empty($this->data)) {
			$this->UsersRecipe->create();
			if ($this->UsersRecipe->save($this->data)) {
				$this->Session->setFlash(__('The users recipe has been saved', true));
				$this->redirect(array('action' => 'index'));
			} else {
				$this->Session->setFlash(__('The users recipe could not be saved. Please, try again.', true));
			}
		}
		$users = $this->UsersRecipe->User->find('list');
		$recipes = $this->UsersRecipe->Recipe->find('list');
		$this->set(compact('users', 'recipes'));
	}

	function edit($id = null) {
		if (!$id && empty($this->data)) {
			$this->Session->setFlash(__('Invalid users recipe', true));
			$this->redirect(array('action' => 'index'));
		}
		if (!empty($this->data)) {
			if ($this->UsersRecipe->save($this->data)) {
				$this->Session->setFlash(__('The users recipe has been saved', true));
				$this->redirect(array('action' => 'index'));
			} else {
				$this->Session->setFlash(__('The users recipe could not be saved. Please, try again.', true));
			}
		}
		if (empty($this->data)) {
			$this->data = $this->UsersRecipe->read(null, $id);
		}
		$users = $this->UsersRecipe->User->find('list');
		$recipes = $this->UsersRecipe->Recipe->find('list');
		$this->set(compact('users', 'recipes'));
	}

	function delete($id = null) {
		if (!$id) {
			$this->Session->setFlash(__('Invalid id for users recipe', true));
			$this->redirect(array('action'=>'index'));
		}
		if ($this->UsersRecipe->delete($id)) {
			$this->Session->setFlash(__('Users recipe deleted', true));
			$this->redirect(array('action'=>'index'));
		}
		$this->Session->setFlash(__('Users recipe was not deleted', true));
		$this->redirect(array('action' => 'index'));
	}
}
?>


text:
<readable><title>3229821595_77ace81c6b</title><content>
A crowd of people are standing on a snow covered hill watching the sun go down .
A group of people are standing on a ledge overlooking low clouds .
A group of photographers stands on a hillside in the snow with the sun just below the horizon .
A line of people are seen in silhouette on a snowy ridge when the sun is low in the sky .
A line of people are standing on the edge of a snow covered path overlooking the clouds in the mountains .
</content></readable>


text:
<!--L
   Copyright Ekagra Software Technologies Ltd.
   Copyright SAIC, SAIC-Frederick

   Distributed under the OSI-approved BSD 3-Clause License.
   See http://ncip.github.com/cacore-sdk/LICENSE.txt for details.
L-->

<properties>
	<property  name="cagrid-base-war.binaries.file" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-base-war.binaries.file-syntax</name>
				<description>Checks cagrid-base-war.binaries.file is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-base-war.binaries.file ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-base-war.binaries.file ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-base-war.binaries.file ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-base-war.binaries.file == null </condition>
						<condition>cagrid-base-war.binaries.file == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-base-war.binaries.file did not pass validation. cagrid-base-war.binaries.file must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - "cagrid-wscore-4.0.3-appserver-base-war.zip".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-base-war.binaries.relative.dir" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-base-war.binaries.relative.dir-syntax</name>
				<description>Checks cagrid-base-war.binaries.relative.dir is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-base-war.binaries.relative.dir ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-base-war.binaries.relative.dir ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-base-war.binaries.relative.dir ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-base-war.binaries.relative.dir == null </condition>
						<condition>cagrid-base-war.binaries.relative.dir == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-base-war.binaries.relative.dir did not pass validation. cagrid-base-war.binaries.relative.dir must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - ".".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-base-war.src.url" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-base-war.src.url-syntax</name>
				<description>Checks cagrid-base-war.src.url is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-base-war.src.url ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-base-war.src.url ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-base-war.src.url ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-base-war.src.url == null </condition>
						<condition>cagrid-base-war.src.url == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-base-war.src.url did not pass validation. cagrid-base-war.src.url must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - "http://gforge.nci.nih.gov/svnroot/commonlibrary/trunk/techstack-2007/os-independent/cagrid-wscore-4.0.3-appserver-base-war.zip".</fail-message>
			</rule>
			<rule>
				<name>cagrid-base-war.src.url-url</name>
				<description>Checks cagrid-base-war.src.url has proper value.</description>
				<conditions>
					<condition>cagrid-base-war.src.url ==~ /^http.*:\/\/.*.nci.nih.gov.*/</condition>
				</conditions>
				<fail-message>cagrid-base-war.src.url did not pass validation. cagrid-base-war.src.url must be http(s)://*.nci.nih.gov/*. Sample valid value - "http://gforge.nci.nih.gov/svnroot/commonlibrary/trunk/techstack-2007/os-independent/cagrid-wscore-4.0.3-appserver-base-war.zip".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-console.binaries.file" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-console.binaries.file-syntax</name>
				<description>Checks cagrid-console.binaries.file is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-console.binaries.file ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-console.binaries.file ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-console.binaries.file ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-console.binaries.file == null </condition>
						<condition>cagrid-console.binaries.file == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-console.binaries.file did not pass validation. cagrid-console.binaries.file must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - "caGrid-console_sources.zip".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-console.binaries.relative.dir" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-console.binaries.relative.dir-syntax</name>
				<description>Checks cagrid-console.binaries.relative.dir is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-console.binaries.relative.dir ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-console.binaries.relative.dir ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-console.binaries.relative.dir ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-console.binaries.relative.dir == null </condition>
						<condition>cagrid-console.binaries.relative.dir == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-console.binaries.relative.dir did not pass validation. cagrid-console.binaries.relative.dir must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - "caGrid-console".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-console.src.url" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-console.src.url-syntax</name>
				<description>Checks cagrid-console.src.url is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-console.src.url ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-console.src.url ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-console.src.url ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-console.src.url == null </condition>
						<condition>cagrid-console.src.url == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-console.src.url did not pass validation. cagrid-console.src.url must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - "http://gforge.nci.nih.gov/svnroot/commonlibrary/trunk/techstack-2009/os-independent/caGrid-console_sources.zip".</fail-message>
			</rule>
			<rule>
				<name>cagrid-console.src.url-url</name>
				<description>Checks cagrid-console.src.url has proper value.</description>
				<conditions>
					<condition>cagrid-console.src.url ==~ /^http.*:\/\/.*.nci.nih.gov.*/</condition>
				</conditions>
				<fail-message>cagrid-console.src.url did not pass validation. cagrid-console.src.url must be http(s)://*.nci.nih.gov/*. Sample valid value - "http://gforge.nci.nih.gov/svnroot/commonlibrary/trunk/techstack-2009/os-independent/caGrid-console_sources.zip".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-libs.binaries.file" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-libs.binaries.file-syntax</name>
				<description>Checks cagrid-libs.binaries.file is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-libs.binaries.file ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-libs.binaries.file ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-libs.binaries.file ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-libs.binaries.file == null </condition>
						<condition>cagrid-libs.binaries.file == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-libs.binaries.file did not pass validation. cagrid-libs.binaries.file must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - "cagrid-wscore-4.0.3-appserver-libs.zip".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-libs.binaries.relative.dir" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-libs.binaries.relative.dir-syntax</name>
				<description>Checks cagrid-libs.binaries.relative.dir is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-libs.binaries.relative.dir ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-libs.binaries.relative.dir ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-libs.binaries.relative.dir ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-libs.binaries.relative.dir == null </condition>
						<condition>cagrid-libs.binaries.relative.dir == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-libs.binaries.relative.dir did not pass validation. cagrid-libs.binaries.relative.dir must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - ".".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-libs.src.url" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-libs.src.url-syntax</name>
				<description>Checks cagrid-libs.src.url is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-libs.src.url ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-libs.src.url ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-libs.src.url ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-libs.src.url == null </condition>
						<condition>cagrid-libs.src.url == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-libs.src.url did not pass validation. cagrid-libs.src.url must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - "http://gforge.nci.nih.gov/svnroot/commonlibrary/trunk/techstack-2007/os-independent/cagrid-wscore-4.0.3-appserver-libs.zip".</fail-message>
			</rule>
			<rule>
				<name>cagrid-libs.src.url-url</name>
				<description>Checks cagrid-libs.src.url has proper value.</description>
				<conditions>
					<condition>cagrid-libs.src.url ==~ /^http.*:\/\/.*.nci.nih.gov.*/</condition>
				</conditions>
				<fail-message>cagrid-libs.src.url did not pass validation. cagrid-libs.src.url must be http(s)://*.nci.nih.gov/*. Sample valid value - "http://gforge.nci.nih.gov/svnroot/commonlibrary/trunk/techstack-2007/os-independent/cagrid-wscore-4.0.3-appserver-libs.zip".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="cagrid-target.src.url" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>cagrid-target.src.url-syntax</name>
				<description>Checks cagrid-target.src.url is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>cagrid-target.src.url ==~ /.*\S+.*/</condition>
							<condition negate="true">cagrid-target.src.url ==~ /.*\s.*/</condition>
							<condition negate="true">cagrid-target.src.url ==~ /.*\x5c.*/</condition>
						</and>
						<condition>cagrid-target.src.url == null </condition>
						<condition>cagrid-target.src.url == "" </condition>
					</or>
				</conditions>
				<fail-message>cagrid-target.src.url did not pass validation. cagrid-target.src.url must be null or have a value and not contain spaces or  back slashes (\). Sample valid value - "https://ncisvn.nci.nih.gov/svn/cagrid/branches/caGrid-1_3_release/cagrid-1-0/caGrid/repository/caGrid/target_grid".</fail-message>
			</rule>
			<rule>
				<name>cagrid-target.src.url-url</name>
				<description>Checks cagrid-target.src.url has proper value.</description>
				<conditions>
					<condition>cagrid-target.src.url ==~ /^http.*:\/\/.*.nci.nih.gov.*/</condition>
				</conditions>
				<fail-message>cagrid-target.src.url did not pass validation. cagrid-target.src.url must be http(s)://*.nci.nih.gov/*. Sample valid value - "https://ncisvn.nci.nih.gov/svn/cagrid/branches/caGrid-1_3_release/cagrid-1-0/caGrid/repository/caGrid/target_grid".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.science.affiliation" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.science.affiliation-syntax</name>
				<description>Checks grid.poc.science.affiliation is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.science.affiliation ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.science.affiliation ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.science.affiliation ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.science.affiliation == null </condition>
						<condition>grid.poc.science.affiliation == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.science.affiliation did not pass validation. grid.poc.science.affiliation must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "Test".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.science.email" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.science.email-syntax</name>
				<description>Checks grid.poc.science.email is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.science.email ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.science.email ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.science.email ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.science.email == null </condition>
						<condition>grid.poc.science.email == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.science.email did not pass validation. grid.poc.science.email must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "john.smith@mail.com".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.science.name.first" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.science.name.first-syntax</name>
				<description>Checks grid.poc.science.name.first is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.science.name.first ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.science.name.first ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.science.name.first ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.science.name.first == null </condition>
						<condition>grid.poc.science.name.first == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.science.name.first did not pass validation. grid.poc.science.name.first must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "John".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.science.name.last" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.science.name.last-syntax</name>
				<description>Checks grid.poc.science.name.last is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.science.name.last ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.science.name.last ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.science.name.last ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.science.name.last == null </condition>
						<condition>grid.poc.science.name.last == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.science.name.last did not pass validation. grid.poc.science.name.last must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "Smith".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.science.phone" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.science.phone-syntax</name>
				<description>Checks grid.poc.science.phone is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.science.phone ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.science.phone ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.science.phone ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.science.phone == null </condition>
						<condition>grid.poc.science.phone == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.science.phone did not pass validation. grid.poc.science.phone must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "0124567890".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.science.role" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.science.role-syntax</name>
				<description>Checks grid.poc.science.role is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.science.role ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.science.role ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.science.role ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.science.role == null </condition>
						<condition>grid.poc.science.role == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.science.role did not pass validation. grid.poc.science.role must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "sysadmin".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.addr.country" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.addr.country-syntax</name>
				<description>Checks grid.poc.tech.addr.country is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.addr.country ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.addr.country ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.addr.country ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.addr.country == null </condition>
						<condition>grid.poc.tech.addr.country == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.addr.country did not pass validation. grid.poc.tech.addr.country must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "USA".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.addr.locality" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.addr.locality-syntax</name>
				<description>Checks grid.poc.tech.addr.locality is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.addr.locality ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.addr.locality ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.addr.locality ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.addr.locality == null </condition>
						<condition>grid.poc.tech.addr.locality == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.addr.locality did not pass validation. grid.poc.tech.addr.locality must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "Vienna".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.addr.postalCode" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.addr.postalCode-syntax</name>
				<description>Checks grid.poc.tech.addr.postalCode is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.addr.postalCode ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.addr.postalCode ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.addr.postalCode ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.addr.postalCode == null </condition>
						<condition>grid.poc.tech.addr.postalCode == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.addr.postalCode did not pass validation. grid.poc.tech.addr.postalCode must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "22180".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.addr.stateProvince" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.addr.stateProvince-syntax</name>
				<description>Checks grid.poc.tech.addr.stateProvince is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.addr.stateProvince ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.addr.stateProvince ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.addr.stateProvince ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.addr.stateProvince == null </condition>
						<condition>grid.poc.tech.addr.stateProvince == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.addr.stateProvince did not pass validation. grid.poc.tech.addr.stateProvince must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "VA".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.addr.street1" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.addr.street1-syntax</name>
				<description>Checks grid.poc.tech.addr.street1 is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.addr.street1 ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.addr.street1 ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.addr.street1 ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.addr.street1 == null </condition>
						<condition>grid.poc.tech.addr.street1 == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.addr.street1 did not pass validation. grid.poc.tech.addr.street1 must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "1234 Somplace lane".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.addr.street2" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.addr.street2-syntax</name>
				<description>Checks grid.poc.tech.addr.street2 is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.addr.street2 ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.addr.street2 ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.addr.street2 ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.addr.street2 == null </condition>
						<condition>grid.poc.tech.addr.street2 == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.addr.street2 did not pass validation. grid.poc.tech.addr.street2 must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.affiliation" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.affiliation-syntax</name>
				<description>Checks grid.poc.tech.affiliation is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.affiliation ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.affiliation ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.affiliation ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.affiliation == null </condition>
						<condition>grid.poc.tech.affiliation == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.affiliation did not pass validation. grid.poc.tech.affiliation must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "BDA".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.email" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.email-syntax</name>
				<description>Checks grid.poc.tech.email is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.email ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.email ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.email ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.email == null </condition>
						<condition>grid.poc.tech.email == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.email did not pass validation. grid.poc.tech.email must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "buildanddeployment@mail.nih.gov".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.name.first" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.name.first-syntax</name>
				<description>Checks grid.poc.tech.name.first is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.name.first ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.name.first ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.name.first ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.name.first == null </condition>
						<condition>grid.poc.tech.name.first == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.name.first did not pass validation. grid.poc.tech.name.first must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "DeploymentAutomation".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.name.last" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.name.last-syntax</name>
				<description>Checks grid.poc.tech.name.last is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.name.last ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.name.last ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.name.last ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.name.last == null </condition>
						<condition>grid.poc.tech.name.last == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.name.last did not pass validation. grid.poc.tech.name.last must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "Buildand".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.phone" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.phone-syntax</name>
				<description>Checks grid.poc.tech.phone is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.phone ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.phone ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.phone ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.phone == null </condition>
						<condition>grid.poc.tech.phone == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.phone did not pass validation. grid.poc.tech.phone must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "0124567890".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.researchCenter.displayname" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.researchCenter.displayname-syntax</name>
				<description>Checks grid.poc.tech.researchCenter.displayname is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.researchCenter.displayname ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.researchCenter.displayname ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.researchCenter.displayname ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.researchCenter.displayname == null </condition>
						<condition>grid.poc.tech.researchCenter.displayname == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.researchCenter.displayname did not pass validation. grid.poc.tech.researchCenter.displayname must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "bdarc".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.researchCenter.shortname" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.researchCenter.shortname-syntax</name>
				<description>Checks grid.poc.tech.researchCenter.shortname is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.researchCenter.shortname ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.researchCenter.shortname ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.researchCenter.shortname ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.researchCenter.shortname == null </condition>
						<condition>grid.poc.tech.researchCenter.shortname == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.researchCenter.shortname did not pass validation. grid.poc.tech.researchCenter.shortname must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "bda".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.poc.tech.role" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.poc.tech.role-syntax</name>
				<description>Checks grid.poc.tech.role is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.poc.tech.role ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.poc.tech.role ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.poc.tech.role ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.poc.tech.role == null </condition>
						<condition>grid.poc.tech.role == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.poc.tech.role did not pass validation. grid.poc.tech.role must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "sysadmin".</fail-message>
			</rule>
		</rules>
	</property>
	<property  name="grid.target" description="" skip-property="exclude.validate.grid">
		<rules>
			<rule>
				<name>grid.target-syntax</name>
				<description>Checks grid.target is the valid syntax.</description>
				<conditions>
					<or>
						<and>
							<condition>grid.target ==~ /.*\S+.*/</condition>
							<condition negate="true">grid.target ==~ /.*\s.*/</condition>
							<condition negate="true">grid.target ==~ /.*\x5c.*/</condition>
							<condition negate="true">grid.target ==~ /.*\/.*/</condition>
						</and>
						<condition>grid.target == null </condition>
						<condition>grid.target == "" </condition>
					</or>
				</conditions>
				<fail-message>grid.target did not pass validation. grid.target must be null or have a value and not contain spaces, forward slashes (/) or back slashes (\). Sample valid value - "nci_stage-1.3".</fail-message>
			</rule>
			<rule>
				<name>grid.target-value</name>
				<description>Checks grid.target has proper value.</description>
				<conditions>
					<or>
						<condition> grid.target == "nci_prod-1.3"</condition>
						<condition> grid.target == "nci_stage-1.3"</condition>
						<condition> grid.target == "nci_qa-1.3"</condition>
						<condition> grid.target == "training-1.3"</condition>
					</or>
				</conditions>
				<fail-message>grid.target did not pass validation. Must be one of the following (nci_prod-1.3, nci_stage-1.3, nci_qa-1.3, training-1.3).</fail-message>
			</rule>
		</rules>
	</property>
</properties>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>LE/ESSE 4630</title>

    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link href="css/clean-blog.min.css" rel="stylesheet">

    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation
                    Menu
                </button>
                LE/ESSE 4630: Image Processing for Remote Sensing and Photogrammetry

                        Home

                        About

Supervised Classification

Categorizing Land Coverage in Remotely Sensed Images

                        Posted by Dennis Sherman on February 14, 2017

Introduction

This lab involves the use of Supervised Classification to categorize pixels in a remotely sensed image into different land coverage classes (e.g. roads, grasses, buildings, etc...). The lab is split into three different components:

The selection of training data.

Classification using PCI Geomatics

Implementation of Classification software

Supervised Classification

Supervised classification involves the categorization of all pixels in an image into different classes given estimates of the probability distribution of each class. Given a multi-spectral image, the resulting estimates are multi-variate and are often referred to as the spectral signature of the class. Supervised classification, in contrast to unsupervised classification, splits the classification process into two distinct, mutually exclusive, phases:

Training Data Selection: Samples from each class are used to characterize the spectral signature by estimating the mean vector and covariance matrix. The selection of sample sites is performed by a person and requires careful selection in order to appropriately characterize the spectral signature of a given class, while maintaining sufficient separability between the spectra of different classes

Classification: The training data is then used to determine, on a pixel-wise basis, the best-fit class given some optimal decision rule. In this lab, the maximum likelihood and minimum distance decision rules will be explored.

Maximum likelihood classification assumes the spectral signature of each class follows a normal distribution. The log-likelihood form of the multi-variate normal distribution, in addition to Bayes Rule, is used to generate a discriminant function that can be used along with a decision rule for classifying image pixels given an estimated spectral signature.

The discriminant function for maximum likelihood classification is defined as:

                	$$g_{k}(x) = -ln|C_{k}| - (x - \bar{m}_{k})^{T}C_{k}^{-1}(x - \bar{m}_{k})$$

The decision rule for maximum likelihood classification is defined as:

                	$$x \implies \omega_{i} \text{ if } g_{i}(x)>g_{j}(x), \forall j \neq i$$

In contrast to maximum likelihood classification, minimum distance classification makes no assumptions regarding the second moment of each class. The descriminant function can be derived from the maximum likelihood discriminant function by assuming the covariance matrix for each spectra is equal to the identity matrix, eliminating its influence from the resulting likelihood estimate.

The discriminant function for minimum distance classification is the euclidean distance function:

                	$$g_{k}(x) = (x - \bar{m}_{k})^{T}(x - \bar{m}_{k})$$

The decision rule for minimum distance classification is defined as:

                	$$x \implies \omega_{i} \text{ if } g_{i}(x)\lt g_{j}(x), \forall j \neq i$$

Selection of Training Data

                	The selection of training data that accurately estimates the expected signature for a given class is extremely important in performing accurate classification. Several considerations must be made when attempting to estimate accurate training data from a multi-spectral image:

Sufficient separability between the spectral signatures of different classes.

Unimodality of the histogram of the selected training data

When selecting training data, the distribution of each class can be explored by generating histograms for the training data.

The separability of each class can be explored by generating feature space plots for all of the training data.

Copyright © Your Website 2016


text:
package org.apereo.cas.gauth;

import org.apereo.cas.authentication.MultifactorAuthenticationProvider;
import org.apereo.cas.authentication.OneTimeTokenAccount;
import org.apereo.cas.authentication.PreventedException;
import org.apereo.cas.authentication.principal.PrincipalFactoryUtils;
import org.apereo.cas.authentication.principal.Service;
import org.apereo.cas.gauth.credential.DummyCredentialRepository;
import org.apereo.cas.gauth.credential.GoogleAuthenticatorAccount;
import org.apereo.cas.gauth.credential.GoogleAuthenticatorOneTimeTokenCredentialValidator;
import org.apereo.cas.gauth.credential.GoogleAuthenticatorTokenCredential;
import org.apereo.cas.gauth.credential.InMemoryGoogleAuthenticatorTokenCredentialRepository;
import org.apereo.cas.gauth.token.GoogleAuthenticatorToken;
import org.apereo.cas.otp.repository.credentials.OneTimeTokenCredentialRepository;
import org.apereo.cas.otp.repository.token.CachingOneTimeTokenRepository;
import org.apereo.cas.otp.repository.token.OneTimeTokenRepository;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.services.ServicesManager;
import org.apereo.cas.util.crypto.CipherExecutor;
import org.apereo.cas.util.spring.DirectObjectProvider;
import org.apereo.cas.web.support.WebUtils;

import com.github.benmanes.caffeine.cache.Caffeine;
import com.warrenstrange.googleauth.GoogleAuthenticator;
import com.warrenstrange.googleauth.GoogleAuthenticatorConfig;
import com.warrenstrange.googleauth.GoogleAuthenticatorKey;
import com.warrenstrange.googleauth.IGoogleAuthenticator;
import lombok.val;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockServletContext;
import org.springframework.webflow.context.servlet.ServletExternalContext;
import org.springframework.webflow.execution.RequestContextHolder;
import org.springframework.webflow.test.MockRequestContext;

import javax.security.auth.login.AccountExpiredException;
import javax.security.auth.login.AccountNotFoundException;
import java.util.ArrayList;
import java.util.UUID;

import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;

/**
 * This is {@link GoogleAuthenticatorAuthenticationHandlerTests}.
 *
 * @author Misagh Moayyed
 * @since 6.0.0
 */
@Tag("MFAProvider")
public class GoogleAuthenticatorAuthenticationHandlerTests {
    private IGoogleAuthenticator googleAuthenticator;

    private GoogleAuthenticatorAuthenticationHandler handler;

    private GoogleAuthenticatorKey account;

    private OneTimeTokenRepository tokenRepository;

    private OneTimeTokenCredentialRepository tokenCredentialRepository;

    @BeforeEach
    public void initialize() {
        val servicesManager = mock(ServicesManager.class);
        val builder = new GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder();
        googleAuthenticator = new GoogleAuthenticator(builder.build());
        tokenRepository = new CachingOneTimeTokenRepository(Caffeine.newBuilder().initialCapacity(10).build(s -> null));
        tokenCredentialRepository = new InMemoryGoogleAuthenticatorTokenCredentialRepository(
            CipherExecutor.noOpOfStringToString(), CipherExecutor.noOpOfNumberToNumber(), googleAuthenticator);
        googleAuthenticator.setCredentialRepository(new DummyCredentialRepository());
        handler = new GoogleAuthenticatorAuthenticationHandler("GAuth",
            servicesManager,
            PrincipalFactoryUtils.newPrincipalFactory(),
            new GoogleAuthenticatorOneTimeTokenCredentialValidator(googleAuthenticator, tokenRepository, tokenCredentialRepository),
            null, new DirectObjectProvider<>(mock(MultifactorAuthenticationProvider.class)));

        val context = new MockRequestContext();
        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, response));
        RequestContextHolder.setRequestContext(context);
        WebUtils.putAuthentication(RegisteredServiceTestUtils.getAuthentication("casuser"), context);
    }

    @Test
    public void verifySupports() {
        val credential = new GoogleAuthenticatorTokenCredential();
        assertTrue(handler.supports(credential));
        assertTrue(handler.supports(GoogleAuthenticatorTokenCredential.class));
    }

    @Test
    public void verifyAuthnAccountNotFound() {
        val credential = getGoogleAuthenticatorTokenCredential();
        assertThrows(AccountNotFoundException.class, () -> handler.authenticate(credential, mock(Service.class)));
    }

    @Test
    public void verifyAuthnFailsTokenUsed() {
        val credential = getGoogleAuthenticatorTokenCredential();
        handler.getValidator().store(
            new GoogleAuthenticatorToken(Integer.valueOf(credential.getToken()), "casuser"));

        val toSave = OneTimeTokenAccount.builder()
            .username("casuser")
            .name(UUID.randomUUID().toString())
            .secretKey(account.getKey())
            .validationCode(account.getVerificationCode())
            .scratchCodes(new ArrayList<>(account.getScratchCodes()))
            .build();
        tokenCredentialRepository.save(toSave);
        credential.setAccountId(toSave.getId());
        assertThrows(AccountExpiredException.class, () -> handler.authenticate(credential, mock(Service.class)));
    }

    @Test
    public void verifyAuthnTokenFound() throws Exception {
        val credential = getGoogleAuthenticatorTokenCredential();
        val toSave = GoogleAuthenticatorAccount.builder()
            .username("casuser")
            .name(UUID.randomUUID().toString())
            .secretKey(account.getKey())
            .validationCode(account.getVerificationCode())
            .scratchCodes(new ArrayList<>(account.getScratchCodes()))
            .build();
        credential.setAccountId(toSave.getId());
        tokenCredentialRepository.save(toSave);
        val result = handler.authenticate(credential, mock(Service.class));
        assertNotNull(result);
        assertNotNull(tokenRepository.get("casuser", Integer.valueOf(credential.getToken())));
    }

    @Test
    public void verifyAuthnTokenScratchCode() throws Exception {
        val credential = getGoogleAuthenticatorTokenCredential();
        val toSave = GoogleAuthenticatorAccount.builder()
            .username("casuser")
            .name(UUID.randomUUID().toString())
            .secretKey(account.getKey())
            .validationCode(account.getVerificationCode())
            .scratchCodes(new ArrayList<>(account.getScratchCodes()))
            .build();
        tokenCredentialRepository.save(toSave);
        credential.setAccountId(toSave.getId());
        credential.setToken(Integer.toString(account.getScratchCodes().get(0)));
        val result = handler.authenticate(credential, mock(Service.class));
        assertNotNull(result);
        val otp = Integer.valueOf(credential.getToken());
        assertNotNull(tokenRepository.get("casuser", otp));
        assertFalse(tokenCredentialRepository.get("casuser").iterator().next().getScratchCodes().contains(otp));
    }

    @Test
    public void verifyMultipleDevices() throws Exception {
        val credential = getGoogleAuthenticatorTokenCredential();
        for (var i = 0; i < 2; i++) {
            val toSave = GoogleAuthenticatorAccount.builder()
                .username("casuser")
                .name(String.format("deviceName-%s", i))
                .secretKey(account.getKey())
                .validationCode(account.getVerificationCode())
                .scratchCodes(new ArrayList<>(account.getScratchCodes()))
                .build();
            tokenCredentialRepository.save(toSave);
        }
        credential.setAccountId(null);
        assertThrows(PreventedException.class, () -> handler.authenticate(credential, mock(Service.class)));

        val oneAcct = tokenCredentialRepository.get("casuser").iterator().next();
        credential.setAccountId(oneAcct.getId());
        val result = handler.authenticate(credential, mock(Service.class));
        assertNotNull(result);
    }

    @Test
    public void verifySingleDevicesNoAcctId() throws Exception {
        val credential = getGoogleAuthenticatorTokenCredential();
        val toSave = GoogleAuthenticatorAccount.builder()
            .username("casuser")
            .name(UUID.randomUUID().toString())
            .secretKey(account.getKey())
            .validationCode(account.getVerificationCode())
            .scratchCodes(new ArrayList<>(account.getScratchCodes()))
            .build();
        tokenCredentialRepository.save(toSave);
        credential.setAccountId(null);
        val result = handler.authenticate(credential, mock(Service.class));
        assertNotNull(result);
    }

    private GoogleAuthenticatorTokenCredential getGoogleAuthenticatorTokenCredential() {
        val credential = new GoogleAuthenticatorTokenCredential();
        account = googleAuthenticator.createCredentials("casuser");
        val key = googleAuthenticator.getTotpPassword(account.getKey());
        credential.setToken(Integer.toString(key));
        return credential;
    }
}


text:
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models

class Migration(DataMigration):

    def forwards(self, orm):
        orm['feedzilla.Post'].objects.update(rawtags=models.F('tags'))

    def backwards(self, orm):
        "Write your backwards methods here."

    models = {
        u'feedzilla.feed': {
            'Meta': {'object_name': 'Feed'},
            'active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
            'active_post_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
            'author': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
            'etag': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
            'feed_url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'last_checked': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'post_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
            'site_url': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'skip_filters': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'feedzilla.filtertag': {
            'Meta': {'object_name': 'FilterTag'},
            'exact': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
        },
        u'feedzilla.filterword': {
            'Meta': {'object_name': 'FilterWord'},
            'exact': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
        },
        u'feedzilla.post': {
            'Meta': {'ordering': "['-created']", 'object_name': 'Post'},
            'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'created': ('django.db.models.fields.DateTimeField', [], {}),
            'feed': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'posts'", 'to': u"orm['feedzilla.Feed']"}),
            'guid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'link': ('django.db.models.fields.TextField', [], {}),
            'rawtags': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'tags': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'feedzilla.request': {
            'Meta': {'ordering': "['-created']", 'object_name': 'Request'},
            'author': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'feed_url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
        }
    }

    complete_apps = ['feedzilla']
    symmetrical = True


text:
package ch.epfl.bbp.uima.elasticsearch;

import static ch.epfl.bbp.uima.BlueUima.TEST_RESOURCES_PATH;
import static ch.epfl.bbp.uima.ElasticsearchHelper.ELASTICSEARCH_ROOT;
import static ch.epfl.bbp.uima.laucher.PipelineScriptParser.parse;

import java.io.File;

import org.junit.Ignore;
import org.junit.Test;

public class ElasticIndexerTest {

	@Test
	@Ignore
	// FIXME embed ES for testing?
	public void test() throws Exception {

		parse(
				new File(ELASTICSEARCH_ROOT + TEST_RESOURCES_PATH
						+ "pipelines/preproc.pipeline")).run();
	}
}


text:
using System;
using System.Diagnostics.Contracts;

namespace EnvCrypt.Core.Utils.IO.StringWriter
{
    [ContractClass(typeof(StringWriterContracts<>))]
    public interface IStringWriter<in TOptions>
        where TOptions : StringWriterOptions
    {
        void Write(TOptions options); //, string path, bool overwriteExisting);
    }

    [ContractClassFor(typeof(IStringWriter<>))]
    internal abstract class StringWriterContracts<TOptions> : IStringWriter<TOptions>
        where TOptions : StringWriterOptions
    {
        public void Write(TOptions options)
        {
            Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(options.Contents), "contents to write cannot be null or empty");
            Contract.Requires<ArgumentNullException>(options.Encoding != null, "encoding");
        }
    }
}


text:
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import SIGNAL
from PyQt4.QtGui import *

import DIRT

MW = 300

INPUT_DIR_TT = u'Select directory containing corpus'
INPUT_FILE_TT = u'Select file listing corpus files'
PREP_DIR_TT = u'Select directory for storing preprocessed texts'
OUTPUT_DIR_TT = u'Select directory for storing output files'
GAP_LENGTH_TT = u'Number of consecutive non-matching characters to ignore'
MATCH_LENGTH_TT = u'Minimum length of match'
RUN_TT = u'Run processing (may take a long time)'
LANGUAGE_TT = u'3 character iso code of corpus language'

class AttributeDict(dict):
    __getattr__ = dict.__getitem__
    __setattr__ = dict.__setitem__

class Worker(QtCore.QThread):
    finished = QtCore.pyqtSignal()

    def __init__(self, parsed_args=None):
        super(Worker, self).__init__()
        self.parsed_args = parsed_args

    def run(self):
        DIRT.main(self.parsed_args)
        self.finished.emit()

class RunningWindow(QDialog):

    def __init__(self, parent=None):
        super(RunningWindow, self).__init__(parent)

        self.layout = GridLayout(self)

        self.setMinimumWidth(500)
        self.setMinimumHeight(700)
        self.setSizePolicy(QtGui.QSizePolicy.Expanding,
                           QtGui.QSizePolicy.MinimumExpanding)
        self.setSizeGripEnabled(True)
        self.setWindowTitle('Run Processing')
        self.setModal(True)
        self.setStyleSheet("background-color: rgb(245,247,255);")

class GridLayout(QtGui.QWidget):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.thread = None

        # Create the QVBoxLayout that lays out the whole form
        self.layout = QVBoxLayout()

        # Create the form layout that manages the labeled controls
        self.form_layout = QFormLayout()

        # Create the build button with its caption
        self.input_file_field = QLineEdit(self)
        self.input_file_field.setMinimumWidth(MW)
        self.input_file_field.setSizePolicy(QtGui.QSizePolicy.Expanding,
                                            QtGui.QSizePolicy.Expanding)
        self.form_layout.addRow('Input File/Directory:', self.input_file_field)
        self.btn_input_file = QPushButton('Input File', self)
        self.btn_input_file.setToolTip(INPUT_FILE_TT)
        self.form_layout.addWidget(self.btn_input_file)
        self.btn_input_dir = QPushButton('Input Directory', self)
        self.btn_input_dir.setMinimumWidth(MW)
        self.btn_input_dir.setToolTip(INPUT_DIR_TT)
        self.form_layout.addWidget(self.btn_input_dir)

        self.blank_line = QLabel('', self)
        self.form_layout.addRow('', self.blank_line)

        self.preprocessed_dir_field = QLineEdit(self)
        self.form_layout.addRow('Preprocessed Directory:', self.preprocessed_dir_field)
        self.btn_preprocessed_dir = QPushButton('Preprocessed Location', self)
        self.btn_preprocessed_dir.setToolTip(PREP_DIR_TT)
        self.form_layout.addWidget(self.btn_preprocessed_dir)
        self.blank_line1 = QLabel('', self)
        self.form_layout.addRow('', self.blank_line1)

        self.output_dir_field = QLineEdit(self)
        self.form_layout.addRow('Output Directory:', self.output_dir_field)
        self.btn_output_dir = QPushButton('Output Location', self)
        self.btn_output_dir.setToolTip(OUTPUT_DIR_TT)
        self.form_layout.addWidget(self.btn_output_dir)
        self.blank_line2 = QLabel('', self)
        self.form_layout.addRow('', self.blank_line2)

        # Add the form layout to the main VBox layout
        self.layout.addLayout(self.form_layout)

        # Create and fill the combo box to choose the skipping character
        self.gap_length = QLineEdit(self)
        self.gap_length.setToolTip(GAP_LENGTH_TT)

        # Add it to the form layout with a label
        self.form_layout.addRow('Gap Length:', self.gap_length)

        # Create and fill the combo box to choose the skipping character
        self.minimum_match_length = QLineEdit(self)
        self.minimum_match_length.setToolTip(MATCH_LENGTH_TT)

        # Add it to the form layout with a label
        self.form_layout.addRow('Minimum Match Length:', self.minimum_match_length)

        # Add stretch to separate the form layout from the button
        self.layout.addStretch(1)

        # Create a horizontal box layout to hold the button
        self.button_box = QHBoxLayout()

        # Add stretch to push the button to the far right
        self.button_box.addStretch(1)

        # Create the build button with its caption
        self.btn_run = QPushButton('DiRT Start', self)
        self.btn_run.setToolTip(RUN_TT)

        # Add it to the button box
        self.button_box.addWidget(self.btn_run)

        # Add the button box to the bottom of the main VBox layout
        self.layout.addLayout(self.button_box)

        self.setLayout(self.layout)

        supported_languages = ['zhi', 'eng']
        self.language_select = QComboBox(self)
        self.language_select.addItems(supported_languages)
        self.language_select.setToolTip(LANGUAGE_TT)
        self.form_layout.addRow('Language: ', self.language_select)

        on_click = SIGNAL('clicked()')
        # Link to the DirtStart Button
        self.connect(self.btn_run, on_click, self.run)

        # Link Location Buttons
        self.connect(self.btn_input_file, on_click, self.select_input_file)
        self.connect(self.btn_input_dir, on_click, self.select_input_dir)
        self.connect(self.btn_preprocessed_dir, on_click, self.select_preprocessed_directory)
        self.connect(self.btn_output_dir, on_click, self.select_output_directory)

        self.progress_bar = QProgressBar(self)
        self.progress_bar.setRange(0, 1)
        self.progress_bar.hide()
        self.form_layout.addRow('Progress: ', self.progress_bar)

        self.adjustSize()

    def run(self):
        input_loc = unicode(self.input_file_field.text())
        prep_loc = unicode(self.preprocessed_dir_field.text())
        out_loc = unicode(self.output_dir_field.text())
        language = unicode(self.language_select.currentText())
        gap_length = int(self.gap_length.text())
        match_length = int(self.minimum_match_length.text())

        args = AttributeDict()
        args.input = input_loc
        args.preprocessed_dir = prep_loc
        args.output_dir = out_loc
        args.language = language
        args.comparator = u'simple'
        args.gap_length = gap_length
        args.match_length = match_length
        args.verbose = True
        args.gui = False
        args.parallel = True

        self.progress_bar.setRange(0, 0)
        self.progress_bar.show()

        self.thread = Worker(parsed_args=args)
        self.thread.finished.connect(self.done)
        self.thread.start()

    def done(self):
        self.progress_bar.setRange(0, 1)
        self.progress_bar.setValue(1)
        t = self.thread
        self.thread = None
        t.quit()

    def select_input_file(self):
        dialog = QFileDialog()
        file_name = dialog.getOpenFileName(self, "Open")
        self.input_file_field.setText(file_name)

    def select_input_dir(self):
        dialog = QFileDialog()
        input_dir = dialog.getExistingDirectory(self, "Open")
        self.input_file_field.setText(input_dir)

    def select_preprocessed_directory(self):
        preprocessed_dir = str(QFileDialog.getExistingDirectory(self, "Select Directory"))
        self.preprocessed_dir_field.setText(preprocessed_dir)

    def select_output_directory(self):
        output_dir = str(QFileDialog.getExistingDirectory(self, "Select Directory"))
        self.output_dir_field.setText(output_dir)


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Docker - the Linux container runtime</title>

    <meta name="description" content="Docker encapsulates heterogeneous payloads in standard containers">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="_static/css/bootstrap.min.css">
    <link rel="stylesheet" href="_static/css/bootstrap-responsive.min.css">

    <link rel="stylesheet" href="_static/css/main.css">

Introduction

Getting started

Documentation

                    Twitter
                    GitHub

Docker

The Linux container runtime

			Docker complements LXC with a high-level API which operates at the process level.
			It runs unix processes with strong guarantees of isolation and repeatability across servers.

			Docker is a great building block for automating distributed systems: large-scale web deployments, database clusters, continuous deployment systems, private PaaS, service-oriented architectures, etc.

                    Let's get started

Heterogeneous payloads

Any combination of binaries, libraries, configuration files, scripts, virtualenvs, jars, gems, tarballs, you name it. No more juggling between domain-specific tools. Docker can deploy and run them all.

Any server

Docker can run on any x64 machine with a modern linux kernel - whether it's a laptop, a bare metal server or a VM. This makes it perfect for multi-cloud deployments.

Isolation

docker isolates processes from each other and from the underlying host, using lightweight containers.

Repeatability

Because containers are isolated in their own filesystem, they behave the same regardless of where, when, and alongside what they run.

                John Willis @botchagalupe: IMHO docker is to paas what chef was to Iaas 4 years ago

                John Feminella @superninjarobot: So, @getdocker is pure excellence. If you've ever wished for arbitrary, PaaS-agnostic, lxc/aufs Linux containers, this is your jam!

                David Romulan @destructuring: I haven't had this much fun since AWS

                Ricardo Gladwell @rgladwell: wow @getdocker is either amazing or totally stupid

Notable features

Filesystem isolation: each process container runs in a completely separate root filesystem.

Resource isolation: system resources like cpu and memory can be allocated differently to each process container, using cgroups.

Network isolation: each process container runs in its own network namespace, with a virtual interface and IP address of its own.

Copy-on-write: root filesystems are created using copy-on-write, which makes deployment extremeley fast, memory-cheap and disk-cheap.

Logging: the standard streams (stdout/stderr/stdin) of each process container is collected and logged for real-time or batch retrieval.

Change management: changes to a container's filesystem can be committed into a new image and re-used to create more containers. No templating or manual configuration required.

Interactive shell: docker can allocate a pseudo-tty and attach to the standard input of any container, for example to run a throwaway interactive shell.

Under the hood

Under the hood, Docker is built on the following components:

The cgroup and namespacing capabilities of the Linux kernel;

AUFS, a powerful union filesystem with copy-on-write capabilities;

The Go programming language;

lxc, a set of convenience scripts to simplify the creation of linux containers.

                    Fill out my online form.

Twitter

                Tweets by @getdocker

                Docker is a project by dotCloud


text:
<<<<<<< HEAD
<<<<<<< HEAD

# Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test().

from ctypes import Structure, c_int, POINTER
import gc

def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():
    leak_inner()
    gc.collect()
=======

# Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test().

from ctypes import Structure, c_int, POINTER
import gc

def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():
    leak_inner()
    gc.collect()
>>>>>>> b875702c9c06ab5012e52ff4337439b03918f453
=======

# Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test().

from ctypes import Structure, c_int, POINTER
import gc

def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():
    leak_inner()
    gc.collect()
>>>>>>> b875702c9c06ab5012e52ff4337439b03918f453


text:
# Rails plugin init.
Dir[File.join(File.dirname(__FILE__), "lib/**/*.rb")].each do |fn|
  require fn
end


text:
/* jshint loopfunc:true, maxdepth:3 */
define(['jquery', 'rivets', 'backbone', 'underscore'],
    function ($, Rivets, Backbone, _) {
        'use strict';

        return function (optionsForRivets) {

            Rivets.configure({
                preloadData : true,
                prefix : optionsForRivets.rivetsPrefix,
                // This fires when you use data-rv-on-click.
                handler : function(context, ev, binding) {
                    this.call(binding.model, ev, binding.view.models);
                }
            });
            // Rivets works off of listening to the change event, which doesn't happen on inputs until loss of focus
            // Work around that if desired
            if (optionsForRivets.rivetsInstaUpdate) {
                this.$('input').on('keypress paste textInput input',
                    function () {
                        $(this).trigger('change');
                    });
            }

            Rivets.config.templateDelimiters = optionsForRivets.rivetsDelimiters;

            _.extend(Rivets.components, optionsForRivets.rivetsComponents);
            _.extend(Rivets.formatters, optionsForRivets.rivetsFormatters);
            _.extend(Rivets.adapters, optionsForRivets.rivetsAdapters);
            _.extend(Rivets.binders, optionsForRivets.rivetsBinders);

            return Rivets.bind(this.$el, {
                model : this.model,
                view : this,
                collection: this.collection
            });
        };
    });


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>phosphor-instrument-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <description>A Maven Plugin for Creating Phosphor-instrumented JVMs</description>
    <parent>
        <groupId>edu.gmu.swe.phosphor</groupId>
        <artifactId>phosphor-parent</artifactId>
        <version>0.0.5-SNAPSHOT</version>
    </parent>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>gpg.passphrase</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.6.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>edu.gmu.swe.phosphor</groupId>
            <artifactId>Phosphor</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
</project>


text:
import {Transaction} from "../../../../../src/decorator/transaction/Transaction";
import {Post} from "../entity/Post";
import {EntityManager} from "../../../../../src/entity-manager/EntityManager";
import {TransactionEntityManager} from "../../../../../src/decorator/transaction/TransactionEntityManager";
import {Category} from "../entity/Category";

export class PostController {

    @Transaction("mysql") // "mysql" is a connection name. you can not pass it if you are using default connection.
    async save(post: Post, category: Category, @TransactionEntityManager() entityManager: EntityManager) {
        await entityManager.persist(post);
        await entityManager.persist(category);
    }

    // this save is not wrapped into the transaction
    async nonSafeSave(entityManager: EntityManager, post: Post, category: Category) {
        await entityManager.persist(post);
        await entityManager.persist(category);
    }

}


text:
<?php

namespace Acme\DemoBundle\Manager;

use JMS\DiExtraBundle\Annotation\Service;

/**
 * @Service("inova_user.user_manager", public=true)
 */
class UserManager
{

}


text:
package org.wso2.developerstudio.eclipse.gmf.esb;

import org.eclipse.emf.ecore.EObject;

/**
 *
 * A representation of the model object 'Smooks Out Configuration'.
 *
 *
 *

 * The following features are supported:
 *

 *
{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getType Type}

 *
{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getExpression Expression}

 *
{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getProperty Property}

 *
{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getAction Action}

 *
{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getOutputMethod Output Method}

 *

 *

 *
 * @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getSmooksOutConfiguration()
 * @model
 * @generated
 */
public interface SmooksOutConfiguration extends EObject {
	/**
	 * Returns the value of the 'Type' attribute.
	 * The literals are from the enumeration {@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksIODataType}.
	 *
	 *

	 * If the meaning of the 'Type' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Type' attribute.
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.SmooksIODataType
	 * @see #setType(SmooksIODataType)
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getSmooksOutConfiguration_Type()
	 * @model
	 * @generated
	 */
	SmooksIODataType getType();

	/**
	 * Sets the value of the '{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getType Type}' attribute.
	 *
	 *
	 * @param value the new value of the 'Type' attribute.
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.SmooksIODataType
	 * @see #getType()
	 * @generated
	 */
	void setType(SmooksIODataType value);

	/**
	 * Returns the value of the 'Expression' containment reference.
	 *
	 *

	 * If the meaning of the 'Expression' reference isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Expression' containment reference.
	 * @see #setExpression(NamespacedProperty)
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getSmooksOutConfiguration_Expression()
	 * @model containment="true"
	 * @generated
	 */
	NamespacedProperty getExpression();

	/**
	 * Sets the value of the '{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getExpression Expression}' containment reference.
	 *
	 *
	 * @param value the new value of the 'Expression' containment reference.
	 * @see #getExpression()
	 * @generated
	 */
	void setExpression(NamespacedProperty value);

	/**
	 * Returns the value of the 'Property' attribute.
	 *
	 *

	 * If the meaning of the 'Property' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Property' attribute.
	 * @see #setProperty(String)
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getSmooksOutConfiguration_Property()
	 * @model
	 * @generated
	 */
	String getProperty();

	/**
	 * Sets the value of the '{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getProperty Property}' attribute.
	 *
	 *
	 * @param value the new value of the 'Property' attribute.
	 * @see #getProperty()
	 * @generated
	 */
	void setProperty(String value);

	/**
	 * Returns the value of the 'Action' attribute.
	 * The literals are from the enumeration {@link org.wso2.developerstudio.eclipse.gmf.esb.ExpressionAction}.
	 *
	 *

	 * If the meaning of the 'Action' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Action' attribute.
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.ExpressionAction
	 * @see #setAction(ExpressionAction)
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getSmooksOutConfiguration_Action()
	 * @model
	 * @generated
	 */
	ExpressionAction getAction();

	/**
	 * Sets the value of the '{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getAction Action}' attribute.
	 *
	 *
	 * @param value the new value of the 'Action' attribute.
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.ExpressionAction
	 * @see #getAction()
	 * @generated
	 */
	void setAction(ExpressionAction value);

	/**
	 * Returns the value of the 'Output Method' attribute.
	 * The default value is "".
	 * The literals are from the enumeration {@link org.wso2.developerstudio.eclipse.gmf.esb.OutputMethod}.
	 *
	 *

	 * If the meaning of the 'Output Method' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Output Method' attribute.
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.OutputMethod
	 * @see #setOutputMethod(OutputMethod)
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage#getSmooksOutConfiguration_OutputMethod()
	 * @model default=""
	 * @generated
	 */
	OutputMethod getOutputMethod();

	/**
	 * Sets the value of the '{@link org.wso2.developerstudio.eclipse.gmf.esb.SmooksOutConfiguration#getOutputMethod Output Method}' attribute.
	 *
	 *
	 * @param value the new value of the 'Output Method' attribute.
	 * @see org.wso2.developerstudio.eclipse.gmf.esb.OutputMethod
	 * @see #getOutputMethod()
	 * @generated
	 */
	void setOutputMethod(OutputMethod value);

} // SmooksOutConfiguration