text:
.class public Lcom/samsung/android/penselect/PenSelectionController;
.super Ljava/lang/Object;
.source "PenSelectionController.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;
    }
.end annotation

# static fields
.field private static final TAG:Ljava/lang/String; = "PenSelectController"

.field private static sInstance:Lcom/samsung/android/penselect/PenSelectionController;

# direct methods
.method private constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static getInstance()Lcom/samsung/android/penselect/PenSelectionController;
    .locals 1

    sget-object v0, Lcom/samsung/android/penselect/PenSelectionController;->sInstance:Lcom/samsung/android/penselect/PenSelectionController;

    if-nez v0, :cond_0

    new-instance v0, Lcom/samsung/android/penselect/PenSelectionController;

    invoke-direct {v0}, Lcom/samsung/android/penselect/PenSelectionController;-><init>()V

    sput-object v0, Lcom/samsung/android/penselect/PenSelectionController;->sInstance:Lcom/samsung/android/penselect/PenSelectionController;

    :cond_0
    sget-object v0, Lcom/samsung/android/penselect/PenSelectionController;->sInstance:Lcom/samsung/android/penselect/PenSelectionController;

    return-object v0
.end method

.method private getPenSelectionContents(Landroid/content/Context;Landroid/view/View;Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;)Z
    .locals 9

    const/4 v2, 0x0

    invoke-direct {p0, p2}, Lcom/samsung/android/penselect/PenSelectionController;->isVisibleView(Landroid/view/View;)Z

    move-result v7

    if-eqz v7, :cond_0

    instance-of v7, p2, Landroid/widget/TextView;

    if-eqz v7, :cond_2

    move-object v5, p2

    check-cast v5, Landroid/widget/TextView;

    invoke-virtual {v5}, Landroid/widget/TextView;->hasMultiSelection()Z

    move-result v7

    if-eqz v7, :cond_0

    invoke-virtual {v5}, Landroid/widget/TextView;->getMultiSelectionText()Ljava/lang/CharSequence;

    move-result-object v4

    invoke-static {v4}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v7

    if-nez v7, :cond_0

    iget-object v7, p3, Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;->mContentStr:Ljava/lang/String;

    invoke-static {v7}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v7

    if-eqz v7, :cond_1

    invoke-interface {v4}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v7

    iput-object v7, p3, Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;->mContentStr:Ljava/lang/String;

    :goto_0
    const/4 v2, 0x1

    :cond_0
    return v2

    :cond_1
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v8, p3, Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;->mContentStr:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string/jumbo v8, "\n"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-interface {v4}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    iput-object v7, p3, Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;->mContentStr:Ljava/lang/String;

    goto :goto_0

    :cond_2
    instance-of v7, p2, Landroid/view/ViewGroup;

    if-eqz v7, :cond_0

    move-object v6, p2

    check-cast v6, Landroid/view/ViewGroup;

    invoke-virtual {v6}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v1

    const/4 v3, 0x0

    :goto_1
    if-ge v3, v1, :cond_0

    invoke-virtual {v6, v3}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    invoke-direct {p0, p1, v0, p3}, Lcom/samsung/android/penselect/PenSelectionController;->getPenSelectionContents(Landroid/content/Context;Landroid/view/View;Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;)Z

    move-result v7

    if-eqz v7, :cond_3

    const/4 v2, 0x1

    :cond_3
    add-int/lit8 v3, v3, 0x1

    goto :goto_1
.end method

.method private isVisibleView(Landroid/view/View;)Z
    .locals 2

    const/4 v0, 0x0

    if-eqz p1, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getVisibility()I

    move-result v1

    if-nez v1, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getWidth()I

    move-result v1

    if-lez v1, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getHeight()I

    move-result v1

    if-lez v1, :cond_0

    const/4 v0, 0x1

    :cond_0
    return v0
.end method

