text:
package com.hopper.finagle
package apns

import protocol._
import com.twitter.util._
import com.twitter.concurrent.{Broker, Offer, Spool}
import com.twitter.finagle.{Service, ServiceFactory}
import com.twitter.finagle.service.RetryingService
import com.twitter.finagle.client._
import com.twitter.finagle.dispatch.GenSerialClientDispatcher
import com.twitter.finagle.netty3.{Netty3Transporter, Netty3TransporterTLSConfig}
import com.twitter.finagle.ssl.JSSE
import com.twitter.finagle.stats.{ClientStatsReceiver, StatsReceiver}
import com.twitter.finagle.transport.Transport
import java.security.KeyStore
import javax.net.ssl.{SSLContext, KeyManagerFactory}
import java.util.concurrent.atomic.AtomicInteger
import org.jboss.netty.channel.{Channels, ChannelPipelineFactory}
import org.jboss.netty.buffer.ChannelBuffer

sealed trait Alert

case class RichAlert(
  title: Option[String] = None,
  body: Option[String] = None,
  actionLocKey: Option[String] = None,
  locKey: Option[String] = None,
  locArgs: Seq[String] = Seq.empty,
  launchImage: Option[String] = None
) extends Alert

case class SimpleAlert(alert: String) extends Alert

case class Payload(alert: Option[Alert] = None, badge: Option[Int] = None, sound: Option[String] = None, contentAvailable: Boolean = false, custom: Map[String, Any] = Map.empty)

case class Notification(token: Array[Byte], payload: Payload)

sealed trait RejectionCode

object RejectionCode {
  def unapply(byte: Byte): Option[RejectionCode] = {
    byte match {
      case 0x00 => Some(NoErrorsEncountered)
      case 0x01 => Some(ProcessingError)
      case 0x02 => Some(MissingDeviceToken)
      case 0x03 => Some(MissingTopic)
      case 0x04 => Some(MissingPayload)
      case 0x05 => Some(InvalidTokenSize)
      case 0x06 => Some(InvalidTopicSize)
      case 0x07 => Some(InvalidPayloadSize)
      case 0x08 => Some(InvalidToken)
      case 0x0A => Some(Shutdown)
      case 0xFF => Some(Unknown)
      case _ => None
    }
  }
}

case object NoErrorsEncountered extends RejectionCode
case object ProcessingError extends RejectionCode
case object MissingDeviceToken extends RejectionCode
case object MissingTopic extends RejectionCode
case object MissingPayload extends RejectionCode
case object InvalidTokenSize extends RejectionCode
case object InvalidTopicSize extends RejectionCode
case object InvalidPayloadSize extends RejectionCode
case object InvalidToken extends RejectionCode
case object Shutdown extends RejectionCode
case object Unknown extends RejectionCode

/**
 * Holds a rejected notification and all subsequent notifications that were sent.
 *
 * Depending on the client's buffer size, it's possible that the failed notification is no longer available.
 *
 * Note that when APNS rejects a notification, all subsequent notifications sent on the same connection are considered failed.
 */
case class Rejection(code: RejectionCode, rejected: Option[Notification], resent: Seq[Notification])

case class Feedback(timestamp: Int, token: Array[Byte])

trait ApnsEnvironment {
  val pushHostname: String

  val feedbackHostname: String

  def sslContext(): Option[SSLContext]

  def tlsConfig(hostname: String) = {
    sslContext.map { ssl =>
      Netty3TransporterTLSConfig(
        newEngine = _ => JSSE.client(ssl),
        verifyHost = Some(hostname.split(":").head))
    }
  }
}

object ApnsEnvironment {

  def apply(ph: String, fh: String, ctx: Option[SSLContext]): ApnsEnvironment = {
    new ApnsEnvironment {
      val pushHostname = ph
      val feedbackHostname = fh
      def sslContext = ctx
    }
  }

  def apply(ph: String, fh: String, keystore: KeyStore, password: Array[Char]): ApnsEnvironment = {
    apply(ph, fh, Some(sslContext(keystore, password)))
  }

  def sslContext(keystore: KeyStore, password: Array[Char]) = {
    val keyManagerFactory = KeyManagerFactory.getInstance("SunX509")
    keyManagerFactory.init(keystore, password)
    val sslContext = SSLContext.getInstance("TLS")
    sslContext.init(keyManagerFactory.getKeyManagers(), null, null)
    sslContext
  }

  def Production(keystore: KeyStore, password: Array[Char]): ApnsEnvironment = {
    Production(sslContext(keystore, password))
  }

  def Production(ctx: SSLContext) = {
    apply("gateway.push.apple.com:2195", "feedback.push.apple.com:2196", Some(ctx))
  }

  def Sandbox(keystore: KeyStore, password: Array[Char]): ApnsEnvironment = {
    Sandbox(sslContext(keystore, password))
  }

  def Sandbox(ctx: SSLContext) = {
    apply("gateway.sandbox.push.apple.com:2195", "feedback.sandbox.push.apple.com:2196", Some(ctx))
  }

}

private[apns] object PipelineFactory extends ChannelPipelineFactory {
  def getPipeline = Channels.pipeline()
}

private[apns] class NettyTransport(name: String, tls: Option[Netty3TransporterTLSConfig], tcpConnectTimeout: Duration) extends Netty3Transporter[ChannelBuffer, ChannelBuffer](
  name = name,
  pipelineFactory = PipelineFactory,
  tlsConfig = tls,
  channelOptions = Netty3Transporter.defaultChannelOptions ++ Map("connectTimeoutMillis" -> (tcpConnectTimeout.inMillis: java.lang.Long)) // TODO: Use StackClient
)

class ApnsPushClient(
  env: ApnsEnvironment,
  bufferSize: Int,
  tcpConnectTimeout: Duration,
  private val broker: Broker[Rejection] = new Broker[Rejection]
) extends DefaultClient[Notification, Unit](
  name = "apns-push",
  endpointer = Bridge[SeqNotification, SeqRejection, Notification, Unit](
    new NettyTransport("apns-push", env.tlsConfig(env.pushHostname), tcpConnectTimeout)(_, _) map { ApnsPushTransport(_) }, new ApnsPushDispatcher(broker, bufferSize, _)
  ),
  pool = DefaultPool()
) {

  val rejectionOffer = broker.recv

  def newClient() = {
    super.newClient(env.pushHostname)
  }
}

