text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="VisualTargetPresentationSource.cs" company="Catel development team">
//   Copyright (c) 2008 - 2015 Catel development team. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

#if NET

namespace Catel.Windows
{
    using System;
    using System.Security.Permissions;
    using System.Windows;
    using System.Windows.Media;

    /// <summary>
    /// Support for multi-threaded host visuals.
    /// </summary>
    /// <remarks>
    /// The original code can be found here: http://blogs.msdn.com/b/dwayneneed/archive/2007/04/26/multithreaded-ui-hostvisual.aspx.
    /// </remarks>
    [UIPermission(SecurityAction.LinkDemand, Window = UIPermissionWindow.AllWindows)]
    [UIPermission(SecurityAction.InheritanceDemand, Window = UIPermissionWindow.AllWindows)]
    public class VisualTargetPresentationSource : PresentationSource
    {
        private readonly VisualTarget _visualTarget;

        /// <summary>
        /// Initializes a new instance of the <see cref="VisualTargetPresentationSource"/> class.
        /// </summary>
        /// <param name="hostVisual">The host visual.</param>
        public VisualTargetPresentationSource(HostVisual hostVisual)
        {
            _visualTarget = new VisualTarget(hostVisual);
        }

        /// <summary>
        /// When overridden in a derived class, gets or sets the root visual being presented in the source.
        /// </summary>
        /// <value></value>
        /// <returns>
        /// The root visual.
        /// </returns>
        public override Visual RootVisual
        {
            get { return _visualTarget.RootVisual; }
            set
            {
                Visual oldRoot = _visualTarget.RootVisual;

                // Set the root visual of the VisualTarget.  This visual will
                // now be used to visually compose the scene.
                _visualTarget.RootVisual = value;

                // Tell the PresentationSource that the root visual has
                // changed.  This kicks off a bunch of stuff like the
                // Loaded event.
                RootChanged(oldRoot, value);

                // Kickoff layout...
                UIElement rootElement = value as UIElement;
                if (rootElement != null)
                {
                    rootElement.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity));
                    rootElement.Arrange(new Rect(rootElement.DesiredSize));
                }
            }
        }

        /// <summary>
        /// When overridden in a derived class, returns a visual target for the given source.
        /// </summary>
        /// <returns>
        /// Returns a <see cref="T:System.Windows.Media.CompositionTarget"/> that is target for rendering the visual.
        /// </returns>
        protected override CompositionTarget GetCompositionTargetCore()
        {
            return _visualTarget;
        }

        /// <summary>
        /// When overridden in a derived class, gets a value that declares whether the object is disposed.
        /// </summary>
        /// <value></value>
        /// <returns>true if the object is disposed; otherwise, false.
        /// </returns>
        public override bool IsDisposed
        {
            get
            {
                return false;
            }
        }
    }
}

#endif


text:
@interface NSDictionary (XO)

- (id)xo_objectForKeyOrNil:(id)key;

@end

redpajama_set_name: RedPajamaGithub


text: from social_core.backends.foursquare import FoursquareOAuth2


text:
import { Resolver, schemaComposer, ObjectTypeComposer } from 'graphql-compose';
import { GraphQLInt } from 'graphql-compose/lib/graphql';
import { UserModel } from '../../__mocks__/userModel';
import { count } from '../count';
import { convertModelToGraphQL } from '../../fieldsConverter';
import { ExtendedResolveParams } from '..';

beforeAll(() => UserModel.base.createConnection());
afterAll(() => UserModel.base.disconnect());

describe('count() ->', () => {
  let UserTC: ObjectTypeComposer;

  beforeEach(() => {
    schemaComposer.clear();
    UserTC = convertModelToGraphQL(UserModel, 'User', schemaComposer);
  });

  let user1;
  let user2;

  beforeEach(async () => {
    await UserModel.deleteMany({});

    user1 = new UserModel({
      name: 'userName1',
      skills: ['js', 'ruby', 'php', 'python'],
      gender: 'male',
      relocation: true,
      contacts: {
        email: '`1@1.com',
      },
    });

    user2 = new UserModel({
      name: 'userName2',
      skills: ['go', 'erlang'],
      gender: 'female',
      relocation: false,
      contacts: {
        email: '`2@2.com',
      },
    });

    await user1.save();
    await user2.save();
  });

  it('should return Resolver object', () => {
    const resolver = count(UserModel, UserTC);
    expect(resolver).toBeInstanceOf(Resolver);
  });

  describe('Resolver.args', () => {
    it('should have `filter` arg', () => {
      const resolver = count(UserModel, UserTC);
      expect(resolver.hasArg('filter')).toBe(true);
    });

    it('required model fields (filter.contacts.email) should be optional in filter arg', () => {
      const resolver = count(UserModel, UserTC);
      expect(resolver.getArgITC('filter').getFieldITC('contacts').toSDL({ omitDescriptions: true }))
        .toMatchInlineSnapshot(`
        "input FilterCountUserContactsInput {
          phones: [String]
          email: String
          skype: String
          locationId: MongoID
          _id: MongoID
        }"
      `);
    });
  });

  describe('Resolver.resolve():Promise', () => {
    it('should be fulfilled promise', async () => {
      const result = count(UserModel, UserTC).resolve({});
      await expect(result).resolves.toBeDefined();
    });

    it('should return total number of documents in collection if args is empty', async () => {
      const result = await count(UserModel, UserTC).resolve({ args: {} });
      expect(result).toBe(2);
    });

    it('should return number of document by filter data', async () => {
      const result = await count(UserModel, UserTC).resolve({
        args: { filter: { gender: 'male' } },
      });
      expect(result).toBe(1);
    });

    it('should call `beforeQuery` method with non-executed `query` as arg', async () => {
      const mongooseActions: any[] = [];

      UserModel.base.set('debug', function debugMongoose(...args: any[]) {
        mongooseActions.push(args);
      });

      const result = await count(UserModel, UserTC).resolve({
        args: {},
        beforeQuery: (query: any, rp: ExtendedResolveParams) => {
          expect(query).toHaveProperty('exec');
          expect(rp.model).toBe(UserModel);

          // modify query before execution
          return query.limit(1);
        },
      });

      expect(mongooseActions).toEqual([
        [
          'users',
          'countDocuments',
          {},
          {
            limit: 1,
          },
        ],
      ]);

      expect(result).toBe(1);
    });

    it('should override result with `beforeQuery`', async () => {
      const result = await count(UserModel, UserTC).resolve({
        args: {},
        beforeQuery: (query: any, rp: ExtendedResolveParams) => {
          expect(query).toHaveProperty('exec');
          expect(rp.model).toBe(UserModel);
          return 1989;
        },
      });
      expect(result).toBe(1989);
    });
  });

  describe('Resolver.getType()', () => {
    it('should return GraphQLInt type', () => {
      const outputType = count(UserModel, UserTC).getType();
      expect(outputType).toBe(GraphQLInt);
    });
  });
});


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

class Migration(SchemaMigration):

    def forwards(self, orm):

        # Deleting field 'SummaryAttribute.full_description'
        db.delete_column('h1ds_summary_summaryattribute', 'full_description')

        # Deleting field 'SummaryAttribute.short_description'
        db.delete_column('h1ds_summary_summaryattribute', 'short_description')

        # Adding field 'SummaryAttribute.description'
        db.add_column('h1ds_summary_summaryattribute', 'description', self.gf('django.db.models.fields.TextField')(default='No description'), keep_default=False)

    def backwards(self, orm):

        # We cannot add back in field 'SummaryAttribute.full_description'
        raise RuntimeError(
            "Cannot reverse this migration. 'SummaryAttribute.full_description' and its values cannot be restored.")

        # We cannot add back in field 'SummaryAttribute.short_description'
        raise RuntimeError(
            "Cannot reverse this migration. 'SummaryAttribute.short_description' and its values cannot be restored.")

        # Deleting field 'SummaryAttribute.description'
        db.delete_column('h1ds_summary_summaryattribute', 'description')

    models = {
        'h1ds_summary.datetimeattributeinstance': {
            'Meta': {'object_name': 'DateTimeAttributeInstance'},
            'attribute': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['h1ds_summary.SummaryAttribute']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'shot': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['h1ds_summary.Shot']"}),
            'value': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
        },
        'h1ds_summary.floatattributeinstance': {
            'Meta': {'object_name': 'FloatAttributeInstance'},
            'attribute': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['h1ds_summary.SummaryAttribute']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'shot': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['h1ds_summary.Shot']"}),
            'value': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'})
        },
        'h1ds_summary.integerattributeinstance': {
            'Meta': {'object_name': 'IntegerAttributeInstance'},
            'attribute': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['h1ds_summary.SummaryAttribute']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'shot': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['h1ds_summary.Shot']"}),
            'value': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
        },
        'h1ds_summary.shot': {
            'Meta': {'object_name': 'Shot'},
            'shot': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'})
        },
        'h1ds_summary.summaryattribute': {
            'Meta': {'object_name': 'SummaryAttribute'},
            'data_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
            'description': ('django.db.models.fields.TextField', [], {}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'db_index': 'True'}),
            'source_url': ('django.db.models.fields.URLField', [], {'max_length': '1000'})
        }
    }

    complete_apps = ['h1ds_summary']