# virtual methods
.method public checkRectInView(Landroid/view/View;Landroid/graphics/Rect;)Z
    .locals 7

    const/4 v6, 0x1

    const/4 v4, 0x0

    invoke-virtual {p1}, Landroid/view/View;->getVisibility()I

    move-result v2

    if-eqz v2, :cond_0

    return v4

    :cond_0
    const/4 v2, 0x2

    new-array v1, v2, [I

    invoke-virtual {p1, v1}, Landroid/view/View;->getLocationOnScreen([I)V

    new-instance v0, Landroid/graphics/Rect;

    aget v2, v1, v4

    aget v3, v1, v6

    aget v4, v1, v4

    invoke-virtual {p1}, Landroid/view/View;->getWidth()I

    move-result v5

    add-int/2addr v4, v5

    aget v5, v1, v6

    invoke-virtual {p1}, Landroid/view/View;->getHeight()I

    move-result v6

    add-int/2addr v5, v6

    invoke-direct {v0, v2, v3, v4, v5}, Landroid/graphics/Rect;-><init>(IIII)V

    invoke-virtual {v0, p2}, Landroid/graphics/Rect;->contains(Landroid/graphics/Rect;)Z

    move-result v2

    return v2
.end method

.method public clearAllPenSelection(Landroid/content/Context;Landroid/view/View;)Z
    .locals 7

    move-object v5, p2

    instance-of v6, p2, Landroid/widget/TextView;

    if-eqz v6, :cond_1

    move-object v3, p2

    check-cast v3, Landroid/widget/TextView;

    invoke-virtual {v3}, Landroid/widget/TextView;->hasMultiSelection()Z

    move-result v6

    if-eqz v6, :cond_0

    invoke-virtual {v3}, Landroid/widget/TextView;->clearMultiSelection()Z

    :cond_0
    const/4 v6, 0x1

    return v6

    :cond_1
    instance-of v6, p2, Landroid/view/ViewGroup;

    if-eqz v6, :cond_0

    move-object v4, p2

    check-cast v4, Landroid/view/ViewGroup;

    invoke-virtual {v4}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v1

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v1, :cond_0

    invoke-virtual {v4, v2}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {p0, p1, v0}, Lcom/samsung/android/penselect/PenSelectionController;->clearAllPenSelection(Landroid/content/Context;Landroid/view/View;)Z

    add-int/lit8 v2, v2, 0x1

    goto :goto_0
.end method

.method public findTargetTextView(Landroid/content/Context;Landroid/view/View;Landroid/graphics/Rect;)Landroid/view/View;
    .locals 9

    const/4 v8, 0x0

    move-object v6, p2

    invoke-virtual {p0, p2, p3}, Lcom/samsung/android/penselect/PenSelectionController;->checkRectInView(Landroid/view/View;Landroid/graphics/Rect;)Z

    move-result v7

    if-eqz v7, :cond_5

    instance-of v7, p2, Landroid/view/ViewGroup;

    if-eqz v7, :cond_4

    move-object v5, p2

    check-cast v5, Landroid/view/ViewGroup;

    const/4 v4, 0x0

    invoke-virtual {v5}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v2

    if-nez v2, :cond_1

    instance-of v7, p2, Landroid/webkit/WebView;

    if-eqz v7, :cond_0

    return-object p2

    :cond_0
    invoke-virtual {v5}, Landroid/view/ViewGroup;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    if-eqz v0, :cond_1

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->isVisible()Z

    move-result v7

    if-eqz v7, :cond_1

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getOpacity()I

    move-result v7

    const/4 v8, -0x2

    if-le v7, v8, :cond_1

    return-object p2

    :cond_1
    add-int/lit8 v3, v2, -0x1

    :goto_0
    if-ltz v3, :cond_2

    invoke-virtual {v5, v3}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    invoke-virtual {p0, p1, v1, p3}, Lcom/samsung/android/penselect/PenSelectionController;->findTargetTextView(Landroid/content/Context;Landroid/view/View;Landroid/graphics/Rect;)Landroid/view/View;

    move-result-object v4

    if-eqz v4, :cond_3

    :cond_2
    return-object v4

    :cond_3
    add-int/lit8 v3, v3, -0x1

    goto :goto_0

    :cond_4
    return-object p2

    :cond_5
    return-object v8
.end method

.method public getPenSelectionContents(Landroid/content/Context;Landroid/view/View;)Ljava/lang/String;
    .locals 2

    new-instance v0, Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;

    invoke-direct {v0}, Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;-><init>()V

    invoke-direct {p0, p1, p2, v0}, Lcom/samsung/android/penselect/PenSelectionController;->getPenSelectionContents(Landroid/content/Context;Landroid/view/View;Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;)Z

    iget-object v1, v0, Lcom/samsung/android/penselect/PenSelectionController$PenSelectionContents;->mContentStr:Ljava/lang/String;

    return-object v1
.end method

.method public isPenSelectionArea(Landroid/content/Context;Landroid/view/View;II)Z
    .locals 8

    const/4 v7, 0x1

    move-object v5, p2

    instance-of v6, p2, Landroid/widget/TextView;

    if-eqz v6, :cond_0

    move-object v3, p2

    check-cast v3, Landroid/widget/TextView;

    invoke-virtual {v3}, Landroid/widget/TextView;->hasMultiSelection()Z

    move-result v6

    if-eqz v6, :cond_2

    invoke-virtual {v3, p3, p4}, Landroid/widget/TextView;->isMultiSelectionLinkArea(II)Z

    move-result v6

    if-eqz v6, :cond_2

    return v7

    :cond_0
    instance-of v6, p2, Landroid/view/ViewGroup;

    if-eqz v6, :cond_2

    move-object v4, p2

    check-cast v4, Landroid/view/ViewGroup;

    invoke-virtual {v4}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v1

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v1, :cond_2

    invoke-virtual {v4, v2}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {p0, p1, v0, p3, p4}, Lcom/samsung/android/penselect/PenSelectionController;->isPenSelectionArea(Landroid/content/Context;Landroid/view/View;II)Z

    move-result v6

    if-eqz v6, :cond_1

    return v7

    :cond_1
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_2
    const/4 v6, 0x0

    return v6
.end method


text:
package com.gdgssu.rowclient.remote;

import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.wearable.view.WatchViewStub;
import android.util.Log;
import android.view.View;

import com.gdgssu.rowclient.R;
import com.gdgssu.rowclient.model.FuncEvent;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.wearable.DataMap;
import com.google.android.gms.wearable.PutDataMapRequest;
import com.google.android.gms.wearable.Wearable;

import java.util.Random;
import java.util.concurrent.TimeUnit;

public class RemoteActivity extends Activity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {

    private static final String TAG = RemoteActivity.class.getSimpleName();

    private GoogleApiClient mGoogleApiClient;
    public static int remotestatic = -1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        initGoogleApiClient();

        int remoteState = getIntent().getIntExtra("remote", -1);

        if (remoteState == -1) {
            try {
                throw new Exception("remote status is strange");
            } catch (Exception e) {
                e.printStackTrace();
            }
        } else if (remoteState == 0) {
            initTV();
        } else if (remoteState == 1) {
            initAircon();
        }
    }

    @Override
    protected void onStart() {
        super.onStart();
        mGoogleApiClient.connect();

    }

    @Override
    protected void onStop() {
        super.onStop();

        mGoogleApiClient.disconnect();
    }

    private void initGoogleApiClient() {
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addApi(Wearable.API)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build();
    }

    private void initAircon() {
        setContentView(R.layout.activity_remote_aircon);
        final WatchViewStub stub = (WatchViewStub) findViewById(R.id.remote_aircon_stub);
        stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
            @Override
            public void onLayoutInflated(WatchViewStub stub) {
                stub.findViewById(R.id.remote_aircon_up).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        sendFuncData();
                        remotestatic = 0;
                    }
                });
                stub.findViewById(R.id.remote_aircon_down).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        sendFuncData();
                        remotestatic = 1;
                    }
                });
            }
        });
    }

    private void sendFuncData() {

        new SendDataTask().execute();

    }

    private void initTV() {
        setContentView(R.layout.activity_remote_tv);
    }

    @Override
    public void onConnected(Bundle bundle) {

    }

    @Override
    public void onConnectionSuspended(int i) {

    }

    @Override
    public void onConnectionFailed(ConnectionResult connectionResult) {

    }

    public class SendDataTask extends AsyncTask<Void, Void, Void> {

        @Override
        protected Void doInBackground(Void... voids) {
            mGoogleApiClient.blockingConnect(100, TimeUnit.MILLISECONDS);

            final PutDataMapRequest putDataMapRequest = PutDataMapRequest.create("/func");
            DataMap dataMap = putDataMapRequest.getDataMap();
            dataMap.putInt("INT", remotestatic);

            if (mGoogleApiClient.isConnected()) {
                Log.d("Shot", "SHot");
                Wearable.DataApi.putDataItem(
                        mGoogleApiClient, putDataMapRequest.asPutDataRequest()).await();
            } else {
                Log.e(TAG, "Failed to send data item: " + putDataMapRequest
                        + " - Client disconnected from Google Play Services");
            }

            return null;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
'use strict';

var Options      = require('../lib/options');
var Preprocessor = require('../lib/preprocessor');
var postcss      = require('postcss');

/**
 *
 * Constructor Pleeease
 * @param {Object} options
 *
 */
var Pleeease = function (options) {

  options = options || {};

  this.defaults = new Options().defaults;
  this.setOptions(options);

  var importer       = require('postcss-import');
  var urlifier       = require('postcss-url');
  var media          = require('postcss-custom-media');
  var vars           = require('postcss-custom-properties');
  var calc           = require('postcss-calc');
  var color          = require('postcss-color');
  var filter         = require('pleeease-filters');
  var rem            = require('pixrem');
  var pseudoElements = require('postcss-pseudoelements');
  var opacity        = require('postcss-opacity');
  var mqpacker       = require('css-mqpacker');
  var prefixer       = require('autoprefixer-core');
  var minifier       = require('csswring');

  var opts;

  var processors = [];
  var processorsFn = [
    (opts = this.options.import)                ? importer(opts)                : false,
    (opts = this.options.rebaseUrls)            ? urlifier()                    : false,
    (opts = this.options.next.customMedia)      ? media()                       : false,
    (opts = this.options.next.customProperties) ? vars(opts)                    : false,
    (opts = this.options.next.calc)             ? calc()                        : false,
    (opts = this.options.next.colors)           ? color()                       : false,
    (opts = this.options.filters)               ? filter(opts).postcss          : false,
    (opts = this.options.rem)                   ? rem.apply(null, opts).postcss : false,
    (opts = this.options.pseudoElements)        ? pseudoElements()              : false,
    (opts = this.options.opacity)               ? opacity()                     : false,
    (opts = this.options.mqpacker)              ? mqpacker.postcss              : false,
    (opts = this.options.autoprefixer)          ? prefixer(opts)                : false,
    (opts = this.options.minifier)              ? minifier(opts).postcss        : false
  ];

  // remove false
  processorsFn.forEach(function (processor) {
    if (processor) {
      processors.push(processor);
    }
  });

  this.processors = processors;

  this.postcss = this.process.bind(this);

};

/**
 *
 * Parse stylesheets
 * @param  {String} css
 * @return {Object} PostCSS AST
 *
 */
Pleeease.prototype.parse = function (css) {

  var opts = this.options;

  if (opts.sass || opts.less || opts.stylus) {
    var preprocess = new Preprocessor(css, opts);
    // Sass
    if (opts.sass) {
      preprocess = preprocess.sass();
    }
    // LESS
    if (opts.less) {
      preprocess = preprocess.less();
    }
    // Stylus
    if (opts.stylus) {
      preprocess = preprocess.stylus();
    }
    // add previous map and switch from and to
    if (opts.sourcemaps) {
      if (opts.sourcemaps.map) {
        opts.sourcemaps.map.prev = preprocess.map;
      }
      opts.sourcemaps.from = opts.sourcemaps.to;
    }
    css = preprocess.css;
  }

  var sourcemaps = opts.sourcemaps;
  if (!sourcemaps) {
    sourcemaps = {
      map: false
    };
  }

  return postcss.parse(css, sourcemaps);

};

/**
 *
 * Pipe all modules
 * @return {Object} PostCSS pipeline
 *
 */
Pleeease.prototype.pipeline = function () {

  var pipeline = postcss();

  this.processors.forEach(function (processor) {
    pipeline.use(processor);
  });

  return pipeline;

};

/**
 *
 * Process stylesheet (chain and apply all postprocessors)
 * @param  {String} css
 * @return {String|Object} Processed css as String or Object.css|Object.map if sourcemaps is true
 *
 */
Pleeease.prototype.process = function (css) {

  var opts = this.options;

  var result = this.pipeline().process(css, opts.sourcemaps);

  // return result.css and/or result.map
  if (opts.sourcemaps && (opts.sourcemaps.map && !opts.sourcemaps.map.inline)) {
    return result;
  }
  return result.css;

};

/**
 *
 * Set new options in pleeease.options
 * @param {Object} opts
 *
 */
Pleeease.prototype.setOptions = function (opts) {

  var newOpts = new Options();
  // extend this.options
  newOpts.options = newOpts.extend(this.options);
  // extend specific
  newOpts.options = newOpts.extend(opts);
  this.options = newOpts.options;

};

/**
 *
 * New Pleeease instance
 *
 */
var pleeease = function (options) {
  return new Pleeease(options);
};
pleeease.postcss = function (css) {
  return new Pleeease().postcss(css);
};
pleeease.process = function (css, options) {

  if (arguments.length === 0) {
    throw new Error('CSS missing in pleeease.process()');
  }

  var processor = new Pleeease(options);

  try {
    // parse CSS first, then process it
    css = processor.parse(css);
    return processor.process(css);
  } catch (err) {
    throw new Error(err.message);
  }

};

/**
 *
 * Exports
 *
 */
module.exports = pleeease;


text:
layout: post
title: Sector
name: sector
---

The sector, which looks extremely similar to Pac-Man, is another shape that makes use of SVG's excellent arc command.

{% highlight html %}
<svg width='400px' height='400px'>
	<path d="M200,200 L338,120 A160,160 0 1,0 338,280 Z" fill="none" stroke="#333" stroke-width="2" />
</svg>
{% endhighlight %}

The path data can be broken into the following chunks:

* `M200,200` moves the pointer to the middle of the sector
* `L338,120` draws a line from the center to the point where the arc will begin
* `A160,160 0 1,0 338,280` draws a circular arc of radius `160` all the way round to the opposite side
from where the arc originally began
* `Z` draws a straight line back to the center

We can use trigonometry to find the exact coodinates of the start and end points of the arc. If
`cx,cy` indicate the center of the sector, and `angle` is the size of the Pac-Man's mouth (in radians), then
the coordinates can be calculated with the following equations:

{% highlight js %}
arcStart = cx + (radius*Math.cos(angle/2)), cy - (radius*Math.sin(angle/2);
arcEnd = cx + (radius*Math.cos(angle/2)), cy + (radius*Math.sin(angle/2);
{% endhighlight %}

The only other caveat of which you should be aware is that we need to implement a conditional to make sure that
the `large-arc-flag` is set to `1` only if the angle is greater than 180°.


text:
using System.Collections.Generic;
using System.Diagnostics.Contracts;

namespace Tailviewer.Api
{
	/// <summary>
	/// The interface for a filter that is responsible for deciding whether or not an entire log entry shall be visible
	/// or not.
	/// </summary>
	public interface ILogEntryFilter
		: ILogLineFilter
	{
		/// <summary>
		///     Tests if the given entry passes the filter.
		/// </summary>
		/// <param name="logEntry"></param>
		/// <returns></returns>
		[Pure]
		bool PassesFilter(IEnumerable<IReadOnlyLogEntry> logEntry);

		/// <summary>
		///
		/// </summary>
		/// <param name="line"></param>
		/// <param name="matches"></param>
		void Match(IReadOnlyLogEntry line, List<LogLineMatch> matches);
	}
}


text:
package io.spring.cloudevent;

import java.util.function.Consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.function.cloudevent.CloudEventMessageBuilder;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) throws Exception {
	    SpringApplication.run(DemoApplication.class, args);
	}

	@Bean
	public Consumer<Person> hire(StreamBridge streamBridge) {
		return person -> {
			Employee employee = new Employee(person);
			streamBridge.send("hire-out-0", CloudEventMessageBuilder.withData(employee)
				.setSource("http://spring.io/rsocket")
				.setId("1234567890")
				.build());
		};
	}
}


text:
from django.contrib import admin
from cart.models import Cart, CartItem

class CartAdmin(admin.ModelAdmin):
    class Meta:
        model = Cart

admin.site.register(Cart, CartAdmin)

class CartItemAdmin(admin.ModelAdmin):
    list_display = ('id',  'cart', 'subscription', 'single', 'quantity')

    class Meta:
        model = CartItem

admin.site.register(CartItem, CartItemAdmin)


text:
/**
 * THIS FILE IS AUTO-GENERATED
 * DON'T MAKE CHANGES HERE
 */
import { typedDependencies } from './dependenciesTyped.generated'
import { createNumber } from '../../factoriesNumber.js'

export const numberDependencies = {
  typedDependencies,
  createNumber
}


text:
<!DOCTYPE html>

	<title>Treeform Tests</title>

Treeform Tests


text: Various code related to handling Wikipedia assessments.


text:
package org.springframework.boot.actuate.management;

import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.util.Arrays;
import java.util.List;

import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;

/**
 * {@link Endpoint @Endpoint} to expose thread info.
 *
 * @author Dave Syer
 * @author Andy Wilkinson
 * @since 2.0.0
 */
@Endpoint(id = "threaddump")
public class ThreadDumpEndpoint {

	@ReadOperation
	public ThreadDumpDescriptor threadDump() {
		return new ThreadDumpDescriptor(Arrays
				.asList(ManagementFactory.getThreadMXBean().dumpAllThreads(true, true)));
	}

	/**
	 * A description of a thread dump. Primarily intended for serialization to JSON.
	 */
	public static final class ThreadDumpDescriptor {

		private final List<ThreadInfo> threads;

		private ThreadDumpDescriptor(List<ThreadInfo> threads) {
			this.threads = threads;
		}

		public List<ThreadInfo> getThreads() {
			return this.threads;
		}

	}

}


text:
<?php

namespace app\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\models\Operacion;

/**
 * OperacionSearch represents the model behind the search form about `app\models\Operacion`.
 */
class OperacionSearch extends Operacion
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'integer'],
            [['name', 'create_time',], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = Operacion::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
			'create_time' => $this->create_time,
            'update_time' => $this->update_time,
        ]);

        $query->andFilterWhere(['like', 'name', $this->name]);

        return $dataProvider;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2014 Yuriy Yunikov
  -->

<resources>
    <string name="app_name">Блокування Затемнення</string>

    <string name="menu_about">Про програму</string>

    <string name="menu_rate_google_play">Оцінити программ!</string>

    <string name="button_ok">OK</string>

    <string name="button_cancel">Відмінити</string>

    <string name="menu_share">Поділитись</string>

    <string name="share_text">Скачуйте програму Блокування Затемнення на https://play.google.com/store/apps/details?id=com.yyunikov.dimblock</string>

    <string name="widget_title">Блокування Затемнення</string>

    <string name="dialog_rate_google_play">Якщо вам подобається даний додаток, будь ласка оцініть його на Google Play.</string>