class ApnsPushDispatcher(broker: Broker[Rejection], bufferSize: Int, trans: Transport[SeqNotification, SeqRejection])
extends GenSerialClientDispatcher[Notification, Unit, SeqNotification, SeqRejection](trans) {

  private[this] val seq = new AtomicInteger(0)
  private[this] val notifications = new RingBuffer[SeqNotification](bufferSize)

  for {
    (rejectedId, code) <- trans.read
    _ <- trans.close
  } yield {
    notifications.synchronized {
      val rejected = notifications.find(_._1 == rejectedId).map(_._2)
      val fails = notifications.collect { case (id, n) if (id > rejectedId) => n }
      broker ! Rejection(code, rejected, fails)
    }
  }

  import GenSerialClientDispatcher.wrapWriteException

  override protected def dispatch(req: Notification, p: Promise[Unit]): Future[Unit] = {
    val seqNotification = seq.incrementAndGet -> req
    trans.write(seqNotification) rescue(
      wrapWriteException
    ) respond {
      p.updateIfEmpty(_)
    }
  }

}

class ApnsFeedbackClient(
  env: ApnsEnvironment,
  tcpConnectTimeout: Duration
) extends DefaultClient[Unit, Spool[Feedback]](
  name = "apns-feedback",
  endpointer = Bridge[Unit, Spool[Feedback], Unit, Spool[Feedback]](
    new NettyTransport("apns-feedback", env.tlsConfig(env.feedbackHostname), tcpConnectTimeout)(_, _) map { ApnsFeedbackTransport(_) }, new ApnsFeedbackDispatcher(_)
  ),
  pool = DefaultPool(low = 0, high = 1)
) {

  def newClient() = {
    super.newClient(env.feedbackHostname)
  }
}

class ApnsFeedbackDispatcher(trans: Transport[Unit, Spool[Feedback]]) extends Service[Unit, Spool[Feedback]] {
  def apply(unit: Unit) = {
    trans.read
  }
}

class Client(rejectedOffer: Offer[Rejection], push: ServiceFactory[Notification, Unit], feedback: ServiceFactory[Unit, Spool[Feedback]], stats: StatsReceiver = ClientStatsReceiver) extends Service[Notification, Unit] {

  private[this] val clientBroker = new Broker[Rejection]

  private[this] val rejected = stats.scope("rejected")
  private[this] val resent = stats.counter("resent")

  rejectedOffer.foreach { case r@Rejection(code, _, failed) =>
      rejected.counter(code.toString).incr
      resent.incr(failed.size)
      // TODO: any of these may fail, clients have no way of seeing these failures right now.
      // Reconsider resending automatically, or return a Seq[Future[Unit]]
      Future.collect(failed.map(apply(_)).toList)
        .flatMap { _ => clientBroker ! r }
    }

  val rejectedNotifications: Offer[Rejection] = clientBroker.recv

  // Apply a RetryingService to retry WriteExceptions (mostly for connection timeouts)
  private[this] val pushService = RetryingService.tries(5, stats) andThen push.toService
  private[this] val feedbackService = feedback.toService

  def apply(notification: Notification) = {
    pushService(notification)
  }

  def fetchFeedback(): Future[Spool[Feedback]] = {
    feedbackService()
  }

  override def close(deadline: Time) = {
    Closable.all(push, feedback).close(deadline)
  }

}


text:
from support import MMTestCase
from mind_mapper import Base

class FakeBase(Base):

    def __init__(self, output, input_):
        super(FakeBase, self).__init__()
        self.output_xml = output
        self.input_xml = input_

class Functional(MMTestCase):

    def _check_load(self, base):
        # TODO: implement
        pass

    def _check_save(self, file):
        # TODO: implement
        pass

    def test_load(self):
        base = FakeBase("", self.project_dir + "/load.xml")
        base.load()
        self._check_load(base)

    def test_save(self):
        base = FakeBase(self.project_dir + "/save.xml", "")
        base.save()
        self._check_save(self.project_dir + "/save.xml")

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>

<recipeml version="0.5">
  <recipe>
    <head>
      <title>Basic Steamed Beef</title>
      <categories>
        <cat>Meat</cat></categories>
      <yield>4</yield></head>
    <ingredients>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>pound</unit></amt>
        <item>Lean beef</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit/></amt>
        <item>Scallion stalks</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>slice</unit></amt>
        <item>Fresh ginger root</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>teaspoon</unit></amt>
        <item>Cornstarch</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>tablespoon</unit></amt>
        <item>Soy sauce</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>tablespoon</unit></amt>
        <item>Sherry</item></ing>
      <ing>
        <amt>
          <qty>1/2</qty>
          <unit>teaspoons</unit></amt>
        <item>Salt</item></ing>
      <ing>
        <amt>
          <qty>1/2</qty>
          <unit>teaspoons</unit></amt>
        <item>Sugar</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>teaspoon</unit></amt>
        <item>Peanut oil</item></ing>
      <ing>
        <amt>
          <qty/>
          <unit/></amt>
        <item>Chinese parsley</item></ing></ingredients>
    <directions>
      <step>  1. Cut beef in 1/4-inch slices. Mince scallion stalks.

  2. Mince ginger. Combine with cornstarch, soy sauce, sherry, salt and
  sugar, mixing well. Add to beef slices and toss gently to coat. Let stand
  15 minutes, turning occasionally.

  3. Arrange beef slices in shallow heatproof dish. With a circular motion,
  sprinkle oil and minced scallions over the top.

  4. Steam on a rack until done (30 to 40 minutes). See "HOW-TO SECTION".

  5. Mince Chinese parsley. Serve beef in its heatproof dish, with parsley
  sprinkled over. VARIATIONS:

     In step 1, sliver the beef or cut in julienne strips and steam 25 to 30
  minutes; or mince or grind the beef and steam about 15 minutes.

     In step 3, top beef with any of the following: CLOUD EAR MUSHROOMS: 2
  tablespoons cloud ear mushrooms and 1 piece tangerine peel, both soaked and
  slivered. (For the peanut oil, substitute a few drops of sesame oil.) DRIED
  BLACK MUSHROOMS: 4 dried black mushrooms (soaked), slivered; and either 8
  to 10 Water chestnuts, sliced thin, or 1/2 cup pickles, shredded. PICKLED
  BAMBOO SHOOTS: 1/2 cup pickled bamboo shoots. (Cut beef in julienne
  strips.) PRESERVED GABBAGE: 1/2 to 1 Cup preserved cabbage, minced. SALTED
  GABBAGE: 1/2 cup dried salted cabbage (soaked), sliced thin. TEA MELON: 8
  tea melons, washed and sliced. (You may also add 1/2 bundle preserved
  turnips, washed and chopped coarsely.)

  From <The Thousand Recipe Chinese Cookbook>, ISBN 0-517-65870-4. Downloaded
  from Glen's MM Recipe Archive, http://www.erols.com/hosey.

