text:
package com.sun.xml.ws.encoding;

import com.sun.xml.ws.api.SOAPVersion;
import com.sun.xml.ws.api.WSFeatureList;
import com.sun.xml.ws.api.message.Attachment;
import com.sun.xml.ws.api.message.AttachmentEx;
import com.sun.xml.ws.api.message.Message;
import com.sun.xml.ws.api.message.Packet;
import com.sun.xml.ws.api.pipe.Codec;
import com.sun.xml.ws.api.pipe.ContentType;
import com.sun.xml.ws.developer.StreamingAttachmentFeature;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.channels.ReadableByteChannel;
import java.util.Iterator;
import java.util.UUID;

/**
 * {@link Codec}s that uses the MIME multipart as the underlying format.
 *
 *

 * When the runtime needs to dynamically choose a {@link Codec}, and
 * when there are more than one {@link Codec}s that use MIME multipart,
 * it is often impossible to determine the right {@link Codec} unless
 * you parse the multipart message to some extent.
 *
 *

 * By having all such {@link Codec}s extending from this class,
 * the "sniffer" can decode a multipart message partially, and then
 * pass the partial parse result to the ultimately-responsible {@link Codec}.
 * This improves the performance.
 *
 * @author Kohsuke Kawaguchi
 */
public abstract class MimeCodec implements Codec {

    public static final String MULTIPART_RELATED_MIME_TYPE = "multipart/related";

    protected Codec mimeRootCodec;
    protected final SOAPVersion version;
    protected final WSFeatureList features;

    protected MimeCodec(SOAPVersion version, WSFeatureList f) {
        this.version = version;
        this.features = f;
    }

    @Override
    public String getMimeType() {
        return MULTIPART_RELATED_MIME_TYPE;
    }

    protected Codec getMimeRootCodec(Packet packet) {
        return mimeRootCodec;
    }

    // TODO: preencode String literals to byte[] so that they don't have to
    // go through char[]->byte[] conversion at runtime.
    @Override
    public ContentType encode(Packet packet, OutputStream out) throws IOException {
        Message msg = packet.getMessage();
        if (msg == null) {
            return null;
        }
        ContentTypeImpl ctImpl = (ContentTypeImpl)getStaticContentType(packet);
        String boundary = ctImpl.getBoundary();
        String rootId = ctImpl.getRootId();
        boolean hasAttachments = (boundary != null);
        Codec rootCodec = getMimeRootCodec(packet);
        if (hasAttachments) {
            writeln("--"+boundary, out);
            ContentType ct = rootCodec.getStaticContentType(packet);
            String ctStr = (ct != null) ? ct.getContentType() : rootCodec.getMimeType();
            if (rootId != null) writeln("Content-ID: " + rootId, out);
            writeln("Content-Type: " + ctStr, out);
            writeln(out);
        }
        ContentType primaryCt = rootCodec.encode(packet, out);

        if (hasAttachments) {
            writeln(out);
            // Encode all the attchments
            for (Attachment att : msg.getAttachments()) {
                writeln("--"+boundary, out);
                //SAAJ's AttachmentPart.getContentId() returns content id already enclosed with
                //angle brackets. For now put angle bracket only if its not there
                String cid = att.getContentId();
                if(cid != null && cid.length() >0 && cid.charAt(0) != '<')
                    cid = '<' + cid + '>';
                writeln("Content-ID: " + cid, out);
                writeln("Content-Type: " + att.getContentType(), out);
                writeCustomMimeHeaders(att, out);
                writeln("Content-Transfer-Encoding: binary", out);
                writeln(out);                    // write \r\n
                att.writeTo(out);
                writeln(out);                    // write \r\n
            }
            writeAsAscii("--"+boundary, out);
            writeAsAscii("--", out);
        }
        // TODO not returing correct multipart/related type(no boundary)
        return hasAttachments ? ctImpl : primaryCt;
    }

    private void writeCustomMimeHeaders(Attachment att, OutputStream out) throws IOException {
        if (att instanceof AttachmentEx) {
            Iterator<AttachmentEx.MimeHeader> allMimeHeaders = ((AttachmentEx) att).getMimeHeaders();
            while (allMimeHeaders.hasNext()) {
                AttachmentEx.MimeHeader mh = allMimeHeaders.next();
                String name = mh.getName();

                if (!"Content-Type".equalsIgnoreCase(name) && !"Content-ID".equalsIgnoreCase(name)) {
                    writeln(name +": " + mh.getValue(), out);
                }
            }
        }
    }

    @Override
    public ContentType getStaticContentType(Packet packet) {
        ContentType ct = (ContentType) packet.getInternalContentType();
        if ( ct != null ) return ct;
        Message msg = packet.getMessage();
        boolean hasAttachments = !msg.getAttachments().isEmpty();
        Codec rootCodec = getMimeRootCodec(packet);

        if (hasAttachments) {
            String boundary = "uuid:" + UUID.randomUUID();
            String boundaryParameter = "boundary=\"" + boundary + "\"";
            // TODO use primaryEncoder to get type
            String messageContentType =  MULTIPART_RELATED_MIME_TYPE +
                    "; type=\"" + rootCodec.getMimeType() + "\"; " +
                    boundaryParameter;
            ContentTypeImpl impl = new ContentTypeImpl(messageContentType, packet.soapAction, null);
            impl.setBoundary(boundary);
            impl.setBoundaryParameter(boundaryParameter);
            packet.setContentType(impl);
            return impl;
        } else {
            ct = rootCodec.getStaticContentType(packet);
            packet.setContentType(ct);
            return ct;
        }
    }

    /**
     * Copy constructor.
     */
    protected MimeCodec(MimeCodec that) {
        this.version = that.version;
        this.features = that.features;
    }

    @Override
    public void decode(InputStream in, String contentType, Packet packet) throws IOException {
        MimeMultipartParser parser = new MimeMultipartParser(in, contentType, features.get(StreamingAttachmentFeature.class));
        decode(parser,packet);
    }

    @Override
    public void decode(ReadableByteChannel in, String contentType, Packet packet) {
        throw new UnsupportedOperationException();
    }

    /**
     * Parses a {@link Packet} from a {@link MimeMultipartParser}.
     */
    protected abstract void decode(MimeMultipartParser mpp, Packet packet) throws IOException;

    @Override
    public abstract MimeCodec copy();

    public static void writeln(String s,OutputStream out) throws IOException {
        writeAsAscii(s,out);
        writeln(out);
    }

    /**
     * Writes a string as ASCII string.
     */
    public static void writeAsAscii(String s,OutputStream out) throws IOException {
        int len = s.length();
        for( int i=0; i<len; i++ )
            out.write((byte)s.charAt(i));
    }

    public static void writeln(OutputStream out) throws IOException {
        out.write('\r');
        out.write('\n');
    }
}


text:
package org.liquigraph.trinity.http.internal.http;

import okhttp3.HttpUrl;

public class Endpoints {

    public static final HttpUrl singleTransactionUri(String baseUrl) {
        return HttpUrl.parse(baseUrl).newBuilder()
                .addPathSegment("db")
                .addPathSegment("data")
                .addPathSegment("transaction")
                .addPathSegment("commit")
                .build();
    }

    public static final HttpUrl openTransactionUri(String baseUrl) {
        return HttpUrl.parse(baseUrl).newBuilder()
                .addPathSegment("db")
                .addPathSegment("data")
                .addPathSegment("transaction")
                .build();
    }
}

redpajama_set_name: RedPajamaGithub


text:
package uk.ac.man.cs.choif.nlp.doc;

import uk.ac.man.cs.choif.nlp.parse.*;
import uk.ac.man.cs.choif.nlp.entity.*;
import uk.ac.man.cs.choif.extend.*;

/**
 * A sentence
 * Creation date: (08/12/99 22:56:42)
 * @author: Freddy Choi
 */
public class Sentence {
	/** A list of tokens */
	public String[] token = new String[0];

	/** A list of stems */
	public String[] stem = new String[0];

	/** A list of POS */
	public String[] pos = new String[0];

	/** Block expressed as a list of phrases */
	public Chunk[] phrase = new Chunk[0];

	/** Block expressed as a list of entities */
	public Concept[] concept = new Concept[0];
/**
 *
 * Creation date: (08/15/99 05:50:40)
 * @return java.lang.String
 */
public String toString() {
	String output = "";
	for (int i=0, ie=token.length; i<ie; i++) output += (token[i] + " ");
	return output;
}
}


text:
from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ("zerver", "0175_change_realm_audit_log_event_type_tense"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="subscription",
            name="notifications",
        ),
    ]


text:
<?php

namespace AppBundle\Controller;

use AppBundle\Entity\Bookmark;
use AppBundle\Entity\Url;
use AppBundle\Form\DataTransformer\TagTransformer;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Validator\Constraints;

/**
 * Class DefaultController
 *
 * @package AppBundle\Controller
 * @author Arkadius Stefanski <arkste@gmail.com>
 *
 * @Route("/bookmark")
 */
class BookmarkController extends Controller
{
    /**
     * @Route("/add", name="bookmark_add")
     */
    public function addAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        $bookmark = new Bookmark();
        $bookmark->setUser($this->getUser());

        // Url-Parameter
        $urlParameter = $request->get('url', null);
        $titleParameter = $request->get('title', null);
        if (!is_null($urlParameter)) {
            $url = new Url();
            $url->setUrl($urlParameter);

            $bookmark->setUrl($url);

            $validator = $this->get('validator');
            $errors = $validator->validateValue($urlParameter, new Constraints\Url());

            if ($errors->count() != 0) {
                foreach ($errors as $error) {
                    $this->addFlash('danger', $error);
                }
            } else {
                $tagTransformer = new TagTransformer($em);
                $bookmark->setTitle($titleParameter);
                $url->setUrl($urlParameter);
                $tags = $tagTransformer->reverseTransform($tagTransformer->titleToTags($titleParameter));
                if (count($tags) != 0) {
                    foreach ($tags as $tag) {
                        $bookmark->addTag($tag);
                    }
                }
            }
        }

