text:
<TITLE>Review for Gone in Sixty Seconds (2000)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Gone in Sixty Seconds (2000)

reviewed by
Berge Garabedian

GONE IN SIXTY SECONDS
RATING: 6.5/10 --> So-so

For more reviews and movie wallpapers, visit http://www.joblo.com/

The Entertainment Weekly magazine movie critic who reviewed this film called
THE ROCK ("big and half dumb"), CON AIR ("huge and moronic"), and ARMAGEDDON
("colossal and brain-dead"). Now those three films combined to gross a
little less than half a billion dollars domestically, so my guess is that
there were actually a few people out there who did appreciate the films on a
certain level. This has always been my main complaint about so-called real
"movie critics". Why review films which obviously don't appeal to your
sensibilities? Get another critic who appreciates certain aspects of that
genre to check it out instead. Phew! Okay...rant over. And oh yeah, the
critic in question gave this film a "D". Duh! Didn't see that one comin'.

PLOT:
A retired car thief is blackmailed back into stealing cool cars when his
little brother's life is threatened by a mean, ol' car thief ring operator.
The older brother basically has 24 hours to steal 50 specific high-priced
automobiles or his little brother bites the dust. Simple enough?

CRITIQUE:
A below-par Bruckheimer film which does satisfy with a couple of cool chase
scenes, a semi-interesting tale and car-stealing scenarios, but ultimately
doesn't blow you away with anything. I enjoyed this film because it looked
cool, the people in it were acting cool and all of the cars in it screamed
cool, but I can't honestly say that it was a good movie. I was never bored
during the film, but other than the last 30 minutes or so, I kept wondering
where all the action was. Just like every other Bruckheimer machismo guy
flick, there is always the prerequisite situation (I like to call it the
"A-Team scene") featuring the rounding up of a certain motley crew of
gruffy, down-and-out and badass MoFos, and the mobilization of the master
plan. Generally, this part only lasts a few minutes and we move on to a
whole lot of wham-bang-and-thank-you-ma'ams, but this film decided to spend
a lot more time on the set-up. Perhaps it was supposed to develop the
characters somehow, but despite the story being absorbing to a certain
extent, I did keep wondering when all the action was gonna take place,
especially when the holes started showing up in the plot.