</step></directions></recipe></recipeml>


text:
namespace Atomiv.Infrastructure.MediatR
{
    public interface IMediatorRequest<TResponse> : global::MediatR.IRequest<TResponse>
    {
    }

    /*
    public interface IMediatorRequest<TRequest, TResponse> : IMediatorRequest<TResponse>
    {
        TRequest Request { get; set; }
    }
    */
}


text:
#include <aws/managedblockchain/model/CreateMemberResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::ManagedBlockchain::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

CreateMemberResult::CreateMemberResult()
{
}

CreateMemberResult::CreateMemberResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

CreateMemberResult& CreateMemberResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  JsonView jsonValue = result.GetPayload().View();
  if(jsonValue.ValueExists("MemberId"))
  {
    m_memberId = jsonValue.GetString("MemberId");

  }

  return *this;
}


text:
package stroom.cache.impl;

import stroom.cache.api.LoadingStroomCache;
import stroom.util.cache.CacheConfig;
import stroom.util.logging.LambdaLogger;
import stroom.util.logging.LambdaLoggerFactory;

import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;

import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import java.util.function.Supplier;

class LoadingStroomCacheImpl<K, V> extends AbstractStroomCache<K, V> implements LoadingStroomCache<K, V> {

    private static final LambdaLogger LOGGER = LambdaLoggerFactory.getLogger(LoadingStroomCacheImpl.class);

    private final Function<K, V> loadFunction;

    public LoadingStroomCacheImpl(final String name,
                                  final Supplier<CacheConfig> cacheConfigSupplier,
                                  final Function<K, V> loadFunction,
                                  final BiConsumer<K, V> removalNotificationConsumer) {
        super(name, cacheConfigSupplier, removalNotificationConsumer);
        Objects.requireNonNull(loadFunction);
        this.loadFunction = loadFunction;
        rebuild();
    }

    public LoadingStroomCacheImpl(final String name,
                                  final Supplier<CacheConfig> cacheConfigSupplier,
                                  final Function<K, V> loadFunction) {
        this(name, cacheConfigSupplier, loadFunction, null);
    }

    @Override
    Cache<K, V> createCacheFromBuilder(final Caffeine<K, V> cacheBuilder) {
        return cacheBuilder.build(loadFunction::apply);
    }

    @Override
    public V get(final K key) {
        return ((LoadingCache<K, V>) super.cache).get(key);
    }

    @Override
    public Optional<V> getOptional(final K key) {
        return Optional.ofNullable(((LoadingCache<K, V>) super.cache).get(key));
    }

    @Override
    public Optional<V> getIfPresent(final K key) {
        LOGGER.trace(() -> buildMessage("getIfPresent", key));
        return Optional.ofNullable(getWithCacheUnderOptimisticReadLock(cache ->
                cache.getIfPresent(key)));
    }
}


text:
<!DOCTYPE html>

    <meta charset=utf-8>
    <title>Icello.Button tests</title>
    <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />

Icello.Button tests

test markup, will be hidden

	<button id="btnDisabled" disabled="disabled">Disabled from html</button>
    <button id="btnWithTitle" title="My Title">Title Btn</button>
    <button class="btn-with-no-attrs">Button with no attributes defined</button>
    <button id="btnLabelOnly">Button label only</button>
    <button id="btnIconOnlyAlert" data-icon="alert"></button>
    <button id="btnIconWithLabelCancel" data-icon="cancel">Cancel</button>


text:
#include "imagecontroller.h"

ImageController::ImageController()
{
//    QStringList goodImageList = new QStringList();
//    QStringList badImageList = new QStringList();
    this->settings = new QSettings();
}

void ImageController::loadDir(QString dir)
{
    this->currentDir = new QDir();
    this->currentDir->cd(dir);
    this->getImageList();
    //Clear good and bad image lists
    this->goodImageList.clear();
    this->badImageList.clear();
    //Set first image
    this->currentImagePath = this->imageList.first();
    this->currentDirAbsolutePath =  this->currentDir->absolutePath() + "\\";

}

QString ImageController::getCurrentDir()
{
    return this->currentDir->absolutePath();
}

Magick::Image* ImageController::toImage(QImage* qimage)
{
    qDebug() << "toImage:" << qimage->width() << qimage->height();

    Magick::Image *newImage = new Magick::Image(Magick::Geometry(qimage->width(), qimage->height()), Magick::ColorRGB(0.5, 0.2, 0.3));

    double scale = 1 / 256.0;
    newImage->modifyImage();
    Magick::PixelPacket *pixels;
    Magick::ColorRGB mgc;
    for (int y = 0; y < qimage->height(); y++) {
        pixels = newImage->setPixels(0, y, newImage->columns(), 1);
        for (int x = 0; x < qimage->width(); x++) {
            QColor pix = qimage->pixel(x, y);
            //      *pixels++ = Magick::ColorRGB(256 * pix.red(), 256 * pix.green(), 256 * pix.blue());
            mgc.red(scale *pix.red());
            mgc.green(scale *pix.green());
            mgc.blue(scale *pix.blue());
            //      *pixels++ = Magick::ColorRGB(scale *pix.red(), scale * pix.green(), scale * pix.blue());
            *pixels++ = mgc;
        }
        newImage->syncPixels();
    }

    return newImage;
}

QImage* ImageController::toQImage(Magick::Image *image)
{
    qDebug() << "toQImage:" << image->columns() << image->rows();

    QImage *newQImage = new QImage(image->columns(), image->rows(), QImage::Format_RGB32);
    const Magick::PixelPacket *pixels;
    Magick::ColorRGB rgb;
    for (int y = 0; y < newQImage->height(); y++) {
        pixels = image->getConstPixels(0, y, newQImage->width(), 1);
        for (int x = 0; x < newQImage->width(); x++) {
            rgb = (*(pixels + x));
            newQImage->setPixel(x, y, QColor((int) (255 * rgb.red())
                                             , (int) (255 * rgb.green())
                                             , (int) (255 * rgb.blue())).rgb());
        }
    }
    return newQImage;
}

QStringList ImageController::getImageList()
{
    QStringList imageFilters;
    //filter out images only
    imageFilters << "*.png" << "*.jpg" << "*.jpeg" << "*.bmp";
    this->imageList = this->currentDir->entryList(imageFilters, QDir::Files|QDir::Readable,QDir::Name);
    //TODO Something if folder has no images
    this->currentImageKey = 0;
    this->imageListSize = this->imageList.size();
    return this->imageList;
}