text:
"""Dependency tracking for trackable objects."""

# TODO(kathywu): Delete this file after all imports have been moved to the path
# below.
from tensorflow.python.trackable import autotrackable
from tensorflow.python.util import deprecation

__getattr__ = deprecation.deprecate_moved_module(
    __name__, autotrackable, "2.11")


text:
<?php

use SIOFramework\Common\Factory\StandardFactory;

return [
	'databaseFactory' => new StandardFactory($app),
];


text:
<?php

namespace ApiGen;

use TokenReflection;

/**
 * Envelope for parameters that are defined only in @param or @method annotation.
 */
class ReflectionParameterMagic extends ReflectionParameter
{
	/**
	 * Parameter name.
	 *
	 * @var string
	 */
	 protected $name;

	/**
	 * Defines a type hint of parameter values.
	 *
	 * @var string
	 */
	protected $typeHint;

	/**
	 * Position of the parameter in the function/method.
	 *
	 * @var integer
	 */
	protected $position;

	/**
	 * The part of the source code defining the parameter default value.
	 *
	 * @var boolean
	 */
	protected $defaultValueDefinition;

	/**
	 * If the parameter can be used unlimited times.
	 *
	 * @var boolean
	 */
	protected $unlimited;

	/**
	 * If the parameter value is passed by reference.
	 *
	 * @var boolean
	 */
	protected $passedByReference;

	/**
	 * The declaring function.
	 *
	 * @var \ApiGen\ReflectionFunctionBase
	 */
	protected $declaringFunction;

	/**
	 * Constructor.
	 *
	 * @param \TokenReflection\IReflection $reflection Inspected reflection
	 * @param \ApiGen\Generator $generator ApiGen generator
	 */
	public function __construct(IReflection $reflection = null, Generator $generator = null)
	{
		$this->reflectionType = get_class($this);
		if (!isset(self::$reflectionMethods[$this->reflectionType])) {
			self::$reflectionMethods[$this->reflectionType] = array_flip(get_class_methods($this));
		}
	}

	/**
	 * Sets parameter name.
	 *
	 * @param string $name
	 * @return \ApiGen\ReflectionParameterMagic
	 */
	public function setName($name)
	{
		$this->name = (string) $name;
		return $this;
	}

	/**
	 * Sets type hint.
	 *
	 * @param string $typeHint
	 * @return \ApiGen\ReflectionParameterMagic
	 */
	public function setTypeHint($typeHint)
	{
		$this->typeHint = (string) $typeHint;
		return $this;
	}

	/**
	 * Sets position of the parameter in the function/method.
	 *
	 * @param integer $position
	 * @return \ApiGen\ReflectionParameterMagic
	 */
	public function setPosition($position)
	{
		$this->position = (int) $position;
		return $this;
	}

	/**
	 * Sets the part of the source code defining the parameter default value.
	 *
	 * @param string|null $defaultValueDefinition
	 * @return \ApiGen\ReflectionParameterMagic
	 */
	public function setDefaultValueDefinition($defaultValueDefinition)
	{
		$this->defaultValueDefinition = $defaultValueDefinition;
		return $this;
	}

	/**
	 * Sets if the parameter can be used unlimited times.
	 *
	 * @param boolean $unlimited
	 * @return \ApiGen\ReflectionParameterMagic
	 */
	public function setUnlimited($unlimited)
	{
		$this->unlimited = (bool) $unlimited;
		return $this;
	}

	/**
	 * Sets if the parameter value is passed by reference.
	 *
	 * @param boolean $passedByReference
	 * @return \ApiGen\ReflectionParameterMagic
	 */
	public function setPassedByReference($passedByReference)
	{
		$this->passedByReference = (bool) $passedByReference;
		return $this;
	}

	/**
	 * Sets declaring function.
	 *
	 * @param \ApiGen\ReflectionFunctionBase $declaringFunction
	 * @return \ApiGen\ReflectionParameterMagic
	 */
	public function setDeclaringFunction(ReflectionFunctionBase $declaringFunction)
	{
		$this->declaringFunction = $declaringFunction;
		return $this;
	}

	/**
	 * Returns the reflection broker used by this reflection object.
	 *
	 * @return \TokenReflection\Broker
	 */
	public function getBroker()
	{
		return $this->declaringFunction->getBroker();
	}

	/**
	 * Returns the name.
	 *
	 * @return string
	 */
	public function getName()
	{
		return $this->name;
	}

	/**
	 * Returns the type hint.
	 *
	 * @return string
	 */
	public function getTypeHint()
	{
		return $this->typeHint;
	}

	/**
	 * Returns the file name the parameter is defined in.
	 *
	 * @return string
	 */
	public function getFileName()
	{
		return $this->declaringFunction->getFileName();
	}

	/**
	 * Returns if the reflection object is internal.
	 *
	 * @return boolean
	 */
	public function isInternal()
	{
		return false;
	}

	/**
	 * Returns if the reflection object is user defined.
	 *
	 * @return boolean
	 */
	public function isUserDefined()
	{
		return true;
	}

	/**
	 * Returns if the current reflection comes from a tokenized source.
	 *
	 * @return boolean
	 */
	public function isTokenized()
	{
		return true;
	}

	/**
	 * Returns an element pretty (docblock compatible) name.
	 *
	 * @return string
	 */
	public function getPrettyName()
	{
		return str_replace('()', '($' . $this->name . ')', $this->declaringFunction->getPrettyName());
	}

	/**
	 * Returns the declaring class.
	 *
	 * @return \Apigen\ReflectionClass|null
	 */
	public function getDeclaringClass()
	{
		return $this->declaringFunction->getDeclaringClass();
	}

	/**
	 * Returns the declaring class name.
	 *
	 * @return string|null
	 */
	public function getDeclaringClassName()
	{
		return $this->declaringFunction->getDeclaringClassName();
	}

	/**
	 * Returns the declaring function.
	 *
	 * @return \ApiGen\ReflectionFunctionBase
	 */
	public function getDeclaringFunction()
	{
		return $this->declaringFunction;
	}

	/**
	 * Returns the declaring function name.
	 *
	 * @return string
	 */
	public function getDeclaringFunctionName()
	{
		return $this->declaringFunction->getName();
	}

	/**
	 * Returns the definition start line number in the file.
	 *
	 * @return integer
	 */
	public function getStartLine()
	{
		return $this->declaringFunction->getStartLine();
	}

	/**
	 * Returns the definition end line number in the file.
	 *
	 * @return integer
	 */
	public function getEndLine()
	{
		return $this->declaringFunction->getEndLine();
	}

	/**
	 * Returns the appropriate docblock definition.
	 *
	 * @return string|boolean
	 */
	public function getDocComment()
	{
		return false;
	}

	/**
	 * Returns the part of the source code defining the parameter default value.
	 *
	 * @return string
	 */
	public function getDefaultValueDefinition()
	{
		return $this->defaultValueDefinition;
	}

	/**
	 * Returns if a default value for the parameter is available.
	 *
	 * @return boolean
	 */
	public function isDefaultValueAvailable()
	{
		return null !== $this->defaultValueDefinition;
	}

	/**
	 * Returns the position within all parameters.
	 *
	 * @return integer
	 */
	public function getPosition()
	{
		return $this->position;
	}

	/**
	 * Returns if the parameter expects an array.
	 *
	 * @return boolean
	 */
	public function isArray()
	{
		return TokenReflection\ReflectionParameter::ARRAY_TYPE_HINT === $this->typeHint;
	}

	public function isCallable()
	{
		return TokenReflection\ReflectionParameter::CALLABLE_TYPE_HINT === $this->typeHint;
	}

	/**
	 * Returns reflection of the required class of the value.
	 *
	 * @return \ApiGen\ReflectionClass|null
	 */
	public function getClass()
	{
		$className = $this->getClassName();
		return null === $className ? null : self::$parsedClasses[$className];
	}

	/**
	 * Returns the required class name of the value.
	 *
	 * @return string|null
	 */
	public function getClassName()
	{
		if ($this->isArray() || $this->isCallable()) {
			return null;
		}

		if (isset(self::$parsedClasses[$this->typeHint])) {
			return $typeHint;
		}

		return null;
	}

