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 index on 'Poll', fields ['fetched']
        db.create_index(u'vkontakte_polls_poll', ['fetched'])

        # Adding index on 'Poll', fields ['votes_count']
        db.create_index(u'vkontakte_polls_poll', ['votes_count'])

        # Adding index on 'Poll', fields ['owner_id']
        db.create_index(u'vkontakte_polls_poll', ['owner_id'])

        # Adding index on 'Answer', fields ['fetched']
        db.create_index(u'vkontakte_polls_answer', ['fetched'])

        # Adding index on 'Answer', fields ['votes_count']
        db.create_index(u'vkontakte_polls_answer', ['votes_count'])

    def backwards(self, orm):
        # Removing index on 'Answer', fields ['votes_count']
        db.delete_index(u'vkontakte_polls_answer', ['votes_count'])

        # Removing index on 'Answer', fields ['fetched']
        db.delete_index(u'vkontakte_polls_answer', ['fetched'])

        # Removing index on 'Poll', fields ['owner_id']
        db.delete_index(u'vkontakte_polls_poll', ['owner_id'])

        # Removing index on 'Poll', fields ['votes_count']
        db.delete_index(u'vkontakte_polls_poll', ['votes_count'])

        # Removing index on 'Poll', fields ['fetched']
        db.delete_index(u'vkontakte_polls_poll', ['fetched'])

    models = {
        u'contenttypes.contenttype': {
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        u'vkontakte_places.city': {
            'Meta': {'ordering': "['name']", 'object_name': 'City'},
            'area': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'country': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'cities'", 'null': 'True', 'to': u"orm['vkontakte_places.Country']"}),
            'fetched': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            'region': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'remote_id': ('django.db.models.fields.BigIntegerField', [], {'unique': 'True'})
        },
        u'vkontakte_places.country': {
            'Meta': {'ordering': "['name']", 'object_name': 'Country'},
            'fetched': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            'remote_id': ('django.db.models.fields.BigIntegerField', [], {'unique': 'True'})
        },
        u'vkontakte_polls.answer': {
            'Meta': {'ordering': "['remote_id']", 'object_name': 'Answer'},
            'fetched': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
            'poll': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': u"orm['vkontakte_polls.Poll']"}),
            'rate': ('django.db.models.fields.FloatField', [], {}),
            'remote_id': ('django.db.models.fields.BigIntegerField', [], {'primary_key': 'True'}),
            'text': ('django.db.models.fields.TextField', [], {}),
            'voters': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'poll_answers'", 'blank': 'True', 'to': u"orm['vkontakte_users.User']"}),
            'votes_count': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
        },
        u'vkontakte_polls.poll': {
            'Meta': {'ordering': "['created']", 'object_name': 'Poll'},
            'answer_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
            'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
            'fetched': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
            'owner_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vkontakte_polls_polls'", 'to': u"orm['contenttypes.ContentType']"}),
            'owner_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
            'post': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'poll'", 'unique': 'True', 'to': u"orm['vkontakte_wall.Post']"}),
            'question': ('django.db.models.fields.TextField', [], {}),
            'remote_id': ('django.db.models.fields.BigIntegerField', [], {'primary_key': 'True'}),
            'votes_count': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
        },
        u'vkontakte_users.user': {
            'Meta': {'ordering': "['remote_id']", 'object_name': 'User'},
            'about': ('django.db.models.fields.TextField', [], {}),
            'activity': ('django.db.models.fields.TextField', [], {}),
            'albums': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'audios': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'bdate': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'books': ('django.db.models.fields.TextField', [], {}),
            'city': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vkontakte_places.City']", 'null': 'True', 'on_delete': 'models.SET_NULL'}),
            'counters_updated': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
            'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vkontakte_places.Country']", 'null': 'True', 'on_delete': 'models.SET_NULL'}),
            'facebook': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'facebook_name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'faculty': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
            'faculty_name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'fetched': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'followers': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'friends': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'friends_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'friends_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'followers_users'", 'symmetrical': 'False', 'to': u"orm['vkontakte_users.User']"}),
            'games': ('django.db.models.fields.TextField', [], {}),
            'graduation': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
            'has_mobile': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'home_phone': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'interests': ('django.db.models.fields.TextField', [], {}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'livejournal': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            'movies': ('django.db.models.fields.TextField', [], {}),
            'mutual_friends': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'notes': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'photo': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'photo_big': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'photo_medium': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'photo_medium_rec': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'photo_rec': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'rate': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
            'relation': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True'}),
            'remote_id': ('django.db.models.fields.BigIntegerField', [], {'unique': 'True'}),
            'screen_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}),
            'sex': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
            'skype': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'subscriptions': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'sum_counters': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'timezone': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
            'tv': ('django.db.models.fields.TextField', [], {}),
            'twitter': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'university': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
            'university_name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
            'user_photos': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'user_videos': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'videos': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
            'wall_comments': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
        },
        u'vkontakte_wall.comment': {
            'Meta': {'ordering': "['post', '-date']", 'object_name': 'Comment'},
            'author_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comments'", 'to': u"orm['contenttypes.ContentType']"}),
            'author_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
            'date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
            'fetched': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
            'from_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'like_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'like_comments'", 'symmetrical': 'False', 'to': u"orm['vkontakte_users.User']"}),
            'likes': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
            'post': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'wall_comments'", 'to': u"orm['vkontakte_wall.Post']"}),
            'raw_html': ('django.db.models.fields.TextField', [], {}),
            'raw_json': ('annoying.fields.JSONField', [], {'default': '{}', 'null': 'True'}),
            'remote_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': "'20'"}),
            'reply_for_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'replies'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
            'reply_for_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'db_index': 'True'}),
            'reply_to': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vkontakte_wall.Comment']", 'null': 'True'}),
            'text': ('django.db.models.fields.TextField', [], {}),
            'wall_owner_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vkontakte_wall_comments'", 'to': u"orm['contenttypes.ContentType']"}),
            'wall_owner_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
        },
        u'vkontakte_wall.post': {
            'Meta': {'ordering': "['wall_owner_id', '-date']", 'object_name': 'Post'},
            'attachments': ('django.db.models.fields.TextField', [], {}),
            'author_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vkontakte_posts'", 'to': u"orm['contenttypes.ContentType']"}),
            'author_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
            'comments': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
            'copy_owner_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vkontakte_wall_copy_posts'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
            'copy_owner_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'db_index': 'True'}),
            'copy_post': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vkontakte_wall.Post']", 'null': 'True'}),
            'copy_text': ('django.db.models.fields.TextField', [], {}),
            'date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
            'fetched': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
            'geo': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'like_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'like_posts'", 'symmetrical': 'False', 'to': u"orm['vkontakte_users.User']"}),
            'likes': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
            'media': ('django.db.models.fields.TextField', [], {}),
            'online': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
            'post_source': ('django.db.models.fields.TextField', [], {}),
            'raw_html': ('django.db.models.fields.TextField', [], {}),
            'raw_json': ('annoying.fields.JSONField', [], {'default': '{}', 'null': 'True'}),
            'remote_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': "'20'"}),
            'reply_count': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
            'repost_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'repost_posts'", 'symmetrical': 'False', 'to': u"orm['vkontakte_users.User']"}),
            'reposts': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
            'signer_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
            'text': ('django.db.models.fields.TextField', [], {}),
            'wall_owner_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vkontakte_wall_posts'", 'to': u"orm['contenttypes.ContentType']"}),
            'wall_owner_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
        }
    }

    complete_apps = ['vkontakte_polls']


text:
namespace Khala.EventSourcing.Azure
{
    using System;
    using System.Reflection;
    using AutoFixture;
    using AutoFixture.AutoMoq;
    using AutoFixture.Idioms;
    using FluentAssertions;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Microsoft.WindowsAzure.Storage.Table;

    [TestClass]
    public class AggregateEntity_specs
    {
        [TestMethod]
        public void sut_is_abstract()
        {
            typeof(AggregateEntity).IsAbstract.Should().BeTrue();
        }

        [TestMethod]
        public void sut_inherits_TableEntity()
        {
            typeof(AggregateEntity).BaseType.Should().Be(typeof(TableEntity));
        }

        [TestMethod]
        public void GetPartitionKey_returns_combination_of_source_type_name_and_source_id()
        {
            IFixture fixture = new Fixture().Customize(new AutoMoqCustomization());
            Type sourceType = fixture.Create<IEventSourced>().GetType();
            Guid sourceId = fixture.Create<Guid>();

            string actual = AggregateEntity.GetPartitionKey(sourceType, sourceId);

            actual.Should().Be($"{sourceType.Name}-{sourceId:n}");
        }

        [TestMethod]
        public void GetPartitionKey_has_guard_clauses()
        {
            MethodInfo mut = typeof(AggregateEntity).GetMethod("GetPartitionKey");
            new GuardClauseAssertion(new Fixture()).Verify(mut);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
from __future__ import unicode_literals

import django.contrib.postgres.fields.jsonb
from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ('contentcuration', '0105_channel_published_data'),
    ]