QString ImageController::getCurrentImagePath()
{
   return this->currentDir->absolutePath() + QDir::separator() + this->currentImagePath;
}

QString ImageController::getCurrentImageName()
{
    return this->imageList.at(this->currentImageKey);
}

void ImageController::nextImage()
{
    if((this->currentImageKey+1) == this->imageListSize)
    {
        //do nothing if its the last image
    } else {
        this->currentImageKey++;
        this->currentImagePath = this->imageList.at(this->currentImageKey);
    }
}

void ImageController::previousImage()
{
    if(this->currentImageKey == 0)
    {
        //do nothing if its the first image
    } else {
        this->currentImageKey--;
        this->currentImagePath = this->imageList.at(this->currentImageKey);
    }
}

int ImageController::getCurrentImageNumber()
{
    return this->currentImageKey;
}

int ImageController::getImageListSize()
{
    return this->imageListSize;
}

void ImageController::toggleBad()
{
    if (!this->badImageList.contains(this->currentImagePath))
    {
        this->badImageList.append(this->currentImagePath);
    } else {
        //remove
        this->badImageList.removeAll(this->currentImagePath);
    }
}

void ImageController::toggleGood()
{
    if (!this->goodImageList.contains(this->currentImagePath))
    {
        this->goodImageList.append(this->currentImagePath);
    } else {
        //remove
        this->goodImageList.removeAll(this->currentImagePath);
    }
}

QStringList ImageController::getGoodImageList()
{
    return this->goodImageList;
}

QStringList ImageController::getBadImageList()
{
    return this->badImageList;
}

bool ImageController::isCurrentImageBad()
{
    if(this->badImageList.contains(this->currentImagePath))
    {
        return true;
    }
    return false;
}

bool ImageController::isCurrentImageGood()
{
    if(this->goodImageList.contains(this->currentImagePath))
    {
        return true;
    }
    return false;
}

int ImageController::doCopyGoodImages()
{
    if(this->goodImageList.size() != 0)
    {
        //create directory (make sure it exists)
        QString goodDirName = this->settings->value("dir/nameGood", "good").toString();
        this->currentDir->mkdir(goodDirName);
        QString sourcepath = this->currentDirAbsolutePath;
        int i=0;
        for(i=0;i<this->goodImageList.size();i++)
        {
            QFile::copy(sourcepath + this->goodImageList.at(i), sourcepath + goodDirName + "/"+this->goodImageList.at(i));
        }
        return i;
    } else {
        return 0;
    }

}

int ImageController::doCopyBadImages()
{
    if(this->badImageList.size() != 0)
    {
        //create directory (make sure it exists)
        QString badDirName = this->settings->value("dir/nameBad", "bad").toString();
        this->currentDir->mkdir(badDirName);
        QString sourcepath = this->currentDirAbsolutePath;
        int j=0;
        for(j=0;j<this->badImageList.size();j++)
        {
            QFile::copy(sourcepath + this->badImageList.at(j), sourcepath + badDirName + "/"+this->badImageList.at(j));
        }
        return j;
    } else {
        return 0;
    }

}

void ImageController::doMakeThumbs()
{
    if(this->goodImageList.size() != 0)
    {

        using namespace Magick;
        Image source;
        Image thumb;
        QString thumbsDirName = this->settings->value("dir/nameThumbs", "thumbs").toString();
        //Make the directory

        this->currentDir->mkdir(thumbsDirName);
        QString sourcepath = this->currentDirAbsolutePath;
        //TODO Refactor into separate function
        int k=0;
        int j=0;
        for(k=0;k<this->goodImageList.size();k++)
        {
            try {
                // Read a file into image object
                source.read(sourcepath.toStdString() + this->goodImageList.at(k).toStdString());

                //Split filename
                QString inFile = this->goodImageList.at(k);
                //TODO fix this for files with multiple dots
                QString outFilename = inFile.split(".").at(0) + "_thumb_";
                QString outExtension = inFile.split(".").last();
                //Generate thumbs in different sizes
                //List of sizes
                QStringList thumbSizes;
                thumbSizes << "320x240" << "640x480" << "800x600" << "1280x720";
                //Create folders
                QString thumbsDirName = this->settings->value("dir/nameThumbs", "thumbs").toString();
                this->currentDir->cd(thumbsDirName);
                foreach (QString size, thumbSizes) {
                    this->currentDir->mkdir(size);
                }
                this->currentDir->cdUp();
                //Generate thumbs
                foreach (QString size, thumbSizes) {
                    thumb = source;
                    // Resize image to specified size
                    thumb.thumbnail( Geometry(size.split("x").first().toInt(),size.split("x").last().toInt()) );
                    QString outFilename2 = outFilename+ size +"."+outExtension;
                    QString outPath = sourcepath + thumbsDirName + "/"+size+"/"+outFilename2;
                    // Write the image to a file
                    thumb.write( outPath.toStdString());
                    //update window
                    j++;
                    emit this->thumbsCountUpdated(j, outFilename2);
                }
            }
            catch( Exception &error_ )
            {
                qDebug() << "Caught exception: " << error_.what();
            }
        }
    } else {
        //do nothing, no files to generate thumbs for
    }
}

void ImageController::doGenerateAlbum()
{
    /*
    if(this->goodImageList.size() != 0)
    {

        using namespace Magick;
        Image source;
        Image thumb;
        QString sourcepath = this->currentDirAbsolutePath;
        //TODO Refactor into separate function
        for(k=0;k<this->goodImageList.size();k++)
        {
            try {
                // Read a file into image object
                source.read(sourcepath.toStdString() + this->goodImageList.at(k).toStdString());

                //Split filename
                QString inFile = this->goodImageList.at(k);
                //TODO fix this for files with multiple dots
                QString outFilename = inFile.split(".").at(0) + "_thumb_";
                QString outExtension = inFile.split(".").last();
                //Generate thumbs in different sizes
                //List of sizes
                QStringList thumbSizes;
                thumbSizes << "320x240" << "640x480" << "800x600" << "1280x720";
                //Create folders
                QString thumbsDirName = this->settings->value("dir/nameThumbs", "thumbs").toString();
                this->currentDir->cd(thumbsDirName);
                foreach (QString size, thumbSizes) {
                    this->currentDir->mkdir(size);
                }
                this->currentDir->cdUp();
                //Generate thumbs
                foreach (QString size, thumbSizes) {
                    thumb = source;
                    // Resize image to specified size
                    thumb.thumbnail( Geometry(size.split("x").first().toInt(),size.split("x").last().toInt()) );
                    QString outFilename2 = outFilename+ size +"."+outExtension;
                    QString outPath = sourcepath + thumbsDirName + "/"+size+"/"+outFilename2;
                    // Write the image to a file
                    thumb.write( outPath.toStdString());
                    //update window
                    j++;
                    emit this->thumbsCountUpdated(j, outFilename2);
                }
            }
            catch( Exception &error_ )
            {
                qDebug() << "Caught exception: " << error_.what();
            }
        }
    } else {
        //do nothing, no files to generate thumbs for
    }
    */
}