And when they finally did begin stealing the cars, I was doubly surprised at
how little resistance (read action/fun blow 'em ups) there was as well. I
don't know, maybe I just expected too much popcorn for my buck, but despite
the film coming through as a whole, it did disappoint as an all-out nacho
flick. Cage was Cage once more, the staple hip, tough guy with a heart,
while the rest of the crew was a well-rounded bunch this time around. Lindo
was cool, Duvall is always fun to watch, Vinnie Jones is just waiting to be
discovered as the next action-hero superstar and Ribisi, well, I'll admit
that he's finally starting to get on my nerves with his down-and-out
character portrayals. I was also a little disappointed with the one-liners
in this film, which seemed a little weak this time around. But overall, the
film is a slick one to watch, offering a couple of rockin' action scenes,
some fun characters, and despite its plot holes (the cops know about their
entire plan the whole time, but they decide to send two incompetents after
them?), a somewhat interesting tale. And oh yeah...Angelina Jolie is barely
in it!

At this point, I think everyone knows what a "Bruckheimer movie" is, so
please don't go into this movie expecting anything more than that. With that
in mind, you might just enjoy yourself.

Review Date: June 24, 2000
Director: Dominic Sena
Writer: Scott Rosenberg
Producers: Jerry Bruckheimer and Mike Stenson
Actors: Nicolas Cage as Randall Raines
Giovanni Ribisi as Kip Raines
Delroy Lindo as Dt. Roland Castlebeck
Robert Duvall as Otto Halliwell
Genre: Action
Year of Release: 2000
------------------------------------
JoBlo's Movie Emporium
http://www.joblo.com/
------------------------------------
(c) 2000 Berge Garabedian

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
package org.aanguita.jacuzzi.notification;

/**
 * This interface contains methods for submitting progress notifications of a process.
 */
public interface ProgressNotification<E> {

    /**
     * Reports that the task being monitored has began
     */
    void beginTask();

    /**
     * Adds a new progress notification
     *
     * @param message content of the notification
     */
    void addNotification(E message);

    /**
     * This method can be invoked to indicate that the task has been finalized
     */
    void completeTask();
}

redpajama_set_name: RedPajamaGithub


text:
TASKS_QUEUE = "DEFAULT"
MIGRATIONS_QUEUE = 'migrations'
TASKS_RUNNER_URL = '/run_generic_task'

# Optional
TASKS_ERROR_NOTIFY_MAIL = {
    'from': 'from@yourdomain.com',
    'to': 'developers@yourdomain.com',
}


text:
//
//   Copyright 2016  Cityzen Data
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//

package io.warp10.script.functions;

import io.warp10.continuum.gts.GTSHelper;
import io.warp10.continuum.gts.GeoTimeSerie;
import io.warp10.script.NamedWarpScriptFunction;
import io.warp10.script.WarpScriptStackFunction;
import io.warp10.script.WarpScriptException;
import io.warp10.script.WarpScriptStack;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.geoxp.GeoXPLib;

/**
 * Extract the value/location/elevation at 'index' of the GTS on top of the stack
 */
public class ATINDEX extends NamedWarpScriptFunction implements WarpScriptStackFunction {

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

  @Override
  public Object apply(WarpScriptStack stack) throws WarpScriptException {
    Object o = stack.pop();

    if (!(o instanceof Number)) {
      throw new WarpScriptException(getName() + " expects an index on top of the stack.");
    }

    int idx = ((Number) o).intValue();

    o = stack.pop();

    if (!(o instanceof GeoTimeSerie)) {
      throw new WarpScriptException(getName() + " expects a Geo Time Series instance on top of the stack.");
    }

    GeoTimeSerie gts = (GeoTimeSerie) o;

    if (idx > GTSHelper.nvalues(gts)) {
      throw new WarpScriptException(getName() + " cannot retrieve the value at index " + idx + " since the GTS only contains " + GTSHelper.nvalues(gts) + " values.");
    }

    List<Object> result = getTupleAtIndex(gts, idx);

    stack.push(result);

    return stack;
  }

  public static List<Object> getTupleAtIndex(GeoTimeSerie gts, int idx) {
    List<Object> result = new ArrayList<Object>();

    if (idx < 0 || idx >= GTSHelper.nvalues(gts)) {
      result.add(Double.NaN);
      result.add(Double.NaN);
      result.add(Double.NaN);
      result.add(Double.NaN);
      result.add(null);
    } else {

      Object value = GTSHelper.valueAtIndex(gts, idx);
      long elevation = GTSHelper.elevationAtIndex(gts, idx);
      long location = GTSHelper.locationAtIndex(gts, idx);

      result.add(GTSHelper.tickAtIndex(gts, idx));

      if (GeoTimeSerie.NO_LOCATION != location) {
        double[] latlon = GeoXPLib.fromGeoXPPoint(location);
        result.add(latlon[0]);
        result.add(latlon[1]);
      } else {
        result.add(Double.NaN);
        result.add(Double.NaN);
      }

      if (GeoTimeSerie.NO_ELEVATION != elevation) {
        result.add(elevation);
      } else {
        result.add(Double.NaN);
      }

      result.add(value);
    }

    return result;
  }
}


text:
import React from 'react';
import Component from '../../Component';
import Menu from './Menu';
import Toggle from './Toggle';
import bind from '../../decorators/bind';
import childrenOf from '../../prop-types/childrenOf';
import isOutsideElement from '../../utility/isOutsideElement';
import generateUID from '../../utility/generateUID';
import emitEvent from '../../utility/emitEvent';
import { showHidePropTypes } from '../../propTypes';
import CONTEXT_TYPES from './contextTypes';
import MODULE from './module';

export default class Drop extends Component {
  static module = MODULE;

  static childContextTypes = CONTEXT_TYPES;

  static propTypes = {
    ...showHidePropTypes,
    children: childrenOf(Menu, Toggle),
  };

  state = {
    expanded: false,
  };

  uid = generateUID();

  getChildContext() {
    return {
      [MODULE.contextKey]: {
        expanded: this.state.expanded,
        hideMenu: this.hideMenu,
        showMenu: this.showMenu,
        toggleMenu: this.toggleMenu,
        uid: this.uid,
      },
    };
  }

  componentWillMount() {
    window.addEventListener('click', this.handleOnClickOut);
  }

  shouldComponentUpdate(nextProps, nextState) {
    return (nextState.expanded !== this.state.expanded);
  }

  componentWillUpdate() {
    emitEvent(this, this.state.expanded ? 'onHiding' : 'onShowing');
  }

  componentDidUpdate() {
    emitEvent(this, this.state.expanded ? 'onShown' : 'onHidden');
  }

  componentWillUnmount() {
    window.removeEventListener('click', this.handleOnClickOut);
  }

  @bind
  handleOnClickOut(e) {
    if (this.state.expanded && isOutsideElement(this.container, e.target)) {
      this.hideMenu();
    }
  }

  @bind
  hideMenu() {
    this.setState({
      expanded: false,
    });
  }

  @bind
  showMenu() {
    this.setState({
      expanded: true,
    });
  }

  @bind
  toggleMenu() {
    if (this.state.expanded) {
      this.hideMenu();
    } else {
      this.showMenu();
    }
  }

  render() {
    return (
      <div id={this.formatID('drop')} ref={(ref) => { this.container = ref; }}>
        {this.props.children}
      </div>
    );
  }
}


text:
using System.Globalization;

namespace Junctionizer.CustomWpfComponents.ValueConverters
{
    public class NullToFalseConverter : SimpleConverter<object, bool>
    {
        public override bool Convert(object value, CultureInfo culture)
        {
            return value != null;
        }
    }
}


text:
/**
 * Name: Pointer events
 * Author: Graffino (http://www.graffino.com)
 */

// To use
// bower install pointer-events-poly
Object.assign($graffino, {
  pointerEvents: {
    name: 'pointer-events',

    // Plugin options
    options: {
      hook: 'HANDLERS',
      autoInit: false,
      debug: false
    },

    // Scoped variables
    vars: {},

    // Init method
    init() {
      const _that = $graffino,
        _this = this;

      _this.log('Pointer events polyfill initialized.');

      // Initialize polyfill for links
      PointerEventsPolyfill.initialize({selector: 'a'});
      // Initialize polyfill for spans
      PointerEventsPolyfill.initialize({selector: 'span'});
      // Initialize polyfill for divs
      PointerEventsPolyfill.initialize({selector: 'div'});

      // Disable pointer events on iOS drag to prevent scroll stopping when
      // dragging on form elements (iOS workaround)
      if ($.browser.mobile) {
        _this.setPointerEvents('none');

        _that.vars.$document.on('touchstart', () => _this.setPointerEvents('auto'));
        _that.vars.$document.on('touchmove', () => _this.setPointerEvents('none'));
        _that.vars.$document.on('touchend', () => setTimeout(() => _this.setPointerEvents('none'), 1000));
      }
    },

    setPointerEvents(pointerEventsValue) {
      const $nodes = $('input, textarea');
      $.each($nodes, (index, node) => {
        $(node).css('pointer-events', pointerEventsValue);
      });
    }
  }
});


text:
from .auto_rest_parameterized_custom_host_test_client import AutoRestParameterizedCustomHostTestClient
from .version import VERSION

__all__ = ['AutoRestParameterizedCustomHostTestClient']

__version__ = VERSION


text:
package docker

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestSimplifyContentType(t *testing.T) {
	for _, c := range []struct{ input, expected string }{
		{"", ""},
		{"application/json", "application/json"},
		{"application/json;charset=utf-8", "application/json"},
		{"application/json; charset=utf-8", "application/json"},
		{"application/json ; charset=utf-8", "application/json"},
		{"application/json\t;\tcharset=utf-8", "application/json"},
		{"application/json    ;charset=utf-8", "application/json"},
		{`application/json; charset="utf-8"`, "application/json"},
		{"completely invalid", ""},
	} {
		out := simplifyContentType(c.input)
		assert.Equal(t, c.expected, out, c.input)
	}
}


text:
package founderio.chaoscrystal.entities;

import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import founderio.chaoscrystal.ChaosCrystalMain;
import founderio.chaoscrystal.Constants;

public class DegradationParticles extends EntityFX {

	public static final ResourceLocation CHAOS_TEX = new ResourceLocation(
			Constants.MOD_ID + ":textures/particle/chaosparticles.png");
	public static final ResourceLocation DEFAULT_TEX = new ResourceLocation(
			"textures/particle/particles.png");

	private final double sourcePosX;
	private final double sourcePosY;
	private final double sourcePosZ;

	public DegradationParticles(World par1World,
			double posX, double posY, double posZ,
			double targetX, double targetY, double targetZ,
			int type) {
		super(par1World, posX, posY, posZ);

		sourcePosX = this.posX;
		sourcePosY = this.posY;
		sourcePosZ = this.posZ;

		motionX = targetX-posX;
		motionY = targetY-posY;
		motionZ = targetZ-posZ;

		float colorVariation = rand.nextFloat() * 0.6f + 0.4f;
		if(type == 1) { // extract
			particleRed = particleGreen = particleBlue = 1.0F * colorVariation;
			particleGreen *= 0.9F;
			particleRed *= 0.9F;
		} else { // infuse
			particleRed = particleGreen = particleBlue = 1.0F * colorVariation;
			particleGreen *= 0.3F;
			particleRed *= 0.3F;
		}

		particleMaxAge = 50;
		noClip = true;
		particleScale = 0.5f;

		setParticleTextureIndex(ChaosCrystalMain.rand.nextInt(17));
	}

	@Override
	public void onUpdate() {

		prevPosX = posX;
		prevPosY = posY;
		prevPosZ = posZ;

		float f = (float)particleAge / (float)particleMaxAge;
		double px = sourcePosX + motionX * f;
		double py = sourcePosY + motionY * f;
		double pz = sourcePosZ + motionZ * f;
		moveEntity(px - prevPosX, py - prevPosY, pz - prevPosZ);

		if (particleAge++ >= particleMaxAge)
		{
			setDead();
		}
	}

	@Override
	public void renderParticle(Tessellator tessellator, float par2,
			float par3, float par4, float par5, float par6, float par7) {

		tessellator.draw();
		tessellator.startDrawingQuads();
		tessellator.setBrightness(getBrightnessForRender(par2));
		Minecraft.getMinecraft().renderEngine.bindTexture(CHAOS_TEX);

		super.renderParticle(tessellator, par2, par3, par4, par5, par6, par7);

		tessellator.draw();
		tessellator.startDrawingQuads();

		Minecraft.getMinecraft().renderEngine.bindTexture(DEFAULT_TEX);
	}
}


text:
package org.apache.nifi.processors.standard;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.security.cert.X509Certificate;
import javax.servlet.http.HttpServletResponse;

import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.ValidationContext;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.flowfile.attributes.CoreAttributes;
import org.apache.nifi.io.BufferedInputStream;
import org.apache.nifi.io.BufferedOutputStream;
import org.apache.nifi.io.GZIPOutputStream;
import org.apache.nifi.io.LeakyBucketStreamThrottler;
import org.apache.nifi.io.StreamThrottler;
import org.apache.nifi.io.StreamUtils;
import org.apache.nifi.logging.ProcessorLog;
import org.apache.nifi.processor.AbstractProcessor;
import org.apache.nifi.processor.DataUnit;
import org.apache.nifi.processor.ProcessContext;
import org.apache.nifi.processor.ProcessSession;
import org.apache.nifi.processor.ProcessorInitializationContext;
import org.apache.nifi.processor.Relationship;
import org.apache.nifi.processor.annotation.CapabilityDescription;
import org.apache.nifi.processor.annotation.OnScheduled;
import org.apache.nifi.processor.annotation.OnStopped;
import org.apache.nifi.processor.annotation.SupportsBatching;
import org.apache.nifi.processor.annotation.Tags;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.io.InputStreamCallback;
import org.apache.nifi.processor.util.StandardValidators;
import org.apache.nifi.ssl.SSLContextService;
import org.apache.nifi.ssl.SSLContextService.ClientAuth;
import org.apache.nifi.util.FlowFilePackager;
import org.apache.nifi.util.FlowFilePackagerV1;
import org.apache.nifi.util.FlowFilePackagerV2;
import org.apache.nifi.util.FlowFilePackagerV3;
import org.apache.nifi.util.FormatUtils;
import org.apache.nifi.util.ObjectHolder;
import org.apache.nifi.util.StopWatch;

import org.apache.http.Header;
import org.apache.http.HttpException;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpHead;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.params.ClientPNames;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.HttpRoutedConnection;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.entity.ContentProducer;
import org.apache.http.entity.EntityTemplate;
import org.apache.http.impl.client.AbstractHttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.PoolingClientConnectionManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.ExecutionContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;

import com.sun.jersey.api.client.ClientResponse.Status;

@SupportsBatching
@Tags({"http", "https", "remote", "copy", "archive"})
@CapabilityDescription("Performs an HTTP Post with the content of the FlowFile")
public class PostHTTP extends AbstractProcessor {

    public static final String CONTENT_TYPE = "Content-Type";
    public static final String ACCEPT = "Accept";
    public static final String ACCEPT_ENCODING = "Accept-Encoding";
    public static final String APPLICATION_FLOW_FILE_V1 = "application/flowfile";
    public static final String APPLICATION_FLOW_FILE_V2 = "application/flowfile-v2";
    public static final String APPLICATION_FLOW_FILE_V3 = "application/flowfile-v3";
    public static final String DEFAULT_CONTENT_TYPE = "application/octet-stream";
    public static final String FLOWFILE_CONFIRMATION_HEADER = "x-prefer-acknowledge-uri";
    public static final String LOCATION_HEADER_NAME = "Location";
    public static final String LOCATION_URI_INTENT_NAME = "x-location-uri-intent";
    public static final String LOCATION_URI_INTENT_VALUE = "flowfile-hold";
    public static final String GZIPPED_HEADER = "flowfile-gzipped";

    public static final String PROTOCOL_VERSION_HEADER = "x-nifi-transfer-protocol-version";
    public static final String TRANSACTION_ID_HEADER = "x-nifi-transaction-id";
    public static final String PROTOCOL_VERSION = "3";

    public static final PropertyDescriptor URL = new PropertyDescriptor.Builder()
            .name("URL")
            .description("The URL to POST to. The first part of the URL must be static. However, the path of the URL may be defined using the Attribute Expression Language. For example, https://${hostname} is not valid, but https://1.1.1.1:8080/files/${nf.file.name} is valid.")
            .required(true)
            .addValidator(StandardValidators.createRegexMatchingValidator(Pattern.compile("https?\\://.*")))
            .expressionLanguageSupported(true)
            .build();
    public static final PropertyDescriptor SEND_AS_FLOWFILE = new PropertyDescriptor.Builder()
            .name("Send as FlowFile")
            .description("If true, will package the FlowFile's contents and attributes together and send the FlowFile Package; otherwise, will send only the FlowFile's content")
            .required(true)
            .allowableValues("true", "false")
            .defaultValue("false")
            .build();
    public static final PropertyDescriptor CONNECTION_TIMEOUT = new PropertyDescriptor.Builder()
            .name("Connection Timeout")
            .description("How long to wait when attempting to connect to the remote server before giving up")
            .required(true)
            .defaultValue("30 sec")
            .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)
            .build();
    public static final PropertyDescriptor DATA_TIMEOUT = new PropertyDescriptor.Builder()
            .name("Data Timeout")
            .description("How long to wait between receiving segments of data from the remote server before giving up and discarding the partial file")
            .required(true)
            .defaultValue("30 sec")
            .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)
            .build();
    public static final PropertyDescriptor USERNAME = new PropertyDescriptor.Builder()
            .name("Username")
            .description("Username required to access the URL")
            .required(false)
            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
            .build();
    public static final PropertyDescriptor PASSWORD = new PropertyDescriptor.Builder()
            .name("Password")
            .description("Password required to access the URL")
            .required(false)
            .sensitive(true)
            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
            .build();
    public static final PropertyDescriptor USER_AGENT = new PropertyDescriptor.Builder()
            .name("User Agent")
            .description("What to report as the User Agent when we connect to the remote server")
            .required(false)
            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
            .build();
    public static final PropertyDescriptor COMPRESSION_LEVEL = new PropertyDescriptor.Builder()
            .name("Compression Level")
            .description("Determines the GZIP Compression Level to use when sending the file; the value must be in the range of 0-9. A value of 0 indicates that the file will not be GZIP'ed")
            .required(true)
            .addValidator(StandardValidators.createLongValidator(0, 9, true))
            .defaultValue("0")
            .build();
    public static final PropertyDescriptor ATTRIBUTES_AS_HEADERS_REGEX = new PropertyDescriptor.Builder()
            .name("Attributes to Send as HTTP Headers (Regex)")
            .description("Specifies the Regular Expression that determines the names of FlowFile attributes that should be sent as HTTP Headers")
            .addValidator(StandardValidators.REGULAR_EXPRESSION_VALIDATOR)
            .required(false)
            .build();
    public static final PropertyDescriptor MAX_DATA_RATE = new PropertyDescriptor.Builder()
            .name("Max Data to Post per Second")
            .description("The maximum amount of data to send per second; this allows the bandwidth to be throttled to a specified data rate; if not specified, the data rate is not throttled")
            .required(false)
            .addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
            .build();
    public static final PropertyDescriptor MAX_BATCH_SIZE = new PropertyDescriptor.Builder()
            .name("Max Batch Size")
            .description("If the Send as FlowFile property is true, specifies the max data size for a batch of FlowFiles to send in a single HTTP POST. If not specified, each FlowFile will be sent separately. If the Send as FlowFile property is false, this property is ignored")
            .required(false)
            .addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
            .defaultValue("100 MB")
            .build();
    public static final PropertyDescriptor CHUNKED_ENCODING = new PropertyDescriptor.Builder()
            .name("Use Chunked Encoding")
            .description("Specifies whether or not to use Chunked Encoding to send the data. If false, the entire content of the FlowFile will be buffered into memory.")
            .required(true)
            .allowableValues("true", "false")
            .defaultValue("true")
            .build();

    public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new PropertyDescriptor.Builder()
            .name("SSL Context Service")
            .description("The Controller Service to use in order to obtain an SSL Context")
            .required(false)
            .identifiesControllerService(SSLContextService.class)
            .build();

    public static final Relationship REL_SUCCESS = new Relationship.Builder().name("success").description("Files that are successfully send will be transferred to success").build();
    public static final Relationship REL_FAILURE = new Relationship.Builder().name("failure").description("Files that fail to send will transferred to failure").build();

    private Set<Relationship> relationships;
    private List<PropertyDescriptor> properties;

    private final AtomicReference<DestinationAccepts> acceptsRef = new AtomicReference<>();
    private final AtomicReference<StreamThrottler> throttlerRef = new AtomicReference<>();
    private final ConcurrentMap<String, Config> configMap = new ConcurrentHashMap<>();

    @Override
    protected void init(final ProcessorInitializationContext context) {
        final Set<Relationship> relationships = new HashSet<>();
        relationships.add(REL_SUCCESS);
        relationships.add(REL_FAILURE);
        this.relationships = Collections.unmodifiableSet(relationships);

        final List<PropertyDescriptor> properties = new ArrayList<>();
        properties.add(URL);
        properties.add(MAX_BATCH_SIZE);
        properties.add(MAX_DATA_RATE);
        properties.add(SSL_CONTEXT_SERVICE);
        properties.add(USERNAME);
        properties.add(PASSWORD);
        properties.add(SEND_AS_FLOWFILE);
        properties.add(CHUNKED_ENCODING);
        properties.add(COMPRESSION_LEVEL);
        properties.add(CONNECTION_TIMEOUT);
        properties.add(DATA_TIMEOUT);
        properties.add(ATTRIBUTES_AS_HEADERS_REGEX);
        properties.add(USER_AGENT);
        this.properties = Collections.unmodifiableList(properties);
    }

    @Override
    public Set<Relationship> getRelationships() {
        return relationships;
    }

    @Override
    protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
        return properties;
    }

    @Override
    protected Collection<ValidationResult> customValidate(final ValidationContext context) {
        final Collection<ValidationResult> results = new ArrayList<>();

        if (context.getProperty(URL).getValue().startsWith("https") && context.getProperty(SSL_CONTEXT_SERVICE).getValue() == null) {
            results.add(new ValidationResult.Builder()
                    .explanation("URL is set to HTTPS protocol but no SSLContext has been specified")
                    .valid(false)
                    .subject("SSL Context")
                    .build());
        }

        return results;
    }

    @OnStopped
    public void onStopped() {
        this.acceptsRef.set(null);

        for (final Map.Entry<String, Config> entry : configMap.entrySet()) {
            final Config config = entry.getValue();
            config.getConnectionManager().shutdown();
        }

        configMap.clear();
    }

    @OnScheduled
    public void onScheduled(final ProcessContext context) {
        final Double bytesPerSecond = context.getProperty(MAX_DATA_RATE).asDataSize(DataUnit.B);
        this.throttlerRef.set(bytesPerSecond == null ? null : new LeakyBucketStreamThrottler(bytesPerSecond.intValue()));
    }

    private String getBaseUrl(final String url) {
        final int index = url.indexOf("/", 9);
        if (index < 0) {
            return url;
        }

        return url.substring(0, index);
    }

    private Config getConfig(final String url, final ProcessContext context) {
        final String baseUrl = getBaseUrl(url);
        Config config = configMap.get(baseUrl);
        if (config != null) {
            return config;
        }

        final ClientConnectionManager conMan = new PoolingClientConnectionManager();
        registerUrlWithManager(url, context, conMan);
        config = new Config(conMan);
        final Config existingConfig = configMap.putIfAbsent(baseUrl, config);

        return (existingConfig == null) ? config : existingConfig;
    }

    @Override
    public void onTrigger(final ProcessContext context, final ProcessSession session) {
        final boolean sendAsFlowFile = context.getProperty(SEND_AS_FLOWFILE).asBoolean();
        final int compressionLevel = context.getProperty(COMPRESSION_LEVEL).asInteger();

        final HttpParams httpParams = new BasicHttpParams();
        HttpConnectionParams.setConnectionTimeout(httpParams, context.getProperty(CONNECTION_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue());
        HttpConnectionParams.setSoTimeout(httpParams, context.getProperty(DATA_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue());
        httpParams.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, false);
        final String userAgent = context.getProperty(USER_AGENT).getValue();
        if (userAgent != null) {
            httpParams.setParameter("http.useragent", userAgent);
        }

        final StreamThrottler throttler = throttlerRef.get();
        final ProcessorLog logger = getLogger();

        final Double maxBatchBytes = context.getProperty(MAX_BATCH_SIZE).asDataSize(DataUnit.B);
        String lastUrl = null;
        long bytesToSend = 0L;

        final List<FlowFile> toSend = new ArrayList<>();
        DestinationAccepts destinationAccepts = null;
        HttpClient client = null;
        final String transactionId = UUID.randomUUID().toString();

        final ObjectHolder<String> dnHolder = new ObjectHolder<>("none");
        while (true) {
            FlowFile flowFile = session.get();
            if (flowFile == null) {
                break;
            }

            final String url = context.getProperty(URL).evaluateAttributeExpressions(flowFile).getValue();
            try {
                new java.net.URL(url);
            } catch (final MalformedURLException e) {
                logger.error("After substituting attribute values for {}, URL is {}; this is not a valid URL, so routing to failure",
                        new Object[]{flowFile, url});
                flowFile = session.penalize(flowFile);
                session.transfer(flowFile, REL_FAILURE);
                continue;
            }

            // If this FlowFile doesn't have the same url, throw it back on the queue and stop grabbing FlowFiles
            if (lastUrl != null && !lastUrl.equals(url)) {
                session.transfer(flowFile);
                break;
            }

            lastUrl = url;
            toSend.add(flowFile);

            if (client == null || destinationAccepts == null) {
                final Config config = getConfig(url, context);
                final ClientConnectionManager conMan = config.getConnectionManager();
                client = new DefaultHttpClient(conMan, httpParams);

                ((AbstractHttpClient) client).addResponseInterceptor(new HttpResponseInterceptor() {
                    @Override
                    public void process(final HttpResponse response, final HttpContext context) throws HttpException, IOException {
                        final HttpRoutedConnection httpRoutedConnection = (HttpRoutedConnection) context.getAttribute(ExecutionContext.HTTP_CONNECTION);
                        if (httpRoutedConnection.isSecure()) {
                            final X509Certificate[] certChain = httpRoutedConnection.getSSLSession().getPeerCertificateChain();
                            if (certChain == null || certChain.length == 0) {
                                throw new SSLPeerUnverifiedException("No certificates found");
                            }

                            final X509Certificate cert = certChain[0];
                            dnHolder.set(cert.getSubjectDN().getName().trim());
                        }
                    }
                });

                // determine whether or not destination accepts flowfile/gzip
                destinationAccepts = config.getDestinationAccepts();
                if (destinationAccepts == null) {
                    try {
                        if (sendAsFlowFile) {
                            destinationAccepts = getDestinationAcceptance(client, url, getLogger(), transactionId);
                        } else {
                            destinationAccepts = new DestinationAccepts(false, false, false, false, null);
                        }

                        config.setDestinationAccepts(destinationAccepts);
                    } catch (IOException e) {
                        flowFile = session.penalize(flowFile);
                        session.transfer(flowFile, REL_FAILURE);
                        logger.error("Unable to communicate with destination {} to determine whether or not it can accept flowfiles/gzip; routing {} to failure due to {}", new Object[]{url, flowFile, e});
                        context.yield();
                        return;
                    }
                }
            }

            // if we are not sending as flowfile, or if the destination doesn't accept V3 or V2 (streaming) format,
            // then only use a single FlowFile
            if (!sendAsFlowFile || (!destinationAccepts.isFlowFileV3Accepted() && !destinationAccepts.isFlowFileV2Accepted())) {
                break;
            }

            bytesToSend += flowFile.getSize();
            if (bytesToSend > maxBatchBytes.longValue()) {
                break;
            }
        }

        if (toSend.isEmpty()) {
            return;
        }

        final String url = lastUrl;
        final HttpPost post = new HttpPost(url);
        final List<FlowFile> flowFileList = toSend;
        final DestinationAccepts accepts = destinationAccepts;
        final boolean isDestinationLegacyNiFi = accepts.getProtocolVersion() == null;

        final EntityTemplate entity = new EntityTemplate(new ContentProducer() {
            @Override
            public void writeTo(final OutputStream rawOut) throws IOException {
                final OutputStream throttled = (throttler == null) ? rawOut : throttler.newThrottledOutputStream(rawOut);
                OutputStream wrappedOut = new BufferedOutputStream(throttled);
                if (compressionLevel > 0 && accepts.isGzipAccepted()) {
                    wrappedOut = new GZIPOutputStream(wrappedOut, compressionLevel);
                }

                try (final OutputStream out = wrappedOut) {
                    for (final FlowFile flowFile : flowFileList) {
                        session.read(flowFile, new InputStreamCallback() {
                            @Override
                            public void process(final InputStream rawIn) throws IOException {
                                try (final InputStream in = new BufferedInputStream(rawIn)) {

                                    FlowFilePackager packager = null;
                                    if (!sendAsFlowFile) {
                                        packager = null;
                                    } else if (accepts.isFlowFileV3Accepted()) {
                                        packager = new FlowFilePackagerV3();
                                    } else if (accepts.isFlowFileV2Accepted()) {
                                        packager = new FlowFilePackagerV2();
                                    } else if (accepts.isFlowFileV1Accepted()) {
                                        packager = new FlowFilePackagerV1();
                                    }

                                    // if none of the above conditions is met, we should never get here, because
                                    // we will have already verified that at least 1 of the FlowFile packaging
                                    // formats is acceptable if sending as FlowFile.
                                    if (packager == null) {
                                        StreamUtils.copy(in, out);
                                    } else {
                                        final Map<String, String> flowFileAttributes;
                                        if (isDestinationLegacyNiFi) {
                                            // Old versions of NiFi expect nf.file.name and nf.file.path to indicate filename & path;
                                            // in order to maintain backward compatibility, we copy the filename & path to those attribute keys.
                                            flowFileAttributes = new HashMap<>(flowFile.getAttributes());
                                            flowFileAttributes.put("nf.file.name", flowFile.getAttribute(CoreAttributes.FILENAME.key()));
                                            flowFileAttributes.put("nf.file.path", flowFile.getAttribute(CoreAttributes.PATH.key()));
                                        } else {
                                            flowFileAttributes = flowFile.getAttributes();
                                        }

                                        packager.packageFlowFile(in, out, flowFileAttributes, flowFile.getSize());
                                    }
                                }
                            }
                        });
                    }

                    out.flush();
                }
            }
        });

        entity.setChunked(context.getProperty(CHUNKED_ENCODING).asBoolean());
        post.setEntity(entity);

        final String contentType;
        if (sendAsFlowFile) {
            if (accepts.isFlowFileV3Accepted()) {
                contentType = APPLICATION_FLOW_FILE_V3;
            } else if (accepts.isFlowFileV2Accepted()) {
                contentType = APPLICATION_FLOW_FILE_V2;
            } else if (accepts.isFlowFileV1Accepted()) {
                contentType = APPLICATION_FLOW_FILE_V1;
            } else {
                logger.error("Cannot send data to {} because the destination does not accept FlowFiles and this processor is configured to deliver FlowFiles; rolling back session", new Object[]{url});
                session.rollback();
                context.yield();
                return;
            }
        } else {
            final String attributeValue = toSend.get(0).getAttribute(CoreAttributes.MIME_TYPE.key());
            contentType = (attributeValue == null) ? DEFAULT_CONTENT_TYPE : attributeValue;
        }

        final String attributeHeaderRegex = context.getProperty(ATTRIBUTES_AS_HEADERS_REGEX).getValue();
        if (attributeHeaderRegex != null && !sendAsFlowFile && flowFileList.size() == 1) {
            final Pattern pattern = Pattern.compile(attributeHeaderRegex);

            final Map<String, String> attributes = flowFileList.get(0).getAttributes();
            for (final Map.Entry<String, String> entry : attributes.entrySet()) {
                final String key = entry.getKey();
                if (pattern.matcher(key).matches()) {
                    post.setHeader(entry.getKey(), entry.getValue());
                }
            }
        }

        post.setHeader(CONTENT_TYPE, contentType);
        post.setHeader(FLOWFILE_CONFIRMATION_HEADER, "true");
        post.setHeader(PROTOCOL_VERSION_HEADER, PROTOCOL_VERSION);
        post.setHeader(TRANSACTION_ID_HEADER, transactionId);
        if (compressionLevel > 0 && accepts.isGzipAccepted()) {
            post.setHeader(GZIPPED_HEADER, "true");
        }

        // Do the actual POST
        final String flowFileDescription = toSend.size() <= 10 ? toSend.toString() : toSend.size() + " FlowFiles";

        final String uploadDataRate;
        final long uploadMillis;
        final HttpResponse response;
        try {
            final StopWatch stopWatch = new StopWatch(true);
            response = client.execute(post);

            // consume input stream entirely, ignoring its contents. If we
            // don't do this, the Connection will not be returned to the pool
            EntityUtils.consume(response.getEntity());
            stopWatch.stop();
            uploadDataRate = stopWatch.calculateDataRate(bytesToSend);
            uploadMillis = stopWatch.getDuration(TimeUnit.MILLISECONDS);
        } catch (final IOException e) {
            logger.error("Failed to Post {} due to {}; transferring to failure", new Object[]{flowFileDescription, e});
            context.yield();
            for (FlowFile flowFile : toSend) {
                flowFile = session.penalize(flowFile);
                session.transfer(flowFile, REL_FAILURE);
            }
            return;
        }

        // If we get a 'SEE OTHER' status code and an HTTP header that indicates that the intent
        // of the Location URI is a flowfile hold, we will store this holdUri. This prevents us
        // from posting to some other webservice and then attempting to delete some resource to which
        // we are redirected
        final int responseCode = response.getStatusLine().getStatusCode();
        final String responseReason = response.getStatusLine().getReasonPhrase();
        String holdUri = null;
        if (responseCode == HttpServletResponse.SC_SEE_OTHER) {
            final Header locationUriHeader = response.getFirstHeader(LOCATION_URI_INTENT_NAME);
            if (locationUriHeader != null) {
                if (LOCATION_URI_INTENT_VALUE.equals(locationUriHeader.getValue())) {
                    final Header holdUriHeader = response.getFirstHeader(LOCATION_HEADER_NAME);
                    if (holdUriHeader != null) {
                        holdUri = holdUriHeader.getValue();
                    }
                }
            }

            if (holdUri == null) {
                for (FlowFile flowFile : toSend) {
                    flowFile = session.penalize(flowFile);
                    logger.error("Failed to Post {} to {}: sent content and received status code {}:{} but no Hold URI", new Object[]{flowFile, url, responseCode, responseReason});
                    session.transfer(flowFile, REL_FAILURE);
                }
                return;
            }
        }

        if (holdUri == null) {
            if (responseCode == HttpServletResponse.SC_SERVICE_UNAVAILABLE) {
                for (FlowFile flowFile : toSend) {
                    flowFile = session.penalize(flowFile);
                    logger.error("Failed to Post {} to {}: response code was {}:{}; will yield processing, since the destination is temporarily unavailable", new Object[]{flowFile, url, responseCode, responseReason});
                    session.transfer(flowFile, REL_FAILURE);
                }
                context.yield();
                return;
            }

            if (responseCode >= 300) {
                for (FlowFile flowFile : toSend) {
                    flowFile = session.penalize(flowFile);
                    logger.error("Failed to Post {} to {}: response code was {}:{}", new Object[]{flowFile, url, responseCode, responseReason});
                    session.transfer(flowFile, REL_FAILURE);
                }
                return;
            }

            logger.info("Successfully Posted {} to {} in {} at a rate of {}", new Object[]{
                flowFileDescription, url, FormatUtils.formatMinutesSeconds(uploadMillis, TimeUnit.MILLISECONDS), uploadDataRate});

            for (final FlowFile flowFile : toSend) {
                session.getProvenanceReporter().send(flowFile, url, "Remote DN=" + dnHolder.get(), uploadMillis, true);
                session.transfer(flowFile, REL_SUCCESS);
            }
            return;
        }

        //
        // the response indicated a Hold URI; delete the Hold.
        //
        // determine the full URI of the Flow File's Hold; Unfortunately, the responses that are returned have
        // changed over the past, so we have to take into account a few different possibilities.
        String fullHoldUri = holdUri;
        if (holdUri.startsWith("/contentListener")) {
            // If the Hold URI that we get starts with /contentListener, it may not really be /contentListener,
            // as this really indicates that it should be whatever we posted to -- if posting directly to the
            // ListenHTTP component, it will be /contentListener, but if posting to a proxy/load balancer, we may
            // be posting to some other URL.
            fullHoldUri = url + holdUri.substring(16);
        } else if (holdUri.startsWith("/")) {
            // URL indicates the full path but not hostname or port; use the same hostname & port that we posted
            // to but use the full path indicated by the response.
            int firstSlash = url.indexOf("/", 8);
            if (firstSlash < 0) {
                firstSlash = url.length();
            }
            final String beforeSlash = url.substring(0, firstSlash);
            fullHoldUri = beforeSlash + holdUri;
        } else if (!holdUri.startsWith("http")) {
            // Absolute URL
            fullHoldUri = url + (url.endsWith("/") ? "" : "/") + holdUri;
        }

        final HttpDelete delete = new HttpDelete(fullHoldUri);
        delete.setHeader(TRANSACTION_ID_HEADER, transactionId);

        while (true) {
            try {
                final HttpResponse holdResponse = client.execute(delete);
                EntityUtils.consume(holdResponse.getEntity());
                final int holdStatusCode = holdResponse.getStatusLine().getStatusCode();
                final String holdReason = holdResponse.getStatusLine().getReasonPhrase();
                if (holdStatusCode >= 300) {
                    logger.error("Failed to delete Hold that destination placed on {}: got response code {}:{}; routing to failure",
                            new Object[]{flowFileDescription, holdStatusCode, holdReason});

                    for (FlowFile flowFile : toSend) {
                        flowFile = session.penalize(flowFile);
                        session.transfer(flowFile, REL_FAILURE);
                    }
                    return;
                }

                logger.info("Successfully Posted {} to {} in {} milliseconds at a rate of {}",
                        new Object[]{flowFileDescription, url, uploadMillis, uploadDataRate});

                for (FlowFile flowFile : toSend) {
                    session.getProvenanceReporter().send(flowFile, url);
                    session.transfer(flowFile, REL_SUCCESS);
                }
                return;
            } catch (final IOException e) {
                logger.warn("Failed to delete Hold that destination placed on {} due to {}", new Object[]{flowFileDescription, e});
            }

            if (!isScheduled()) {
                context.yield();
                logger.warn("Failed to delete Hold that destination placed on {}; Processor has been stopped so routing FlowFile(s) to failure", new Object[]{flowFileDescription});
                for (FlowFile flowFile : toSend) {
                    flowFile = session.penalize(flowFile);
                    session.transfer(flowFile, REL_FAILURE);
                }
                return;
            }
        }
    }

    private void registerUrlWithManager(final String url, final ProcessContext processContext, final ClientConnectionManager conMan) {
        URI uriObject;
        try {
            uriObject = new URI(url);
        } catch (URISyntaxException e) {
            throw new ProcessException(e);  // won't happen because of our
        }
        int port = uriObject.getPort();
        if (port == -1) {
            port = 443;
        }

        final boolean secure = (url.toLowerCase().startsWith("https"));
        if (!secure) {
            return;
        }

        final SSLContext sslContext = createSslContext(processContext);
        final SSLSocketFactory sslSocketFactory = new SSLSocketFactory(sslContext);
        final Scheme newScheme = new Scheme("https", port, sslSocketFactory);
        conMan.getSchemeRegistry().register(newScheme);
    }

    /**
     * Creates a SSL context based on the processor's optional properties.
     * <p/>
     *
     * @return an SSLContext instance
     */
    private SSLContext createSslContext(final ProcessContext context) {
        final SSLContextService sslContextService = context.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class);
        return (sslContextService == null) ? null : sslContextService.createSSLContext(ClientAuth.REQUIRED);
    }

    private DestinationAccepts getDestinationAcceptance(final HttpClient client, final String uri, final ProcessorLog logger, final String transactionId) throws IOException {
        final HttpHead head = new HttpHead(uri);
        head.addHeader(TRANSACTION_ID_HEADER, transactionId);
        final HttpResponse response = client.execute(head);

        final int statusCode = response.getStatusLine().getStatusCode();
        if (statusCode == Status.METHOD_NOT_ALLOWED.getStatusCode()) {
            // we assume that the destination can support FlowFile v1 always.
            return new DestinationAccepts(false, false, true, false, null);
        } else if (statusCode == Status.OK.getStatusCode()) {
            boolean acceptsFlowFileV3 = false;
            boolean acceptsFlowFileV2 = false;
            boolean acceptsFlowFileV1 = true;
            boolean acceptsGzip = false;
            Integer protocolVersion = null;

            Header[] headers = response.getHeaders(ACCEPT);
            if (headers != null) {
                for (final Header header : headers) {
                    for (final String accepted : header.getValue().split(",")) {
                        final String trimmed = accepted.trim();
                        if (trimmed.equals(APPLICATION_FLOW_FILE_V3)) {
                            acceptsFlowFileV3 = true;
                        } else if (trimmed.equals(APPLICATION_FLOW_FILE_V2)) {
                            acceptsFlowFileV2 = true;
                        } else {
                            // we assume that the destination accepts FlowFile V1 because legacy versions
                            // of NiFi that accepted V1 did not use an Accept header to indicate it... or
                            // any other header. So the bets thing we can do is just assume that V1 is
                            // accepted, if we're going to send as FlowFile.
                            acceptsFlowFileV1 = true;
                        }
                    }
                }
            }

            final Header destinationVersion = response.getFirstHeader(PROTOCOL_VERSION_HEADER);
            if (destinationVersion != null) {
                try {
                    protocolVersion = Integer.valueOf(destinationVersion.getValue());
                } catch (final NumberFormatException e) {
                    // nothing to do here really.... it's an invalid value, so treat the same as if not specified
                }
            }

            if (acceptsFlowFileV3) {
                logger.debug("Connection to URI " + uri + " will be using Content Type " + APPLICATION_FLOW_FILE_V3 + " if sending data as FlowFile");
            } else if (acceptsFlowFileV2) {
                logger.debug("Connection to URI " + uri + " will be using Content Type " + APPLICATION_FLOW_FILE_V2 + " if sending data as FlowFile");
            } else if (acceptsFlowFileV1) {
                logger.debug("Connection to URI " + uri + " will be using Content Type " + APPLICATION_FLOW_FILE_V1 + " if sending data as FlowFile");
            }

            headers = response.getHeaders(ACCEPT_ENCODING);
            if (headers != null) {
                for (final Header header : headers) {
                    for (final String accepted : header.getValue().split(",")) {
                        if (accepted.equalsIgnoreCase("gzip")) {
                            acceptsGzip = true;
                        }
                    }
                }
            }

            if (acceptsGzip) {
                logger.debug("Connection to URI " + uri + " indicates that inline GZIP compression is supported");
            } else {
                logger.debug("Connection to URI " + uri + " indicates that it does NOT support inline GZIP compression");
            }

            return new DestinationAccepts(acceptsFlowFileV3, acceptsFlowFileV2, acceptsFlowFileV1, acceptsGzip, protocolVersion);
        } else {
            logger.warn("Unable to communicate with destination; when attempting to perform an HTTP HEAD, got unexpected response code of " + statusCode + ": " + response.getStatusLine().getReasonPhrase());
            return new DestinationAccepts(false, false, false, false, null);
        }
    }

    private static class DestinationAccepts {

        private final boolean flowFileV1;
        private final boolean flowFileV2;
        private final boolean flowFileV3;
        private final boolean gzip;
        private final Integer protocolVersion;

        public DestinationAccepts(final boolean flowFileV3, final boolean flowFileV2, final boolean flowFileV1,
                final boolean gzip, final Integer protocolVersion) {
            this.flowFileV3 = flowFileV3;
            this.flowFileV2 = flowFileV2;
            this.flowFileV1 = flowFileV1;
            this.gzip = gzip;
            this.protocolVersion = protocolVersion;
        }

        public boolean isFlowFileV3Accepted() {
            return flowFileV3;
        }

        public boolean isFlowFileV2Accepted() {
            return flowFileV2;
        }

        public boolean isFlowFileV1Accepted() {
            return flowFileV1;
        }

        public boolean isGzipAccepted() {
            return gzip;
        }

        public Integer getProtocolVersion() {
            return protocolVersion;
        }
    }

    private static class Config {

        private volatile DestinationAccepts destinationAccepts;
        private final ClientConnectionManager conMan;

        public Config(final ClientConnectionManager conMan) {
            this.conMan = conMan;
        }

        public DestinationAccepts getDestinationAccepts() {
            return this.destinationAccepts;
        }

        public void setDestinationAccepts(final DestinationAccepts destinationAccepts) {
            this.destinationAccepts = destinationAccepts;
        }

        public ClientConnectionManager getConnectionManager() {
            return conMan;
        }
    }
}


