text:
package org.apache.axis2.transport.jms;

import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.ParameterIncludeImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import javax.jms.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Encapsulate a JMS Connection factory definition within an Axis2.xml
 *
 * JMS Connection Factory definitions, allows JNDI properties as well as other service
 * level parameters to be defined, and re-used by each service that binds to it
 *
 * When used for sending messages out, the JMSConnectionFactory'ies are able to cache
 * a Connection, Session or Producer
 */
public class JMSConnectionFactory {

    private static final Log log = LogFactory.getLog(JMSConnectionFactory.class);

    /** The name used for the connection factory definition within Axis2 */
    private String name = null;
    /** The list of parameters from the axis2.xml definition */
    private Hashtable<String, String> parameters = new Hashtable<String, String>();

    /** The cached InitialContext reference */
    private Context context = null;
    /** The JMS ConnectionFactory this definition refers to */
    private ConnectionFactory conFactory = null;
    /** The shared JMS Connection for this JMS connection factory */
    private Connection sharedConnection = null;
    /** The shared JMS Session for this JMS connection factory */
    private Session sharedSession = null;
    /** The shared JMS MessageProducer for this JMS connection factory */
    private MessageProducer sharedProducer = null;
    /** The Shared Destination */
    private Destination sharedDestination = null;
    /** The shared JMS connection for this JMS connection factory */
    private int cacheLevel = JMSConstants.CACHE_CONNECTION;

    private Map<Integer, Connection> sharedConnectionMap = new ConcurrentHashMap<Integer,Connection>();
    private int maxSharedConnectionCount = 10;
    private int lastReturnedConnectionIndex = 0;

    /**
     * Digest a JMS CF definition from an axis2.xml 'Parameter' and construct
     * @param parameter the axis2.xml 'Parameter' that defined the JMS CF
     */
    public JMSConnectionFactory(Parameter parameter) {

        this.name = parameter.getName();
        ParameterIncludeImpl pi = new ParameterIncludeImpl();

        try {
            pi.deserializeParameters((OMElement) parameter.getValue());
        } catch (AxisFault axisFault) {
            handleException("Error reading parameters for JMS connection factory" + name, axisFault);
        }

        for (Object o : pi.getParameters()) {
            Parameter p = (Parameter) o;
            parameters.put(p.getName(), (String) p.getValue());
        }

        digestCacheLevel();
        try {
            context = new InitialContext(parameters);
            conFactory = JMSUtils.lookup(context, ConnectionFactory.class,
                parameters.get(JMSConstants.PARAM_CONFAC_JNDI_NAME));
            if (parameters.get(JMSConstants.PARAM_DESTINATION) != null) {
                sharedDestination = JMSUtils.lookup(context, Destination.class,
                    parameters.get(JMSConstants.PARAM_DESTINATION));
            }
            log.info("JMS ConnectionFactory : " + name + " initialized");

        } catch (NamingException e) {
            throw new AxisJMSException("Cannot acquire JNDI context, JMS Connection factory : " +
                parameters.get(JMSConstants.PARAM_CONFAC_JNDI_NAME) + " or default destination : " +
                parameters.get(JMSConstants.PARAM_DESTINATION) +
                " for JMS CF : " + name + " using : " + parameters, e);
        }
        setMaxSharedJMSConnectionsCount();
    }

    /**
     * Digest, the cache value iff specified
     */
    private void digestCacheLevel() {

        String key = JMSConstants.PARAM_CACHE_LEVEL;
        String val = parameters.get(key);

        if ("none".equalsIgnoreCase(val)) {
            this.cacheLevel = JMSConstants.CACHE_NONE;
        } else if ("connection".equalsIgnoreCase(val)) {
            this.cacheLevel = JMSConstants.CACHE_CONNECTION;
        } else if ("session".equals(val)){
            this.cacheLevel = JMSConstants.CACHE_SESSION;
        } else if ("producer".equals(val)) {
            this.cacheLevel = JMSConstants.CACHE_PRODUCER;
        } else if ("consumer".equals(val)) {
            this.cacheLevel = JMSConstants.CACHE_CONSUMER;
        } else if (val != null) {
            throw new AxisJMSException("Invalid cache level : " + val + " for JMS CF : " + name);
        }
    }

    private void setMaxSharedJMSConnectionsCount(){
        if(parameters.get(JMSConstants.MAX_JMS_CONNECTIONS_) != null){
            String maxConnectionCount = parameters.get(JMSConstants.MAX_JMS_CONNECTIONS_);
            try {
                int maxCount = Integer.parseInt(maxConnectionCount);
                if(maxCount > 0){
                    this.maxSharedConnectionCount = maxCount;
                    log.info("---- Max Shared JMS Connection Count Set to "+ maxSharedConnectionCount);
                }
            } catch (NumberFormatException e) {
                this.maxSharedConnectionCount = 10;
                log.error("Error in setting up the max shared jms connection count. Setting it to default value 10 ", e);
            }
        }
    }

    /**
     * Close all connections, sessions etc.. and stop this connection factory
     */
    public synchronized void stop() {
        if (sharedConnection != null) {
            try {
            	sharedConnection.close();
            } catch (JMSException e) {
                log.warn("Error shutting down connection factory : " + name, e);
            }
        }

        if (context != null) {
            try {
                context.close();
            } catch (NamingException e) {
                log.warn("Error while closing the InitialContext of factory : " + name, e);
            }
        }
    }

    /**
     * Return the name assigned to this JMS CF definition
     * @return name of the JMS CF
     */
    public String getName() {
        return name;
    }

    /**
     * The list of properties (including JNDI and non-JNDI)
     * @return properties defined on the JMS CF
     */
    public Hashtable<String, String> getParameters() {
        return parameters;
    }

    /**
     * Get cached InitialContext
     * @return cache InitialContext
     */
    public Context getContext() {
        return context;
    }

    /**
     * Cache level applicable for this JMS CF
     * @return applicable cache level
     */
    public int getCacheLevel() {
        return cacheLevel;
    }

    /**
     * Get the shared Destination - if defined
     * @return
     */
    public Destination getSharedDestination() {
        return sharedDestination;
    }

    /**
     * Lookup a Destination using this JMS CF definitions and JNDI name
     * @param destinationName JNDI name of the Destionation
     * @param destinationType looking up destination type
     * @return JMS Destination for the given JNDI name or null
     */
    public Destination getDestination(String destinationName, String destinationType) {
        try {
            return JMSUtils.lookupDestination(context, destinationName, destinationType);
        } catch (NamingException e) {
            handleException("Error looking up the JMS destination with name " + destinationName
                    + " of type " + destinationType, e);
        }

        // never executes but keeps the compiler happy
        return null;
    }

