text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameMenu : MonoBehaviour {

    [SerializeField]
    private Canvas m_gameMenuCanvas;

    private EventBus m_eventBus;
    private Dispatcher m_dispatcher;
    private Event nextEvent;

    private void Start()
    {
        m_eventBus = FindObjectOfType<EventBus>();
        m_dispatcher = GetComponent<Dispatcher>();
        nextEvent = null;
    }

    private void Update()
    {
        if(!m_dispatcher.IsEmpty())
        {
            Event evt = m_dispatcher.ReceiveEvent();
            if(evt.Name.Equals("Pause"))
            {
                OnPause();
            }
            if(evt.Name.Equals("Unpause"))
            {
                OnUnpause();
            }
        }
        if (nextEvent != null)
        {
            m_eventBus.TriggerEvent(nextEvent);
            nextEvent = null;
        }
    }

    private void OnPause()
    {
        m_gameMenuCanvas.enabled = true;
    }

    private void OnUnpause()
    {
        m_gameMenuCanvas.enabled = false;
    }

    public void OnRestartButton()
    {
        m_gameMenuCanvas.enabled = false;
        nextEvent = new Event("RestartButtonClicked");
    }

    public void OnExitMenuButton()
    {
        m_gameMenuCanvas.enabled = false;
        nextEvent = new Event("ExitMenuClicked");
    }
}


text:
use glib_ffi;

extern "C" {
    pub fn cairo_gobject_context_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_device_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_matrix_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_pattern_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_surface_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_rectangle_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_scaled_font_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_font_face_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_font_options_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_rectangle_int_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_region_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_status_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_content_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_operator_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_antialias_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_fill_rule_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_line_cap_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_line_join_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_text_cluster_flags_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_font_slant_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_font_weight_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_subpixel_order_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_hint_style_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_hint_metrics_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_font_type_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_path_data_type_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_device_type_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_surface_type_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_format_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_pattern_type_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_extend_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_filter_get_type() -> glib_ffi::GType;
    pub fn cairo_gobject_region_overlap_get_type() -> glib_ffi::GType;
}

redpajama_set_name: RedPajamaGithub


text:
package org.oliot.epcis.service.capture;

import javax.jws.WebService;

import org.oliot.model.epcis.EPCISDocumentType;
import org.oliot.model.epcis.EPCISMasterDataDocumentType;

@WebService(endpointInterface = "org.oliot.epcis.service.capture.CoreCaptureService")
public class SoapCaptureService implements CoreCaptureService {

	@Override
	public void capture(EPCISDocumentType epcisDocument) {
		CaptureService cs = new CaptureService();
		cs.capture(epcisDocument);
	}

	@Override
	public void capture(EPCISMasterDataDocumentType epcisMasterDataDocument) {
		CaptureService cs = new CaptureService();
		cs.capture(epcisMasterDataDocument);
	}

}


text:
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.content_public.browser;

import org.chromium.content.browser.ContentFeatureListImpl;

/**
 * Static public methods for ContentFeatureList.
 */
public class ContentFeatureList {
    private ContentFeatureList() {}

    /**
     * Returns whether the specified feature is enabled or not.
     *
     * @param featureName The name of the feature to query.
     * @return Whether the feature is enabled or not.
     */
    public static boolean isEnabled(String featureName) {
        return ContentFeatureListImpl.isEnabled(featureName);
    }

    // Alphabetical:
    public static final String BACKGROUND_MEDIA_RENDERER_HAS_MODERATE_BINDING =
            "BackgroundMediaRendererHasModerateBinding";

    public static final String SERVICE_GROUP_IMPORTANCE = "ServiceGroupImportance";

    public static final String WEB_NFC = "WebNFC";

    public static final String WEBXR_PERMISSIONS_API = "WebXrPermissionsApi";
}


text:
package io.github.tdhd.scalac

package object plugin {
  // FIXME: make this a list of types instead
  val symbols = List(
    "PackageDef",
    "ImplDef",
    "ClassDef",
    "ModuleDef",
    "ValOrDefDef",
    "ValDef",
    "DefDef",
    "TypeDef",
    "LabelDef",
    "ImportSelector",
    "Import",
    "Template",
    "Block",
    "CaseDef",
    "Alternative",
    "Star",
    "Bind",
    "UnApply",
    "Function",
    "Assign",
    "AssignOrNamedArg",
    "If",
    "Match",
    "Return",
    "Try",
    "Throw",
    "New",
    "Typed",
    "GenericApply",
    "TypeApply",
    "Apply",
    "Super",
    "This",
    "Select",
    "Ident",
    "Literal",
    "Annotated",
    "SingletonTypeTree",
    "SelectFromTypeTree",
    "CompoundTypeTree",
    "AppliedTypeTree",
    "TypeBoundsTree",
    "ExistentialTypeTree",
    "TypeTree",
    "TreeCopier",
    "Modifiers",
    "ModifiersCreator"
  )
  // inverted map
  val nameToCode = symbols.zipWithIndex.toMap
  val codeToName = nameToCode.map(_.swap)

  implicit class CodeToNameMapper(code: Int) {
    def toName = codeToName(code)
  }

  implicit class NameToCodeMapper(name: String) {
    def toCode = nameToCode.get(name)
  }
}


text:
require 'rubygems'
$:.unshift("../lib") # Give priority to the local install
require 'activesp'
require 'pp'

c = ActiveSP::Connection.new(YAML.load(File.read("config.yml")))

item = c.root / "Shared Documents" / "documentum.pdf"
p item
pp item.attributes
p item.attributes["Title"]
p item.attribute("Title")
p item.Title


text:
/**
 *
 */

package edu.wustl.common.querysuite;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;

import edu.common.dynamicextensions.domain.Attribute;
import edu.common.dynamicextensions.domain.DomainObjectFactory;
import edu.common.dynamicextensions.domain.Entity;
import edu.common.dynamicextensions.domain.databaseproperties.TableProperties;
import edu.common.dynamicextensions.domaininterface.AbstractAttributeInterface;
import edu.common.dynamicextensions.domaininterface.AttributeInterface;
import edu.common.dynamicextensions.domaininterface.EntityInterface;
import edu.common.dynamicextensions.domaininterface.databaseproperties.ColumnPropertiesInterface;
import edu.wustl.common.querysuite.factory.QueryObjectFactory;
import edu.wustl.common.querysuite.queryobject.ICondition;
import edu.wustl.common.querysuite.queryobject.IExpression;
import edu.wustl.common.querysuite.queryobject.IQueryEntity;
import edu.wustl.common.querysuite.queryobject.IRule;
import edu.wustl.common.querysuite.queryobject.RelationalOperator;
import edu.wustl.common.querysuite.queryobject.impl.Expression;

/**
 * @author prafull_kadam
 * To create Queries on Dummy entity data.
 * It does not use Entity Manager, Test queries on dummy Entity.
 * Specifically designed to create entities & queries objects of each data type with possible operators.

 */
public class GenericQueryGeneratorMock
{

	private static DomainObjectFactory factory = DomainObjectFactory.getInstance();

	/**
	 * To create one dummy entity.
	 * @param name Name of the Entity.
	 * @return The entity.
	 */
	public static EntityInterface createEntity(String name)
	{
		EntityInterface e = factory.createEntity();
		e.setName(name);
		e.setCreatedDate(new Date());
		e.setDescription("This is a Dummy entity");
		e.setId(1L);
		e.setLastUpdated(new Date());

		((Entity) e).setAbstractAttributeCollection(getAttributes(e));

		TableProperties tableProperties = new TableProperties();
		tableProperties.setName("catissue_temp");
		tableProperties.setId(1L);
		((Entity) e).setTableProperties(tableProperties);
		return e;
	}

	/**
	 * TO create attribute list, which contains all types of attributes.
	 * @param entity the entity to which all attributes belongs.
	 * @return list of attributes.
	 */
	public static ArrayList<AbstractAttributeInterface> getAttributes(EntityInterface entity)
	{
		ArrayList<AbstractAttributeInterface> attributes = new ArrayList<AbstractAttributeInterface>();

		AttributeInterface att1 = factory.createIntegerAttribute();
		att1.setName("long");
		ColumnPropertiesInterface c1 = factory.createColumnProperties();
		c1.setName("LONG_ATTRIBUTE");
		((Attribute) att1).setColumnProperties(c1);
		att1.setIsPrimaryKey(true);
		att1.setEntity(entity);

		AttributeInterface att2 = factory.createDateAttribute();
		att2.setName("date");
		ColumnPropertiesInterface c2 = factory.createColumnProperties();
		c2.setName("DATE_ATTRIBUTE");
		((Attribute) att2).setColumnProperties(c2);
		att2.setEntity(entity);

		AttributeInterface att3 = factory.createLongAttribute();
		att3.setName("int");
		ColumnPropertiesInterface c3 = factory.createColumnProperties();
		c3.setName("INT_ATTRIBUTE");
		((Attribute) att3).setColumnProperties(c3);
		att3.setEntity(entity);

		AttributeInterface att4 = factory.createStringAttribute();
		att4.setName("string");
		ColumnPropertiesInterface c4 = factory.createColumnProperties();
		c4.setName("STRING_ATTRIBUTE");
		((Attribute) att4).setColumnProperties(c4);
		att4.setEntity(entity);

		AttributeInterface att5 = factory.createBooleanAttribute();
		att5.setName("boolean");
		ColumnPropertiesInterface c5 = factory.createColumnProperties();
		c5.setName("BOOLEAN_ATTRIBUTE");
		((Attribute) att5).setColumnProperties(c5);
		att5.setEntity(entity);

		AttributeInterface att6 = factory.createDoubleAttribute();
		att6.setName("double");
		ColumnPropertiesInterface c6 = factory.createColumnProperties();
		c6.setName("DOUBLE_ATTRIBUTE");
		((Attribute) att6).setColumnProperties(c6);
		att6.setEntity(entity);

		AttributeInterface att7 = factory.createFloatAttribute();
		att7.setName("float");
		att7.setEntity(entity);

		ColumnPropertiesInterface c7 = factory.createColumnProperties();
		c7.setName("FLOAT_ATTRIBUTE");
		((Attribute) att7).setColumnProperties(c7);
		(att7).setIsPrimaryKey(new Boolean(true));

		attributes.add(0, att1);
		attributes.add(1, att2);
		attributes.add(2, att3);
		attributes.add(3, att4);
		attributes.add(4, att5);
		attributes.add(5, att6);
		attributes.add(6, att7);

		return attributes;
	}