text:
if test "x$1" = "x"; then
    echo "Usage: $0 test-name" 1>&2
    exit 1
fi

TESTNAME="$1"
if test "$(basename ${TESTNAME})" = "check-diff";
then
    REFNAME=/dev/null
else
    REFNAME="$(basename $(basename ${TESTNAME} .res) .memres).mc.xml"
fi

exec diff -u "${REFNAME}" "${TESTNAME}"


text:
using System.Collections.Generic;
using NUnit.Framework;
using SFA.DAS.EmployerAccounts.Queries.GetPensionRegulator;

namespace SFA.DAS.EmployerAccounts.UnitTests.Queries.GetPensionRegulatorTests
{
    public class WhenIValidateTheQuery
    {
        private GetPensionRegulatorValidator _validator;

        [SetUp]
        public void Arrange()
        {
            _validator = new GetPensionRegulatorValidator();
        }

        [Test]
        public void ThenTrueIsReturnedWhenAllFieldsArePopulated()
        {
            //Act
            var actual = _validator.Validate(new GetPensionRegulatorRequest {PayeRef = "PayeRefTest"});

            //Assert
            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.IsValid());
        }

        [Test]
        public void ThenFalseIsReturnedAndTheErrorDictionaryPopulatedWhenTheFieldsArentPopulated()
        {
            //Act
            var actual = _validator.Validate(new GetPensionRegulatorRequest { PayeRef = "" });

            //Assert
            Assert.IsFalse(actual.IsValid());
            Assert.Contains(new KeyValuePair<string,string>("PayeRef","PayeRef has not been supplied"), actual.ValidationDictionary);
        }
    }
}