        $bookmarkForm = $this->createForm('app_bookmark', $bookmark, array('action' => $this->generateUrl('bookmark_add', array('nowindow' => $request->get('nowindow', null))), 'nowindow' => $request->get('nowindow', null)))->handleRequest($request);

        if ($bookmarkForm->isValid()) {
            $em->persist($bookmark);
            $em->flush();

            if ($bookmarkForm->has('nowindow') && !is_null($bookmarkForm->get('nowindow')->getData())) {
                return new Response('<script>window.close();</script>');
            }

            $this->addFlash('success', 'flashbag_bookmark_add_success');

            return $this->redirectToRoute('homepage');
        }

        return $this->render('Default/add.html.twig', array(
            'bookmarkForm' => $bookmarkForm->createView(),
        ));
    }

    /**
     * @Route("/edit/{id}", name="bookmark_edit")
     */
    public function editAction($id, Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        $bookmark = $em->getRepository('AppBundle:Bookmark')->findOneByUser($this->getUser(), $id);
        if (!$bookmark instanceof Bookmark) {
            throw new NotFoundHttpException();
        }

        $bookmarkForm = $this->createForm('app_bookmark', $bookmark)->handleRequest($request);

        if ($bookmarkForm->isValid()) {
            $em->persist($bookmark);
            $em->flush();

            $this->addFlash('success', 'flashbag_bookmark_edit_success');

            return $this->redirect($request->headers->get('referer', $this->generateUrl('homepage')));
        }

        return $this->render('Default/add.html.twig', array(
            'bookmarkForm' => $bookmarkForm->createView(),
        ));
    }

    /**
     * @Route("/delete/{id}", name="bookmark_delete")
     */
    public function deleteAction($id, Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        $bookmark = $em->getRepository('AppBundle:Bookmark')->findOneByUser($this->getUser(), $id);
        if (!$bookmark instanceof Bookmark) {
            throw new NotFoundHttpException();
        }

        $em->remove($bookmark);
        $em->flush();

        $this->addFlash('success', 'flashbag_bookmark_delete_success');

        return $this->redirect($request->headers->get('referer', $this->generateUrl('homepage')));
    }
}


text:
<?php

final class DrydockLogQuery extends DrydockQuery {

  private $ids;
  private $blueprintPHIDs;
  private $resourcePHIDs;
  private $leasePHIDs;
  private $operationPHIDs;

  public function withIDs(array $ids) {
    $this->ids = $ids;
    return $this;
  }

  public function withBlueprintPHIDs(array $phids) {
    $this->blueprintPHIDs = $phids;
    return $this;
  }

  public function withResourcePHIDs(array $phids) {
    $this->resourcePHIDs = $phids;
    return $this;
  }

  public function withLeasePHIDs(array $phids) {
    $this->leasePHIDs = $phids;
    return $this;
  }

  public function withOperationPHIDs(array $phids) {
    $this->operationPHIDs = $phids;
    return $this;
  }

  public function newResultObject() {
    return new DrydockLog();
  }

  protected function didFilterPage(array $logs) {
    $blueprint_phids = array_filter(mpull($logs, 'getBlueprintPHID'));
    if ($blueprint_phids) {
      $blueprints = id(new DrydockBlueprintQuery())
        ->setParentQuery($this)
        ->setViewer($this->getViewer())
        ->withPHIDs($blueprint_phids)
        ->execute();
      $blueprints = mpull($blueprints, null, 'getPHID');
    } else {
      $blueprints = array();
    }

    foreach ($logs as $key => $log) {
      $blueprint = null;
      $blueprint_phid = $log->getBlueprintPHID();
      if ($blueprint_phid) {
        $blueprint = idx($blueprints, $blueprint_phid);
      }
      $log->attachBlueprint($blueprint);
    }

    $resource_phids = array_filter(mpull($logs, 'getResourcePHID'));
    if ($resource_phids) {
      $resources = id(new DrydockResourceQuery())
        ->setParentQuery($this)
        ->setViewer($this->getViewer())
        ->withPHIDs($resource_phids)
        ->execute();
      $resources = mpull($resources, null, 'getPHID');
    } else {
      $resources = array();
    }

    foreach ($logs as $key => $log) {
      $resource = null;
      $resource_phid = $log->getResourcePHID();
      if ($resource_phid) {
        $resource = idx($resources, $resource_phid);
      }
      $log->attachResource($resource);
    }

    $lease_phids = array_filter(mpull($logs, 'getLeasePHID'));
    if ($lease_phids) {
      $leases = id(new DrydockLeaseQuery())
        ->setParentQuery($this)
        ->setViewer($this->getViewer())
        ->withPHIDs($lease_phids)
        ->execute();
      $leases = mpull($leases, null, 'getPHID');
    } else {
      $leases = array();
    }

    foreach ($logs as $key => $log) {
      $lease = null;
      $lease_phid = $log->getLeasePHID();
      if ($lease_phid) {
        $lease = idx($leases, $lease_phid);
      }
      $log->attachLease($lease);
    }

    $operation_phids = array_filter(mpull($logs, 'getOperationPHID'));
    if ($operation_phids) {
      $operations = id(new DrydockRepositoryOperationQuery())
        ->setParentQuery($this)
        ->setViewer($this->getViewer())
        ->withPHIDs($operation_phids)
        ->execute();
      $operations = mpull($operations, null, 'getPHID');
    } else {
      $operations = array();
    }

    foreach ($logs as $key => $log) {
      $operation = null;
      $operation_phid = $log->getOperationPHID();
      if ($operation_phid) {
        $operation = idx($operations, $operation_phid);
      }
      $log->attachOperation($operation);
    }

    return $logs;
  }

  protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
    $where = parent::buildWhereClauseParts($conn);

    if ($this->ids !== null) {
      $where[] = qsprintf(
        $conn,
        'id IN (%Ls)',
        $this->ids);
    }

    if ($this->blueprintPHIDs !== null) {
      $where[] = qsprintf(
        $conn,
        'blueprintPHID IN (%Ls)',
        $this->blueprintPHIDs);
    }

    if ($this->resourcePHIDs !== null) {
      $where[] = qsprintf(
        $conn,
        'resourcePHID IN (%Ls)',
        $this->resourcePHIDs);
    }

    if ($this->leasePHIDs !== null) {
      $where[] = qsprintf(
        $conn,
        'leasePHID IN (%Ls)',
        $this->leasePHIDs);
    }

    if ($this->operationPHIDs !== null) {
      $where[] = qsprintf(
        $conn,
        'operationPHID IN (%Ls)',
        $this->operationPHIDs);
    }

    return $where;
  }

}


text:
Log In

<form role="form" action="user/login" method="POST">

    Email address:
    <input type="email" class="form-control" id="email" name="email">

    Password:
    <input type="password" class="form-control" id="password" name="password">

    <input type="checkbox" id="rememberme" name="rememberme"> Remember me

  <button type="submit" class="btn btn-primary pull-right">Submit</button>
</form>


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CommonReferenceQueryResponse Result="Success">
    <MessageMetadata SenderDomain="cro1.usef-example.com" SenderRole="CRO" RecipientDomain="agr1.usef-example.com"
                     RecipientRole="AGR" TimeStamp="2015-03-13T12:03:54.438" MessageID="11df69d6-1ee1-4b98-8279-be0cf910b0e1"
                     ConversationID="4cfd90e0-550d-4a54-aff1-0c0660555c93" Precedence="Routine"/>
    <CongestionPoint EntityAddress="ean.1111111111" DSO-Domain="dso1.usef-example.com">
        <Connection EntityAddress="ean.1000000001"/>
        <Connection EntityAddress="ean.1000000002"/>
    </CongestionPoint>
    <CongestionPoint EntityAddress="ean.2222222222" DSO-Domain="dso1.usef-example.com">
        <Connection EntityAddress="ean.1000000003"/>
    </CongestionPoint>
    <CongestionPoint EntityAddress="ean.3333333333" DSO-Domain="dso2.usef-example.com">
        <Connection EntityAddress="ean.1000000005"/>
        <Connection EntityAddress="ean.1000000006"/>
    </CongestionPoint>
    <CongestionPoint EntityAddress="ean.4444444444" DSO-Domain="dso1.usef-example.com">
        <Connection EntityAddress="ean.1000000007"/>
        <Connection EntityAddress="ean.1000000008"/>
    </CongestionPoint>
    <CongestionPoint EntityAddress="ean.6666666666" DSO-Domain="dso1.usef-example.com">
        <Connection EntityAddress="ean.1000000009"/>
        <Connection EntityAddress="ean.1000000010"/>
    </CongestionPoint>
</CommonReferenceQueryResponse>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ScalaSbtSettings">
    <option name="customVMEnabled" value="true" />
    <option name="customVMPath" value="$USER_HOME$/scoop/apps/openjdk/current" />
    <option name="linkedExternalProjectsSettings">
      <SbtProjectSettings>
        <option name="allowSbtVersionOverride" value="false" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/project" />
          </set>
        </option>
        <option name="sbtVersion" value="1.3.12" />
        <option name="useQualifiedModuleNames" value="true" />
      </SbtProjectSettings>
    </option>
  </component>
</project>