	/**
	 * To create expression for Dummy entity. with rule as [name in (1,2,3,4)]
	 * @return the Expression.
	 */
	public static IExpression createExpression(EntityInterface entity)
	{
		IQueryEntity queryEntity = QueryObjectFactory.createQueryEntity(entity);

		IExpression expression = new Expression(queryEntity, 1);
		expression.addOperand(createRule(queryEntity.getDynamicExtensionsEntity(), "int"));
		return expression;
	}

	/**
	 * Create Rule for given Participant as : name in (1,2,3,4)
	 * @param entity The Dynamic Extension Entity Participant
	 * @return The Rule Object.
	 */
	public static IRule createRule(EntityInterface entity, String name)
	{
		List<ICondition> conditions = new ArrayList<ICondition>();
		conditions.add(createInCondition(entity, name));
		IRule rule = QueryObjectFactory.createRule(conditions);
		return rule;
	}

	/**
	 * Cretate Condition for given entity & attributeName : name in (1,2,3,4)
	 * @param entity The Dynamic Extension Entity
	 * @return The Condition object.
	 */
	public static ICondition createInCondition(EntityInterface entity, String name)
	{
		List<String> values = new ArrayList<String>();
		values.add("1");
		values.add("2");
		values.add("3");
		values.add("4");
		AttributeInterface attribute = findAttribute(entity, name);
		ICondition condition = QueryObjectFactory.createCondition(attribute, RelationalOperator.In,
				values);
		return condition;
	}

	/**
	 * To search attribute in the Entity.
	 * @param entity The Dynamic Extension Entity Participant.
	 * @param attributeName The name of the attribute to search.
	 * @return The corresponding attribute.
	 */
	public static AttributeInterface findAttribute(EntityInterface entity, String attributeName)
	{
		Collection<AbstractAttributeInterface> attributes = entity.getAbstractAttributeCollection();
		for (AbstractAttributeInterface attribute: attributes)
		{
			if (attribute.getName().equals(attributeName))
				return (AttributeInterface)attribute;
		}
		return null;
	}
}


text:
Project Form

  <form name="$ctrl.form">

    <loader active="$ctrl.loading">

        Title
        <input class="form-control" ng-model="$ctrl.project.title" />
        {{ error }}

        Description
        <textarea class="form-control" ng-model="$ctrl.project.description"></textarea>
        {{ error }}

        Start Date

          <input type="text" class="form-control" ng-model="$ctrl.project.start_date" alt-input-formats="['yyyy-MM-dd']" uib-datepicker-popup="yyyy-MM-dd" is-open="$ctrl.datePickers.startDate.opened" close-text="Close" />

            <button type="button" class="btn btn-default" ng-click="$ctrl.datePickers.startDate.open()"></button>

        {{ error }}

        End Date

          <input type="text" class="form-control" ng-model="$ctrl.project.end_date" alt-input-formats="['yyyy-MM-dd']" uib-datepicker-popup="yyyy-MM-dd" is-open="$ctrl.datePickers.endDate.opened" close-text="Close" />

            <button type="button" class="btn btn-default" ng-click="$ctrl.datePickers.endDate.open()"></button>

        {{ error }}

        Active

            False
            True

        {{ error }}

        Billable

            False
            True

        {{ error }}

      <button class="btn btn-primary btn-block" ng-click="$ctrl.save()">Submit</button>
    </loader>
  </form>


text:
<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;

/**
 * Player
 *
 * @ORM\Table(name="player")
 * @ORM\Entity(repositoryClass="AppBundle\Repository\PlayerRepository")
 * @ExclusionPolicy("all")
 */
class Player implements UserInterface
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=25, unique=true)
     * @Expose
     */
    private $username;

    /**
     * @ORM\Column(type="string", length=500, nullable=true)
     */
    private $password;

    /**
     * @ORM\Column(name="is_active", type="boolean")
     */
    private $isActive;

    /**
     * @ORM\OneToMany(targetEntity="GameSet", mappedBy="owner")
     */
    private $gamesets;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set username
     *
     * @param string $username
     *
     * @return Player
     */
    public function setUsername($username)
    {
        $this->username = $username;

        return $this;
    }

    /**
     * Get username
     *
     * @return string
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * Set password
     *
     * @param string $password
     *
     * @return Player
     */
    public function setPassword($password)
    {
        $this->password = $password;

        return $this;
    }

    /**
     * Get password
     *
     * @return string
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * Set isActive
     *
     * @param boolean $isActive
     *
     * @return Player
     */
    public function setIsActive($isActive)
    {
        $this->isActive = $isActive;

        return $this;
    }

    /**
     * Get isActive
     *
     * @return boolean
     */
    public function getIsActive()
    {
        return $this->isActive;
    }

    /**
     * Returns the roles granted to the user.
     *
     * <code>
     * public function getRoles()
     * {
     *     return array('ROLE_USER');
     * }
     * </code>
     *
     * Alternatively, the roles might be stored on a ``roles`` property,
     * and populated in any number of different ways when the user object
     * is created.
     * @return string[] The user roles
     */
    public function getRoles()
    {
        return array('ROLE_USER');
    }

    /**
     * Returns the salt that was originally used to encode the password.
     *
     * This can return null if the password was not encoded using a salt.
     *
     * @return string|null The salt
     */
    public function getSalt()
    {
        return null;
    }

    /**
     * Removes sensitive data from the user.
     *
     * This is important if, at any given point, sensitive information like
     * the plain-text password is stored on this object.
     */
    public function eraseCredentials()
    {
        return null;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->gamesets = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add gameset
     *
     * @param \AppBundle\Entity\GameSet $gameset
     *
     * @return Player
     */
    public function addGameset(\AppBundle\Entity\GameSet $gameset)
    {
        $this->gamesets[] = $gameset;

        return $this;
    }

    /**
     * Remove gameset
     *
     * @param \AppBundle\Entity\GameSet $gameset
     */
    public function removeGameset(\AppBundle\Entity\GameSet $gameset)
    {
        $this->gamesets->removeElement($gameset);
    }

    /**
     * Get gamesets
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getGamesets()
    {
        return $this->gamesets;
    }
}


text:
package com.tqmars.cardrecycle.application.admin.withdraw;

import com.tqmars.cardrecycle.application.admin.withdraw.dto.DealwithWithdrawApplyInput;
import com.tqmars.cardrecycle.application.admin.withdraw.dto.QueryWithdrawRecordInput;

/**
 * Created by jjh on 1/19/17.
 */
public interface IAdminWithdrawAppService {
    String queryWithdrawRecord(QueryWithdrawRecordInput input);
    String dealwithWithdrawApply(DealwithWithdrawApplyInput input);

}


text:
package com.vtence.molecule.lib.matchers;

import org.junit.Test;

import static com.vtence.molecule.lib.matchers.StartingWith.startingWith;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

public class AllOfTest {

    @SuppressWarnings("unchecked") @Test public void
    evaluatesToLogicalConjunctionOfMultipleMatchers() {
        Matcher<String> allOf = AllOf.allOf(startingWith("one"),
                startingWith("one two"), startingWith("one two three"));

        assertThat("all match", allOf.matches("one two three"), is(true));
        assertThat("one miss", !allOf.matches("one two two"), is(true));
    }

    @SuppressWarnings("unchecked") @Test public void
    matchesDescendantType() {
        Matcher<String> allOf = AllOf.allOf(startingWith("good"), new Anything<Object>());

        assertThat("matches", allOf.matches("good"), is(true));
    }

    @Test public void
    suppressCoverageNoise() {
        new Matchers();
    }
}


text:
var config = require('laravel-elixir').config;
var Notification = require('./Notification');
var plugins = require('gulp-load-plugins')();
var utilities = require('./Utilities');
var merge = require('merge-stream');
var gulp = require('gulp');

/**
 * Trigger preprocessor compilation.
 *
 * @param {mixed}  src
 * @param {object} options
 */
var triggerCompiler = function(src, options) {
    var compiler = plugins[options.plugin];
    var pluginOptions = options.pluginOptions;
    var toMaps = plugins.if(
        config.sourcemaps, plugins.sourcemaps.init()
    );

    // If we're using the Ruby version of Sass, then we need to
    // trigger the Gulp task in a slightly different manner.

    if (options.plugin == 'gulp-ruby-sass') {
        var rubySass = require('gulp-ruby-sass')(src, pluginOptions);

        stream = rubySass.pipe(toMaps);
    } else {
        stream = gulp.src(src).pipe(toMaps).pipe(compiler(pluginOptions));
    }

    return stream.on('error', function(e) {
        var message = options.compiler + ' Compilation Failed!';

        new Notification().error(e, message);

        this.emit('end');
    });
};

/**
 * Build the Gulp task.
 *
 * @param {string} name
 * @param {string} watchPath
 */
var buildTask = function(name, watchPath) {
    gulp.task(name, function() {
        return merge.apply(this, config.compile[name].map(function(compile) {
            var src = compile.src;
            var options = compile.options;

            utilities.logTask("Running " + options.compiler, src);

            return triggerCompiler(src, options)
                .pipe(plugins.if(config.autoprefix, plugins.autoprefixer()))
                .pipe(plugins.if(config.production, plugins.minifyCss()))
                .pipe(plugins.if(config.sourcemaps, plugins.sourcemaps.write('.')))
                .pipe(gulp.dest(options.output || config.cssOutput))
                .pipe(new Notification().message(options.compiler + ' Compiled!'));
        }));
    });

    return config
        .registerWatcher(name, watchPath)
        .queueTask(name);
};

module.exports = function(options) {
    var name = options.compiler.toLowerCase();
    var dir = config.assetsDir + name;
    var src = utilities.buildGulpSrc(options.src, dir, options.search);
    var watchPath = dir + '/' + options.search;

    config.compile[name] = config.compile[name] || [];
    config.compile[name].push({ src: src, options: options });

    return buildTask(name, watchPath);
};


text:
import os
from setuptools import setup

README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
    name='djamin',
    version='0.1',
    packages=['djamin'],
    include_package_data=True,
    license='MIT License',
    description='A new style for Django admin.',
    long_description=README,
    url='https://github.com/hersonls/djamin',
    author='Herson Leite',
    author_email='hersonls@gmail.com',
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ]
)


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gnupg-clearencryptkeys">
 <refnamediv>
  <refname>gnupg_clearencryptkeys</refname>
  <refpurpose>Removes all keys which were set for encryption before</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>gnupg_clearencryptkeys</methodname>
   <methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
  </methodsynopsis>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>identifier</parameter></term>
     <listitem>
      &gnupg.identifier;
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>Procedural <function>gnupg_clearencryptkeys</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
$res = gnupg_init();
gnupg_clearencryptkeys($res);
?>
]]>
    </programlisting>
   </example>
   <example>
    <title>OO <function>gnupg_clearencryptkeys</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