void ImageController::doMakeThumbsAsync()
{
    QtConcurrent::run(this, &ImageController::doMakeThumbs);
}

void ImageController::doGenerateImagesWithWatermark()
{
    if(this->goodImageList.size() != 0)
    {

        using namespace Magick;
        Image source;
        QString watermarkDirName = this->settings->value("dir/nameWatermark", "watermarked").toString();
        //Make the directory

        this->currentDir->mkdir(watermarkDirName);
        QString sourcepath = this->currentDirAbsolutePath;
        //Load watermark image
        //QImage qimage(":/images/watermark.png");
        //Generate watermarks
        Image watermark;
        watermark.read(sourcepath.toStdString() + "watermark.png");
        //watermark= this->toImage(&qimage);
        //TODO Refactor into separate function
        int k=0;
        for(k=0;k<this->goodImageList.size();k++)
        {
            try {
                // Read a file into image object
                source.read(sourcepath.toStdString() + this->goodImageList.at(k).toStdString());

                //Split filename
                QString inFile = this->goodImageList.at(k);
                //TODO fix this for files with multiple dots
                QString outFilename = inFile.split(".").at(0) + "_watermark";
                QString outExtension = inFile.split(".").last();

                //source.artifact("compose:args", "25%");
                source.composite(watermark, GravityType::SouthEastGravity, CompositeOperator::DissolveCompositeOp);
                //source.gaussianBlur(5,10);

                QString outFilename2 = outFilename +"."+outExtension;
                QString outPath = sourcepath + watermarkDirName + "/" + outFilename2;
                // Write the image to a file
                source.write(outPath.toStdString());
                //update window
                //TODO Add signal
                //emit this->thumbsCountUpdated(k, outFilename2);
            }
            catch( Exception &error_ )
            {
                qDebug() << "Caught exception: " << error_.what();
            }
        }
    } else {
        //do nothing, no files to generate thumbs for
    }
}

void ImageController::doGenerateImagesWithWatermarkAsync()
{
    QtConcurrent::run(this, &ImageController::doGenerateImagesWithWatermark);
}


text:
using namespace dariadb;
using namespace dariadb::storage;

namespace po = boost::program_options;

std::string storage_path = "dariadb_storage";
unsigned short server_port = 2001;
size_t server_threads_count = dariadb::net::SERVER_IO_THREADS_DEFAULT;
STRATEGY strategy = STRATEGY::COMPRESSED;
ServerLogger::Params p;
size_t memory_limit = 0;
bool force_unlock_storage = false;

int main(int argc, char **argv) {
  po::options_description desc("Allowed options");
  auto aos = desc.add_options();
  aos("help", "produce help message");
  aos("readonly", "readonly mode");
  aos("force-unlock", "force unlock storage.");
  aos("log-to-file", "logger out to dariadb.log.");
  aos("color-log", "use colors to log to console.");
  aos("dbg-log", "verbose logging.");
  aos("storage-path", po::value<std::string>(&storage_path)->default_value(storage_path),
      "path to storage.");
  aos("port", po::value<unsigned short>(&server_port)->default_value(server_port),
      "server port.");
  aos("io-threads",
      po::value<size_t>(&server_threads_count)->default_value(server_threads_count),
      "server threads for query processing.");
  aos("strategy", po::value<STRATEGY>(&strategy)->default_value(strategy),
      "write strategy.");
  aos("memory-limit", po::value<size_t>(&memory_limit)->default_value(memory_limit),
      "allocation area limit  in megabytes when strategy=MEMORY");

  po::variables_map vm;
  try {
    po::store(po::parse_command_line(argc, argv, desc), vm);
  } catch (std::exception &ex) {
    dariadb::logger("Error: ", ex.what());
    exit(1);
  }
  po::notify(vm);

  if (vm.count("help")) {
    std::cout << desc << std::endl;
    std::exit(0);
  }

  if (vm.count("log-to-file")) {
    p.use_stdout = false;
  }

  if (vm.count("color-log")) {
    p.color_console = true;
  }

  if (vm.count("dbg-log")) {
    p.dbg_logging = true;
  }

  if (vm.count("force-unlock")) {
    dariadb::logger_info("Force unlock storage.");
    force_unlock_storage = true;
  }

  dariadb::utils::ILogger_ptr log_ptr{new ServerLogger(p)};
  dariadb::utils::LogManager::start(log_ptr);

  std::stringstream ss;
  ss << "cmdline: ";
  for (int i = 0; i < argc; ++i) {
    ss << argv[i] << " ";
  }

  log_ptr->message(dariadb::utils::LOG_MESSAGE_KIND::INFO, ss.str());
  auto settings = dariadb::storage::Settings::create(storage_path);
  settings->strategy.setValue(strategy);
  if (strategy == STRATEGY::MEMORY && memory_limit != 0) {
    logger_info("memory limit: ", memory_limit);
    settings->memory_limit.setValue(memory_limit * 1024 * 1024);
  }
  settings->save();

  auto stor = new Engine(settings, force_unlock_storage);

  dariadb::net::Server::Param server_param(server_port, server_threads_count);
  dariadb::net::Server s(server_param);
  s.set_storage(stor);

  s.start();

  while (!s.is_runned()) {
  }

  while (s.is_runned()) {
    s.asio_run();
  }
  delete stor;
}


text:
package com.javarush.task.task15.task1516;

/*
Значения по умолчанию
*/

public class Solution {
     int intVar;
     double doubleVar;
     Double DoubleVar;
     boolean booleanVar;
     Object ObjectVar;
     Exception ExceptionVar;
     String StringVar;

    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.intVar);
        System.out.println(solution.doubleVar);
        System.out.println(solution.DoubleVar);
        System.out.println(solution.booleanVar);
        System.out.println(solution.ObjectVar);
        System.out.println(solution.ExceptionVar);
        System.out.println(solution.StringVar);
    }
}