    operations = [
        migrations.AlterField(
            model_name='channel',
            name='published_data',
            field=django.contrib.postgres.fields.jsonb.JSONField(default=dict),
        ),
    ]


text:
#include "LightCy.h"
#include <iostream>
#include <cmath>

static const auto near_z_plane = 0.1f;
static const auto far_z_plane = 10000.0f;
static const auto field_of_view = 90.0f;

static GLuint g_DisplayList = (GLuint)(-1);

LightCy::LightCy(GlutMaster& glutMaster)
	: glutmaster_(&glutMaster)
	, terrain_(map_size_x, map_size_y)
{
	initialise_glut();
	initialise_opengl();
	initialise_game();
}

LightCy::~LightCy()
{
	glutDestroyWindow(windowID);
}

void LightCy::CallBackReshapeFunc(int newWidth, int newHeight)
{
	/* save the window width and height for later use */
	window_width_ = static_cast<float>(newWidth);
	window_height_ = static_cast<float>(newHeight);

	/* instruct openGL to use the entirety of our window */
	glViewport(0, 0, newWidth, newHeight);

	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluPerspective(field_of_view, window_width_ / window_height_,
				   near_z_plane, far_z_plane);
}

void LightCy::CallBackDisplayFunc(void)
{
	/* our timing information */
	auto fps = 0u;
	/* adjust our timer, which we use for transforming our objects */
	auto dt = timer_.get_previous_frame_delta();
	/* timing information */
	if (timer_.get_fps(fps))
		std::cout << "FPS: " << fps << std::endl;

	/* update the start countdown timer and game state */
	update_start_countdown(dt);
	update_game_state(dt);

	/* clear our colour buffer and depth buffer */
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

	/* draw the scene for both players */
	for(auto i = 0; i < cameras_.size(); i++)
	{
		if(i == 0)
			glViewport(0, window_height_/2, window_width_, window_height_/2);
		else
			glViewport(0, 0, window_width_, window_height_/2);
		glMatrixMode(GL_PROJECTION);
		glLoadIdentity();
		gluPerspective(field_of_view, window_width_ / (window_height_ / 2), near_z_plane, far_z_plane);
		glMatrixMode(GL_MODELVIEW);
		glPushMatrix();
			glRotatef(cameras_[i].x_angle(), 1.0, 0.0, 0.0);
			glRotatef(cameras_[i].y_angle(), 0.0, 1.0, 0.0);
			glRotatef(cameras_[i].z_angle(), 0.0, 0.0, 1.0);
			glTranslatef(-cameras_[i].x_pos(), -cameras_[i].y_pos(), -cameras_[i].z_pos());
			glCallList(g_DisplayList);
			players_[0].draw();
			players_[1].draw();
			messages_[i].show(window_width_, window_height_);
		glPopMatrix();
	}
	glutSwapBuffers();
}

void LightCy::CallBackIdleFunc()
{
	/* force another redraw, so we are always drawing as much as possible */
	glutPostRedisplay();
	CallBackDisplayFunc();
}

void LightCy::CallBackKeyboardFunc(unsigned char key, int x, int y)
{
	auto keytest = tolower(key);

	if (keytest == 'a')
		players_[1].turn_left();
	else if(keytest == 'd')
		players_[1].turn_right();
	else if(keytest == 'q')
		exit(0);
	else if(keytest == 'r')
	{
		if(in_start_menu_)
		{
			for(auto& i : messages_)
				i.clear();
			in_start_menu_ = false;
			start_countdown_ = start_countdown_time;
		}
		else
			reset_game();
	}
}

void LightCy::CallBackSpecialFunc(int key, int x, int y)
{
	if(key == GLUT_KEY_LEFT)
		players_[0].turn_left();
	else if(key == GLUT_KEY_RIGHT)
		players_[0].turn_right();
}

void LightCy::initialise_opengl()
{
	glClearColor(0.2f, 0.2f, 0.2f, 0.0f);
	GLfloat lightAmbient[]={0.5, 0.5, 0.5, 1.0};
	glLightfv(GL_LIGHT0, GL_AMBIENT, lightAmbient);
	GLfloat lightDiffuse[] = {0.2, 0.2, 0.2, 1.0};
	glLightfv(GL_LIGHT0, GL_DIFFUSE, lightDiffuse);
	GLfloat lightSpecular[] = { 0.0, 0.0, 0.0, 1.0};
	glLightfv(GL_LIGHT0, GL_SPECULAR, lightSpecular);
	GLfloat lightPosition[] = {map_size_x / 2, map_size_y / 2, 500, 0.0};
	glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
	GLfloat lightModelAmbient[]={0.3,0.3,0.3,1.0};
	glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lightModelAmbient);
	glEnable(GL_DEPTH_TEST);
	glEnable(GL_LIGHT0);
	glEnable(GL_LIGHTING);
	glEnable(GL_COLOR_MATERIAL);
	glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE);
	GLfloat specref[]={ 1.0, 1.0, 1.0, 1.0};
	glMaterialfv(GL_FRONT, GL_SPECULAR,specref);
	glMateriali(GL_FRONT,GL_SHININESS, 128);
	glShadeModel(GL_SMOOTH);
	glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}

void LightCy::initialise_glut()
{
	glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
	glutInitWindowSize(window_width_, window_height_);
	glutmaster_->CallGlutCreateWindow("LightCy", this);
	glutmaster_->SetIdleToCurrentWindow();
	glutmaster_->EnableIdleFunction();
}

void LightCy::compile_terrain()
{
	g_DisplayList = glGenLists(1);
	glNewList(g_DisplayList, GL_COMPILE);
	glPushMatrix();
	terrain_.draw();
	glPopMatrix();
	glEndList();
}

void LightCy::initialise_game()
{
	players_.push_back(Player(XYCoordinate(256, 400), RGBValue(1.0, 0, 0), 3, &terrain_));
	players_.push_back(Player(XYCoordinate(256, 100), RGBValue(0, 0.5, 0.9), 1, &terrain_));
	cameras_.push_back(Camera(players_[0]));
	cameras_.push_back(Camera(players_[1]));
	messages_.push_back(Message());
	messages_.push_back(Message());
	compile_terrain();
	messages_[0].write("Press 'R' to begin...", 10);
}

void LightCy::reset_game()
{
	terrain_.reset();
	compile_terrain();
	for(auto& i : players_)
		i.reset();
	for(auto& i : messages_)
		i.clear();
	game_running_ = false;
	start_countdown_ = start_countdown_time;
}

float LightCy::check_lost(const Player& p) const
{
	auto ret = 0.0f;
	for(auto& i : players_)
		ret += p.crash_distance(i.get_trail());
	if(p.x_pos() < 0)
		ret += fabs(p.x_pos());
	else if(p.x_pos() > map_size_x)
		ret += p.x_pos() - map_size_x + 1;
	else if(p.y_pos() < 0)
		ret += fabs(p.y_pos());
	else if(p.y_pos() > map_size_y)
		ret += p.y_pos() - map_size_y + 1;
	return ret;
}

void LightCy::update_start_countdown(float dt)
{
	if(start_countdown_ > 0)
	{
		start_countdown_ -= dt;
		if(start_countdown_ <= 0)
			game_running_ = true;
		for(auto& i : messages_)
		{
			i.clear();
			if(start_countdown_ < 1)
				i.write("Go!", 0.01);
			else
				i.write("Ready?", 0.01);
		}
	}
}

void LightCy::update_game_state(float dt)
{
	if(game_running_ && dt > 0)
	{
		players_[0].move_forward(dt);
		players_[1].move_forward(dt);
		messages_[0].update(dt);
		messages_[1].update(dt);
		/* check if either player lost */
		auto lose1 = check_lost(players_[0]);
		auto lose2 = check_lost(players_[1]);
		if((lose1 > 0) || (lose2 > 0))
		{
			game_running_ = false;
			if(lose1 == lose2)
			{
				for(auto& i : messages_)
					i.write("It's a draw!", 0);
			}
			else if(lose1 > lose2)
			{
				messages_[0].write("You lost!", 0);
				messages_[1].write("You won!", 0);
			}
			else if(lose2 > lose1)
			{
				messages_[0].write("You won!", 0);
				messages_[1].write("You lost!", 0);
			}
		}
	}
}


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

<title>ca.islandora.alpaca.indexing.fcrepo</title>
<meta name="date" content="2017-11-23">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

ca.islandora.alpaca.indexing.fcrepo

Classes

FcrepoIndexer


text:
package com.citrix.sharefile.api.models;

import java.io.InputStream;
import java.util.ArrayList;
import java.net.URI;
import java.util.Date;
import java.util.Map;
import java.util.HashMap;

import com.google.gson.annotations.SerializedName;
import com.citrix.sharefile.api.*;
import com.citrix.sharefile.api.enumerations.*;
import com.citrix.sharefile.api.models.*;

public class SFSupportFlag extends SFODataObject {

	@SerializedName("UserId")
	private String UserId;
	@SerializedName("AccountId")
	private String AccountId;
	@SerializedName("RepresentativeId")
	private String RepresentativeId;
	@SerializedName("CreationDate")
	private Date CreationDate;
	@SerializedName("NotificationDate")
	private Date NotificationDate;
	@SerializedName("ExpirationDate")
	private Date ExpirationDate;
	@SerializedName("DueDate")
	private Date DueDate;
	@SerializedName("Title")
	private String Title;
	@SerializedName("Description")
	private String Description;
	@SerializedName("Status")
	private SFSafeEnum<SFSupportFlagStatus> Status;
	@SerializedName("FlagType")
	private SFSafeEnum<SFSupportFlagType> FlagType;
	@SerializedName("Action")
	private String Action;
	@SerializedName("BillingLogId")
	private String BillingLogId;

	public String getUserId() {
		return this.UserId;
	}

	public void setUserId(String userid) {
		this.UserId = userid;
	}
	public String getAccountId() {
		return this.AccountId;
	}

	public void setAccountId(String accountid) {
		this.AccountId = accountid;
	}
	public String getRepresentativeId() {
		return this.RepresentativeId;
	}

	public void setRepresentativeId(String representativeid) {
		this.RepresentativeId = representativeid;
	}
	public Date getCreationDate() {
		return this.CreationDate;
	}

	public void setCreationDate(Date creationdate) {
		this.CreationDate = creationdate;
	}
	public Date getNotificationDate() {
		return this.NotificationDate;
	}

	public void setNotificationDate(Date notificationdate) {
		this.NotificationDate = notificationdate;
	}
	public Date getExpirationDate() {
		return this.ExpirationDate;
	}

	public void setExpirationDate(Date expirationdate) {
		this.ExpirationDate = expirationdate;
	}
	public Date getDueDate() {
		return this.DueDate;
	}

	public void setDueDate(Date duedate) {
		this.DueDate = duedate;
	}
	public String getTitle() {
		return this.Title;
	}

	public void setTitle(String title) {
		this.Title = title;
	}
	public String getDescription() {
		return this.Description;
	}

	public void setDescription(String description) {
		this.Description = description;
	}
	public SFSafeEnum<SFSupportFlagStatus> getStatus() {
		return this.Status;
	}

	public void setStatus(SFSafeEnum<SFSupportFlagStatus> status) {
		this.Status = status;
	}
	public SFSafeEnum<SFSupportFlagType> getFlagType() {
		return this.FlagType;
	}

	public void setFlagType(SFSafeEnum<SFSupportFlagType> flagtype) {
		this.FlagType = flagtype;
	}
	public String getAction() {
		return this.Action;
	}

	public void setAction(String action) {
		this.Action = action;
	}
	public String getBillingLogId() {
		return this.BillingLogId;
	}

	public void setBillingLogId(String billinglogid) {
		this.BillingLogId = billinglogid;
	}

}


text:
<?php
$targetchargers = [];
array_push($targetchargers,"Welcome Break Abington, M74 Motorway, Jct 13, Abington, BiggarCCS fast charge");

include("../../php/rss_template.php");
?>


text:
module Authlete
  module Model
    module Response
      class TokenFailResponse < Authlete::Model::Result

        attr_accessor :action

        attr_accessor :responseContent
        alias_method  :response_content,  :responseContent
        alias_method  :response_content=, :responseContent=

        private

        def defaults
          super.merge(
            action:          nil,
            responseContent: nil
          )
        end

        def set_params(hash)
          super(hash)

          @action          = hash[:action]
          @responseContent = hash[:responseContent]
        end
      end
    end
  end
end


text:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTicketsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('tickets', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('subject');
			$table->text('content');
			$table->text('respon');
			$table->string('status');
			$table->integer('user_id');
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('tickets');
	}

}


text:
package apoc.bolt;

import org.neo4j.driver.exceptions.ResultConsumedException;

import java.util.Iterator;
import java.util.function.Consumer;

/**
 * if we would pass through a bolt result stream directly as a procedure result stream, there's an issue regarding
 * hasNext() throwing an exception.
 * This wrapper class catches the exception and deals with it gracefully
 * @param <T>
 */
public class ClosedAwareDelegatingIterator<T> implements Iterator<T> {
    private final Iterator<T> delegate;
    private boolean closed = false;

    public ClosedAwareDelegatingIterator(Iterator<T> delegate) {
        this.delegate = delegate;
    }

