text:
<?php
    include_once '../Class/Config.php';
    $db = new PDO("mysql:host=" . config::SERVERNAME . ";dbname=" . config::DBNAME, config::USER, config::PASSWORD);
    $req = $db -> prepare("UPDATE `evenement` SET `Nom`=:Nom,`DateDebut`=:DateD,`DateFin`=:DateF WHERE Id=:id");
    $req -> bindParam(":id",$_GET['id']);
    $req -> bindParam(":Nom",$_POST['Nom']);
    $req -> bindParam(":DateD",$_POST['DateDebut']);
    $req -> bindParam(":DateF",$_POST['DateFin']);
    $req -> execute();
    $db = null;
    header("location:../Evenement.php");
?>


text:
require 'test/unit'
require 'photile'
require 'uuid'

class CliTest < Test::Unit::TestCase

  def test_validate_percent_value
    # percentage too high
    exception = assert_raise RuntimeError do
      Photile::Cli.validate_percent_value('metricX', 800)
    end
    assert_equal 'Invalid percentage: metricX 800%. Acceptable range: 0-100', exception.message

    # percentage too low
    exception = assert_raise RuntimeError do
      Photile::Cli.validate_percent_value('metricX', -100)
    end
    assert_equal 'Invalid percentage: metricX -100%. Acceptable range: 0-100', exception.message

    # percentage within acceptable range
    Photile::Cli.validate_percent_value('metricX', 50)
  end

  def test_validate_2d_dimensions
    # valid dimensions
    Photile::Cli.validate_2d_dimensions([1,1])
    Photile::Cli.validate_2d_dimensions([100,100])
    assert true

    # dimensions are negative
    exception = assert_raise RuntimeError do
      Photile::Cli.validate_2d_dimensions([-1,-1])
    end
    assert_equal 'Invalid dimensions: -1x-1. Acceptable dimensions are > 0', exception.message

    # dimensions are 0
    exception = assert_raise RuntimeError do
      Photile::Cli.validate_2d_dimensions([0,0])
    end
    assert_equal 'Invalid dimensions: 0x0. Acceptable dimensions are > 0', exception.message
  end

  def test_validate_file_exist
    # non existent files
    exception = assert_raise RuntimeError do
      Photile::Cli.validate_file_exist("photile-#{UUID.new.generate}.tmp")
    end

    # create a new file, validate it and clean it
    filename = "photile-#{UUID.new.generate}.tmp"
    File.new(filename, "w")
    Photile::Cli.validate_file_exist(filename)
    File.delete(filename)
    assert true
  end

  def test_cli_tile_regexp
    # valid regexp's
    assert !Regexp.new(/\d+x\d+/).match("1x1").nil?
    assert !Regexp.new(/\d+x\d+/).match("100x100").nil?

    # invalid regexp structure
    assert Regexp.new(/\d+x\d+/).match("1y1").nil?
  end

end

redpajama_set_name: RedPajamaGithub


text:
#import "MenuViewController.h"

@interface ProfessionalViewController : MenuViewController
{

}

@end


text:
        <form role="form" name="form" novalidate ng-submit="create()">

            <input  required type="text"
                    ng-model="board.title"
                    name="title"
                    maxlength="30"
                    class="form-control"
                    placeholder="Enter board title...">

          <button type="submit"
                  class="btn btn-lg btn-success"
                  role="button"
                  ng-disabled="!form.$valid">Create Board
                  </button>
        </form>

            Your boards

{{board.title}}

               0">
                {{board.cards.length}}
                <ng-pluralize count="board.cards.length" when="{'one': 'card', 'other': 'cards'}" />

                Created by  {{board.owner.facebook.name}}

            <button ng-click="delete(board)"
                    class="btn btn-default btn-xs archive-board"
                    data-toggle="tooltip"
                    data-placement="bottom"
                    title="Archive">

            </button>


text:
<?php

/**
 * This file is part of the Future CI package.
 * Future CI is licensed under MIT (https://github.com/f500/future-ci/blob/master/LICENSE).
 */

namespace spec\F500\CI\Renderer\Types;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

/**
 * Class HtmlRenderTypeSpec
 *
 * @copyright 2014 Future500 B.V.
 * @license   https://github.com/f500/future-ci/blob/master/LICENSE MIT
 * @package   spec\F500\CI\Renderer\Types
 */
class HtmlRenderTypeSpec extends ObjectBehavior
{

    function let()
    {
        $viewDir = __DIR__ . '/../../../../data/views';

        /** @noinspection PhpParamsInspection */
        $this->beConstructedWith($viewDir);
    }

    function it_is_initializable()
    {
        $this->shouldHaveType('F500\CI\Renderer\Types\HtmlRenderType');
    }

    function it_renders_html()
    {
        $text = <<<'EOT'
<!DOCTYPE html>

Hello World!

EOT;

        $this->render('html_render_type')->shouldReturn($text);
    }
}


text:
//---------------------------------------------------------------------
// <copyright file="LoadCompletedEventArgs.cs" company="Microsoft">
//      Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
// </copyright>
//---------------------------------------------------------------------

namespace Microsoft.OData.Client
{
    #region Namespaces.
    using System;
    using System.ComponentModel;
    #endregion Namespaces.

    /// Used as the <see cref="T:System.EventArgs" /> class for the <see cref="E:Microsoft.OData.Service.Client.DataServiceCollection`1.LoadCompleted" /> event.Supported only by the WCF Data Services 5.0 client for Silverlight.
    public sealed class LoadCompletedEventArgs : AsyncCompletedEventArgs
    {
        /// The <see cref="QueryOperationResponse"/> which represents
        /// the response for the Load operation.
        /// <remarks>This field is non-null only when the Load operation was successfull.
        /// Otherwise it's null.</remarks>
        private QueryOperationResponse queryOperationResponse;

        /// Constructor
        /// <param name="queryOperationResponse">The response for the Load operation. null when the operation didn't succeed.</param>
        /// <param name="error"><see cref="Exception"/> which represents the error if the Load operation failed. null if the operation
        /// didn't fail.</param>
        /// <remarks>This constructor doesn't allow creation of canceled event args.</remarks>
        internal LoadCompletedEventArgs(QueryOperationResponse queryOperationResponse, Exception error)
            : this(queryOperationResponse, error, false)
        {
        }

        /// Constructor
        /// <param name="queryOperationResponse">The response for the Load operation. null when the operation didn't succeed.</param>
        /// <param name="error"><see cref="Exception"/> which represents the error if the Load operation failed. null if the operation
        /// didn't fail.</param>
        /// <param name="cancelled">True, if the LoadAsync operation was cancelled, False otherwise.</param>
        /// <remarks>This constructor doesn't allow creation of canceled event args.</remarks>
        internal LoadCompletedEventArgs(
            QueryOperationResponse queryOperationResponse,
            Exception error,
            bool cancelled)
            : base(error, cancelled, null)
        {
            this.queryOperationResponse = queryOperationResponse;
        }

        /// Gets the response to an asynchronous load operation.Supported only by the WCF Data Services 5.0 client for Silverlight.
        /// <returns>A <see cref="T:Microsoft.OData.Service.Client.QueryOperationResponse" /> that represents the response to a load operation.</returns>
        /// <remarks>Accessing this property will throw exception if the Load operation failed
        /// or it was canceled.</remarks>
        public QueryOperationResponse QueryOperationResponse
        {
            get
            {
                this.RaiseExceptionIfNecessary();
                return this.queryOperationResponse;
            }
        }
    }
}


text:
package org.adbcj.mysql.codec;

import java.io.IOException;
import java.io.OutputStream;
import java.security.NoSuchAlgorithmException;

public class MySqlClientEncoder {

    public void encode(ClientRequest request, OutputStream out) throws IOException, NoSuchAlgorithmException {
        int length = request.getLength();

        // Write the length of the packet
        out.write(length & 0xFF);
        out.write(length >> 8 & 0xFF);
        out.write(length >> 16 & 0xFF);

        // Write the packet number
        out.write(request.getPacketNumber());

        request.writeToOutputStream(out);

    }

}


text:
select Request_at as Day,
 Round( count(if( Status !='completed', TRUE, NULL)) / count(*), 2) as 'Cancellation Rate'
from Trips
where Client_Id  in
(select Users_Id from Users where Banned = 'No' and Role = 'client')
and Request_at between '2013-10-01' and '2013-10-03'
group by Request_at;


text:
body {
  max-width: 680px;
  _width:expression(this.scrollWidth > 680 ? "680px" : "auto");
  font-family: Georgia,"Times New Roman",serif;
  font-size: 16px; /* reset, specified in px so IE currentStyle works */
  background-color: #F7F4F1;
  color: rgba(0, 0, 0, 0.85);
  margin: 8px auto;
  padding: 0 8px;
  -webkit-user-select: text; /* selectable text for Chrome app support */
}

a {
  /* colored underlined links for XULRunner support */
  color: blue;
  text-decoration: underline;
  cursor: pointer;
}

#text {
	line-height: 1.5;
}

#text img {
  max-width: 100%;
}