text:
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

/*
# Corrupted initialization in the static struct

...should print &[1, 2, 3] but instead prints something like
&[4492532864, 24]. It is pretty evident that the compiler messed up
with the representation of [int, ..n] and [int] somehow, or at least
failed to typecheck correctly.
*/

extern crate debug;

struct X { vec: &'static [int] }
static V: &'static [X] = &[X { vec: &[1, 2, 3] }];
pub fn main() {
    for &v in V.iter() {
        println!("{:?}", v.vec);
    }
}


text:
package us.kbase.narrativemethodstore;

import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import us.kbase.common.service.UObject;

/**
 *
Original spec-file type: ServiceMethodInputMapping

 *

 * input_parameter - parameter_id, if not specified then one of 'constant_value' or
 *     'narrative_system_variable' should be set.
 * constant_value - constant value, could be even map/array, if not specified then 'input_parameter' or
 *     'narrative_system_variable' should be set.
 * narrative_system_variable - name of internal narrative framework property, currently only these names are
 *     supported: 'workspace', 'token', 'user_id'; if not specified then one of 'input_parameter' or
 *     'constant_value' should be set.
 * generated_value - automatically generated value; it could be used as independent mode or when another mode
 *     finished with empty value (for example in case 'input_parameter' is defined but value of this
 *     parameter is left empty by user); so this mode has lower priority when used with another mode.
 * target_argument_position - position of argument in RPC-method call, optional field, default value is 0.
 * target_property - name of field inside structure that will be send as arguement. Optional field,
 *     in case this field is not defined (or null) whole object will be sent as method argument instead of
 *     wrapping it by structure with inner property defined by 'target_property'.
 * target_type_transform - none/string/int/float/ref, optional field, default is 'none' (it's in plans to
 *     support list<type>, mapping<type> and tuple<t1,t2,...> transformations).
 * @optional input_parameter constant_value narrative_system_variable generated_value
 * @optional target_argument_position target_property target_type_transform
 *

 *
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("com.googlecode.jsonschema2pojo")
@JsonPropertyOrder({
    "input_parameter",
    "constant_value",
    "narrative_system_variable",
    "generated_value",
    "target_argument_position",
    "target_property",
    "target_type_transform"
})
public class ServiceMethodInputMapping {

    @JsonProperty("input_parameter")
    private String inputParameter;
    @JsonProperty("constant_value")
    private UObject constantValue;
    @JsonProperty("narrative_system_variable")
    private String narrativeSystemVariable;
    /**
     *
Original spec-file type: AutoGeneratedValue

     *

     * prefix - optional string concatenated before generated part
     * symbols - number of generated characters, optional, default is 8
     * suffix - optional string concatenated after generated part
     * @optional prefix symbols suffix
     *

     *
     */
    @JsonProperty("generated_value")
    private AutoGeneratedValue generatedValue;
    @JsonProperty("target_argument_position")
    private Long targetArgumentPosition;
    @JsonProperty("target_property")
    private String targetProperty;
    @JsonProperty("target_type_transform")
    private String targetTypeTransform;
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    @JsonProperty("input_parameter")
    public String getInputParameter() {
        return inputParameter;
    }