$gpg = new gnupg();
$gpg -> clearencryptkeys();
?>
]]>
    </programlisting>
   </example>
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
layout: post
title: Page not found
---

Oh, snap! Looks like this page doesn't exist


text:
using System;
using System.Collections.Generic;
using System.Xml.Linq;
using RestSharp.Deserializers;
using RestSharp.Tests.SampleClasses.Lastfm;
using Xunit;

namespace RestSharp.Tests
{
    public class NamespacedXmlTests
    {
        private const string GuidString = "AC1FC4BC-087A-4242-B8EE-C53EBE9887A5";

        [Fact]
        public void Can_Deserialize_Elements_With_Namespace()
        {
            var doc = CreateElementsXml();
            var response = new RestResponse { Content = doc };
            var d = new XmlDeserializer();

            d.Namespace = "http://restsharp.org";

            var p = d.Deserialize<PersonForXml>(response);

            Assert.Equal("John Sheehan", p.Name);
            Assert.Equal(new DateTime(2009, 9, 25, 0, 6, 1), p.StartDate);
            Assert.Equal(28, p.Age);
            Assert.Equal(long.MaxValue, p.BigNumber);
            Assert.Equal(99.9999m, p.Percent);
            Assert.Equal(false, p.IsCool);
            Assert.Equal(new Guid(GuidString), p.UniqueId);
            Assert.Equal(new Uri("http://example.com", UriKind.RelativeOrAbsolute), p.Url);
            Assert.Equal(new Uri("/foo/bar", UriKind.RelativeOrAbsolute), p.UrlPath);
            Assert.NotNull(p.Friends);
            Assert.Equal(10, p.Friends.Count);
            Assert.NotNull(p.BestFriend);
            Assert.Equal("The Fonz", p.BestFriend.Name);
            Assert.Equal(1952, p.BestFriend.Since);
        }

        [Fact]
        public void Can_Deserialize_Elements_With_Namespace_Autodetect_Namespace()
        {
            var doc = CreateElementsXml();
            var response = new RestResponse { Content = doc };
            var d = new XmlDeserializer();
            var p = d.Deserialize<PersonForXml>(response);

            Assert.Equal("John Sheehan", p.Name);
            Assert.Equal(new DateTime(2009, 9, 25, 0, 6, 1), p.StartDate);
            Assert.Equal(28, p.Age);
            Assert.Equal(long.MaxValue, p.BigNumber);
            Assert.Equal(99.9999m, p.Percent);
            Assert.Equal(false, p.IsCool);
            Assert.Equal(new Guid(GuidString), p.UniqueId);
            Assert.Equal(new Uri("http://example.com", UriKind.RelativeOrAbsolute), p.Url);
            Assert.Equal(new Uri("/foo/bar", UriKind.RelativeOrAbsolute), p.UrlPath);
            Assert.NotNull(p.Friends);
            Assert.Equal(10, p.Friends.Count);
            Assert.NotNull(p.BestFriend);
            Assert.Equal("The Fonz", p.BestFriend.Name);
            Assert.Equal(1952, p.BestFriend.Since);
        }

        [Fact]
        public void Can_Deserialize_Attributes_With_Namespace()
        {
            var doc = CreateAttributesXml();
            var response = new RestResponse { Content = doc };
            var d = new XmlDeserializer();

            d.Namespace = "http://restsharp.org";

            var p = d.Deserialize<PersonForXml>(response);

            Assert.Equal("John Sheehan", p.Name);
            Assert.Equal(new DateTime(2009, 9, 25, 0, 6, 1), p.StartDate);
            Assert.Equal(28, p.Age);
            Assert.Equal(long.MaxValue, p.BigNumber);
            Assert.Equal(99.9999m, p.Percent);
            Assert.Equal(false, p.IsCool);
            Assert.Equal(new Guid(GuidString), p.UniqueId);
            Assert.Equal(new Uri("http://example.com", UriKind.RelativeOrAbsolute), p.Url);
            Assert.Equal(new Uri("/foo/bar", UriKind.RelativeOrAbsolute), p.UrlPath);
            Assert.NotNull(p.BestFriend);
            Assert.Equal("The Fonz", p.BestFriend.Name);
            Assert.Equal(1952, p.BestFriend.Since);
        }

        [Fact]
        public void Ignore_Protected_Property_That_Exists_In_Data()
        {
            var doc = CreateElementsXml();
            var response = new RestResponse { Content = doc };
            var d = new XmlDeserializer();

            d.Namespace = "http://restsharp.org";

            var p = d.Deserialize<PersonForXml>(response);

            Assert.Null(p.IgnoreProxy);
        }

        [Fact]
        public void Ignore_ReadOnly_Property_That_Exists_In_Data()
        {
            var doc = CreateElementsXml();
            var response = new RestResponse { Content = doc };
            var d = new XmlDeserializer();

            d.Namespace = "http://restsharp.org";

            var p = d.Deserialize<PersonForXml>(response);

            Assert.Null(p.ReadOnlyProxy);
        }

        [Fact]
        public void Can_Deserialize_Names_With_Underscores_With_Namespace()
        {
            var doc = CreateUnderscoresXml();
            var response = new RestResponse { Content = doc };
            var d = new XmlDeserializer();

            d.Namespace = "http://restsharp.org";

            var p = d.Deserialize<PersonForXml>(response);

            Assert.Equal("John Sheehan", p.Name);
            Assert.Equal(new DateTime(2009, 9, 25, 0, 6, 1), p.StartDate);
            Assert.Equal(28, p.Age);
            Assert.Equal(long.MaxValue, p.BigNumber);
            Assert.Equal(99.9999m, p.Percent);
            Assert.Equal(false, p.IsCool);
            Assert.Equal(new Guid(GuidString), p.UniqueId);
            Assert.Equal(new Uri("http://example.com", UriKind.RelativeOrAbsolute), p.Url);
            Assert.Equal(new Uri("/foo/bar", UriKind.RelativeOrAbsolute), p.UrlPath);
            Assert.NotNull(p.Friends);
            Assert.Equal(10, p.Friends.Count);
            Assert.NotNull(p.BestFriend);
            Assert.Equal("The Fonz", p.BestFriend.Name);
            Assert.Equal(1952, p.BestFriend.Since);
            Assert.NotNull(p.Foes);
            Assert.Equal(5, p.Foes.Count);
            Assert.Equal("Yankees", p.Foes.Team);
        }

        [Fact]
        public void Can_Deserialize_List_Of_Primitives_With_Namespace()
        {
            var doc = CreateListOfPrimitivesXml();
            var response = new RestResponse { Content = doc };
            var d = new XmlDeserializer();

            d.Namespace = "http://restsharp.org";

            var a = d.Deserialize<List<artist>>(response);

            Assert.Equal(2, a.Count);
            Assert.Equal("first", a[0].Value);
            Assert.Equal("second", a[1].Value);
        }

        private static string CreateListOfPrimitivesXml()
        {
            var doc = new XDocument();
            var ns = XNamespace.Get("http://restsharp.org");
            var root = new XElement(ns + "artists");

            root.Add(new XElement(ns + "artist", "first"));
            root.Add(new XElement(ns + "artist", "second"));
            doc.Add(root);

            return doc.ToString();
        }

        private static string CreateUnderscoresXml()
        {
            var doc = new XDocument();
            var ns = XNamespace.Get("http://restsharp.org");
            var root = new XElement(ns + "Person");

            root.Add(new XElement(ns + "Name", "John Sheehan"));
            root.Add(new XElement(ns + "Start_Date", new DateTime(2009, 9, 25, 0, 6, 1)));
            root.Add(new XAttribute(ns + "Age", 28));
            root.Add(new XElement(ns + "Percent", 99.9999m));
            root.Add(new XElement(ns + "Big_Number", long.MaxValue));
            root.Add(new XAttribute(ns + "Is_Cool", false));
            root.Add(new XElement(ns + "Ignore", "dummy"));
            root.Add(new XAttribute(ns + "Read_Only", "dummy"));
            root.Add(new XAttribute(ns + "Unique_Id", new Guid(GuidString)));
            root.Add(new XElement(ns + "Url", "http://example.com"));
            root.Add(new XElement(ns + "Url_Path", "/foo/bar"));
            root.Add(new XElement(ns + "Best_Friend",
                        new XElement(ns + "Name", "The Fonz"),
                        new XAttribute(ns + "Since", 1952)
                    ));

            var friends = new XElement(ns + "Friends");

            for (int i = 0; i < 10; i++)
            {
                friends.Add(new XElement(ns + "Friend",
                                new XElement(ns + "Name", "Friend" + i),
                                new XAttribute(ns + "Since", DateTime.Now.Year - i)
                            ));
            }

            root.Add(friends);

            var foes = new XElement(ns + "Foes");

            foes.Add(new XAttribute(ns + "Team", "Yankees"));

            for (int i = 0; i < 5; i++)
            {
                foes.Add(new XElement(ns + "Foe", new XElement(ns + "Nickname", "Foe" + i)));
            }

            root.Add(foes);
            doc.Add(root);

            return doc.ToString();
        }