	/**
	 * Returns if the the parameter allows NULL.
	 *
	 * @return boolean
	 */
	public function allowsNull()
	{
		if ($this->isArray() || $this->isCallable()) {
			return 'null' === strtolower($this->defaultValueDefinition);
		}

		return !empty($this->defaultValueDefinition);
	}

	/**
	 * Returns if the parameter is optional.
	 *
	 * @return boolean
	 */
	public function isOptional()
	{
		return $this->isDefaultValueAvailable();
	}

	/**
	 * Returns if the parameter value is passed by reference.
	 *
	 * @return boolean
	 */
	public function isPassedByReference()
	{
		return $this->passedByReference;
	}

	/**
	 * Returns if the parameter value can be passed by value.
	 *
	 * @return boolean
	 */
	public function canBePassedByValue()
	{
		return false;
	}

	/**
	 * Returns if the parameter can be used unlimited times.
	 *
	 * @return boolean
	 */
	public function isUnlimited()
	{
		return $this->unlimited;
	}

	/**
	 * Retrieves a property or method value.
	 *
	 * @param string $name Property name
	 * @return mixed
	 */
	public function __get($name)
	{
		$key = ucfirst($name);
		if (isset(self::$reflectionMethods[$this->reflectionType]['get' . $key])) {
			return $this->{'get' . $key}();
		}

		if (isset(self::$reflectionMethods[$this->reflectionType]['is' . $key])) {
			return $this->{'is' . $key}();
		}

		return null;
	}

	/**
	 * Checks if the given property exists.
	 *
	 * @param mixed $name Property name
	 * @return boolean
	 */
	public function __isset($name)
	{
		$key = ucfirst($name);
		return isset(self::$reflectionMethods[$this->reflectionType]['get' . $key]) || isset(self::$reflectionMethods[$this->reflectionType]['is' . $key]);
	}
}


text:
package controllers.Rest

import play.api.mvc._
import play.api.db.slick._
import play.api.Play.current

import dao._
import utils.JsonTemplates

/**
 * REST service controller for hierarchical services (i.e. services basing on parent-child relations between PPLs).
 *
 * @author Amadeusz Kosik <akosik@semantive.com>
 */
object Hierarchy extends Controller {

  /**
   * Children service.
   *  Returns list of children of given feature.
   *
   * @param geonameId id of the requested feature
   * @param lang      preferred lang of names of the returned features
   * @return          JSON
   */
  def children(geonameId: Int, lang: String) = DBAction { implicit rs =>

    val features = Features.getChildren(geonameId, lang)

    if(features.length == 0)
      NotFound
    else
      Ok(JsonTemplates.childrenToJson(features))
  }

  /**
   * Hierarchy service.
   *  Returns list of features higher in the hierarchy.
   *
   * @param geonameId id of the requested feature
   * @param lang      preferred lang of names of the returned features
   * @return          JSON
   */
  def hierarchy(geonameId: Int, lang: String) = DBAction { implicit rs =>

    val features = Features.getHierarchy(geonameId, lang)

    if(features.length == 0)
      NotFound
    else
      Ok(JsonTemplates.hierarchyToJson(features))
  }

  /**
   * Siblings service.
   *  Returns list of siblings (i.e. features with the same parentId) of given feature.
   *
   * @param geonameId id of the requested feature
   * @param lang      preferred lang of names of the returned features
   * @return          JSON
   */
  def siblings(geonameId: Int, lang: String) = DBAction { implicit rs =>

    val features = Features.getSiblings(geonameId, lang)

    if(features.length == 0)
      NotFound
    else
      Ok(JsonTemplates.siblingsToJson(features))
  }
}


text:
 /************************************************************************/
 /*                                                                      */
 /*                Centre for Speech Technology Research                 */
 /*                     University of Edinburgh, UK                      */
 /*                       Copyright (c) 1996,1997                        */
 /*                        All Rights Reserved.                          */
 /*                                                                      */
 /*  Permission is hereby granted, free of charge, to use and distribute */
 /*  this software and its documentation without restriction, including  */
 /*  without limitation the rights to use, copy, modify, merge, publish, */
 /*  distribute, sublicense, and/or sell copies of this work, and to     */
 /*  permit persons to whom this work is furnished to do so, subject to  */
 /*  the following conditions:                                           */
 /*   1. The code must retain the above copyright notice, this list of   */
 /*      conditions and the following disclaimer.                        */
 /*   2. Any modifications must be clearly marked as such.               */
 /*   3. Original authors' names are not deleted.                        */
 /*   4. The authors' names are not used to endorse or promote products  */
 /*      derived from this software without specific prior written       */
 /*      permission.                                                     */
 /*                                                                      */
 /*  THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK       */
 /*  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING     */
 /*  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT  */
 /*  SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE    */
 /*  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES   */
 /*  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN  */
 /*  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,         */
 /*  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF      */
 /*  THIS SOFTWARE.                                                      */
 /*                                                                      */
 /*************************************************************************/
 /*                                                                       */
 /*                 Author: Richard Caley (rjc@cstr.ed.ac.uk)             */
 /* --------------------------------------------------------------------  */
 /* Simple XML processing example.                                        */
 /*                                                                       */
 /*************************************************************************/

#include <cstdlib>
#include <fstream>
#include <iostream>
#include "rxp/XML_Parser.h"

#if defined(DATAC)
#    define __STRINGIZE(X) #X
#    define DATA __STRINGIZE(DATAC)
#endif

/**@name XML_Parser:example
  *
  * Simple XML processing example.
  *
  * @see XML_Parser
  */
//@{

/** Any data needed during processing has to be passed around,
  * here we just keep track of the nesting depth.
  */
struct Parse_State
  {
  int depth;
  };

/** Define a subset of XML_Parser_Class which which has callbacks for
  * what we want to do. In a real application we might not need
  * to define them all.
  */
class My_Parser_Class : public XML_Parser_Class
{
protected:
  virtual void document_open(XML_Parser_Class &c,
			XML_Parser &p,
			void *data);
  virtual void document_close(XML_Parser_Class &c,
			 XML_Parser &p,
			 void *data);

  virtual void element_open(XML_Parser_Class &c,
		       XML_Parser &p,
		       void *data,
		       const char *name,
		       XML_Attribute_List &attributes);
  virtual void element(XML_Parser_Class &c,
		  XML_Parser &p,
		  void *data,
		  const char *name,
		  XML_Attribute_List &attributes);
  virtual void element_close(XML_Parser_Class &c,
			XML_Parser &p,
			void *data,
			const char *name);

  virtual void pcdata(XML_Parser_Class &c,
		 XML_Parser &p,
		 void *data,
		 const char *chars);
  virtual void cdata(XML_Parser_Class &c,
		XML_Parser &p,
		void *data,
		const char *chars);

  virtual void processing(XML_Parser_Class &c,
		     XML_Parser &p,
		     void *data,
		     const char *instruction);
  virtual void error(XML_Parser_Class &c,
		XML_Parser &p,
		void *data);
};

int main(void)
{
  My_Parser_Class pclass;
  Parse_State state;

  /** Rewriting rules for public and system IDs can be
    * used to locate local copies etc.
    */

  pclass.register_id("//EST//Test/\\(.*\\)",
		     DATA "/\\1.dtd");

  /** An individual parser runs over a single source.
    */
  XML_Parser *parser = pclass.make_parser(DATA "/eg.xml",
					 &state);
  /** Run the parser.
    */
  parser->go();
  exit(0);
}

/** Now we define the callbacks.
  */

void My_Parser_Class::document_open(XML_Parser_Class &c,
		      XML_Parser &p,
		      void *data)
{
  (void)c; (void)p;
  Parse_State *state = (Parse_State *)data;

  state->depth=1;

  printf("%*s document %d\n", state->depth*4, ">", state->depth);
}

void My_Parser_Class::document_close(XML_Parser_Class &c,
		    XML_Parser &p,
		    void *data)
{
  (void)c; (void)p;
  Parse_State *state = (Parse_State *)data;

  printf("%*s <document %d\n", state->depth*4, ">", state->depth);
}

void My_Parser_Class::element_open(XML_Parser_Class &c,
		  XML_Parser &p,
		  void *data,
		  const char *name,
		  XML_Attribute_List &attributes)
{
  (void)c; (void)p; (void)attributes;
  Parse_State *state = (Parse_State *)data;

  state->depth++;

  printf("%*s %s %d\n", state->depth*4, ">", name, state->depth);
}

void My_Parser_Class::element(XML_Parser_Class &c,
	     XML_Parser &p,
	     void *data,
	     const char *name,
	     XML_Attribute_List &attributes)
{
  (void)c; (void)p; (void)attributes;
  Parse_State *state = (Parse_State *)data;

  printf("%*s %s %d\n", state->depth*4, ":", name, state->depth);
}