    /**
     * Get the reply Destination from the PARAM_REPLY_DESTINATION parameter
     * @return reply destination defined in the JMS CF
     */
    public String getReplyToDestination() {
        return parameters.get(JMSConstants.PARAM_REPLY_DESTINATION);
    }

    /**
     * Get the reply destination type from the PARAM_REPLY_DEST_TYPE parameter
     * @return reply destination defined in the JMS CF
     */
    public String getReplyDestinationType() {
        return parameters.get(JMSConstants.PARAM_REPLY_DEST_TYPE) != null ?
                parameters.get(JMSConstants.PARAM_REPLY_DEST_TYPE) :
                JMSConstants.DESTINATION_TYPE_GENERIC;
    }

    private void handleException(String msg, Exception e) {
        log.error(msg, e);
        throw new AxisJMSException(msg, e);
    }

    /**
     * Should the JMS 1.1 API be used? - defaults to yes
     * @return true, if JMS 1.1 api should  be used
     */
    public boolean isJmsSpec11() {
        return parameters.get(JMSConstants.PARAM_JMS_SPEC_VER) == null ||
            "1.1".equals(parameters.get(JMSConstants.PARAM_JMS_SPEC_VER));
    }

    /**
     *  JMS Spec. Version. This will be used in Transport Sender
     *  Added with JMS 2.0 update
     */
    public String jmsSpecVersion() {
        return parameters.get(JMSConstants.PARAM_JMS_SPEC_VER);
    }

    /**
     *  Should JMS 2.0 spec be used - default is false
     *  Added with JMS 2.0 update
     */
    public boolean isJmsSpec20() {
        return "2.0".equals(parameters.get(JMSConstants.PARAM_JMS_SPEC_VER));
    }

    /**
     *  Should JMS Classic API be used (both 1.1 and 2.0 spec versions uses classic API)
     *  Added with JMS 2.0 update
     */
    public boolean isClassicAPI() {
        return isJmsSpec11() || isJmsSpec20();
    }

    /**
     * Return the type of the JMS CF Destination
     * @return TRUE if a Queue, FALSE for a Topic and NULL for a JMS 1.1 Generic Destination
     */
    public Boolean isQueue() {
        if (parameters.get(JMSConstants.PARAM_CONFAC_TYPE) == null &&
            parameters.get(JMSConstants.PARAM_DEST_TYPE) == null) {
            return null;
        }

        if (parameters.get(JMSConstants.PARAM_CONFAC_TYPE) != null) {
            if ("queue".equalsIgnoreCase(parameters.get(JMSConstants.PARAM_CONFAC_TYPE))) {
                return true;
            } else if ("topic".equalsIgnoreCase(parameters.get(JMSConstants.PARAM_CONFAC_TYPE))) {
                return false;
            } else {
                throw new AxisJMSException("Invalid " + JMSConstants.PARAM_CONFAC_TYPE + " : " +
                    parameters.get(JMSConstants.PARAM_CONFAC_TYPE) + " for JMS CF : " + name);
            }
        } else {
            if ("queue".equalsIgnoreCase(parameters.get(JMSConstants.PARAM_DEST_TYPE))) {
                return true;
            } else if ("topic".equalsIgnoreCase(parameters.get(JMSConstants.PARAM_DEST_TYPE))) {
                return false;
            } else {
                throw new AxisJMSException("Invalid " + JMSConstants.PARAM_DEST_TYPE + " : " +
                    parameters.get(JMSConstants.PARAM_DEST_TYPE) + " for JMS CF : " + name);
            }
        }
    }

    /**
     * Is a session transaction requested from users of this JMS CF?
     * @return session transaction required by the clients of this?
     */
    private boolean isSessionTransacted() {
        return parameters.get(JMSConstants.PARAM_SESSION_TRANSACTED) != null &&
            Boolean.valueOf(parameters.get(JMSConstants.PARAM_SESSION_TRANSACTED));
    }

    private boolean isDurable() {
        if (parameters.get(JMSConstants.PARAM_SUB_DURABLE) != null) {
            return Boolean.valueOf(parameters.get(JMSConstants.PARAM_SUB_DURABLE));
        }
        return false;
    }

    private String getClientId() {
        return parameters.get(JMSConstants.PARAM_DURABLE_SUB_CLIENT_ID);
    }

    /**
     * Create a new Connection
     * @return a new Connection
     */
    private Connection createConnection() {

        Connection connection = null;
        try {
            connection = JMSUtils.createConnection(
                conFactory,
                parameters.get(JMSConstants.PARAM_JMS_USERNAME),
                parameters.get(JMSConstants.PARAM_JMS_PASSWORD),
                isClassicAPI(), isQueue(), isDurable(), getClientId());

            if (log.isDebugEnabled()) {
                log.debug("New JMS Connection from JMS CF : " + name + " created");
            }

        } catch (JMSException e) {
            handleException("Error acquiring a Connection from the JMS CF : " + name +
                " using properties : " + parameters, e);
        }
        return connection;
    }

    /**
     * Create a new Session
     * @param connection Connection to use
     * @return A new Session
     */
    private Session createSession(Connection connection) {
        try {
            if (log.isDebugEnabled()) {
                log.debug("Creating a new JMS Session from JMS CF : " + name);
            }
            return JMSUtils.createSession(
                connection, isSessionTransacted(), Session.AUTO_ACKNOWLEDGE, isClassicAPI(), isQueue());

        } catch (JMSException e) {
            handleException("Error creating JMS session from JMS CF : " + name, e);
        }
        return null;
    }

    /**
     * Create a new MessageProducer
     * @param session Session to be used
     * @param destination Destination to be used
     * @return a new MessageProducer
     */
    private MessageProducer createProducer(Session session, Destination destination) {
        try {
            if (log.isDebugEnabled()) {
                log.debug("Creating a new JMS MessageProducer from JMS CF : " + name);
            }

            return JMSUtils.createProducer(
                session, destination, isQueue(), isClassicAPI());

        } catch (JMSException e) {
            handleException("Error creating JMS producer from JMS CF : " + name,e);
        }
        return null;
    }

    /**
     * Get a new Connection or shared Connection from this JMS CF
     * @return new or shared Connection from this JMS CF
     */
    public Connection getConnection() {
        if (cacheLevel > JMSConstants.CACHE_NONE) {
            return getSharedConnection();
        } else {
            return createConnection();
        }
    }