        private static string CreateElementsXml()
        {
            var doc = new XDocument();
            var ns = XNamespace.Get("http://restsharp.org");
            var root = new XElement(ns + "Person");

            root.Add(new XElement(ns + "Name", "John Sheehan"));
            root.Add(new XElement(ns + "StartDate", new DateTime(2009, 9, 25, 0, 6, 1)));
            root.Add(new XElement(ns + "Age", 28));
            root.Add(new XElement(ns + "Percent", 99.9999m));
            root.Add(new XElement(ns + "BigNumber", long.MaxValue));
            root.Add(new XElement(ns + "IsCool", false));
            root.Add(new XElement(ns + "Ignore", "dummy"));
            root.Add(new XElement(ns + "ReadOnly", "dummy"));
            root.Add(new XElement(ns + "UniqueId", new Guid(GuidString)));
            root.Add(new XElement(ns + "Url", "http://example.com"));
            root.Add(new XElement(ns + "UrlPath", "/foo/bar"));
            root.Add(new XElement(ns + "BestFriend",
                        new XElement(ns + "Name", "The Fonz"),
                        new XElement(ns + "Since", 1952)
                    ));

            var friends = new XElement(ns + "Friends");

            for (int i = 0; i < 10; i++)
            {
                friends.Add(new XElement(ns + "Friend",
                                new XElement(ns + "Name", "Friend" + i),
                                new XElement(ns + "Since", DateTime.Now.Year - i)
                            ));
            }

            root.Add(friends);
            root.Add(new XElement(ns + "FavoriteBand",
                        new XElement(ns + "Name", "Goldfinger")
                    ));

            doc.Add(root);
            return doc.ToString();
        }

        private static string CreateAttributesXml()
        {
            var doc = new XDocument();
            var ns = XNamespace.Get("http://restsharp.org");
            var root = new XElement(ns + "Person");

            root.Add(new XAttribute(ns + "Name", "John Sheehan"));
            root.Add(new XAttribute(ns + "StartDate", new DateTime(2009, 9, 25, 0, 6, 1)));
            root.Add(new XAttribute(ns + "Age", 28));
            root.Add(new XAttribute(ns + "Percent", 99.9999m));
            root.Add(new XAttribute(ns + "BigNumber", long.MaxValue));
            root.Add(new XAttribute(ns + "IsCool", false));
            root.Add(new XAttribute(ns + "Ignore", "dummy"));
            root.Add(new XAttribute(ns + "ReadOnly", "dummy"));
            root.Add(new XAttribute(ns + "UniqueId", new Guid(GuidString)));
            root.Add(new XAttribute(ns + "Url", "http://example.com"));
            root.Add(new XAttribute(ns + "UrlPath", "/foo/bar"));
            root.Add(new XElement(ns + "BestFriend",
                        new XAttribute(ns + "Name", "The Fonz"),
                        new XAttribute(ns + "Since", 1952)
                    ));

            doc.Add(root);

            return doc.ToString();
        }
    }
}


text:
require 'active_model'

module ActiveModel
  module Validations
    class CreditCardValidator < ActiveModel::EachValidator
      def validate_each(object, attribute, value)
        unless luhn_valid?(value)
          object.errors[attribute] << (options[:message] || "is invalid")
        end
      end

      def luhn_valid?(card_number)
        digits = card_number.to_s.gsub(/D/, '').each_char.map(&:to_i).reverse
        flip = true

        digits.sum {|n| (flip ^= true) ? (n*2).divmod(10).sum() : n } % 10 == 0
      end
    end
    module ClassMethods
      def validates_credit_card(*attr_names)
        validates_with CreditCardValidator, _merge_attributes(attr_names)
      end
    end
  end
end


text:
package zlogger.logic.models;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "authorities", uniqueConstraints =
@UniqueConstraint(columnNames = {"username", "authority"}))
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class Authority implements Serializable {

    @Id
    @ManyToOne
    @JoinColumn(name = "username", nullable = false)
    private User username;

    @Column(name = "authority", nullable = false, length = 50)
    private String role;

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public User getUsername() {
        return username;
    }

    public void setUsername(User username) {
        this.username = username;
    }
}


text:
package com.pedrogomez.bowling;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

/**
 * Test created to check the correctness of ZeroFrameParser.
 *
 * @author Pedro Vicente Gómez Sánchez.
 */
public class ZeroFrameParserTest {

    private static final String VALID_ZERO_FRAME = "--";
    private static final String INVALID_ZERO_FRAME = "4-";

    private ZeroFrameParser zeroFrameParser;

    @Before
    public void setUp() {
        initializeStrikeFrameParser();
    }

    @Test
    public void shouldReturnStrikeFrame() {
        Frame result = zeroFrameParser.evaluate(VALID_ZERO_FRAME);

        assertTrue(result instanceof ZeroFrame);
    }

    @Test
    public void shouldReturnNullFrame() {
        Frame result = zeroFrameParser.evaluate(INVALID_ZERO_FRAME);

        assertNull(result);
    }

    private void initializeStrikeFrameParser() {
        zeroFrameParser = new ZeroFrameParser();
    }

}


text:
    <java-class-file name="D:\Experiments\Analisi di Sopravvivenza\Progetto16715\ProgettiDaAnalizzare\jhotdraw\JHotDraw 7.4.1\JHotDraw 7.4.1\Source\jhotdraw7\src\main\java\org\jhotdraw\draw\action\MoveAction.java">
        <package-decl name="org.jhotdraw.draw.action"/>
        <class name="MoveAction" visibility="public" abstract="true">
            <constructor visibility="public" name="MoveAction">
            </constructor>
            <method name="actionPerformed" visibility="public">
            </method>
            <class name="East" visibility="public" static="true">
                <constructor visibility="public" name="East">
                </constructor>
            </class>
            <class name="West" visibility="public" static="true">
                <constructor visibility="public" name="West">
                </constructor>
            </class>
            <class name="North" visibility="public" static="true">
                <constructor visibility="public" name="North">
                </constructor>
            </class>
            <class name="South" visibility="public" static="true">
                <constructor visibility="public" name="South">
                </constructor>
            </class>
        </class>
    </java-class-file>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IrcDotNet
{
    /// <summary>
    /// Represents an object that handles messages and notices received by an IRC client.
    /// </summary>
    internal interface IIrcMessageReceiveHandler
    {
        /// <summary>
        /// Handles the specified message that was received by the client.
        /// </summary>
        /// <param name="source">The source of the message.</param>
        /// <param name="targets">A collection of the target of the message.</param>
        /// <param name="text">The text of the message.</param>
        void HandleMessageReceived(IIrcMessageSource source, IList<IIrcMessageTarget> targets, string text);

        /// <summary>
        /// Handles the specified notice that was received by the client.
        /// </summary>
        /// <param name="source">The source of the notice.</param>
        /// <param name="targets">A collection of the target of the notice.</param>
        /// <param name="text">The text of the message.</param>
        void HandleNoticeReceived(IIrcMessageSource source, IList<IIrcMessageTarget> targets, string text);

    }
}


text:
from __future__ import absolute_import

import logging

from celery import Celery as CeleryApp
from uuid import uuid4

from .container import Container

class _Celery(object):
    def __init__(self, app, options):
        celery = CeleryApp(app.import_name, broker=app.config['CELERY_BROKER_URL'])
        celery.conf.update(app.config)
        TaskBase = celery.Task

        class ContextTask(TaskBase):
            abstract = True

            def __call__(self, *args, **kwargs):
                with app.app_context():
                    return TaskBase.__call__(self, *args, **kwargs)

        celery.Task = ContextTask

        self.app = app
        self.celery = celery
        self.tasks = {}
        self.logger = logging.getLogger(app.name + '.celery')

    def delay(self, name, args=None, kwargs=None, *fn_args, **fn_kwargs):
        # We don't assume the task is registered at this point, so manually
        # publish it
        self.logger.debug('Firing task %r args=%r kwargs=%r', name, args, kwargs)
        celery = self.celery
        if celery.conf.CELERY_ALWAYS_EAGER:
            task_id = uuid4()
            # we dont call out to delay() as it causes db rollbacks/etc
            celery.tasks[name].run(*args or (), **kwargs or {})
        else:
            with celery.producer_or_acquire() as P:
                task_id = P.publish_task(
                    task_name=name,
                    task_args=args,
                    task_kwargs=kwargs,
                    *fn_args, **fn_kwargs
                )
        return task_id

    def retry(self, name, *args, **kwargs):
        # unlike delay, we actually want to rely on Celery's retry logic
        # and because we can only execute this within a task, it's safe
        # to say that the task is actually registered
        kwargs.setdefault('throw', False)
        self.tasks[name].retry(*args, **kwargs)

    def get_task(self, name):
        return self.tasks[name]

    def register(self, name, func, **kwargs):
        # XXX(dcramer): hacky way to ensure the task gets registered so
        # celery knows how to execute it
        for key, value in self.app.config['CELERY_ROUTES'].get(name, {}).iteritems():
            kwargs.setdefault(key, value)

        self.tasks[name] = self.celery.task(func, name=name, **kwargs)

Celery = lambda **o: Container(_Celery, o, name='celery')


text:
var mongoose = require('mongoose'),
  Schema = mongoose.Schema;

var schema = new Schema({
  id:{type:String},
  date:{type:String},
  idCpu:{type:String},
  taux:{type:Number, min: 0, max: 1 000 000 }
});

// Nous exportons notre modèle avec comme nom "TauxDeCharge",
//'tauxDeCharge' sera le nom de notre "table"
exports.model = mongoose.model('TauxDeCharge', schema, 'tauxDeCharge');


text:
extern crate lazy_static;

extern crate rlibc;
extern crate spin;

extern crate console;

#[macro_use]
extern crate interrupts;
extern crate x86;
use x86::bits64::irq::IdtEntry;
use x86::shared::io::{inb};

use core::intrinsics;

extern crate keyboard;

extern crate pic;

#[cfg(not(test))]
pub mod panic;

#[macro_use]
extern crate intermezzos;

lazy_static! {
    static ref CONTEXT: intermezzos::kernel::Context = intermezzos::kernel::Context::new();
}

#[no_mangle]
pub extern "C" fn kmain() -> ! {
    pic::remap();

    let gpf = make_idt_entry!(isr13, {
        panic!("omg GPF");
    });

    // IRQ0 (0) on PIC1 (32), so IDT index is 32
    let timer = make_idt_entry!(isr32, {
        pic::eoi_for(32);
    });

    // Keyboard uses IRQ1 and PIC1 has been remapped to 0x20 (32); therefore
    // the index in the IDT for IRQ1 will be 32 + 1 = 33
    let keyboard = make_idt_entry!(isr33, {
        let scancode = unsafe { inb(0x60) };

        if let Some(c) = keyboard::from_scancode(scancode as usize) {
            kprint!(CONTEXT, "{}", c);
        }

        pic::eoi_for(33);
    });

    CONTEXT.idt.set_handler(13, gpf);
    CONTEXT.idt.set_handler(32, timer);
    CONTEXT.idt.set_handler(33, keyboard);

    CONTEXT.idt.enable_interrupts();

    kprintln!(CONTEXT, "Kernel initialized.");

    loop { }
}