void My_Parser_Class::element_close(XML_Parser_Class &c,
		   XML_Parser &p,
		   void *data,
		   const char *name)
{
  (void)c; (void)p;
  Parse_State *state = (Parse_State *)data;

  printf("%*s %s %d\n", state->depth*4, "<", name, state->depth);
  state->depth--;
}

void My_Parser_Class::pcdata(XML_Parser_Class &c,
	    XML_Parser &p,
	    void *data,
	    const char *chars)
{
  (void)c; (void)p;
  Parse_State *state = (Parse_State *)data;

  printf("%*s [pcdata[%s]] %d\n", state->depth*4, "", chars, state->depth);
}

void My_Parser_Class::cdata(XML_Parser_Class &c,
	   XML_Parser &p,
	   void *data,
	   const char *chars)
{
  (void)c; (void)p;
  Parse_State *state = (Parse_State *)data;

  printf("%*s [cdata[%s]] %d\n", state->depth*4, "", chars, state->depth);
}

void My_Parser_Class::processing(XML_Parser_Class &c,
		XML_Parser &p,
		void *data,
		const char *instruction)
{
  (void)c; (void)p;
  Parse_State *state = (Parse_State *)data;

  printf("%*s [proc[%s]] %d\n", state->depth*4, "", instruction, state->depth);
}

void My_Parser_Class::error(XML_Parser_Class &c,
	   XML_Parser &p,
	   void *data)
{
  (void)c; (void)p;
  Parse_State *state = (Parse_State *)data;

  printf("%*s [error[%s]] %d\n", state->depth*4, "", get_error(p), state->depth);
}

//@}


text:
<!DOCTYPE html>

<input type=month id=month value="2012-01" step="2" list=suggestions>
<datalist id=suggestions>
    <option>2012-01</option>
    <option>2012-02</option>
    <option>2012-03</option>
    <option>2012-04</option>
    <option>2012-05</option>
    <option>2012-06</option>
    <option>2012-07</option>
    <option>2012-08</option>
    <option>2012-09</option>
    <option>2012-10</option>
</datalist>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Overview List
</TITLE>

<META NAME="date" CONTENT="2013-10-22">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

All Classes

Packages

igeo

igeo.gui

igeo.io

igeo.p


text:
<?xml version="1.0" encoding="utf-8"?>
<!--

-->
<com.albedinsky.android.ui.widget.GridViewWidget
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:ui="http://schemas.android.com/apk/res-auto"
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        ui:uiPullEnabled="true"/>


text:
from __future__ import unicode_literals

import datetime
from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('operation_finance', '0030_auto_20170718_1645'),
    ]

    operations = [
        migrations.AlterField(
            model_name='invoice',
            name='due_by',
            field=models.DateField(default=datetime.datetime(2017, 8, 12, 19, 21, 18, 523743)),
        ),
    ]


text:
package com.madding.android.dl.util;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.Log;

import com.madding.android.dl.acitivy.plugin.DLPluginActivity;
import com.madding.android.dl.acitivy.plugin.DLPluginFragmentActivity;
import com.madding.android.dl.constant.DLConstant;

public class DLUtil {

    private static final String TAG = "DLUtils";

    public static PackageInfo getPackageInfo(Context context, String apkFilepath) {
        PackageManager pm = context.getPackageManager();
        PackageInfo pkgInfo = null;
        try {
            pkgInfo = pm.getPackageArchiveInfo(apkFilepath, PackageManager.GET_ACTIVITIES);
        } catch (Exception e) {
            // should be something wrong with parse
            e.printStackTrace();
        }

        return pkgInfo;
    }

    public static Drawable getAppIcon(Context context, String apkFilepath) {
        PackageManager pm = context.getPackageManager();
        PackageInfo pkgInfo = getPackageInfo(context, apkFilepath);
        if (pkgInfo == null) {
            return null;
        }

        // Workaround for http://code.google.com/p/android/issues/detail?id=9151
        ApplicationInfo appInfo = pkgInfo.applicationInfo;
        if (Build.VERSION.SDK_INT >= 8) {
            appInfo.sourceDir = apkFilepath;
            appInfo.publicSourceDir = apkFilepath;
        }

        return pm.getApplicationIcon(appInfo);
    }

    public static CharSequence getAppLabel(Context context, String apkFilepath) {
        PackageManager pm = context.getPackageManager();
        PackageInfo pkgInfo = getPackageInfo(context, apkFilepath);
        if (pkgInfo == null) {
            return null;
        }

        // Workaround for http://code.google.com/p/android/issues/detail?id=9151
        ApplicationInfo appInfo = pkgInfo.applicationInfo;
        if (Build.VERSION.SDK_INT >= 8) {
            appInfo.sourceDir = apkFilepath;
            appInfo.publicSourceDir = apkFilepath;
        }

        return pm.getApplicationLabel(appInfo);
    }

    public static String getProxyViewAction(String className, ClassLoader classLoader) {
        int activityType = getActivityType(className, classLoader);
        return getProxyViewActionByActivityType(activityType);
    }

    public static String getProxyViewAction(Class<?> cls) {
        int activityType = getActivityType(cls);
        return getProxyViewActionByActivityType(activityType);
    }

    private static String getProxyViewActionByActivityType(int activityType) {
        String proxyViewAction = null;

        switch (activityType) {
            case DLConstant.ACTIVITY_TYPE_NORMAL: {
                proxyViewAction = DLConstant.PROXY_ACTIVITY_DEFAULT_ACTION;
                break;
            }
            case DLConstant.ACTIVITY_TYPE_FRAGMENT: {
                proxyViewAction = DLConstant.PROXY_FRAGMENT_ACTIVITY_DEFAULT_ACTION;
                break;
            }
            case DLConstant.ACTIVITY_TYPE_ACTIONBAR:
            case DLConstant.ACTIVITY_TYPE_UNKNOWN:
            default:
                break;
        }

        if (proxyViewAction == null) {
            Log.e(TAG, "unsupported activityType:" + activityType);
        }

        return proxyViewAction;
    }

    private static int getActivityType(String className, ClassLoader classLoader) {
        int activityType = DLConstant.ACTIVITY_TYPE_UNKNOWN;

        try {
            Class<?> cls = Class.forName(className, false, classLoader);
            activityType = getActivityType(cls);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

        return activityType;
    }

    private static int getActivityType(Class<?> cls) {
        int activityType = DLConstant.ACTIVITY_TYPE_UNKNOWN;

        try {
            if (cls.asSubclass(DLPluginActivity.class) != null) {
                activityType = DLConstant.ACTIVITY_TYPE_NORMAL;
                return activityType;
            }
        } catch (ClassCastException e) {
            // ignored
        }

        try {
            if (cls.asSubclass(DLPluginFragmentActivity.class) != null) {
                activityType = DLConstant.ACTIVITY_TYPE_FRAGMENT;
                return activityType;
            }
        } catch (ClassCastException e) {
            // ignored
        }

        // TODO: handle other activity types, ActionbarActivity,eg.
        return activityType;
    }

    public static void showDialog(Activity activity, String title, String message) {
        new AlertDialog.Builder(activity).setTitle(title).setMessage(message).setPositiveButton("确定", null).show();
    }
}


text:
import sys
from unittest import TestCase

from django import conf

from mypage.utils.settings import Settings

class DummyModule(object):
    SAMPLE_CONFIG_OPTION = 'sample-config-value'

class TestSettings(TestCase):
    def setUp(self):
        dummy_module = DummyModule()
        sys.modules['tmp_tests_someapp_conf'] = dummy_module

        self.settings = Settings('tmp_tests_someapp_conf')

    def test_value_only_in_app_settings(self):
        self.failUnlessEqual(self.settings.SAMPLE_CONFIG_OPTION, 'sample-config-value')

    def test_value_overriden_via_django_conf_settings(self):
        self.failUnlessEqual(self.settings.SITE_ID, 1)

    def test_value_defined_nowhere(self):
        self.failUnlessRaises(AttributeError, lambda:self.settings.UNDEFINED_VALUE)

    def test_value_prefixed_constants(self):
        settings = Settings('tmp_tests_someapp_conf', prefix='SITE_')
        self.failUnlessEqual(settings.SAMPLE_CONFIG_OPTION, 'sample-config-value')
        self.failUnlessEqual(settings.ID, conf.settings.SITE_ID)


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.

namespace Microsoft.Azure.Search.Models
{
    using Newtonsoft.Json;

    internal class SearchContinuationTokenPayload
    {
        [JsonProperty("@odata.nextLink")]
        public string NextLink { get; set; }

        [JsonProperty("@search.nextPageParameters")]
        public SearchParametersPayload NextPageParameters { get; set; }
    }
}


text:
class PidFile
  attr_reader :pidfile, :piddir, :pidpath