    @JsonProperty("input_parameter")
    public void setInputParameter(String inputParameter) {
        this.inputParameter = inputParameter;
    }

    public ServiceMethodInputMapping withInputParameter(String inputParameter) {
        this.inputParameter = inputParameter;
        return this;
    }

    @JsonProperty("constant_value")
    public UObject getConstantValue() {
        return constantValue;
    }

    @JsonProperty("constant_value")
    public void setConstantValue(UObject constantValue) {
        this.constantValue = constantValue;
    }

    public ServiceMethodInputMapping withConstantValue(UObject constantValue) {
        this.constantValue = constantValue;
        return this;
    }

    @JsonProperty("narrative_system_variable")
    public String getNarrativeSystemVariable() {
        return narrativeSystemVariable;
    }

    @JsonProperty("narrative_system_variable")
    public void setNarrativeSystemVariable(String narrativeSystemVariable) {
        this.narrativeSystemVariable = narrativeSystemVariable;
    }

    public ServiceMethodInputMapping withNarrativeSystemVariable(String narrativeSystemVariable) {
        this.narrativeSystemVariable = narrativeSystemVariable;
        return this;
    }

    /**
     *
Original spec-file type: AutoGeneratedValue

     *

     * prefix - optional string concatenated before generated part
     * symbols - number of generated characters, optional, default is 8
     * suffix - optional string concatenated after generated part
     * @optional prefix symbols suffix
     *

     *
     */
    @JsonProperty("generated_value")
    public AutoGeneratedValue getGeneratedValue() {
        return generatedValue;
    }