    /**
     * Get a new Session or shared Session from this JMS CF
     * @param connection the Connection to be used
     * @return new or shared Session from this JMS CF
     */
    public Session getSession(Connection connection) {
        if (cacheLevel > JMSConstants.CACHE_CONNECTION) {
            return getSharedSession();
        } else {
            return createSession((connection == null ? getConnection() : connection));
        }
    }

    /**
     * Get a new MessageProducer or shared MessageProducer from this JMS CF
     * @param connection the Connection to be used
     * @param session the Session to be used
     * @param destination the Destination to bind MessageProducer to
     * @return new or shared MessageProducer from this JMS CF
     */
    public MessageProducer getMessageProducer(
        Connection connection, Session session, Destination destination) {
        if (cacheLevel > JMSConstants.CACHE_SESSION) {
            return getSharedProducer();
        } else {
            return createProducer((session == null ? getSession(connection) : session), destination);
        }
    }

    /**
     * Get a new Connection or shared Connection from this JMS CF
     * @return new or shared Connection from this JMS CF
     */
    private synchronized Connection getSharedConnection() {

        Connection connection = sharedConnectionMap.get(lastReturnedConnectionIndex);
        if (connection == null) {
            connection = createConnection();
            sharedConnectionMap.put(lastReturnedConnectionIndex, connection);
        }
        lastReturnedConnectionIndex++;
        if (lastReturnedConnectionIndex >= maxSharedConnectionCount) {
            lastReturnedConnectionIndex = 0;
        }
        return connection;
    }

    /**
     * Get a shared Session from this JMS CF
     * @return shared Session from this JMS CF
     */
    private synchronized Session getSharedSession() {
        if (sharedSession == null) {
            sharedSession = createSession(getSharedConnection());
            if (log.isDebugEnabled()) {
                log.debug("Created shared JMS Session for JMS CF : " + name);
            }
        }
        return sharedSession;
    }

    /**
     * Get a shared MessageProducer from this JMS CF
     * @return shared MessageProducer from this JMS CF
     */
    private synchronized MessageProducer getSharedProducer() {
        if (sharedProducer == null) {
            sharedProducer = createProducer(getSharedSession(), sharedDestination);
            if (log.isDebugEnabled()) {
                log.debug("Created shared JMS MessageConsumer for JMS CF : " + name);
            }
        }
        return sharedProducer;
    }
}


text:
class StaticCounterCollector
  def initialize(value)
    @value = value
  end

  def populate(output, params)
    output.value(@value)
  end
end

redpajama_set_name: RedPajamaGithub


text:
#ifndef __ALT_SET_ARGS_H__
#define __ALT_SET_ARGS_H__

/******************************************************************************
*                                                                             *
* THIS IS A LIBRARY READ-ONLY SOURCE FILE. DO NOT EDIT.                       *
*                                                                             *
******************************************************************************/

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */

/*
 * The function alt_set_args() is provided in order to define the input
 * arguments to main(). If this function is not called before main() then the
 * argument list passed to main() will be empty.
 *
 * It is expected that this function will only be used by the ihost/iclient
 * utility.
 */

static inline void alt_set_args (int argc, char** argv, char** envp)
{
  extern int    alt_argc;
  extern char** alt_argv;
  extern char** alt_envp;

  alt_argc = argc;
  alt_argv = argv;
  alt_envp = envp;
}

#ifdef __cplusplus
}
#endif

#endif /* __ALT_SET_ARGS_H__ */


text:
package sun.bob.mcalendar.activities;

import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.Fragment;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.readystatesoftware.systembartint.SystemBarTintManager;

import java.util.ArrayList;

import sun.bob.mcalendar.App;
import sun.bob.mcalendar.R;
import sun.bob.mcalendar.beans.TaskBean;
import sun.bob.mcalendar.content.CalendarResolver;
import sun.bob.mcalendar.fragments.FragmentCalendar;
import sun.bob.mcalendar.fragments.FragmentReceiptList;
import sun.bob.mcalendar.fragments.FragmentSetting;
import sun.bob.mcalendar.fragments.FragmentStatistics;
import sun.bob.mcalendar.fragments.FragmentTask;
import sun.bob.mcalendarview.utils.CurrentCalendar;
import sun.bob.mcalendarview.vo.MarkedDates;
import sun.bob.tabbar.OnTabClickedListener;
import sun.bob.tabbar.TabBar;

public class MainActivity extends BaseCompatActivity {

    private Fragment currentFragment;
    private ArrayList<Fragment> fragments;
    public Toolbar toolbar;
    private FloatingActionButton fab;

    private FragmentCalendar fragmentCalendar;
    private FragmentTask fragmentTask;
    private FragmentSetting fragmentSetting;
    private FragmentStatistics fragmentStatistics;
    private FragmentReceiptList fragmentReceiptList;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (App.appContext == null) {
            App.appContext = getApplicationContext();
        }

        setContentView(R.layout.activity_main);

        toolbar = (Toolbar) findViewById(R.id.toolbar);
        toolbar.setTitle(new StringBuilder().append("").append(CurrentCalendar.getCurrentDateData().getYear()).append(" - ").append(CurrentCalendar.getCurrentDateData().getMonth()).toString());

        setSupportActionBar(toolbar);

        fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent newTaskIntent = new Intent(MainActivity.this, TaskActivity.class);
                newTaskIntent.putExtra("year", CurrentCalendar.getCurrentDateData().getYear());
                newTaskIntent.putExtra("month", CurrentCalendar.getCurrentDateData().getMonth());
                newTaskIntent.putExtra("day", CurrentCalendar.getCurrentDateData().getDay());
                startActivity(newTaskIntent);
            }
        });
        initUI();
        populateCalendar();
    }

    @Override
    public void initUI() {
        ((TabBar) findViewById(R.id.id_tabbar))
                .addTab(R.drawable.calendar, R.drawable.calendar_filled, "Calendar", Color.GRAY, Color.rgb(34, 145, 255))
                .addTab(R.drawable.checklist, R.drawable.checklist_filled, "List", Color.GRAY, Color.rgb(34, 145, 255))
                .addTab(R.drawable.stat, R.drawable.stat_filled, "Stat", Color.GRAY, Color.rgb(34, 145, 255))
                .addTab(R.drawable.settings, R.drawable.settings_filled, "Settings", Color.GRAY, Color.rgb(34, 145, 255))
                .setOnTabClickedListener(new OnTabClickedAction());

        fragmentCalendar = new FragmentCalendar();
        fragmentReceiptList = new FragmentReceiptList();
        fragmentTask = new FragmentTask();
        fragmentSetting = new FragmentSetting();
        fragmentStatistics = new FragmentStatistics();
        fragments = new ArrayList<>();
        fragments.add(fragmentCalendar);
        fragments.add(fragmentReceiptList);
//        fragments.add(fragmentTask);
        fragments.add(fragmentStatistics);
        fragments.add(fragmentSetting);
        getSupportFragmentManager().beginTransaction()
                .add(R.id.id_fragment_container, fragmentCalendar)
                .add(R.id.id_fragment_container, fragmentReceiptList)
                .hide(fragmentReceiptList)
                .add(R.id.id_fragment_container, fragmentStatistics)
                .hide(fragmentStatistics)
                .add(R.id.id_fragment_container, fragmentSetting)
                .hide(fragmentSetting)
                .commit();
        currentFragment = fragmentCalendar;

        changeStatusBarColor();
    }

    private void populateCalendar() {
        for (TaskBean taskBean : CalendarResolver.getStaticInstance(this).getAllEvents()) {
            MarkedDates.getInstance().add(taskBean.getStartDate());
        }
    }

    private void changeStatusBarColor() {
        if (Build.VERSION.SDK_INT > 18) {
            Window window = getWindow();
            window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
                    WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);

            SystemBarTintManager tintManager = new SystemBarTintManager(this);
            tintManager.setStatusBarTintEnabled(true);
            tintManager.setNavigationBarTintEnabled(false);
            tintManager.setTintColor(getResources().getColor(R.color.colorPrimaryDark));
        }
    }

    public class OnTabClickedAction implements OnTabClickedListener {

        @Override
        public void onTabClicked(int index) {
            MainActivity that = MainActivity.this;
            that.getSupportFragmentManager().beginTransaction().hide(currentFragment).show(fragments.get(index)).commit();
            currentFragment = fragments.get(index);
            if (index == 2) {
                fab.setVisibility(View.GONE);
            } else {
                fab.setVisibility(View.VISIBLE);
            }
            if (index != 0) {
                findViewById(R.id.id_calendar_title).setVisibility(View.GONE);
            } else {
                findViewById(R.id.id_calendar_title).setVisibility(View.VISIBLE);
            }
        }
    }

}


text:
package com.matthewlmcclure.jira.plugins;

import java.util.ArrayList;
import java.util.List;

import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.JiraDataType;
import com.atlassian.jira.JiraDataTypes;
import com.atlassian.jira.jql.operand.QueryLiteral;
import com.atlassian.jira.jql.query.QueryCreationContext;
import com.atlassian.jira.plugin.jql.function.AbstractJqlFunction;
import com.atlassian.jira.util.MessageSet;
import com.atlassian.query.clause.TerminalClause;
import com.atlassian.query.operand.FunctionOperand;
import com.opensymphony.user.User;

public class RankOfFunction extends AbstractJqlFunction
{

	public JiraDataType getDataType() {
		return JiraDataTypes.NUMBER;
	}

	public int getMinimumNumberOfExpectedArguments() {
		return 1;
	}

	public List<QueryLiteral> getValues(QueryCreationContext arg0,
			FunctionOperand operand, TerminalClause arg2) {
		ComponentManager componentManager = ComponentManager.getInstance();
		IssueManager issueManager = componentManager.getIssueManager();
		Issue issue = issueManager.getIssueObject(operand.getArgs().get(0));
		CustomFieldManager fieldManager = componentManager.getCustomFieldManager();
		CustomField rankField = fieldManager.getCustomFieldObjectByName("Rank");
		List<QueryLiteral> queryLiterals = new ArrayList<QueryLiteral>();
		Double rankDouble = (Double) issue.getCustomFieldValue(rankField);
		Long rank = rankDouble.longValue();
		queryLiterals.add(new QueryLiteral(operand, rank));
		return queryLiterals;
	}

	public MessageSet validate(User arg0, FunctionOperand operand,
			TerminalClause arg2) {
		return validateNumberOfArgs(operand, 1);
	}
}


text:
DEBUG = False
TEMPLATE_DEBUG = DEBUG

TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en-US'
SITE_ID = 1
USE_L10N = True
USE_TZ = True

SECRET_KEY = 'local'

ROOT_URLCONF = 'tests.urls'

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': ':memory:',
    }
}

MIDDLEWARE_CLASSES = [
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

TEMPLATE_CONTEXT_PROCESSORS = [
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
    'django.core.context_processors.static',
    'django.core.context_processors.tz',
    'django.core.context_processors.request',
    'django.contrib.messages.context_processors.messages'
]

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',

    'tests',
    'heythere',
)

PASSWORD_HASHERS = (
    'django.contrib.auth.hashers.MD5PasswordHasher',
)

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

NOTIFICATIONS = {
    'DEFAULT': {
        'persistent': True,  # stays until dismissed
        'send_as_email': False,  # send as email
        'headline_template': '{{headline}}',  # Django template for headline
        'body_template': '{{body}}',  # Django template for body
        'email_field': 'email'  # Assume field named 'email' is user's email
    },
    'CUSTOM_USER': {
        'persistent': True,
        'send_onsite': True,
        'send_as_email': False,
        'headline_template': 'My headline: {{headline}}',
        'body_template': 'My body: {{body}}',
        'email_field': 'contact'
    },
    'TEMPORARY': {
        'persistent': False,
        'send_onsite': True,
        'send_as_email': True,
        'headline_template': 'My headline: {{headline}}',
        'body_template': 'My body: {{body}}',
    },
    'SEND_EMAIL': {
        'persistent': True,
        'send_onsite': False,
        'send_as_email': True,
        'headline_template': 'My headline: {{headline}}',
        'body_template': 'My body: {{body}}',
    }
}