  class DuplicateProcessError < RuntimeError; end

  VERSION = '0.3.0'

  DEFAULT_OPTIONS = {
    :pidfile => File.basename($0, File.extname($0)) + ".pid",
    :piddir => '/var/run',
  }

  def initialize(*args)
    opts = {}

    #----- set options -----#
    case
    when args.length == 0 then
    when args.length == 1 && args[0].class == Hash then
      arg = args.shift

      if arg.class == Hash
        opts = arg
      end
    else
      raise ArgumentError, "new() expects hash or hashref as argument"
    end

    opts = DEFAULT_OPTIONS.merge opts

    @piddir     = opts[:piddir]
    @pidfile    = opts[:pidfile]
    @pidpath    = File.join(@piddir, @pidfile)
    @fh         = nil

    #----- Does the pidfile or pid exist? -----#
    if self.pidfile_exists?
      if self.class.running?(@pidpath)
        raise DuplicateProcessError, "Process (#{$0} - #{self.class.pid(@pidpath)}) is already running."

        exit! # exit without removing the existing pidfile
      end

      self.release
    end

    #----- create the pidfile -----#
    create_pidfile

    at_exit { release }
  end

  #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  # Instance Methods
  #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#

  # Returns the PID, if any, of the instantiating process
  def pid
    return @pid unless @pid.nil?

    if self.pidfile_exists?
      @pid = open(self.pidpath, 'r').read.to_i
    else
      @pid = nil
    end
  end

  # Boolean stating whether this process is alive and running
  def alive?
    return false unless self.pid && (self.pid == Process.pid)

    self.class.process_exists?(self.pid)
  end

  # does the pidfile exist?
  def pidfile_exists?
    self.class.pidfile_exists?(pidpath)
  end

  # unlock and remove the pidfile. Sets pid to nil
  def release
    unless @fh.nil?
      @fh.flock(File::LOCK_UN)
      remove_pidfile
    end
    @pid = nil
  end

  # returns the modification time of the pidfile
  def locktime
    File.mtime(self.pidpath)
  end

  #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
  # Class Methods
  #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#

  # Returns the PID, if any, of the instantiating process
  def self.pid(path=nil)
    if pidfile_exists?(path)
      open(path, 'r').read.to_i
    end
  end

  # class method for determining the existence of pidfile
  def self.pidfile_exists?(path=nil)
    path ||= File.join(DEFAULT_OPTIONS[:piddir], DEFAULT_OPTIONS[:pidfile])

    File.exists?(path)
  end

  # boolean stating whether the calling program is already running
  def self.running?(path=nil)
    calling_pid = nil
    path ||= File.join(DEFAULT_OPTIONS[:piddir], DEFAULT_OPTIONS[:pidfile])

    if pidfile_exists?(path)
      calling_pid = pid(path)
    end

    process_exists?(calling_pid)
  end

private

  # Writes the process ID to the pidfile and defines @pid as such
  def create_pidfile
    # Once the filehandle is created, we don't release until the process dies.
    @fh = open(self.pidpath, "w")
    @fh.flock(File::LOCK_EX | File::LOCK_NB) || raise
    @pid = Process.pid
    @fh.puts @pid
    @fh.flush
    @fh.rewind
  end

  # removes the pidfile.
  def remove_pidfile
    File.unlink(self.pidpath) if self.pidfile_exists?
  end

  def self.process_exists?(process_id)
    begin
      Process.kill(0, process_id)
      true
    rescue Errno::ESRCH, TypeError # "PID is NOT running or is zombied
      false
    end
  end
end


text:
package com.cell.user.ifacade.request.authority;

import com.cell.user.condition.ListSysAuthorityCondition;
import com.cell.user.ifacade.request.BaseRequest;
import com.cell.user.page.Page;

public class ListSysAuthorityReq extends BaseRequest{

	private static final long serialVersionUID = -2779451363401602595L;

    protected  ListSysAuthorityCondition condition;

    protected Page page;

	public ListSysAuthorityCondition getCondition() {
		return condition;
	}