.statBar {
  background-color: #949291;
  height: 2em;
  line-height: 2em;
  margin: 4px 0;
  width: 300px;
  color: #f7f4f1;
  position: relative; /* to allow absolute positioned value */
  z-index: 0;
}
.opposed {
  background-color: #6D6DFC;
}

table {
  margin-bottom: 1.5em;
}

.statBar > span, .statLine > span {
  position: relative;
  z-index: 1; /* visible over stat value */
  white-space: nowrap; /* remain on single line so we can resize font based on width */
}
.statValue {
  background-color: #ff5955;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: -1;
  /* width will be determined at runtime, 0-100% */
}

.choice label{
    line-height:20px;
    padding: 11px 8px 12px;
    display:block;
    border-color:#a9acaf;
    border-style:solid;
    border-width: 1px 1px 0px 1px
}

.choice .firstChild{
    border-top-width:1px;
    -webkit-border-top-right-radius:8px;
    -webkit-border-top-left-radius:8px;
    border-top-right-radius:8px;
    border-top-left-radius:8px;
}
/* IE doesn't support label:last-child */
.choice .lastChild{
    border-bottom-width:1px;
    -webkit-border-bottom-right-radius:8px;
    -webkit-border-bottom-left-radius:8px;
    -moz-border-radius:0px 0px 8px 8px;
    border-bottom-right-radius:8px;
    border-bottom-left-radius:8px;
}
.choice .onlyChild{
    border-width:1px;
    -webkit-border-radius:8px;
    -moz-border-radius:8px;
    border-radius:8px;
}

.choice .noBorder {
  border-width: 0;
}

input[type="radio"], input[type="checkbox"] {
  margin-right: 8px;
}

.saveGame>label {
  display:block;
}

.choice .disabled {
  color: gray;
}

input[type=password]:disabled {
  background-color: lightgray;
}

/* Reset for Firefox vs. Chrome */
input[type=email],input[type=password] {
  padding: 1px;
  margin: 2px 0;
}

.next {
    clear: both;
    display:block;
    width:100%;
    font-size:25px;
    font-weight:bolder;
    font-family: sans-serif; /* reset, for Android */
    margin-bottom: 16px; /* reset button margin */
    -webkit-appearance: none; /* Safari, don't override my CSS styles */
    color: #f7f4f1; /* Match background color */
    background-color: #626160;
    border: none;
    -webkit-border-radius: 0.5em;
    -moz-border-radius: 0.5em;
    border-radius: 0.5em;
    padding: 6px;
}

.next:hover {
  color: #E4DED8;
}

h1 {
  font-size: x-large;
  font-weight: normal;
}

h2 {
  font-size: large;
  font-weight: normal;
}

#identity {
  float: right;
  display: none;
}

#identity > a {
  display: block;
  text-align: end;
}

#footer {
  margin:10px 0px 75px 0px;
}

#mobileLinks a img {
  border: 0;
}

.mobileBadges {
  margin: 0;
}

.spacedLink {
  margin-right:0.5em;
}

.spacedLink:last-child {
  margin-right:0;
}

#sharelist {
  margin: 0; /* Eliminate leading space before share links */
}

#sharelist li {
  line-height: 1cm; /* Don't let the links bunch up */
}

.alertify-cover {
  background-color: black;
  filter:alpha(opacity=50);
  opacity: 0.5;
}

#greybackground {
    position: fixed;
    width:100%;
    height:100%;
    background-color: black;
    filter:alpha(opacity=50);
    opacity: 0.5;
    top:0;
    left:0;
}

.savePassword {
  font-family: monospace;
  display: block;
}

.webOnly { /* We'll override this in JavaScript */
  display: none;
}

.alignleft {
  display: inline;
  float: left;
  margin-right: 1.625em;
  margin-bottom: 1em;
}
.alignright {
  display: inline;
  float: right;
  margin-left: 1.625em;
  margin-bottom: 1em;
}
.aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1em;
}

#main form {
  clear: both;
}

@media only screen and (max-width: 480px) {
  .definition{
    display: none;
  }

  #headerLinks {
    line-height: 2; /* For tapability */
  }

  .gameTitle {
    display: none;
  }

  #advertisement {
    margin: -8px;
  }

  .mobileBadges {
    float: none;
  }

  #header {
    margin-top: 30px;
  }

  /** Floating images should leave enough room for text */
  #text .alignleft, #text .alignright {
    max-width: 45%;
  }

}


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Clientes | Lucky Ideas</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link href='https://fonts.googleapis.com/css?family=Raleway:300,500,800' rel='stylesheet' type='text/css'>

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


text:
<Alloy>
    <TableViewRow id="deviceRow" alloy_id="{alloy_id}" class="deviceTableViewRow" sortId="{sortId}" platform="ios">

        <Switch id="deviceRowSwitch" class="deviceRowSwitch" titleOn="Visible" />
    </TableViewRow>
    <TableViewRow id="deviceRow" alloy_id="{alloy_id}" className="deviceRow" class="deviceTableViewRow" sortId="{sortId}" platform="android">

        <Switch id="deviceRowSwitch" class="deviceRowSwitch" titleOn="Visible" />

        <Widget id="fa" src="com.mattmcfarland.fontawesome"/>
    </TableViewRow>
</Alloy>


text:
{% extends "master.html" %}

{% block content %}

{{ data }}

{% endblock %}


text:
/**
 * @namespace
 */
var crypto = {};

/**
 * @param {string} name
 * @return {!crypto.Hash}
 */
crypto.createHash = function(name) {};

/**
 * @constructor
 */
crypto.Hash = function() {};

/**
 * @param {string} data
 * @param {string=} opt_encoding
 */
crypto.Hash.prototype.update = function(data, opt_encoding) {};

/**
 * @param {string=} opt_encoding
 * @return {string}
 */
crypto.Hash.prototype.digest = function(opt_encoding) {};


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd">
  <bean id="OrganizationTypeList" parent="OrganizationTypeList-parentBean" />
  <bean id="OrganizationTypeList-parentBean" abstract="true" parent="BusinessObjectEntry">
    <property name="businessObjectClass" value="org.kuali.coeus.common.framework.org.type.OrganizationTypeList" />
		<property name="objectLabel" value="Organization Type List" />
    <property name="inquiryDefinition" >
      <ref bean="OrganizationTypeList-inquiryDefinition" />
    </property>
    <property name="lookupDefinition" >
      <ref bean="OrganizationTypeList-lookupDefinition" />
    </property>
    <property name="titleAttribute" value="code" />
    <property name="attributes" >
      <list>
        <ref bean="OrganizationTypeList-code" />
        <ref bean="OrganizationTypeList-description" />
        <ref bean="OrganizationTypeList-versionNumber" />
      </list>
    </property>
  </bean>

<!-- Attribute Definitions -->

  <bean id="OrganizationTypeList-code" parent="OrganizationTypeList-code-parentBean" />

  <bean id="OrganizationTypeList-code-parentBean" abstract="true" parent="AttributeDefinition">
    <property name="name" value="code" />
    <property name="forceUppercase" value="false" />
    <property name="label" value="Organization Type Code" />
    <property name="shortLabel" value="Organization Type Code" />
    <property name="maxLength" value="3" />
    <property name="validationPattern" >
      <bean parent="NumericValidationPattern" />
    </property>
    <property name="validCharactersConstraint">
      <bean parent="NumericPatternConstraint"/>
    </property>
    <property name="control" >
      <bean parent="TextControlDefinition" p:size="3"/>
    </property>
    <property name="controlField">
      <bean p:size="3" parent="Uif-TextControl"/>
    </property>
    <property name="summary" value="Organization Type Code" />
    <property name="description" value="Organization Type Code" />
  </bean>

  <bean id="OrganizationTypeList-description" parent="OrganizationTypeList-description-parentBean"/>
  <bean id="OrganizationTypeList-description-parentBean" abstract="true" parent="AttributeDefinition">
    <property name="name" value="description" />
    <property name="forceUppercase" value="false" />
    <property name="label" value="Description" />
    <property name="shortLabel" value="Description" />
    <property name="maxLength" value="200" />
    <property name="validationPattern" >
      <bean parent="AnyCharacterValidationPattern" p:allowWhitespace="true"/>
    </property>
    <property name="validCharactersConstraint">
      <bean parent="AnyCharacterPatternConstraint">
        <property name="allowWhitespace" value="true"/>
      </bean>
    </property>
    <property name="control" >
      <bean parent="TextareaControlDefinition" p:rows="5" p:cols="40"/>
    </property>
    <property name="controlField">
      <bean p:rows="5" p:cols="40" parent="Uif-TextAreaControl"/>
    </property>
    <property name="summary" value="Description" />
    <property name="description" value="Description" />
  </bean>

  <bean id="OrganizationTypeList-versionNumber" parent="OrganizationTypeList-versionNumber-parentBean"/>
  <bean id="OrganizationTypeList-versionNumber-parentBean" abstract="true" parent="AttributeReferenceDummy-versionNumber"/>