text:
* Project Website - http://twitter4r.rubyforge.org
* Mailing List - http://groups.google.com/group/twitter4r-users
* Issues - http://github.com/twitter4r/twitter4r-core/issues

## Description

Twitter4R provides an object based API to query or update your Twitter account via pure Ruby.  It hides the ugly HTTP/REST code from your code.

## Installation

gem install twitter4r

## Getting Started

Add the twitter4r dependency to your Gemfile:

gem 'twitter4r', :require => 'twitter'

Set your OAuth consumer key and token like so:

Twitter.configure do |config|
  config.oauth_consumer_token = CONSUMER_KEY_HERE
  config.oauth_consumer_secret = CONSUME_SECRET_HERE
end

To create a client object with access tokens:

  client = Twitter::Client.new(:oauth_access => {
      :key => ACCESS\_KEY, :secret => ACCESS\_SECRET
    }
  client.status(:post, "Your awesome less than 140 characters tweet goes here!!! #with #hashtag #goodness")

## Usage Examples

Twitter4R starting with version 0.1.1 and above is organized into seven parts:

* [Configuration API](link:examples/configure_rb.html)
* [Friendship API](link:examples/friendship_rb.html)
* [Messaging API](link:examples/messaging_rb.html)
* [Model API](link:examples/model_rb.html)
* [Status API](link:examples/status_rb.html)
* [Timeline API](link:examples/timeline_rb.html)
* [User API](link:examples/user_rb.html)

## Features

Library supports:

* OAuth support for authentication with the Twitter.com REST and Search APIs
* identi.ca API access
* Customizability of API endpoints such that any Twitter.com compliant API can be accessed (not just Twitter.com and identi.ca's)
* Uses lightweight native JSON under the hood as opposed to heavyweight XML parsing (which is what other Ruby Twitter client libraries use)

Twitter.com REST API coverage includes:

* Status posting and retrieving
* User information
* Profile updates and retrieval
* Favorites add, remove, retrieve
* Direct messaging post, remove, read
* Friendship adding, removing, blocking
* Geolocation embedding inside of statuses and reading from statuses
* Rate limit status access
* Trends retrieval and trend location querying

Twitter.com Search API coverage includes:

* Searching with various options

## Developers

* [Susan Potter](http://SusanPotter.NET) <me at susanpotter dot net>

## Contributors

Code:

* Kaiichi Matsunaga <ma2 at lifemedia dot co dot jp> - proxy code suggestion
* Sergio Santos <> - message paging code suggestion
* Adam Stiles <adam at stilesoft dot com> - URI.encode => CGI.escape fix
* Carl Crawley <cwcrawley at gmail dot com> - Friendship get => post fix
* Christian Johansen <christian at cjohansen dot no> - in_reply_to attributes in Twitter::Status
* Harry Love <harrylove at gmail dot com> - added attributes to Twitter::Status
* Filipe Giusti <filipegiusti at gmail dot com> - fixed users/show issue that Twitter.com changed from under us, also inspired the v0.5.2 bugfix release by submitting great issue example code.
* Seth Cousins <seth.cousins at gmail dot com> - added HTTP timeout option and provided a patch that inspired the OAuth support for Twitter4R
* John McKerrell <@mcknut on twitter> - added geo attribute to Twitter::Message.

Design Suggestions:

* Bosco So <rubymeetup at boscoso dot com> - making Twitter::Error a RuntimeError instead of an Exception to prevent irb from crashing out.

## External Dependencies

* Ruby 1.8 (tested with 1.8.6)
* RSpec gem 1.0.0+ (tested with 1.1.3)
* JSON gem 0.4.3+ (tested with versions: 1.1.1 and 1.1.2)
* jcode (for unicode support)


text:
package com.google.cloud.dataflow.sdk.util;

import com.google.cloud.dataflow.sdk.options.PipelineOptions;
import com.google.cloud.dataflow.sdk.transforms.Combine.KeyedCombineFn;
import com.google.cloud.dataflow.sdk.transforms.CombineFnBase.PerKeyCombineFn;
import com.google.cloud.dataflow.sdk.transforms.CombineWithContext;
import com.google.cloud.dataflow.sdk.transforms.CombineWithContext.KeyedCombineFnWithContext;
import com.google.cloud.dataflow.sdk.transforms.CombineWithContext.RequiresContextInternal;
import com.google.cloud.dataflow.sdk.transforms.DoFn;
import com.google.cloud.dataflow.sdk.transforms.windowing.BoundedWindow;
import com.google.common.collect.Iterables;

import java.util.Collection;

/**
 * Static utility methods that provide {@link PerKeyCombineFnRunner} implementations
 * for different keyed combine functions.
 */
public class PerKeyCombineFnRunners {
  /**
   * Returns a {@link PerKeyCombineFnRunner} from a {@link PerKeyCombineFn}.
   */
  public static <K, InputT, AccumT, OutputT> PerKeyCombineFnRunner<K, InputT, AccumT, OutputT>
  create(PerKeyCombineFn<K, InputT, AccumT, OutputT> perKeyCombineFn) {
    if (perKeyCombineFn instanceof RequiresContextInternal) {
      return new KeyedCombineFnWithContextRunner<>(
          (KeyedCombineFnWithContext<K, InputT, AccumT, OutputT>) perKeyCombineFn);
    } else {
      return new KeyedCombineFnRunner<>(
          (KeyedCombineFn<K, InputT, AccumT, OutputT>) perKeyCombineFn);
    }
  }

  /**
   * An implementation of {@link PerKeyCombineFnRunner} with {@link KeyedCombineFn}.
   *
   * It forwards functions calls to the {@link KeyedCombineFn}.
   */
  private static class KeyedCombineFnRunner<K, InputT, AccumT, OutputT>
      implements PerKeyCombineFnRunner<K, InputT, AccumT, OutputT> {
    private final KeyedCombineFn<K, InputT, AccumT, OutputT> keyedCombineFn;

    private KeyedCombineFnRunner(
        KeyedCombineFn<K, InputT, AccumT, OutputT> keyedCombineFn) {
      this.keyedCombineFn = keyedCombineFn;
    }

    @Override
    public KeyedCombineFn<K, InputT, AccumT, OutputT> fn() {
      return keyedCombineFn;
    }

    @Override
    public AccumT createAccumulator(K key, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFn.createAccumulator(key);
    }

    @Override
    public AccumT addInput(
        K key, AccumT accumulator, InputT input, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFn.addInput(key, accumulator, input);
    }

    @Override
    public AccumT mergeAccumulators(
        K key, Iterable<AccumT> accumulators, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFn.mergeAccumulators(key, accumulators);
    }

    @Override
    public OutputT extractOutput(K key, AccumT accumulator, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFn.extractOutput(key, accumulator);
    }

    @Override
    public AccumT compact(K key, AccumT accumulator, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFn.compact(key, accumulator);
    }

    @Override
    public OutputT apply(K key, Iterable<? extends InputT> inputs, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFn.apply(key, inputs);
    }

    @Override
    public AccumT addInputs(K key, Iterable<InputT> inputs, DoFn<?, ?>.ProcessContext c) {
      AccumT accum = keyedCombineFn.createAccumulator(key);
      for (InputT input : inputs) {
        accum = keyedCombineFn.addInput(key, accum, input);
      }
      return accum;
    }

    @Override
    public String toString() {
      return keyedCombineFn.toString();
    }

    @Override
    public AccumT createAccumulator(K key, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFn.createAccumulator(key);
    }

    @Override
    public AccumT addInput(K key, AccumT accumulator, InputT input, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFn.addInput(key, accumulator, input);
    }

    @Override
    public AccumT mergeAccumulators(K key, Iterable<AccumT> accumulators, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFn.mergeAccumulators(key, accumulators);
    }

    @Override
    public OutputT extractOutput(K key, AccumT accumulator, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFn.extractOutput(key, accumulator);
    }

    @Override
    public AccumT compact(K key, AccumT accumulator, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFn.compact(key, accumulator);
    }
  }

  /**
   * An implementation of {@link PerKeyCombineFnRunner} with {@link KeyedCombineFnWithContext}.
   *
   * It forwards functions calls to the {@link KeyedCombineFnWithContext}.
   */
  private static class KeyedCombineFnWithContextRunner<K, InputT, AccumT, OutputT>
      implements PerKeyCombineFnRunner<K, InputT, AccumT, OutputT> {
    private final KeyedCombineFnWithContext<K, InputT, AccumT, OutputT> keyedCombineFnWithContext;

    private KeyedCombineFnWithContextRunner(
        KeyedCombineFnWithContext<K, InputT, AccumT, OutputT> keyedCombineFnWithContext) {
      this.keyedCombineFnWithContext = keyedCombineFnWithContext;
    }

    @Override
    public KeyedCombineFnWithContext<K, InputT, AccumT, OutputT> fn() {
      return keyedCombineFnWithContext;
    }

    @Override
    public AccumT createAccumulator(K key, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFnWithContext.createAccumulator(key,
          CombineContextFactory.createFromProcessContext(c));
    }

    @Override
    public AccumT addInput(
        K key, AccumT accumulator, InputT value, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFnWithContext.addInput(key, accumulator, value,
          CombineContextFactory.createFromProcessContext(c));
    }

    @Override
    public AccumT mergeAccumulators(
        K key, Iterable<AccumT> accumulators, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFnWithContext.mergeAccumulators(
          key, accumulators, CombineContextFactory.createFromProcessContext(c));
    }

    @Override
    public OutputT extractOutput(K key, AccumT accumulator, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFnWithContext.extractOutput(key, accumulator,
          CombineContextFactory.createFromProcessContext(c));
    }

    @Override
    public AccumT compact(K key, AccumT accumulator, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFnWithContext.compact(key, accumulator,
          CombineContextFactory.createFromProcessContext(c));
    }

    @Override
    public OutputT apply(K key, Iterable<? extends InputT> inputs, DoFn<?, ?>.ProcessContext c) {
      return keyedCombineFnWithContext.apply(key, inputs,
          CombineContextFactory.createFromProcessContext(c));
    }

    @Override
    public AccumT addInputs(K key, Iterable<InputT> inputs, DoFn<?, ?>.ProcessContext c) {
      CombineWithContext.Context combineContext = CombineContextFactory.createFromProcessContext(c);
      AccumT accum = keyedCombineFnWithContext.createAccumulator(key, combineContext);
      for (InputT input : inputs) {
        accum = keyedCombineFnWithContext.addInput(key, accum, input, combineContext);
      }
      return accum;
    }

    @Override
    public String toString() {
      return keyedCombineFnWithContext.toString();
    }

    @Override
    public AccumT createAccumulator(K key, PipelineOptions options, SideInputReader sideInputReader,
        Collection<? extends BoundedWindow> windows) {
      return keyedCombineFnWithContext.createAccumulator(key,
        CombineContextFactory.createFromComponents(
          options, sideInputReader, Iterables.getOnlyElement(windows)));
    }

    @Override
    public AccumT addInput(K key, AccumT accumulator, InputT input, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFnWithContext.addInput(key, accumulator, input,
        CombineContextFactory.createFromComponents(
          options, sideInputReader, Iterables.getOnlyElement(windows)));
    }

    @Override
    public AccumT mergeAccumulators(K key, Iterable<AccumT> accumulators, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFnWithContext.mergeAccumulators(key, accumulators,
        CombineContextFactory.createFromComponents(
          options, sideInputReader, Iterables.getOnlyElement(windows)));
    }

    @Override
    public OutputT extractOutput(K key, AccumT accumulator, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFnWithContext.extractOutput(key, accumulator,
        CombineContextFactory.createFromComponents(
          options, sideInputReader, Iterables.getOnlyElement(windows)));
    }

    @Override
    public AccumT compact(K key, AccumT accumulator, PipelineOptions options,
        SideInputReader sideInputReader, Collection<? extends BoundedWindow> windows) {
      return keyedCombineFnWithContext.compact(key, accumulator,
        CombineContextFactory.createFromComponents(
          options, sideInputReader, Iterables.getOnlyElement(windows)));
    }
  }
}


text:
declare var x: {
  x: { foo: string }
};
declare var y: {
  // $FlowFixMe - this location is only mentioned in the extra section
  x: { bar: number }
};
x = y;


text:
import * as React from 'react';
import './sidebar.scss';

class Sidebar extends React.Component<{}, {}> {

  render() {
    return (
      <div className='sidebar'>
        {this.props.children}
      </div>
    );
  }

}

export default Sidebar;


text:
A simple, flex and strict UI library that in TypeScript.

Still under heavy construction.

## Feature.

 - Components are first-class members.

 - No complex design, friendly to anyone.

 - For TypeScripters.

 - More is coming.

## Quick start

```typescript
import { LC, Component } from 'lc.js'
import { HelloWorld } from './hello-world'

@Component({
  components: {
    'hello-world': HelloWorld
  },

  template: `
    <div class="demo-app">
      <h1 :style="'color: ' + color">Hello, {{appName || '--'}}!</h1>
      <small>Version: {{version}}</small>
      <hello-world :app-name="appName"></hello-world>
      <div>
        <input @model="appName" place="Change your app name.">
        <input @model.number="version" @focus="onFocus">
        <button @click="showAppName">Show AppName</button>
      </div>
    </div>
  `
})
class AppRoot extends LC {
  appName: string = 'My App'
  color: string = '#2090e3'
  version: number = 10

  onFocus () {
    this.version = 0
  }

  showAppName () {
    alert(this.appName)
  }
}

const myApp = new AppRoot()
myApp.$mount('#my-app')
```


text:
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Brickweave.Messaging.SqlServer.Entities
{
    [Table(TABLE_NAME)]
    public class MessageData
    {
        public const string TABLE_NAME = "MessageOutbox";

        public Guid Id { get; set; }
        [MaxLength(200)]
        public string TypeName { get; set; }
        public string Json { get; set; }
        public DateTime Created { get; set; }
        public int CommitSequence { get; set; }
        public bool IsSending { get; set; }
        public int SendAttemptCount { get; set; }
        public DateTime? LastSendAttempt { get; set; }
    }
}


text:
YUI.add('resize-proxy', function(Y) {

var ACTIVE_HANDLE_NODE = 'activeHandleNode',
	CURSOR = 'cursor',
	DRAG_CURSOR = 'dragCursor',
	HOST = 'host',
	PARENT_NODE = 'parentNode',
	PROXY = 'proxy',
	PROXY_NODE = 'proxyNode',
	RESIZE = 'resize',
	RESIZE_PROXY = 'resize-proxy',
	WRAPPER = 'wrapper',

	getCN = Y.ClassNameManager.getClassName,

	CSS_RESIZE_PROXY = getCN(RESIZE, PROXY);

function ResizeProxy() {
	ResizeProxy.superclass.constructor.apply(this, arguments);
}

Y.mix(ResizeProxy, {
	NAME: RESIZE_PROXY,

	NS: PROXY,

	ATTRS: {
		/**
         * The Resize proxy element.
         *
         * @attribute proxyNode
         * @default Generated using an internal HTML markup
         * @type String | Node
         */
		proxyNode: {
			setter: Y.one,
			valueFn: function() {
				return Y.Node.create(this.PROXY_TEMPLATE);
			}
		}
	}
});

Y.extend(ResizeProxy, Y.Plugin.Base, {
	/**
     * Template used to create the resize proxy.
     *
     * @property PROXY_TEMPLATE
     * @type {String}
     */
	PROXY_TEMPLATE: '

',

	initializer: function() {
		var instance = this;

		instance.afterHostEvent('resize:start', instance._afterResizeStart);
		instance.beforeHostMethod('_resize', instance._beforeHostResize);
		instance.afterHostMethod('_resizeEnd', instance._afterHostResizeEnd);
	},

	destructor: function() {
		var instance = this;

		instance.get(PROXY_NODE).remove(true);
	},

	_afterHostResizeEnd: function(event) {
		var instance = this,
			drag = event.dragEvent.target;

		// reseting actXY from drag when drag end
		drag.actXY = [];

		// if proxy is true, hide it on resize end
		instance._syncProxyUI();

		instance.get(PROXY_NODE).hide();
	},

	_afterResizeStart: function(event) {
		var instance = this;

		instance._renderProxy();
	},

	_beforeHostResize: function(event) {
		var instance = this,
			host = this.get(HOST);

		host._handleResizeAlignEvent(event.dragEvent);

		// if proxy is true _syncProxyUI instead of _syncUI
		instance._syncProxyUI();

		return new Y.Do.Prevent();
	},

    /**
      * Render the proxyNode element and
      * make it sibling of the node.
      *
      * @method _renderProxy
      * @protected
      */
	_renderProxy: function() {
		var instance = this,
			host = this.get(HOST),
			proxyNode = instance.get(PROXY_NODE);

		if (!proxyNode.inDoc()) {
			host.get(WRAPPER).get(PARENT_NODE).append(
				proxyNode.hide()
			);
		}
	},

	/**
     * Sync the proxy UI with internal values from
     * info.
     *
     * @method _syncProxyUI
     * @protected
     */
	_syncProxyUI: function() {
		var instance = this,
			host = this.get(HOST),
			info = host.info,
			activeHandleNode = host.get(ACTIVE_HANDLE_NODE),
			proxyNode = instance.get(PROXY_NODE),
			cursor = activeHandleNode.getStyle(CURSOR);

		proxyNode.show().setStyle(CURSOR, cursor);

		host.delegate.dd.set(DRAG_CURSOR, cursor);

		proxyNode.sizeTo(info.offsetWidth, info.offsetHeight);

		proxyNode.setXY([ info.left, info.top ]);
	}
});

Y.namespace('Plugin');
Y.Plugin.ResizeProxy = ResizeProxy;

}, '@VERSION@' ,{skinnable:false, requires:['resize-base', 'plugin']});


text:
<?xml version="1.0" encoding="UTF-8"?>
<actions>
        <action>
            <actionName>build</actionName>
            <goals>
                <goal>package</goal>
            </goals>
        </action>
        <action>
            <actionName>rebuild</actionName>
            <goals>
                <goal>clean</goal>
                <goal>package</goal>
            </goals>
        </action>
        <action>
            <actionName>build-with-dependencies</actionName>
            <reactor>also-make</reactor>
            <goals>
                <goal>package</goal>
            </goals>
        </action>
    </actions>


text:
@implementation SampleWrapper

@end


text:
<?php

namespace PlaygroundGame\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Doctrine\ORM\Mapping\PrePersist;
use Doctrine\ORM\Mapping\PreUpdate;
use Laminas\InputFilter\InputFilter;
use Laminas\InputFilter\Factory as InputFactory;
use Laminas\InputFilter\InputFilterAwareInterface;
use Laminas\InputFilter\InputFilterInterface;
use Gedmo\Mapping\Annotation as Gedmo;

/**
 * @ORM\Entity @HasLifecycleCallbacks
 * @ORM\Table(name="game_quiz_question")
 * @Gedmo\TranslationEntity(class="PlaygroundGame\Entity\QuizQuestionTranslation")
 */
class QuizQuestion implements InputFilterAwareInterface
{
    protected $inputFilter;

    /**
     * @ORM\Id
     * @ORM\Column(type="integer");
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\ManyToOne(targetEntity="Quiz", inversedBy="questions", cascade={"persist"})
     * @ORM\JoinColumn(name="quiz_id", referencedColumnName="id", onDelete="CASCADE")
     */
    protected $quiz;

    /**
     * @ORM\OneToMany(targetEntity="QuizAnswer", mappedBy="question", cascade={"persist","remove"})
     * @ORM\OrderBy({"position" = "ASC"})
     */
    private $answers;

    /**
     * values :
     *          0 : closed (you can select only one answer)
     *          1 : opened (you can select many answers),
     *          2 : No answer to select. You write a text in a textarea
     *          3 : Drag & Drop. We display all the answers on the left, and n empty cells on the right (n being the number of correct answers)
     *              The user then tries to drag and drop the correct answers to the right
     *
     * @ORM\Column(type="integer", nullable=false)
     */
    protected $type = 0;

    /**
     * @Gedmo\Translatable
     * @ORM\Column(type="text", nullable=false)
     */
    protected $question;

    /**
     * @ORM\Column(type="integer", nullable=false)
     */
    protected $position = 0;

    /**
     * @Gedmo\Translatable
     * @ORM\Column(type="string", nullable=true)
     */
    protected $video;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    protected $image;

    /**
     * @Gedmo\Translatable
     * @ORM\Column(type="integer", nullable=true)
     */
    protected $audio = 0;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $autoplay = 0;

    /**
     * @Gedmo\Translatable
     * @ORM\Column(type="text", nullable=true)
     */
    protected $hint;

    /**
     * @Gedmo\Translatable
     * @ORM\Column(name="json_data", type="text", nullable=true)
     */
    protected $jsonData;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $prediction = 0;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $timer = 0;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    protected $timer_duration = 0;

    /**
     * The question weight in the game
     * @ORM\Column(type="integer", nullable=false)
     */
    protected $weight = 1;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    protected $max_points = 0;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    protected $max_correct_answers = 0;

    /**
     * @ORM\Column(type="datetime")
     */
    protected $created_at;

    /**
     * @ORM\Column(type="datetime")
     */
    protected $updated_at;

    public function __construct()
    {
        $this->answers = new ArrayCollection();
    }

    /**
     * @PrePersist
     */
    public function createChrono()
    {
        $this->created_at = new \DateTime("now");
        $this->updated_at = new \DateTime("now");
    }

    /**
     * @PreUpdate
     */
    public function updateChrono()
    {
        $this->updated_at = new \DateTime("now");
    }

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

    /**
     * @param unknown_type $id
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }

    /**
     * @return the unknown_type
     */
    public function getQuiz()
    {
        return $this->quiz;
    }

    /**
     * @param unknown_type $quiz
     */
    public function setQuiz($quiz)
    {
        $quiz->addQuestion($this);
        $this->quiz = $quiz;

        return $this;
    }

    /**
     * @return ArrayCollection unknown_type
     */
    public function getAnswers()
    {
        return $this->answers;
    }

    /**
     * frm collection solution
     * @param ArrayCollection $answers
     */
    public function setAnswers(ArrayCollection $answers)
    {
        $this->answers = $answers;

        return $this;
    }

    public function addAnswers(ArrayCollection $answers)
    {
        $i = 0;
        foreach ($answers as $answer) {
            $answer->setQuestion($this);
            if ($answer->getPosition() == null) {
                $answer->setPosition($i);
            }
            $this->answers->add($answer);
            $i++;
        }
    }

    public function removeAnswers(ArrayCollection $answers)
    {
        foreach ($answers as $answer) {
            $answer->setQuestion(null);
            $this->answers->removeElement($answer);
        }
    }

    /**
     * Add an answer to the quiz.
     *
     * @param QuizAnswer $answer
     *
     * @return void
     */
    public function addAnswer($answer)
    {
        $this->answers[] = $answer;
    }

    /**
     * @return integer unknown_type
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * @param unknown_type $type
     */
    public function setType($type)
    {
        $this->type = $type;

        return $this;
    }

    /**
     * @return the unknown_type
     */
    public function getVideo()
    {
        return $this->video;
    }

    /**
     * @param unknown_type $video
     */
    public function setVideo($video)
    {
        $this->video = $video;

        return $this;
    }

    /**
     * @return the unknown_type
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * @param string $image
     */
    public function setImage($image)
    {
        $this->image = $image;

        return $this;
    }

    /**
     * @return integer unknown_type
     */
    public function getAudio()
    {
        return $this->audio;
    }

    /**
     * @param unknown_type audio
     */
    public function setAudio($audio)
    {
        $this->audio = $audio;

        return $this;
    }

    /**
     * @return boolean unknown_type
     */
    public function getAutoplay()
    {
        return $this->autoplay;
    }

    /**
     * @param unknown_type autoplay
     */
    public function setAutoplay($autoplay)
    {
        $this->autoplay = $autoplay;

        return $this;
    }

    /**
     * @return the unknown_type
     */
    public function getHint()
    {
        return $this->hint;
    }

    /**
     * @param unknown_type $hint
     */
    public function setHint($hint)
    {
        $this->hint = $hint;

        return $this;
    }

    /**
     * @return the string
     */
    public function getJsonData()
    {
        return $this->jsonData;
    }

    /**
     * @param string $hint
     */
    public function setJsonData($jsonData)
    {
        $this->jsonData = $jsonData;

        return $this;
    }

    /**
     * @return boolean unknown_type
     */
    public function getTimer()
    {
        return $this->timer;
    }

    /**
     * @param unknown_type $timer
     */
    public function setTimer($timer)
    {
        $this->timer = $timer;

        return $this;
    }

    /**
     * @return integer unknown_type
     */
    public function getPrediction()
    {
        return $this->prediction;
    }

    /**
     * @param unknown_type $prediction
     */
    public function setPrediction($prediction)
    {
        $this->prediction = $prediction;

        return $this;
    }

    /**
     * @return integer unknown_type
     */
    public function getTimerDuration()
    {
        return $this->timer_duration;
    }

    /**
     * @param unknown_type $timer_duration
     */
    public function setTimerDuration($timer_duration)
    {
        $this->timer_duration = $timer_duration;

        return $this;
    }

    /**
     * @return integer unknown_type
     */
    public function getWeight()
    {
        return $this->weight;
    }

    /**
     * @param unknown_type $weight
     */
    public function setWeight($weight)
    {
        $this->weight = $weight;

        return $this;
    }

    /**
     * @return integer
     */
    public function getMaxPoints()
    {
        return $this->max_points;
    }

    /**
     * @param integer max_points
     */
    public function setMaxPoints($max_points)
    {
        $this->max_points = $max_points;

        return $this;
    }

    /**
     * @return integer
     */
    public function getMaxCorrectAnswers()
    {
        return $this->max_correct_answers;
    }

    /**
     * @param integer max_correct_answers
     */
    public function setMaxCorrectAnswers($max_correct_answers)
    {
        $this->max_correct_answers = $max_correct_answers;

        return $this;
    }

    /**
     * @return the unknown_type
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    /**
     * @param unknown_type $created_at
     */
    public function setCreatedAt($created_at)
    {
        $this->created_at = $created_at;

        return $this;
    }

    /**
     * @return the unknown_type
     */
    public function getUpdatedAt()
    {
        return $this->updated_at;
    }

    /**
     * @param unknown_type $updated_at
     */
    public function setUpdatedAt($updated_at)
    {
        $this->updated_at = $updated_at;

        return $this;
    }

    /**
     * @return string
     */
    public function getQuestion()
    {
        return $this->question;
    }

    /**
     * @param string $question
     */
    public function setQuestion($question)
    {
        $this->question = $question;

        return $this;
    }

    /**
     * @return integer
     */
    public function getPosition()
    {
        return $this->position;
    }

    /**
     * @param string $position
     */
    public function setPosition($position)
    {
        $this->position = $position;

        return $this;
    }

    /**
     * Convert the object to an array.
     *
     * @return array
     */
    public function getArrayCopy()
    {
        $obj_vars = get_object_vars($this);

        return $obj_vars;
    }

    /**
     * Populate from an array.
     *
     * @param array $data
     */
    public function populate($data = array())
    {
        if (isset($data['question']) && $data['question'] !== null) {
            $this->question = $data['question'];
        }

        if (isset($data['hint']) && $data['hint'] !== null) {
            $this->hint = $data['hint'];
        }

        if (isset($data['jsonData']) && $data['jsonData'] !== null) {
            $this->jsonData = $data['jsonData'];
        }

        if (isset($data['type']) && $data['type'] !== null) {
            $this->type = $data['type'];
        }

        if (isset($data['position']) && $data['position'] !== null) {
            $this->position = $data['position'];
        }

        if (isset($data['weight']) && $data['weight'] !== null) {
            $this->weight = $data['weight'];
        }

        if (isset($data['image']) && $data['image'] !== null) {
            $this->image = $data['image'];
        }

        if (isset($data['video']) && $data['video'] !== null) {
            $this->video = $data['video'];
        }

        if (isset($data['audio']) && $data['audio'] !== null) {
            $this->audio = $data['audio'];
        }

        if (isset($data['autoplay']) && $data['autoplay'] !== null) {
            $this->autoplay = $data['autoplay'];
        }

        if (isset($data['timer']) && $data['timer'] !== null) {
            $this->timer = $data['timer'];
        }

        if (isset($data['timer_duration']) && $data['timer_duration'] !== null) {
            $this->timer_duration = $data['timer_duration'];
        }

        if (isset($data['max_points']) && $data['max_points'] !== null) {
            $this->max_points = $data['max_points'];
        }

        if (isset($data['max_correct_answers']) && $data['max_correct_answers'] !== null) {
            $this->max_correct_answers = $data['max_correct_answers'];
        }
    }

    public function setInputFilter(InputFilterInterface $inputFilter)
    {
        throw new \Exception("Not used");
    }

    public function getInputFilter()
    {
        if (!$this->inputFilter) {
            $inputFilter = new InputFilter();
            $factory = new InputFactory();

            $inputFilter->add($factory->createInput(array(
                'name'       => 'id',
                'required'   => false,
                'allowEmpty' => true,
                'filters'    => array(
                    array('name' => 'Int'),
                ),
            )));

            $inputFilter->add($factory->createInput(array(
                'name'     => 'prediction',
                'required' => false,
                'allowEmpty' => true,
                // 'filters'    => array(
                //     array('name' => 'Boolean'),
                // ),
            )));

            $inputFilter->add($factory->createInput(array(
                'name'     => 'question',
                'required' => true,
            )));

            $inputFilter->add($factory->createInput(array(
                'name'     => 'max_correct_answers',
                'required' => false,
                'allowEmpty' => true,
                'filters'  => array(
                    array('name' => 'Int'),
                ),
                'validators' => array(
                    array(
                        'name'    => 'Digits',
                    ),
                ),
            )));

            $inputFilter->add($factory->createInput(array(
                'name'     => 'hint',
                'required' => false,
                /*'filters'  => array(
                    array('name' => 'StringTrim'),
                ),
                'validators' => array(
                    array(
                        'name'    => 'StringLength',
                        'options' => array(
                            'encoding' => 'UTF-8',
                            'min'      => 1,
                            'max'      => 255,
                        ),
                    ),
                ),*/
            )));

            $inputFilter->add($factory->createInput(array(
                'name'       => 'timer',
                'required'   => false,
                'allowEmpty' => true,
                // 'filters'    => array(
                //     array('name' => 'Boolean'),
                // ),
            )));

            $inputFilter->add($factory->createInput(array(
                'name'     => 'jsonData',
                'required' => false,
                'allowEmpty' => true,
            )));

            $inputFilter->add($factory->createInput(array(
                'name'     => 'type',
                'required' => true,
                'validators' => array(
                    array(
                        'name'    => 'Between',
                        'options' => array(
                            'min'      => 0,
                            'max'      => 3,
                        ),
                    ),
                ),
            )));

            $inputFilter->add($factory->createInput(array(
                'name'     => 'image',
                'required' => false,
            )));

            $inputFilter->add($factory->createInput(array(
                'name'     => 'audio',
                'required' => false,
                'filters' => array(
                    array('name' => 'Int')
                ),
            )));

            $inputFilter->add($factory->createInput(array(
                'name'       => 'autoplay',
                'required'   => false,
                'allowEmpty' => true,
                // 'filters'    => array(
                //     array('name' => 'Boolean'),
                // ),
            )));

            $this->inputFilter = $inputFilter;
        }

        return $this->inputFilter;
    }
}


text:
/*
* 3/25/2015
* Tom Evans
* Jasmine unit tests for publication.js run with Karma.js
*/

'use strict';

define(['tran-sci-cats', 'publication'], function(ts, pub) {
  describe('publication', function() {
    it('properly instantiates ts obj', function() {
      var t = new pub('test', 'test');
      expect(t.ts).toEqual(jasmine.objectContaining({A:0,C:0,H:0}));
    });
  });
});


text:
<?xml version="1.0" encoding="utf-8"?>
<root>
	<action class="org.wikiup.extensions.wmdk.leprechaun.SampleCategoryServletAction"/>
</root>


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

namespace KFrameWork
{
    public abstract class TcpMessage : NetMessage, ISerialize
    {
        public int MainCmd { get; protected set; }

        public int SubCmd { get; protected set; }

        public bool IgnoreResp { get; set; }

        public int reiceved { get; set; }

        public int total { get; set; }

        public bool HasError
        {
            get
            {
                return this.errorType != NetError.None;
            }
        }

        public NetError errorType { get; set; }

        public abstract float getSendTime();

        public abstract byte[] Serialize();

        public abstract void Release();
    }
}


text:
package pl.wcislo.sbql4j.ast.binary;

import pl.wcislo.sbql4j.ast.Expression;
import pl.wcislo.sbql4j.typecheck.rule.SignatureDef;
import pl.wcislo.sbql4j.typecheck.rule.BinaryTypeRule;
import pl.wcislo.sbql4j.typecheck.signature.CardinalityType;

public abstract class ArithmeticExpression extends BinaryExpression {

	public ArithmeticExpression(Expression leftExpr, Expression rightExpr) {
		super(leftExpr, rightExpr);
	}

}


text:
package org.joda.time;

import java.io.Serializable;

import org.joda.time.base.AbstractInstant;
import org.joda.time.chrono.ISOChronology;
import org.joda.time.convert.ConverterManager;
import org.joda.time.convert.InstantConverter;

/**
 * Instant is the standard implementation of a fully immutable instant in time.
 *

 * Instant is an implementation of {@link ReadableInstant}.
 * As with all instants, it represents an exact point on the time-line,
 * but limited to the precision of milliseconds. An Instant
 * should be used to represent a point in time irrespective of any other
 * factor, such as chronology or time zone.
 *

 * Internally, the class holds one piece of data, the instant as milliseconds
 * from the Java epoch of 1970-01-01T00:00:00Z.
 *

 * For example, an Instant can be used to compare two DateTime
 * objects irrespective of chronology or time zone.
 *

 * boolean sameInstant = dt1.toInstant().equals(dt2.toInstant());
 *

 * Note that the following code will also perform the same check:
 *

 * boolean sameInstant = dt1.isEqual(dt2);
 *

 *

 * Instant is thread-safe and immutable.
 *
 * @author Stephen Colebourne
 * @since 1.0
 */
public final class Instant
        extends AbstractInstant
        implements ReadableInstant, Serializable {

    /** Serialization lock */
    private static final long serialVersionUID = 3299096530934209741L;

    /** The millis from 1970-01-01T00:00:00Z */
    private final long iMillis;

    //-----------------------------------------------------------------------
    /**
     * Constructs an instance set to the current system millisecond time.
     */
    public Instant() {
        super();
        iMillis = DateTimeUtils.currentTimeMillis();
    }

    /**
     * Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z.
     *
     * @param instant  the milliseconds from 1970-01-01T00:00:00Z
     */
    public Instant(long instant) {
        super();
        iMillis = instant;
    }

    /**
     * Constructs an instance from an Object that represents a datetime.
     *

     * The recognised object types are defined in {@link ConverterManager} and
     * include String, Calendar and Date.
     *
     * @param instant  the datetime object, null means now
     * @throws IllegalArgumentException if the instant is invalid
     */
    public Instant(Object instant) {
        super();
        InstantConverter converter = ConverterManager.getInstance().getInstantConverter(instant);
        iMillis = converter.getInstantMillis(instant, ISOChronology.getInstanceUTC());
    }

    //-----------------------------------------------------------------------
    /**
     * Get this object as an Instant by returning this.
     *
     * @return this
     */
    public Instant toInstant() {
        return this;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets a copy of this instant with different millis.
     *

     * The returned object will be either be a new Instant or this.
     *
     * @param newMillis  the new millis, from 1970-01-01T00:00:00Z
     * @return a copy of this instant with different millis
     */
    public Instant withMillis(long newMillis) {
        return (newMillis == iMillis ? this : new Instant(newMillis));
    }

    /**
     * Gets a copy of this instant with the specified duration added.
     *

     * If the addition is zero, then this is returned.
     *
     * @param durationToAdd  the duration to add to this one
     * @param scalar  the amount of times to add, such as -1 to subtract once
     * @return a copy of this instant with the duration added
     * @throws ArithmeticException if the new instant exceeds the capacity of a long
     */
    public Instant withDurationAdded(long durationToAdd, int scalar) {
        if (durationToAdd == 0 || scalar == 0) {
            return this;
        }
        long instant = getChronology().add(getMillis(), durationToAdd, scalar);
        return withMillis(instant);
    }

    /**
     * Gets a copy of this instant with the specified duration added.
     *

     * If the addition is zero, then this is returned.
     *
     * @param durationToAdd  the duration to add to this one, null means zero
     * @param scalar  the amount of times to add, such as -1 to subtract once
     * @return a copy of this instant with the duration added
     * @throws ArithmeticException if the new instant exceeds the capacity of a long
     */
    public Instant withDurationAdded(ReadableDuration durationToAdd, int scalar) {
        if (durationToAdd == null || scalar == 0) {
            return this;
        }
        return withDurationAdded(durationToAdd.getMillis(), scalar);
    }

    //-----------------------------------------------------------------------
    /**
     * Gets a copy of this instant with the specified duration added.
     *

     * If the amount is zero or null, then this is returned.
     *
     * @param duration  the duration to add to this one
     * @return a copy of this instant with the duration added
     * @throws ArithmeticException if the new instant exceeds the capacity of a long
     */
    public Instant plus(long duration) {
        return withDurationAdded(duration, 1);
    }

    /**
     * Gets a copy of this instant with the specified duration added.
     *

     * If the amount is zero or null, then this is returned.
     *
     * @param duration  the duration to add to this one, null means zero
     * @return a copy of this instant with the duration added
     * @throws ArithmeticException if the new instant exceeds the capacity of a long
     */
    public Instant plus(ReadableDuration duration) {
        return withDurationAdded(duration, 1);
    }

    //-----------------------------------------------------------------------
    /**
     * Gets a copy of this instant with the specified duration taken away.
     *

     * If the amount is zero or null, then this is returned.
     *
     * @param duration  the duration to reduce this instant by
     * @return a copy of this instant with the duration taken away
     * @throws ArithmeticException if the new instant exceeds the capacity of a long
     */
    public Instant minus(long duration) {
        return withDurationAdded(duration, -1);
    }

    /**
     * Gets a copy of this instant with the specified duration taken away.
     *

     * If the amount is zero or null, then this is returned.
     *
     * @param duration  the duration to reduce this instant by
     * @return a copy of this instant with the duration taken away
     * @throws ArithmeticException if the new instant exceeds the capacity of a long
     */
    public Instant minus(ReadableDuration duration) {
        return withDurationAdded(duration, -1);
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the milliseconds of the instant.
     *
     * @return the number of milliseconds since 1970-01-01T00:00:00Z
     */
    public long getMillis() {
        return iMillis;
    }

    /**
     * Gets the chronology of the instant, which is ISO in the UTC zone.
     *

     * This method returns {@link ISOChronology#getInstanceUTC()} which
     * corresponds to the definition of the Java epoch 1970-01-01T00:00:00Z.
     *
     * @return ISO in the UTC zone
     */
    public Chronology getChronology() {
        return ISOChronology.getInstanceUTC();
    }

    //-----------------------------------------------------------------------
    /**
     * Get this object as a DateTime using ISOChronology in the default zone.
     *

     * This method returns a DateTime object in the default zone.
     * This differs from the similarly named method on DateTime, DateMidnight
     * or MutableDateTime which retains the time zone. The difference is
     * because Instant really represents a time without a zone,
     * thus calling this method we really have no zone to 'retain' and
     * hence expect to switch to the default zone.
     *

     * This method definition preserves compatability with earlier versions
     * of Joda-Time.
     *
     * @return a DateTime using the same millis
     */
    public DateTime toDateTime() {
        return new DateTime(getMillis(), ISOChronology.getInstance());
    }

    /**
     * Get this object as a DateTime using ISOChronology in the default zone.
     * This method is identical to toDateTime().
     *

     * This method returns a DateTime object in the default zone.
     * This differs from the similarly named method on DateTime, DateMidnight
     * or MutableDateTime which retains the time zone. The difference is
     * because Instant really represents a time without a zone,
     * thus calling this method we really have no zone to 'retain' and
     * hence expect to switch to the default zone.
     *

     * This method definition preserves compatability with earlier versions
     * of Joda-Time.
     *
     * @return a DateTime using the same millis with ISOChronology
     * @deprecated Use toDateTime() as it is identical
     */
    public DateTime toDateTimeISO() {
        return toDateTime();
    }

    /**
     * Get this object as a MutableDateTime using ISOChronology in the default zone.
     *

     * This method returns a MutableDateTime object in the default zone.
     * This differs from the similarly named method on DateTime, DateMidnight
     * or MutableDateTime which retains the time zone. The difference is
     * because Instant really represents a time without a zone,
     * thus calling this method we really have no zone to 'retain' and
     * hence expect to switch to the default zone.
     *

     * This method definition preserves compatability with earlier versions
     * of Joda-Time.
     *
     * @return a MutableDateTime using the same millis
     */
    public MutableDateTime toMutableDateTime() {
        return new MutableDateTime(getMillis(), ISOChronology.getInstance());
    }

    /**
     * Get this object as a MutableDateTime using ISOChronology in the default zone.
     * This method is identical to toMutableDateTime().
     *

     * This method returns a MutableDateTime object in the default zone.
     * This differs from the similarly named method on DateTime, DateMidnight
     * or MutableDateTime which retains the time zone. The difference is
     * because Instant really represents a time without a zone,
     * thus calling this method we really have no zone to 'retain' and
     * hence expect to switch to the default zone.
     *

     * This method definition preserves compatability with earlier versions
     * of Joda-Time.
     *
     * @return a MutableDateTime using the same millis with ISOChronology
     * @deprecated Use toMutableDateTime() as it is identical
     */
    public MutableDateTime toMutableDateTimeISO() {
        return toMutableDateTime();
    }

}


text:
The server needs to be able to be able to run the following program at the specified versions or newer:

-	Apache v2.2.15
-	PHP v5.6.14
-	Mysql v14.14

1.	Setup Apache, PHP and MySql at the specified versions
2.	Run the contained MySQL script named caDB.sql in MySQL in order to setup the database.
3.	Create a special account for the PHP scripts to use the database. Make sure the account only has permission to modify, insert and delete records from the game's database.
4.	Copy the files contained under 'private' into a private section of the server
5.	Copy the files in the 'public' section into the serving directory of Apache
6.	Modify the relative paths contained in 'login.php','logout.php' and 'performAction.php' in order to point towards the correct path for the private variable
7.	Configure SSL so that the game files and communications to the API are served over HTTPS, in order to protect data sent to the API, such as passwords and emails
8.	Configure the settings in the file caDB.ini to point towards the MySql server, give the username and password for the special PHP account and set the time zone for the local server

#####N.B.: Make sure the database is encrypted, secured with a strong password and only accessible by the server hosting the game. This is due to the database storing personal data of email, as well as the usernames and salted hashes of the player's passwords.
After the initial setup of the server, it is vital to keep up to date with the latest software vulnerabilities and update the server software regularly, in order to avoid running old software that can be exploited to retrieve user's data.
In order for the client to play, he only requires a modern browser, which supports ECMA script 6, and CSS animations. The recommended browser for playing is google chrome version 48 or newer.


text:
// Generated on 2015-03-07 using generator-angular 0.11.1
'use strict';

module.exports = function (grunt) {

  // Load grunt tasks automatically
  require('load-grunt-tasks')(grunt);

  // Time how long tasks take. Can help when optimizing build times
  require('time-grunt')(grunt);

  // Configurable paths for the application
  var appConfig = {
    app: require('./bower.json').appPath || 'src/main/webapp/app',
    dist: 'dist',
    uiTest: require('./bower.json').testPath || 'uiTest'
  };

  // Define the configuration for all the tasks
  grunt.initConfig({

    // Project settings
    angularTutorial: appConfig,

    // Make sure code styles are up to par and there are no obvious mistakes
    jshint: {
      options: {
        jshintrc: '.jshintrc',
        reporter: require('jshint-stylish')
      },
      all: {
        src: [
          'Gruntfile.js',
          '<%= angularTutorial.app %>/scripts/**/*.js'
        ]
      },
      test: {
        options: {
          jshintrc: '<%= angularTutorial.uiTest %>/.jshintrc'
        },
        src: ['<%= angularTutorial.uiTest %>/spec/**/*.js']
      }
    },

    // Empties folders to start fresh
    clean: {
      dist: {
        files: [{
          dot: true,
          src: [
            '.tmp',
            '<%= angularTutorial.dist %>/**/*',
            '!<%= angularTutorial.dist %>/.git**/*'
          ]
        }]
      },
      server: '.tmp'
    },

    // Renames files for browser caching purposes
    rev: {
      files: {
        src: [
          '<%= angularTutorial.dist %>/scripts/**/*.js',
          '<%= angularTutorial.dist %>/styles/**/*.css',
          '<%= angularTutorial.dist %>/images/**/*.{png,jpg,jpeg,gif,webp,svg}',
          '<%= angularTutorial.dist %>/styles/fonts/*'
        ]
      }
    },

    // Reads HTML for usemin blocks to enable smart builds that automatically
    // concat, minify and revision files. Creates configurations in memory so
    // additional tasks can operate on them
    useminPrepare: {
      html: '<%= angularTutorial.app %>/index.html',
      options: {
        dest: '<%= angularTutorial.dist %>',
        flow: {
          html: {
            steps: {
              js: ['concat', 'uglifyjs'],
              css: ['cssmin']
            },
            post: {}
          }
        }
      }
    },

    // Performs rewrites based on filerev and the useminPrepare configuration
    usemin: {
      html: ['<%= angularTutorial.dist %>/**/*.html'],
      css: ['<%= angularTutorial.dist %>/styles/**/*.css'],
      options: {
        assetsDirs: [
          '<%= angularTutorial.dist %>',
          '<%= angularTutorial.dist %>/images',
          '<%= angularTutorial.dist %>/styles'
        ]
      }
    },

    uglify: {
        options: {
        	sourceMap : true,
            report: 'min',
            mangle: true
        }
    },

    imagemin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= angularTutorial.app %>/images',
          src: '**/*.{png,jpg,jpeg,gif}',
          dest: '<%= angularTutorial.dist %>/images'
        }]
      }
    },

    svgmin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= angularTutorial.app %>/images',
          src: '**/*.svg',
          dest: '<%= angularTutorial.dist %>/images'
        }]
      }
    },

    htmlmin: {
      dist: {
        options: {
          collapseWhitespace: true,
          conservativeCollapse: true,
          collapseBooleanAttributes: true,
          removeCommentsFromCDATA: true,
          removeOptionalTags: true
        },
        files: [{
          expand: true,
          cwd: '<%= angularTutorial.dist %>',
          src: ['*.html', 'views/**/*.html'],
          dest: '<%= angularTutorial.dist %>'
        }]
      }
    },

    // ng-annotate tries to make the code safe for minification automatically
    // by using the Angular long form for dependency injection.
    ngAnnotate: {
      dist: {
        files: [{
          expand: true,
          cwd: '.tmp/concat/scripts',
          src: '*.js',
          dest: '.tmp/concat/scripts'
        }]
      }
    },

    // Copies remaining files to places other tasks can use
    copy: {
      dist: {
        files: [{
          expand: true,
          dot: true,
          cwd: '<%= angularTutorial.app %>',
          dest: '<%= angularTutorial.dist %>',
          src: [
            '*.{ico,png,txt}',
            '.htaccess',
            '*.html',
            'views/**/*.html',
            'images/**/*.{webp}',
            'styles/fonts/**/*.*'
          ]
        }, {
          expand: true,
          cwd: '.tmp/images',
          dest: '<%= angularTutorial.dist %>/images',
          src: ['generated/*']
        }, {
          expand: true,
          cwd: '<%= angularTutorial.app %>/bower_components/bootstrap/dist',
          src: 'fonts/*',
          dest: '<%= angularTutorial.dist %>'
        }]
      },
      styles: {
        expand: true,
        cwd: '<%= angularTutorial.app %>/styles',
        dest: '.tmp/styles/',
        src: '**/*.css'
      }
    },

    // Run some tasks in parallel to speed up the build process
    concurrent: {
      server: [
        'copy:styles'
      ],
      test: [
        'copy:styles'
      ],
      dist: [
        'copy:styles',
        'imagemin',
        'svgmin'
      ]
    },

    // Test settings
    karma: {
      unit: {
        configFile: '<%= angularTutorial.uiTest %>/karma.conf.js',
        singleRun: true
      }
    }
  });

  grunt.registerTask('test', [
    'clean:server',
    'concurrent:test',
    'karma'
  ]);

  grunt.registerTask('build', [
    'clean:dist',
    'useminPrepare',
    'concurrent:dist',
    'concat',
    'ngAnnotate',
    'copy:dist',
    'cssmin',
    'uglify',
    'rev',
    'usemin',
    'htmlmin'
  ]);

  grunt.registerTask('default', [
    'newer:jshint',
    'test',
    'build'
  ]);
};