	public void setCondition(ListSysAuthorityCondition condition) {
		this.condition = condition;
	}

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

}


text: <?= lang('module_demo_button_create_author') ?>


text:
<?php
/**
 * Created by PhpStorm.
 * User: morontt
 * Date: 11.10.17
 * Time: 23:27
 */

namespace Mtt\BlogBundle\Telegram;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

class TelegramCompilerPass implements CompilerPassInterface
{
    public function process(ContainerBuilder $container)
    {
        if (!$container->has('mtt_blog.telegram_bot')) {
            return;
        }

        $definition = $container->findDefinition('mtt_blog.telegram_bot');

        foreach ($container->findTaggedServiceIds('telegram-command') as $id => $tags) {
            $definition->addMethodCall(
                'addCommand',
                [new Reference($id)]
            );
        }
    }
}


text:
INSERT INTO widget_type (id, name, version) VALUES (5, 'fullscreen', 0);

INSERT INTO databasechangelog (AUTHOR, COMMENTS, DATEEXECUTED, DESCRIPTION, EXECTYPE, FILENAME, ID, LIQUIBASE, MD5SUM, ORDEREXECUTED) VALUES ('owf', 'Add fullscreen widget types to table', NOW(), 'Insert Row', 'EXECUTED', 'changelog_7.2.0.groovy', '7.2.0-1', '2.0.1', '3:69c7062f6bb536836805960380dfdb90', 1);

-- Release Database Lock


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="18326e28-14d6-4c57-9fdd-1961244ec14b" name="Default" comment="">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/controllers.php" afterPath="$PROJECT_DIR$/src/controllers.php" />
    </list>
    <ignored path="IcarusHub.iws" />
    <ignored path=".idea/workspace.xml" />
    <file path="/Dummy.txt" changelist="18326e28-14d6-4c57-9fdd-1961244ec14b" time="1388871373788" ignored="false" />
    <file path="/index.php" changelist="18326e28-14d6-4c57-9fdd-1961244ec14b" time="1381078157809" ignored="false" />
    <file path="/.gitignore" changelist="18326e28-14d6-4c57-9fdd-1961244ec14b" time="1381082162225" ignored="false" />
    <file path="/controllers.php" changelist="18326e28-14d6-4c57-9fdd-1961244ec14b" time="1388870710079" ignored="false" />
    <file path="/index.html.twig" changelist="18326e28-14d6-4c57-9fdd-1961244ec14b" time="1381083722684" ignored="false" />
    <file path="/a.dummy" changelist="18326e28-14d6-4c57-9fdd-1961244ec14b" time="1381083181278" ignored="false" />
    <file path="/form.html.twig" changelist="18326e28-14d6-4c57-9fdd-1961244ec14b" time="1388853391083" ignored="false" />
    <file path="/display.html.twig" changelist="18326e28-14d6-4c57-9fdd-1961244ec14b" time="1388869517336" ignored="false" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="DaemonCodeAnalyzer">
    <disable_hints />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="IcarusHub" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="controllers.php" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/controllers.php">
          <provider selected="true" editor-type-id="text-editor">
            <state line="176" column="8" selection-start="6322" selection-end="6322" vertical-scroll-proportion="4.150289">
              <folding>
                <element signature="e#105#142#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="index.php" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/web/index.php">
          <provider selected="true" editor-type-id="text-editor">
            <state line="6" column="41" selection-start="130" selection-end="130" vertical-scroll-proportion="-3.9230769">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="display.html.twig" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/resources/views/display.html.twig">
          <provider selected="true" editor-type-id="text-editor">
            <state line="15" column="14" selection-start="382" selection-end="382" vertical-scroll-proportion="-9.807693">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="form.html.twig" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/resources/views/form.html.twig">
          <provider selected="true" editor-type-id="text-editor">
            <state line="3" column="19" selection-start="79" selection-end="79" vertical-scroll-proportion="-1.9615384">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindManager">
    <FindUsagesManager>
      <setting name="OPEN_NEW_TAB" value="false" />
    </FindUsagesManager>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="GitLogSettings">
    <option name="myStructureFilterPaths" />
    <option name="myDateState">
      <MyDateState />
    </option>
  </component>
  <component name="IdeDocumentHistory">
    <option name="changedFiles">
      <list>
        <option value="C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf" />
        <option value="$PROJECT_DIR$/.gitignore" />
        <option value="$PROJECT_DIR$/src/app.php" />
        <option value="$PROJECT_DIR$/resources/views/index.html.twig" />
        <option value="$PROJECT_DIR$/resources/views/form.html.twig" />
        <option value="$PROJECT_DIR$/web/index.php" />
        <option value="$PROJECT_DIR$/resources/views/display.html.twig" />
        <option value="$PROJECT_DIR$/src/controllers.php" />
      </list>
    </option>
  </component>
  <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
  <component name="ProjectFrameBounds">
    <option name="x" value="-8" />
    <option name="y" value="-8" />
    <option name="width" value="1382" />
    <option name="height" value="744" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectReloadState">
    <option name="STATE" value="0" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents ProjectPane="true" />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="web" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="resources" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="views" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="IcarusHub" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="resources" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder0" value="0" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth0" value="153" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth1" value="152" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder3" value="3" />
    <property name="options.splitter.main.proportions" value="0.3" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder1" value="1" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder2" value="2" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth0" value="154" />
    <property name="options.lastSelected" value="editor.preferences.appearance" />
    <property name="recentsLimit" value="5" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder1" value="1" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder0" value="0" />
    <property name="last_opened_file_path" value="C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth2" value="153" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth3" value="829" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth3" value="819" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth2" value="154" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth1" value="153" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder2" value="2" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder3" value="3" />
    <property name="FullScreen" value="false" />
    <property name="options.splitter.details.proportions" value="0.2" />
    <property name="options.searchVisible" value="true" />
  </component>
  <component name="RecentsManager">
    <key name="CopyFile.RECENT_KEYS">
      <recent name="C:\Users\Ondra\Documents\GitHub\IcarusHub\resources\views" />
    </key>
  </component>
  <component name="RunManager" selected="PHP Script.controllers.php">
    <configuration default="false" name="controllers.php" type="PhpLocalRunConfigurationType" factoryName="PHP Console" temporary="true" path="$PROJECT_DIR$/src/controllers.php">
      <method />
    </configuration>
    <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
      <TestRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
      <method />
    </configuration>
    <list size="1">
      <item index="0" class="java.lang.String" itemvalue="PHP Script.controllers.php" />
    </list>
    <recent_temporary>
      <list size="1">
        <item index="0" class="java.lang.String" itemvalue="PHP Script.controllers.php" />
      </list>
    </recent_temporary>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false" SSL_PROTOCOLS="all">
    <option name="USER" value="" />
    <option name="PASSWORD" value="" />
    <option name="mySSHConnectionTimeout" value="30000" />
    <option name="mySSHReadTimeout" value="30000" />
    <option name="LAST_MERGED_REVISION" />
    <option name="MERGE_DRY_RUN" value="false" />
    <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
    <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
    <option name="IGNORE_SPACES_IN_MERGE" value="false" />
    <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
    <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
    <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
    <option name="FORCE_UPDATE" value="false" />
    <option name="IGNORE_EXTERNALS" value="false" />
    <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="18326e28-14d6-4c57-9fdd-1961244ec14b" name="Default" comment="" />
      <created>1381074446865</created>
      <updated>1381074446865</updated>
    </task>
    <task id="LOCAL-00001" summary="First commit - adding Silex web app">
      <created>1381082305014</created>
      <updated>1381082305014</updated>
    </task>
    <task id="LOCAL-00002" summary="First If statement and header message change">
      <created>1381084043603</created>
      <updated>1381084043603</updated>
    </task>
    <task id="LOCAL-00003" summary="Contoller fixes">
      <created>1388856716944</created>
      <updated>1388856716944</updated>
    </task>
    <task id="LOCAL-00004" summary="Power calculation input">
      <created>1388871379073</created>
      <updated>1388871379073</updated>
    </task>
    <option name="localTasksCounter" value="5" />
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="-8" y="-8" width="1382" height="744" extended-state="7" />
    <editor active="true" />
    <layout>
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32876712" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32876712" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2189394" sideWeight="0.6712329" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32876712" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32876712" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
    <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
    <option name="CHECK_NEW_TODO" value="true" />
    <option name="myTodoPanelSettings">
      <value>
        <are-packages-shown value="false" />
        <are-modules-shown value="false" />
        <flatten-packages value="false" />
        <is-autoscroll-to-source value="false" />
      </value>
    </option>
    <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
    <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
    <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
    <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
    <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
    <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
    <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
    <option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
    <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
    <option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
    <option name="DEFAULT_PATCH_EXTENSION" value="patch" />
    <option name="SHORT_DIFF_HORIZONTALLY" value="true" />
    <option name="SHORT_DIFF_EXTRA_LINES" value="2" />
    <option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
    <option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
    <option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
    <option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
    <option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
    <option name="SHOW_DIRTY_RECURSIVELY" value="false" />
    <option name="LIMIT_HISTORY" value="true" />
    <option name="MAXIMUM_HISTORY_ROWS" value="1000" />
    <option name="UPDATE_FILTER_SCOPE_NAME" />
    <option name="USE_COMMIT_MESSAGE_MARGIN" value="false" />
    <option name="COMMIT_MESSAGE_MARGIN_SIZE" value="72" />
    <option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="false" />
    <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
    <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
    <option name="LAST_COMMIT_MESSAGE" value="Power calculation input" />
    <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
    <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
    <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
    <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
    <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
    <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
    <option name="ACTIVE_VCS_NAME" />
    <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
    <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
    <option name="UPDATE_FILTER_BY_SCOPE" value="false" />
    <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
    <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
    <MESSAGE value="First commit - adding Silex web app" />
    <MESSAGE value="First If statement and header message change" />
    <MESSAGE value="Contoller fixes" />
    <MESSAGE value="Power calculation input" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/src/controllers.php">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
          <folding>
            <element signature="e#105#142#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/resources/views/index.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state line="5" column="20" selection-start="105" selection-end="105" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/controllers.php">
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
          <folding>
            <element signature="e#105#142#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/resources/views/index.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state line="5" column="20" selection-start="105" selection-end="105" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf">
      <provider selected="true" editor-type-id="text-editor">
        <state line="73" column="53" selection-start="3317" selection-end="3317" vertical-scroll-proportion="0.6452206" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.gitignore">
      <provider selected="true" editor-type-id="text-editor">
        <state line="5" column="6" selection-start="80" selection-end="80" vertical-scroll-proportion="0.15178572" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/app.php">
      <provider selected="true" editor-type-id="text-editor">
        <state line="61" column="30" selection-start="2149" selection-end="2149" vertical-scroll-proportion="0.36090225" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/resources/views/index.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state line="5" column="20" selection-start="105" selection-end="105" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/resources/config/dev.php">
      <provider selected="true" editor-type-id="text-editor">
        <state line="6" column="21" selection-start="117" selection-end="117" vertical-scroll-proportion="0.19101124">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/resources/views/form.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state line="3" column="19" selection-start="79" selection-end="79" vertical-scroll-proportion="-1.9615384">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/resources/views/display.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state line="15" column="14" selection-start="382" selection-end="382" vertical-scroll-proportion="-9.807693">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/web/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state line="6" column="41" selection-start="130" selection-end="130" vertical-scroll-proportion="-3.9230769">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/controllers.php">
      <provider selected="true" editor-type-id="text-editor">
        <state line="176" column="8" selection-start="6322" selection-end="6322" vertical-scroll-proportion="4.150289">
          <folding>
            <element signature="e#105#142#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
<?xml version="1.0"?>
<scpd xmlns="urn:Belkin:service-1-0">

  <specVersion>
    <major>1</major>
    <minor>0</minor>
  </specVersion>

  <actionList>

    <action>
      <name>SetBinaryState</name>
      <argumentList>
         <argument>
           <retval />
           <name>BinaryState</name>
           <relatedStateVariable>BinaryState</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>

    <action>
      <name>SetLogLevelOption</name>
      <argumentList>
         <argument>
           <retval />
           <name>Level</name>
           <relatedStateVariable>Level</relatedStateVariable>
           <direction>in</direction>
          </argument>
         <argument>
           <retval />
           <name>Option</name>
           <relatedStateVariable>Option</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>