<!-- Business Object Inquiry Definition -->
  <bean id="OrganizationTypeList-inquiryDefinition" parent="OrganizationTypeList-inquiryDefinition-parentBean" />
  <bean id="OrganizationTypeList-InquiryView" parent="OrganizationTypeList-InquiryView-parentBean"/>
  <bean id="OrganizationTypeList-inquiryDefinition-parentBean" abstract="true" parent="InquiryDefinition">
    <property name="title" value="Organization Type List" />
    <property name="inquirySections" >
      <list>
        <bean parent="InquirySectionDefinition">
          <property name="title" value="Organization Type List" />
          <property name="numberOfColumns" value="1" />
          <property name="inquiryFields" >
            <list>
              <bean parent="FieldDefinition" p:attributeName="code" p:forceInquiry="true"/>
              <bean parent="FieldDefinition" p:attributeName="description"/>
            </list>
          </property>
        </bean>
      </list>
    </property>
  </bean>

  <bean id="OrganizationTypeList-InquiryView-parentBean" abstract="true" parent="Uif-InquiryView">
    <property name="headerText" value="Organization Type List"/>
    <property name="dataObjectClassName" value="org.kuali.coeus.common.framework.org.type.OrganizationTypeList"/>
    <property name="items">
      <list>
        <bean parent="Uif-Disclosure-GridSection">
          <property name="headerText" value="Organization Type List"/>
          <property name="layoutManager.numberOfColumns" value="2"/>
          <property name="items">
            <list>
              <bean p:propertyName="code" parent="Uif-DataField"/>
              <bean p:propertyName="description" parent="Uif-DataField"/>
            </list>
          </property>
        </bean>
      </list>
    </property>
  </bean>

  <!-- Business Object Lookup Definition -->
  <bean id="OrganizationTypeList-lookupDefinition" parent="OrganizationTypeList-lookupDefinition-parentBean" />
  <bean id="OrganizationTypeList-LookupView" parent="OrganizationTypeList-LookupView-parentBean"/>
  <bean id="OrganizationTypeList-lookupDefinition-parentBean" abstract="true" parent="LookupDefinition">
    <property name="title" value="Organization Type List Lookup" /><property name="defaultSort" >
      <bean parent="SortDefinition"/>
    </property>
    <property name="lookupFields" >
      <list>
        <bean parent="FieldDefinition" p:attributeName="code"/>
        <bean parent="FieldDefinition" p:attributeName="description"/>
      </list>
    </property>
    <property name="resultFields">
      <list>
        <bean parent="FieldDefinition" p:attributeName="code" p:forceInquiry="true"/>
        <bean parent="FieldDefinition" p:attributeName="description"/>
      </list>
    </property>
  </bean>

  <bean id="OrganizationTypeList-LookupView-parentBean" abstract="true" parent="Uif-LookupView">
    <property name="dataObjectClassName" value="org.kuali.coeus.common.framework.org.type.OrganizationTypeList"/>
    <property name="headerText" value="Organization Type List Lookup"/>
    <property name="criteriaFields">
      <list>
        <bean p:propertyName="code" parent="Uif-LookupCriteriaInputField"/>
        <bean p:propertyName="description" parent="Uif-LookupCriteriaInputField"/>
      </list>
    </property>
    <property name="resultFields" >
      <list>
        <bean p:propertyName="code" parent="Uif-DataField"/>
        <bean p:propertyName="description" parent="Uif-DataField"/>
      </list>
    </property>
  </bean>
</beans>


text:
#include "ClientRemotingProcessor.h"
#include "MQProtos.h"
#include "TcpTransport.h"
#include "RemotingCommand.h"
#include "MQClientFactory.h"
#include "CommandCustomHeader.h"
#include "ConsumerRunningInfo.h"

namespace rmq
{

ClientRemotingProcessor::ClientRemotingProcessor(MQClientFactory* pMQClientFactory)
    : m_pMQClientFactory(pMQClientFactory)
{

}

RemotingCommand* ClientRemotingProcessor::processRequest(TcpTransport* pTts, RemotingCommand* pRequest)
{
    int code = pRequest->getCode();
    switch (code)
    {
        case CHECK_TRANSACTION_STATE_VALUE:
            return checkTransactionState(pTts, pRequest);
        case NOTIFY_CONSUMER_IDS_CHANGED_VALUE:
            return notifyConsumerIdsChanged(pTts, pRequest);
        case RESET_CONSUMER_CLIENT_OFFSET_VALUE:
            return resetOffset(pTts, pRequest);
        case GET_CONSUMER_STATUS_FROM_CLIENT_VALUE:
            return getConsumeStatus(pTts, pRequest);
        case GET_CONSUMER_RUNNING_INFO_VALUE:
            return getConsumerRunningInfo(pTts, pRequest);
        case CONSUME_MESSAGE_DIRECTLY_VALUE:
            return consumeMessageDirectly(pTts, pRequest);
        default:
            break;
    }

    return NULL;
}

RemotingCommand* ClientRemotingProcessor::checkTransactionState(TcpTransport* pTts, RemotingCommand* pRequest)
{
    //TODO
    return NULL;
}

RemotingCommand* ClientRemotingProcessor::notifyConsumerIdsChanged(TcpTransport* pTts, RemotingCommand* pRequest)
{
    try
    {
        NotifyConsumerIdsChangedRequestHeader* extHeader = (NotifyConsumerIdsChangedRequestHeader*)pRequest->getCommandCustomHeader();
        RMQ_INFO("receive broker's notification[{%s}], the consumer group: {%s} changed, rebalance immediately",
                pTts->getServerAddr().c_str(),
                extHeader->consumerGroup.c_str());
        m_pMQClientFactory->rebalanceImmediately();
    }
    catch (std::exception& e)
    {
        RMQ_ERROR("notifyConsumerIdsChanged exception: %s", e.what());
    }

    return NULL;
}

RemotingCommand* ClientRemotingProcessor::resetOffset(TcpTransport* pTts, RemotingCommand* pRequest)
{
    //TODO
    return NULL;
}

RemotingCommand* ClientRemotingProcessor::getConsumeStatus(TcpTransport* pTts, RemotingCommand* pRequest)
{
    //TODO
    return NULL;
}

RemotingCommand* ClientRemotingProcessor::getConsumerRunningInfo(TcpTransport* pTts, RemotingCommand* pRequest)
{
	return NULL;

	/*
    GetConsumerRunningInfoRequestHeader* requestHeader = (GetConsumerRunningInfoRequestHeader)pRequest->getCommandCustomHeader();
	RemotingCommand* pResponse = RemotingCommand::createResponseCommand(NULL);

	pResponse = RemotingCommand::createResponseCommand(
					REQUEST_CODE_NOT_SUPPORTED_VALUE, "request type not supported", NULL);
	pResponse->setOpaque(pCmd->getOpaque());

    ConsumerRunningInfo* consumerRunningInfo = m_pMQClientFactory->consumerRunningInfo(requestHeader->consumerGroup);
    if (NULL != consumerRunningInfo) {
        response.setCode(ResponseCode.SUCCESS);
        response.setBody(consumerRunningInfo.encode());
    } else {
        response.setCode(ResponseCode.SYSTEM_ERROR);
        response.setRemark(String.format("The Consumer Group <%s> not exist in this consumer",
                requestHeader.getConsumerGroup()));
    }
    return pResponse;

	// java
    final RemotingCommand response = RemotingCommand.createResponseCommand(null);
    final GetConsumerRunningInfoRequestHeader requestHeader =
            (GetConsumerRunningInfoRequestHeader) request
                    .decodeCommandCustomHeader(GetConsumerRunningInfoRequestHeader.class);

    ConsumerRunningInfo consumerRunningInfo =
            this.mqClientFactory.consumerRunningInfo(requestHeader.getConsumerGroup());
    if (null != consumerRunningInfo) {
        if (requestHeader.isJstackEnable()) {
            String jstack = UtilAll.jstack();
            consumerRunningInfo.setJstack(jstack);
        }

        response.setCode(ResponseCode.SUCCESS);
        response.setBody(consumerRunningInfo.encode());
    } else {
        response.setCode(ResponseCode.SYSTEM_ERROR);
        response.setRemark(String.format("The Consumer Group <%s> not exist in this consumer",
                requestHeader.getConsumerGroup()));
    }

    return response;
    */
}

RemotingCommand* ClientRemotingProcessor::consumeMessageDirectly(TcpTransport* pTts, RemotingCommand* pRequest)
{
    //TODO
    return NULL;
}

}


text:
'use strict';

var expect     = require('chai').expect;
var flatten    = require('lodash/array/flatten');
var contains   = require('lodash/collection/contains');
var fs         = require('fs-extra');
var path       = require('path');
var EOL        = require('os').EOL;
var existsSync = require('exists-sync');