</resources>


text:
title: The Story of the Lost Child
written_by:
isbn: '9781609452865'
binding: Paperback
link_to_buy_page:
image_path: 'https://images.booksense.com/images/865/452/9781609452865.jpg'
---


text:
package pl.pzagawa.diamond.jack.activities;

import pl.pzagawa.diamond.jack.R;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;

public class UpdaterListItem
{
	private View view;

	private ProgressBar progressBar;
	private ImageView imageView;
	private TextView textView;

	public UpdaterListItem(LayoutInflater inflater, String text)
	{
		this.view = inflater.inflate(R.layout.activity_updater_list_item, null);

		progressBar = (ProgressBar)view.findViewById(R.id.progressBar);
		imageView = (ImageView)view.findViewById(R.id.imageView);
		textView = (TextView)view.findViewById(R.id.textView);

		progressBar.setVisibility(View.VISIBLE);
		imageView.setVisibility(View.GONE);
		textView.setText(text);
	}

	public View getView()
	{
		return view;
	}

	public void done()
	{
		progressBar.setVisibility(View.GONE);
		imageView.setVisibility(View.VISIBLE);
	}

}


text:
<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

// Get tabs
ob_start();

do_action('woocommerce_product_tabs');

$tabs = trim( ob_get_clean() );

if ( ! empty( $tabs ) ) : ?>

			<?php echo $tabs; ?>

		<?php do_action('woocommerce_product_tab_panels'); ?>

<?php endif; ?>


text:
import { expect } from 'chai';
import * as sinon from 'sinon';
import makeFakeSWReg from './make-fake-sw-reg';
import dbTMHelper from './testing-utils/db-token-manager';
import { deleteDatabase } from './testing-utils/db-helper';
import TokenManager from '../src/models/token-manager';
import Errors from '../src/models/errors';
import arrayBufferToBase64 from '../src/helpers/array-buffer-to-base64';

describe('Firebase Messaging > tokenManager.createToken()', function() {
  const sandbox = sinon.sandbox.create();

  const AUTH_BUFFER = new Uint8Array([1, 2, 3]);
  const P256DH_BUFFER = new Uint8Array([1, 2, 3]);
  const EXAMPLE_SENDER_ID = '1234567890';
  const EXAMPLE_SUBSCRIPTION = {
    endpoint: 'http://example-subscription-test.com/1234567890',
    getKey: keyName => {
      if (keyName === 'auth') {
        return AUTH_BUFFER;
      } else {
        return P256DH_BUFFER;
      }
    }
  };
  const EXAMPLE_FCM_TOKEN_DETAILS = {
    token: 'ExampleFCMToken1337',
    pushSet: 'ExampleFCMPushSet7331'
  };

  let globalTokenManager = null;

  const cleanUp = () => {
    sandbox.restore();

    const promises = [dbTMHelper.closeDatabase()];
    if (globalTokenManager) {
      promises.push(globalTokenManager.closeDatabase());
    }

    return Promise.all(promises).then(() =>
      deleteDatabase(TokenManager.DB_NAME)
    );
  };

  beforeEach(function() {
    return cleanUp();
  });

  after(function() {
    return cleanUp();
  });

  it('should test bad input', function() {
    const FakeRegistration = function() {};
    FakeRegistration.prototype = ServiceWorkerRegistration.prototype;

    const exampleSWReg = new FakeRegistration();
    const badInputs = [
      [undefined, undefined],
      [EXAMPLE_SENDER_ID, undefined],
      [undefined, exampleSWReg],
      [null, null],
      [EXAMPLE_SENDER_ID, null],
      [null, exampleSWReg],
      [{}, exampleSWReg],
      [[], exampleSWReg],
      [true, exampleSWReg],
      [1, exampleSWReg],
      ['', exampleSWReg],
      [EXAMPLE_SENDER_ID, {}],
      [EXAMPLE_SENDER_ID, []],
      [EXAMPLE_SENDER_ID, true],
      [EXAMPLE_SENDER_ID, 1],
      [EXAMPLE_SENDER_ID, '']
    ];

    globalTokenManager = new TokenManager();

    return badInputs.reduce((promiseChain, badInput) => {
      return promiseChain.then(() => {
        return globalTokenManager.createToken(badInput[0], badInput[1]).then(
          () => {
            throw new Error('Bad input should have thrown');
          },
          err => {
            switch (err.code) {
              case 'messaging/' + Errors.codes.BAD_SENDER_ID:
              case 'messaging/' + Errors.codes.SW_REGISTRATION_EXPECTED:
                break;
              default:
                throw new Error('Unexpected error thrown: ' + err.message);
            }
          }
        );
      });
    }, Promise.resolve());
  });

  it('should handle failing getSubscription', function() {
    const activatedRegistration = makeFakeSWReg('active', {
      state: 'activated'
    });

    Object.defineProperty(activatedRegistration, 'pushManager', {
      value: {
        getSubscription: () => {
          return Promise.reject('Unknown error.');
        }
      }
    });

    globalTokenManager = new TokenManager();
    return globalTokenManager
      .createToken(EXAMPLE_SENDER_ID, activatedRegistration)
      .then(
        () => {
          throw new Error('This should have rejected');
        },
        err => {
          expect(err).to.equal('Unknown error.');
        }
      );
  });

  it('should handle failing subscribe call', function() {
    const activatedRegistration = makeFakeSWReg('active', {
      state: 'activated'
    });
    Object.defineProperty(activatedRegistration, 'scope', {
      value: '/example-scope'
    });
    Object.defineProperty(activatedRegistration, 'pushManager', {
      value: {
        getSubscription: () => {
          return Promise.resolve(null);
        },
        subscribe: options => {
          return Promise.reject(new Error('Unknown Error'));
        }
      }
    });

    sandbox
      .stub(TokenManager.prototype, 'subscribeToFCM')
      .callsFake(() => Promise.resolve(EXAMPLE_FCM_TOKEN_DETAILS));

    globalTokenManager = new TokenManager();
    return globalTokenManager
      .createToken(EXAMPLE_SENDER_ID, activatedRegistration)
      .then(
        () => {
          throw new Error('Expected createToken to throw.');
        },
        err => {
          expect(err.message).to.equal('Unknown Error');
        }
      );
  });

  it('should use an existing subscription', function() {
    let currentSubscription = null;
    const activatedRegistration = makeFakeSWReg('active', {
      state: 'activated'
    });
    Object.defineProperty(activatedRegistration, 'scope', {
      value: '/example-scope'
    });
    Object.defineProperty(activatedRegistration, 'pushManager', {
      value: {
        getSubscription: () => {
          return Promise.resolve(currentSubscription);
        },
        subscribe: options => {
          currentSubscription = EXAMPLE_SUBSCRIPTION;
          return Promise.resolve(currentSubscription);
        }
      }
    });

    sandbox
      .stub(TokenManager.prototype, 'subscribeToFCM')
      .callsFake(() => Promise.resolve(EXAMPLE_FCM_TOKEN_DETAILS));

    globalTokenManager = new TokenManager();
    return globalTokenManager
      .createToken(EXAMPLE_SENDER_ID, activatedRegistration)
      .then(token => {
        expect(token).to.equal(EXAMPLE_FCM_TOKEN_DETAILS.token);
      })
      .then(() => {
        // Ensure details are saved correctly
        return dbTMHelper.getTokenDetailsFromDB();
      })
      .then(allDetails => {
        expect(allDetails.length).to.equal(1);

        const details = allDetails[0];

        expect(details.fcmPushSet).to.equal(EXAMPLE_FCM_TOKEN_DETAILS.pushSet);
        expect(details.fcmToken).to.equal(EXAMPLE_FCM_TOKEN_DETAILS.token);
        expect(details.fcmSenderId).to.equal(EXAMPLE_SENDER_ID);
        expect(details.endpoint).to.equal(EXAMPLE_SUBSCRIPTION.endpoint);
        expect(details.swScope).to.equal(activatedRegistration.scope);
        expect(details.auth).to.equal(arrayBufferToBase64(AUTH_BUFFER));
        expect(details.p256dh).to.equal(arrayBufferToBase64(P256DH_BUFFER));
      })
      .then(() => {
        return globalTokenManager.getSavedToken(
          EXAMPLE_SENDER_ID,
          activatedRegistration
        );
      })
      .then(token => {
        expect(token).to.equal(EXAMPLE_FCM_TOKEN_DETAILS.token);
      });
  });

  it('should handle valid flow', function() {
    // This tests when there is already a valid subscription as well as
    // tests when the service is already activated or moves from installing
    // state to dispatching an activate statechange event.

    // Test already activated
    const activatedRegistration = makeFakeSWReg('active', {
      state: 'activated'
    });
    Object.defineProperty(activatedRegistration, 'scope', {
      value: '/example-scope-1'
    });
    Object.defineProperty(activatedRegistration, 'pushManager', {
      value: {
        getSubscription: () => {
          return Promise.resolve(EXAMPLE_SUBSCRIPTION);
        }
      }
    });

    const swValue = {
      state: 'installing',
      addEventListener: (eventName, cb) => {
        swValue.state = 'activated';
        cb();
      },
      removeEventListener: (eventName, cb) => {
        // NOOP
      }
    };
    const installToActivateReg = makeFakeSWReg('installing', swValue);
    Object.defineProperty(installToActivateReg, 'scope', {
      value: '/example-scope-2'
    });
    Object.defineProperty(installToActivateReg, 'pushManager', {
      value: {
        getSubscription: () => {
          return Promise.resolve(EXAMPLE_SUBSCRIPTION);
        }
      }
    });

    sandbox
      .stub(TokenManager.prototype, 'subscribeToFCM')
      .onCall(0)
      .returns(
        Promise.resolve({
          token: EXAMPLE_FCM_TOKEN_DETAILS.token + '1',
          pushSet: EXAMPLE_FCM_TOKEN_DETAILS.pushSet + '1'
        })
      )
      .onCall(1)
      .returns(
        Promise.resolve({
          token: EXAMPLE_FCM_TOKEN_DETAILS.token + '2',
          pushSet: EXAMPLE_FCM_TOKEN_DETAILS.pushSet + '2'
        })
      );

    const validCombos = [
      {
        senderId: EXAMPLE_SENDER_ID,
        swReg: activatedRegistration,
        expectedToken: EXAMPLE_FCM_TOKEN_DETAILS.token + '1',
        expectedPushSet: EXAMPLE_FCM_TOKEN_DETAILS.pushSet + '1'
      },
      {
        senderId: EXAMPLE_SENDER_ID,
        swReg: installToActivateReg,
        expectedToken: EXAMPLE_FCM_TOKEN_DETAILS.token + '2',
        expectedPushSet: EXAMPLE_FCM_TOKEN_DETAILS.pushSet + '2'
      }
    ];

    globalTokenManager = new TokenManager();

    return validCombos.reduce((promiseChain, validCombo) => {
      return promiseChain.then(() => {
        return globalTokenManager
          .createToken(validCombo.senderId, validCombo.swReg)
          .then(token => {
            expect(token).to.equal(validCombo.expectedToken);
          })
          .then(() => {
            // Ensure details are saved correctly
            return globalTokenManager.getTokenDetailsFromToken(
              validCombo.expectedToken
            );
          })
          .then(details => {
            expect(validCombo.expectedToken).to.equal(details.fcmToken);
            expect(validCombo.expectedPushSet).to.equal(details.fcmPushSet);
            expect(validCombo.senderId).to.equal(details.fcmSenderId);
            expect(EXAMPLE_SUBSCRIPTION.endpoint).to.equal(details.endpoint);
            expect(validCombo.swReg.scope).to.equal(details.swScope);
            expect(arrayBufferToBase64(AUTH_BUFFER)).to.equal(details.auth);
            expect(arrayBufferToBase64(P256DH_BUFFER)).to.equal(details.p256dh);
          })
          .then(() => {
            return globalTokenManager.getSavedToken(
              validCombo.senderId,
              validCombo.swReg
            );
          })
          .then(token => {
            expect(validCombo.expectedToken).to.equal(token);
          });
      });
    }, Promise.resolve());
  });

  it('should handle sender ID difference', function() {
    const activatedRegistration = makeFakeSWReg('active', {
      state: 'activated'
    });
    Object.defineProperty(activatedRegistration, 'scope', {
      value: '/example-scope'
    });
    Object.defineProperty(activatedRegistration, 'pushManager', {
      value: {
        getSubscription: () => {
          return Promise.resolve(null);
        },
        subscribe: options => {
          return Promise.resolve(EXAMPLE_SUBSCRIPTION);
        }
      }
    });

    const secondDetails = {
      token: EXAMPLE_FCM_TOKEN_DETAILS.token + '2',
      pushSet: EXAMPLE_FCM_TOKEN_DETAILS.pushSet + '2'
    };
    const secondSenderId = EXAMPLE_SENDER_ID + '2';

    const methodStub = sandbox.stub(TokenManager.prototype, 'subscribeToFCM');
    methodStub
      .withArgs(EXAMPLE_SENDER_ID, EXAMPLE_SUBSCRIPTION)
      .returns(Promise.resolve(EXAMPLE_FCM_TOKEN_DETAILS));
    methodStub
      .withArgs(secondSenderId, EXAMPLE_SUBSCRIPTION)
      .returns(Promise.resolve(secondDetails));

    globalTokenManager = new TokenManager();
    return globalTokenManager
      .createToken(EXAMPLE_SENDER_ID, activatedRegistration)
      .then(token => {
        expect(EXAMPLE_FCM_TOKEN_DETAILS.token).to.equal(token);
      })
      .then(() => {
        return globalTokenManager.createToken(
          secondSenderId,
          activatedRegistration
        );
      })
      .then(token => {
        expect(secondDetails.token).to.equal(token);
      });
  });
});