    <action>
      <name>GetFriendlyName</name>
  	  <argumentList>
      <argument>
      <retval />
      <name>FriendlyName</name>
      <relatedStateVariable>FriendlyName</relatedStateVariable>
      <direction>in</direction>
       </argument>
       </argumentList>
    </action>
    <action>
      <name>ReSetup</name>
      <argumentList>
         <argument>
           <retval />
           <name>Reset</name>
           <relatedStateVariable>Reset</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>
	<action>
      <name>SetHomeId</name>
      <argumentList>
         <argument>
           <retval />
           <name>SetHomeId</name>
           <relatedStateVariable>HomeId</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>
	<action>
      <name>GetHomeId</name>
    </action>
	<action>
      <name>SetDeviceId</name>
      <argumentList>
         <argument>
           <retval />
           <name>SetDeviceId</name>
           <relatedStateVariable>DeviceId</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>
    <action>
      <name>GetDeviceId</name>
    </action>
	 <action>
      <name>GetMacAddr</name>
    </action>
    <action>
      <name>GetSerialNo</name>
    </action>
    <action>
      <name>GetPluginUDN</name>
    </action>
    <action>
      <name>GetSmartDevInfo</name>
    </action>
    <action>
      <name>ShareHWInfo</name>
      <argumentList>
         <argument>
           <retval />
           <name>Mac</name>
           <relatedStateVariable>Mac</relatedStateVariable>
           <direction>in</direction>
          </argument>
         <argument>
           <retval />
           <name>Serial</name>
           <relatedStateVariable>Serial</relatedStateVariable>
           <direction>in</direction>
          </argument>
         <argument>
           <retval />
           <name>Udn</name>
           <relatedStateVariable>Udn</relatedStateVariable>
           <direction>in</direction>
          </argument>
         <argument>
           <retval />
           <name>RestoreState</name>
           <relatedStateVariable>RestoreState</relatedStateVariable>
           <direction>in</direction>
          </argument>
         <argument>
           <retval />
           <name>HomeId</name>
           <relatedStateVariable>HomeId</relatedStateVariable>
           <direction>in</direction>
          </argument>
         <argument>
           <retval />
           <name>PluginKey</name>
           <relatedStateVariable>PluginKey</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>
    <action>
      <name>ChangeFriendlyName</name>
      <argumentList>
         <argument>
           <retval />
           <name>FriendlyName</name>
           <relatedStateVariable>FriendlyName</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>

    <action>
      <name>SetSmartDevInfo</name>
      <argumentList>
         <argument>
           <retval />
           <name>SmartDevURL</name>
           <relatedStateVariable>SmartDevURL</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>
	<action>
      <name>GetRuleOverrideStatus</name>
      <argumentList>
         <argument>
           <retval />
           <name>RuleOverrideStatus</name>
           <relatedStateVariable>RuleOverrideStatus</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>

	<action>
      <name>GetDeviceIcon</name>
      <argumentList>
         <argument>
           <retval />
           <name>DeviceIcon</name>
           <relatedStateVariable>DeviceIcon</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>

	<action>
      <name>GetIconURL</name>
      <argumentList>
      <argument>
      <retval />
	<name>URL</name>
	<relatedStateVariable>URL</relatedStateVariable>
	<direction>out</direction>
	</argument>
      </argumentList>
    </action>

	<action>
      <name>GetLogFileURL</name>
      <argumentList>
      <argument>
      <retval />
	<name>LOGURL</name>
	<relatedStateVariable>LOGURL</relatedStateVariable>
	<direction>out</direction>
	</argument>
      </argumentList>
    </action>

	<action>
      <name>ChangeDeviceIcon</name>
      <argumentList>
         <argument>
           <retval />
           <name>PictureSize</name>
           <relatedStateVariable>PictureSize</relatedStateVariable>
           <direction>in</direction>
          </argument>
		  <argument>
           <retval />
           <name>PictureHeight</name>
           <relatedStateVariable>PictureWidth</relatedStateVariable>
           <direction>in</direction>
          </argument>

		  <argument>
           <retval />
           <name>PictureColorDeep</name>
           <relatedStateVariable>PictureColorDeep</relatedStateVariable>
           <direction>in</direction>
          </argument>
      </argumentList>
    </action>

    <action>
    <name>GetBinaryState</name>
    <argumentList>
    <argument>
    <retval/>
    <name>BinaryState</name>
    <relatedStateVariable>BinaryState</relatedStateVariable>
    <direction>out</direction>
    </argument>
    </argumentList>
    </action>

	<action>
      <name>SetMultiState</name>
      <argumentList>
         <argument>
           <retval />
           <name>state</name>
           <relatedStateVariable>StateList</relatedStateVariable>
           <direction>in</direction>
          </argument>

		  <argument>
           <retval />
           <name>state</name>
           <relatedStateVariable>StateList</relatedStateVariable>
           <direction>in</direction>
          </argument>

         <argument>
           <retval />
           <name>state</name>
           <relatedStateVariable>StateList</relatedStateVariable>
           <direction>in</direction>
          </argument>

      </argumentList>
    </action>

    <action>
      <name>GetWatchdogFile</name>
      <argumentList>
        <argument>
          <retval />
            <name>WDFile</name>
            <relatedStateVariable>WDFile</relatedStateVariable>
            <direction>out</direction>
        </argument>
      </argumentList>
    </action>

    <action>
      <name>GetSignalStrength</name>
      <argumentList>
        <argument>
          <retval />
            <name>SignalStrength</name>
            <relatedStateVariable>SignalStrength</relatedStateVariable>
            <direction>in</direction>
        </argument>
      </argumentList>
    </action>

    <action>
      <name>SetServerEnvironment</name>
      <argumentList>
        <argument>
          <retval />
            <name>ServerEnvironment</name>
            <relatedStateVariable>ServerEnvironment</relatedStateVariable>
            <direction>in</direction>
        </argument>
        <argument>
          <retval />
            <name>TurnServerEnvironment</name>
            <relatedStateVariable>TurnServerEnvironment</relatedStateVariable>
            <direction>in</direction>
        </argument>
	<argument>
          <retval />
            <name>ServerEnvironmentType</name>
            <relatedStateVariable>ServerEnvironmentType</relatedStateVariable>
            <direction>in</direction>
        </argument>
      </argumentList>
    </action>

    <action>
      <name>GetServerEnvironment</name>
      <argumentList>
        <argument>
          <retval/>
            <name>ServerEnvironment</name>
            <relatedStateVariable>ServerEnvironment</relatedStateVariable>
            <direction>out</direction>
        </argument>
        <argument>
          <retval/>
            <name>TurnServerEnvironment</name>
            <relatedStateVariable>TurnServerEnvironment</relatedStateVariable>
            <direction>out</direction>
        </argument>
        <argument>
          <retval/>
            <name>ServerEnvironmentType</name>
            <relatedStateVariable>ServerEnvironmentType</relatedStateVariable>
            <direction>out</direction>
        </argument>
      </argumentList>
    </action>

</actionList>

  <serviceStateTable>

    <stateVariable sendEvents="yes">
      <name>BinaryState</name>
      <dataType>Boolean</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

    <stateVariable sendEvents="yes">
      <name>level</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

    <stateVariable sendEvents="yes">
      <name>option</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

	<stateVariable sendEvents="yes">
      <name>Reset</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>

    </stateVariable>
	<stateVariable sendEvents="yes">
      <name>FriendlyName</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

	<stateVariable sendEvents="yes">
      <name>HomeId</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>
	<stateVariable sendEvents="yes">
      <name>DeviceId</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>
	<stateVariable sendEvents="yes">
      <name>SmartDevInfo</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>
	<stateVariable sendEvents="yes">
      <name>MacAddr</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>
	<stateVariable sendEvents="yes">
      <name>SerialNo</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

	<stateVariable sendEvents="yes">
      <name>PluginUDN</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>
	<stateVariable sendEvents="yes">
      <name>DeviceIcon</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

    <stateVariable sendEvents="No">
      <name>StateList</name>
      <dataType>list</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>
  <stateVariable sendEvents="yes">
      <name>URL</name>
	  <dataType>string</dataType>
	  <defaultValue>0</defaultValue>
  </stateVariable>

	<stateVariable sendEvents="yes">
      <name>RuleOverrideStatus</name>
	  <dataType>string</dataType>
	  <defaultValue>0</defaultValue>
  </stateVariable>

    <stateVariable sendEvents="yes">
      <name>WDFile</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

    <stateVariable sendEvents="yes">
      <name>SignalStrength</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

    <stateVariable sendEvents="yes">
      <name>ServerEnvironment</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

    <stateVariable sendEvents="yes">
      <name>TurnServerEnvironment</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

  <stateVariable sendEvents="yes">
      <name>ServerEnvironmentType</name>
      <dataType>string</dataType>
      <defaultValue>0</defaultValue>
    </stateVariable>

  </serviceStateTable>

  </scpd>


text:
<!DOCTYPE html>

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

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

        <canvas id="SteamFightCanvas" width="640" height="480" style="border:1px solid #000000;">
        </canvas>