    /**
     *
Original spec-file type: AutoGeneratedValue

     *

     * prefix - optional string concatenated before generated part
     * symbols - number of generated characters, optional, default is 8
     * suffix - optional string concatenated after generated part
     * @optional prefix symbols suffix
     *

     *
     */
    @JsonProperty("generated_value")
    public void setGeneratedValue(AutoGeneratedValue generatedValue) {
        this.generatedValue = generatedValue;
    }

    public ServiceMethodInputMapping withGeneratedValue(AutoGeneratedValue generatedValue) {
        this.generatedValue = generatedValue;
        return this;
    }

    @JsonProperty("target_argument_position")
    public Long getTargetArgumentPosition() {
        return targetArgumentPosition;
    }

    @JsonProperty("target_argument_position")
    public void setTargetArgumentPosition(Long targetArgumentPosition) {
        this.targetArgumentPosition = targetArgumentPosition;
    }

    public ServiceMethodInputMapping withTargetArgumentPosition(Long targetArgumentPosition) {
        this.targetArgumentPosition = targetArgumentPosition;
        return this;
    }

    @JsonProperty("target_property")
    public String getTargetProperty() {
        return targetProperty;
    }

    @JsonProperty("target_property")
    public void setTargetProperty(String targetProperty) {
        this.targetProperty = targetProperty;
    }

    public ServiceMethodInputMapping withTargetProperty(String targetProperty) {
        this.targetProperty = targetProperty;
        return this;
    }

    @JsonProperty("target_type_transform")
    public String getTargetTypeTransform() {
        return targetTypeTransform;
    }

    @JsonProperty("target_type_transform")
    public void setTargetTypeTransform(String targetTypeTransform) {
        this.targetTypeTransform = targetTypeTransform;
    }