text:
App.TenantsRoute = App.AuthenticatedRoute.extend({
    model: function () {
        return this.store.fetchAll('tenant');
    }
});

App.TenantsIndexRoute = App.AuthenticatedRoute.extend({
    model: function () {
        return this.modelFor('tenants');
    }
});

App.TenantsEnabledRoute = App.AuthenticatedRoute.extend({
    _applyFilter: function(tenant) {
        return tenant.get('enabled') === true;
    },
    model: function(){
        return this.store.filter('tenant', this._applyFilter);
    },
    renderTemplate: function(controller) {
        this.render('tenants/index', { controller: controller });
    }
});

App.TenantsDisabledRoute = App.AuthenticatedRoute.extend({
    _applyFilter: function(tenant) {
        return tenant.get('enabled') === false;
    },
    model: function(){
        return this.store.filter('tenant', this._applyFilter);
    },
    renderTemplate: function(controller) {
        this.render('tenants/index', { controller: controller });
    }
});

App.TenantsCreateRoute = App.AuthenticatedRoute.extend({
    model: function() {
      return this.store.createRecord('tenant', {
          enabled: true,
          created_at: new Date()
      });
    },
    setupController: function(controller, tenant) {
        controller.set('tenant', tenant);
        controller.set('recordSaved', false);
        controller.set('errorMessage', null);
        controller.send('reset');
    },
    actions: {
        willTransition: function(transition) {
            var recordSaved = this.controller.get('recordSaved');

            if (recordSaved === false) {
                if (!confirm("Are you sure you want to abandon progress?")) {
                    transition.abort();
                } else {
                    var tenant = this.get('currentModel');
                    tenant.deleteRecord();
                }
            }
        }
    }
});