    @Override
    public boolean hasNext() {
        if (closed) {
            return false;
        }
        try {
            return delegate.hasNext();
        } catch (ResultConsumedException e) {
            closed = true;
            return false;
        }
    }

    @Override
    public T next() {
        try {

            return delegate.next();
        } catch (Exception e) {
            throw e;
        }
    }

    @Override
    public void remove() {
        throw new UnsupportedOperationException();
    }

    @Override
    public void forEachRemaining(Consumer<? super T> action) {
        throw new UnsupportedOperationException();
    }
}


text:
from sanic import Blueprint
from sanic.views import HTTPMethodView
from sanic.response import text
from . import deliveries_api

deliveries_if = Blueprint('deliveries_if')

class deliveriesView(HTTPMethodView):

    async def get(self, request):

        return await deliveries_api.deliveries_get(request)

    async def post(self, request):

        return await deliveries_api.deliveries_post(request)

deliveries_if.add_route(deliveriesView.as_view(), '/deliveries')

class deliveries_bydeliveryIdView(HTTPMethodView):

    async def get(self, request, deliveryId):

        return await deliveries_api.deliveries_byDeliveryId_get(request, deliveryId)

    async def patch(self, request, deliveryId):

        return await deliveries_api.deliveries_byDeliveryId_patch(request, deliveryId)

    async def delete(self, request, deliveryId):

        return await deliveries_api.deliveries_byDeliveryId_delete(request, deliveryId)

deliveries_if.add_route(deliveries_bydeliveryIdView.as_view(), '/deliveries/<deliveryId>')


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

/*Problem 10. Find sum in array

Write a program that finds in given array of integers a sequence of given sum S (if present).
 */

namespace _10FindSumInArray
{
    class FindSumInArray
    {
        static void Main(string[] args)
        {
            //For console input:
            //Console.WriteLine("Enter the value for S:");
            //int s = int.Parse(Console.ReadLine());
            //int[] array = InitArray();

            int s = 11;
            int[] array = { 4, 3, 1, 4, 2, 5, 8 };

            bool flagHasSum = false;

            int sum = 0;
            List<int> sequence = new List<int>();

            for (int i = 0; i < array.Length - 1; i++)
            {
                sequence.Add(array[i]);
                sum = 0;
                sum += array[i];
                for (int j = i + 1; j < array.Length; j++)
                {
                    if (sum == s)
                    {
                        flagHasSum = true;
                        break;
                    }

                    sum += array[j];

                    if (sum < s)
                    {
                        sequence.Add(array[j]);
                    }
                    else if (sum == s)
                    {
                        sequence.Add(array[j]);
                        flagHasSum = true;
                        break;
                    }
                    else
                    {
                        sequence.Clear();
                    }
                }

                if (sum == s)
                {
                    break;
                }
                else if (sum < s)
                {
                    sequence.Clear();
                }
                else
                {
                    sequence.Clear();
                }
            }

            if (flagHasSum)
            {
                string result = string.Join(", ", sequence);
                Console.WriteLine(result);
            }
            else
            {
                Console.WriteLine("There is no sum = {0} in this array.", s);
            }
        }
        static int[] InitArray()
        {
            //Initializes an int array.

            Console.Write("Enter the size of the array: ");
            int sizeOfArray = int.Parse(Console.ReadLine());

            int[] array = new int[sizeOfArray];

            for (int i = 0; i < sizeOfArray; i++)
            {
                Console.Write("array[{0}] = ", i);
                array[i] = int.Parse(Console.ReadLine());
            }

            Console.WriteLine();

            return array;
        }

    }
}


text:
extern "C" {
#endif

#define crypto_verify_32_BYTES 32U
SODIUM_EXPORT
size_t crypto_verify_32_bytes(void);

SODIUM_EXPORT
int crypto_verify_32(const unsigned char *x, const unsigned char *y);

#ifdef __cplusplus
}
#endif

#endif


text:
<?php

return [
    'name'   => 'Blocs de contenu',
    'blocks' => 'bloc de contenu|blocs de contenu',
    'New'    => 'Nouveau bloc de contenu',
    'Edit'   => 'Modifier le bloc de contenu',
    'Back'   => 'Retour à la liste des blocs de contenu',
];


text:
namespace ph
{

class WorkScheduler : public IWorkDispatcher
{
public:
	// A scheduler with no work load.
	WorkScheduler();

	WorkScheduler(std::size_t numWorkers, const WorkUnit& totalWorkUnit);

	bool dispatch(WorkUnit* out_workUnit) override;

	// Schedules some amount of work. Returns true when non-zero amount of work
	// has been scheduled; otherwise, no work has been scheduled and no more
	// is yet to be scheduled (the scheduler is exhausted).
	bool schedule(WorkUnit* out_workUnit);
	void scheduleAll(std::vector<WorkUnit>& out_workUnits);
	void submit(const WorkUnit& workUnit);

	float getScheduledFraction() const;
	float getSubmittedFraction() const;
	bool isExhausted() const;

protected:
	std::size_t m_numWorkers;
	WorkUnit    m_totalWorkUnit;
	std::size_t m_totalVolume;
	std::size_t m_scheduledVolume;
	std::size_t m_submittedVolume;

private:
	virtual void scheduleOne(WorkUnit* out_workUnit) = 0;
};

// In-header Implementations:

inline WorkScheduler::WorkScheduler() :
	WorkScheduler(1, WorkUnit())
{}

inline WorkScheduler::WorkScheduler(const std::size_t numWorkers, const WorkUnit& totalWorkUnit) :
	m_numWorkers     (numWorkers),
	m_totalWorkUnit  (totalWorkUnit),
	m_totalVolume    (totalWorkUnit.getVolume()),
	m_scheduledVolume(0),
	m_submittedVolume(0)
{
	PH_ASSERT_GE(numWorkers, 1);
}

inline bool WorkScheduler::dispatch(WorkUnit* const out_workUnit)
{
	return schedule(out_workUnit);
}

inline bool WorkScheduler::schedule(WorkUnit* const out_workUnit)
{
	PH_ASSERT(out_workUnit);

	while(!isExhausted())
	{
		scheduleOne(out_workUnit);

		const std::size_t volume = out_workUnit->getVolume();
		if(volume > 0)
		{
			m_scheduledVolume += volume;
			return true;
		}
	}

	PH_ASSERT_EQ(m_scheduledVolume, m_totalVolume);
	return false;
}

inline void WorkScheduler::scheduleAll(std::vector<WorkUnit>& out_workUnits)
{
	WorkUnit workUnit;
	while(schedule(&workUnit))
	{
		out_workUnits.push_back(workUnit);
	}
}

inline void WorkScheduler::submit(const WorkUnit& workUnit)
{
	m_submittedVolume += workUnit.getVolume();

	PH_ASSERT_LE(m_submittedVolume, m_totalVolume);
}

inline float WorkScheduler::getScheduledFraction() const
{
	return static_cast<float>(m_scheduledVolume) / static_cast<float>(m_totalVolume);
}

inline float WorkScheduler::getSubmittedFraction() const
{
	return static_cast<float>(m_submittedVolume) / static_cast<float>(m_totalVolume);
}

inline bool WorkScheduler::isExhausted() const
{
	return m_scheduledVolume == m_totalVolume;
}

}// end namespace ph


text:
require 'matrix'
class MultiplicationSquare

  attr_reader :axes

  def initialize(axes, out = STDOUT)
    @axes = axes
    @out = out
  end

  def display
    @out.puts(self.to_s)
  end

  def grid
    @grid ||= Matrix.build(axes.size) {|row,col| axes[row] * axes[col]}.to_a
  end

  def to_s
    maximum_width = grid.flatten.max.to_s.length
    output = ([ " " * maximum_width ] + [axes.each.map {|element| "%#{maximum_width}d" % element}]).join(" ") + "\n"
    grid.each_with_index do |row, index|
      output +=  ([axes[index]] + row).each.map {|element| "%#{maximum_width}d" % element}.join " "
      output += "\n"
    end

    output
  end

end


text:
var Circle = function (center, radius) {
  this.center = center;
  this.radius = radius;
  this._type = 'Circle';
};

module.exports = Circle;


text:
-- MySQL dump 10.13  Distrib 5.7.9, for osx10.9 (x86_64)
--
-- Host: 127.0.0.1    Database: yii2_demo
-- ------------------------------------------------------
-- Server version	5.6.25-73.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `customer`
--