text:
package client

const (
	TokenType                 = "token"
	TokenFieldAnnotations     = "annotations"
	TokenFieldAuthProvider    = "authProvider"
	TokenFieldClusterID       = "clusterId"
	TokenFieldCreated         = "created"
	TokenFieldCreatorID       = "creatorId"
	TokenFieldCurrent         = "current"
	TokenFieldDescription     = "description"
	TokenFieldEnabled         = "enabled"
	TokenFieldExpired         = "expired"
	TokenFieldExpiresAt       = "expiresAt"
	TokenFieldGroupPrincipals = "groupPrincipals"
	TokenFieldIsDerived       = "isDerived"
	TokenFieldLabels          = "labels"
	TokenFieldLastUpdateTime  = "lastUpdateTime"
	TokenFieldName            = "name"
	TokenFieldOwnerReferences = "ownerReferences"
	TokenFieldProviderInfo    = "providerInfo"
	TokenFieldRemoved         = "removed"
	TokenFieldTTLMillis       = "ttl"
	TokenFieldToken           = "token"
	TokenFieldUUID            = "uuid"
	TokenFieldUserID          = "userId"
	TokenFieldUserPrincipal   = "userPrincipal"
)

type Token struct {
	Annotations     map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
	AuthProvider    string            `json:"authProvider,omitempty" yaml:"authProvider,omitempty"`
	ClusterID       string            `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
	Created         string            `json:"created,omitempty" yaml:"created,omitempty"`
	CreatorID       string            `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
	Current         bool              `json:"current,omitempty" yaml:"current,omitempty"`
	Description     string            `json:"description,omitempty" yaml:"description,omitempty"`
	Enabled         *bool             `json:"enabled,omitempty" yaml:"enabled,omitempty"`
	Expired         bool              `json:"expired,omitempty" yaml:"expired,omitempty"`
	ExpiresAt       string            `json:"expiresAt,omitempty" yaml:"expiresAt,omitempty"`
	GroupPrincipals []string          `json:"groupPrincipals,omitempty" yaml:"groupPrincipals,omitempty"`
	IsDerived       bool              `json:"isDerived,omitempty" yaml:"isDerived,omitempty"`
	Labels          map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
	LastUpdateTime  string            `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"`
	Name            string            `json:"name,omitempty" yaml:"name,omitempty"`
	OwnerReferences []OwnerReference  `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
	ProviderInfo    map[string]string `json:"providerInfo,omitempty" yaml:"providerInfo,omitempty"`
	Removed         string            `json:"removed,omitempty" yaml:"removed,omitempty"`
	TTLMillis       int64             `json:"ttl,omitempty" yaml:"ttl,omitempty"`
	Token           string            `json:"token,omitempty" yaml:"token,omitempty"`
	UUID            string            `json:"uuid,omitempty" yaml:"uuid,omitempty"`
	UserID          string            `json:"userId,omitempty" yaml:"userId,omitempty"`
	UserPrincipal   string            `json:"userPrincipal,omitempty" yaml:"userPrincipal,omitempty"`
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"
              android:padding="5dp">

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/milstd_modifier_apply"
        android:text="Apply"/>
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Affiliation"/>
                <!-- affiliations -->
                <RadioGroup
                    android:id="@+id/milstd_search_affil"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/milstd_search"
                    android:orientation="horizontal">

                    <RadioButton
                        android:id="@+id/milstd_search_affil_f"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:checked="true"
                        android:text="F"/>

                    <RadioButton
                        android:id="@+id/milstd_search_affil_h"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="H"/>

                    <RadioButton
                        android:id="@+id/milstd_search_affil_n"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="N"/>

                    <RadioButton
                        android:id="@+id/milstd_search_affil_u"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="U"/>

                </RadioGroup>

            </LinearLayout>
<!-- echelon -->

            <LinearLayout

                android:id="@+id/milstdspinner1"
                android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Echelon 1"/>

                <Spinner
                    android:id="@+id/echelon1"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/milstdspinner2"
                android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Echelon 2"/>

                <Spinner
                    android:id="@+id/echelon2"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/COUNTRY_CODE" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Country Code"/>

                <EditText
                    android:id="@+id/COUNTRY_edit"
                    android:maxLength="2"
                    android:maxLines="1"
                    android:textAllCaps="true"
                    android:inputType="text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/T_UNIQUE_DESIGNATION_1" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Unique Designation1"/>

                <EditText
                    android:id="@+id/T_UNIQUE_DESIGNATION_1_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:visibility="gone"
                android:id="@+id/T1_UNIQUE_DESIGNATION_2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Unique Designation2"/>

                <EditText
                    android:id="@+id/T1_UNIQUE_DESIGNATION_2_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/N_HOSTILE" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Hostile"/>

                <EditText
                    android:id="@+id/N_HOSTILE_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/W_DTG_1" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="DTG"/>

                <EditText
                    android:id="@+id/W_DTG_1_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="datetime"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/W1_DTG_2" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="DTG2"/>

                <EditText
                    android:id="@+id/W1_DTG_2_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="datetime"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/LENGTH" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="LENGTH"/>

                <EditText
                    android:id="@+id/LENGTH_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/RADIUS" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="RADIUS"/>

                <EditText
                    android:id="@+id/RADIUS_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/ANGLE" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="ANGLE"/>

                <EditText
                    android:id="@+id/ANGLE_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AM_DISTANCE" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="DISTANCE"/>

                <EditText
                    android:id="@+id/AM_DISTANCE_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/X_ALTITUDE_DEPTH" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Altitude/Depth"/>

                <EditText
                    android:id="@+id/X_ALTITUDE_DEPTH_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/Q_DIRECTION_OF_MOVEMENT" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Direction of movement"/>

                <EditText
                    android:id="@+id/Q_DIRECTION_OF_MOVEMENT_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AN_AZIMUTH" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Azimuth"/>

                <EditText
                    android:id="@+id/AN_AZIMUTH_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/C_QUANTITY" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:text="Quantity"/>

                <EditText
                    android:id="@+id/C_QUANTITY_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/H_ADDITIONAL_INFO_1" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Additional Info 2"/>

                <EditText
                    android:id="@+id/H_ADDITIONAL_INFO_1_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/H1_ADDITIONAL_INFO_2" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Additional Info 2"/>

                <EditText
                    android:id="@+id/H1_ADDITIONAL_INFO_2_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/H2_ADDITIONAL_INFO_3" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Additional Info 3"/>

                <EditText
                    android:id="@+id/H2_ADDITIONAL_INFO_3_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/S_OFFSET_INDICATOR" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Offset Indicator"/>

                <EditText
                    android:id="@+id/S_OFFSET_INDICATOR_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/V_EQUIP_TYPE" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Equipment Type"/>

                <EditText
                    android:id="@+id/V_EQUIP_TYPE_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/D_TASK_FORCE_INDICATOR" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Task Force"/>

                <EditText
                    android:id="@+id/D_TASK_FORCE_INDICATOR_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/E_FRAME_SHAPE_MODIFIER" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Frame Shape"/>

                <EditText
                    android:id="@+id/E_FRAME_SHAPE_MODIFIER_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/F_REINFORCED_REDUCED" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Reinforced/Reduced"/>

                <EditText
                    android:id="@+id/F_REINFORCED_REDUCED_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/G_STAFF_COMMENTS" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Staff Comments"/>

                <EditText
                    android:id="@+id/G_STAFF_COMMENTS_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="20"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/J_EVALUATION_RATING" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Evaluation/Rating"/>

                <EditText
                    android:id="@+id/J_EVALUATION_RATING_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="2"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/K_COMBAT_EFFECTIVENESS" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Combat Effectivenss"/>

                <EditText
                    android:id="@+id/K_COMBAT_EFFECTIVENESS_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="2"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/L_SIGNATURE_EQUIP" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Signature Equipment"/>

                <EditText
                    android:id="@+id/L_SIGNATURE_EQUIP_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="1"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/M_HIGHER_FORMATION" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Higher Formation"/>

                <EditText
                    android:id="@+id/M_HIGHER_FORMATION_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="21"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/P_IFF_SIF" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="IFF/SIF"/>

                <EditText
                    android:id="@+id/P_IFF_SIF_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="5"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/R2_SIGNIT_MOBILITY_INDICATOR" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Signit Mobility Indicator"/>

                <EditText
                    android:id="@+id/R2_SIGNIT_MOBILITY_INDICATOR_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="5"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/S_HQ_STAFF_OR_OFFSET_INDICATOR" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="HQ Staff/Offset Indicator"/>

                <EditText
                    android:id="@+id/S_HQ_STAFF_OR_OFFSET_INDICATOR_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="5"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/Y_LOCATION" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Location"/>

                <EditText
                    android:id="@+id/Y_LOCATION_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="19"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/Z_SPEED" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Speed"/>

                <EditText
                    android:id="@+id/Z_SPEED_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="numberDecimal|number"
                    android:maxLength="19"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AA_SPECIAL_C2_HQ" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Special C2/HQ"/>

                <EditText
                    android:id="@+id/AA_SPECIAL_C2_HQ_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AB_FEINT_DUMMY_INDICATOR" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Feint/Dummy Indicator"/>

                <EditText
                    android:id="@+id/AB_FEINT_DUMMY_INDICATOR_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AC_INSTALLATION" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Installation"/>

                <EditText
                    android:id="@+id/AC_INSTALLATION_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AD_PLATFORM_TYPE" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Platform Type"/>

                <EditText
                    android:id="@+id/AD_PLATFORM_TYPE_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AE_EQUIPMENT_TEARDOWN_TIME" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Equpiment Teardown Time"/>

                <EditText
                    android:id="@+id/AE_EQUIPMENT_TEARDOWN_TIME_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AF_COMMON_IDENTIFIER" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Common Identifier"/>

                <EditText
                    android:id="@+id/AF_COMMON_IDENTIFIER_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AG_AUX_EQUIP_INDICATOR" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Equipment Indicator"/>

                <EditText
                    android:id="@+id/AG_AUX_EQUIP_INDICATOR_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AH_AREA_OF_UNCERTAINTY" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Area of Uncertainity"/>

                <EditText
                    android:id="@+id/AH_AREA_OF_UNCERTAINTY_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AI_DEAD_RECKONING_TRAILER" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Dead Rechoning Trailer"/>

                <EditText
                    android:id="@+id/AI_DEAD_RECKONING_TRAILER_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AJ_SPEED_LEADER" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Speed Leader"/>

                <EditText
                    android:id="@+id/AJ_SPEED_LEADER_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AK_PAIRING_LINE" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Pairing Line"/>

                <EditText
                    android:id="@+id/AK_PAIRING_LINE_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AL_OPERATIONAL_CONDITION" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Operational Condition"/>

                <EditText
                    android:id="@+id/AL_OPERATIONAL_CONDITION_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/AO_ENGAGEMENT_BAR" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Engagement Bar"/>

                <EditText
                    android:id="@+id/AO_ENGAGEMENT_BAR_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/SCC_SONAR_CLASSIFICATION_CONFIDENCE" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Sonar Classification/Confidence"/>

                <EditText
                    android:id="@+id/SCC_SONAR_CLASSIFICATION_CONFIDENCE_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/CN_CPOF_NAME_LABEL" android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="CPOF Name Label"/>

                <EditText
                    android:id="@+id/CN_CPOF_NAME_LABEL_edit"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="9"
                    android:maxLines="1"/>

            </LinearLayout>

        </LinearLayout>
    </ScrollView>

</LinearLayout>


text:
import { IShellProvider } from './IShellProvider';
import { Shell } from './Shell';

/**
 * The main goal of the class is to provide the current value of the shell
 */
export class NotWindowsShellProvider implements IShellProvider {
    public getValue(): Promise<Shell | undefined> {
        // All OS expect Windows use Shell
        return Promise.resolve(Shell.Shell);
    }
}


text:
using System;
using System.Diagnostics;
using System.Reflection;
using FakeItEasy;
using NUnit.Framework;

namespace FluentNHibernate.Testing
{
    public class Specification
    {
        public Exception thrown_exception { get; private set; }

        [TestFixtureSetUp]
        public void Setup()
        {
            establish_context();
            try
            {
                because();
            }
            catch (Exception e)
            {
                thrown_exception = e;
            }
        }

        public virtual void establish_context()
        {
        }

        /// <summary>
        /// An optional method you can use after <see cref="establish_context"/> to exercise the
        /// system under test. Also, any exception raised during the <see cref="because"/> will be
        /// captured and available for inspection via the <see cref="thrown_exception"/> property.
        /// </summary>
        public virtual void because()
        {
        }

        [TearDown]
        public void Teardown()
        {
            after_each();
        }

        public virtual void after_each()
        {
        }

        public T test_double<T>() where T : class
        {
            return A.Fake<T>();
        }

        protected void spec_not_implemented()
        {
            MethodBase caller = new StackTrace().GetFrame(1).GetMethod();

            spec_not_implemented(caller.DeclaringType.Name + "." + caller.Name);
        }

        protected void spec_not_implemented(string specName)
        {
            Console.WriteLine("Specification not implemented : " + specName);
        }
    }
}


text:
<?php
namespace Migrator\MigrationReader;

use DirectoryIterator;
use Migrator\MigrationReaderInterface;
use OutOfBoundsException;

class SingleFolder implements MigrationReaderInterface
{
    /**
     * @var array
     */
    private $up = [];

    /**
     * @var array
     */
    private $down = [];

    /**
     * SingleFolderMigrationReader constructor.
     * @param string $folder Folder to read from
     */
    public function __construct($folder)
    {
        foreach (new DirectoryIterator($folder) as $file) {
            if ($file->isDot()) {
                continue;
            }
            if ($this->match($file->getFilename(), $version, $is_upgrade)) {
                $pathname = $file->getPathname();
                if ($is_upgrade) {
                    $this->up[(int) $version] = $pathname;
                } else {
                    $this->down[(int) $version] = $pathname;
                }
            }
        }
    }

    /**
     * Checks if the filename matches the naming convention.
     * If matches, sets $version and $direction variables
     * @param string $filename
     * @param int    $version Matched version number
     * @param bool   $is_upgrade True if upgrade, false if downgrade
     * @return bool
     */
    public function match($filename, &$version, &$is_upgrade)
    {
        if (preg_match('/^(?<version>\d+)\.(?<dir>up|dn|down)(\..+)?\.sql$/', $filename, $match)) {
            $version = (int) $match['version'];
            $is_upgrade = ($match['dir'] === 'up');
            return true;
        }
        return false;
    }

    /**
     * Does upgrade to the version exist?
     * @param int $version
     * @return bool
     */
    public function upgradeExistsTo($version)
    {
        return array_key_exists($version, $this->up);
    }

    /**
     * Does downgrade from the version exist?
     * @param int $version
     * @return bool
     */
    public function downgradeExistsFrom($version)
    {
        return array_key_exists($version, $this->down);
    }

    /**
     * Get SQL upgrading from ($version - 1) to $version
     * @param int $version
     * @return string
     * @throws OutOfBoundsException if upgrade to version is not possible
     */
    public function getUpgradeTo($version)
    {
        return $this->getContents($this->up, $version);
    }

    /**
     * Get SQL downgrading from ($version) to ($version - 1)
     * @param int $version
     * @return string
     * @throws OutOfBoundsException if downgrade from version is not possible
     */
    public function getDowngradeFrom($version)
    {
        return $this->getContents($this->down, $version);
    }

    private function getContents(array $files, $key)
    {
        if (array_key_exists($key, $files)) {
            return file_get_contents($files[$key]);
        }
        throw new OutOfBoundsException('Version not found');
    }
}


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

<TITLE>
com.rocketsoftware.mvapi Class Hierarchy
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Hierarchy For Package com.rocketsoftware.mvapi

Package Hierarchies:
All Packages

Class Hierarchy

java.lang.Object

com.rocketsoftware.mvapi.AbstractConnection (implements java.sql.Connection)

com.rocketsoftware.mvapi.MVConnection

com.rocketsoftware.mvapi.AbstractDriver (implements java.sql.Driver)

com.rocketsoftware.mvapi.MVDriver

com.rocketsoftware.mvapi.AbstractStatement (implements java.sql.Statement)

com.rocketsoftware.mvapi.MVStatement

com.rocketsoftware.mvapi.MVConstants
com.rocketsoftware.mvapi.MVIndex
com.rocketsoftware.mvapi.MVSubroutine

      Overview
      Package
      Class
    Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
(function(P, $, undefined) {

  var self = P.Overlay = {};

  var overlay = null, content = null, background = null, inner = null;

  self.init = function() {
    overlay = $('#moment-overlay');
    content = overlay.find('#overlay-inner');
    background = overlay.find('#overlay-background');

    overlay.click(function(e) {
      e.preventDefault();
      self.hide();
    });

    content.click(function(e) { e.stopPropagation(); });

    $(window).resize(function() { self.reposition(); });

  }

  self.show = function(toShow) {
    overlay.show();
    content.append(toShow);
    inner = toShow;
    self.reposition();
  };

  self.hide = function() {
    overlay.hide();
    content.empty();
    inner = null;
  }

  self.reposition = function() {
    if(inner === null) return;
    // overlay.width(inner.width() + 'px').height(inner.height() + 'px');
    var top = Math.max(0, (overlay.height() - inner.height()) / 2);
    var left = Math.max(0, (overlay.width() - inner.width()) / 2);
    content.css({'top': top + 'px', 'left': left + 'px'});
  };

})(Pixtory, jQuery);


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Generic;
using CSharpWriterUnitTests.Properties;
using FluentAssertions;
using ODataReader.v4;
using System;
using System.Reflection;
using System.Xml.Linq;
using Vipr.Core;
using Xunit;

namespace CSharpWriterUnitTests
{
    public class Given_well_known_EDMX : CodeGenTestBase
    {
        [Fact]
        public void ActiveDirectory_Edmx_produces_compiling_sourcecode()
        {
            new Action(() => ODataToAssembly<Reader>(Resources.ActiveDirectory_ODataV3))
                .ShouldThrow<InvalidOperationException>("Because AAD Metadata is OData v3");
        }

        [Fact]
        public void CRM_Edmx_produces_compiling_sourcecode()
        {
            new Action(() => ODataToAssembly<Reader>(Resources.CRM_ODataV1))
                .ShouldThrow<InvalidOperationException>("Because CRM Metadata is OData v1");
        }

        [Fact]
        public void Exchange_Edmx_produces_compiling_sourcecode()
        {
            ODataToAssembly<Reader>(Resources.Exchange_ODataV4);
        }

        [Fact]
        public void OneNote_Edmx_produces_compiling_sourcecode()
        {
            ODataToAssembly<Reader>(Resources.OneNote_ODataV4);
        }

        [Fact]
        public void SharePoint_Edmx_produces_compiling_sourcecode()
        {
            ODataToAssembly<Reader>(Resources.SharePoint_ODataV4);
        }

        private Assembly ODataToAssembly<T>(string edmxString) where T : IReader, new()
        {
            var edmx = XElement.Parse(edmxString);
            var reader = new T();
            var model = reader.GenerateOdcmModel(new Dictionary<string, string>{{"$metadata", edmxString}});
            return GetProxy(model);
        }
    }
}