App.TenantRoute = App.AuthenticatedRoute.extend({
    model: function (params) {
        return this.store.fetchById('tenant', params.tenant_id);
    }
});


text:
package org.smurve.hsr2014.repo;

public interface CustomUserRepository {
}


text:
#pragma once

#include "hal/lcd_types.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct esp_lcd_panel_io_t *esp_lcd_panel_io_handle_t; /*!< Type of LCD panel IO handle */
typedef struct esp_lcd_panel_t *esp_lcd_panel_handle_t;       /*!< Type of LCD panel handle */

/** @cond */
/**
 * @brief LCD color space type definition (WRONG!)
 * @deprecated RGB and BGR should belong to the same color space, but this enum take them both as two different color spaces.
 *             If you want to use a enum to describe a color space, please use lcd_color_space_t instead.
 */
typedef enum {
    ESP_LCD_COLOR_SPACE_RGB,        /*!< Color space: RGB */
    ESP_LCD_COLOR_SPACE_BGR,        /*!< Color space: BGR */
    ESP_LCD_COLOR_SPACE_MONOCHROME, /*!< Color space: monochrome */
} esp_lcd_color_space_t __attribute__((deprecated));

// Ensure binary compatibility with lcd_color_rgb_endian_t
_Static_assert((lcd_color_rgb_endian_t)ESP_LCD_COLOR_SPACE_RGB == LCD_RGB_ENDIAN_RGB, "ESP_LCD_COLOR_SPACE_RGB is not compatible with LCD_RGB_ENDIAN_RGB");
_Static_assert((lcd_color_rgb_endian_t)ESP_LCD_COLOR_SPACE_BGR == LCD_RGB_ENDIAN_BGR, "ESP_LCD_COLOR_SPACE_BGR is not compatible with LCD_RGB_ENDIAN_BGR");
/** @endcond */