    public ServiceMethodInputMapping withTargetTypeTransform(String targetTypeTransform) {
        this.targetTypeTransform = targetTypeTransform;
        return this;
    }

    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperties(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    @Override
    public String toString() {
        return ((((((((((((((((("ServiceMethodInputMapping"+" [inputParameter=")+ inputParameter)+", constantValue=")+ constantValue)+", narrativeSystemVariable=")+ narrativeSystemVariable)+", generatedValue=")+ generatedValue)+", targetArgumentPosition=")+ targetArgumentPosition)+", targetProperty=")+ targetProperty)+", targetTypeTransform=")+ targetTypeTransform)+", additionalProperties=")+ additionalProperties)+"]");
    }

}


text:
<?php

// Portuguese Language Module for eXtplorer (translated by Paulo Brito, geral@oitavaesfera.com, http://www.oitavaesfera.com)
global $_VERSION;

$GLOBALS["charset"] = "UTF-8";
$GLOBALS["text_dir"] = "ltr"; // ('ltr' for left to right, 'rtl' for right to left)
$GLOBALS["date_fmt"] = "d/m/y H:i";
$GLOBALS["error_msg"] = array(
	// error
	"error"			=> "ERRO(S)",
	"back"			=> "Voltar",

	// root
	"home"			=> "A directoria inicial não existe, verifique as configurações.",
	"abovehome"		=> "A directoria actual não pode estar acima da directoria inicial.",
	"targetabovehome"	=> "A directoria alvo não pode estar acima da directoria principal.",

	// exist
	"direxist"		=> "Esta directoria não existe.",
	//"filedoesexist"	=> "Este ficheiro já existe.",
	"fileexist"		=> "Este ficheiro não existe.",
	"itemdoesexist"		=> "Este item já existe.",
	"itemexist"		=> "Este item não existe.",
	"targetexist"		=> "A directoria não existe.",
	"targetdoesexist"	=> "A directoria já existe.",

	// open
	"opendir"		=> "Não é possível abrir a directoria.",
	"readdir"		=> "Não é possível ler a directoria.",

	// access
	"accessdir"		=> "Não está autorizado a aceder a esta directoria.",
	"accessfile"		=> "Não está autorizado a aceder a este ficheiro.",
	"accessitem"		=> "Não está autorizado a aceder a este item.",
	"accessfunc"		=> "Não está autorizado a usar esta função.",
	"accesstarget"		=> "Não está autorizado a aceder à directoria.",

	// actions
	"permread"		=> "Não foi possível visualizar as permissões.",
	"permchange"		=> "Não foi possível modificar as permissões.",
	"openfile"		=> "Não foi possível abrir o ficheiro.",
	"savefile"		=> "Não foi possível gravar o ficheiro.",
	"createfile"		=> "Não foi possível criar o ficheiro.",
	"createdir"		=> "Não foi possível criar a directoria.",
	"uploadfile"		=> "Não foi possível o envio do ficheiro.",
	"copyitem"		=> "Não foi possível a cópia.",
	"moveitem"		=> "Não foi possível mover.",
	"delitem"		=> "Não foi possível apagar o ficheiro.",
	"chpass"		=> "Não foi possível modificar a password.",
	"deluser"		=> "Não foi possível remover o utilizador.",
	"adduser"		=> "Não foi possível adicionar o utilizador.",
	"saveuser"		=> "Não foi possível gravar o utilizador.",
	"searchnothing"		=> "Deve ser inserido um valor para ser feita a procura.",

	// misc
	"miscnofunc"		=> "Função não disponível.",
	"miscfilesize"		=> "O ficheiro ultrapassa o tamanho máximo permitido.",
	"miscfilepart"		=> "O ficheiro foi apenas enviado parcialmente.",
	"miscnoname"		=> "Deve ser fornecido um nome.",
	"miscselitems"		=> "Não foi seleccionado qualquer item.",
	"miscdelitems"		=> "Tem certeza que deseja apagar este(s) {0} item(s)?",
	"miscdeluser"		=> "Tem certeza que deseja apagar o utilizador '{0}'?",
	"miscnopassdiff"	=> "A nova password não é diferente da actual.",
	"miscnopassmatch"	=> "As passwords não são iguais.",
	"miscfieldmissed"	=> "Um campo importante está vazio.",
	"miscnouserpass"	=> "Username ou password incorrectos.",
	"miscselfremove"	=> "Não pode remover-se a si próprio.",
	"miscuserexist"		=> "O utilizador já existe.",
	"miscnofinduser"	=> "Não foi possível encontrar o utilizador.",
	"extract_noarchive" => "O Ficheiro não é um arquivo de extracção.",
	"extract_unknowntype" => "Tipo de Arquivo Desconhecido",

	'chmod_none_not_allowed' => 'Changing Permissions to <none> is not allowed',
	'archive_dir_notexists' => 'The Save-To Directory you have specified does not exist.',
	'archive_dir_unwritable' => 'Please specify a writable directory to save the archive to.',
	'archive_creation_failed' => 'Failed saving the Archive File'
);
$GLOBALS["messages"] = array(
	// links
	"permlink"		=> "MODIFICAR PERMISSÕES",
	"editlink"		=> "EDITAR",
	"downlink"		=> "DOWNLOAD",
	"uplink"		=> "CIMA",
	"homelink"		=> "PÁGINA INICIAL",
	"reloadlink"		=> "ACTUALIZAR",
	"copylink"		=> "COPIAR",
	"movelink"		=> "MOVER",
	"dellink"		=> "APAGAR",
	"comprlink"		=> "ARQUIVO",
	"adminlink"		=> "ADMIN",
	"logoutlink"		=> "LOGOUT",
	"uploadlink"		=> "UPLOAD",
	"searchlink"		=> "PROCURAR",
	"extractlink"	=> "Extrair Arquivo",
	'chmodlink'		=> 'Modificar as Permissões (chmod) (Pasta/Ficheiro(s))', // new mic
	'mossysinfolink'	=> 'eXtplorer Informação do Sistema (eXtplorer, Server, PHP, mySQL)', // new mic
	'logolink'		=> 'Ir para o site do eXtplorer (nova janela)', // new mic

	// list
	"nameheader"		=> "Nome",
	"sizeheader"		=> "Tamanho",
	"typeheader"		=> "Tipo",
	"modifheader"		=> "Modificado",
	"permheader"		=> "Permissões",
	"actionheader"		=> "Acções",
	"pathheader"		=> "Caminho",

	// buttons
	"btncancel"		=> "Cancelar",
	"btnsave"		=> "Gravar",
	"btnchange"		=> "Modificar",
	"btnreset"		=> "Reiniciar",
	"btnclose"		=> "Fechar",
	"btncreate"		=> "Criar",
	"btnsearch"		=> "Procurar",
	"btnupload"		=> "Upload",
	"btncopy"		=> "Copiar",
	"btnmove"		=> "Mover",
	"btnlogin"		=> "Login",
	"btnlogout"		=> "Logout",
	"btnadd"		=> "Novo",
	"btnedit"		=> "Editar",
	"btnremove"		=> "Remover",

	// user messages, new in eXtplorer 1.3.0
	'renamelink'	=> 'RENOMEAR',
	'confirm_delete_file' => 'Tem a certeza que deseja apagar este ficheiro? \\n%s',
	'success_delete_file' => 'Item(s) apagado com sucesso.',
	'success_rename_file' => 'A directoria/ficheiro %s foi renomeada com sucesso para %s.',

	// actions
	"actdir"		=> "Directoria",
	"actperms"		=> "Modificar permissões",
	"actedit"		=> "Editar ficheiro",
	"actsearchresults"	=> "Resultados da procura",
	"actcopyitems"		=> "Copiar item(s)",
	"actcopyfrom"		=> "Copiar de /%s para /%s ",
	"actmoveitems"		=> "Mover item(s)",
	"actmovefrom"		=> "Mover de /%s para /%s ",
	"actlogin"		=> "Login",
	"actloginheader"	=> "Faça o login para usar o QuiXplorer",
	"actadmin"		=> "Administração",
	"actchpwd"		=> "Modificar password",
	"actusers"		=> "utilizadores",
	"actarchive"		=> "Arquivo de item(s)",
	"actupload"		=> "Upload de ficheiro(s)",

	// misc
	"miscitems"		=> "Item(s)",
	"miscfree"		=> "Livres",
	"miscusername"		=> "Username",
	"miscpassword"		=> "Password",
	"miscoldpass"		=> "Password antiga",
	"miscnewpass"		=> "Nova password",
	"miscconfpass"		=> "Confirmar password",
	"miscconfnewpass"	=> "Confirmar a nova password",
	"miscchpass"		=> "Modificar password",
	"mischomedir"		=> "Directoria inicial",
	"mischomeurl"		=> "URL da página inicial",
	"miscshowhidden"	=> "Mostrar items escondidos",
	"mischidepattern"	=> "Esconder esquema",
	"miscperms"		=> "Permissões",
	"miscuseritems"		=> "(nome, directoria inicial, mostrar items escondidos, permissões, activo)",
	"miscadduser"		=> "novo utilizador",
	"miscedituser"		=> "editar utilizador '%s'",
	"miscactive"		=> "Activo",
	"misclang"		=> "Linguagem",
	"miscnoresult"		=> "Não há resultados disponíveis.",
	"miscsubdirs"		=> "Procurar subdirectorias",
	"miscpermnames"		=> array("Ver apenas","Modificar","Alterar password","Modificar a password",
					"Administrador"),
	"miscyesno"		=> array("Sim","Não","Y","N"),
	"miscchmod"		=> array("Proprietário", "Grupo", "Público"),
	// from here all new by mic
	'miscowner'			=> 'Proprietário',
	'miscownerdesc'		=> 'Desccrição:
Utilizador (UID) /
Grupo (GID)
Permissões Actuais:
 %s ( %s ) /
 %s ( %s )',

	// sysinfo (new by mic)
	'simamsysinfo'		=> 'eXtplorer Info Sistema',
	'sisysteminfo'		=> 'Info Sistema',
	'sibuilton'			=> 'Sistema Operativo',
	'sidbversion'		=> 'Versão da Base de Dados (MySQL)',
	'siphpversion'		=> 'Versão de PHP',
	'siphpupdate'		=> 'INFORMAÇÃO: A versão de PHP usada não está actualizada!
Para garantir todas as funções e possibilidades do eXtplorer e dos addons,
deve estar a usar pelo menos a Versão 4.3 do PHP!',
	'siwebserver'		=> 'Servidor Web',
	'siwebsphpif'		=> 'Servidor Web - PHP Interface',
	'simamboversion'	=> 'eXtplorer Versão',
	'siuseragent'		=> 'Versão do Browser',
	'sirelevantsettings' => 'Configurações de PHP Importantes',
	'sisafemode'		=> 'Safe Mode',
	'sibasedir'			=> 'Open basedir',
	'sidisplayerrors'	=> 'Erros de PHP',
	'sishortopentags'	=> 'Short Open Tags',
	'sifileuploads'		=> 'Datei Uploads',
	'simagicquotes'		=> 'Magic Quotes',
	'siregglobals'		=> 'Registar Globais',
	'sioutputbuf'		=> 'Output Buffer',
	'sisesssavepath'	=> 'Session Savepath',
	'sisessautostart'	=> 'Session auto start',
	'sixmlenabled'		=> 'XML enabled',
	'sizlibenabled'		=> 'ZLIB enabled',
	'sidisabledfuncs'	=> 'Non enabled functions',
	'sieditor'			=> 'Editor WYSIWYG',
	'siconfigfile'		=> 'Configuration File',
	'siphpinfo'			=> 'PHP Info',
	'siphpinformation'	=> 'PHP Information',
	'sipermissions'		=> 'Permissions',
	'sidirperms'		=> 'Directory Permissions',
	'sidirpermsmess'	=> 'Para ter certeza que todas as funções e possibilidades do eXtplorer estão a funcionar correctamente, as seguintes pastas devem ter a permissão de escrita [chmod 0777]',
	'sionoff'			=> array( 'On', 'Off' ),

	'extract_warning' => "Deseja mesmo extrair este ficheiro? Aqui?\\nIsto irá apagar ficheiros existentes se não for usado com cuidado!",
	'extract_success' => "A extracção foi um sucesso",
	'extract_failure' => "A extracção falhou",

	'overwrite_files' => 'Overwrite existing file(s)?',
	"viewlink"		=> "VIEW",
	"actview"		=> "Showing source of file",

	// added by Paulino Michelazzo (paulino@michelazzo.com.br) to fun_chmod.php file
	'recurse_subdirs'	=> 'Recurse into subdirectories?',

	// added by Paulino Michelazzo (paulino@michelazzo.com.br) to footer.php file
	'check_version'	=> 'Check for latest version',

	// added by Paulino Michelazzo (paulino@michelazzo.com.br) to fun_rename.php file
	'rename_file'	=>	'Rename a directory or file...',
	'newname'		=>	'New Name',

	// added by Paulino Michelazzo (paulino@michelazzo.com.br) to fun_edit.php file
	'returndir'	=>	'Return to directory after saving?',
	'line'		=> 	'Line',
	'column'	=>	'Column',
	'wordwrap'	=>	'Wordwrap: (IE only)',
	'copyfile'	=>	'Copy file into this filename',

	// Bookmarks
	'quick_jump' => 'Quick Jump To',
	'already_bookmarked' => 'This directory is already bookmarked',
	'bookmark_was_added' => 'This directory was added to the bookmark list.',
	'not_a_bookmark' => 'This directory is not a bookmark.',
	'bookmark_was_removed' => 'This directory was removed from the bookmark list.',
	'bookmarkfile_not_writable' => "Failed to %s the bookmark.\n The Bookmark File '%s' \nis not writable.",

	'lbl_add_bookmark' => 'Add this Directory as Bookmark',
	'lbl_remove_bookmark' => 'Remove this Directory from the Bookmark List',

	'enter_alias_name' => 'Please enter the alias name for this bookmark',

	'normal_compression' => 'normal compression',
	'good_compression' => 'good compression',
	'best_compression' => 'best compression',
	'no_compression' => 'no compression',

	'creating_archive' => 'Creating Archive File...',
	'processed_x_files' => 'Processed %s of %s Files',

	'ftp_header' => 'Local FTP Authentication',
	'ftp_login_lbl' => 'Please enter the login credentials for the FTP server',
	'ftp_login_name' => 'FTP User Name',
	'ftp_login_pass' => 'FTP Password',
	'ftp_hostname_port' => 'FTP Server Hostname and Port
(Port is optional)',
	'ftp_login_check' => 'Checking FTP connection...',
	'ftp_connection_failed' => "The FTP server could not be contacted. \nPlease check that the FTP server is running on your server.",
	'ftp_login_failed' => "The FTP login failed. Please check the username and password and try again.",

	'switch_file_mode' => 'Current mode: %s. You could switch to %s mode.',
	'symlink_target' => 'Target of the Symbolic Link',

	"permchange"		=> "CHMOD Success:",
	"savefile"		=> "The File was saved.",
	"moveitem"		=> "Moving succeeded.",
	"copyitem"		=> "Copying succeeded.",
	'archive_name' 	=> 'Name of the Archive File',
	'archive_saveToDir' 	=> 'Save the Archive in this directory',

	'editor_simple'	=> 'Simple Editor Mode',
	'editor_syntaxhighlight'	=> 'Syntax-Highlighted Mode',

	'newlink'	=> 'New File/Directory',
	'show_directories' => 'Show Directories',
	'actlogin_success' => 'Login successful!',
	'actlogin_failure' => 'Login failed, try again.',
	'directory_tree' => 'Directory Tree',
	'browsing_directory' => 'Browsing Directory',
	'filter_grid' => 'Filter',
	'paging_page' => 'Page',
	'paging_of_X' => 'of {0}',
	'paging_firstpage' => 'First Page',
	'paging_lastpage' => 'Last Page',
	'paging_nextpage' => 'Next Page',
	'paging_prevpage' => 'Previous Page',

	'paging_info' => 'Displaying Items {0} - {1} of {2}',
	'paging_noitems' => 'No items to display',
	'aboutlink' => 'About...',
	'password_warning_title' => 'Important - Change your Password!',
	'password_warning_text' => 'The user account you are logged in with (admin with password admin) corresponds to the default eXtplorer priviliged account. Your eXtplorer installation is open to intrusion and you should immediately fix this security hole!',
	'change_password_success' => 'Your Password has been changed!',
	'success' => 'Success',
	'failure' => 'Failure',
	'dialog_title' => 'Website Dialog',
	'upload_processing' => 'Processing Upload, please wait...',
	'upload_completed' => 'Upload successful!',
	'acttransfer' => 'Transfer from another Server',
	'transfer_processing' => 'Processing Server-to-Server Transfer, please wait...',
	'transfer_completed' => 'Transfer completed!',
	'max_file_size' => 'Maximum File Size',
	'max_post_size' => 'Maximum Upload Limit',
	'done' => 'Done.',
	'permissions_processing' => 'Applying Permissions, please wait...',
	'archive_created' => 'The Archive File has been created!',
	'save_processing' => 'Saving File...',
	'current_user' => 'This script currently runs with the permissions of the following user:',
	'your_version' => 'Your Version',
	'search_processing' => 'Searching, please wait...',
	'url_to_file' => 'URL of the File',
	'file' => 'File'
);
?>


text:
using System;
using UnityEngine;

namespace UnityStandardAssets.CrossPlatformInput
{
    public class InputAxisScrollbar : MonoBehaviour
    {
        public string axis;