/*
  Asserts that a given file exists.

  ```js
  assertFile('some/file.js');
  ```

  You can also make assertions about the file's contents using
  `contains` and `doesNotContain`:

  ```js
  assertFile('some/file.js', {
    contains: [
      'foo',
      /[0-9]+/
    ],
    doesNotContain: 'bar'
  });
  ```

  @method assertFile
  @param {String} file
  @param {Object} options
         Optional extra assertions to perform on the file.
  @param {String, Array} options.contains
         Strings or regular expressions the file must contain.
  @param {String, Array} options.doesNotContain
         Strings or regular expressions the file must *not* contain.
*/
module.exports = function assertFile(file, options) {
  var filePath = path.join(process.cwd(), file);

  expect(existsSync(filePath)).to.equal(true, 'expected ' + file + ' to exist');

  if (!options) {
    return;
  }

  var actual = fs.readFileSync(filePath, { encoding: 'utf-8' });

  if (options.contains) {
    flatten([options.contains]).forEach(function(expected) {
      var pass;

      if (expected.test) {
        pass = expected.test(actual);
      } else {
        pass = contains(actual, expected);
      }

      var message =  'expected: `' + file + '`';
      if (pass) {
        expect(true).to.equal(true, EOL + EOL + 'expected ' + file + ':' + EOL + EOL +
                                    actual +
                                    EOL + 'to contain:' + EOL + EOL +
                                    expected + EOL);
      } else {
        throw new EqualityError(message, actual, expected);
      }
    });
  }

  if (options.doesNotContain) {
    flatten([options.doesNotContain]).forEach(function(unexpected) {
      var pass;

      if (unexpected.test) {
        pass = !unexpected.test(actual);
      } else {
        pass = !contains(actual, unexpected);
      }

      expect(pass).to.equal(true, EOL + EOL + 'expected ' + file + ':' + EOL + EOL +
                                  actual + EOL +
                                  'not to contain:' + EOL + EOL +
                                  unexpected + EOL);
    });
  }
};

function EqualityError(message, actual, expected) {
  this.message = message;
  this.actual = actual;
  this.expected = expected;
  this.showDiff = true;
  Error.captureStackTrace(this, module.exports);
}

EqualityError.prototype = Object.create(Error.prototype);
EqualityError.prototype.name = 'EqualityError';
EqualityError.prototype.constructor = EqualityError;


text:
<?php

class aGlobalButton
{
  protected $label;
  protected $link;
  protected $cssClass;
  protected $targetEnginePage;

  // Use the name when reordering them in app.yml etc. The label will
  // be automatically i18n'd for you

  // 1.5: the $targetEngine parameter never made sense and was not used by globalTools. Your link
  // implies a route which implies an engine. Only $targetEnginePage is in question

  public function __construct($name, $label, $link, $cssClass = '', $targetEnginePage = null)
  {
    $this->name = $name;
    $this->label = $label;
    $this->link = $link;
    $this->cssClass = $cssClass;
    $this->targetEnginePage = $targetEnginePage;
    if ($this->targetEnginePage)
    {
      // 1.5: we've had this sane alternative to pushing and popping engines for a while so use it.
      // It's also possible that you already did this for us and didn't bother passing $targetEnginePage,
      // which is fine

      // Oops, I forgot to add $this->

      $this->link = aUrl::addParams($this->link, array('engine-slug' => $this->targetEnginePage));
    }
  }

  public function getName()
  {
    return $this->name;
  }

  public function getLabel()
  {
    return $this->label;
  }

  public function getLink()
  {
    return $this->link;
  }

  public function getCssClass()
  {
    return $this->cssClass;
  }

  public function getTargetEnginePage()
  {
    return $this->targetEnginePage;
  }

  public function getTargetEngine()
  {
    return $this->targetEngine;
  }

  public function setLabel($l)
  {
    $this->label = $l;
  }
}


text:
@interface ZHBaseSettingViewController ()

@end

@implementation ZHBaseSettingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNaviBar];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(changeTheme) name:@"theme" object:nil];
}
- (void)changeTheme
{
    [self.navigationController.navigationBar setBackgroundImage:[UIImage colorfulPicture:[ZHSkinTool skinToolWithNorBGColor] withSize:CGSizeMake(375, 64)] forBarMetrics:UIBarMetricsDefault];
}

//创建子控件
- (void)setupNaviBar
{
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithNormalImageName:@"topbar_left_ic_back_default" highlitedImageName:@"topbar_left_ic_back_pressed" imageEdgeInsets:UIEdgeInsetsMake(0, -20, 0, 20) andTarget:self action:@selector(back)];
}

- (void) back
{
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - 懒加载
- (NSMutableArray *)ItemsGroupDatas
{
    if (_ItemsGroupDatas == nil) {
        _ItemsGroupDatas = [NSMutableArray array];
    }
    return _ItemsGroupDatas;
}

#pragma mark - 初始化方法
- (id)init
{
    if (self = [super initWithStyle:UITableViewStylePlain]) {
        self.tableView.backgroundColor = tableViewBGColor;
    }
    return self;
}

- (id)initWithStyle:(UITableViewStyle)style
{
    return [super initWithStyle:UITableViewStylePlain];
}

#pragma mark - UITableViewDatasource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return self.ItemsGroupDatas.count;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    // 先取出对应组的小数组
    ZHSettingItemGroup *g = self.ItemsGroupDatas[section];
    // 返回小数组的长度
    return g.items.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    // 1.创建cell
    ZHSettingCell *cell = [ZHSettingCell cellWithTableView:tableView];

    // 先取出对应组的组模型
    ZHSettingItemGroup *g = self.ItemsGroupDatas[indexPath.section];
    //  从组模型中取出对应行的模型
    ZHSettingItem *item = g.items[indexPath.row];
    cell.item = item;

    // 3.返回cell
    return cell;
}

#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    // 立即取消选中
    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];

    // 先取出对应组的组模型
    ZHSettingItemGroup *g = self.ItemsGroupDatas[indexPath.section];
    //  从组模型中取出对应行的模型
    ZHSettingItem *item = g.items[indexPath.row];
    // 判断block中是否保存了代码
    if (item.optionBlock) {
        // 如果保存,就执行block中保存的代码
        item.optionBlock();
    }else if ([item isKindOfClass:[ZHSettingArrowItem class]]||[item isKindOfClass:[ZHSettingButtonItem class]]) {
        // 创建目标控制并且添加到栈中
        ZHSettingArrowItem *arrowItem = (ZHSettingArrowItem *)item;

        UIViewController *vc = [[arrowItem.destVC alloc] init];
        // 设置目标控制器导航条的标题
        vc.title = arrowItem.title;
        [self.navigationController pushViewController:vc animated:YES];
    }
}
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
{
    ZHSettingItemGroup *g = self.ItemsGroupDatas[section];
    return g.footerTitle;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    ZHSettingItemGroup *g = self.ItemsGroupDatas[section];
//
    if (g.footerTitle) {
        return 20;
    }
    return 0.1;

}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 20;
}