text:
import { CommandName, Navigation, OptionsTopBarButton } from 'react-native-navigation';

Navigation.addOptionProcessor<OptionsTopBarButton>(
  'topBar.rightButtons',
  (rightButtons: OptionsTopBarButton[], commandName: CommandName): OptionsTopBarButton => {
    return rightButtons.map((button) => ({
      ...button,
      fontFamily: 'helvetica',
      fontSize: 16,
      color: 'red'
  }));
);


text:
using Util.Ui.Angular.Renders;
using Util.Ui.Builders;
using Util.Ui.Configs;
using Util.Ui.Material.Panels.Builders;

namespace Util.Ui.Material.Panels.Renders {
    /// <summary>
    /// 面板标题渲染器
    /// </summary>
    public class PanelTitleRender : AngularRenderBase {
        /// <summary>
        /// 初始化面板标题渲染器
        /// </summary>
        /// <param name="config">配置</param>
        public PanelTitleRender( IConfig config ) : base( config ) {
        }

        /// <summary>
        /// 获取标签生成器
        /// </summary>
        protected override TagBuilder GetTagBuilder() {
            var builder = new PanelTitleBuilder();
            Config( builder );
            return builder;
        }

        /// <summary>
        /// 配置
        /// </summary>
        protected void Config( TagBuilder builder ) {
            ConfigId( builder );
            ConfigContent( builder );
        }
    }
}


text:
module.exports = function (grunt) {

  grunt.loadNpmTasks('grunt-tizen');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-cssmin');
  grunt.loadNpmTasks('grunt-contrib-htmlmin');
  grunt.loadNpmTasks('grunt-contrib-imagemin');
  grunt.loadNpmTasks('grunt-release');
  grunt.loadTasks('tools/grunt-tasks');

  grunt.initConfig({
    packageInfo: grunt.file.readJSON('package.json'),
    chromeInfo: grunt.file.readJSON('platforms/chrome-crx/manifest.json'),

    crosswalk: {
      arm: {
        //"outDir": process.env.HOME+'/z/webapps/webapps-annex/build',
        "outDir": 'build',

        verbose: false,

        // display name for the app on the device;
        // the sanitisedName used to construct the Locations object later
        // is derived from this
        name: '<%= packageInfo.name %>',

        // package for the app's generated Java files; this works best if
        // you have at least one period character between two character
        // strings, and no digits
        pkg: 'org.org01.webapps.<%= packageInfo.name.toLowerCase() %>',

        icon: 'icon_128.png',

        fullscreen: true,

        remoteDebugging: true,

        // path to the directory containing your HTML5 app;
        // note that this must use the correct path separators for your
        // platform: Windows uses '\\' while Linux uses '/'
        appRoot: 'build/xpk',

        // relative path from appRoot of the entry HTML file for your app
        appLocalPath: 'index.html',

        // embed crosswalk itself into the package
        //embedded: true,

        // path to the root of your Android SDK installation;
        // on Windows, use the path to the sdk directory inside
        // the installation, e.g. 'c:\\android-sdk\\sdk'
        // default: automatically obtain from the 'android' command's path
        //androidSDKDir: '/opt/android-sdk-linux/',

        // path to the xwalk_app_template directory; you can either
        // download and unpack this manually, or use the xwalk_android_dl
        // script to do so (part of this project; see the README for details);
        // note that path separators specific to your platform must be used
        // eg: export XWALK_APP_TEMPLATE=$HOME/Downloads/crosswalk-3.32.53.4-x86
        //xwalkAndroidDir: project/specific/folder

        // architecture of embedded crosswalk
        // default: it is obtained from the contents of
        // xwalkAndroidDir/native_libs/ if there is only one arch in there,
        // else it should be specified as either 'x86' or 'arm'
        arch: 'arm',

        // default: automatically obtains latest from androidSDKDir/build-tools
        //androidAPIVersion: "18.0.1"
      },
      x86: {
        //"outDir": process.env.HOME+'/z/webapps/webapps-annex/build',
        "outDir": 'build',

        verbose: false,

        // display name for the app on the device;
        // the sanitisedName used to construct the Locations object later
        // is derived from this
        name: '<%= packageInfo.name %>',

        // package for the app's generated Java files; this works best if
        // you have at least one period character between two character
        // strings, and no digits
        pkg: 'org.org01.webapps.<%= packageInfo.name.toLowerCase() %>',

        icon: 'icon_128.png',

        fullscreen: true,

        remoteDebugging: true,

        // path to the directory containing your HTML5 app;
        // note that this must use the correct path separators for your
        // platform: Windows uses '\\' while Linux uses '/'
        appRoot: 'build/xpk',

        // relative path from appRoot of the entry HTML file for your app
        appLocalPath: 'index.html',

        // embed crosswalk itself into the package
        //embedded: true,

        // path to the root of your Android SDK installation;
        // on Windows, use the path to the sdk directory inside
        // the installation, e.g. 'c:\\android-sdk\\sdk'
        // default: automatically obtain from the 'android' command's path
        //androidSDKDir: '/opt/android-sdk-linux/',

        // path to the xwalk_app_template directory; you can either
        // download and unpack this manually, or use the xwalk_android_dl
        // script to do so (part of this project; see the README for details);
        // note that path separators specific to your platform must be used
        // eg: export XWALK_APP_TEMPLATE=$HOME/Downloads/crosswalk-3.32.53.4-x86
        //xwalkAndroidDir: project/specific/folder

        // architecture of embedded crosswalk
        // default: it is obtained from the contents of
        // xwalkAndroidDir/native_libs/ if there is only one arch in there,
        // else it should be specified as either 'x86' or 'arm'
        arch: 'x86',

        // default: automatically obtains latest from androidSDKDir/build-tools
        //androidAPIVersion: "18.0.1"
      }
    },

    clean: ['build'],

    release: {
      options: {
        npm: false,
        npmtag: false,
        tagName: 'v<%= version %>'
      }
    },

    tizen_configuration: {
      // location on the device to install the tizen-app.sh script to
      // (default: '/tmp')
      tizenAppScriptDir: '/home/developer/',

      // path to the config.xml file for the Tizen wgt file - post templating
      // (default: 'config.xml')
      configFile: 'build/wgt/config.xml',

      // path to the sdb command (default: process.env.SDB or 'sdb')
      sdbCmd: 'sdb'
    },

    // minify JS
    uglify: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: 'app/js/**/*.js', dest: 'build/' }
        ]
      }
    },

    // minify CSS
    cssmin: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: ['app/css/**/*.css'], dest: 'build/' }
        ]
      }
    },

    copy: {
      common: {
        files: [
          { expand: true, cwd: '.', src: ['app/lib/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/audio/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/data/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['LICENSE'], dest: 'build/app/' },
          { expand: true, cwd: '.', src: ['app/README.txt'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/_locales/**'], dest: 'build/' }
        ]
      },

      wgt: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/wgt/' },
          { expand: true, cwd: '.', src: ['icon_128.png'], dest: 'build/wgt/' }
        ]
      },

      wgt_config: {
        files: [
          { expand: true, cwd: 'platforms/tizen-wgt/', src: ['config.xml'], dest: 'build/wgt/' }
        ],
        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }
      },

      crx: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/crx/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/crx/' }
        ]
      },

      crx_unpacked: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['js/**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['css/**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['*.html'], dest: 'build/crx/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/crx/' }
        ]
      },

      crx_manifest:
      {
        files: [
          { expand: true, cwd: 'platforms/chrome-crx/', src: ['manifest.json'], dest: 'build/crx/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

      xpk: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/xpk/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/xpk/' }
        ]
      },

      xpk_manifest:
      {
        files: [
          { expand: true, cwd: 'platforms/tizen-xpk/', src: ['manifest.json'], dest: 'build/xpk/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

      sdk: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['js/**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['css/**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['*.html'], dest: 'build/sdk/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/sdk/' }
        ]
      },

      sdk_platform:
      {
        files: [
          { expand: true, cwd: 'platforms/tizen-sdk/', src: ['.project'], dest: 'build/sdk/' },
          { expand: true, cwd: 'platforms/tizen-wgt/', src: ['config.xml'], dest: 'build/sdk/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

    },

    htmlmin: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: ['app/*.html'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/html/*.html'], dest: 'build/' }
        ],
        options: {
          removeComments: true,
          collapseWhitespace: true,
          removeCommentsFromCDATA: false,
          removeCDATASectionsFromCDATA: false,
          removeEmptyAttributes: true,
          removeEmptyElements: false
        }
      }
    },

    imagemin: {
      dist: {
        options: {
          optimizationLevel: 3,
          progressive: true
        },
        files: [
          { expand: true, cwd: '.', src: ['app/images/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/css/images/**'], dest: 'build/' }
        ]
      }
    },

    // make wgt package in build/ directory
    package: {
      wgt: {
        appName: '<%= packageInfo.name %>',
        version: '<%= packageInfo.version %>',
        files: 'build/wgt/**',
        stripPrefix: 'build/wgt/',
        outDir: 'build',
        suffix: '.wgt',
        addGitCommitId: false
      },
      sdk: {
        appName: '<%= packageInfo.name %>',
        version: '<%= packageInfo.version %>',
        files: 'build/sdk/**',
        stripPrefix: 'build/sdk/',
        outDir: 'build',
        suffix: '.zip'
      },
      'crx_zip': {
        appName: '<%= packageInfo.name %>-crx',
        version: '<%= packageInfo.version %>',
        files: 'build/crx/**',
        stripPrefix: 'build/crx/',
        outDir: 'build',
        suffix: '.zip'
      }
    },

    simple_server: {
      port: 30303,
      dir: 'build/app/'
    },

    tizen: {
      push: {
        action: 'push',
        localFiles: {
          pattern: 'build/*.wgt',
          filter: 'latest'
        },
        remoteDir: '/home/developer/'
      },

      install: {
        action: 'install',
        remoteFiles: {
          pattern: '/home/developer/<%= packageInfo.name %>*.wgt',
          filter: 'latest'
        }
      },

      uninstall: {
        action: 'uninstall'
      },

      start: {
        action: 'start',
        stopOnFailure: true
      },

      stop: {
        action: 'stop',
        stopOnFailure: false
      },

      debug: {
        action: 'debug',
        browserCmd: 'google-chrome %URL%',
        localPort: 9090,
        stopOnFailure: true
      }
    }
  });

  grunt.registerTask('dist', [
    'clean',
    'imagemin:dist',
    'uglify:dist',
    'cssmin:dist',
    'htmlmin:dist',
    'copy:common'
  ]);

  grunt.registerTask('crx', ['dist', 'copy:crx', 'copy:crx_manifest']);
  grunt.registerTask('crx_unpacked', [
    'clean',
    'imagemin:dist',
    'copy:common',
    'copy:crx_unpacked',
    'copy:crx_manifest',
    'package:crx_zip'
  ]);
  grunt.registerTask('wgt', ['dist', 'copy:wgt', 'copy:wgt_config', 'package:wgt']);
  grunt.registerTask('xpk', ['dist', 'copy:xpk', 'copy:xpk_manifest']);
  grunt.registerTask('sdk', [
    'clean',
    'imagemin:dist',
    'copy:common',
    'copy:sdk',
    'copy:sdk_platform',
    'package:sdk'
  ]);

  grunt.registerTask('perf', [
    'dist',
    'uglify:perf',
    'inline',
    'copy:wgt',
    'copy:wgt_config',
    'package:wgt'
  ]);

  grunt.registerTask('install', [
    'tizen:push',
    'tizen:stop',
    'tizen:uninstall',
    'tizen:install',
    'tizen:start'
  ]);

  grunt.registerTask('wait', function () {
    var done = this.async();
    setTimeout(function () {
      done();
    }, 10000);
  });

  grunt.registerTask('restart', ['tizen:stop', 'tizen:start']);

  grunt.registerTask('server', ['dist', 'simple_server']);

  grunt.registerTask('wgt-install', ['wgt', 'install']);
  grunt.registerTask('sdk-install', ['sdk', 'install']);

  grunt.registerTask('default', 'wgt');
  grunt.registerTask('apk', [
    'xpk',
    'crosswalk:x86',
    'crosswalk:arm'
  ]);
};


text:
This is my first Javascript game done as a side project.
I wanted to participate in the 2014 [http://js13kgames.com/] competition but I didn't have time to work on it last August, so I decided to work on it later when I could.
If you're not familiar, the goal is to make a game in under 13K (zipped) in one month. There is also an optional theme. This year's was "The Elements: Earth, Water, Air and Fire". I thought it'd be a fun challenge to implement the theme, so I did.
Here's the rest of the rules if you're interested: http://js13kgames.com/#rules
At last check, I was up to 9K, so that gives me some (needed) room for improvement.

http://catherinesnow.github.io/neutralize/


text:
<TITLE>Review for Unforgettable (1996)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Unforgettable (1996)

reviewed by
Christopher Null

                                UNFORGETTABLE
                      A film review by Christopher Null
                       Copyright 1996 Christopher Null

     Winner of this year's "Most Ironic Title" award, UNFORGETTABLE is
anything but, taking a subject with some promise--memory transfer--and
managing to butcher it into a hackneyed thriller.

     UNFORGETTABLE reteams star Linda Fiorentino with director John Dahl,
who worked so well together in 1994's THE LAST SEDUCTION.  Unfortunately,
Fiorentino, who was mentioned more than once as that year's best actress,
has been in free-fall ever since, starting with JADE and now turning to
this.  In UNFORGETTABLE, Ray Liotta plays David Krane, a Seattle medical
examiner whose wife was murdered years earlier.  Krane was the prime
suspect, but a technicality got him off, all the while with him protesting
his innocence (yes, it's O.J. *again*).

     When a similar crime takes place, Krane goes on he prowl for the
killer, eventually hooking up with Martha Briggs (Fiorentino), a ditzy
neurobiologist who has invented a serum which, when combined with
someone's cerebro-spinal fluid, can transfer memories.  Krane steals some
of the serum and experiences the lives (and gruesome deaths) of the murder
victims, including his wife.  All the while, the side effects begin to
take their toll on Krane's body, as he tries to solve the case before they
become fatal.

     Sadly, UNFORGETTABLE is somehow able to be confusing and predictable
at the same time, relying on mild shock value and graphic violence to keep
the viewer interested.  It doesn't really work, and the picture drags on
until the silly ending and the requisite playing of Nat King Cole's title
song.  Dahl's direction is otherwise good, but it's wasted on Bill
Geddie's dull script.  The supporting cast (including Peter Coyote,
Christopher McDonald, Kim Cattrall, and David Paymer) perform with
workmanlike effort--there's really not a lot here for them to do, as the
story just gets in the way.

     All said and done, do like the moviegoing public will do when
UNFORGETTABLE is screened:  forget it.

RATING:  **

\-------------------------------\
|*     Unquestionably awful     |
|**    Sub-par on many levels   |
|***   Average, hits and misses |
|****  Good, memorable film     |
|***** Perfection               |
\-------------------------------\

-Christopher Null  /  null@utxvms.cc.utexas.edu
-Screenwriter / Novelist / Publisher
-Visit the Movie Emporium at http://cca2.carrington.com/emporium/
-and e-mail requests to join the movie review mailing list

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using FlatRedBall.IO;
using System.Windows;

using FlatRedBall.Utilities;

using FlatRedBall.Content;
using FlatRedBall.Content.Math.Geometry;
using FlatRedBall.Content.Particle;
using FlatRedBall.Content.AI.Pathfinding;
using FlatRedBall.Content.AnimationChain;
using FlatRedBall.Content.Math.Splines;
using System.IO;
using System.Reflection;
using FlatRedBall.Math;
using FlatRedBall.Instructions.Reflection;
using FlatRedBall;
using FlatRedBall.Graphics;
using FlatRedBall.Content.Scene;

using FlatRedBall.Content.SpriteFrame;
using SourceReferencingFile = FlatRedBall.Glue.Content.SourceReferencingFile;

using Color = Microsoft.Xna.Framework.Color;

namespace EditorObjects.Parsing
{
    public enum ErrorBehavior
    {
        ThrowException,
        ContinueSilently
    }

    public enum TopLevelOrRecursive
    {
        TopLevel,
        Recursive
    }

    public static class ContentParser
    {
        public static bool GetNamedObjectsIn(string fileName, List<string> listToAddTo)
        {
            bool toReturn = true;

            string extension = FileManager.GetExtension(fileName);

            switch (extension)
            {
                #region case Scene (scnx)
                case "scnx":

                    SpriteEditorScene ses = SpriteEditorScene.FromFile(fileName);

                    for(int i = 0; i < ses.SpriteFrameSaveList.Count; i++)
                    {
                        listToAddTo.Add(ses.SpriteFrameSaveList[i].ParentSprite.Name + " (SpriteFrame)");
                    }

                    for(int i = 0; i < ses.SpriteGridList.Count; i++)
                    {
                        listToAddTo.Add(ses.SpriteGridList[i].Name + " (SpriteGrid)");
                    }

                    for(int i = 0; i < ses.SpriteList.Count; i++)
                    {
                        listToAddTo.Add(ses.SpriteList[i].Name + " (Sprite)");
                    }

                    for(int i = 0; i < ses.TextSaveList.Count; i++)
                    {
                        listToAddTo.Add(ses.TextSaveList[i].Name + " (Text)");
                    }
                    break;
                #endregion

                #region case ShapeCollection (shcx)

                case "shcx":
                    ShapeCollectionSave scs = ShapeCollectionSave.FromFile(fileName);

                    for (int i = 0; i < scs.AxisAlignedCubeSaves.Count; i++)
                    {
                        listToAddTo.Add(scs.AxisAlignedCubeSaves[i].Name + " (AxisAlignedCube)");
                    }
                    for (int i = 0; i < scs.AxisAlignedRectangleSaves.Count; i++)
                    {
                        listToAddTo.Add(scs.AxisAlignedRectangleSaves[i].Name + " (AxisAlignedRectangle)");
                    }
                    for (int i = 0; i < scs.CircleSaves.Count; i++)
                    {
                        listToAddTo.Add(scs.CircleSaves[i].Name + " (Circle)");
                    }
                    for (int i = 0; i < scs.PolygonSaves.Count; i++)
                    {
                        listToAddTo.Add(scs.PolygonSaves[i].Name + " (Polygon)");
                    }
                    for (int i = 0; i < scs.SphereSaves.Count; i++)
                    {
                        listToAddTo.Add(scs.SphereSaves[i].Name + " (Sphere)");
                    }
                    break;

                #endregion

				#region NodeNetwork (nntx)
				case "nntx":
					NodeNetworkSave nns = NodeNetworkSave.FromFile(fileName);

					for (int i = 0; i < nns.PositionedNodes.Count; i++)
					{
                        listToAddTo.Add(nns.PositionedNodes[i].Name + " (PositionedNode)");
					}

					break;
				#endregion

                #region EmitterList (emix)
                case "emix":
                    EmitterSaveList esl = EmitterSaveList.FromFile(fileName);

                    for (int i = 0; i < esl.emitters.Count; i++)
                    {
                        listToAddTo.Add(esl.emitters[i].Name + " (Emitter)");
                    }

                    break;

                #endregion

                #region Case AnimationChainList (achx)

                case "achx":
					AnimationChainListSave acls = AnimationChainListSave.FromFile(fileName);

					for (int i = 0; i < acls.AnimationChains.Count; i++)
					{
                        listToAddTo.Add(acls.AnimationChains[i].Name + " (AnimationChain)");
					}
					break;
				#endregion

				#region Case SplineList (splx)
				case "splx":
					SplineSaveList ssl = SplineSaveList.FromFile(fileName);

					for (int i = 0; i < ssl.Splines.Count; i++)
					{
                        listToAddTo.Add(ssl.Splines[i].Name + " (Spline)");
					}

					break;

				#endregion

                default:
                    toReturn = false;
                    break;
			}

            return toReturn;
        }

        public static List<SourceReferencingFile> GetSourceReferencingFilesReferencedByAsset(string fileName)
        {
            return GetSourceReferencingFilesReferencedByAsset(fileName, TopLevelOrRecursive.TopLevel);
        }

        public static List<SourceReferencingFile> GetSourceReferencingFilesReferencedByAsset(string fileName, TopLevelOrRecursive topLevelOrRecursive)
        {
            string throwAwayString = "";
            string throwawayVerboseString = "";

            return GetSourceReferencingFilesReferencedByAsset(fileName, topLevelOrRecursive, ErrorBehavior.ThrowException, ref throwAwayString, ref throwawayVerboseString);
        }

        public static List<SourceReferencingFile> GetSourceReferencingFilesReferencedByAsset(string fileName, TopLevelOrRecursive topLevelOrRecursive, ErrorBehavior errorBehavior, ref string error, ref string verboseError)
        {
            string fileExtension = FileManager.GetExtension(fileName);

            List<SourceReferencingFile> referencedFiles = null;

            switch (fileExtension)
            {
                //case "scnx":
                //    try
                //    {
                //        SpriteEditorScene ses = SpriteEditorScene.FromFile(fileName);

                //        referencedFiles = ses.GetSourceReferencingReferencedFiles(RelativeType.Absolute);
                //    }
                //    catch (Exception e)
                //    {
                //        error = "Error loading file " + fileName + ": " + e.Message;
                //        referencedFiles = new List<SourceReferencingFile>();
                //        verboseError = e.ToString();
                //    }
                //    break;
                //default:
                //    referencedFiles = new List<SourceReferencingFile>();
                //    break;
            }
/**/
            if (topLevelOrRecursive == TopLevelOrRecursive.Recursive)
            {
                //First we need to get a list of all referenced files
                List<FilePath> filesToSearch = new List<FilePath>();

                try
                {
                    // GetFilesReferencedByAsset can throw an error if the file doesn't
                    // exist.  But we don't really care if it's missing if it can't reference
                    // others.  I mean, sure we care, but it's not relevant here.  Other systems
                    // can check for that.
                    if (CanFileReferenceOtherFiles(fileName))
                    {
                        GetFilesReferencedByAsset(fileName, topLevelOrRecursive, filesToSearch);
                    }
                }
                catch (Exception e)
                {
                    if (errorBehavior == ErrorBehavior.ThrowException)
                    {
                        throw e;
                    }
                    else
                    {
                        error += e.Message + "\n";
                    }
                }

                if (filesToSearch != null)
                {
                    for (int i = filesToSearch.Count - 1; i > -1; i--)
                    {
                        string errorForThisFile = "";
                        string verboseErrorForThisFile = "";
                        List<SourceReferencingFile> subReferencedFiles = GetSourceReferencingFilesReferencedByAsset(filesToSearch[i].FullPath, topLevelOrRecursive,
                            errorBehavior, ref errorForThisFile, ref verboseErrorForThisFile);
                        // error may have already been set.  If it has already been set, we don't want to dump more errors (which may just be duplicates anyway)
                        if (string.IsNullOrEmpty(error))
                        {
                            error += errorForThisFile;
                        }

                        if (subReferencedFiles != null)
                        {
                            referencedFiles.AddRange(subReferencedFiles);
                        }
                    }
                }
            }
/**/
            return referencedFiles;

        }

        public static List<FilePath> GetFilesReferencedByAsset(FilePath filePath)
		{

            return GetFilesReferencedByAsset(filePath, TopLevelOrRecursive.TopLevel);
		}

        public static List<FilePath> GetFilesReferencedByAsset(FilePath filePath, TopLevelOrRecursive topLevelOrRecursive)
		{
            var referencedFiles = new List<FilePath>();

            GetFilesReferencedByAsset(filePath, topLevelOrRecursive, referencedFiles);

            return referencedFiles.Distinct().ToList();
        }

        public static void GetFilesReferencedByAsset(FilePath filePath, TopLevelOrRecursive topLevelOrRecursive, List<FilePath> referencedFiles)
        {
            var newReferencedFiles = new List<FilePath>();
            if (!CanFileReferenceOtherFiles(filePath))
            {
                return;
            }
            else if (!filePath.Exists())
            {
                // We used to throw an error here but now we just let the error window handle it:
                //throw new FileNotFoundException("Could not find file " + fileName, fileName);

            }
            else
            {

                string fileExtension = filePath.Extension;

                switch (fileExtension)
                {
                    #region Scene (.scnx)

                    case "scnx":

                        SceneSave ses = SceneSave.FromFile(filePath.FullPath);
                        newReferencedFiles = ses.GetReferencedFiles(RelativeType.Absolute).Select(item => new FilePath(item)).ToList();

                        break;

                    #endregion

                    #region Emitter List (.emix)

                    case "emix":
                        EmitterSaveList esl = EmitterSaveList.FromFile(filePath.FullPath);
                        newReferencedFiles = esl.GetReferencedFiles(RelativeType.Absolute).Select(item => new FilePath(item)).ToList();
                        break;

                    #endregion

                    #region AnimationChain List

                    case "achx":

                        AnimationChainListSave acls = null;
                        try
                        {

                            acls = AnimationChainListSave.FromFile(filePath.FullPath);
                            newReferencedFiles = acls.GetReferencedFiles(RelativeType.Absolute).Select(item => new FilePath(item)).ToList();
                        }
                        catch(Exception e)
                        {
                            throw new Exception($"Error parsing file {filePath}:\n{e}");
                        }
                        break;

                    #endregion

                    #region X File (.x)

                    case "x":
                        newReferencedFiles = GetTextureReferencesInX(filePath.FullPath).Select(item => new FilePath(item)).ToList();
                        break;

                    #endregion

                    #region Spline List (.slpx) - falls to default

                    case "splx":

                    #endregion

                    #region Font File (.fnt)
                    case "fnt":
                        newReferencedFiles = GetTextureReferencesInFnt(filePath.FullPath).Select(item => new FilePath(item)).ToList();

                        break;
                    #endregion
                    default:

                        break;
                }

                // We still want to construct as good of a reference structure as possible
                // even if there are missing files.  Therefore, we'll just keep track of errors and report them
                // at the end of the method
                bool didErrorOccur = false;
                string errorMessage = "";
                if (topLevelOrRecursive == TopLevelOrRecursive.Recursive)
                {
                    for (int i = newReferencedFiles.Count - 1; i > -1; i--)
                    {
                        // If this file can't reference other files, no need to even do a file check or throw errors.
                        if (CanFileReferenceOtherFiles(newReferencedFiles[i]) == true)
                        {
                            if (newReferencedFiles[i].Exists())
                            {

                                try
                                {
                                    GetFilesReferencedByAsset(newReferencedFiles[i], topLevelOrRecursive, newReferencedFiles);
                                }
                                catch (Exception e)
                                {
                                    didErrorOccur = true;
                                    errorMessage += e.Message;
                                }
                            }
                            else
                            {
                                didErrorOccur = true;
                                errorMessage += "Could not find the file " + newReferencedFiles[i] +
                                    " which is referenced in the file " + filePath + "\n";
                            }
                        }
                    }

                }

                referencedFiles.AddRange(newReferencedFiles);

                if (didErrorOccur)
                {
                    throw new Exception(errorMessage);
                }

            }
		}

        private static bool CanFileReferenceOtherFiles(FilePath filePath)
        {
            if(filePath == null)
            {
                return false;
            }
            else
            {
                string extension = filePath.Extension;

                if(extension == "png" || extension == "bmp" || extension == "jpg" || extension == "gif" ||
                    extension == "dds" || extension == "tga" ||
                    extension == "cs")
                {
                    return false;
                }
                else
                {
                    return true;
                }
            }
        }

        private static List<string> GetTextureReferencesInFnt(string fileName)
        {
            List<string> referencedFiles = new List<string>();
            string contents = FileManager.FromFileText(fileName);
            referencedFiles = new List<string>(BitmapFont.GetSourceTextures(contents));
            for(int x = 0; x < referencedFiles.Count; ++x)
            {
                string referencedFileName = referencedFiles[x];
                referencedFiles[x] = FileManager.GetDirectory(fileName) + referencedFileName;
            }
            return referencedFiles;
        }

        public static string GetMemberNameForList(string extension, string memberType)
        {
            switch (extension)
            {
                #region Scene (scnx)
                case "scnx":
                    switch (memberType)
                    {
                        case "Sprite":
                            return "Sprites";
                            //break;
                        case "SpriteFrame":
                            return "SpriteFrames";
                            //break;
						case "Text":
							return "Texts";
							// break;
                        case "PositionedModel":
                            return "PositionedModels";
                        case "SpriteGrid":
                            return "SpriteGrids";
						case "Scene":
							return "";
                    }
                    break;
                #endregion

                #region EmitterList (emix)
                case "emix":
                    return "";
                    //break;
                #endregion

                #region ShapeCollection (shcx)
                case "shcx":
                    switch (memberType)
                    {
                        case "AxisAlignedRectangle":
                        case "FlatRedBall.Math.Geometry.AxisAlignedRectangle":
                            return "AxisAlignedRectangles";
                            //break;
                        case "AxisAlignedCube":
                        case "FlatRedBall.Math.Geometry.AxisAlignedCube":
                            return "AxisAlignedCubes";
                            //break;
                        case "Circle":
                        case "FlatRedBall.Math.Geometry.Circle":
                            return "Circles";
                            // break;
                        case "Line":
                        case "FlatRedBall.Math.Geometry.Line":
                            return "Lines";
                            //break;
                        case "Polygon":
                        case "FlatRedBall.Math.Geometry.Polygon":
                            return "Polygons";
                            // break;
						case "ShapeCollection":
                        case "FlatRedBall.Math.Geometry.ShapeCollection":

                            return "";
							// break;
                        case "Sphere":
                        case "FlatRedBall.Math.Geometry.Sphere":
                            return "Spheres";
                            //break;
                    }
                    break;
                #endregion

				#region AnimationChainList (achx)

				case "achx":
					switch(memberType)
					{
						case "AnimationChain":
							return "";
							// break;

						case "AnimationChainList":
							return "";
							// break;

					}
					break;

				#endregion

				#region SplineList (splx)

				case "splx":

					switch (memberType)
					{
						case "Spline":
							return "";
							//break;
						case "SplineList":
							return "";
							//break;

					}

					break;

				#endregion

				#region SpriteRig (srgx)

				case "srgx":

					return "";

					//break;

				#endregion

				#region NodeNetwork (nntx)
				case "nntx":
					return "";

					//break;

				#endregion

                case "png":
                case "jpg":
                case "bmp":
                case "tga":
                    return "";
                    //break;

			}

            // Vic says - this used to throw an exception, but it is possible that the user sets object types
            // incorrectly.  This should just generate code that doesn't compile, not throw an exception.  Eventually
            // we will want to test for project errors and report this to the user.
            return "";
        }

		private static List<string> GetTextureReferencesInX(string fileName)
		{
			List<string> referencedFiles = new List<string>();
			string contents = FileManager.FromFileText(fileName);

			int currentIndex = 0;
			//bool useCamel = false;
			const string TextureFileNameString = "TextureFilename {";
			string fileDirectory = FileManager.GetDirectory(fileName);

			int nextTextureFilename = contents.IndexOf(TextureFileNameString, currentIndex, StringComparison.OrdinalIgnoreCase);

			if (nextTextureFilename == -1)
			{

				return referencedFiles;
			}
			// The first "TextureFilename" is garbage - it's the template definition.  Let's do the next
			bool isFirstATemplate = false;
			if (contents.IndexOf("template TextureFilename", StringComparison.OrdinalIgnoreCase) == nextTextureFilename - "template ".Length)
			{
				isFirstATemplate = true;
			}
			if (isFirstATemplate)
			{
				currentIndex = nextTextureFilename + 1;
				nextTextureFilename = contents.IndexOf(TextureFileNameString, currentIndex, StringComparison.OrdinalIgnoreCase);
			}

			while (nextTextureFilename != -1)
			{
				// read the file

				string texture = StringFunctions.GetWordAfter(TextureFileNameString, contents, nextTextureFilename, StringComparison.OrdinalIgnoreCase);
				texture = fileDirectory + texture.Replace("\"", "").Replace(";", "").Replace(".\\\\", "").Replace("}", "");

				if (!referencedFiles.Contains(texture))
				{
					referencedFiles.Add(texture);
				}

				currentIndex = nextTextureFilename + 1;

				nextTextureFilename = contents.IndexOf(TextureFileNameString, currentIndex, StringComparison.OrdinalIgnoreCase);

			}

			return referencedFiles;
		}

        public static void EliminateDuplicateSourceReferencingFiles(List<SourceReferencingFile> sourceReferencingFileList)
        {
            for (int i = sourceReferencingFileList.Count - 1; i > -1; i--)
            {
//                bool hasFoundDuplicate = false;

                SourceReferencingFile firstSrf = sourceReferencingFileList[i];

                for (int j = i - 1; j > -1; j--)
                {
                    SourceReferencingFile otherSrf = sourceReferencingFileList[j];

                    if (otherSrf.HasTheSameFilesAs(firstSrf))
                    {
                        sourceReferencingFileList.RemoveAt(i);
                        break;
                    }
                }
            }
        }

        public static object GetValueForProperty(string fileName, string objectName, string propertyName)
        {
            string extension = FileManager.GetExtension(fileName);

            switch (extension)
            {
                #region case Scene (scnx)
                case "scnx":

                    var ses = SceneSave.FromFile(fileName);

                    string oldRelative = FileManager.RelativeDirectory;
                    FileManager.RelativeDirectory = FileManager.GetDirectory(fileName);

                    object returnValue = GetValueForPropertyInScene(ses, objectName, propertyName);

                    FileManager.RelativeDirectory = oldRelative;

                    return returnValue;

                    //break;
                #endregion

                #region case ShapeCollection (shcx)

                case "shcx":
                    ShapeCollectionSave scs = ShapeCollectionSave.FromFile(fileName);
                    return GetValueForPropertyInShapeCollection(scs, objectName, propertyName);
                    //break;

                #endregion
            }
            return null;
        }

        static object GetValueForPropertyInScene(SceneSave scene, string objectName, string property)
        {
            for (int i = 0; i < scene.SpriteFrameSaveList.Count; i++)
            {
                if (scene.SpriteFrameSaveList[i].ParentSprite.Name == objectName)
                {
                    return GetValueForPropertyOnObject(scene.SpriteFrameSaveList[i], property);
                }
            }

            for (int i = 0; i < scene.SpriteGridList.Count; i++)
            {
                if (scene.SpriteGridList[i].Name == objectName)
                {
                    return GetValueForPropertyOnObject(scene.SpriteGridList[i], property);
                }
            }

            for (int i = 0; i < scene.SpriteList.Count; i++)
            {
                if (scene.SpriteList[i].Name == objectName)
                {
                    return GetValueForPropertyOnObject(scene.SpriteList[i], property);
                }
            }

            for (int i = 0; i < scene.TextSaveList.Count; i++)
            {
                if (scene.TextSaveList[i].Name == objectName)
                {
                    return GetValueForPropertyOnObject(scene.TextSaveList[i], property);
                }
            }

            return null;
        }

        static object GetValueForPropertyInShapeCollection(ShapeCollectionSave shapeCollection, string objectName, string property)
        {
            for (int i = 0; i < shapeCollection.AxisAlignedCubeSaves.Count; i++)
            {
                if (shapeCollection.AxisAlignedCubeSaves[i].Name == objectName)
                {
                    return GetValueForPropertyOnObject(shapeCollection.AxisAlignedCubeSaves[i], property);
                }
            }
            for (int i = 0; i < shapeCollection.AxisAlignedRectangleSaves.Count; i++)
            {
                if (shapeCollection.AxisAlignedRectangleSaves[i].Name == objectName)
                {
                    return GetValueForPropertyOnObject(shapeCollection.AxisAlignedRectangleSaves[i], property);
                }
            }
            for (int i = 0; i < shapeCollection.CircleSaves.Count; i++)
            {
                if (shapeCollection.CircleSaves[i].Name == objectName)
                {
                    return GetValueForPropertyOnObject(shapeCollection.CircleSaves[i], property);
                }
            }
            for (int i = 0; i < shapeCollection.PolygonSaves.Count; i++)
            {
                if (shapeCollection.PolygonSaves[i].Name == objectName)
                {
                    return GetValueForPropertyOnObject(shapeCollection.PolygonSaves[i], property);
                }
            }
            for (int i = 0; i < shapeCollection.SphereSaves.Count; i++)
            {
                if (shapeCollection.SphereSaves[i].Name == objectName)
                {
                    return GetValueForPropertyOnObject(shapeCollection.SphereSaves[i], property);
                }
            }
            return null;
        }

        static object GetValueForPropertyOnObject(AxisAlignedRectangleSave rectangle, string fieldOrProperty)
        {
            if (fieldOrProperty == "Color")
            {
                // See if there are any matches
                Dictionary<string, Color> allColors = GetAllDefaultColors();
                int alphaAsInt = MathFunctions.RoundToInt(rectangle.Alpha * 255);
                int redAsInt = MathFunctions.RoundToInt(rectangle.Red * 255);
                int greenAsInt = MathFunctions.RoundToInt(rectangle.Green * 255);
                int blueAsInt = MathFunctions.RoundToInt(rectangle.Blue * 255);

                foreach(KeyValuePair<string, Color> kvp in allColors)
                {
                    Color color = kvp.Value;

                    if (color.A == alphaAsInt &&
                        color.R == redAsInt &&
                        color.G == greenAsInt &&
                        color.B == blueAsInt)
                    {
                        return kvp.Key;
                    }
                }

                return null;
            }

            return GetValueForPropertyOnObject<AxisAlignedRectangleSave>(rectangle, fieldOrProperty);
        }

        static object GetValueForPropertyOnObject(SpriteSave sprite, string fieldOrProperty)
        {
            if (fieldOrProperty == "Alpha")
            {
                float valueToDivideBy = 255 / GraphicalEnumerations.MaxColorComponentValue;

                return (255 - sprite.Fade) / valueToDivideBy;
            }
            else if (fieldOrProperty == "PixelSize")
            {
                return sprite.ConstantPixelSize;
            }
            else if (fieldOrProperty == "CurrentChainName")
            {
                // This thing should use an AnimationChain
                string animationChainRelative = sprite.AnimationChainsFile;

                string animationChainFile = FileManager.RelativeDirectory + sprite.AnimationChainsFile;

                AnimationChainListSave acls = AnimationChainListSave.FromFile(animationChainFile);

                int index = sprite.CurrentChain;

                if (index < acls.AnimationChains.Count)
                {
                    return acls.AnimationChains[index].Name;
                }
                else
                {
                    return null;
                }
            }

            return GetValueForPropertyOnObject<SpriteSave>(sprite, fieldOrProperty);

        }

        static object GetValueForPropertyOnObject(SpriteFrameSave spriteFrameSave, string fieldOrProperty)
        {
            object returnValue = GetValueForPropertyOnObject<SpriteFrameSave>(spriteFrameSave, fieldOrProperty);

            // Many of the properties on the SpriteFrame are actually on the Sprite itself.
            if (returnValue == null)
            {
                returnValue = GetValueForPropertyOnObject(spriteFrameSave.ParentSprite, fieldOrProperty);
            }

            return returnValue;
        }

        static object GetValueForPropertyOnObject<T>(T objectToGetValueFrom, string fieldOrProperty)
        {
            Type type = typeof(T);

            PropertyInfo[] properties = type.GetProperties();

            for (int i = 0; i < properties.Length; i++)
            {
                if (properties[i].Name == fieldOrProperty)
                {
                    return properties[i].GetValue(objectToGetValueFrom, null);
                }
            }

            FieldInfo[] fields = type.GetFields();

            for (int i = 0; i < fields.Length; i++)
            {
                if (fields[i].Name == fieldOrProperty)
                {
                    return fields[i].GetValue(objectToGetValueFrom);
                }
            }

            return null;
        }

        static Dictionary<string, Color> GetAllDefaultColors()
        {
            Dictionary<string, Color> toReturn = new Dictionary<string, Color>();

            Type colorType = typeof(Color);

            PropertyInfo[] properties = colorType.GetProperties();

            foreach (PropertyInfo property in properties)
            {
                if (property.PropertyType == colorType)
                {
                    toReturn.Add(property.Name, (Color)property.GetValue(null, null));
                }
            }

            return toReturn;
        }
    }
}