	    void Update() { }

	    public void HandleInput(float value)
        {
            CrossPlatformInputManager.SetAxis(axis, (value*2f) - 1f);
        }
    }
}


text:
//
//  TRTransitionInteractiveControllerProtocol.h
//  TRTransitions

#import <Foundation/Foundation.h>

@protocol TRTransitionInteractiveControllerProtocol <NSObject>

- (id<UIViewControllerInteractiveTransitioning>)interactiveController;

@end


text:
""" Test Fixture """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function

def test_add_test_project(build_worktree):
    """ Test Add Test Project """
    _world = build_worktree.add_test_project("world")
    assert build_worktree.get_build_project("world")


text:
package com.bignerdranchldp.android.runtracker.loader;

import android.content.Context;

import com.bignerdranchldp.android.runtracker.domain.LocationData;
import com.bignerdranchldp.android.runtracker.manager.RunManager;

public class LastLocationDataLoader extends DataLoader<LocationData>{

	private long mRunId;

	public LastLocationDataLoader(Context context,long runId) {
		super(context);
		mRunId = runId;
	}

	@Override
	public LocationData loadInBackground() {

		return RunManager.getInstance(getContext()).queryLatestLocationDataByRunId(mRunId);
	}

}


text:
package predicate

import (
	"sigs.k8s.io/controller-runtime/pkg/event"
	logf "sigs.k8s.io/controller-runtime/pkg/internal/log"
)

var log = logf.RuntimeLog.WithName("predicate").WithName("eventFilters")

// Predicate filters events before enqueuing the keys.
type Predicate interface {
	// Create returns true if the Create event should be processed
	Create(event.CreateEvent) bool

	// Delete returns true if the Delete event should be processed
	Delete(event.DeleteEvent) bool

	// Update returns true if the Update event should be processed
	Update(event.UpdateEvent) bool

	// Generic returns true if the Generic event should be processed
	Generic(event.GenericEvent) bool
}

var _ Predicate = Funcs{}
var _ Predicate = ResourceVersionChangedPredicate{}
var _ Predicate = GenerationChangedPredicate{}

// Funcs is a function that implements Predicate.
type Funcs struct {
	// Create returns true if the Create event should be processed
	CreateFunc func(event.CreateEvent) bool

	// Delete returns true if the Delete event should be processed
	DeleteFunc func(event.DeleteEvent) bool

	// Update returns true if the Update event should be processed
	UpdateFunc func(event.UpdateEvent) bool

	// Generic returns true if the Generic event should be processed
	GenericFunc func(event.GenericEvent) bool
}

// Create implements Predicate
func (p Funcs) Create(e event.CreateEvent) bool {
	if p.CreateFunc != nil {
		return p.CreateFunc(e)
	}
	return true
}

// Delete implements Predicate
func (p Funcs) Delete(e event.DeleteEvent) bool {
	if p.DeleteFunc != nil {
		return p.DeleteFunc(e)
	}
	return true
}

// Update implements Predicate
func (p Funcs) Update(e event.UpdateEvent) bool {
	if p.UpdateFunc != nil {
		return p.UpdateFunc(e)
	}
	return true
}

// Generic implements Predicate
func (p Funcs) Generic(e event.GenericEvent) bool {
	if p.GenericFunc != nil {
		return p.GenericFunc(e)
	}
	return true
}

// ResourceVersionChangedPredicate implements a default update predicate function on resource version change
type ResourceVersionChangedPredicate struct {
	Funcs
}

// Update implements default UpdateEvent filter for validating resource version change
func (ResourceVersionChangedPredicate) Update(e event.UpdateEvent) bool {
	if e.MetaOld == nil {
		log.Error(nil, "UpdateEvent has no old metadata", "event", e)
		return false
	}
	if e.ObjectOld == nil {
		log.Error(nil, "GenericEvent has no old runtime object to update", "event", e)
		return false
	}
	if e.ObjectNew == nil {
		log.Error(nil, "GenericEvent has no new runtime object for update", "event", e)
		return false
	}
	if e.MetaNew == nil {
		log.Error(nil, "UpdateEvent has no new metadata", "event", e)
		return false
	}
	if e.MetaNew.GetResourceVersion() == e.MetaOld.GetResourceVersion() {
		return false
	}
	return true
}

// GenerationChangedPredicate implements a default update predicate function on Generation change.
//
// This predicate will skip update events that have no change in the object's metadata.generation field.
// The metadata.generation field of an object is incremented by the API server when writes are made to the spec field of an object.
// This allows a controller to ignore update events where the spec is unchanged, and only the metadata and/or status fields are changed.
//
// For CustomResource objects the Generation is only incremented when the status subresource is enabled.
//
// Caveats:
//
// * The assumption that the Generation is incremented only on writing to the spec does not hold for all APIs.
// E.g For Deployment objects the Generation is also incremented on writes to the metadata.annotations field.
// For object types other than CustomResources be sure to verify which fields will trigger a Generation increment when they are written to.
//
// * With this predicate, any update events with writes only to the status field will not be reconciled.
// So in the event that the status block is overwritten or wiped by someone else the controller will not self-correct to restore the correct status.
type GenerationChangedPredicate struct {
	Funcs
}

// Update implements default UpdateEvent filter for validating generation change
func (GenerationChangedPredicate) Update(e event.UpdateEvent) bool {
	if e.MetaOld == nil {
		log.Error(nil, "Update event has no old metadata", "event", e)
		return false
	}
	if e.ObjectOld == nil {
		log.Error(nil, "Update event has no old runtime object to update", "event", e)
		return false
	}
	if e.ObjectNew == nil {
		log.Error(nil, "Update event has no new runtime object for update", "event", e)
		return false
	}
	if e.MetaNew == nil {
		log.Error(nil, "Update event has no new metadata", "event", e)
		return false
	}
	if e.MetaNew.GetGeneration() == e.MetaOld.GetGeneration() {
		return false
	}
	return true
}


text:
import Client from "../Client.js";

let articleList = [];
let articleListCapacity = 0;

let articleDetails = {};
let articleDetailsPromises = {};

let changeListeners = [];

let notifyChange = () => {
  changeListeners.forEach((listener) => {
    listener();
  });
}

class ArticleStore {

  // Actions

  provideArticle(articleSlug) {
    if (articleDetailsPromises[articleSlug]) {
      return;
    }

    articleDetailsPromises[articleSlug] = Client.getItems({
      "system.type": "article",
      "elements.url_pattern": articleSlug
    }).then((response) => {
      if (response.items.length > 0) {
        articleDetails[articleSlug] = response.items[0];
        notifyChange();
      }
    });
  }

  provideArticles(count) {
    if (count <= articleListCapacity) {
      return;
    }

    articleListCapacity = count;

    Client.getItems({
      "system.type": "article",
      "elements": "title,teaser_image,post_date,summary,url_pattern",
      "order": "elements.post_date[DESC]"
    }).then((response) => {
      articleList = response.items;
      notifyChange();
    });
  }

  // Methods

  getArticle(articleSlug) {
    return articleDetails[articleSlug];
  }

  getArticles(count) {
    return articleList.slice(0, count);
  }

  // Listeners

  addChangeListener(listener) {
    changeListeners.push(listener);
  }

  removeChangeListener(listener) {
    changeListeners = changeListeners.filter((element) => {
      return element !== listener;
    });
  }

}

export default new ArticleStore();


text:
package shapes;

import java.awt.*;

/**
 * An isosceles triangle that appears on screen and interacts with other
 * shapes. Many of Triangle's useful methods are in its
 * superclass {@link Shape}.
 *

 */
public class Triangle extends ConvexPolygon {
  private double size;

  /**
   * Constructs a new triangle with the given center location and size. See
   * {@link #setSize} for more information about triangle size.
   *
   * @param center  the location of the triangle's center.
   * @param size    the size of the triangle (see {@link #setSize}).
   */
  public Triangle(Point center, double size) {
    super();
    setCenter(center);
    setSize(size);

    // set defaults
    setColor(Color.YELLOW);
  }

  /**
   * Constructs a default triangle.
   */
  public Triangle() {
    this(new Point(20, 400), 10);
  }

  // Override this!
  public void setup() {}

  // Override this!
  public void update() {}

  // Contract: zeroth corner is the tip
  Point[] getUnrotatedCorners() {
    return new Point[] {
      getCenter().translation(new Vector(size, 0)),
      getCenter().translation(new Vector(-size, size)),
      getCenter().translation(new Vector(-size, -size))
    };
  }

  /**
   * Returns the location of the tip of the triangle. The triangle is an
   * isoceles triangle with two long sides and one short side. The tip is the
   * corner between the two long sides. The tip points in the direction the
   * triangle is facing.
   *
   * @return  the location of the tip of the triangle.
   */
  public Point getTip() {
    return getCorners()[0];
  }

  /**
   * Set this triangle's size. The length of the triangle's side opposite the
   * tip is equal to size, and the length of the altitude from the tip
   * to that size is size * 2.
   *

   * Basically, the triangle is pointy.
   *
   * @param size  the new size of the triangle.
   * @see   #getSize
   */
  public void setSize(double size) {
    if (size <= 0.0) {
      throw new IllegalArgumentException("size must be positive.");
    }
    this.size = size;
  }

  /**
   * Returns this triangle's size. See {@link #setSize} for the exact meaning
   * of size.
   *
   * @return  this triangle's size.
   * @see     #setSize
   */
  public double getSize() {
    return size;
  }
}


text: $(el).find(selector)