#pragma mark dealloc
- (void)dealloc
{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end


text:
title: "'Spider-Man: Into the Spider-Verse' Official Trailer #2"
date: 2018-10-02 10:22:00 -05:00
tags:
- movies
- Marvel
- Spider-Man
custom_type: post
excerpt: As much as I love live-action Spider-Man, I'm really excited about this.
featured_image: "/uploads/spider-verse-featured-image.jpg"
---

As much as I love live-action Spider-Man, I'm really excited about this. The movie looks funny and action packed, yet have some pretty great character moments too. Oh and [the cast](https://en.wikipedia.org/wiki/Spider-Man:_Into_the_Spider-Verse#Cast)! Holy moly!

*Spider-Man: Into the Spider-Verse* debuts on December 14, 2018.


text:
class BacklinksController < ApplicationController
  respond_to :json

  before_action :find_space, :find_tiddler

  def index
    @backlinks = @tiddler.back_links(current_user)
    respond_with @backlinks
  end

  private

  def find_space
    begin
      @space = Space.visible_to_user(current_user).find(params[:space_id])
    rescue ActiveRecord::RecordNotFound
      not_found "Space"
    end
  end

  def find_tiddler
    begin
      @tiddler = @space.tiddlers.find(params[:tiddler_id])
    rescue ActiveRecord::RecordNotFound
      not_found "Tiddler"
    end
  end
end


text:
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  ~
-->

# MXNet Static Build

This folder contains the core script used to build the static library. This README provides information on how to use the scripts in this folder. Please be aware, all of the scripts are designed to be run under the root folder.

## `build.sh`
This script is a wrapper around `build_lib.sh. It simplifies the build by
automatically identifing the system version, number of cores, and all
environment variable settings. Here are examples you can run with this script:

You need to install `patchelf` first, for example via `apt install patchelf` on
Ubuntu systems.

```
tools/staticbuild/build.sh cu112
```
This would build the mxnet package based on CUDA 11.2. Currently, we support variants cpu, native, cu101, cu102, cu110, and cu112. All of these variants expect native have oneDNN backend enabled.

```
tools/staticbuild/build.sh cpu
```

This would build the mxnet package based on oneDNN.

As the result, users would have a complete static dependencies in `/staticdeps` in the root folder as well as a static-linked `libmxnet.so` file lives in `lib`. You can build your language binding by using the `libmxnet.so`.

## `build_lib.sh`
This script clones the most up-to-date master and builds the MXNet backend with a static library. In order to run the static library, you must set the following environment variables:

- `DEPS_PATH` Path to your static dependencies
- `PLATFORM` linux, darwin
- `VARIANT` cpu, cu*

It is not recommended to run this file alone since there are a bunch of variables need to be set.

After running this script, you would have everything you need ready in the `/lib` folder.

## `build_wheel.sh`
This script builds the python package. It also runs a sanity test.


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

class Migration(SchemaMigration):

    def forwards(self, orm):

        # Adding model 'Monster'
        db.create_table('dnd_monster', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('rulebook', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dnd.Rulebook'])),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)),
            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=32, db_index=True)),
            ('page', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)),
            ('size', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dnd.RaceSize'], null=True)),
            ('type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dnd.MonsterType'])),
            ('hit_dice', self.gf('django.db.models.fields.CharField')(max_length=32)),
            ('initiative', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('armor_class', self.gf('django.db.models.fields.CharField')(default='32 (\xe2\x80\x931 size, +4 Dex, +19 natural)', max_length=128)),
            ('touch_armor_class', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('flat_footed_armor_class', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('base_attack', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('grapple', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('attack', self.gf('django.db.models.fields.CharField')(default='+3 greatsword +23 melee (3d6+13/19\xe2\x80\x9320) or slam +20 melee (2d8+10)', max_length=128)),
            ('full_attack', self.gf('django.db.models.fields.CharField')(default='+3 greatsword +23/+18/+13 melee (3d6+13/19\xe2\x80\x9320) or slam +20 melee (2d8+10)', max_length=128)),
            ('space', self.gf('django.db.models.fields.PositiveSmallIntegerField')()),
            ('reach', self.gf('django.db.models.fields.PositiveSmallIntegerField')()),
            ('special_attacks', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
            ('special_qualities', self.gf('django.db.models.fields.CharField')(max_length=512, blank=True)),
            ('fort_save', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('fort_save_extra', self.gf('django.db.models.fields.CharField')(max_length=32, blank=True)),
            ('reflex_save', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('reflex_save_extra', self.gf('django.db.models.fields.CharField')(max_length=32, blank=True)),
            ('will_save', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('will_save_extra', self.gf('django.db.models.fields.CharField')(max_length=32, blank=True)),
            ('str', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('dex', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('con', self.gf('django.db.models.fields.SmallIntegerField')(null=True, blank=True)),
            ('int', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('wis', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('cha', self.gf('django.db.models.fields.SmallIntegerField')()),
            ('environment', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
            ('organization', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
            ('challenge_rating', self.gf('django.db.models.fields.PositiveSmallIntegerField')()),
            ('treasure', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
            ('alignment', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)),
            ('advancement', self.gf('django.db.models.fields.CharField')(max_length=64, blank=True)),
            ('level_adjustment', self.gf('django.db.models.fields.SmallIntegerField')(null=True, blank=True)),
            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('description_html', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('combat', self.gf('django.db.models.fields.TextField')(blank=True)),
            ('combat_html', self.gf('django.db.models.fields.TextField')(blank=True)),
        ))
        db.send_create_signal('dnd', ['Monster'])

        # Adding M2M table for field subtypes on 'Monster'
        db.create_table('dnd_monster_subtypes', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('monster', models.ForeignKey(orm['dnd.monster'], null=False)),
            ('monstersubtype', models.ForeignKey(orm['dnd.monstersubtype'], null=False))
        ))
        db.create_unique('dnd_monster_subtypes', ['monster_id', 'monstersubtype_id'])

        # Adding unique constraint on 'Monster', fields ['name', 'rulebook']
        db.create_unique('dnd_monster', ['name', 'rulebook_id'])

        # Adding model 'MonsterType'
        db.create_table('dnd_monstertype', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)),
            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=32, db_index=True)),
        ))
        db.send_create_signal('dnd', ['MonsterType'])

        # Adding model 'MonsterSpeed'
        db.create_table('dnd_monsterspeed', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('race', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dnd.Monster'])),
            ('type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='+', to=orm['dnd.RaceSpeedType'])),
            ('speed', self.gf('django.db.models.fields.PositiveSmallIntegerField')()),
        ))
        db.send_create_signal('dnd', ['MonsterSpeed'])

        # Adding model 'MonsterSubtype'
        db.create_table('dnd_monstersubtype', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=32, db_index=True)),
            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=32, db_index=True)),
        ))
        db.send_create_signal('dnd', ['MonsterSubtype'])

        # Changing field 'Race.con'
        db.alter_column('dnd_race', 'con', self.gf('django.db.models.fields.SmallIntegerField')(null=True))

    def backwards(self, orm):

        # Removing unique constraint on 'Monster', fields ['name', 'rulebook']
        db.delete_unique('dnd_monster', ['name', 'rulebook_id'])

        # Deleting model 'Monster'
        db.delete_table('dnd_monster')

        # Removing M2M table for field subtypes on 'Monster'
        db.delete_table('dnd_monster_subtypes')

        # Deleting model 'MonsterType'
        db.delete_table('dnd_monstertype')

        # Deleting model 'MonsterSpeed'
        db.delete_table('dnd_monsterspeed')

        # Deleting model 'MonsterSubtype'
        db.delete_table('dnd_monstersubtype')

        # Changing field 'Race.con'
        db.alter_column('dnd_race', 'con', self.gf('django.db.models.fields.SmallIntegerField')())

    models = {
        'dnd.characterclass': {
            'Meta': {'ordering': "['name']", 'object_name': 'CharacterClass'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
            'prestige': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'short_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'short_description_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'})
        },
        'dnd.characterclassvariant': {
            'Meta': {'unique_together': "(('character_class', 'rulebook'),)", 'object_name': 'CharacterClassVariant'},
            'advancement': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'advancement_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'alignment': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
            'character_class': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.CharacterClass']"}),
            'class_features': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'class_features_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'class_skills': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dnd.Skill']", 'symmetrical': 'False'}),
            'hit_die': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'page': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'required_bab': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'requirements': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'requirements_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'rulebook': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Rulebook']"}),
            'skill_points': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'})
        },
        'dnd.characterclassvariantrequiresfeat': {
            'Meta': {'object_name': 'CharacterClassVariantRequiresFeat'},
            'character_class_variant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'required_feats'", 'to': "orm['dnd.CharacterClassVariant']"}),
            'extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'feat': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Feat']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
        },
        'dnd.characterclassvariantrequiresrace': {
            'Meta': {'object_name': 'CharacterClassVariantRequiresRace'},
            'character_class_variant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'required_races'", 'to': "orm['dnd.CharacterClassVariant']"}),
            'extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'race': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Race']"})
        },
        'dnd.characterclassvariantrequiresskill': {
            'Meta': {'object_name': 'CharacterClassVariantRequiresSkill'},
            'character_class_variant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'required_skills'", 'to': "orm['dnd.CharacterClassVariant']"}),
            'extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'ranks': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'skill': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Skill']"})
        },
        'dnd.dndedition': {
            'Meta': {'ordering': "['name']", 'object_name': 'DndEdition'},
            'core': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'}),
            'system': ('django.db.models.fields.CharField', [], {'max_length': '16'})
        },
        'dnd.domain': {
            'Meta': {'ordering': "['name']", 'object_name': 'Domain'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'})
        },
        'dnd.feat': {
            'Meta': {'ordering': "['name']", 'unique_together': "(('name', 'rulebook'),)", 'object_name': 'Feat'},
            'benefit': ('django.db.models.fields.TextField', [], {}),
            'benefit_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {}),
            'description_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'feat_categories': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dnd.FeatCategory']", 'symmetrical': 'False'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
            'normal': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'normal_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'page': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'rulebook': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Rulebook']"}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'db_index': 'True'}),
            'special': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'special_feat_prerequisites': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dnd.SpecialFeatPrerequisite']", 'through': "orm['dnd.FeatSpecialFeatPrerequisite']", 'symmetrical': 'False'}),
            'special_html': ('django.db.models.fields.TextField', [], {'blank': 'True'})
        },
        'dnd.featcategory': {
            'Meta': {'ordering': "['name']", 'object_name': 'FeatCategory'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'})
        },
        'dnd.featrequiresfeat': {
            'Meta': {'object_name': 'FeatRequiresFeat'},
            'additional_text': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'required_feat': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'required_by_feats'", 'to': "orm['dnd.Feat']"}),
            'source_feat': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'required_feats'", 'to': "orm['dnd.Feat']"})
        },
        'dnd.featrequiresskill': {
            'Meta': {'object_name': 'FeatRequiresSkill'},
            'extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'feat': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'required_skills'", 'to': "orm['dnd.Feat']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'min_rank': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'skill': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Skill']"})
        },
        'dnd.featspecialfeatprerequisite': {
            'Meta': {'object_name': 'FeatSpecialFeatPrerequisite'},
            'feat': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Feat']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'special_feat_prerequisite': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.SpecialFeatPrerequisite']"}),
            'value_1': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
            'value_2': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'})
        },
        'dnd.monster': {
            'Meta': {'ordering': "['name']", 'unique_together': "(('name', 'rulebook'),)", 'object_name': 'Monster'},
            'advancement': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
            'alignment': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
            'armor_class': ('django.db.models.fields.CharField', [], {'default': "'32 (\\xe2\\x80\\x931 size, +4 Dex, +19 natural)'", 'max_length': '128'}),
            'attack': ('django.db.models.fields.CharField', [], {'default': "'+3 greatsword +23 melee (3d6+13/19\\xe2\\x80\\x9320) or slam +20 melee (2d8+10)'", 'max_length': '128'}),
            'base_attack': ('django.db.models.fields.SmallIntegerField', [], {}),
            'cha': ('django.db.models.fields.SmallIntegerField', [], {}),
            'challenge_rating': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'combat': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'combat_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'con': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'description_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'dex': ('django.db.models.fields.SmallIntegerField', [], {}),
            'environment': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
            'flat_footed_armor_class': ('django.db.models.fields.SmallIntegerField', [], {}),
            'fort_save': ('django.db.models.fields.SmallIntegerField', [], {}),
            'fort_save_extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'full_attack': ('django.db.models.fields.CharField', [], {'default': "'+3 greatsword +23/+18/+13 melee (3d6+13/19\\xe2\\x80\\x9320) or slam +20 melee (2d8+10)'", 'max_length': '128'}),
            'grapple': ('django.db.models.fields.SmallIntegerField', [], {}),
            'hit_dice': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'initiative': ('django.db.models.fields.SmallIntegerField', [], {}),
            'int': ('django.db.models.fields.SmallIntegerField', [], {}),
            'level_adjustment': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
            'organization': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
            'page': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'reach': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'reflex_save': ('django.db.models.fields.SmallIntegerField', [], {}),
            'reflex_save_extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'rulebook': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Rulebook']"}),
            'size': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.RaceSize']", 'null': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '32', 'db_index': 'True'}),
            'space': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'special_attacks': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
            'special_qualities': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
            'str': ('django.db.models.fields.SmallIntegerField', [], {}),
            'subtypes': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dnd.MonsterSubtype']", 'symmetrical': 'False'}),
            'touch_armor_class': ('django.db.models.fields.SmallIntegerField', [], {}),
            'treasure': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
            'type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.MonsterType']"}),
            'will_save': ('django.db.models.fields.SmallIntegerField', [], {}),
            'will_save_extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'wis': ('django.db.models.fields.SmallIntegerField', [], {})
        },
        'dnd.monsterspeed': {
            'Meta': {'object_name': 'MonsterSpeed'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'race': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Monster']"}),
            'speed': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['dnd.RaceSpeedType']"})
        },
        'dnd.monstersubtype': {
            'Meta': {'object_name': 'MonsterSubtype'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '32', 'db_index': 'True'})
        },
        'dnd.monstertype': {
            'Meta': {'object_name': 'MonsterType'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '32', 'db_index': 'True'})
        },
        'dnd.newsentry': {
            'Meta': {'ordering': "['-published']", 'object_name': 'NewsEntry'},
            'body': ('django.db.models.fields.TextField', [], {}),
            'body_html': ('django.db.models.fields.TextField', [], {}),
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'published': ('django.db.models.fields.DateField', [], {}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '64'})
        },
        'dnd.race': {
            'Meta': {'ordering': "['name']", 'unique_together': "(('name', 'rulebook'),)", 'object_name': 'Race'},
            'cha': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
            'combat': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'combat_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'con': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'description_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'dex': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'int': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
            'level_adjustment': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
            'page': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'racial_traits': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'racial_traits_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'reach': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '5'}),
            'rulebook': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Rulebook']"}),
            'size': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.RaceSize']", 'null': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '32', 'db_index': 'True'}),
            'space': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '5'}),
            'str': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}),
            'wis': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'})
        },
        'dnd.racefavoredcharacterclass': {
            'Meta': {'object_name': 'RaceFavoredCharacterClass'},
            'character_class': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.CharacterClass']"}),
            'extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'race': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'favored_classes'", 'to': "orm['dnd.Race']"})
        },
        'dnd.racesize': {
            'Meta': {'ordering': "['order']", 'object_name': 'RaceSize'},
            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
            'order': ('django.db.models.fields.PositiveSmallIntegerField', [], {})
        },
        'dnd.racespeed': {
            'Meta': {'object_name': 'RaceSpeed'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'race': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Race']"}),
            'speed': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['dnd.RaceSpeedType']"})
        },
        'dnd.racespeedtype': {
            'Meta': {'ordering': "['name', 'extra']", 'object_name': 'RaceSpeedType'},
            'extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'})
        },
        'dnd.rulebook': {
            'Meta': {'ordering': "['name']", 'object_name': 'Rulebook'},
            'abbr': ('django.db.models.fields.CharField', [], {'max_length': '7'}),
            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'dnd_edition': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.DndEdition']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
            'official_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}),
            'published': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128', 'db_index': 'True'}),
            'year': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'})
        },
        'dnd.skill': {
            'Meta': {'ordering': "['name']", 'object_name': 'Skill'},
            'armor_check_penalty': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'base_skill': ('django.db.models.fields.CharField', [], {'max_length': '4'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}),
            'required_by_feats': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dnd.Feat']", 'through': "orm['dnd.FeatRequiresSkill']", 'symmetrical': 'False'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'}),
            'trained_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
        },
        'dnd.skillvariant': {
            'Meta': {'unique_together': "(('skill', 'rulebook'),)", 'object_name': 'SkillVariant'},
            'action': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'action_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'check': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'check_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'description_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'page': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'rulebook': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Rulebook']"}),
            'skill': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Skill']"}),
            'special': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'special_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'synergy': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'synergy_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'try_again': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'try_again_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'untrained': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'untrained_html': ('django.db.models.fields.TextField', [], {'blank': 'True'})
        },
        'dnd.specialfeatprerequisite': {
            'Meta': {'ordering': "['name']", 'object_name': 'SpecialFeatPrerequisite'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}),
            'print_format': ('django.db.models.fields.CharField', [], {'max_length': '64'})
        },
        'dnd.spell': {
            'Meta': {'ordering': "['name']", 'unique_together': "(('name', 'rulebook'),)", 'object_name': 'Spell'},
            'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'arcane_focus_component': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'area': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
            'casting_time': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
            'class_levels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dnd.CharacterClass']", 'through': "orm['dnd.SpellClassLevel']", 'symmetrical': 'False'}),
            'description': ('django.db.models.fields.TextField', [], {}),
            'description_html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'descriptors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dnd.SpellDescriptor']", 'symmetrical': 'False', 'blank': 'True'}),
            'divine_focus_component': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'domain_levels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['dnd.Domain']", 'through': "orm['dnd.SpellDomainLevel']", 'symmetrical': 'False'}),
            'duration': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
            'effect': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
            'extra_components': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'material_component': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'meta_breath_component': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
            'page': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'range': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
            'rulebook': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Rulebook']"}),
            'saving_throw': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
            'school': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.SpellSchool']"}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'db_index': 'True'}),
            'somatic_component': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'spell_resistance': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
            'sub_school': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.SpellSubSchool']", 'null': 'True', 'blank': 'True'}),
            'target': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
            'true_name_component': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'verbal_component': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'xp_component': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
        },
        'dnd.spellclasslevel': {
            'Meta': {'ordering': "['spell', 'level']", 'unique_together': "(('character_class', 'spell'),)", 'object_name': 'SpellClassLevel'},
            'character_class': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.CharacterClass']"}),
            'extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'level': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'spell': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Spell']"})
        },
        'dnd.spelldescriptor': {
            'Meta': {'ordering': "['name']", 'object_name': 'SpellDescriptor'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '64', 'db_index': 'True'})
        },
        'dnd.spelldomainlevel': {
            'Meta': {'ordering': "['spell', 'level']", 'unique_together': "(('domain', 'spell'),)", 'object_name': 'SpellDomainLevel'},
            'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Domain']"}),
            'extra': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'level': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
            'spell': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Spell']"})
        },
        'dnd.spellschool': {
            'Meta': {'ordering': "['name']", 'object_name': 'SpellSchool'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'})
        },
        'dnd.spellsubschool': {
            'Meta': {'ordering': "['name']", 'object_name': 'SpellSubSchool'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '32', 'db_index': 'True'})
        },
        'dnd.staticpage': {
            'Meta': {'object_name': 'StaticPage'},
            'body': ('django.db.models.fields.TextField', [], {}),
            'body_html': ('django.db.models.fields.TextField', [], {}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
        },
        'dnd.textfeatprerequisite': {
            'Meta': {'ordering': "['text']", 'object_name': 'TextFeatPrerequisite'},
            'feat': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['dnd.Feat']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'text': ('django.db.models.fields.CharField', [], {'max_length': '256'})
        }
    }

    complete_apps = ['dnd']


text:
/**
 * J2D (jQuery plugin of the fork j2ds)
 *
 * @authors Skaner, likerRr, DeVinterX
 * @license zlib
 * @version 0.1.4
 * @see https://github.com/SkanerSoft/J2ds/commit/501b8993fc41960794572dc481a5f2fe492da349
 */

!function (root, factory) {
    if (typeof define === 'function' && define.amd) {
        define('j2d.textures', ['jquery.j2d'], factory);
    } else {
        factory(root.J2D);
    }
}(global, function (J2D) {
    "use strict";

    var TextureManager = {
        loadImageMap: false,   // загрузка из файла
        createImageMap: false,    // создание анимации напрямую, минуя imageMap
        templates: {}
    };

    TextureManager.createImageMap = function (width, height, callback) {
        var imageObject = {
            img: undefined,
            width: width,
            height: height
        };

        imageObject.img = document.createElement('canvas');
        imageObject.context = imageObject.img.getContext('2d');
        imageObject.img.width = imageObject.width;
        imageObject.img.height = imageObject.height;

        J2D.util.disableSmoothing(imageObject.context);

        callback(imageObject.context);

        /* Функции */
        imageObject.getAnimation = function (sourceX, sourceY, sourceW, sourceH, frameCount) {
            return {
                imageMap: this,
                sourceX: sourceX,
                sourceY: sourceY,
                sourceW: sourceW,
                sourceH: sourceH,
                frameCount: frameCount - 1
            };
        };

        return imageObject;
    };

    TextureManager.loadImageMap = function (path, callback) {
        var imageObject = {
            img: undefined,
            width: 0,
            height: 0,
            loaded: false
        };

        imageObject.img = document.createElement('img');
        imageObject.crossOrigin = 'anonymous';
        imageObject.img.src = path;
        imageObject.img.onload = function () {
            imageObject.width = imageObject.img.width;
            imageObject.height = imageObject.img.height;
            imageObject.loaded = true;

            if (callback) callback();
        };
        /* Свойства */

        /* Функции */
        imageObject.getAnimation = function (sourceX, sourceY, sourceW, sourceH, frameCount) {
            return {
                imageMap: this,
                sourceX: sourceX,
                sourceY: sourceY,
                sourceW: sourceW,
                sourceH: sourceH,
                frameCount: frameCount - 1
            };
        };

        return imageObject;
    };

    /*----------- шаблоны текстур -------------*/

    TextureManager.templates.ellipsis = function (context, size, color) {

    };

    TextureManager.templates.fillRect = function (context, size, color) {
        context.fillStyle = color;
        context.fillRect(0, 0, size.x, size.y);
    };

    TextureManager.templates.strokeRect = function (context, size, color, lineWidth) {
        context.strokeStyle = color;
        context.lineWidth = lineWidth;
        context.strokeRect(0, 0, size.x, size.y);
    };

    TextureManager.templates.gradientL = function (context, size, colors, izHorizontal) {
        var gradient = context.createLinearGradient(0, 0, size.x, 0);
        var step = 1 / colors.length;
        if (!izHorizontal) {
            gradient = context.createLinearGradient(0, 0, 0, size.y);
        }
        for (var i = step / 2, j = 0; j < colors.length; j += 1, i += step) {
            gradient.addColorStop(i, colors[j]);
        }
        context.fillStyle = gradient;
        context.fillRect(0, 0, size.x, size.y);
    };

    TextureManager.templates.gradientR = function (context, size, pos1, r1, pos2, r2, colors) {
        var gradient = context.createRadialGradient(pos1.x, pos1.y, r1, pos2.x, pos2.y, r2);
        var step = 1 / colors.length;
        for (var i = step / 2, j = 0; j < colors.length; j += 1, i += step) {
            gradient.addColorStop(i, colors[j]);
        }
        context.fillStyle = gradient;
        context.fillRect(0, 0, size.x, size.y);
    };

    J2D.prototype.getTextureManager = function () {
        return TextureManager;
    };

    if (global.J2D !== undefined) global.TextureManager = TextureManager;
    return TextureManager;
});


text:
package org.apache.ignite.internal.util.future;

import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import java.util.concurrent.locks.LockSupport;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.internal.IgniteFutureCancelledCheckedException;
import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.internal.A;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteClosure;
import org.apache.ignite.lang.IgniteInClosure;
import org.jetbrains.annotations.Async;
import org.jetbrains.annotations.Nullable;

/**
 * Future adapter.
 */
public class GridFutureAdapter<R> implements IgniteInternalFuture<R> {
    /** Done state representation. */
    private static final String DONE = "DONE";

    /** Initial state. */
    private static final Node INIT = new Node(null);

    /** Cancelled state. */
    private static final Object CANCELLED = new Object();

    /** */
    private static final AtomicReferenceFieldUpdater<GridFutureAdapter, Object> stateUpdater =
        AtomicReferenceFieldUpdater.newUpdater(GridFutureAdapter.class, Object.class, "state");

    /*
     * https://bugs.openjdk.java.net/browse/JDK-8074773
     */
    static {
        @SuppressWarnings("unused")
        Class<?> ensureLoaded = LockSupport.class;
    }

    /**
     * Stack node.
     */
    private static final class Node {
        /** */
        private final Object val;

        /** */
        private volatile Node next;

        /**
         * @param val Node value.
         */
        Node(Object val) {
            this.val = val;
        }
    }

    /** */
    private static final class ErrorWrapper {
        /** */
        private final Throwable error;

        /**
         * @param error Error.
         */
        ErrorWrapper(Throwable error) {
            this.error = error;
        }

        /** {@inheritDoc} */
        @Override public String toString() {
            return String.valueOf(error);
        }
    }

    /** */
    private volatile boolean ignoreInterrupts;

    /** */
    @GridToStringExclude
    private volatile Object state = INIT;

    /**
     * Determines whether the future will ignore interrupts while waiting for result in {@code get()} methods.
     * This call should <i>happen before</i> subsequent {@code get()} in order to have guaranteed effect.
     */
    public void ignoreInterrupts() {
        ignoreInterrupts = true;
    }

    /** {@inheritDoc} */
    @Override public Throwable error() {
        Object state0 = state;

        if (state0 != null && state0.getClass() == ErrorWrapper.class)
            return ((ErrorWrapper)state0).error;

        return null;
    }

    /** {@inheritDoc} */
    @Override public R result() {
        Object state0 = state;

        if(state0 == null ||                           // It is DONE state
           (state0.getClass() != Node.class &&         // It is not INIT state
            state0.getClass() != ErrorWrapper.class && // It is not FAILED
            state0 != CANCELLED))                      // It is not CANCELLED
            return (R)state0;

        return null;
    }

    /** {@inheritDoc} */
    @Override public R get() throws IgniteCheckedException {
        return get0(ignoreInterrupts);
    }

    /** {@inheritDoc} */
    @Override public R getUninterruptibly() throws IgniteCheckedException {
        return get0(true);
    }

    /** {@inheritDoc} */
    @Override public R get(long timeout) throws IgniteCheckedException {
        // Do not replace with static import, as it may not compile.
        return get(timeout, TimeUnit.MILLISECONDS);
    }

    /** {@inheritDoc} */
    @Override public R get(long timeout, TimeUnit unit) throws IgniteCheckedException {
        A.ensure(timeout >= 0, "timeout cannot be negative: " + timeout);
        A.notNull(unit, "unit");

        return get0(ignoreInterrupts, unit.toNanos(timeout));
    }

    /**
     * Internal get routine.
     *
     * @param ignoreInterrupts Whether to ignore interrupts.
     * @return Result.
     * @throws IgniteCheckedException If failed.
     */
    private R get0(boolean ignoreInterrupts) throws IgniteCheckedException {
        if (isDone() || !registerWaiter(Thread.currentThread()))
            return resolve();

        boolean interrupted = false;

        try {
            while (true) {
                LockSupport.park();

                if (Thread.interrupted()) {
                    interrupted = true;

                    if (!ignoreInterrupts) {
                        unregisterWaiter();

                        throw new IgniteInterruptedCheckedException("Got interrupted while waiting for future to complete.");
                    }
                }

                if (isDone())
                    return resolve();
            }
        }
        finally {
            if (interrupted)
                Thread.currentThread().interrupt();
        }
    }

    /**
     * @param ignoreInterrupts Whether to ignore interrupts.
     * @param nanosTimeout Timeout (nanoseconds).
     * @return Result.
     * @throws IgniteFutureTimeoutCheckedException If timeout reached before computation completed.
     * @throws IgniteCheckedException If error occurred.
     */
    @Nullable private R get0(boolean ignoreInterrupts, long nanosTimeout) throws IgniteCheckedException {
        if (isDone() || !registerWaiter(Thread.currentThread()))
            return resolve();

        long deadlineNanos = System.nanoTime() + nanosTimeout;

        boolean interrupted = false;

        try {
            long nanosTimeout0 = nanosTimeout;

            while (nanosTimeout0 > 0) {
                LockSupport.parkNanos(nanosTimeout0);

                nanosTimeout0 = deadlineNanos - System.nanoTime();

                if (Thread.interrupted()) {
                    interrupted = true;

                    if (!ignoreInterrupts) {
                        unregisterWaiter();

                        throw new IgniteInterruptedCheckedException("Got interrupted while waiting for future to complete.");
                    }
                }

                if (isDone())
                    return resolve();
            }
        }
        finally {
            if (interrupted)
                Thread.currentThread().interrupt();
        }

        unregisterWaiter();

        throw new IgniteFutureTimeoutCheckedException("Timeout was reached before computation completed.");
    }

    /**
     * Resolves the value to result or exception.
     *
     * @return Result.
     * @throws IgniteCheckedException If resolved to exception.
     */
    private R resolve() throws IgniteCheckedException {
        if (state == CANCELLED)
            throw new IgniteFutureCancelledCheckedException("Future was cancelled: " + this);

        if (state == null || state.getClass() != ErrorWrapper.class)
            return (R)state;

        throw U.cast(((ErrorWrapper)state).error);
    }

    /**
     * @param waiter Waiter to register.
     * @return {@code True} if was registered successfully.
     */
    private boolean registerWaiter(Object waiter) {
        Node node = null;

        while (true) {
            final Object oldState = state;

            if (isDone(oldState))
                return false;

            if(node == null)
                node = new Node(waiter);

            if(oldState != INIT && oldState.getClass() == Node.class)
                node.next = (Node)oldState;

            if (compareAndSetState(oldState, node))
                return true;
        }
    }

    /**
     * Unregisters current thread from waiters list.
     */
    private void unregisterWaiter() {
        Node prev = null;
        Object cur = state;

        while (cur != null) {
            if(cur.getClass() != Node.class)
                return;

            Object curWaiter = ((Node)cur).val;
            Node next = ((Node)cur).next;

            if (curWaiter == Thread.currentThread()) {
                if (prev == null) {
                    Object n = next == null ? INIT : next;

                    cur = compareAndSetState(cur, n) ? null : state;
                }
                else {
                    prev.next = next;

                    cur = null;
                }
            }
            else {
                prev = (Node)cur;

                cur = next;
            }
        }
    }

    /**
     * @param exp Expected state.
     * @param newState New state.
     * @return {@code True} if success
     */
    private boolean compareAndSetState(Object exp, Object newState) {
        return stateUpdater.compareAndSet(this, exp, newState);
    }

    /**
     * @param head Head of waiters stack.
     */
    private void unblockAll(Node head) {
        while (head != null) {
            unblock(head.val);
            head = head.next;
        }
    }

    /**
     * @param waiter Waiter to unblock
     */
    private void unblock(Object waiter) {
        if (waiter instanceof Thread)
            LockSupport.unpark((Thread)waiter);
        else
            notifyListener((IgniteInClosure<? super IgniteInternalFuture<R>>)waiter);
    }

    /** {@inheritDoc} */
    @Async.Schedule
    @Override public void listen(IgniteInClosure<? super IgniteInternalFuture<R>> lsnr) {
        if (!registerWaiter(lsnr))
            notifyListener(lsnr);
    }

    /** {@inheritDoc} */
    @Override public <T> IgniteInternalFuture<T> chain(
        IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb
    ) {
        ChainFuture<R, T> fut = new ChainFuture<>(this, doneCb, null);

        if (ignoreInterrupts)
            fut.ignoreInterrupts();

        return fut;
    }

    /** {@inheritDoc} */
    @Override public <T> IgniteInternalFuture<T> chain(
        IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb,
        Executor exec
    ) {
        ChainFuture<R, T> fut = new ChainFuture<>(this, doneCb, exec);

        if (ignoreInterrupts)
            fut.ignoreInterrupts();

        return fut;
    }

    /**
     * @return Logger instance.
     */
    @Nullable public IgniteLogger logger() {
        return null;
    }

    /**
     * Notifies listener.
     *
     * @param lsnr Listener.
     */
    @Async.Execute
    private void notifyListener(IgniteInClosure<? super IgniteInternalFuture<R>> lsnr) {
        assert lsnr != null;

        try {
            lsnr.apply(this);
        }
        catch (IllegalStateException e) {
            U.error(logger(), "Failed to notify listener (is grid stopped?) [fut=" + this +
                ", lsnr=" + lsnr + ", err=" + e.getMessage() + ']', e);
        }
        catch (RuntimeException | Error e) {
            U.error(logger(), "Failed to notify listener: " + lsnr, e);

            throw e;
        }
    }

    /**
     * Default no-op implementation that always returns {@code false}.
     * Futures that do support cancellation should override this method
     * and call {@link #onCancelled()} callback explicitly if cancellation
     * indeed did happen.
     */
    @Override public boolean cancel() throws IgniteCheckedException {
        return false;
    }

    /** {@inheritDoc} */
    @Override public boolean isDone() {
        return isDone(state);
    }

    /**
     * @param state State to check.
     * @return {@code True} if future is done.
     */
    private boolean isDone(Object state) {
        return state == null || state.getClass() != Node.class;
    }

    /**
     * @return {@code True} if future is completed with exception.
     */
    public boolean isFailed() {
        Object state0 = state;

        return state0 != null && state0.getClass() == ErrorWrapper.class;
    }

    /** {@inheritDoc} */
    @Override public boolean isCancelled() {
        return state == CANCELLED;
    }

    /**
     * Callback to notify that future is finished with {@code null} result.
     * This method must delegate to {@link #onDone(Object, Throwable)} method.
     *
     * @return {@code True} if result was set by this call.
     */
    public final boolean onDone() {
        return onDone(null, null);
    }

    /**
     * Callback to notify that future is finished.
     * This method must delegate to {@link #onDone(Object, Throwable)} method.
     *
     * @param res Result.
     * @return {@code True} if result was set by this call.
     */
    public final boolean onDone(@Nullable R res) {
        return onDone(res, null);
    }

    /**
     * Callback to notify that future is finished.
     * This method must delegate to {@link #onDone(Object, Throwable)} method.
     *
     * @param err Error.
     * @return {@code True} if result was set by this call.
     */
    public final boolean onDone(@Nullable Throwable err) {
        return onDone(null, err);
    }

    /**
     * Callback to notify that future is finished. Note that if non-{@code null} exception is passed in
     * the result value will be ignored.
     *
     * @param res Optional result.
     * @param err Optional error.
     * @return {@code True} if result was set by this call.
     */
    public boolean onDone(@Nullable R res, @Nullable Throwable err) {
        return onDone(res, err, false);
    }

    /**
     * @param res Result.
     * @param err Error.
     * @param cancel {@code True} if future is being cancelled.
     * @return {@code True} if result was set by this call.
     */
    protected boolean onDone(@Nullable R res, @Nullable Throwable err, boolean cancel) {
        Object newState = cancel ? CANCELLED : err != null ? new ErrorWrapper(err) : res;

        while (true) {
            final Object oldState = state;

            if (isDone(oldState))
                return false;

            if (compareAndSetState(oldState, newState)) {

                if(oldState != INIT)
                    unblockAll((Node)oldState);

                return true;
            }
        }
    }

    /**
     * Resets future for subsequent reuse.
     */
    public void reset() {
        final Object oldState = state;

        if (oldState == INIT)
            return;

        if (!isDone(oldState))
            throw new IgniteException("Illegal state");

        compareAndSetState(oldState, INIT);
    }

    /**
     * Callback to notify that future is cancelled.
     *
     * @return {@code True} if cancel flag was set by this call.
     */
    public boolean onCancelled() {
        return onDone(null, null, true);
    }

    /** {@inheritDoc} */
    @SuppressWarnings("StringEquality")
    @Override public String toString() {
        Object state0 = state;

        String stateStr = stateStr(state0);
        String resStr = stateStr == DONE ? String.valueOf(state0) : null;

        return S.toString(
            GridFutureAdapter.class, this,
            "state", stateStr, false,
            "res", resStr, true,
            "hash", System.identityHashCode(this), false);
    }

    /**
     * @param s State.
     * @return State string representation.
     */
    private String stateStr(Object s) {
        return s == CANCELLED ? "CANCELLED" : s != null && s.getClass() == Node.class ? "INIT" : DONE;
    }

    /**
     *
     */
    private static class ChainFuture<R, T> extends GridFutureAdapter<T> {
        /** */
        private GridFutureAdapter<R> fut;

        /** */
        private IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb;

        /**
         * @param fut Future.
         * @param doneCb Closure.
         * @param cbExec Optional executor to run callback.
         */
        ChainFuture(
            GridFutureAdapter<R> fut,
            IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb,
            @Nullable Executor cbExec
        ) {
            this.fut = fut;
            this.doneCb = doneCb;

            fut.listen(new GridFutureChainListener<>(this, doneCb, cbExec));
        }

        /** {@inheritDoc} */
        @Override public String toString() {
            return "ChainFuture [orig=" + fut + ", doneCb=" + doneCb + ']';
        }
    }
}


text:
import InitService from './init.service';

declare global {
  interface Document {
    webkitFullscreenElement: Element;
    webkitCurrentFullScreenElement: Element;
    mozFullScreenElement: Element;
    msFullscreenElement: Element;
  }
}

declare global {
  interface Window {
    YT: Youtube;
  }
}

export interface Youtube {
  Player: any;
  PlayerState: {
    PLAYING: number;
    PAUSED: number;
    ENDED: number;
  };
}

export class Container {
  private window: Window = null;
  private document: Document = null;
  private YT: any = null;
  private initService: InitService = null;

  constructor() {}

  public setWindow(window: Window): void {
    this.window = window;
  }

  public getWindow(): Window {
    return this.window;
  }

  public setDocument(document: Document): void {
    this.document = document;
  }

  public getDocument(): Document {
    return this.document;
  }

  public setYT(YT: Youtube): void {
    this.YT = YT;
  }

  public getYT(): Youtube {
    return this.YT;
  }

  public setInitService(initService: InitService): void {
    this.initService = initService;
  }

  public getInitService(): InitService {
    return this.initService;
  }
}

export default new Container();