text:
package com.graphhopper.routing;

import com.graphhopper.routing.util.TraversalMode;
import com.graphhopper.storage.RoutingCHEdgeIteratorState;
import com.graphhopper.storage.RoutingCHGraph;
import com.graphhopper.storage.SPTEntry;

public class DijkstraBidirectionCHNoSOD extends AbstractBidirCHAlgo {
    public DijkstraBidirectionCHNoSOD(RoutingCHGraph graph) {
        super(graph, TraversalMode.NODE_BASED);
    }

    @Override
    protected SPTEntry createStartEntry(int node, double weight, boolean reverse) {
        return new SPTEntry(node, weight);
    }

    @Override
    protected SPTEntry createEntry(RoutingCHEdgeIteratorState edge, int incEdge, double weight, SPTEntry parent, boolean reverse) {
        SPTEntry entry = new SPTEntry(edge.getEdge(), edge.getAdjNode(), weight);
        entry.parent = parent;
        return entry;
    }

    protected SPTEntry getParent(SPTEntry entry) {
        return entry.getParent();
    }

    @Override
    public String getName() {
        return "dijkstrabi|ch|no_sod";
    }

}


text:
extern crate rustc_ast;
extern crate rustc_data_structures;
extern crate rustc_error_messages;
extern crate rustc_errors;
extern crate rustc_expand;
extern crate rustc_parse as parse;
extern crate rustc_session;
extern crate rustc_span;

use crate::common::eq::SpanlessEq;
use quote::quote;
use rayon::iter::{IntoParallelIterator, ParallelIterator};
use rustc_ast::ast::{
    AngleBracketedArg, AngleBracketedArgs, Crate, GenericArg, GenericParamKind, Generics,
    WhereClause,
};
use rustc_ast::mut_visit::{self, MutVisitor};
use rustc_error_messages::{DiagnosticMessage, FluentArgs, LazyFallbackBundle};
use rustc_errors::{Diagnostic, PResult};
use rustc_session::parse::ParseSess;
use rustc_span::source_map::FilePathMapping;
use rustc_span::FileName;
use std::fs;
use std::panic;
use std::path::Path;
use std::process;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::time::Instant;
use walkdir::{DirEntry, WalkDir};

#[macro_use]
mod macros;

#[allow(dead_code)]
mod common;

mod repo;

#[test]
fn test_round_trip() {
    common::rayon_init();
    repo::clone_rust();
    let abort_after = common::abort_after();
    if abort_after == 0 {
        panic!("Skipping all round_trip tests");
    }

    let failed = AtomicUsize::new(0);

    WalkDir::new("tests/rust")
        .sort_by(|a, b| a.file_name().cmp(b.file_name()))
        .into_iter()
        .filter_entry(repo::base_dir_filter)
        .collect::<Result<Vec<DirEntry>, walkdir::Error>>()
        .unwrap()
        .into_par_iter()
        .for_each(|entry| {
            let path = entry.path();
            if !path.is_dir() {
                test(path, &failed, abort_after);
            }
        });

    let failed = failed.load(Ordering::Relaxed);
    if failed > 0 {
        panic!("{} failures", failed);
    }
}