text:
/* colors */
body a:link{ color:#d0e185; text-decoration:none;}
body a:visited{ color:#d0e185; text-decoration:none;}
body a:active{ color:#d0e185; text-decoration:none;}
ul.arrowunderline li:hover { color:#d0e185; cursor:pointer; }
ul.arrowunderline li#selected { /* use CSS generated content to add arrow to the menu */
	color:#d0e185; /* style of arrow underline */
	cursor:pointer;
	}
ul.list li .green_txt{
color:#d0e185;
}
.heading{
color:#d0e185;
}
.date{
		color:#d0e185;
}
.green_bg{	background-color:rgba(208,225,133,0.5);}
#form input, textarea { color:#d0e185; }
.card_circle{background-color:#d0e185;}

#portfolio-filter li a:hover { background-color:#d0e185; }
#portfolio-filter li a.current { background-color:#d0e185;	}

#portfolio-list li:hover h5 { color:#d0e185; }

#form input, textarea { color:#d0e185; }
#form input[type="text"]:focus, #form textarea:focus { background-color:none; color:#333333; }
#form .submitBtn {
text-shadow:0 0px 0 #000;
color:#FFFFFF;
background-color:#d0e185;
}
#form .submitBtn:hover{  background-color:#666666; }
#form .font-11{  color:#d0e185; }
#contact .right .details li { color:#e86874; }
#contact .right .twitter ul a { color:#d0e185; }
#contact .right  span a:hover { color:#d0e185; text-decoration:none; }
.input-box1 { background-color:#d0e185;}
.accordion .tog.button_large span{color:#d0e185;}

.toggle_heading{
	font-size:18px;
	font-weight:500;
	color:#2bafb4;
}

.green_highlite{background:#d0e185;}
blockquote{
color:#d0e185;}

 /* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {
	#menu-icon { color:#d0e185; }
	#nav li#selected{ color:#d0e185; cursor:pointer; border:hidden; }
	#nav ul a:hover { background:none; color:#d0e185; }
	#nav a, #nav ul a { font:inherit; background:none; display:inline; padding:0; color:#d0e185; border:none; }
	#nav a:hover,
	#nav ul a:hover { background:none; color:#d0e185; }
	#nav li:hover { color:#d0e185; cursor:pointer; }
}

/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {
	#menu-icon { color:#d0e185; }
	#nav li#selected{ color:#d0e185; cursor:pointer; border:hidden; }
	#nav ul a:hover { background:none; color:#d0e185; }
	#nav a, #nav ul a { font:inherit; background:none; display:inline; padding:0; color:#d0e185; border:none; }
	#nav a:hover,
	#nav ul a:hover { background:none; color:#d0e185; }
	#nav li:hover { color:#d0e185; cursor:pointer; }
}

/* colors */


text:
% ----------------------------------------------------------------------
% BEGIN LICENSE BLOCK
% Version: CMPL 1.1
%
% The contents of this file are subject to the Cisco-style Mozilla Public
% License Version 1.1 (the "License"); you may not use this file except
% in compliance with the License.  You may obtain a copy of the License
% at www.eclipse-clp.org/license.
%
% Software distributed under the License is distributed on an "AS IS"
% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
% the License for the specific language governing rights and limitations
% under the License.
%
% The Original Code is  The ECLiPSe Constraint Logic Programming System.
% The Initial Developer of the Original Code is  Cisco Systems, Inc.
% Portions created by the Initial Developer are
% Copyright (C) 1989-2006 Cisco Systems, Inc.  All Rights Reserved.
%
% Contributor(s): ECRC GmbH
% Contributor(s): IC-Parc, Imperal College London
%
% END LICENSE BLOCK
%
% System:	ECLiPSe Constraint Logic Programming System
% Version:	$Id: cgi.pl,v 1.2 2009/07/16 09:11:24 jschimpf Exp $
% ----------------------------------------------------------------------

%
% ECLiPSe PROLOG LIBRARY MODULE
%
% $Id: cgi.pl,v 1.2 2009/07/16 09:11:24 jschimpf Exp $
%
% IDENTIFICATION:	cgi.pl
%
% AUTHOR:		Joachim Schimpf
%
% CONTENTS:		Some utilities for writing cgi scripts with ECLiPSe
%

:- module(cgi).
:- export
	posted_params/1,
	get_error_output/1,
	get_param_value/3,
	substitute_placeholders/3.

:- comment(categories, ["Interfacing"]).
:- comment(summary, "Some utilities for writing cgi scripts with ECLiPSe").
:- comment(author, "Joachim Schimpf, IC-Parc, Imperial College, London").
:- comment(copyright, "Cisco Systems, Inc").
:- comment(date, "$Date: 2009/07/16 09:11:24 $").

:- comment(posted_params/1, [
    template:"posted_params(-NameValuePairs)",
    summary:"Returns the parameters posted to the CGI script",
    fail_if:"There was a problem obtaining the parameters from the environment",
    see_also:[get_param_value/3,substitute_placeholders/3,get_error_output/1],
    desc:html("Returns a list of Name=Value pairs, where Name is an atom
    and Value is a string, representing the information that was posted to
    the CGI script. Both POST and GET methods are supported.
    <P>
    If there is a problem, the predicate fails. In that case, the caller should
    retrieve an error message using get_error_output/1 and present it to the
    user, e.g. by embedding it into the generated html page.
    ")
    ]).

:- comment(get_param_value/3, [
    template:"get_param_value(+NameValuePairs, +Name, ?Value)",
    summary:"Look up the value of a posted parameter",
    see_also:[posted_params/1,substitute_placeholders/3],
    desc:html("Look up the value of a posted parameter. Returns an empty string
    if there is no parameter with the given name. Name must be an atom.")
    ]).

:- comment(substitute_placeholders/3, [
    template:"substitute_placeholders(+PageTemplate, +NameValuePairs, -Page)",
    summary:"Substitute placeholders in a html source with a value string",
    desc:html("Takes a string (usually a html-source) with embedded
    placeholders and replaces the placeholders by their value according
    to the NameValuePairs argument. The syntax for placeholders is their
    name enclosed in ^ (up arrow) characters."),
    see_also:[posted_params/1,get_param_value/3]
    ]).

:- comment(get_error_output/1, [
    template:"get_error_output(-Message)",
    summary:"Retrieve error messages explaining failure of posted_params/1",
    see_also:[posted_params/1]
    ]).

% suppress "compiled" messages
:- set_event_handler(139, true/0).

% redirect error output into a string stream
:- open(string(""), write, error).

get_error_output(Messages) :-
	get_stream_info(error, name, Messages).

posted_params(NameValuePairs) :-
	( getenv('REQUEST_METHOD', Method) ->
	    ( Method == "POST" ->
		( getenv('CONTENT_LENGTH', ContentLengthString) ->
		    ( number_string(ContentLength, ContentLengthString),
			( read_string("", ContentLength, String) ->
			    true
			;
			    writeln(error, "Standard input empty"),
			    fail
			)
		    ;
			writeln(error, "CONTENT_LENGTH does not contain a number"),
			fail
		    )
		;
		    writeln(error, "Environment variable CONTENT_LENGTH not set"),
		    fail
		)
	    ; Method == "GET" ->
		( getenv('QUERY_STRING', String) ->
		    true
		;
		    String=""
		)
	    ;
		printf(error, "Illegal method: %q%n", [Method]),
		fail
	    )
	;
	    writeln(error, "Environment variable REQUEST_METHOD not set"),
	    fail
	),
%	log_request(String),
	split_string(String, "&", "", NameEqValueStrings),
	decode_defs(NameEqValueStrings, NameValuePairs).

    log_request(String) :-
    	get_flag(pid, Pid),
	concat_string(["/tmp/timesheetlog",Pid], Logfile),
	open(Logfile, write, S),
	write(S, String),
	close(S).

    decode_defs([], []).
    decode_defs([NameEqValueString|Ins], Outs) :-
	( split_string(NameEqValueString, "=", "", [NameString,RawValue]) ->
	    atom_string(Name, NameString),
	    string_list(RawValue, RawValueList),
	    dequote(RawValueList, ValueList),
	    string_list(Value, ValueList),
	    Outs = [Name=Value|Outs0]
	;
	    Outs = Outs0
	),
	decode_defs(Ins, Outs0).

    :- mode dequote(+,-).
    dequote([], []).
    dequote([0'+|More], [0' |Cs]) :- !,
	dequote(More, Cs).
    dequote([0'%,H,L|More], [C|Cs]) :-
    	hex(H, HX),
    	hex(L, LX),
	!,
	C is HX*16+LX,
	dequote(More, Cs).
    dequote([C|More], [C|Cs]) :-
	dequote(More, Cs).

    :- mode hex(+,-).
    hex(0'0, 0). hex(0'1, 1). hex(0'2, 2). hex(0'3, 3). hex(0'4, 4).
    hex(0'5, 5). hex(0'6, 6). hex(0'7, 7). hex(0'8, 8). hex(0'9, 9).
    hex(0'A, 10). hex(0'B, 11). hex(0'C, 12). hex(0'D, 13). hex(0'E, 14). hex(0'F, 15).
    hex(0'a, 10). hex(0'b, 11). hex(0'c, 12). hex(0'd, 13). hex(0'e, 14). hex(0'f, 15).

get_param_value([], _, "").
get_param_value([NameEqValue|T], Name, Value) :-
	( NameEqValue = (Name=Value) ->
	    true
	;
	    get_param_value(T, Name, Value)
	).

substitute_placeholders(PageTemplate, NameValuePairs0, Page) :-
	NameValuePairs = [''="^"|NameValuePairs0],
	split_string(PageTemplate, "^", "", Parts),
	(
	    fromto(Parts, [Text, ParName|Parts1], Parts1, [Last]),
	    fromto(ExpParts, [Text, ParValue|ExpParts1], ExpParts1, [Last]),
	    param(NameValuePairs)
	do
	    atom_string(ParNameA, ParName),
	    get_param_value(NameValuePairs, ParNameA, ParValue)
	),
	concat_string(ExpParts, Page).


text:
(function($, undefined) {

// Is History API reliably supported? (based on Modernizr & PJAX)
if (!(window.history && history.pushState && window.history.replaceState && !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/))) return;

$.nette.ext('redirect', false);

var findSnippets = function () {
	var result = [];
	$('[id^="snippet-"]').each(function () {
		var $el = $(this);
		result.push({
			id: $el.attr('id'),
			html: $el.html()
		});
	});
	return result;
};
var handleState = function (context, name, args) {
	var handler = context['handle' + name.substring(0, 1).toUpperCase() + name.substring(1)];
	if (handler) {
		handler.apply(context, args);
	}
};

$.nette.ext('history', {
	init: function () {
		var snippetsExt;
		if (this.cache && (snippetsExt = $.nette.ext('snippets'))) {
			this.handleUI = function (domCache) {
				var snippets = {};
				$.each(domCache, function () {
					snippets[this.id] = this.html;
				});
				snippetsExt.updateSnippets(snippets, true);
				$.nette.load();
			};
		}

		var popped = !!('state' in window.history) && !!window.history.state;
		var initialUrl = window.location.href;

		$(window).on('popstate.nette', $.proxy(function (e) {
			var state = e.originalEvent.state || this.initialState;
			var initialPop = (popped && initialUrl == state.href);
			popped = true;
			if (initialPop) {
				return;
			}
			if (this.cache && state.ui) {
				handleState(this, 'UI', [state.ui]);
				handleState(this, 'title', [state.title]);
			} else {
				$.nette.ajax({
					url: state.href,
					off: ['history']
				});
			}
		}, this));

		history.replaceState(this.initialState = {
			nette: true,
			href: window.location.href,
			title: document.title,
			ui: findSnippets()
		}, document.title, window.location.href);
	},
	before: function (xhr, settings) {
		if (!settings.nette) {
			this.href = null;
		} else if (!settings.nette.form) {
			this.href = settings.nette.ui.href;
		} else if (settings.nette.form.method == 'get') {
			this.href = settings.nette.ui.action || window.location.href;
		} else {
			this.href = null;
		}
	},
	success: function (payload) {
		var redirect = payload.redirect || payload.url; // backwards compatibility for 'url'
		if (redirect) {
			var regexp = new RegExp('//' + window.location.host + '($|/)');
			if ((redirect.substring(0,4) === 'http') ? regexp.test(redirect) : true) {
				this.href = redirect;
			} else {
				window.location.href = redirect;
			}
		}
		if (this.href && this.href != window.location.href) {
			history.pushState({
				nette: true,
				href: this.href,
				title: document.title,
				ui: findSnippets()
			}, document.title, this.href);
		}
		this.href = null;
	}
}, {
	href: null,
	cache: true,
	handleTitle: function (title) {
		document.title = title;
	}
});

})(jQuery);


text:
class NormalizeActionControllerParametersHashes < ActiveRecord::Migration[5.0]

  def up
    migrate_attribute! :user_attributes
    migrate_attribute! :current_user
  end

private

  def migrate_attribute!(attribute)
    Notice.where("#{attribute} LIKE '--- !ruby/hash-with-ivars:ActionController::Parameters%'").pluck(:id, "#{attribute} \"x\"").each do |id, yaml|
      adjusted_yaml = "---\n" + yaml[/^elements:\n(.*)^ivars:\n/m, 1]
      parsed_yaml = parse_yaml(adjusted_yaml)
      Notice.where(id: id).update_all(attribute => parsed_yaml)
    end
  end

  def parse_yaml(yaml)
    ActiveRecord::Coders::YAMLColumn.new(Hash).load(yaml)
  end

end


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="1a07c388-8ca2-4bd8-b884-f108769e8667" name="Default" comment="" />
    <ignored path="django_blockly.iws" />
    <ignored path=".idea/workspace.xml" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="DaemonCodeAnalyzer">
    <disable_hints />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="django_blockly" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="settings.py" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/django_blockly/settings.py">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="1003" max-vertical-offset="1615">
              <caret line="78" column="15" selection-start-line="78" selection-start-column="15" selection-end-line="78" selection-end-column="15" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="urls.py" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/django_blockly/urls.py">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="153" max-vertical-offset="255">
              <caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="urls.py" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/maze/urls.py">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="34" max-vertical-offset="221">
              <caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="views.py" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/maze/views.py">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="255">
              <caret line="0" column="47" selection-start-line="0" selection-start-column="47" selection-end-line="0" selection-end-column="47" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="index.html" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/templates/index.html">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-0.6" vertical-offset="544" max-vertical-offset="2193">
              <caret line="11" column="68" selection-start-line="11" selection-start-column="68" selection-end-line="11" selection-end-column="68" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="maze.js" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/asset/js/maze.js">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="5304" max-vertical-offset="7752">
              <caret line="312" column="45" selection-start-line="312" selection-start-column="45" selection-end-line="312" selection-end-column="45" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindManager">
    <FindUsagesManager>
      <setting name="OPEN_NEW_TAB" value="true" />
    </FindUsagesManager>
  </component>
  <component name="IdeDocumentHistory">
    <option name="changedFiles">
      <list>
        <option value="$PROJECT_DIR$/statics/css/maze.css" />
        <option value="$PROJECT_DIR$/maze/views.py" />
        <option value="$PROJECT_DIR$/maze/urls.py" />
        <option value="$PROJECT_DIR$/django_blockly/settings.py" />
        <option value="$PROJECT_DIR$/asset/css/maze.css" />
        <option value="$PROJECT_DIR$/django_blockly/urls.py" />
        <option value="$PROJECT_DIR$/asset/js/maze.js" />
        <option value="$PROJECT_DIR$/templates/index.html" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="-8" />
    <option name="y" value="-8" />
    <option name="width" value="1376" />
    <option name="height" value="754" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectReloadState">
    <option name="STATE" value="0" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="Scope" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="templates" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="maze" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="asset" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="django_blockly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="asset" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="js" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="last_opened_file_path" value="$PROJECT_DIR$/../Py Project" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="recentsLimit" value="5" />
    <property name="DefaultHtmlFileTemplate" value="Html5" />
    <property name="FullScreen" value="false" />
  </component>
  <component name="PyConsoleOptionsProvider">
    <option name="myPythonConsoleState">
      <console-settings />
    </option>
  </component>
  <component name="RunManager" selected="Django server.django_blockly">
    <configuration default="true" type="DjangoTestsConfigurationType" factoryName="Django tests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="TARGET" value="" />
      <option name="SETTINGS_FILE" value="" />
      <option name="CUSTOM_SETTINGS" value="false" />
      <option name="USE_OPTIONS" value="false" />
      <option name="OPTIONS" value="" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="py.test">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <option name="testToRun" value="" />
      <option name="keywords" value="" />
      <option name="params" value="" />
      <option name="USE_PARAM" value="false" />
      <option name="USE_KEYWORD" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Nosetests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <option name="PARAMS" value="" />
      <option name="USE_PARAM" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="PythonConfigurationType" factoryName="Python">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="SCRIPT_NAME" value="" />
      <option name="PARAMETERS" value="" />
      <method />
    </configuration>
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Unittests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <option name="PUREUNITTEST" value="true" />
      <option name="PARAMS" value="" />
      <option name="USE_PARAM" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="Python.DjangoServer" factoryName="Django server">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <option name="launchJavascriptDebuger" value="false" />
      <option name="port" value="8000" />
      <option name="host" value="" />
      <option name="additionalOptions" value="" />
      <option name="browserUrl" value="" />
      <option name="runTestServer" value="false" />
      <option name="runNoReload" value="false" />
      <option name="useCustomRunCommand" value="false" />
      <option name="customRunCommand" value="" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Doctests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Attests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <method />
    </configuration>
    <configuration default="false" name="django_blockly" type="Python.DjangoServer" factoryName="Django server">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
        <env name="DJANGO_SETTINGS_MODULE" value="django_blockly.settings" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="django_blockly" />
      <option name="launchJavascriptDebuger" value="false" />
      <option name="port" value="8000" />
      <option name="host" value="" />
      <option name="additionalOptions" value="" />
      <option name="browserUrl" value="" />
      <option name="runTestServer" value="false" />
      <option name="runNoReload" value="false" />
      <option name="useCustomRunCommand" value="false" />
      <option name="customRunCommand" value="" />
      <RunnerSettings RunnerId="PythonRunner" />
      <ConfigurationWrapper RunnerId="PythonRunner" />
      <method />
    </configuration>
    <list size="1">
      <item index="0" class="java.lang.String" itemvalue="Django server.django_blockly" />
    </list>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="1a07c388-8ca2-4bd8-b884-f108769e8667" name="Default" comment="" />
      <created>1430898388494</created>
      <updated>1430898388494</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="-8" y="-8" width="1376" height="754" extended-state="6" />
    <editor active="false" />
    <layout>
      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.18088235" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.29366305" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <option name="myTodoPanelSettings">
      <TodoPanelSettings />
    </option>
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/django_blockly/settings.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="1003" max-vertical-offset="1615">
          <caret line="78" column="15" selection-start-line="78" selection-start-column="15" selection-end-line="78" selection-end-column="15" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/django_blockly/urls.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="153" max-vertical-offset="255">
          <caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/maze/urls.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="34" max-vertical-offset="221">
          <caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/maze/views.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="255">
          <caret line="0" column="47" selection-start-line="0" selection-start-column="47" selection-end-line="0" selection-end-column="47" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/templates/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="187" max-vertical-offset="2193">
          <caret line="11" column="68" selection-start-line="11" selection-start-column="68" selection-end-line="11" selection-end-column="68" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/asset/js/maze.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="7752">
          <caret line="312" column="45" selection-start-line="312" selection-start-column="45" selection-end-line="312" selection-end-column="45" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/django_blockly/settings.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="1003" max-vertical-offset="1615">
          <caret line="78" column="15" selection-start-line="78" selection-start-column="15" selection-end-line="78" selection-end-column="15" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/django_blockly/urls.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="187" max-vertical-offset="306">
          <caret line="11" column="1" selection-start-line="11" selection-start-column="1" selection-end-line="11" selection-end-column="1" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/maze/urls.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="34" max-vertical-offset="221">
          <caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/maze/views.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="255">
          <caret line="0" column="47" selection-start-line="0" selection-start-column="47" selection-end-line="0" selection-end-column="47" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/templates/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="510" max-vertical-offset="1513">
          <caret line="38" column="53" selection-start-line="38" selection-start-column="53" selection-end-line="38" selection-end-column="53" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/asset/css/maze.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="969">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/django_blockly/settings.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="1003" max-vertical-offset="1615">
          <caret line="78" column="15" selection-start-line="78" selection-start-column="15" selection-end-line="78" selection-end-column="15" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/asset/css/maze.css">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.7916667" vertical-offset="510" max-vertical-offset="969">
          <caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/maze/views.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="255">
          <caret line="0" column="47" selection-start-line="0" selection-start-column="47" selection-end-line="0" selection-end-column="47" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/maze/urls.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="221">
          <caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/django_blockly/urls.py">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="255">
          <caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/asset/js/maze.js">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="3342" max-vertical-offset="4522">
          <caret line="312" column="45" selection-start-line="312" selection-start-column="45" selection-end-line="312" selection-end-column="45" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/templates/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.6" vertical-offset="544" max-vertical-offset="2193">
          <caret line="11" column="68" selection-start-line="11" selection-start-column="68" selection-end-line="11" selection-end-column="68" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
package com.adaptris.core.services.metadata;

import com.adaptris.core.BaseCase;

public class UseKeyAsServiceIdValueMatcherTest extends BaseCase {

  public UseKeyAsServiceIdValueMatcherTest(String name) {
    super(name);
  }

  public void testMatcher() throws Exception {
    UseKeyAsServiceIdValueMatcher matcher = new UseKeyAsServiceIdValueMatcher();
    assertEquals("key", matcher.getNextServiceId("key", null));
  }

  public void testMatcherReturnsNull() throws Exception {
    UseKeyAsServiceIdValueMatcher matcher = new UseKeyAsServiceIdValueMatcher();
    assertNull(matcher.getNextServiceId(null, null));
  }
}


text:
+++
title = "Sharding"
weight = 1
chapter = true
+++

This chapter will introduce the Sharding API of ShardingSphere-JDBC.


text:
function [outputq,throughput,latency] = randMove(adjMatrix,inqlimit,outqlimit,iterations,probability)
%randMove - applies random movement to packets in a network.
%
% Syntax:  [outputq,throughput] = randMove(adjMatrix,q,iterations)
%
% Inputs:
%    adjMatrix - adjacency matrix for the network in question
%    q - Queue for the network in question. See function addPackets to understand the structure of the queue.
%    qlimit - limit for queue size
%    iterations - number of desired iterations--how many moves should the packets make?
%
% Outputs:
%    outputq - queue after the number of specified iterations
%    throughput - number of packets that reach their destinations
%    latency - the latency of each transmitted packet in a vector
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
% See also: addPackets.m, avgPath.m, countConnections.m, networkWerror.m, randNetwork.m

% Author: Lukas Schwab
% email: lukas.schwab@gmail.com
% Website: http://www.teuscher-lab.com
% July 2013; Last revision: 22-July-2013

%------------- BEGIN CODE --------------

% Set up counter to limit the number of iterations to the number of desired iterations
iterationNo = 1;

% Set throughput to zero
throughput = 0;

% Set up empty latency
latency = [];

% Create an empty queue
q = addPackets(adjMatrix,0);

% Loop with the iterations defined above
while iterationNo <= iterations
    % Add new packets to the queue
    q = addPackets(adjMatrix,probability,q,iterationNo);
    % FIRST MOVE NODES SITTING IN OUTPUT QUEUES
	% Run through every node's output queue in the network
	for counterOutq = 1:numel(sum(adjMatrix))
        % Set up counter to check every one of the outqueues generated for
        % a node (most of them are empty, thanks to the stupid way matlab
        % handles empty fields (if you try to define a field, 0:that field
        % all end up defined))
        [~,oqpos] = find(adjMatrix(counterOutq,:));
        oqcount = numel(oqpos);
        % If the queue is not empty.
        for counterc = 1:oqcount
            if isempty(q(counterOutq).outqueue(oqpos(counterc)).queue) == 0
                goal = (q(counterOutq).outqueue(oqpos(counterc)).queue{1}.goal);
                dest = oqpos(counterc);
                % Check if there is space in the destination queue
                if numel(q(dest).inqueue) < inqlimit
                    % Check if the packet is traveling to its end-point
                    if dest == goal
			% Note the latency
			latency(end+1) = iterationNo - q(counterOutq).outqueue(oqpos(counterc)).queue{1}.iteration1;
                        % Remove it from the network
                        q(counterOutq).outqueue(oqpos(counterc)).queue(1) = [];
                        % Success! Note it in the throughput output
                        throughput = throughput + 1;
                    else
                        % Add packet to end of new queue
                        q(dest).inqueue(end+1) = q(counterOutq).outqueue(oqpos(counterc)).queue(1);
                        % how to remove the place in the old queue
                        q(counterOutq).outqueue(oqpos(counterc)).queue(1) = [];
                    end
                end
            end
        end
    end
    % NEXT MOVE PACKETS FROM INPUT QUEUES TO OUTPUT QUEUES
    % For every node in the network
    for counterInq = 1:numel(sum(adjMatrix))
        % If there are packets in the input queue
        if isempty(q(counterInq).inqueue) == 0
            % Find the links out of the node, and the number of them
            linksout = find(adjMatrix(counterInq,:));
            linksno = numel(linksout);
            % Generate the random destinations for each packet
            rp = randperm(linksno);
            for counterLinks = 1:linksno
                dest = linksout(rp(counterLinks));
                % If the outqueue in question (see above line) has space
                if numel(q(counterInq).outqueue(dest).queue) < outqlimit
                    % And if there's actually a packet to move
                    if isempty(q(counterInq).inqueue) == 0
                        % Add the packet to the end of the appropriate end
                        % queue
                        q(counterInq).outqueue(dest).queue(end + 1) = q(counterInq).inqueue(1);
                        % Remove it from the inqueue
                        q(counterInq).inqueue(1) = [];
                    end
                end
            end
        end
    end
	% Last line in keeping that while loop under control
	iterationNo = iterationNo + 1;
end

outputq = q;

%------------- END OF CODE -------------