        <audio autostart="false" id="gong">
          <source id="GongOgg" src="audio/GONG.ogg" type="audio/ogg">
          <source id="GongMp3" src="audio/GONG.mp3" type="audio/mp3">
          Your browser sucks a sack of dicks (also doesn't support audios
        </audio>

        <image class="HiddenImage" id="SplashImage" src="img/splash.png">
        <image class="HiddenImage" id="NullImage" src="img/null.png">
        <image class="HiddenImage" id="GreenBeamImage" src="img/greenBeam.png">
        <image class="HiddenImage" id="RedBeamImage" src="img/redBeam.png">
        <image class="HiddenImage" id="LightningImage" src="img/lightning.png">

        <form>
           Player 1 Steam ID: <input type="text" name="player1id" id="player1id">

           Player 2 Steam ID: <input type="text" name="player2id" id="player2id">

           <button type="button" id="FightButton">FIGHT!</button>
        </form>


text:
//-----------------------------------------------------------------------
// <copyright file="SitecoreItemManager.cs" company="Sitecore Corporation">
//     Copyright (c) Sitecore Corporation 1999-2015
// </copyright>
// <summary>Defines the SitecoreItemManager class.</summary>
//-----------------------------------------------------------------------
// Copyright 2015 Sitecore Corporation A/S
// 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.
// -------------------------------------------------------------------------------------------

namespace Sitecore.Commerce.Storefront.Managers
{
    using System;
    using Sitecore.Data;
    using Sitecore.Data.Items;

    /// <summary>
    /// SitecoreItemManager class
    /// </summary>
    public class SitecoreItemManager
    {
        private static SitecoreItemManager _sitecoreItemManager;

        /// <summary>
        /// Instances this instance.
        /// </summary>
        /// <returns>Sitecore item manager</returns>
        public static SitecoreItemManager Instance()
        {
            return _sitecoreItemManager ?? (_sitecoreItemManager = new SitecoreItemManager());
        }

        /// <summary>
        /// Gets the item.
        /// </summary>
        /// <param name="itemIdOrPath">The item identifier or path.</param>
        /// <returns>The item</returns>
        public Item GetItem(string itemIdOrPath)
        {
            Guid itemGuid;
            return Guid.TryParse(itemIdOrPath, out itemGuid) ? Context.Database.GetItem(ID.Parse(itemGuid)) : Context.Database.GetItem(itemIdOrPath);
        }

        /// <summary>
        /// Gets the item.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="itemIdOrPath">The item identifier or path.</param>
        /// <returns>The item</returns>
        public T GetItem<T>(string itemIdOrPath)
        {
            Item item = GetItem(itemIdOrPath);
            var sitecoreItem = (T)Activator.CreateInstance(typeof(T), item);
            return sitecoreItem;
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jekyll-Uno</title>
    <description>Jekyll-Uno - a minimal, responsive theme for Jekyll</description>
    <link>http://joshgerdes.com/jekyll-uno/jekyll-uno//</link>
    <atom:link href="http://joshgerdes.com/jekyll-uno/jekyll-uno//feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Thu, 21 Jan 2016 23:08:06 +0800</pubDate>
    <lastBuildDate>Thu, 21 Jan 2016 23:08:06 +0800</lastBuildDate>
    <generator>Jekyll v3.0.2</generator>

      <item>
        <title>Welcome to Jekyll!</title>
        <description>
You'll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve --watch, which launches a web server and auto-regenerates your site when a file is updated.

To add new posts, simply add a file in the _posts directory that follows the convention YYYY-MM-DD-name-of-post.ext and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.

Jekyll also offers powerful support for code snippets:

def print_hi(name)
  puts &quot;Hi, #{name}&quot;
end
print_hi(&#39;Tom&#39;)
#=&gt; prints &#39;Hi, Tom&#39; to STDOUT.

Check out the Jekyll docs for more info on how to get the most out of Jekyll. File all bugs/feature requests at Jekyll's GitHub repo. If you have questions, you can ask them on Jekyll's dedicated Help repository.

</description>
        <pubDate>Fri, 08 Jan 2016 23:04:23 +0800</pubDate>
        <link>http://joshgerdes.com/jekyll-uno/jekyll-uno//2016/welcome-to-jekyll/</link>
        <guid isPermaLink="true">http://joshgerdes.com/jekyll-uno/jekyll-uno//2016/welcome-to-jekyll/</guid>

        <category>jekyll</category>

        <category>jekyll</category>

        <category>update</category>

      </item>

  </channel>
</rss>


text:
package cs263w16;

import javax.ws.rs.*;
import javax.ws.rs.core.*;
import java.util.*;
import java.util.logging.*;
import com.google.appengine.api.datastore.*;
import com.google.appengine.api.memcache.*;

import javax.xml.bind.JAXBElement;

public class TaskDataResource {
  @Context
  UriInfo uriInfo;
  @Context
  Request request;
  String keyname;
  DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
  MemcacheService syncCache = MemcacheServiceFactory.getMemcacheService();

  public TaskDataResource(UriInfo uriInfo, Request request, String kname) {
    this.uriInfo = uriInfo;
    this.request = request;
    this.keyname = kname;
  }
  // for the browser
  @GET
  @Produces(MediaType.TEXT_XML)
  public TaskData getTaskDataHTML() {

    TaskData taskData;
    try{
      String result = (String)syncCache.get(KeyFactory.createKey("TaskData", keyname));
      if(result != null){
        taskData = new TaskData(keyname, result, new Date());
        return taskData;
      }
      Entity result2 = datastore.get(KeyFactory.createKey("TaskData", keyname));
      taskData = new TaskData((String)result2.getProperty("keyname"), (String)result2.getProperty("value"), (Date)result2.getProperty("date"));
      return taskData;
    }catch(EntityNotFoundException e){
      throw new RuntimeException("Get: TaskData with " + keyname +  " not found");

    }
  }
  // for the application
  @GET
  @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
  public TaskData getTaskData() {

    TaskData taskData;
    try{
      String result = (String)syncCache.get(KeyFactory.createKey("TaskData", keyname));
      if(result != null){
        taskData = new TaskData(keyname, result, new Date());
        return taskData;
      }
      Entity result2 = datastore.get(KeyFactory.createKey("TaskData", keyname));
      taskData = new TaskData((String)result2.getProperty("keyname"), (String)result2.getProperty("value"), (Date)result2.getProperty("date"));
      return taskData;
    }catch(EntityNotFoundException e){
      throw new RuntimeException("Get: TaskData with " + keyname +  " not found");

    }
  }

  @PUT
  @Consumes(MediaType.APPLICATION_XML)
  public Response putTaskData(String val) {
    Response res = null;

    try{
      Key task_key = KeyFactory.createKey("TaskData", keyname);
      Entity taskData = datastore.get(task_key);
      //updating the entity
      taskData.setProperty("value",val);
      datastore.put(taskData);
      //signal that we updated the entity
      res = Response.noContent().build();

    }catch(EntityNotFoundException e){
      Entity taskData = new Entity("TaskData",keyname);
      taskData.setProperty("value", val);
      taskData.setProperty("date",new Date());
      datastore.put(taskData);
      syncCache.put(keyname,val);
      //signal that we created the entity in the datastore
      res = Response.created(uriInfo.getAbsolutePath()).build();

    }

    return res;
  }

  @DELETE
  public void deleteIt() {

    //delete an entity from the datastore
    //just print a message upon exception (don't throw)
    try{

      Key task_key = KeyFactory.createKey("TaskData", keyname);
      datastore.delete(task_key);

    }catch(Exception e){
      System.out.println("Exception occured while deleting the the task data");

    }
  }

}


text:
<?php

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-genereated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class ExternalEventSourceFields extends AbstractEnum {

  const ID = 'id';
  const NAME = 'name';
  const SOURCE_TYPE = 'source_type';
  const EXTERNAL_EVENT_SOURCES = 'external_event_sources';

  public function getFieldTypes() {
    return array(
      'id' => 'string',
      'name' => 'string',
      'source_type' => 'string',
      'external_event_sources' => 'list<string>',
    );
  }
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.12.23 at 02:06:11 PM CET
//

package org.openntf.base.jaxb.dxl;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for viewbackground complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="viewbackground">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="imageref" type="{http://www.lotus.com/dxl}imageref" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="repeat" type="{http://www.lotus.com/dxl}cellbackground.repeats" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "viewbackground", namespace = "http://www.lotus.com/dxl", propOrder = {
    "imageref"
})
public class Viewbackground {

    protected Imageref imageref;
    @XmlAttribute
    protected CellbackgroundRepeats repeat;

    /**
     * Gets the value of the imageref property.
     *
     * @return
     *     possible object is
     *     {@link Imageref }
     *
     */
    public Imageref getImageref() {
        return imageref;
    }

    /**
     * Sets the value of the imageref property.
     *
     * @param value
     *     allowed object is
     *     {@link Imageref }
     *
     */
    public void setImageref(Imageref value) {
        this.imageref = value;
    }

    /**
     * Gets the value of the repeat property.
     *
     * @return
     *     possible object is
     *     {@link CellbackgroundRepeats }
     *
     */
    public CellbackgroundRepeats getRepeat() {
        return repeat;
    }

    /**
     * Sets the value of the repeat property.
     *
     * @param value
     *     allowed object is
     *     {@link CellbackgroundRepeats }
     *
     */
    public void setRepeat(CellbackgroundRepeats value) {
        this.repeat = value;
    }

}