fn test(path: &Path, failed: &AtomicUsize, abort_after: usize) {
    let content = fs::read_to_string(path).unwrap();

    let start = Instant::now();
    let (krate, elapsed) = match syn::parse_file(&content) {
        Ok(krate) => (krate, start.elapsed()),
        Err(msg) => {
            errorf!("=== {}: syn failed to parse\n{:?}\n", path.display(), msg);
            let prev_failed = failed.fetch_add(1, Ordering::Relaxed);
            if prev_failed + 1 >= abort_after {
                process::exit(1);
            }
            return;
        }
    };
    let back = quote!(#krate).to_string();
    let edition = repo::edition(path).parse().unwrap();

    rustc_span::create_session_if_not_set_then(edition, |_| {
        let equal = match panic::catch_unwind(|| {
            let sess = ParseSess::new(FilePathMapping::empty());
            let before = match librustc_parse(content, &sess) {
                Ok(before) => before,
                Err(diagnostic) => {
                    errorf!(
                        "=== {}: ignore - librustc failed to parse original content: {}\n",
                        path.display(),
                        translate_message(&diagnostic),
                    );
                    diagnostic.cancel();
                    return Err(true);
                }
            };
            let after = match librustc_parse(back, &sess) {
                Ok(after) => after,
                Err(mut diagnostic) => {
                    errorf!("=== {}: librustc failed to parse", path.display());
                    diagnostic.emit();
                    return Err(false);
                }
            };
            Ok((before, after))
        }) {
            Err(_) => {
                errorf!("=== {}: ignoring librustc panic\n", path.display());
                true
            }
            Ok(Err(equal)) => equal,
            Ok(Ok((mut before, mut after))) => {
                normalize(&mut before);
                normalize(&mut after);
                if SpanlessEq::eq(&before, &after) {
                    errorf!(
                        "=== {}: pass in {}ms\n",
                        path.display(),
                        elapsed.as_secs() * 1000 + u64::from(elapsed.subsec_nanos()) / 1_000_000
                    );
                    true
                } else {
                    errorf!(
                        "=== {}: FAIL\nbefore: {:#?}\nafter: {:#?}\n",
                        path.display(),
                        before,
                        after,
                    );
                    false
                }
            }
        };
        if !equal {
            let prev_failed = failed.fetch_add(1, Ordering::Relaxed);
            if prev_failed + 1 >= abort_after {
                process::exit(1);
            }
        }
    });
}

fn librustc_parse(content: String, sess: &ParseSess) -> PResult<Crate> {
    static COUNTER: AtomicUsize = AtomicUsize::new(0);
    let counter = COUNTER.fetch_add(1, Ordering::Relaxed);
    let name = FileName::Custom(format!("test_round_trip{}", counter));
    parse::parse_crate_from_source_str(name, content, sess)
}

fn translate_message(diagnostic: &Diagnostic) -> String {
    thread_local! {
        static FLUENT_BUNDLE: LazyFallbackBundle = {
            let resources = rustc_error_messages::DEFAULT_LOCALE_RESOURCES;
            let with_directionality_markers = false;
            rustc_error_messages::fallback_fluent_bundle(resources, with_directionality_markers)
        };
    }

    let message = &diagnostic.message[0].0;
    let args = diagnostic.args().iter().cloned().collect::<FluentArgs>();

    let (identifier, attr) = match message {
        DiagnosticMessage::Str(msg) => return msg.clone(),
        DiagnosticMessage::FluentIdentifier(identifier, attr) => (identifier, attr),
    };

    FLUENT_BUNDLE.with(|fluent_bundle| {
        let message = fluent_bundle
            .get_message(identifier)
            .expect("missing diagnostic in fluent bundle");
        let value = match attr {
            Some(attr) => message
                .get_attribute(attr)
                .expect("missing attribute in fluent message")
                .value(),
            None => message.value().expect("missing value in fluent message"),
        };

        let mut err = Vec::new();
        let translated = fluent_bundle.format_pattern(value, Some(&args), &mut err);
        assert!(err.is_empty());
        translated.into_owned()
    })
}

fn normalize(krate: &mut Crate) {
    struct NormalizeVisitor;

    impl MutVisitor for NormalizeVisitor {
        fn visit_angle_bracketed_parameter_data(&mut self, e: &mut AngleBracketedArgs) {
            #[derive(Ord, PartialOrd, Eq, PartialEq)]
            enum Group {
                Lifetimes,
                TypesAndConsts,
                Constraints,
            }
            e.args.sort_by_key(|arg| match arg {
                AngleBracketedArg::Arg(arg) => match arg {
                    GenericArg::Lifetime(_) => Group::Lifetimes,
                    GenericArg::Type(_) | GenericArg::Const(_) => Group::TypesAndConsts,
                },
                AngleBracketedArg::Constraint(_) => Group::Constraints,
            });
            mut_visit::noop_visit_angle_bracketed_parameter_data(e, self);
        }

        fn visit_generics(&mut self, e: &mut Generics) {
            #[derive(Ord, PartialOrd, Eq, PartialEq)]
            enum Group {
                Lifetimes,
                TypesAndConsts,
            }
            e.params.sort_by_key(|param| match param.kind {
                GenericParamKind::Lifetime => Group::Lifetimes,
                GenericParamKind::Type { .. } | GenericParamKind::Const { .. } => {
                    Group::TypesAndConsts
                }
            });
            mut_visit::noop_visit_generics(e, self);
        }

        fn visit_where_clause(&mut self, e: &mut WhereClause) {
            if e.predicates.is_empty() {
                e.has_where_token = false;
            }
        }
    }

    NormalizeVisitor.visit_crate(krate);
}


text:
![Reusable D3.js Sparkline chart](https://raw.githubusercontent.com/DKirwan/reusable-d3-sparkline/develop/thumbnail.png)

This chart was built with Mike Bostock's [reusable D3.js charts best practice](http://bost.ocks.org/mike/chart/) in mind.

## What is a sparkline chart?

[From Wikipedia](https://en.wikipedia.org/wiki/Sparkline) A sparkline is a very small line chart, typically drawn without axes or coordinates. It presents the general shape of the variation (typically over time) in some measurement, such as temperature or stock market price, in a simple and highly condensed way. Sparklines are small enough to be embedded in text, or several sparklines may be grouped together as elements of a small multiple. Whereas the typical chart is designed to show as much data as possible, and is set off from the flow of text, sparklines are intended to be succinct, memorable, and located where they are discussed

## Configuration

|Property        | Usage           | Default  | Required |
|:------------- |:-------------|:-----:|:-----:|
| width      | width in pixels | 175 | no |
| height      | height in pixels |   56 | no |
| dataSource | file path, relative to the sparkline.js file | none | yes |
| dataSourceType | type of data source. Must be one of CSV, TSV or JSON | none | yes |
| selector | DOM selector to attach the chart to | body | no |
| gradientColors | Array of colours for the gradient, from max to min | [green, orange, red] | no |

## Usage

1: Include the sparkline.js code
`<script src="path/to/sparkline.js"></script>`

2: Format the data so it has a `date` and `count` property
As long as `new Date()` can parse the date string it's ok.

3: Then configure the chart and render it
```javascript
var chart1 = sparkline()
              .width(155)
              .height(50)
              .gradientColors(['lightblue', 'steelblue', 'blue', 'navy']) // top -> bottom
              .dataSource('ry4c.csv') // relative to sparkline.js
              .dataSourceType('CSV')
              .selector('#chart-one');
var chart2 = sparkline()
              .width(155)
              .height(50)
              .dataSource('ezj.tsv') // relative to sparkline.js
              .dataSourceType('TSV')
              .selector('#chart-two');
chart1();  // render the chart
chart2();
```

## Pull Requests and issues

...are very welcome!


text:
<?php

/**
 * This file assumes that we are within the widget() method of the Muut_Widget_Online_Users class (which extends WP_Widget).
 * Knowing that, `$this` represents that widget instance.
 *
 */

?>

		<?php if ( isset( $instance['show_anonymous'] ) && $instance['show_anonymous'] ) { ?>

+ <?php _e( 'anonymous users', 'muut' ); ?>

		<?php } ?>


text:
package com.jgraph.example.portlabels;

import java.util.Map;

import org.jgraph.graph.DefaultGraphCell;
import org.jgraph.graph.DefaultPort;
import org.jgraph.graph.ParentMap;
import org.jgraph.graph.Port;

/**
 * Graph model cell that has a number of fixed offset ports on the left
 * and right hand sides. It provides a number of utility methods to add
 * and remove those ports.
 */
public class PortLabelCell extends DefaultGraphCell {

	/**
	 * The number of ports on the left hand side of this cell
	 */
	protected int numLeftPorts = 0;

	/**
	 * The number of ports on the right hand side of this cell
	 */
	protected int numRightPorts = 0;

	/**
	 * Default constructor
	 *
	 */
	public PortLabelCell() {
		this(null);
	}

	/**
	 * Constructor with user object to set for cell. Whatever the user object
	 * returns with toString will appear in the vertex label.
	 * @param userObject the userObject to set
	 */
	public PortLabelCell(Object userObject) {
		super(userObject);
	}

	/**
	 * Adds a port with the specified label to the left hand side of the vertex
	 * at the specified position order
	 * @param position this ports position in the order of port from top to bottom
	 * @param portLabel the label to set for this port
	 * @return the new Port created
	 */
	public Port addLeftPort(int position, String portLabel, Map nestedMap, ParentMap parentMap) {
		return addLeftPort(position, new DefaultPort(portLabel), nestedMap, parentMap);
	}

	/**
	 * Adds a port to the left hand side of the vertex at the specified
	 * position order
	 * @param position this ports position in the order of port from top to bottom
	 * @param port the instance of the new port
	 * @return the the port
	 */
	public Port addLeftPort(int position, Port port, Map nestedMap, ParentMap parentMap) {
		if (position > numLeftPorts) {
			throw new RuntimeException("Incorrect port position of left-hand side of cell");
		}
		return null;
	}

	/**
	 * Adds a port with the specified label to the right hand side of the vertex
	 * at the specified position order
	 * @param position this ports position in the order of port from top to bottom
	 * @param portLabel the label to set for this port
	 * @return the new Port created
	 */
	public Port addRightPort(int position, String portLabel, Map nestedMap, ParentMap parentMap) {
		return addRightPort(position, new DefaultPort(portLabel), nestedMap, parentMap);
	}

	/**
	 * Adds a port to the right hand side of the vertex at the specified
	 * position order
	 * @param position this ports position in the order of port from top to bottom
	 * @param port the instance of the new port
	 * @return the the port
	 */
	public Port addRightPort(int position, Port port, Map nestedMap, ParentMap parentMap) {
		if (position > numRightPorts) {
			throw new RuntimeException("Incorrect port position of right-hand side of cell");
		}
		return null;
	}

	/**
	 * Removes the left-hand side port at the specified position order
	 * @param position the position order of the port to be removed
	 */
	public void removeLeftPort(int position, Map nestedMap, ParentMap parentMap) {

	}

	/**
	 * Removes the left-hand side port at the specified position order
	 * @param position the position order of the port to be removed
	 */
	public void removeRightPort(int position, Map nestedMap, ParentMap parentMap) {

	}

	/**
	 * @return Returns the numLeftPorts.
	 */
	public int getNumLeftPorts() {
		return numLeftPorts;
	}

	/**
	 * @param numLeftPorts The numLeftPorts to set.
	 */
	public void setNumLeftPorts(int numLeftPorts) {
		this.numLeftPorts = numLeftPorts;
	}

	/**
	 * @return Returns the numRightPorts.
	 */
	public int getNumRightPorts() {
		return numRightPorts;
	}

	/**
	 * @param numRightPorts The numRightPorts to set.
	 */
	public void setNumRightPorts(int numRightPorts) {
		this.numRightPorts = numRightPorts;
	}

}


text:
TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

    gem 'xml_validator'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install xml_validator

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it ( http://github.com/<my-github-username>/xml_validator/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel='import' href='ct-repository.html'>

<script>
function CTRepositories() {
  // FIXME: Include skia once their commit messages have a numeric value we can use.
  // Right now it only has git hashes.
  this.repositories = {
      blink: new CTRepository(
          'blink',
          'https://chromium.googlesource.com/chromium/blink/+log?format=json',
          'https://src.chromium.org/viewvc/blink?view=rev&revision={revision}'),
      chromium: new CTRepository(
          'chromium',
          'https://chromium.googlesource.com/chromium/src/+log?format=json',
          'https://crrev.com/{revision}'),
      nacl: new CTRepository(
          'nacl',
          'https://chromium.googlesource.com/native_client/src/native_client/+log/master?format=json',
          'https://src.chromium.org/viewvc/native_client?view=rev&revision={revision}'),
      v8: new CTRepository(
          'v8',
          'https://chromium.googlesource.com/external/v8/+log/master?format=json',
          'https://code.google.com/p/v8/source/detail?r={revision}'),
  };
  this.names = Object.keys(this.repositories).sort();
}
</script>


text:
{{cookiecutter.project_name}}
==========================

{{cookiecutter.project_short_description}}

----
Testing cookiecutter.


text:
package org.apache.geode.cache30;

import org.apache.geode.SystemFailure;
import org.apache.geode.cache.TransactionEvent;
import org.apache.geode.cache.TransactionListener;

/**
 * A TransactionListener used in testing. Its callback methods are implemented to throw
 * {@link UnsupportedOperationException} unless the user overrides the "2" methods.
 *
 * @see #wasInvoked
 *
 * @since GemFire 4.0
 */
public abstract class TestTransactionListener extends TestCacheCallback
    implements TransactionListener {

  @Override
  public void afterCommit(TransactionEvent event) {
    this.invoked = true;
    try {
      afterCommit2(event);
    } catch (VirtualMachineError e) {
      SystemFailure.initiateFailure(e);
      throw e;
    } catch (Throwable t) {
      this.callbackError = t;
    }
  }

  public void afterCommit2(TransactionEvent event) {
    String s = "Unexpected callback invocation";
    throw new UnsupportedOperationException(s);
  }

  @Override
  public void afterFailedCommit(TransactionEvent event) {
    this.invoked = true;
    try {
      afterFailedCommit2(event);
    } catch (VirtualMachineError e) {
      SystemFailure.initiateFailure(e);
      throw e;
    } catch (Throwable t) {
      this.callbackError = t;
    }
  }

  public void afterFailedCommit2(TransactionEvent event) {
    String s = "Unexpected callback invocation";
    throw new UnsupportedOperationException(s);
  }

  @Override
  public void afterRollback(TransactionEvent event) {
    this.invoked = true;
    try {
      afterRollback2(event);
    } catch (VirtualMachineError e) {
      SystemFailure.initiateFailure(e);
      throw e;
    } catch (Throwable t) {
      this.callbackError = t;
    }
  }

  public void afterRollback2(TransactionEvent event) {
    String s = "Unexpected callback invocation";
    throw new UnsupportedOperationException(s);
  }

}


text:
* {
    -ms-word-wrap: break-word;
    word-wrap: break-word;
}

body {
    background-color: #01060b;
    background-image: none;
    font: normal 12px/1.5 Arial, Verdana, sans-serif;
    overflow: scroll;
    position: relative;
}

code {
    border: 1px solid #808080;
    border-radius: 5px;
    color: #2ce100;
    display: block;
    margin: 5px 0;
    max-height: 900px;
    max-width: 700px;
    overflow: auto;
    padding: 10px;
    white-space: pre;
}

blockquote { position: relative; }

a img { outline: none; }

a { outline: none; }

img { border: 0; }

.advert {
    height: 50px;
    margin: 0 auto;
    width: 320px;
}

.underline { text-decoration: underline; }

a:link {
    color: #aadaf1 !important;
    text-decoration: none;
}

.type-blizzard { color: #00B4FF !important; }

.type-blizzblogger { color: #4880ff !important; }

.type-mvp { color: #81B558 !important; }

.type-normal { color: #bceaff !important; }

.type-blizzard a:link {
    color: #00B4FF;
    font-family: Arial, 'DejaVu Sans', 'Liberation Sans', Freesans, sans-serif;
    text-decoration: none;
}

a:visited {
    color: #96dbfb;
    text-decoration: none;
}

.type-blizzard a:visited {
    color: #00B4FF;
    text-decoration: none;
}

a:hover { color: #d4f1ff !important; }

a:active { color: #81B558 !important; }

#mainbody {
    color: #7ad5ff; /* Default Colour */
    margin: 0 auto;
    position: relative;
    width: 95%;
    z-index: 0;
}

/*--------------------------*/

/* Page Title               */

/*--------------------------*/

h1.game-title, h1.article-title {
    -webkit-text-shadow: 0.1em 0.1em 0.05em #000;
    font-family: Arial, 'DejaVu Sans', 'Liberation Sans', Freesans, sans-serif;
    font-size: 30pt !important;
    font-weight: 100;
    margin-left: 100px;
    margin-top: 35px;
    min-width: 400px;
    text-shadow: 0.1em 0.1em 0.05em #000;
}

/*--------------------------*/

/* Footer box               */

/*--------------------------*/

#footer {
    color: #00B4FF;
    text-align: center;
}

/*--------------------------*/

/* Topics and Blog Entries  */

/*--------------------------*/

.post-overview {
    margin: 0 auto;
    position: relative;
    width: 95%;
}

.post-overview .game-icon {
    height: 50px;
    margin-bottom: -16px;
    width: 50px;
}

.post-overview .region-icon {
    height: 35px;
    margin-bottom: -9px;
    width: 40px;
}

.post-overview .post-heading { margin-bottom: 10px; }

.post-overview .thread-title {
    -webkit-text-shadow: .2em .2em .15em #000;
    font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', 'DejaVu Sans Condensed', sans-serif;
    font-size: x-large;
    margin-bottom: -10px;
    text-align: center;
    text-shadow: .2em .2em .15em #000;
    width: 95%;
}

.post-overview #mvp-toggle #mvp-on {
    color: #000;
    font-size: 8pt;
    font-weight: bold;
}

.post-overview #mvp-toggle #mvp-on:hover {
    color: #000 !important;
    text-decoration: underline;
}

.post-overview #mvp-toggle #mvp-off {
    color: #d4f1ff;
    font-size: 8pt;
    font-weight: bold;
}

.post-overview #mvp-toggle #mvp-off:hover {
    color: #d4f1ff !important;
    text-decoration: underline;
}

.post-overview .post {
    background-color: #00171d;
    display: block;
    margin: 0 auto;
    margin-bottom: 20px;
    max-width: 800px;
    padding: 10px;
    padding-right: 20px;
    width: 90%;
}

.post-overview .post .post-edited {
    color: #808080;
    display: block;
    font-style: italic;
    margin-top: 5px;
}

.post-overview .post .poster-info {
    float: left;
    position: relative;
}

.post-overview .post .poster-add-info {
    display: block;
    position: relative;
}

.post-overview .post .post-content-blog {
    font: normal 13px/1.3 "Lucida Sans Unicode", Arial, Helvetica, sans-serif;
    margin: 5px auto;
    min-height: 130px;
    width: 80%;
}

.post-overview .post .post-content-blog .header-image { text-align: center; }

.post-overview .post .post-content {
    font: normal 13px/1.3 "Lucida Sans Unicode", Arial, Helvetica, sans-serif;
    margin: 5px auto;
    min-height: 40px;
    padding: 5px;
    width: 95%;
}

.post-overview .post .avatar {
    height: 64px;
    width: 64px;
}

.post-overview .post .post-content a { color: #fff; }

.post-overview .post .post-content a:hover {
    color: #fff;
    text-decoration: underline;
}

.post-overview .post .post-content blockquote {
    border: 1px solid #184d6b;
    border-bottom: 3px solid #184d6b;
    border-radius: 5px;
    color: #96dbfb;
    font-style: italic;
    margin: 10px 0 5px 15px;
    padding: 10px;
}

.post-overview .post .post-content blockquote:hover { border-color: #22719d; }

.post-overview .post .post-content blockquote div {
    color: #d4f1ff;
    font-style: normal;
    font-weight: bold;
}

.post-overview .post .post-content blockquote .bml-quote-date { float: right; }

.post-overview .post .other-post-details {
    background-color: #01060b;
    border: 1px solid #184d6b;
    border-radius: 5px;
    margin: 0 auto;
    margin-bottom: 5px;
    margin-right: 10px;
    min-height: 16px;
    padding: 5px;
    text-align: center;
    width: 80%;
}

.post-overview .post .other-post-details .date-post { display: inline-block; }

.post-overview .post .other-post-details .post-source { display: inline-block; }

/*Note: Border images are breaking here in Opera, so setting to none*/

.post-overview .post-normal {
    -moz-border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/border-standard.png') 10 10 stretch;
    -o-border-image: url('images/border/border-standard.png') 10 10 none;
    -webkit-border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/border-standard.png') 10 10 stretch;
    border: 5px groove #184d6b;
    border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/border-standard.png') 10 10 stretch;
    border-radius: 6px;
}

.post-overview .post-mvp {
    -moz-border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/mvp-border-standard.png') 10 10 stretch;
    -o-border-image: url('images/border/mvp-border-standard.png') 10 10 none;
    -webkit-border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/mvp-border-standard.png') 10 10 stretch;
    background-color: #060e02;
    border: 5px groove #81B558;
    border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/mvp-border-standard.png') 10 10 stretch;
    border-radius: 6px;
}

.post-overview .post-blue {
    -moz-border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/blizz-border-standard.png') 10 10 stretch;
    -o-border-image: url('images/border/blizz-border-standard.png') 10 10 none;
    -webkit-border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/blizz-border-standard.png') 10 10 stretch;
    -webkit-box-shadow: 0 0 5px 5px #02242f;
    -webkit-text-shadow: -1px -1px 1px #01060b, 0 -1px 1px #01060b, 1px -1px 1px #01060b, 1px 0 1px #01060b, 1px 1px 1px #01060b, 0 1px 1px #01060b, -1px 1px 1px #01060b, -1px 0 1px #01060b;
    background-color: #01060b;
    background-image: url(http://bpcdn.blizzposts.netdna-cdn.com/images/thread/blizzard_post_background.png);
    background-repeat: no-repeat;
    border: 5px groove #00B4FF;
    border-image: url('http://bpcdn.blizzposts.netdna-cdn.com/images/border/blizz-border-standard.png') 10 10 stretch;
    border-radius: 6px;
    box-shadow: 0 0 5px 5px #02242f;
    text-shadow: -1px -1px 1px #01060b, 0 -1px 1px #01060b, 1px -1px 1px #01060b, 1px 0 1px #01060b, 1px 1px 1px #01060b, 0 1px 1px #01060b, -1px 1px 1px #01060b, -1px 0 1px #01060b;
}


text:
namespace NPAPIClient {

class NewFailsTest : public PluginTest {
 public:
  NewFailsTest(NPP id, NPNetscapeFuncs *host_functions);
  virtual NPError New(uint16 mode, int16 argc, const char* argn[],
                      const char* argv[], NPSavedData* saved) OVERRIDE;
};

}  // namespace NPAPIClient

#endif  // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_PLUGIN_NPP_NEW_FAILS_TEST_H_


text:
package main

import "fmt"

func tagFromComment(comment string) (tag string) {
	match := rComment.FindStringSubmatch(comment)
	if len(match) == 2 {
		tag = match[1]
	}
	return
}

func injectTag(contents []byte, area textArea) (injected []byte) {
	expr := make([]byte, area.End-area.Start)
	copy(expr, contents[area.Start-1:area.End-1])
	expr = rInject.ReplaceAll(expr, []byte(fmt.Sprintf(" %s`", area.Tag)))
	// contents[area.Start-1 : area.End-1] = expr
	injected = append(injected, contents[:area.Start-1]...)
	injected = append(injected, expr...)
	injected = append(injected, contents[area.End-1:]...)
	return
}


text:
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.Blob
       (js_newBlob, newBlob, js_newBlob', newBlob', js_slice, slice,
        js_getSize, getSize, js_getType, getType, Blob, castToBlob,
        gTypeBlob, IsBlob, toBlob)
       where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord)
import Data.Typeable (Typeable)
import GHCJS.Types (JSVal(..), JSString)
import GHCJS.Foreign (jsNull)
import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..))
import GHCJS.Marshal (ToJSVal(..), FromJSVal(..))
import GHCJS.Marshal.Pure (PToJSVal(..), PFromJSVal(..))
import Control.Monad.IO.Class (MonadIO(..))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import GHCJS.DOM.Types
import Control.Applicative ((<$>))
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName)
import GHCJS.DOM.JSFFI.Generated.Enums

foreign import javascript unsafe "new window[\"Blob\"]()"
        js_newBlob :: IO Blob

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Blob Mozilla Blob documentation>
newBlob :: (MonadIO m) => m Blob
newBlob = liftIO (js_newBlob)

foreign import javascript unsafe "new window[\"Blob\"]($1, $2)"
        js_newBlob' :: JSVal -> Nullable BlobPropertyBag -> IO Blob

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Blob Mozilla Blob documentation>
newBlob' ::
         (MonadIO m, IsBlobPropertyBag options) =>
           [JSVal] -> Maybe options -> m Blob
newBlob' blobParts options
  = liftIO
      (toJSVal blobParts >>= \ blobParts' -> js_newBlob' blobParts'
         (maybeToNullable (fmap toBlobPropertyBag options)))

foreign import javascript unsafe "$1[\"slice\"]($2, $3, $4)"
        js_slice ::
        Blob -> Double -> Double -> Nullable JSString -> IO (Nullable Blob)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Blob.slice Mozilla Blob.slice documentation>
slice ::
      (MonadIO m, IsBlob self, ToJSString contentType) =>
        self -> Int64 -> Int64 -> Maybe contentType -> m (Maybe Blob)
slice self start end contentType
  = liftIO
      (nullableToMaybe <$>
         (js_slice (toBlob self) (fromIntegral start) (fromIntegral end)
            (toMaybeJSString contentType)))

foreign import javascript unsafe "$1[\"size\"]" js_getSize ::
        Blob -> IO Double

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Blob.size Mozilla Blob.size documentation>
getSize :: (MonadIO m, IsBlob self) => self -> m Word64
getSize self = liftIO (round <$> (js_getSize (toBlob self)))

foreign import javascript unsafe "$1[\"type\"]" js_getType ::
        Blob -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/Blob.type Mozilla Blob.type documentation>
getType ::
        (MonadIO m, IsBlob self, FromJSString result) => self -> m result
getType self = liftIO (fromJSString <$> (js_getType (toBlob self)))


text:
package fakes

import (
	"sync"

	"github.com/cloudfoundry/cli/cf/api/feature_flags"
	"github.com/cloudfoundry/cli/cf/models"
)

type FakeFeatureFlagRepository struct {
	ListStub        func() ([]models.FeatureFlag, error)
	listMutex       sync.RWMutex
	listArgsForCall []struct{}
	listReturns     struct {
		result1 []models.FeatureFlag
		result2 error
	}
	FindByNameStub        func(string) (models.FeatureFlag, error)
	findByNameMutex       sync.RWMutex
	findByNameArgsForCall []struct {
		arg1 string
	}
	findByNameReturns struct {
		result1 models.FeatureFlag
		result2 error
	}
	UpdateStub        func(string, bool) error
	updateMutex       sync.RWMutex
	updateArgsForCall []struct {
		arg1 string
		arg2 bool
	}
	updateReturns struct {
		result1 error
	}
}

func (fake *FakeFeatureFlagRepository) List() ([]models.FeatureFlag, error) {
	fake.listMutex.Lock()
	fake.listArgsForCall = append(fake.listArgsForCall, struct{}{})
	fake.listMutex.Unlock()
	if fake.ListStub != nil {
		return fake.ListStub()
	} else {
		return fake.listReturns.result1, fake.listReturns.result2
	}
}

func (fake *FakeFeatureFlagRepository) ListCallCount() int {
	fake.listMutex.RLock()
	defer fake.listMutex.RUnlock()
	return len(fake.listArgsForCall)
}

func (fake *FakeFeatureFlagRepository) ListReturns(result1 []models.FeatureFlag, result2 error) {
	fake.ListStub = nil
	fake.listReturns = struct {
		result1 []models.FeatureFlag
		result2 error
	}{result1, result2}
}

func (fake *FakeFeatureFlagRepository) FindByName(arg1 string) (models.FeatureFlag, error) {
	fake.findByNameMutex.Lock()
	fake.findByNameArgsForCall = append(fake.findByNameArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.findByNameMutex.Unlock()
	if fake.FindByNameStub != nil {
		return fake.FindByNameStub(arg1)
	} else {
		return fake.findByNameReturns.result1, fake.findByNameReturns.result2
	}
}

func (fake *FakeFeatureFlagRepository) FindByNameCallCount() int {
	fake.findByNameMutex.RLock()
	defer fake.findByNameMutex.RUnlock()
	return len(fake.findByNameArgsForCall)
}

func (fake *FakeFeatureFlagRepository) FindByNameArgsForCall(i int) string {
	fake.findByNameMutex.RLock()
	defer fake.findByNameMutex.RUnlock()
	return fake.findByNameArgsForCall[i].arg1
}

func (fake *FakeFeatureFlagRepository) FindByNameReturns(result1 models.FeatureFlag, result2 error) {
	fake.FindByNameStub = nil
	fake.findByNameReturns = struct {
		result1 models.FeatureFlag
		result2 error
	}{result1, result2}
}

func (fake *FakeFeatureFlagRepository) Update(arg1 string, arg2 bool) error {
	fake.updateMutex.Lock()
	fake.updateArgsForCall = append(fake.updateArgsForCall, struct {
		arg1 string
		arg2 bool
	}{arg1, arg2})
	fake.updateMutex.Unlock()
	if fake.UpdateStub != nil {
		return fake.UpdateStub(arg1, arg2)
	} else {
		return fake.updateReturns.result1
	}
}

func (fake *FakeFeatureFlagRepository) UpdateCallCount() int {
	fake.updateMutex.RLock()
	defer fake.updateMutex.RUnlock()
	return len(fake.updateArgsForCall)
}

func (fake *FakeFeatureFlagRepository) UpdateArgsForCall(i int) (string, bool) {
	fake.updateMutex.RLock()
	defer fake.updateMutex.RUnlock()
	return fake.updateArgsForCall[i].arg1, fake.updateArgsForCall[i].arg2
}

func (fake *FakeFeatureFlagRepository) UpdateReturns(result1 error) {
	fake.UpdateStub = nil
	fake.updateReturns = struct {
		result1 error
	}{result1}
}

var _ feature_flags.FeatureFlagRepository = new(FakeFeatureFlagRepository)


text:
package T2t::ExcelTranslator;

use strict;
use warnings;

use T2t::Utilities;
use T2t::Translator;
use T2t::Row;

use base qw(T2t::Translator);

sub new
{
    my $package  = shift;
    bless( {}, $package );
}

##
#	creates the tables from the input
#   @param file		file to be translated
##
sub createData				# creates the tables and outputs them
{
	my $self = shift;
	my $file = $self->getFile();		# input filename

	eval 'use Spreadsheet::ParseExcel';
	if( $@ )
	{
		warnMessage("Unable to process $file, Spreadsheet::ParseExcel must be installed.\n");
		return;
	}

	eval 'use Spreadsheet::ParseExcel::Workbook';

	my @tables;

	my $excel = Spreadsheet::ParseExcel::Workbook->Parse($file);

  	# create and initialize the table object
  	my $table = $self->createTable();

	foreach my $sheet (@{$excel->{Worksheet}})
	{
		$sheet->{MaxRow} ||= $sheet->{MinRow};

		next if ! $sheet->{MaxRow};

		foreach my $row ($sheet->{MinRow} .. $sheet->{MaxRow})
		{
			my @cellData = ();

			$sheet->{MaxCol} ||= $sheet->{MinCol};
			foreach my $col ($sheet->{MinCol} ..  $sheet->{MaxCol})
			{
				my $cell = $sheet->{Cells}[$row][$col];
				push( @cellData, $cell->{Val}) if( $cell );
			}

			$table->addRow( new T2t::Row(\@cellData) );
		}
	}

	return [$table];
}

1;

__END__

=head1 AUTHOR INFORMATION

Copyright 2000-, Steven Scholnick <scholnicks@gmail.com>

t2t is published under MIT.  See license.txt for details


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

namespace CJia.PIVAS.Tools
{
    public class Model
    {
    }
}


text:
select * from users
where name = '{{name}}'

-- name: multiline_two(name : String)
select * from users
where name = '{{name}}'


text:
var express = require('express');
var app = express();

app.use('/css', express.static(__dirname + '/css'));
app.use('/images', express.static(__dirname + '/images'));
app.use('/js', express.static(__dirname + '/js'));

// Always respond with the html, except for the above exceptions.
// Because it's a single page app.
app.get('/*', function(req, res) {
    res.sendFile(__dirname + '/index.html');
});

var port = process.env.PORT || 8080;
//app.set('port', port);

app.listen(port, function () {
    console.log('Listening on port: ' + port);
});


text:
package com.ning.http.client.async;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.fail;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.eclipse.jetty.server.handler.AbstractHandler;
import org.testng.annotations.Test;

import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.HttpResponseBodyPart;
import com.ning.http.client.Response;

public abstract class ByteBufferCapacityTest extends AbstractBasicTest {
    private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8));

    private class BasicHandler extends AbstractHandler {

        public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException {

            Enumeration<?> e = httpRequest.getHeaderNames();
            String param;
            while (e.hasMoreElements()) {
                param = e.nextElement().toString();
                httpResponse.addHeader("X-" + param, httpRequest.getHeader(param));
            }

            int size = 10 * 1024;
            if (httpRequest.getContentLength() > 0) {
                size = httpRequest.getContentLength();
            }
            byte[] bytes = new byte[size];
            if (bytes.length > 0) {
                final InputStream in = httpRequest.getInputStream();
                final OutputStream out = httpResponse.getOutputStream();
                int read;
                while ((read = in.read(bytes)) != -1) {
                    out.write(bytes, 0, read);
                }
            }

            httpResponse.setStatus(200);
            httpResponse.getOutputStream().flush();
            httpResponse.getOutputStream().close();
        }
    }

    @Override
    public AbstractHandler configureHandler() throws Exception {
        return new BasicHandler();
    }

    @Test(groups = { "standalone", "default_provider" })
    public void basicByteBufferTest() throws Throwable {
        AsyncHttpClient client = getAsyncHttpClient(null);
        try {
            byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16");
            long repeats = (1024 * 100 * 10 / bytes.length) + 1;
            File largeFile = createTempFile(bytes, (int) repeats);
            final AtomicInteger byteReceived = new AtomicInteger();

            try {
                Response response = client.preparePut(getTargetUrl()).setBody(largeFile).execute(new AsyncCompletionHandlerAdapter() {
                    @Override
                    public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception {
                        byteReceived.addAndGet(content.getBodyByteBuffer().capacity());
                        return super.onBodyPartReceived(content);
                    }

                }).get();

                assertNotNull(response);
                assertEquals(response.getStatusCode(), 200);
                assertEquals(byteReceived.get(), largeFile.length());
                assertEquals(response.getResponseBody().length(), largeFile.length());

            } catch (IOException ex) {
                fail("Should have timed out");
            }
        } finally {
            client.close();
        }
    }

    public String getTargetUrl() {
        return String.format("http://127.0.0.1:%d/foo/test", port1);
    }

    public static File createTempFile(byte[] pattern, int repeat) throws IOException {
        TMP.mkdirs();
        TMP.deleteOnExit();
        File tmpFile = File.createTempFile("tmpfile-", ".data", TMP);
        write(pattern, repeat, tmpFile);

        return tmpFile;
    }

    public static void write(byte[] pattern, int repeat, File file) throws IOException {
        file.deleteOnExit();
        file.getParentFile().mkdirs();
        FileOutputStream out = null;
        try {
            out = new FileOutputStream(file);
            for (int i = 0; i < repeat; i++) {
                out.write(pattern);
            }
        } finally {
            if (out != null) {
                out.close();
            }
        }
    }
}


text:
package org.jetbrains.plugins.scala.lang.psi.types

import com.intellij.psi.PsiNamedElement
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil
import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScClassParameter
import org.jetbrains.plugins.scala.lang.psi.api.statements.{ScTypeAliasDeclaration, ScTypeAliasDefinition}
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.ScEarlyDefinitions
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.templates.ScTemplateBody
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ScClass, ScTemplateDefinition}
import org.jetbrains.plugins.scala.lang.psi.types.api.TypeInTypeSystem
import org.jetbrains.plugins.scala.lang.psi.types.api.designator.{ScDesignatorType, ScProjectionType, ScThisType}
import org.jetbrains.plugins.scala.lang.psi.types.result.{Success, TypeResult, TypingContext}
import org.jetbrains.plugins.scala.lang.refactoring.util.ScTypeUtil.AliasType

import scala.collection.immutable.HashSet

/**
  * @author adkozlov
  */
trait ScalaType extends TypeInTypeSystem {
  implicit val typeSystem = ScalaTypeSystem
}

object ScalaType {
  /**
    * Expands type aliases, including those in a type projection. Type Alias Declarations are replaced by their upper
    * bound.
    *
    * @see http://youtrack.jetbrains.net/issue/SCL-2872
    */
  // TODO This is all a bit ad-hoc. What can we learn from scalac?
  // TODO perhaps we need to choose the lower bound if we are in a contravariant position. We get away
  //      with this as we currently only rely on this method to determine covariant types: the parameter
  //      types of FunctionN, or the elements of TupleN
  def expandAliases(tp: ScType, visited: HashSet[ScType] = HashSet.empty): TypeResult[ScType] = {
    if (visited contains tp) return Success(tp, None)
    tp match {
      case proj@ScProjectionType(p, elem, _) => proj.actualElement match {
        case t: ScTypeAliasDefinition if t.typeParameters.isEmpty =>
          t.aliasedType(TypingContext.empty).flatMap(t => expandAliases(proj.actualSubst.subst(t), visited + tp))
        case t: ScTypeAliasDeclaration if t.typeParameters.isEmpty =>
          t.upperBound.flatMap(upper => expandAliases(proj.actualSubst.subst(upper), visited + tp))
        case _ => Success(tp, None)
      }
      case at: ScAbstractType => expandAliases(at.upper, visited + tp) // ugly hack for SCL-3592
      case ScDesignatorType(t: ScType) => expandAliases(t, visited + tp)
      case ScDesignatorType(ta: ScTypeAliasDefinition) => expandAliases(ta.aliasedType(TypingContext.empty).getOrNothing, visited + tp)
      case t: ScTypeAliasDeclaration if t.typeParameters.isEmpty =>
        t.upperBound.flatMap(expandAliases(_, visited + tp))
      case t: ScTypeAliasDefinition if t.typeParameters.isEmpty =>
        t.aliasedType(TypingContext.empty)
      case pt: ScParameterizedType if pt.isAliasType.isDefined =>
        val aliasType: AliasType = pt.isAliasType.get
        aliasType.upper.flatMap(expandAliases(_, visited + tp))
      case _ => Success(tp, None)
    }
  }

  /**
    * Creates a type that designates `element`. Usually this will be a ScDesignatorType, except for the
    * special case when `element` represent a standard type, such as scala.Double.
    *
    * @see http://youtrack.jetbrains.net/issue/SCL-2913
    */
  def designator(element: PsiNamedElement): ScType = {
    element match {
      case td: ScClass =>
        val designatorType = ScDesignatorType(element)
        designatorType.getValType.getOrElse(designatorType)
      case _ =>
        val clazzOpt = element match {
          case p: ScClassParameter => Option(p.containingClass)
          case _ => element.getContext match {
            case _: ScTemplateBody | _: ScEarlyDefinitions =>
              Option(ScalaPsiUtil.contextOfType(element, strict = true, classOf[ScTemplateDefinition]))
            case _ => None
          }
        }

        clazzOpt match {
          case Some(clazz) => ScProjectionType(ScThisType(clazz), element, superReference = false)
          case _ => ScDesignatorType(element)
        }
    }
  }
}


text:
#ifndef QRTBLTRAY_H
#define QRTBLTRAY_H

#include "entity/qrsqltable.h"

#include "qrchaosbase_global.h"
#include "qrglobal.h"

NS_CHAOS_BASE_BEGIN

class CHAOSBASE_SHAREDEXPORT QrTblSystemlTray : public Qters::QrOrm::QrSqlTable
{
    Q_OBJECT
    Q_PROPERTY(int id READ getId WRITE setId)
    Q_PROPERTY(bool separator READ getSeparator WRITE setSeparator)
    Q_PROPERTY(bool isvisible READ getVisible WRITE setVisible)
    Q_PROPERTY(int sort READ getSort WRITE setSort)
    Q_PROPERTY(QString icon READ getIcon WRITE setIcon)
    Q_PROPERTY(QString text READ getText WRITE setText)
    Q_PROPERTY(QString key READ getKey WRITE setKey)
public:
    QrTblSystemlTray();

    // QrSqlTable interface
public:
    virtual QString tableName() const override;

    int getId() const;
    void setId(int value);

    QString getIcon() const;
    void setIcon(const QString &value);

    QString getText() const;
    void setText(const QString &value);

    bool getSeparator() const;
    void setSeparator(bool value);

    bool getVisible() const;
    void setVisible(bool value);

    int getSort() const;
    void setSort(int value);

    QString getKey() const;
    void setKey(const QString &value);

private:
    int id;
    bool separator;
    bool isvisible;
    int sort;
    QString icon;
    QString text;
    QString key;
};

struct QrSystemlTrayData{
    bool separator;
    bool visible;
    QString icon;
    QString text;
    QString key;
};

class CHAOSBASE_SHAREDEXPORT QrTbSystemlTrayHelper{
public:
    static bool getTrayList(QVector<QrSystemlTrayData> *datas);
};

NS_CHAOS_BASE_END

#endif // QRTBLTRAY_H


text:
<!DOCTYPE html>

<meta name="viewport" content="width=800">

    This text should all be autosized to 40px computed font-size; the span below shouldn't affect this.

        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.


text:
/*
 * ----------------------------------------
 *          Jenkins Test Tracker
 * ----------------------------------------
 *          Produced by Dan Grew
 *                 2016
 * ----------------------------------------
 */
package uk.dangrew.jtt.desktop.mc.sides.users;

import javafx.beans.property.LongProperty;
import javafx.beans.property.SimpleLongProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import uk.dangrew.jtt.model.users.JenkinsUser;

/**
 * The {@link UserAssignment} provides the definition of a task or responsibility associated
 * with a particular {@link JenkinsUser}.
 */
public class UserAssignment {

   private final JenkinsUser user;
   private final LongProperty timestamp;
   private final StringProperty description;
   private final StringProperty detail;

   /**
    * Constructs a new {@link UserAssignment}.
    * @param user the {@link JenkinsUser} associated.
    * @param timestamp the timestamp of the assignment.
    * @param description the outline description of the assignment.
    * @param detail the detail of the assignment with notes.
    */
   public UserAssignment( JenkinsUser user, long timestamp, String description, String detail ) {
      this.user = user;
      this.timestamp = new SimpleLongProperty( timestamp );
      this.description = new SimpleStringProperty( description );
      this.detail = new SimpleStringProperty( detail );
   }//End Constructor

   /**
    * Method to construct the {@link UserAssignmentsTreeItem} to place in the {@link UserAssignmentsTree}.
    * @return the {@link UserAssignmentsTreeItem} constructed.
    */
   public UserAssignmentsTreeItem constructTreeItem(){
      return new AssignedTreeItem( this );
   }//End Method

   /**
    * Getter for the associated {@link JenkinsUser}.
    * @return the {@link JenkinsUser}.
    */
   public JenkinsUser getJenkinsUser() {
      return user;
   }//End Method

   /**
    * Property for the timestamp of the assignment.
    * @return the {@link LongProperty}.
    */
   public LongProperty timestampProperty(){
      return timestamp;
   }//End Method

   /**
    * Property for the description of the assignment.
    * @return the {@link StringProperty}.
    */
   public StringProperty descriptionProperty(){
      return description;
   }//End Method

   /**
    * Property for the detail of the assignment.
    * @return the {@link StringProperty}.
    */
   public StringProperty detailProperty(){
      return detail;
   }//End Method

}//End Class


text:
<role version="2.0" xmlns="http://pear2.php.net/dtd/customrole-2.0">
 <name>data</name>
 <class>Pyrus\Installer\Role\Data</class>
 <releasetypes>php</releasetypes>
 <releasetypes>extsrc</releasetypes>
 <releasetypes>extbin</releasetypes>
 <releasetypes>zendextsrc</releasetypes>
 <releasetypes>zendextbin</releasetypes>
 <installable>1</installable>
 <locationconfig>data_dir</locationconfig>
 <honorsbaseinstall />
 <unusualbaseinstall>1</unusualbaseinstall>
 <executable />
</role>


text:
/**
 * @author Roman Lotnyk(romanlotnik@yandex.ru)
 * @version 1
 * @since 05.06.2017
 */

package ru.lotnyk.Tracker.start;


text:
package com.google.tsunami.plugins.detectors.rce.tomcat.ghostcat.ajp;

import java.io.IOException;

/** An helper that performs the Ghostcat exploit against a given exposed AJP connector. */
public interface AjpConnection {

  AjpResponse performGhostcat(String reqUri, String path) throws IOException;

  /** The factory of {@link AjpConnection} types for usage with assisted injection. */
  interface Factory {
    AjpConnection create(String ip, int port);
  }
}


text:
var GlobeMobileHeader = function(options) {

	var master = $('.igraphic-graphic');

	var template = _.templates.mobile({
		hed: $('.main-hed').html()
	});

	master.prepend(template);

	options.drawerElements.appendTo('.mobile-drawer', master);
	options.bodyElements.appendTo('.mobile-body', master);

	function collapseDrawer() {

		// the header has a white bottom border
		// wait until the drawer has collapsed,
		// then make the border transparent
		$('.mobile-header .navicon', master).bind('transitionend oTransitionEnd webkitTransitionEnd', function(e) {

			$('.mobile-header', master).removeClass('expanded'); // make bottom border black
			$('.mobile-header .navicon', master).unbind();
		});

		$('.mobile-drawer', master).removeClass('expanded'); // translate drawer up
		$('.mobile-header .navicon', master).removeClass('minus'); // animate minus to 3 lines

		master.attr('data-drawer', 'collapsed');
	}

	function expandDrawer() {

		// notice we make border transparent immediately,
		// and after the navicon is done transitioning, again
		// this is to cover the edge case of clicking collapse-expand
		// without waiting for collapse to finish

		// the header has a black bottom border
		// immediately make the border transparent
		$('.mobile-header .navicon', master).bind('transitionend oTransitionEnd webkitTransitionEnd', function(e) {

			$('.mobile-header', master).addClass('expanded'); // make bottom border transparent
			$('.mobile-header .navicon', master).unbind();
		});

		$('.mobile-header', master).addClass('expanded'); // make bottom border transparent
		$('.mobile-drawer', master).addClass('expanded'); // translate drawer down
		$('.mobile-header .navicon', master).addClass('minus'); // animate 3 lines to minus

		master.attr('data-drawer', 'expanded');
	}

	function toggleDrawer() {

		if (master.attr('data-drawer') === 'expanded') {
			collapseDrawer();
		} else {
			expandDrawer();
		}
	}

	$(master).on('click', '.mobile-header .navicon', toggleDrawer);

	if (navigator.userAgent.match(/iPad;.*CPU.*OS 7_\d/i)) {
		$('html').addClass('ipad ios7');
	}

	return {
		expandDrawer: expandDrawer,
		collapseDrawer: collapseDrawer
	};

};

module.exports = GlobeMobileHeader;


text:
package org.openntf.domino;

import org.openntf.domino.types.DocumentDescendant;
import org.openntf.domino.types.FactorySchema;

/**
 * The Interface RichTextRange.
 */
public interface RichTextRange extends Base<lotus.domino.RichTextRange>, lotus.domino.RichTextRange, org.openntf.domino.ext.RichTextRange,
		DocumentDescendant {

	public static class Schema extends FactorySchema<RichTextRange, lotus.domino.RichTextRange, RichTextItem> {
		@Override
		public Class<RichTextRange> typeClass() {
			return RichTextRange.class;
		}

		@Override
		public Class<lotus.domino.RichTextRange> delegateClass() {
			return lotus.domino.RichTextRange.class;
		}

		@Override
		public Class<RichTextItem> parentClass() {
			return RichTextItem.class;
		}
	};

	public static final Schema SCHEMA = new Schema();

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#Clone()
	 */
	@Override
	public lotus.domino.RichTextRange Clone();

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#findandReplace(java.lang.String, java.lang.String)
	 */
	@Override
	public int findandReplace(final String target, final String replacement);

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#findandReplace(java.lang.String, java.lang.String, long)
	 */
	@Override
	public int findandReplace(final String target, final String replacement, final long options);

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#getNavigator()
	 */
	@Override
	public RichTextNavigator getNavigator();

	/**
	 * Gets the parent.
	 *
	 * @return the parent
	 */
	@Override
	public RichTextItem getParent();

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#getStyle()
	 */
	@Override
	public RichTextStyle getStyle();

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#getTextParagraph()
	 */
	@Override
	public String getTextParagraph();

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#getTextRun()
	 */
	@Override
	public String getTextRun();

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#getType()
	 */
	@Override
	public int getType();

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#remove()
	 */
	@Override
	public void remove();

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#reset(boolean, boolean)
	 */
	@Override
	public void reset(final boolean begin, final boolean end);

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#setBegin(lotus.domino.Base)
	 */
	@Override
	public void setBegin(final lotus.domino.Base element);

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#setEnd(lotus.domino.Base)
	 */
	@Override
	public void setEnd(final lotus.domino.Base element);

	/*
	 * (non-Javadoc)
	 *
	 * @see lotus.domino.RichTextRange#setStyle(lotus.domino.RichTextStyle)
	 */
	@Override
	public void setStyle(final lotus.domino.RichTextStyle style);

}


text:
1. Add the following to your site's `Gemfile`:

  ```ruby
  gem 'jekyll-seo-tag'
  ```

2. Add the following to your site's `_config.yml`:

  ```yml
  plugins:
    - jekyll-seo-tag
  ```

3. Add the following right before `</head>` in your site's template(s):

  ```liquid
  {% seo %}
  ```


text:
package com.houseelectrics.serializer.test;
import java.util.List;
import java.util.ArrayList;

/**
 * Created by roberttodd on 01/12/2014.
 */
public class TestData
{
    public Sub sub = new Sub();
    public Sub getTheSub()  { return sub; }
    public void setTheSub(Sub value) {this.sub=value;  }
    public class Sub
    {
        public SubSub subSub = new SubSub();
        public SubSub getTheSubSub() { return subSub; }
        public class SubSub
        {
            public String greeting = "hi";
            public String getGreeting()  {return greeting;}
            public void setGreeting(String value) { this.greeting = value; }
            public int ageYears = 32;
            public int getAgeYears() {return ageYears;}
            public double heightMetres = 1.23;
            public double getHeightMetres() { return heightMetres; }
            public String[] seasons = { "Spring", "Summer", "Autumn", "Winter" };
            public String[] getSeasons() { return seasons; }
            private List<Integer> goodYears = new ArrayList<Integer> ();
            public List<Integer> getGoodYears() {return goodYears;}
            public SubSub()
            {
                goodYears.add(1966);
                goodYears.add(1973);
            }
        }
    }

}


text:
<?php

namespace JorgeHernan\Bundle\OdmRelationshipViewBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;

/**
 * This is the class that loads and manages your bundle configuration
 *
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
 */
class JorgeHernanOdmRelationshipViewExtension extends Extension
{
    /**
     * {@inheritDoc}
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');
    }
}