DROP TABLE IF EXISTS `customer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `customer` (
  `id_customer` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) NOT NULL,
  `email` varchar(100) NOT NULL,
  `city` varchar(45) NOT NULL,
  `country` varchar(45) NOT NULL,
  PRIMARY KEY (`id_customer`),
  UNIQUE KEY `email_UNIQUE` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `customer`
--

LOCK TABLES `customer` WRITE;
/*!40000 ALTER TABLE `customer` DISABLE KEYS */;
INSERT INTO `customer` VALUES (1,'Ipan Ardian','ipan.ardian@indosystem.com','Cirebon','Indonesia'),(2,'Reimy Gaillard','remi@yahoo.com','Paris','France'),(3,'Centro Moctezuma','centro@ask.com','México D.F.','Mexico'),(4,'Ernst Handel','ernst@handel.com','Graz','Austria'),(6,'Galería del gastrónomo','galeria@gmail.com','Barcelona','Spain'),(7,'Bradley Smith','Bradley@goo.com','Cowes','UK'),(8,'Königlich Essen','Koniglich@intel.com','Munchen','Germany'),(10,'Magazzini Alimentari Riuniti','Magazzini@intel.com','Bergamo','Italy'),(13,'John Doe','john@microsoft.com','Las Vegas','US'),(14,'Mourinhou','mou@gmail.com','Lisbon','Portugal'),(15,'Dart Vader','dart@gmail.com','Netingham','First Order'),(16,'Messi','messi@gmail.com','Barcelona','Spain');
/*!40000 ALTER TABLE `customer` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2016-03-18 14:54:39


text:
enum message_type {
	ACK_NACK,
	GET_INFO,
	SHOW_ALL,
	SET_MAC_INTRO,
	SET_MAC
};

struct message {
	enum message_type x;
	char* wiad;
};

int send_ack_nack(int fd, bool is_error, const char* error_msg);
int send_log_in(int fd, const char* name);
int send_user_list(int fd);
int send_user_list_reply(int fd, const char* names[], size_t len);
struct message* receive_message(int fd);
void delete_message(struct message* m);
int send_bytes(int fd, const char* msg, size_t len);
int send_ifs(int fd);
int send_inf(int fd,const char* interfejs);


text:
/**
 * Created by tilmannbruckhaus on 1/11/15.
 */

object reverse_args extends App {
  println(args.reverse.mkString(" "))
}


text:
package org.apache.beam.runners.spark.stateful;

import static com.google.common.base.Preconditions.checkArgument;

import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.beam.runners.core.StateNamespace;
import org.apache.beam.runners.core.TimerInternals;
import org.apache.beam.runners.spark.coders.CoderHelpers;
import org.apache.beam.runners.spark.util.GlobalWatermarkHolder.SparkWatermarks;
import org.apache.beam.sdk.state.TimeDomain;
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
import org.joda.time.Instant;

/**
 * An implementation of {@link TimerInternals} for the SparkRunner.
 */
public class SparkTimerInternals implements TimerInternals {
  private final Instant highWatermark;
  private final Instant synchronizedProcessingTime;
  private final Set<TimerData> timers = Sets.newHashSet();

  private Instant inputWatermark;

  private SparkTimerInternals(
      Instant lowWatermark, Instant highWatermark, Instant synchronizedProcessingTime) {
    this.inputWatermark = lowWatermark;
    this.highWatermark = highWatermark;
    this.synchronizedProcessingTime = synchronizedProcessingTime;
  }

  /** Build the {@link TimerInternals} according to the feeding streams. */
  public static SparkTimerInternals forStreamFromSources(
      List<Integer> sourceIds,
      Map<Integer, SparkWatermarks> watermarks) {
    // if watermarks are invalid for the specific ids, use defaults.
    if (watermarks == null || watermarks.isEmpty()
        || Collections.disjoint(sourceIds, watermarks.keySet())) {
      return new SparkTimerInternals(
          BoundedWindow.TIMESTAMP_MIN_VALUE, BoundedWindow.TIMESTAMP_MIN_VALUE, new Instant(0));
    }
    // there might be more than one stream feeding this stream, slowest WM is the right one.
    Instant slowestLowWatermark = BoundedWindow.TIMESTAMP_MAX_VALUE;
    Instant slowestHighWatermark = BoundedWindow.TIMESTAMP_MAX_VALUE;
    // synchronized processing time should clearly be synchronized.
    Instant synchronizedProcessingTime = null;
    for (Integer sourceId: sourceIds) {
      SparkWatermarks sparkWatermarks = watermarks.get(sourceId);
      if (sparkWatermarks != null) {
        // keep slowest WMs.
        slowestLowWatermark = slowestLowWatermark.isBefore(sparkWatermarks.getLowWatermark())
            ? slowestLowWatermark : sparkWatermarks.getLowWatermark();
        slowestHighWatermark = slowestHighWatermark.isBefore(sparkWatermarks.getHighWatermark())
            ? slowestHighWatermark : sparkWatermarks.getHighWatermark();
        if (synchronizedProcessingTime == null) {
          // firstime set.
          synchronizedProcessingTime = sparkWatermarks.getSynchronizedProcessingTime();
        } else {
          // assert on following.
          checkArgument(
              sparkWatermarks.getSynchronizedProcessingTime().equals(synchronizedProcessingTime),
              "Synchronized time is expected to keep synchronized across sources.");
        }
      }
    }
    return new SparkTimerInternals(
        slowestLowWatermark, slowestHighWatermark, synchronizedProcessingTime);
  }

  /** Build a global {@link TimerInternals} for all feeding streams.*/
  public static SparkTimerInternals global(Map<Integer, SparkWatermarks> watermarks) {
    return watermarks == null ? forStreamFromSources(Collections.<Integer>emptyList(), null)
        : forStreamFromSources(Lists.newArrayList(watermarks.keySet()), watermarks);
  }

  Collection<TimerData> getTimers() {
    return timers;
  }

  /** This should only be called after processing the element. */
  Collection<TimerData> getTimersReadyToProcess() {
    Set<TimerData> toFire = Sets.newHashSet();
    Iterator<TimerData> iterator = timers.iterator();
    while (iterator.hasNext()) {
      TimerData timer = iterator.next();
      if (timer.getTimestamp().isBefore(inputWatermark)) {
        toFire.add(timer);
        iterator.remove();
      }
    }
    return toFire;
  }

  void addTimers(Iterable<TimerData> timers) {
    for (TimerData timer: timers) {
      this.timers.add(timer);
    }
  }

  @Override
  public void setTimer(TimerData timer) {
    this.timers.add(timer);
  }

  @Override
  public void deleteTimer(StateNamespace namespace, String timerId, TimeDomain timeDomain) {
    throw new UnsupportedOperationException("Deleting a timer by ID is not yet supported.");
  }

  @Override
  public void deleteTimer(TimerData timer) {
    this.timers.remove(timer);
  }

  @Override
  public Instant currentProcessingTime() {
    return Instant.now();
  }

  @Nullable
  @Override
  public Instant currentSynchronizedProcessingTime() {
    return synchronizedProcessingTime;
  }

  @Override
  public Instant currentInputWatermarkTime() {
    return inputWatermark;
  }

  /** Advances the watermark. */
  public void advanceWatermark() {
    inputWatermark = highWatermark;
  }

  @Nullable
  @Override
  public Instant currentOutputWatermarkTime() {
    return null;
  }

  @Override
  public void setTimer(
      StateNamespace namespace,
      String timerId,
      Instant target,
      TimeDomain timeDomain) {
    throw new UnsupportedOperationException("Setting a timer by ID not yet supported.");
  }

  @Override
  public void deleteTimer(StateNamespace namespace, String timerId) {
    throw new UnsupportedOperationException("Deleting a timer by ID is not yet supported.");
  }

  public static Collection<byte[]> serializeTimers(
      Collection<TimerData> timers, TimerDataCoder timerDataCoder) {
    return CoderHelpers.toByteArrays(timers, timerDataCoder);
  }

  public static Iterable<TimerData> deserializeTimers(
      Collection<byte[]> serTimers, TimerDataCoder timerDataCoder) {
    return CoderHelpers.fromByteArrays(serTimers, timerDataCoder);
  }

  @Override
  public String toString() {
    return "SparkTimerInternals{" + "highWatermark=" + highWatermark
        + ", synchronizedProcessingTime=" + synchronizedProcessingTime + ", timers=" + timers
        + ", inputWatermark=" + inputWatermark + '}';
  }
}


text:
package chapter3;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.security.DigestInputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;

/**
 * Basic IO example using SHA1
 */
public class DigestIOExample
{
    public static void main(
        String[]    args)
        throws Exception
    {
        byte[]          input = new byte[] {
                            0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                            0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
                            0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };;

        MessageDigest   hash = MessageDigest.getInstance("SHA1");

        System.out.println("input     : " + Utils.toHex(input));

        // input pass

        ByteArrayInputStream	bIn = new ByteArrayInputStream(input);
        DigestInputStream		dIn = new DigestInputStream(bIn, hash);
        ByteArrayOutputStream	bOut = new ByteArrayOutputStream();

        int	ch;
        while ((ch = dIn.read()) >= 0)
        {
            bOut.write(ch);
        }

        byte[] newInput = bOut.toByteArray();

        System.out.println("in digest : " + Utils.toHex(dIn.getMessageDigest().digest()));

        // output pass

        bOut = new ByteArrayOutputStream();

        DigestOutputStream      dOut = new DigestOutputStream(bOut, hash);

        dOut.write(newInput);

        dOut.close();

        System.out.println("out digest: " + Utils.toHex(dOut.getMessageDigest().digest()));
    }
}


text:
/* For other arch:s, this file is described as a "collection of junk", so
   let's collect some nice junk of our own.  Keep it; it might be useful
   some day!  */

#ifndef CRIS_SIM_H
#define CRIS_SIM_H

typedef struct {
  /* Whether the branch for the current insn was taken.  Placed first
     here, in hope it'll get closer to the main simulator data.  */
  USI branch_taken;

  /* PC of the insn of the branch.  */
  USI old_pc;

  /* Static cycle count for all insns executed so far, including
     non-context-specific stall cycles, for example when adding to PC.  */
  unsigned64 basic_cycle_count;

  /* Stall cycles for unaligned access of memory operands.  FIXME:
     Should or should not include unaligned [PC+] operands?  */
  unsigned64 unaligned_mem_dword_count;

  /* Context-specific stall cycles.  */
  unsigned64 memsrc_stall_count;
  unsigned64 memraw_stall_count;
  unsigned64 movemsrc_stall_count;
  unsigned64 movemaddr_stall_count;
  unsigned64 movemdst_stall_count;
  unsigned64 mulsrc_stall_count;
  unsigned64 jumpsrc_stall_count;
  unsigned64 branch_stall_count;
  unsigned64 jumptarget_stall_count;

  /* What kind of target-specific trace to perform.  */
  int flags;

  /* Just the basic cycle count.  */
#define FLAG_CRIS_MISC_PROFILE_SIMPLE 1

  /* Show unaligned accesses.  */
#define FLAG_CRIS_MISC_PROFILE_UNALIGNED 2

  /* Show schedulable entities.  */
#define FLAG_CRIS_MISC_PROFILE_SCHEDULABLE 4

  /* Show everything.  */
#define FLAG_CRIS_MISC_PROFILE_ALL		\
 (FLAG_CRIS_MISC_PROFILE_SIMPLE			\
  | FLAG_CRIS_MISC_PROFILE_UNALIGNED		\
  | FLAG_CRIS_MISC_PROFILE_SCHEDULABLE)

  /* Emit trace of each insn, xsim style.  */
#define FLAG_CRIS_MISC_PROFILE_XSIM_TRACE 8

#define N_CRISV32_BRANCH_PREDICTORS 256
  unsigned char branch_predictors[N_CRISV32_BRANCH_PREDICTORS];

} CRIS_MISC_PROFILE;

/* Handler prototypes for functions called from the CGEN description.  */

extern USI cris_bmod_handler (SIM_CPU *, UINT, USI);
extern void cris_flush_simulator_decode_cache (SIM_CPU *, USI);
extern USI crisv10f_break_handler (SIM_CPU *, USI, USI);
extern USI crisv32f_break_handler (SIM_CPU *, USI, USI);
extern USI cris_break_13_handler (SIM_CPU *, USI, USI, USI, USI, USI, USI,
				  USI, USI);
extern char cris_have_900000xxif;
enum cris_unknown_syscall_action_type
  { CRIS_USYSC_MSG_STOP, CRIS_USYSC_MSG_ENOSYS, CRIS_USYSC_QUIET_ENOSYS };
extern enum cris_unknown_syscall_action_type cris_unknown_syscall_action;
enum cris_interrupt_type { CRIS_INT_NMI, CRIS_INT_RESET, CRIS_INT_INT };
extern int crisv10deliver_interrupt (SIM_CPU *,
				     enum cris_interrupt_type,
				       unsigned int);
extern int crisv32deliver_interrupt (SIM_CPU *,
				     enum cris_interrupt_type,
				     unsigned int);

/* Using GNU syntax (not C99) so we can compile this on RH 6.2
   (egcs-1.1.2/gcc-2.91.66).  */
#define cris_trace_printf(SD, CPU, FMT...)			\
  do								\
    {								\
      if (TRACE_FILE (STATE_TRACE_DATA (SD)) != NULL)		\
	fprintf (TRACE_FILE (CPU_TRACE_DATA (CPU)), FMT);	\
      else							\
	sim_io_printf (SD, FMT);				\
    }								\
  while (0)

#if WITH_PROFILE_MODEL_P
#define crisv32f_branch_taken(cpu, oldpc, newpc, taken)	\
  do								\
    {								\
      CPU_CRIS_MISC_PROFILE (cpu)->old_pc = oldpc;		\
      CPU_CRIS_MISC_PROFILE (cpu)->branch_taken = taken;	\
    }								\
  while (0)
#else
#define crisv32f_branch_taken(cpu, oldpc, newpc, taken)
#endif

#define crisv10f_branch_taken(cpu, oldpc, newpc, taken)

#define crisv32f_read_supr(cpu, index)				\
 (cgen_rtx_error (current_cpu,					\
		  "Read of support register is unimplemented"),	\
  0)

#define crisv32f_write_supr(cpu, index, val)			\
 cgen_rtx_error (current_cpu,					\
		 "Write to support register is unimplemented")	\

#define crisv32f_rfg_handler(cpu, pc)				\
 cgen_rtx_error (current_cpu, "RFG isn't implemented")

#define crisv32f_halt_handler(cpu, pc)				\
 (cgen_rtx_error (current_cpu, "HALT isn't implemented"), 0)

#define crisv32f_fidxi_handler(cpu, pc, indx)			\
 (cgen_rtx_error (current_cpu, "FIDXI isn't implemented"), 0)

#define crisv32f_ftagi_handler(cpu, pc, indx)			\
 (cgen_rtx_error (current_cpu, "FTAGI isn't implemented"), 0)

#define crisv32f_fidxd_handler(cpu, pc, indx)			\
 (cgen_rtx_error (current_cpu, "FIDXD isn't implemented"), 0)

#define crisv32f_ftagd_handler(cpu, pc, indx)			\
 (cgen_rtx_error (current_cpu, "FTAGD isn't implemented"), 0)

/* We have nothing special to do when interrupts or NMI are enabled
   after having been disabled, so empty macros are enough for these
   hooks.  */
#define crisv32f_interrupts_enabled(cpu)
#define crisv32f_nmi_enabled(cpu)

/* Better warn for this case here, because everything needed is
   somewhere within the CPU.  Compare to trying to use interrupts and
   NMI, which would fail earlier, when trying to make nonexistent
   external components generate those exceptions.  */
#define crisv32f_single_step_enabled(cpu)			\
 ((crisv32f_h_qbit_get (cpu) != 0				\
   || (crisv32f_h_sr_get (cpu, H_SR_SPC) & ~1) != 0)		\
  ? (cgen_rtx_error (cpu,					\
		     "single-stepping isn't implemented"), 0)	\
  : 0)

/* We don't need to track the value of the PID register here.  */
#define crisv32f_write_pid_handler(cpu, val)

/* Neither do we need to know of transitions to user mode.  */
#define crisv32f_usermode_enabled(cpu)

/* House-keeping exported from traps.c  */
extern void cris_set_callbacks (host_callback *);

/* FIXME: Add more junk.  */
#endif


text:
<?php

namespace backend\models;

use Yii;
use common\vendor\AppConstants;
use common\vendor\AppLabels;
use yii\base\Exception;
use yii\web\UploadedFile;

/**
 * This is the model class for table "maturity_level".
 *
 * @property integer $id
 * @property integer $sector_id
 * @property string $mlvl_quarter
 * @property integer $mlvl_year
 * @property integer $created_by
 * @property integer $created_at
 * @property integer $updated_by
 * @property integer $updated_at
 *
 * @property Sector $sector
 * @property MaturityLevelDetail[] $maturityLevelDetails
 */
class MaturityLevel extends AppModel {
    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'maturity_level';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['sector_id', 'mlvl_quarter', 'mlvl_year'], 'required', 'message' => AppConstants::VALIDATE_REQUIRED],
            [['sector_id', 'mlvl_year'], 'integer', 'message' => AppConstants::VALIDATE_INTEGER],
            [['mlvl_quarter'], 'string', 'max' => 2],
            [['sector_id'], 'exist', 'skipOnError' => true, 'targetClass' => Sector::className(), 'targetAttribute' => ['sector_id' => 'id']],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'sector_id' => AppLabels::SECTOR,
            'mlvl_quarter' => AppLabels::QUARTER,
            'mlvl_year' => AppLabels::YEAR,
        ];
    }

    public function saveTransactional() {
        $request = Yii::$app->request->post();
        $transaction = Yii::$app->db->beginTransaction();
        $errors = [];

        try {
            $this->load($request);
            if (!$this->save()) {
                $errors = array_merge($errors, $this->errors);
                throw new Exception();
            }

            $maturityLevelId = $this->id;

            foreach ($request['MaturityLevelDetail'] as $key => $detail) {
                if (isset($detail['id'])) {
                    $detailMdl = MaturityLevelDetail::findOne(['id' => $detail['id']]);
                } else {

                    $detailMdl = new MaturityLevelDetail();
                    $detailMdl->maturity_level_id = $maturityLevelId;
                }

                if ($detailMdl->load(['MaturityLevelDetail' => $detail]) && $detailMdl->save()) {
                    if (isset($request['Attachment'][$key])) {
                        $attachmentMdl = new Attachment();
                        $attachmentMdl->load($request['Attachment'][$key]);
                        $attachmentMdl->file = UploadedFile::getInstance($attachmentMdl, "[$key]file");

                        if (!is_null($attachmentMdl->file) && !$attachmentMdl->saveAttachment(AppConstants::MODULE_CODE_MATURITY_LEVEL, $detailMdl->id)) {
                            $errors = array_merge($errors, $attachmentMdl->errors);
                            throw new Exception;
                        }
                    }
                } else {
                    $errors = array_merge($errors, $detailMdl->errors);
                    throw new Exception();
                }
            }

            $transaction->commit();
            return TRUE;
        } catch (Exception $ex) {
            $transaction->rollBack();
            $this->afterFind();

            foreach ($errors as $attr => $errorArr) {
                $error = join('<br />', $errorArr);
                Yii::$app->session->addFlash('danger', $error);
            }

            return FALSE;
        }
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getSector() {
        return $this->hasOne(Sector::className(), ['id' => 'sector_id']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getMaturityLevelDetails() {
        return $this->hasMany(MaturityLevelDetail::className(), ['maturity_level_id' => 'id']);
    }
}


text:
from __future__ import unicode_literals, division, absolute_import
from builtins import *  # noqa pylint: disable=unused-import, redefined-builtin

from flexget.api.app import base_message
from flexget.api.core.plugins import ObjectsContainer as OC
from flexget.utils import json

class TestPluginsAPI(object):
    config = 'tasks: {}'

    def test_plugins_api(self, api_client, schema_match):
        rsp = api_client.get('/plugins/')
        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(OC.plugin_list_reply, data)
        assert not errors

        rsp = api_client.get('/plugins/?include_schema=true')
        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(OC.plugin_list_reply, data)
        assert not errors

        rsp = api_client.get('/plugins/?interface=search')
        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(OC.plugin_list_reply, data)
        assert not errors

        rsp = api_client.get('/plugins/?interface=fgfg')
        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(OC.plugin_list_reply, data)
        assert not errors
        assert data == []

        rsp = api_client.get('/plugins/?phase=fgfg')
        assert rsp.status_code == 400, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(base_message, data)
        assert not errors

        rsp = api_client.get('/plugins/?phase=input')
        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(OC.plugin_list_reply, data)
        assert not errors

        rsp = api_client.get('/plugins/bla/')
        assert rsp.status_code == 400, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(base_message, data)
        assert not errors

        rsp = api_client.get('/plugins/seen/')
        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(OC.plugin_object, data)
        assert not errors

        rsp = api_client.get('/plugins/seen/?include_schema=true')
        assert rsp.status_code == 200, 'Response code is %s' % rsp.status_code
        data = json.loads(rsp.get_data(as_text=True))

        errors = schema_match(OC.plugin_object, data)
        assert not errors


text:
/*	################################################################

	Author: Carlos Alvarez
	URL: http://alvarez.is

	Project Name: SOLID - Bootstrap 3 Theme
	Version: 1.0
	URL: http://alvarez.is

################################################################# */
@import url(http://fonts.googleapis.com/css?family=Raleway:400,700,900);
@import url(http://fonts.googleapis.com/css?family=Lato:400,900);
@import url("prettyPhoto.css") screen;
@import url("hoverex-all.css") screen;

/*	################################################################
	1. GENERAL STRUCTURES
################################################################# */
* {
	margin: 0;
	padding: 0px;
}

body {
	background: #ffffff;
	margin: 0;
	height: 100%;
	color: {{ site.colors.secondary }};
	font-family: 'Lato', sans-serif;
	font-size: 16px;
	font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Raleway', sans-serif;
	font-weight: 700;
}

ol,
ul {
	margin-left: 30px;
}

p {
	padding: 0;
	margin-bottom: 12px;
	font-family: 'Lato', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: {{ site.colors.secondary }};
	margin-top: 10px;
}

img {
	height: auto;
	max-width: 100%;
}

a {
    color:{{ site.colors.link }};
    padding: 0;
	margin: 0;
	text-decoration: none;
	-webkit-transition: background-color .4s linear, color .4s linear;
	-moz-transition: background-color .4s linear, color .4s linear;
	-o-transition: background-color .4s linear, color .4s linear;
	-ms-transition: background-color .4s linear, color .4s linear;
	transition: background-color .4s linear, color .4s linear;
}
a:hover,
a:focus {
  text-decoration: none;
  color:{{ site.colors.link_hover }};
}

::-moz-selection  {
	color: #fff;
	text-shadow:none;
	background:{{ site.colors.secondary }};
}
::selection {
	color: #fff;
	text-shadow:none;
	background:{{ site.colors.secondary }};
}

.centered {
	text-align: center
}

/*	################################################################
	BOOTSTRAP MODIFICATIONS & TWEAKS
################################################################# */
.navbar {
	min-height: 50px;
	padding-top: 3px;
	margin-bottom: 0px;
}

.navbar-brand {
	font-family: 'Raleway', sans-serif;
	font-weight: 900;
}

.navbar-header .navbar-brand {
	color: white;
}

.navbar-default .navbar-nav > li > a {
	color: white;
	font-weight: 700;
	font-size: 12px;
}

.navbar-default .navbar-nav > li > a:hover {
	color: {{ site.colors.primary }};
}

.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
	color: {{ site.colors.primary }};
	background-color: transparent;
}

.navbar-default {
	background-color: {{ site.colors.secondary }};
	border-color: transparent;
}

.dropdown-menu {
	background: {{ site.colors.secondary }};
}

.dropdown-menu > li > a {
	color: white;
	font-weight: 700;
	font-size: 12px;
}

.btn-theme {
  color: #fff;
  background-color: {{ site.colors.secondary }};
  border-color: {{ site.colors.secondary }};
  margin: 4px;
}
.btn-theme:hover,
.btn-theme:focus,
.btn-theme:active,
.btn-theme.active,
.open .dropdown-toggle.btn-theme {
  color: #fff;
  background-color: {{ site.colors.primary }};
  border-color: {{ site.colors.primary }};
}

.dmbutton:hover,
.dmbutton:active,
.dmbutton:focus{
	color: #ffffff;
	background-color: #222222;
	border-color: #ffffff;
}
.dmbutton {
	background:rgba(0, 0, 0, 0);
	border: 1px solid #ffffff;
	color: #ffffff;
	-webkit-border-radius: 2px;
	border-radius: 2px;
	padding-top: 1.025rem;
	padding-right: 2.25rem;
	letter-spacing:0.85px;
	padding-bottom: 1.0875rem;
	padding-left: 2.25rem;
	font-size: 1.55rem;
	cursor: pointer;
	font-weight: normal;
	line-height: normal;
	margin: 0 0 1.25rem;
	text-decoration: none;
	text-align: center;
	display: inline-block;
	-webkit-transition: background-color 300ms ease-out;
	-moz-transition: background-color 300ms ease-out;
	transition: background-color 300ms ease-out;
	-webkit-appearance: none;
	font-weight: normal !important;
}

.mtb {
	margin-top: 40px;
	margin-bottom: 80px;
}

.mb {
	margin-bottom: 60px;
}

.mt {
	margin-top: 60px;
}

.hline {
	border-bottom: 2px solid {{ site.colors.secondary }};
}

.hline-w {
	border-bottom: 2px solid #ffffff;
	margin-bottom: 25px;
}

.embed-responsive {
  position: relative;
  display: block;
  height: 0;
  padding: 0;
  overflow: hidden;
}

.embed-responsive .embed-responsive-item,
.embed-responsive iframe {
	position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
  border: 0;
}

.embed-responsive.embed-responsive-16by9 {
  padding-bottom: 56.25%;
}

.embed-responsive.embed-responsive-4by3 {
  padding-bottom: 75%;
}

/*	################################################################
	SITE WRAPS
################################################################# */

#headerwrap {
	background-color: rgba({{ site.colors.primary_rgb }},.1);
	min-height: 350px;
	padding-top: 75px;
	padding-bottom: 50px;
	position: relative;
	text-align: center;
}

#headerwrap h3, h5 {
	color: white;
	font-weight: 400;
	background-color: rgba({{ site.colors.secondary_rgb }}, 0.85);
	display: inline-block;
	padding: 10px;
}

#headerwrap h1 {
	background-color: rgba({{ site.colors.secondary_rgb }}, 0.85);
	display: inline-block;
	padding: 10px;
	margin-top: 60px;
	color: white;

}

#headerwrap .photo-force {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	min-height: 350px;
	overflow: hidden;
	z-index: -1;
	background-size: cover;
	background-position: center center;
}

/* Services Wrap */
#service {
	margin-top: 30px;
	margin-bottom: 10px;
}

#service i {
	color: {{ site.colors.primary }};
	font-size: 60px;
	padding: 15px;
}

/* Portfolio Wrap */
#portfoliowrap,
#blogwrap {
	padding-top: 60px;
	margin-bottom: 0;
	display: block;
	text-align: center
}

#portfoliowrap h3,
#blogwrap h3 {
	margin-bottom: 25px;
}

.portfolio {
	padding:0 !important;
	margin:0 !important;
	display:block;
}

.portfolio-item .title:before,
.blog-item .title:before {
	border-radius:0;
	display:none
}
.portfolio-item p,
.blog-item p {
	margin:0px 0 30px;
}
.portfolio-item h3,
.blog-item h3 {
	margin:-10px 0 10px;
	font-size:16px;
	text-transform:uppercase;
}

.tpl6 h3 {
	color:#fff;
	margin:0;
	padding:40px 5px 0;
	font-size:16px;
	text-transform:uppercase;
}
.tpl6 .dmbutton {
	display:inline-block;
	margin: -10px 5px 20px 5px;
	font-size:13px;
}

.tpl6 .bg {
	height:100%;
	width:100%;
	background-color:{{ site.colors.primary }};
	background-color:rgba({{ site.colors.primary_rgb }},.9);
	text-align:center;
}

.tpl6 .img-responsive {
	display: block;
	max-width: 100%;
	min-height: 159px;
	margin-left: 0;
}

.he-wrap {
	overflow: hidden;
}

/* Testimonials Wrap */
#twrapback {
  background-color: {{ site.colors.primary }};
  background-color:rgba({{ site.colors.primary_rgb }},.8);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#twrap {
  background: url(../img/t-back.jpg) no-repeat center top;
  position: relative;
  margin-top: 0px;
	padding-top:60px;
	text-align:center;
	background-attachment: relative;
	background-position: center center;
	min-height: 450px;
	width: 100%;

  -webkit-background-size: 100%;
  -moz-background-size: 100%;
  -o-background-size: 100%;
  background-size: 100%;

  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

#twrap i {
	font-size: 50px;
	color: white;
	margin-bottom: 25px;
}

#twrap p {
	color: white;
	font-size: 15px;
	line-height: 30px;
}

/* clients logo */
#cwrap {
	background: #f7f7f7;
	margin-top: 0px;
	padding-top: 80px;
	padding-bottom: 100px;
}

#cwrap h3 {
	margin-bottom: 60px;
}

/* Footer */
#footerwrap {
	padding-top: 60px;
	padding-bottom: 60px;
	background: {{ site.colors.secondary }};
}

#footerwrap p {
	color: {{ site.colors.footer_content }};
}

#footerwrap h4 {
	color: {{ site.colors.footer_heading }};
}

#footerwrap i {
	font-size: 30px;
	color: {{ site.colors.footer_content }};
	padding-right: 25px;
}

#footerwrap i:hover {
	color: {{ site.colors.primary }}
}

/*	################################################################
	PAGE CONFIGURATIONS
################################################################# */
/* General Tweaks */

#green {
	background: rgba(0, 0, 0, .1);
	margin-top: 40px;
	margin-bottom: 40px;
	padding-top: 25px;
	padding-bottom: 25px;
	position: relative;
	min-height: 250px;
}

#green h1,
#green h2,
#green h3 {
	color: white;
	margin-left: 15px;
}

#green .photo-force {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	min-height: 150px;
	overflow: hidden;
	z-index: -1;
	background-size: cover;
	background-position: center center;
}

.ctitle {
	color: {{ site.colors.primary }};
	font-weight: 700;
	margin-bottom: 15px;
}

csmall {
	font-size: 12px;
	color: #b3b3b3;
}

.spacing {
	margin-top: 40px;
	margin-bottom: 40px;
}

.badge-theme {
	background: {{ site.colors.primary }};
}

/* Contact Page */
#contactwrap {
	background: url(../img/contact.jpg) no-repeat center top;
	margin-top: -60px;
	padding-top:0px;
	text-align:center;
	background-attachment: relative;
	background-position: center center;
	min-height: 400px;
	width: 100%;

    -webkit-background-size: 100%;
    -moz-background-size: 100%;
    -o-background-size: 100%;
    background-size: 100%;

    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

/* Blog Page */
.popular-posts {
	margin: 0px;
	padding-left: 0px;
	}

.popular-posts li {
	list-style: none;
	margin-bottom: 20px;
	min-height: 70px;
}
.popular-posts li a,
.popular-posts li a:hover {
	color:#2f2f2f;
	text-decoration: none;
	}

.popular-posts li img {
	float: left;
	margin-right: 20px;
	}

.popular-posts li em {
	font-family: 'Lato', sans-serif;
	font-size: 12px;
	color: #b3b3b3
	}

.popular-posts p {
	line-height: normal;
	margin-bottom: auto;
}

.share i {
	padding-right: 15px;
	font-size: 18px;
}

a.anchor{
    display: block;
    position: relative;
    top: -80px;
    visibility: hidden;
}


text:
<?php
class Tests_Counter extends WP_UnitTestCase {
	private $counter;

//	This is function allows us to perform any required setUp tasks (e.g. clear cache / load prerequisite plugins...etc)
	public function setUp() {
		parent::setUp();
		/* Get an instance of our plugin */
		$this->counter = new Launchable;
	}

	/* A simple test */
	public function test_simple(){
		$a = true;
		$this->assertTrue($a);
	}

//	This is function allows us to perform any required cleanup tasks
	public function tearDown() {
		parent::tearDown();
	}

}


text:
/**
 * @author 0737019
 */

var albumT;
 var trackT;
 var formAction;

	$(function() {
		//dataTable plugin for track table
		trackT = $('#tableLoop').dataTable({
			"bJQueryUI": true,
			"sPaginationType": "full_numbers",
			"sDom": '<lf<t>ip>',
			'iDisplayLength': 8
		});

		formAction = $('#trackForm').attr('action');
		/* Add a click handler to the rows - this could be used as a callback */
		$("#tableLoop tbody").click(function(event) {
			$(trackT.fnSettings().aoData).each(function (){
				$(this.nTr).removeClass('row_selected').css('background-color', 'white');
			});
			$(event.target.parentNode).addClass('row_selected').css('background-color', '#cc89b0');
			var anSelected = fnGetSelected( trackT );

			//puts the values from the table into the form
			$('#fti').val($(anSelected).children().eq(0).text());
			$('#ftai').val($(anSelected).children().eq(1).text());
			$('#fttt').val($(anSelected).children().eq(2).text());
			$('#fta').val($(anSelected).children().eq(3).text());
			$('#ftcp').val($(anSelected).children().eq(4).text());
			$('#ftlp').val($(anSelected).children().eq(5).text());
			$('#ftsp').val($(anSelected).children().eq(6).text());
			$('#fttsp').val($(anSelected).children().eq(7).text());

			//puts the values from the table into the validator form
			$('#hfttsp').val($(anSelected).children().eq(2).text());

			$('#gMiddleDivTrack').gMiddleDiv({cancelDiv : 'middleDivCancel'});

			//click events for tracks ------------------------------------
			$('#SubmitT').click(function(){
				$('#trackForm').attr('action', formAction + "_t");
				$('#trackForm').submit();
			});
			$('#middleDivCancel').click(function(){
				$('#trackForm').attr('action', formAction);
			});
		});

		//dataTable plugin for album table
		albumT = $('#tableLoopA').dataTable({
			"bJQueryUI": true,
			"sPaginationType": "full_numbers",
			"sDom": '<lf<t>ip>',
			'iDisplayLength': 8
		});

		/* Add a click handler to the rows - this could be used as a callback */
		$("#tableLoopA tbody").click(function(event) {
			$(albumT.fnSettings().aoData).each(function (){
				$(this.nTr).removeClass('row_selected').css('background-color', 'white');
			});
			$(event.target.parentNode).addClass('row_selected').css('background-color', '#cc89b0');
			var anSelected = fnGetSelected( albumT );
			var idSelected = $(anSelected).children().eq(0).text();

			//puts the values from the table into the form
			$('#fai').val($(anSelected).children().eq(0).text());
			$('#faat').val($(anSelected).children().eq(1).text());
			$('#faa').val($(anSelected).children().eq(2).text());
			$('#fat').val($(anSelected).children().eq(3).text());
			$('#facp').val($(anSelected).children().eq(4).text());
			$('#falp').val($(anSelected).children().eq(5).text());
			$('#fasp').val($(anSelected).children().eq(6).text());

			//puts the values from the table into the validator form
			$('#hfasp').val($(anSelected).children().eq(9).text());

			$('#gMiddleDivAlbum').gMiddleDiv({cancelDiv : 'middleDivCancelA'});

			//click events for albums-------------------------------------
			$('#SubmitA').click(function(){
				$('#albumForm').attr('action', formAction + "_a");
				$('#albumForm').submit();
			});
			$('#middleDivCancelA').click(function(){
				$('#albumForm').attr('action', formAction);
			});
		});

		/* Get the rows which are currently selected */
		function fnGetSelected( oTableLocal )
		{
			var aReturn = new Array();
			var aTrs = oTableLocal.fnGetNodes();

			for ( var i=0 ; i<aTrs.length ; i++ )
			{
				if ( $(aTrs[i]).hasClass('row_selected') )
				{
					aReturn.push( aTrs[i] );
				}
			}
			return aReturn;
		}

		//hide the unwanted features
		$('#tableLoop_length').css("display", "none");
		$('#tableLoop_first').css("display", "none");
		$('#tableLoop_last').css("display", "none");

		//hide the unwanted features
		$('#tableLoopA_length').css("display", "none");
		$('#tableLoopA_first').css("display", "none");
		$('#tableLoopA_last').css("display", "none");

		//hides one table and displays the other
		var rowCountT = $('#tableLoop tr').length;
		var rowCountA = $('#tableLoopA tr').length;
		if(rowCountT == 0){
			$('#tracksContainer').hide();
		}else if(rowCountA == 0){
			$('#albumsContainer').hide();
		}else{
			$('#albumsContainer').hide();
		}

		$('#showTracks').click(displayTracks);
		$('#showAlbums').click(displayAlbums);

		$('#gMiddleDivTrack').hide();
		$('#gMiddleDivAlbum').hide();

	});

	function displayTracks(){
		$('#albumsContainer').hide();
		$('#tracksContainer').show();
		$('#showTracks').css('background-image', 'url(images/categoryPressed.png)');
		$('#showAlbums').css('background-color', 'white');
		$('#showAlbums').css('background-image', 'none');
	}

	function displayAlbums(){
		$('#albumsContainer').show();
		$('#tracksContainer').hide();
		$('#showAlbums').css('background-image', 'url(images/categoryPressed.png)');
		$('#showTracks').css('background-color', 'white');
		$('#showTracks').css('background-image', 'none');
	}


text:
import {
  GenericStoreEnhancer,
  Middleware,
  Reducer,
  Store,
  applyMiddleware,
  compose,
  createStore
} from 'redux'
import * as Immutable from 'immutable'
import {combineImmutableReducers} from 'immutable-redux'
import thunkMiddleware from 'redux-thunk'
import {PersistorOptions, autoRehydrate, persistStore} from '../persistor'
import * as reducers from '../../reducers'

interface EnhancedWindow extends Window {
  __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: (config: any) => (...f: GenericStoreEnhancer[]) => GenericStoreEnhancer
}

declare var window: EnhancedWindow

export interface CreateStoreOptions {
  reducers?: {[k: string]: Reducer<any>}
  middleware?: Middleware[]
  enhancers?: GenericStoreEnhancer[]
  persist?: PersistorOptions
}

function createEnhancedStore <S> (options: CreateStoreOptions): Promise<Store<S>> {
  const otherReducers = options.reducers || {}
  const otherMiddleware = options.middleware || []
  const otherEnhancers = options.enhancers || []
  const {persist: persistorConfig} = options

  const dataReducer = combineImmutableReducers(reducers as any)
  const allReducers = combineImmutableReducers(Object.assign({}, otherReducers, {
    data: dataReducer
  }))

  const allMiddleware = otherMiddleware
    .concat(thunkMiddleware)

  const allEnhancers = otherEnhancers
    .concat(persistorConfig ? autoRehydrate() : [])
    .concat(applyMiddleware(...allMiddleware))

  const devtoolsCompose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
    serialize: {
      immutable: Immutable
    }
  })

  const composeEnhancers = devtoolsCompose || compose
  const store = createStore<S>(allReducers, composeEnhancers(...allEnhancers))

  return new Promise((resolve, reject) => {
    if (persistorConfig != null) {
      persistStore(store, persistorConfig, (err: any) => {
        if (err != null) {
          reject(err)
          return
        }
        resolve(store)
      })
    } else {
      resolve(store)
    }
  })
}

export {createEnhancedStore as createStore}


text:
echo Copying vagrant-install-files...
mkdir c:\install

echo Installing puppet librarian
call "C:\Program Files (x86)\Puppet Labs\Puppet\bin\environment.bat"
mkdir c:\usr\share\puppet
cd \usr\share\puppet
copy \vagrant\Puppetfile .

if not exist c:\usr\share\puppet\.librarian (
    call gem install librarian-puppet --no-rdoc --no-ri
    call librarian-puppet install
)

echo Running puppet.....
call puppet apply -vv  --color=false --modulepath=c:\usr\share\puppet\modules\;c:\vagrant\modules c:\vagrant\manifests\init.pp

echo Finished bootstrap.bat


text:
package gov.hhs.onc.dcdt.crypto.certs;

import gov.hhs.onc.dcdt.crypto.CryptographyDescriptor;
import gov.hhs.onc.dcdt.crypto.GeneralNameType;
import gov.hhs.onc.dcdt.utils.ToolMapUtils.ToolMultiValueMap;
import java.net.URI;
import java.util.Set;
import javax.annotation.Nullable;
import org.bouncycastle.asn1.ASN1Encodable;

public interface CertificateDescriptor<T extends CertificateIntervalDescriptor> extends CryptographyDescriptor {
    public boolean isIntermediateCertificateAuthority();

    public boolean isRootCertificateAuthority();

    public boolean isCertificateAuthority();

    public boolean hasCertificateType();

    @Nullable
    public CertificateType getCertificateType();

    public boolean hasCrlDistributionUris();

    @Nullable
    public Set<URI> getCrlDistributionUris();

    public boolean hasInterval();

    @Nullable
    public T getInterval();

    public boolean hasIssuerAccessUris();

    @Nullable
    public Set<URI> getIssuerAccessUris();

    public boolean hasKeyUsages();

    @Nullable
    public Set<KeyUsageType> getKeyUsages();

    public boolean isSelfIssued();

    public boolean hasSerialNumber();

    @Nullable
    public CertificateSerialNumber getSerialNumber();

    public boolean hasSignatureAlgorithm();

    @Nullable
    public SignatureAlgorithm getSignatureAlgorithm();

    public boolean hasSubjectAltNames();

    @Nullable
    public ToolMultiValueMap<GeneralNameType, ASN1Encodable> getSubjectAltNames();

    public boolean hasSubjectDn();

    @Nullable
    public CertificateDn getSubjectDn();
}


text:
package clarifai2.api.request.model;

import clarifai2.internal.grpc.api.ConceptOuterClass;
import clarifai2.internal.grpc.api.InputOuterClass;
import clarifai2.internal.grpc.api.ModelOuterClass;
import clarifai2.internal.grpc.api.OutputOuterClass;
import clarifai2.api.BaseClarifaiClient;
import clarifai2.api.request.ClarifaiRequest;
import clarifai2.dto.input.ClarifaiInput;
import clarifai2.dto.model.ModelVersion;
import clarifai2.dto.model.output.ClarifaiOutput;
import clarifai2.dto.prediction.Concept;
import clarifai2.dto.prediction.Prediction;
import com.google.common.util.concurrent.ListenableFuture;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

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

public final class PredictRequest<PREDICTION extends Prediction>
    extends ClarifaiRequest.Builder<List<ClarifaiOutput<PREDICTION>>> {

  @NotNull private final String modelID;
  @NotNull private final List<ClarifaiInput> inputData = new ArrayList<>();

  @Nullable private String modelVersionID = null;
  @Nullable private String language = null;

  @Nullable private Double minValue = null;
  @Nullable private Integer maxConcepts = null;

  @Nullable private Integer sampleMs = null;

  @NotNull private final List<Concept> concepts = new ArrayList<>();

  public PredictRequest(@NotNull final BaseClarifaiClient client, @NotNull String modelID) {
    super(client);
    this.modelID = modelID;
  }

  @NotNull public PredictRequest<PREDICTION> withInputs(@NotNull ClarifaiInput... inputData) {
    return withInputs(Arrays.asList(inputData));
  }

  @NotNull public PredictRequest<PREDICTION> withInputs(@NotNull Collection<ClarifaiInput> inputData) {
    this.inputData.addAll(inputData);
    return this;
  }

  @NotNull public PredictRequest<PREDICTION> withVersion(@NotNull ModelVersion version) {
    this.modelVersionID = version.id();
    return this;
  }

  @NotNull public PredictRequest<PREDICTION> withVersion(@NotNull String versionID) {
    this.modelVersionID = versionID;
    return this;
  }

  @NotNull public PredictRequest<PREDICTION> withLanguage(@NotNull String language) {
    this.language = language;
    return this;
  }

  @NotNull public final PredictRequest<PREDICTION> withMinValue(@Nullable Double minValue) {
    this.minValue = minValue;
    return this;
  }

  @NotNull public final PredictRequest<PREDICTION> withMaxConcepts(@Nullable Integer maxConcepts) {
    this.maxConcepts = maxConcepts;
    return this;
  }

  /**
   * If added, only these concepts will be considered in the prediction.
   * @param concepts the concepts
   * @return PredictRequest instance
   */
  @NotNull public PredictRequest<PREDICTION> selectConcepts(@NotNull Concept... concepts) {
    return selectConcepts(Arrays.asList(concepts));
  }

  /**
   * See {@link PredictRequest#selectConcepts(Concept...)}.
   * @param concepts the concepts
   * @return PredictRequest instance
   */
  @NotNull public PredictRequest<PREDICTION> selectConcepts(@NotNull Collection<Concept> concepts) {
    this.concepts.addAll(concepts);
    return this;
  }

  @NotNull public final PredictRequest<PREDICTION> withSampleMs(@Nullable Integer sampleMs) {
    this.sampleMs = sampleMs;
    return this;
  }

  @NotNull @Override protected String method() {
    return "POST";
  }

  @NotNull @Override protected String subUrl() {
    if (modelVersionID == null) {
      return "v2/models/" + modelID + "/outputs";
    }
    return "v2/models/" + modelID + "/versions/" + modelVersionID + "/outputs";
  }

  @NotNull @Override protected DeserializedRequest<List<ClarifaiOutput<PREDICTION>>> request() {
    return new DeserializedRequest<List<ClarifaiOutput<PREDICTION>>>() {
      @NotNull @Override public ListenableFuture httpRequestGrpc() {
        List<InputOuterClass.Input> inputs = new ArrayList<>();
        for (ClarifaiInput input : inputData) {
          inputs.add(input.serialize());
        }

        boolean anyOutputConfig = false;
        ModelOuterClass.OutputConfig.Builder outputConfigBuilder = ModelOuterClass.OutputConfig.newBuilder();
        if (language != null) {
          outputConfigBuilder.setLanguage(language);
          anyOutputConfig = true;
        }
        if (minValue != null) {
          outputConfigBuilder.setMinValue(minValue.floatValue());
          anyOutputConfig = true;
        }
        if (maxConcepts != null) {
          outputConfigBuilder.setMaxConcepts(maxConcepts);
          anyOutputConfig = true;
        }
        if (sampleMs != null) {
          outputConfigBuilder.setSampleMs(sampleMs);
          anyOutputConfig = true;
        }
        if (!concepts.isEmpty()) {
          List<ConceptOuterClass.Concept> selectConceptsGrpc = new ArrayList<>();
          for (Concept concept : concepts) {
            selectConceptsGrpc.add(concept.serialize());
          }
          outputConfigBuilder.addAllSelectConcepts(selectConceptsGrpc);
          anyOutputConfig = true;
        }
        InputOuterClass.PostModelOutputsRequest.Builder requestBuilder =
            InputOuterClass.PostModelOutputsRequest.newBuilder()
                .addAllInputs(inputs);

        if (anyOutputConfig) {
          requestBuilder.setModel(
              ModelOuterClass.Model.newBuilder()
                  .setOutputInfo(ModelOuterClass.OutputInfo.newBuilder().setOutputConfig(outputConfigBuilder))
          );
        }

        return stub().postModelOutputs(requestBuilder.build());
      }

      @NotNull @Override public List<ClarifaiOutput<PREDICTION>> unmarshalerGrpc(Object returnedObject) {
        OutputOuterClass.MultiOutputResponse response = (OutputOuterClass.MultiOutputResponse) returnedObject;

        List<ClarifaiOutput<PREDICTION>> outputs = new ArrayList<>();
        for (OutputOuterClass.Output output : response.getOutputsList()) {
          outputs.add(ClarifaiOutput.<PREDICTION>deserialize(output, client));
        }

        return outputs;
      }
    };
  }
}


text:
module ATC

end

require 'air_traffic_control/version'
require 'air_traffic_control/value_parser'
require 'air_traffic_control/input'
require 'air_traffic_control/directory_parser'
require 'air_traffic_control/form'


text:
import getopt
import sys
import os
import subprocess

def usage():
  print "\
Usage: citations.py -[hy:p:]\n\
  -h --help           print this help\n\
  -y --year           year to generate\n\
  -p --pages          number of pages in search results for the given year\n\
"

def get_mentor(n):
  cmd = os.path.join("..","get_mentor") + " " + str(n)
  proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
  (m, e) = proc.communicate()
  return m

def generate_tasks(year, pages):
  for p in xrange(pages):
    title = "Update Citations " + str(year) + "-" + str(p+1)
    description = "This task consists of updating the\
 RTEMS\
 References Wiki page according to the instructions given in the\
 \
 RTEMS GoogleCodeInProjects Wiki page for the year " + str(year) +\
 " and page " + str(p+1) + ". You will need to\
 request a user account on the wiki and be careful to avoid making updates\
 that conflict or delete other relevant citations. You will upload a text\
 file containing the entries that you added to the wiki page.\
 We have constructed the\
 Google Scholar search for this task for your convenience."
    time_to_complete = "72"
    mentors = str(get_mentor(year+p))
    type = "Outreach/Research"
    tags = "wiki"

    print(title + ", " + description + ", " + time_to_complete + ", " +
        mentors + ", " + type + ", " + tags)

def main():
  # default args
  year = 0
  pages = 0

  # Process args
  try:
    opts, args = getopt.getopt(sys.argv[1:], "hy:p:",
        ["help", "year", "pages"])
  except getopt.GetoptError, err:
    print str(err)
    usage()
    sys.exit(2)
  for opt, arg in opts:
    if opt in ("-h", "--help"):
      usage()
      sys.exit()
    elif opt in ("-y", "--year"):
      year = int(arg)
    elif opt in ("-p", "--pages"):
      pages = int(arg)
    else:
      usage()
      assert False, "unhandled option"

  if year == 0 or pages == 0:
    usage()
    sys.exit(0)

  generate_tasks(year, pages)

if __name__ == "__main__":
  main()


text:
@extends($layout)

@section('content-header')

		Edit
		·
		{!! link_to_route('admin.templates.index', 'Back') !!}

@stop

@section('content')

		@include('admin::templates.form', array('model' => $template))

@stop


text:
namespace LightBlue.Standalone
{
    public class StandaloneConfiguration
    {
        public string ConfigurationPath { get; set; }
        public string ServiceDefinitionPath { get; set; }
        public string RoleName { get; set; }
        public bool UseHostedStorage { get; set; }
    }
}


text:
package com.example.android.inventory.data;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.example.android.inventory.data.InventoryContract.InvEntry;

/**
 * Database helper for Pets app. Manages database creation and version management.
 */
public class InventoryDbHelper extends SQLiteOpenHelper {

    public static final String LOG_TAG = InventoryDbHelper.class.getSimpleName();

    /** Name of the database file */
    private static final String DATABASE_NAME = "inventory.db";

    /**
     * Database version. If you change the database schema, you must increment the database version.
     */
    private static final int DATABASE_VERSION = 1;

    /**
     * Constructs a new instance of {@link InventoryDbHelper}.
     *
     * @param context of the app
     */
    public InventoryDbHelper(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    /**
     * This is called when the database is created for the first time.
     */
    @Override
    public void onCreate(SQLiteDatabase db) {
        // Create a String that contains the SQL statement to create the inventory table
        String SQL_CREATE_INVENTORY_TABLE =  "CREATE TABLE " + InvEntry.TABLE_NAME + " ("
                + InventoryContract.InvEntry._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
                + InventoryContract.InvEntry.COLUMN_INV_NAME + " TEXT NOT NULL, "
                + InvEntry.COLUMN_INV_QTY + " INTEGER NOT NULL DEFAULT 0, "
                 + InvEntry.COLUMN_INV_IMAGE + " TEXT NOT NULL, "
                + InvEntry.COLUMN_INV_PRICE + " INTEGER NOT NULL DEFAULT 0);";

        // Execute the SQL statement
        db.execSQL(SQL_CREATE_INVENTORY_TABLE);
    }

    /**
     * This is called when the database needs to be upgraded.
     */
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        // The database is still at version 1, so there's nothing to do be done here.
    }
}


text:
myWords :: String -> [String]
myWords = splitOnChar ' '

splitOnChar :: Char -> String -> [String]
splitOnChar _ [] = []
splitOnChar c (x : xs)
    | c == x = splitOnChar c xs
    | otherwise = takeWhile (/= c) (x:xs)
                  : splitOnChar c (dropWhile(/= c) (x:xs))


text:
<?php

namespace LaravelAdminPanel\Listeners;

use LaravelAdminPanel\Events\CrudAdded;
use LaravelAdminPanel\Facades\Admin;
use LaravelAdminPanel\Models\Menu;
use LaravelAdminPanel\Models\MenuItem;

class AddCrudMenuItem
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Create a MenuItem for a given CRUD.
     *
     * @param CrudAdded $event
     *
     * @return void
     */
    public function handle(CrudAdded $crud)
    {
        if (config('admin.add_crud_menu_item') && file_exists(base_path('routes/web.php'))) {
            require base_path('routes/web.php');

            $menu = Menu::where('name', 'admin')->firstOrFail();

            $menuItem = MenuItem::firstOrNew([
                'menu_id' => $menu->id,
                'title'   => $crud->dataType->display_name_plural,
                'url'     => '/'.config('admin.prefix', 'admin').'/'.$crud->dataType->slug,
            ]);

            $order = Admin::model('MenuItem')->highestOrderMenuItem();

            if (!$menuItem->exists) {
                $menuItem->fill([
                    'target'     => '_self',
                    'icon_class' => $crud->dataType->icon,
                    'color'      => null,
                    'parent_id'  => null,
                    'order'      => $order,
                ])->save();
            }
        }
    }
}


text:
package unluac.decompile.block;

import unluac.decompile.ControlFlowHandler;
import unluac.decompile.Decompiler;
import unluac.decompile.Output;
import unluac.decompile.Registers;
import unluac.decompile.Walker;
import unluac.decompile.condition.Condition;
import unluac.decompile.expression.Expression;
import unluac.decompile.operation.Operation;
import unluac.decompile.statement.Assignment;
import unluac.decompile.statement.Statement;
import unluac.parse.LFunction;

public class SetBlock extends Block {

  public final int target;
  private Assignment assign;
  public final Condition cond;
  private Registers r;
  private boolean finalize = false;

  public SetBlock(LFunction function, Condition cond, int target, int line, int begin, int end, Registers r) {
    super(function, begin, end, 2);
    if(begin == end)
      this.begin -= 1;
    this.target = target;
    this.cond = cond;
    this.r = r;
    if(target == -1) {
      throw new IllegalStateException();
    }
    // System.out.println("-- set block " + begin + " .. " + end);
  }

  public void walk(Walker w) {
    throw new IllegalStateException();
  }

  @Override
  public void addStatement(Statement statement) {
    if(!finalize && statement instanceof Assignment) {
      this.assign = (Assignment) statement;
    }/* else if(statement instanceof BooleanIndicator) {
      finalize = true;
    }*/
  }

  @Override
  public boolean isUnprotected() {
    return false;
  }

  @Override
  public int getLoopback() {
    throw new IllegalStateException();
  }

  @Override
  public void print(Decompiler d, Output out) {
    if(assign != null && assign.getFirstTarget() != null) {
      Assignment assignOut = new Assignment(assign.getFirstTarget(), getValue(), assign.getFirstLine());
      assignOut.print(d, out);
    } else {
      out.print("-- unhandled set block");
      out.println();
    }
  }

  @Override
  public boolean breakable() {
    return false;
  }

  @Override
  public boolean isContainer() {
    return true;
  }

  @Override
  public boolean isEmpty() {
    return true;
  }

  public void useAssignment(Assignment assign) {
    this.assign = assign;
    // branch.useExpression(assign.getFirstValue());
  }

  public Expression getValue() {
    return cond.asExpression(r);
  }

  @Override
  public Operation process(final Decompiler d) {
    if(ControlFlowHandler.verbose) {
      System.out.print("set expression: ");
      cond.asExpression(r).print(d, new Output());
      System.out.println();
    }
    if(assign != null) {
      assign.replaceValue(target, getValue());
      return new Operation(end - 1) {

        @Override
        public Statement process(Registers r, Block block) {
          return assign;
        }

      };
    } else {
      return new Operation(end - 1) {

        @Override
        public Statement process(Registers r, Block block) {
          if(r.isLocal(target, end - 1)) {
            return new Assignment(r.getTarget(target, end - 1), cond
                .asExpression(r), end - 1);
          }
          r.setValue(target, end - 1, cond.asExpression(r));
          return null;
        }

      };
      // return super.process();
    }
  }

}


text:
({
    appDir: "app",
    baseUrl: "modules",
    dir: "app-build",

    // Comment out the optimize line if you want
    // the code minified by Closure Compiler using
    // the "simple" optimizations mode
    //optimize: "simple",
    optimize: "none",

    optimizeCss: "standard",

    modules: [
        {
            name: "dom-tree",
            include: [
            ]
        }
    ]
})


text:
module Pliny::Middleware
  class RequestStore
    def initialize(app, options={})
      @app = app
      @store = options[:store] || Pliny::RequestStore
    end

    def call(env)
      @store.clear!
      @store.seed(env)
      @app.call(env)
    end
  end
end