#ifdef __cplusplus
}
#endif


text:
<?php

namespace BouncyCastleBundle\Controller;

use BouncyCastleBundle\Entity\Term;
use BouncyCastleBundle\Form\TermType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class TermsController extends Controller
{
    public function allTermsAction()
    {
        $em = $this->getDoctrine()->getManager();

        $terms = $em->getRepository('BouncyCastleBundle:Term')->findAll();

        return $this->render('BouncyCastleBundle:terms:term_listing.html.twig', array(
            'navbarItems' => $this->getNavbarItems(),
            'terms' => $terms,
        ));
    }

    private function getNavbarItems()
    {
        return $this->container
            ->get('bouncy_castle.navigation_bar_service')
            ->getNavBarItems();
    }

    public function allAction()
    {
        $em = $this->getDoctrine()->getManager();

        $entities = $em->getRepository('BouncyCastleBundle:Term')->findAll();

        $deleteForms = $this->createDeleteForms($entities);

        return $this->render('BouncyCastleBundle:terms:all.html.twig', array(
            'entities' => $entities,
            'delete_forms' => $deleteForms,
        ));
    }

    public function createAction(Request $request)
    {
        $entity = new Term();
        $form = $this->createCreateForm($entity);
        $form->handleRequest($request);

        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($entity);
            $em->flush();

            return $this->redirect($this->generateUrl('terms_all'));
        }

        return $this->render('BouncyCastleBundle:terms:new.html.twig', array(
            'entity' => $entity,
            'form' => $form->createView(),
        ));
    }

    private function createCreateForm(Term $entity)
    {
        $form = $this->createForm(new TermType(), $entity, array(
            'action' => $this->generateUrl('terms_create'),
            'method' => 'POST',
        ));

        $form->add('submit', 'submit', array('label' => 'Create', 'attr' => array('class' => 'btn btn-success')));

        return $form;
    }

    public function newAction()
    {
        $entity = new Term();
        $form = $this->createCreateForm($entity);

        return $this->render('BouncyCastleBundle:terms:new.html.twig', array(
            'entity' => $entity,
            'form' => $form->createView(),
        ));
    }

    public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('BouncyCastleBundle:Term')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find ProductCategory entity.');
        }

        $editForm = $this->createEditForm($entity);

        return $this->render('BouncyCastleBundle:terms:edit.html.twig', array(
            'entity' => $entity,
            'form' => $editForm->createView(),
        ));
    }

    private function createEditForm(Term $entity)
    {
        $form = $this->createForm(new TermType(), $entity, array(
            'action' => $this->generateUrl('terms_update', array('id' => $entity->getId())),
            'method' => 'PUT',
        ));

        $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-warning')));

        return $form;
    }

    public function updateAction(Request $request, $id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('BouncyCastleBundle:Term')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find ProductCategory entity.');
        }

        $deleteForm = $this->createDeleteForm($id);
        $editForm = $this->createEditForm($entity);
        $editForm->handleRequest($request);

        if ($editForm->isValid()) {
            $em->flush();

            return $this->redirect($this->generateUrl('terms_all'));
        }

        return $this->render('BouncyCastleBundle:terms:edit.html.twig', array(
            'entity' => $entity,
            'form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        ));
    }

    public function deleteAction(Request $request, $id)
    {
        $form = $this->createDeleteForm($id);
        $form->handleRequest($request);

        if ($form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $entity = $em->getRepository('BouncyCastleBundle:Term')->find($id);

            if (!$entity) {
                throw $this->createNotFoundException('Unable to find ProductCategory entity.');
            }

            $em->remove($entity);
            $em->flush();
        }

        return $this->redirect($this->generateUrl('terms_all'));
    }

    private function createDeleteForms(array $entities)
    {
        $deleteForms = array();
        /** @var Term $entity */
        foreach ($entities as $entity) {
            $deleteForm = $this->createDeleteForm($entity->getId());
            $deleteForms[$entity->getId()] = $deleteForm->createView();
        }

        return $deleteForms;
    }

    private function createDeleteForm($id)
    {
        return $this->createFormBuilder()
            ->setAction($this->generateUrl('terms_delete', array('id' => $id)))
            ->setMethod('DELETE')
            ->add('submit', 'submit', array('label' => 'Delete'))
            ->getForm();
    }
}