text:
@interface MovieModel : NSObject

@property (nonatomic, strong) NSNumber *rank;
@property (nonatomic, strong) NSDictionary *subject;
@property (nonatomic, strong) NSNumber *box;

@end

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Runtime.Serialization;
using GoogleMapsApi.Entities.Common;

namespace GoogleMapsApi.Entities.PlaceAutocomplete.Response
{
    /// <summary>
    /// When the PlaceAutocomplete service returns results from a search, it places them within a predictions array.
    /// Even if the service returns no results (such as if the location is remote) it still returns an empty predictions array.
    /// </summary>
    [DataContract]
	public class Prediction
	{
        /// <summary>
        /// Contains the human-readable name for the returned result. For establishment results, this is usually the business name.
        /// </summary>
		[DataMember(Name = "description")]
		public string Description { get; set; }

		/// <summary>
		/// Contains a unique identifier for this place. To retrieve information about this place, pass this identifier in the placeId field of
		/// a Places API request.
		/// </summary>
		[DataMember( Name = "place_id" )]
		public string PlaceId { get; set; }

		/// <summary>
        /// Contains a unique token that you can use to retrieve additional information about this place in a Place Details request.
        /// You can store this token and use it at any time in future to refresh cached data about this place, but the same token is
        /// not guaranteed to be returned for any given place across different searches.
        /// </summary>
        [DataMember(Name = "reference")]
		[Obsolete( "Use place_id instead.  See https://developers.google.com/places/documentation/search#deprecation for more information." )]
		public string Reference { get; set; }

        /// <summary>
        /// Contains a unique stable identifier denoting this place. This identifier may not be used to retrieve information about this
        /// place, but can be used to consolidate data about this place, and to verify the identity of a place across separate searches.
        /// </summary>
        [DataMember(Name = "id")]
		[Obsolete( "Use place_id instead.  See https://developers.google.com/places/documentation/search#deprecation for more information." )]
		public string ID { get; set; }

        /// <summary>
        /// Contains an array of terms identifying each section of the returned description (a section of the description is generally
        /// terminated with a comma). Each entry in the array has a value field, containing the text of the term, and an offset field,
        /// defining the start position of this term in the description, measured in Unicode characters.
        /// </summary>
		[DataMember(Name = "terms")]
		public Term[] Terms { get; set; }

        /// <summary>
        /// Contains an array of types that apply to this place. For example: [ "political", "locality" ] or [ "establishment", "geocode" ].
        /// </summary>
		[DataMember(Name = "types")]
		public string[] Types { get; set; }

        /// <summary>
        /// Contains an offset value and a length. These describe the location of the entered term in the prediction result text, so that
        /// the term can be highlighted if desired.
        /// </summary>
		[DataMember(Name = "matched_substrings")]
		public MatchedSubstring[] MatchedSubstrings { get; set; }
	}
}


text:
#ifndef TENSORFLOW_COMPILER_MLIR_LITE_QUANTIZATION_LITE_TFL_TO_STD_H_
#define TENSORFLOW_COMPILER_MLIR_LITE_QUANTIZATION_LITE_TFL_TO_STD_H_

#include "mlir/Dialect/Func/IR/FuncOps.h"  // from @llvm-project
#include "mlir/IR/BuiltinOps.h"  // from @llvm-project

namespace mlir {
namespace TFL {

// Converts all the tfl.quantize/tfl.dequantize ops to the ops in the mlir.quant
// dialect ones in the function.
void ConvertTFLQuantOpsToMlirQuantOps(func::FuncOp func);

// Converts all the mlir.quant dialect ops to the tfl.quantize/tfl.dequantize
// ops in the function.
void ConvertMlirQuantOpsToTFLQuantOps(func::FuncOp func);

// A helper class to convert target function to another representation using
// `ConvertForward` function during construction and convert target function
// back to the original representation using `ConvertBackward` function during
// deconstruction.
template <void (*ConvertForward)(func::FuncOp),
          void (*ConvertBackward)(func::FuncOp)>
class ScopedOpsConverter {
 public:
  explicit ScopedOpsConverter(func::FuncOp func) : func_(func) {
    ConvertForward(func_);
  }

  ScopedOpsConverter(const ScopedOpsConverter&) = delete;
  ScopedOpsConverter operator=(const ScopedOpsConverter&) = delete;
  ScopedOpsConverter(const ScopedOpsConverter&&) = delete;
  ScopedOpsConverter operator=(const ScopedOpsConverter&&) = delete;

  ~ScopedOpsConverter() { ConvertBackward(func_); }

 private:
  func::FuncOp func_;
};

using ScopedTFLQuantOpsToMlirQuantOpsConverter =
    ScopedOpsConverter<ConvertTFLQuantOpsToMlirQuantOps,
                       ConvertMlirQuantOpsToTFLQuantOps>;
using ScopedMlirQuantOpsToTFLQuantOpsConverter =
    ScopedOpsConverter<ConvertMlirQuantOpsToTFLQuantOps,
                       ConvertTFLQuantOpsToMlirQuantOps>;
}  // namespace TFL
}  // namespace mlir

#endif  // TENSORFLOW_COMPILER_MLIR_LITE_QUANTIZATION_LITE_TFL_TO_STD_H_


text:
*Get if a floating point value is a subnormal value.*

## C Signature
```
Nucleus_Status
Nucleus_[FloatingPointType]_isSubnormal
    (
        [FloatingPointType] x,
        bool *r
    )
```
where `[FloatingPointType]` is one of `Single`, `Double`, or `Quadruple`.

## Parameters
- `x` a `[Floating-Point-Type]` value
- `r` a pointer to a `bool` variable

## Description
This function gets if a floating point value is a subnormal value.

A boolean value was stored in the variable pointed to by `r` and `Nucleus_Status_Success` is returned
if this function succeeds.
The boolean value is `true` if `x` is a subnormal value and is `false` if `x` is not a subnormal value.
This function fails if and only if `r` is a null pointer.
In that case `Nucleus_Status_InvalidArgument` is returned.

## Requirements

|                      | Windows                  | Linux                     |
|----------------------|--------------------------|---------------------------|
| *Header*             | `Nucleus/FloatingPoint.h`| `Nucleus/FloatingPoint.h` |
| *Static library*     | `Nucleus.Library.lib`    | `libNucleus.Library.a`    |


text:
//
// PriceListsController.cs
//
// Author:
//   Eddy Zavaleta <eddy@mictlanix.com>
//   Eduardo Nieto <enieto@mictlanix.com>
//
// Copyright (C) 2011-2016 Eddy Zavaleta, Mictlanix, and contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Castle.ActiveRecord;
using Mictlanix.BE.Model;
using Mictlanix.BE.Web.Models;
using Mictlanix.BE.Web.Mvc;
using Mictlanix.BE.Web.Helpers;
using NHibernate.Exceptions;

namespace Mictlanix.BE.Web.Controllers.Mvc {
	[Authorize]
	public class PriceListsController : CustomController {
		public ViewResult Index ()
		{
			var qry = from x in PriceList.Queryable
				  where x.Id > 0
				  orderby x.Name
				  select x;

			var search = new Search<PriceList> ();
			search.Limit = WebConfig.PageSize;
			search.Results = qry.Skip (search.Offset).Take (search.Limit).ToList ();
			search.Total = qry.Count ();

			return View (search);
		}

		[HttpPost]
		public ActionResult Index (Search<PriceList> search)
		{
			if (ModelState.IsValid) {
				search = GetPriceList (search);
			}

			if (Request.IsAjaxRequest ()) {
				return PartialView ("_Index", search);
			} else {
				return View (search);
			}
		}

		Search<PriceList> GetPriceList (Search<PriceList> search)
		{
			var qry = from x in PriceList.Queryable
				  where x.Id > 0
				  orderby x.Name
				  select x;

			if (!string.IsNullOrEmpty (search.Pattern)) {
				qry = from x in PriceList.Queryable
				      where x.Id > 0 && x.Name.Contains (search.Pattern)
				      orderby x.Name
				      select x;
			}

			search.Total = qry.Count ();
			search.Results = qry.Skip (search.Offset).Take (search.Limit).ToList ();

			return search;
		}

		public ActionResult View (int id)
		{
			var item = PriceList.Find (id);
			return PartialView ("_View", item);
		}

		public ActionResult Create ()
		{
			return PartialView ("_Create");
		}

		[HttpPost]
		public ActionResult Create (PriceList item)
		{
			if (!ModelState.IsValid)
				return PartialView ("_Create", item);

			item.LowProfitMargin /= 100m;
			item.HighProfitMargin /= 100m;

			using (var scope = new TransactionScope ()) {
				item.CreateAndFlush ();
			}

			return PartialView ("_CreateSuccesful", item);
		}

		public ActionResult Edit (int id)
		{
			var item = PriceList.Find (id);

			item.LowProfitMargin *= 100m;
			item.HighProfitMargin *= 100m;

			return PartialView ("_Edit", item);
		}

		[HttpPost]
		public ActionResult Edit (PriceList item)
		{
			if (!ModelState.IsValid)
				return PartialView ("_Edit", item);

			var entity = PriceList.Find (item.Id);

			entity.Name = item.Name;
			entity.LowProfitMargin = item.LowProfitMargin;
			entity.HighProfitMargin = item.HighProfitMargin;

			entity.LowProfitMargin /= 100m;
			entity.HighProfitMargin /= 100m;

			using (var scope = new TransactionScope ()) {
				entity.UpdateAndFlush ();
			}

			return PartialView ("_Refresh");
		}

		public ActionResult Delete (int id)
		{
			var item = PriceList.Find (id);
			return PartialView ("_Delete", item);
		}

		[HttpPost, ActionName ("Delete")]
		public ActionResult DeleteConfirmed (int id)
		{
			var item = PriceList.Find (id);

			try {
				using (var scope = new TransactionScope ()) {
					item.DeleteAndFlush ();
				}

				return PartialView ("_DeleteSuccesful", item);
			} catch (GenericADOException) {
				return PartialView ("DeleteUnsuccessful");
			}
		}

		public JsonResult GetSuggestions (string pattern)
		{
			var qry = from x in PriceList.Queryable
				  where x.Id > 0 && x.Name.Contains (pattern)
				  select new { id = x.Id, name = x.Name };

			return Json (qry.Take (15).ToList (), JsonRequestBehavior.AllowGet);
		}
	}
}


text:
angular.module('starter.services')

.factory('Store', function ($http, $q, $timeout) {

	var collectionName = 'offers';

	var collections = {
		 offers : {
		    searchFields: {id: 'string'}
		  }
		};

	WL.JSONStore.init(collections).then(function (collections) {
		  console.log('offers store init sucess');
		}).fail(function (error) {
		  console.error('offers store init failed',error);
		});

	return {
	    'saveData': function(data){
	      data.forEach(function(offer){
	    	  findOffer(offer);
	      });
	      return data;
	    },
	    'getData': function(){
	    	var defer = $q.defer();

		      WL.JSONStore.get(collectionName).findAll().then(function (results) {
		    	  // handle success - results (array of documents found)
		    	  defer.resolve(results.map(function(result){
		    		  return {
		    			  description: result.json.description,
		  				  imageUrl: result.json.imageUrl,
		  				  title: result.json.title,
		  				  _id: result.json.id
		    		  };
		    	  }));
		    	}).fail(function (error) {
		    	  defer.reject(error);
		      });
		   return defer.promise;
	    }
	};

	function findOffer(offer){
		var query = {id: offer._id};
		var options = {
		  exact: true,
		  limit: 1
		};
		WL.JSONStore.get(collectionName).find(query, options).then(function (results) {
		  // handle success - results (array of documents found)
			if(results.length == 0){
				//add new offer to store
				saveOffer(offer);
			}
		}).fail(function (error) {
			console.error(error);
		});
	}
	function saveOffer(offer){
		var options = {};
		var data = {
				description: offer.description,
				imageUrl: offer.imageUrl,
				title: offer.title,
				id:offer._id,
		};
		WL.JSONStore.get(collectionName).add(data, options).then(function () {
		 // handle success
			console.log('succesfully added offer',data);
		}).fail(function (error) {
		    console.error(error);
		});
	}

});


text:
@implementation UIView (TouchAreaInsets)

+ (void)load {
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    method_exchangeImplementations(class_getInstanceMethod(self, @selector(pointInside:withEvent:)),
                                   class_getInstanceMethod(self, @selector(_touchAreaInsets_pointInside:withEvent:)));
  });
}

- (UIEdgeInsets)touchAreaInsets {
  return [objc_getAssociatedObject(self, @selector(touchAreaInsets)) UIEdgeInsetsValue];
}

- (void)setTouchAreaInsets:(UIEdgeInsets)touchAreaInsets {
  NSValue *value = [NSValue valueWithUIEdgeInsets:touchAreaInsets];
  objc_setAssociatedObject(self, @selector(touchAreaInsets), value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (BOOL)_touchAreaInsets_pointInside:(CGPoint)point withEvent:(UIEvent *)event {
  UIEdgeInsets touchAreaInsets = self.touchAreaInsets;
  CGRect bounds = self.bounds;
  bounds = CGRectMake(bounds.origin.x - touchAreaInsets.left,
                      bounds.origin.y - touchAreaInsets.top,
                      bounds.size.width + touchAreaInsets.left + touchAreaInsets.right,
                      bounds.size.height + touchAreaInsets.top + touchAreaInsets.bottom);
  return CGRectContainsPoint(bounds, point);
}

@end


text:
const header = require('../Components/Header/Header.html')
const footer = require('../Components/Footer/Footer.html')
const dashboard = require('../Components/Dashboard/Dashboard.html')
const modal = require('../Components/Modal/index.html')

function html() {
  return (
    `
    ${header}

    ${dashboard}
    ${footer}
    ${modal}
    `
  )
}

module.exports = html()


text:
package com.eaglesakura.serialize.internal;

import com.eaglesakura.io.DataInputStream;
import com.eaglesakura.io.DataOutputStream;

import java.io.IOException;

/**
 * オブジェクトごとのヘッダ情報
 *
 * 値型,String,byte[]の場合
 * : [id 2byte][Flag 2byte][Size 1byte | 4byte][Data  n byte]
 *
 * Object型の場合(Integer等のラッパー型は扱わない)
 * : [id 2byte][Flag 2byte][Num 2byte][値型...]
 *
 * List型の場合
 * : [id 2byte][Flag 2byte][Num 4byte][Object...]
 *
 * Null Objectの場合
 * : [id 2byte][Flag 2byte]
 */
public class ObjectHeader {

    /**
     * nullが書き込まれている
     */
    public static final short OBJECT_FLAG_NULL = 0x1 << 0;

    /**
     * 配列が書き込まれている
     */
    public static final short OBJECT_FLAG_ARRAY = 0x1 << 1;

    /**
     * 大きなデータが書き込まれている
     * sizeが4byteとして扱う
     */
    public static final short OBJECT_FLAG_LARGEDATA = 0x1 << 2;

    /**
     * オブジェクトグループ(Object型)として扱う
     */
    public static final short OBJECT_FLAG_GROUP = 0x1 << 3;

    /**
     * 文字列のcharset
     */
    public static final String STRING_CHARSET = "UTF-8";

    public final short id;

    public final short flags;

    /**
     * Primitive : バイト数
     * Array : 配列数
     * Object : Field数
     */
    public final int size;

    public static final short ID_ROOT = (short) 0xEFCD;

    public ObjectHeader(short id, short flags, int size) {
        if (size < 0) {
            throw new IllegalArgumentException("size : " + size);
        }

        this.id = id;
        this.flags = flags;
        this.size = size;
    }

    public boolean isArray() {
        return (flags & OBJECT_FLAG_ARRAY) != 0;
    }

    public boolean isNull() {
        return (flags & OBJECT_FLAG_NULL) != 0;
    }

    public boolean isObject() {
        return (flags & OBJECT_FLAG_GROUP) != 0;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ObjectHeader that = (ObjectHeader) o;

        if (id != that.id) return false;
        if (flags != that.flags) return false;
        return size == that.size;

    }

    @Override
    public int hashCode() {
        int result = (int) id;
        result = 31 * result + (int) flags;
        result = 31 * result + size;
        return result;
    }

    public void write(DataOutputStream stream) throws IOException {
        stream.writeS16(id);
        stream.writeS16(flags);

        if ((flags & OBJECT_FLAG_ARRAY) != 0) {
            stream.writeS32(size);
        } else if ((flags & OBJECT_FLAG_GROUP) != 0) {
            stream.writeS16((short) size);
        } else if ((flags & OBJECT_FLAG_LARGEDATA) != 0) {
            stream.writeS32(size);
        } else if ((flags & OBJECT_FLAG_NULL) != 0) {
            // null
        } else {
            stream.writeS8((byte) size);
        }
    }

    public static ObjectHeader read(DataInputStream stream) throws IOException {
        final short id = stream.readS16();
        final short flags = stream.readS16();

        final int size;
        if ((flags & OBJECT_FLAG_ARRAY) != 0) {
            size = stream.readS32();
        } else if ((flags & OBJECT_FLAG_GROUP) != 0) {
            size = stream.readU16();
        } else if ((flags & OBJECT_FLAG_LARGEDATA) != 0) {
            size = stream.readS32();
        } else if ((flags & OBJECT_FLAG_NULL) != 0) {
            size = 0;
        } else {
            size = stream.readU8();
        }

        return new ObjectHeader(id, flags, size);
    }
}


text:
//Part of the DuskWolf engine
//Licensed under the MIT license, see COPYING.txt for details
"use strict";

load.provide("dusk.sgui.Rect", function() {
	var Component = load.require("dusk.sgui.Component");
	var sgui = load.require("dusk.sgui");

	/** A simple rectangle.
	 *
	 *  It sets all the area specified by it's `height` and `width`, and colours it in a single colour with an optional
	 *  border.
	 *
	 * @extends dusk.sgui.Component
	 * @constructor
	 * @memberof dusk.sgui
	 */
	class Rect extends Component {
		/** Creates a new Rect.
		 *
		 * @param {dusk.sgui.Component} parent The container that this component is in.
		 * @param {string} name The name of the component.
		 */
		constructor(parent, name) {
			super(parent, name);

			/** The colour of the rectangle.
			 * @type string
			 * @default "#eeeeee"
			 * @memberof! dusk.sugi.Rect#
			 */
			this.colour = "#eeeeee";
			/** The colour of the border.
			 * @type string
			 * @default "#cccccc"
			 * @memberof! dusk.sugi.Rect#
			 */
			this.bColour = "#cccccc";
			/** The thickness of the rectangle border.
			 * 	If 0, there will be no border.
			 * @type float
			 * @default 0
			 * @memberof! dusk.sugi.Rect#
			 */
			this.bWidth = 0;
			/** A radius, if this is nonzero this will be the radius of the rectangle's corners.
			 * @type integer
			 * @default 0
			 * @since 0.0.21-alpha
			 * @memberof! dusk.sugi.Rect#
			 */
			this.radius = 0;

			//Prop masks
			this._mapper.map("colour", "colour");
			this._mapper.map("color", "colour");
			this._mapper.map("bColour", "bColour");
			this._mapper.map("bColor", "bColour");
			this._mapper.map("bWidth", "bWidth");
			this._mapper.map("radius", "radius");

			//Listeners
			this.onPaint.listen(this._rectDraw.bind(this));
		}

		/** A draw handler which draws the rectangle.
		 * @param {object} e A draw event.
		 * @private
		 */
		_rectDraw(e) {
			e.c.fillStyle = this.colour;
			e.c.strokeStyle = this.bColour;
			e.c.lineWidth = this.bWidth;

			this._fill(e, this.bWidth != 0, this.colour == "");
		}

		/** Does the rectangle thing, for use in subclasses. Will draw the rectangle, but not set any of the styles.
		 * @param {object} e A draw event, it doesn't have to be the.sliceal one.
		 * @protected
		 * @since 0.0.21-alpha
		 */
		_fill(e, border, noFill) {
			if(this.radius) {
				e.c.beginPath();

				e.c.moveTo(e.d.dest.x + this.radius, e.d.dest.y);
				e.c.lineTo(e.d.dest.x + e.d.slice.width - this.radius, e.d.dest.y);
				e.c.quadraticCurveTo(
					e.d.dest.x + e.d.slice.width, e.d.dest.y, e.d.dest.x + e.d.slice.width, e.d.dest.y + this.radius
				);

				e.c.lineTo(e.d.dest.x + e.d.slice.width, e.d.dest.y + e.d.slice.height - this.radius);
				e.c.quadraticCurveTo(
					e.d.dest.x + e.d.slice.width, e.d.dest.y + e.d.slice.height, e.d.dest.x + e.d.slice.width - this.radius,
					e.d.dest.y+e.d.slice.height
				);

				e.c.lineTo(e.d.dest.x + this.radius, e.d.dest.y + e.d.slice.height);
				e.c.quadraticCurveTo(
					e.d.dest.x, e.d.dest.y + e.d.slice.height, e.d.dest.x, e.d.dest.y + e.d.slice.height - this.radius
				);

				e.c.lineTo(e.d.dest.x, e.d.dest.y + this.radius);
				e.c.quadraticCurveTo(e.d.dest.x, e.d.dest.y, e.d.dest.x + this.radius, e.d.dest.y);
				e.c.closePath();

				if(!noFill) e.c.fill();
				if(border) e.c.stroke();
			}else{
				if(!noFill) e.c.fillRect(e.d.dest.x, e.d.dest.y, e.d.slice.width, e.d.slice.height);
				if(border) e.c.strokeRect(e.d.dest.x, e.d.dest.y, e.d.slice.width, e.d.slice.height);
			}
		}
	}

	sgui.registerType("Rect", Rect);

	return Rect;
});


text:
package com.linkedin.kafka.clients.utils.tests;

import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.StringJoiner;
import org.apache.kafka.common.security.auth.SecurityProtocol;

public abstract class AbstractKafkaIntegrationTestHarness extends AbstractZookeeperTestHarness {
  private final static Random RANDOM = new Random();
  protected Map<Integer, EmbeddedBroker> _brokers = null;
  protected Set<Integer> _deadBrokers;
  protected String _bootstrapUrl;

  @Override
  public void setUp() {
    super.setUp();
    if (_brokers != null) {
      return;
    }

    _brokers = new LinkedHashMap<>();
    List<Map<Object, Object>> brokerConfigs = buildBrokerConfigs();
    if (brokerConfigs == null || brokerConfigs.isEmpty()) {
      throw new AssertionError("Broker configs " + brokerConfigs + " should not be null or empty");
    }
    for (Map<Object, Object> brokerConfig : brokerConfigs) {
      EmbeddedBroker broker = new EmbeddedBroker(brokerConfig);
      int id = broker.getId();
      if (_brokers.putIfAbsent(id, broker) != null) {
        KafkaTestUtils.quietly(broker::close); //wont be picked up by teardown
        throw new IllegalStateException("multiple brokers defined with id " + id);
      }
    }

    StringJoiner joiner = new StringJoiner(",");
    _brokers.values().forEach(broker -> joiner.add(broker.getAddr(securityProtocol())));
    _bootstrapUrl = joiner.toString();
    _deadBrokers = new HashSet<>();
  }

  @Override
  public void tearDown() {
    try {
      if (_brokers != null) {
        for (EmbeddedBroker broker : _brokers.values()) {
          KafkaTestUtils.quietly(broker::close);
        }
        _brokers.clear();
        _brokers = null;
      }
    } finally {
      super.tearDown();
    }
  }

  protected EmbeddedBroker serverForId(int id) {
    return broker(id);
  }

  protected EmbeddedBroker broker(int id) {
    EmbeddedBroker broker = _brokers.get(id);
    if (broker == null) {
      throw new IllegalArgumentException("Invalid server id " + id);
    }
    return broker;
  }

  public String bootstrapServers() {
    return _bootstrapUrl;
  }

  /**
   * returns the list of broker configs for all brokers created by this test
   * (as determined by clusterSize()
   * @return list of broker configs, one config map per broker to be created
   */
  protected List<Map<Object, Object>> buildBrokerConfigs() {
    List<Map<Object, Object>> configs = new ArrayList<>();
    for (int i = 0; i < clusterSize(); i++) {
      EmbeddedBrokerBuilder builder = new EmbeddedBrokerBuilder();
      builder.zkConnect(zookeeper());
      builder.nodeId(i);
      builder.enable(securityProtocol());
      if (securityProtocol() == SecurityProtocol.SSL) {
        if (trustStoreFile() != null) {
          builder.trustStore(trustStoreFile());
        }
      } else {
        if (trustStoreFile() != null) {
          throw new AssertionError("security protocol not set yet trust store file provided");
        }
      }
      Map<Object, Object> config = builder.buildConfig();
      config.putAll(overridingProps());
      configs.add(config);
    }
    return configs;
  }

  protected SecurityProtocol securityProtocol() {
    return SecurityProtocol.PLAINTEXT;
  }

  protected File trustStoreFile() {
    return null;
  }

  protected int clusterSize() {
    return 1;
  }

  protected Map<Object, Object> overridingProps() {
    return Collections.emptyMap();
  }

  /**
   * Kill broker by broker id
   * @param id id of broker
   * @throws Exception if anything goes wrong
   */
  public void killBroker(int id) throws Exception {
    EmbeddedBroker broker = _brokers.get(id);

    if (!_deadBrokers.contains(id)) {
      broker.shutdown();
      broker.awaitShutdown();
      _deadBrokers.add(id);
    }
  }

  /**
   * Kill a random broker that is not alive.
   *
   * @return id of broker killed
   * @throws Exception if anything goes wrong
   */
  public int killRandomBroker() throws Exception {
    int index = RANDOM.nextInt(_brokers.size());
    int id = (Integer) _brokers.keySet().toArray()[index];
    killBroker(id);
    return id;
  }

  /**
   * Restart all dead brokers
   * @return Returns a list of brokers that were restarted
   * @throws Exception all exceptions caused while starting brokers
   */
  public List<Integer> restartDeadBrokers() throws Exception {
    List<Integer> brokersStarted = new ArrayList<>();
    for (int id : _deadBrokers) {
      _brokers.get(id).startup();
      brokersStarted.add(id);
    }
    _deadBrokers.clear();
    return brokersStarted;
  }
}


text:
package org.daisy.dotify.formatter.impl.core;

import org.daisy.dotify.api.formatter.FormatterConfiguration;
import org.daisy.dotify.api.formatter.LayoutMasterBuilder;
import org.daisy.dotify.api.formatter.LayoutMasterProperties;
import org.daisy.dotify.api.translator.BrailleTranslatorFactoryMakerService;
import org.daisy.dotify.api.translator.TextBorderFactoryMakerService;
import org.daisy.dotify.formatter.impl.common.FormatterCoreContext;

import java.util.HashMap;
import java.util.Map;

/**
 * Provides formatter context data.
 *
 * @author Joel Håkansson
 */
public class FormatterContext extends FormatterCoreContext {
    private final Map<String, LayoutMaster> masters;
    private final Map<String, ContentCollectionImpl> collections;
    private final HashMap<String, TableOfContentsImpl> tocs;
    private final TransitionBuilderImpl transitionBuilder;

    public FormatterContext(
        BrailleTranslatorFactoryMakerService translatorFactory,
        TextBorderFactoryMakerService tbf,
        FormatterConfiguration config
    ) {
        super(translatorFactory, tbf, config);
        this.masters = new HashMap<>();
        this.collections = new HashMap<>();
        this.tocs = new HashMap<>();
        this.transitionBuilder = new TransitionBuilderImpl(this);
    }

    public LayoutMasterBuilder newLayoutMaster(String name, LayoutMasterProperties properties) {
        LayoutMaster master = new LayoutMaster(this, properties);
        masters.put(name, master);
        return master;
    }

    public ContentCollectionImpl newContentCollection(String collectionId) {
        ContentCollectionImpl collection = new ContentCollectionImpl(this);
        collections.put(collectionId, collection);
        return collection;
    }

    public TableOfContentsImpl newTableOfContents(String tocName) {
        TableOfContentsImpl toc = new TableOfContentsImpl(this);
        tocs.put(tocName, toc);
        return toc;
    }

    public Map<String, LayoutMaster> getMasters() {
        return masters;
    }

    public Map<String, ContentCollectionImpl> getCollections() {
        return collections;
    }

    public Map<String, TableOfContentsImpl> getTocs() {
        return tocs;
    }

    public TransitionBuilderImpl getTransitionBuilder() {
        return transitionBuilder;
    }

}


text:
@interface PodsDummy_ReactiveObjC : NSObject
@end
@implementation PodsDummy_ReactiveObjC
@end


text:
namespace content {
class WebContents;
}  // namespace content

namespace dom_distiller {

// A utility class for logging UMA metrics.
class UMAHelper {
 public:
  // Must agree with ReaderModeEntryPoint in enums.xml.
  enum class ReaderModeEntryPoint {
    kOmniboxIcon = 0,
    kMenuOption = 1,
    kMaxValue = kMenuOption,
  };

  // A page can be distillable (an article), distilled (a reader mode
  // page), or neither (some other webpage).
  enum class ReaderModePageType {
    kDistillable,
    kDistilled,
    kNone,
  };

  // A class to time the active time of a page, so that metrics for time spent
  // on distillable pages and distilled pages can be logged. There should be
  // exactly one of these associated with each DistillabilityDriver.
  class DistillabilityDriverTimer {
   public:
    DistillabilityDriverTimer() = default;

    ~DistillabilityDriverTimer() {
      // The timer has the same life as a DistillabilityDriver, which is
      // destroyed when a WebContents is destroyed. Thus if we are being
      // destroyed and on a distilled page, go ahead and log the total time to
      // UMA. This may happen if the user closes the tab or window, for example.
      if (IsTimingDistilledPage())
        UMAHelper::LogTimeOnDistilledPage(GetElapsedTime());
    }

    // Starts if not already started.
    void Start(bool is_distilled_page);
    // Starts up again.
    void Resume();
    // Pauses if not already paused.
    void Pause();
    // Resets the timer and whether it is tracking a distilled page.
    void Reset();
    // Returns true if the timer is not zeroed, whether it is paused or
    // currently running.
    bool HasStarted();
    // If the timer is not zeroed and the timer is associated with a distilled
    // page.
    bool IsTimingDistilledPage();
    // The amount of active time so far.
    base::TimeDelta GetElapsedTime();

   private:
    base::TimeDelta total_active_time_;
    base::Time active_time_start_;
    bool is_distilled_page_ = false;
  };

  static void RecordReaderModeEntry(ReaderModeEntryPoint entry_point);
  static void RecordReaderModeExit(ReaderModeEntryPoint exit_point);

  // Timers at the old contents may need to be stopped / paused.
  static void UpdateTimersOnContentsChange(content::WebContents* web_contents,
                                           content::WebContents* old_contents);
  // Starts the timer if the page time is one which should be timed.
  static void StartTimerIfNeeded(content::WebContents* web_contents,
                                 ReaderModePageType page_type);
  // Timers may need to be paused on navigation.
  static void UpdateTimersOnNavigation(content::WebContents* web_contents,
                                       ReaderModePageType page_type);

  // Logs the time spent on a distillable page. Should be called just before
  // when switching to a distilled page. We are only interested in time on
  // distillable pages when the user then decides to distill the article.
  static void LogTimeOnDistillablePage(content::WebContents* web_contents);

  // Logs the time spent on a distilled (reader mode) page. Should be called
  // when leaving a distilled page, i.e. if the tab is closed or if the user
  // navigates to another page.
  static void LogTimeOnDistilledPage(base::TimeDelta time);

  UMAHelper() = delete;
  UMAHelper(const UMAHelper&) = delete;
  UMAHelper& operator=(const UMAHelper&) = delete;
};

}  // namespace dom_distiller

#endif  // COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_UMA_HELPER_H_


text:
'use strict';

var mongoose = require('mongoose'),
  Thing = mongoose.model('Thing'),
  User = mongoose.model('User'),
  Project = mongoose.model('Project'),
  Term = mongoose.model('Term');

/**
 * Populate database with sample application data
 */
User.find({}).remove(function() {

  User.create({
    name: 'dev01',
    username: 'dev01',
    info: 'development test user',
    email: 'dev01@dev.com',
    password: '123456'
  },{
    name: 'dev-test',
    username: 'dev02',
    info: 'development test user',
    email: 'dev02@dev.com',
    password: '123456'
  }, function(err, user) {

    console.log('finished populating users');
    Term.find({}).remove(function() {

      var query = User.findOne({'email': 'dev01@dev.com'});
      query.exec(function(err, user) {

        Term.create({
          name: 'DevTerms',
          info: 'Terms for development',
          creater: user
        },{
          name: 'DevTerms2',
          info: 'Terms for development',
          creater: user
        }, function(err, term) {

          Project.find({}).remove(function(){

            term.createProject({
              name: 'project01',
              info: 'create project for terms',
              term: term
            }, function(){});

          });
          console.log('finished populating terms');

        });

      });

    });

  })

});

//Clear old things, then add things in
Thing.find({}).remove(function() {
  Thing.create({
    name : 'HTML5 Boilerplate',
    info : 'HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.',
    awesomeness: 10
  }, {
    name : 'AngularJS',
    info : 'AngularJS is a toolset for building the framework most suited to your application development.',
    awesomeness: 10
  }, {
    name : 'Karma',
    info : 'Spectacular Test Runner for JavaScript.',
    awesomeness: 10
  }, {
    name : 'Express',
    info : 'Flexible and minimalist web application framework for node.js.',
    awesomeness: 10
  }, {
    name : 'MongoDB + Mongoose',
    info : 'An excellent document database. Combined with Mongoose to simplify adding validation and business logic.',
    awesomeness: 10
  }, function() {
      console.log('finished populating things');
    }
  );
});


text:
<?php

declare(strict_types = 1);

use Faker\Generator as Faker;
use Illuminate\Database\Eloquent\Factory;
use Rebing\GraphQL\Tests\Support\Models\User;

/* @var Factory $factory */
$factory->define(User::class, function (Faker $faker) {
    return [
        'name' => $faker->name,
    ];
});


text:
package com.youtube.vitess.example;

import java.sql.*;

/**
 * Created by harshit.gangal on 10/03/16.
 */
public class VitessJDBCExample {
    private static final String dbURL = "jdbc:vitess://<vtGateHostname>:<vtGatePort>/<keyspace>/<dbName>";
    private static Connection conn;

    static {
        try {
            //With JDBC 4.1 Specs class.forname is not required.
            conn = DriverManager.getConnection(dbURL, null);
        } catch (SQLException e) {
            System.out.println("failed to initialize class");
        }
    }

    public static void main(String[] args) throws Exception {
        Statement stmt;
        stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("show databases");
        ResultSetMetaData resultSetMetaData = rs.getMetaData();
        int colCount = resultSetMetaData.getColumnCount();
        while (rs.next()) {
            for (int i = 1; i <= colCount; ++i) {
                System.out.println(resultSetMetaData.getColumnName(i) + " : " + rs.getString(i));
            }
        }
        rs.close();
        stmt.close();

        String sql = "select * from test_table where id BETWEEN ? AND ?";
        PreparedStatement preparedStatement = conn.prepareStatement(sql);
        preparedStatement.setInt(1, 1);
        preparedStatement.setInt(2, 10);

        rs = preparedStatement.executeQuery();
        resultSetMetaData = rs.getMetaData();
        colCount = resultSetMetaData.getColumnCount();
        int rowCount = 1;
        while (rs.next()) {
            System.out.println("Row ----> " + rowCount);
            for (int i = 1; i <= colCount; ++i) {
                System.out.println(resultSetMetaData.getColumnName(i) + " : " + rs.getString(i));
            }
            ++rowCount;
        }
        rs.close();
        preparedStatement.close();
        conn.close();
    }
}


text:
'use strict';
var request = require('request-promise');
var url = require('url');
var querystring = require('querystring');
var OpenT2TError = require('opent2t').OpenT2TError;
var OpenT2TConstants = require('opent2t').OpenT2TConstants;

class Onboarding {
    constructor(logger) {
        this.logger = logger;
        this.authUrl = 'https://connect.insteon.com/api/v2/oauth2';
    }

    onboard(authInfo) {
        // Ensure getUserInput and getDeveloperInput answers are present
        if (!authInfo || authInfo.length < 2) {
            throw new OpenT2TError(401, OpenT2TConstants.InvalidAuthInput);
        }

        this.logger.info('Onboarding Insteon Hub');

         // Parse authInfo[1] to get the query parameters, Insteon wants 'code'
        var code = url.parse(authInfo[1], true).query['code'];

        // this comes from the onboardFlow property
        // as part of the schema and manifest.xml
        var params = {
            client_id: authInfo[0].client_id,
            client_secret: authInfo[0].client_secret,
            redirect_uri: authInfo[0].redirect_url,
            code: code,
            grant_type: 'authorization_code'
        }

        // build request URI
        var requestUri = this.authUrl + '/token';
        var method = "POST";

        // Set the headers
        var headers = {
            'Content-Type': 'application/x-www-form-urlencoded'
        }

        var options = {
            url: requestUri,
            method: method,
            headers: headers,
            body: querystring.stringify(params)
        };

        return request(options)
            .then(function (body) {
                var tokenInfo = JSON.parse(body); // This includes refresh token, scope etc..

                var expiration = Math.floor((new Date().getTime() / 1000) + tokenInfo.expires_in);

                var authTokens = {};
                authTokens['access'] = {
                    token: tokenInfo.access_token,
                    expiration: expiration,
                    type: tokenInfo.token_type,
                    client_id: authInfo[0].client_id
                };

                authTokens['refresh'] = {
                    token: tokenInfo.refresh_token,
                    expiration: expiration
                };

                return authTokens;
            });
    }

    /**
     * Gets the verification URI for the user to visit, and connect the client_id
     * with their account, as per oAuth2
     */
    getUserVerificationUri(authInfo) {
        var parameters = {
            client_id: authInfo[0].client_id,
            redirect_uri: authInfo[0].redirect_url,
            scope: 'app',
            response_type: 'code'
        };

        // Automatically encode/escape any of the parameters for use in the URL
        let fullUrl = this.authUrl + '/auth?' + querystring.stringify(parameters);

        return Promise.resolve(fullUrl);
    }
}

module.exports = Onboarding;


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RHelper.model;

namespace OpenRepGridGui.View.uc
{
    public partial class ucOptionalValueStringEnumDictionary : UserControl, IucOptionalValues
    {
        private rParameter rparam;
        public ucOptionalValueStringEnumDictionary()
        {
            InitializeComponent();
        }

        public Boolean isUsed
        {
            get
            {
                return this.checkBoxUseParameter.Checked;
            }
        }

        public rParameter RParameter
        {
            get { return rparam; }
            set
            {
                rparam = value;

                this.groupBoxParameter.Text = this.RParameter.VarName;
                checkBoxUseParameter.Checked = rparam.isOptional;
                checkBoxUseParameter.Checked = !rparam.isOptional;
                checkBoxUseParameter.Enabled = rparam.isOptional;

                this.toolTip1.SetToolTip(this.checkBoxUseParameter, this.RParameter.Description);
                this.toolTip1.SetToolTip(this.flowLayoutPanel1, this.RParameter.Description);
                if (rparam.PossibleValues != null)
                {
                    if (typeof(Dictionary<String, Boolean>) == rparam.PossibleValues.GetType())
                    {
                        Dictionary<String, Boolean> p = (Dictionary<String, Boolean>)rparam.PossibleValues;
                        this.flowLayoutPanel1.Controls.Clear();
                        foreach (string key in p.Keys)
                        {
                            RadioButton rb = new RadioButton();
                            rb.Text = key;
                            rb.Checked = p[key];
                            this.flowLayoutPanel1.Controls.Add(rb);
                        }
                    }
                }

            }
        }

        public object[] ParamValue
        {
            get
            {
                if (this.flowLayoutPanel1.Controls.OfType<RadioButton>().Any(x => x.Checked))
                {
                    return new string[] { this.flowLayoutPanel1.Controls.OfType<RadioButton>().FirstOrDefault(x => x.Checked).Text };
                }
                else
                {
                    return new string[] { "NAN" };
                }
            }
        }

        private void checkBoxUseParameter_CheckedChanged(object sender, EventArgs e)
        {
            this.flowLayoutPanel1.Enabled = checkBoxUseParameter.Checked;
        }

        private void buttonHelp_Click(object sender, EventArgs e)
        {
                  MessageBox.Show(this.RParameter.Description, string.Format("Info to Parameter: '{0}'", this.RParameter.VarName), MessageBoxButtons.OK, MessageBoxIcon.Information);

        }

    }
}


text:
require "extend/ENV"
require "formula_assertions"
require "sandbox"
require "timeout"

module Homebrew
  module_function

  def test
    raise FormulaUnspecifiedError if ARGV.named.empty?

    ARGV.resolved_formulae.each do |f|
      # Cannot test uninstalled formulae
      unless f.installed?
        ofail "Testing requires the latest version of #{f.full_name}"
        next
      end

      # Cannot test formulae without a test method
      unless f.test_defined?
        ofail "#{f.full_name} defines no test"
        next
      end

      # Don't test unlinked formulae
      if !ARGV.force? && !f.keg_only? && !f.linked?
        ofail "#{f.full_name} is not linked"
        next
      end

      puts "Testing #{f.full_name}"

      env = ENV.to_hash

      begin
        args = %W[
          #{RUBY_PATH}
          -W0
          -I #{HOMEBREW_LOAD_PATH}
          --
          #{HOMEBREW_LIBRARY_PATH}/test.rb
          #{f.path}
        ].concat(ARGV.options_only)

        if f.head?
          args << "--HEAD"
        elsif f.devel?
          args << "--devel"
        end

        Utils.safe_fork do
          if Sandbox.test?
            sandbox = Sandbox.new
            f.logs.mkpath
            sandbox.record_log(f.logs/"test.sandbox.log")
            sandbox.allow_write_temp_and_cache
            sandbox.allow_write_log(f)
            sandbox.allow_write_xcode
            sandbox.allow_write_path(HOMEBREW_PREFIX/"var/cache")
            sandbox.allow_write_path(HOMEBREW_PREFIX/"var/log")
            sandbox.allow_write_path(HOMEBREW_PREFIX/"var/run")
            sandbox.exec(*args)
          else
            exec(*args)
          end
        end
      rescue ::Test::Unit::AssertionFailedError => e
        ofail "#{f.full_name}: failed"
        puts e.message
      rescue Exception => e # rubocop:disable Lint/RescueException
        ofail "#{f.full_name}: failed"
        puts e, e.backtrace
      ensure
        ENV.replace(env)
      end
    end
  end
end


text:
/**
 * Listens for initialization to load the window.
 */
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
  // Switch through the request types.
  switch(request.type) {
    // Initialize the site.
    case "initialize":
      App.initialize(sendResponse);
      break;

    case "words":
      App.loadWords(request.words);
      break;
  }
});

/**
 * Contains variables and functionality for the front end of the app.
 */
var App = {
  /**
   * Handles requests to generate a deck and passes it to the
   * callback function.
   */
  buildDeck: function(words) {
    var fileParts = [];

    // Iterate through words and add them to the deck.
    for(var i in words) {
      var word = words[i];

      if (typeof this.words[word] != "undefined") {
        // Expression.
        filePart = word + "\t";

        // Reading.
        filePart += (this.words[word].kana || word) + "\t";

        // Meaning.
        filePart += this.words[word].definition + "\t";

        // Site title.
        filePart += window.document.title + "\t";

        // Site url.
        filePart += window.location.href;

        fileParts.push(filePart + "\n");
      }
    }

    return URL.createObjectURL(new Blob(fileParts, {type: "text/plain"}));
  },

  /**
   * Handles the initialization functionality. Renders UI, collects
   * text and sends it back to the backend of the application.
   */
  initialize: function(callback) {
    UI.render();

    var text = [];
    var selections = window.getSelection();
    for(var i = 0; i < selections.rangeCount; i++) {
      var div = document.createElement("div");
      div.appendChild(selections.getRangeAt(i).cloneContents());
      text.push(div.innerText);
    }
    callback(text);
  },

  /**
   * Handles the response from the server, which has pulled the
   * words that were matched.
   */
  loadWords: function(words) {
    // Keep a list of the current words specified.
    this.words = words;

    // Convert words into a format that will be
    // UI friendly.
    var wordList = [];
    for(var word in words) {
      wordList.push({
        definition: words[word].definition,
        kana: words[word].kana ? words[word].kana : word,
        word: word
      });
    }

    // Show them in the UI.
    UI.showWords(wordList);
  },

  words: []
}


text:
require 'generators/rspec'

module Rspec
  module Generators
    # @private
    class ChannelGenerator < Base
      def create_channel_spec
        template 'channel_spec.rb.erb', target_path('channels', class_path, "#{file_name}_channel_spec.rb")
      end
    end
  end
end


text:
package com.amazonaws.services.finspacedata;

import javax.annotation.Generated;

import com.amazonaws.services.finspacedata.model.*;

/**
 * Abstract implementation of {@code AWSFinSpaceDataAsync}. Convenient method forms pass through to the corresponding
 * overload that takes a request object and an {@code AsyncHandler}, which throws an
 * {@code UnsupportedOperationException}.
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AbstractAWSFinSpaceDataAsync extends AbstractAWSFinSpaceData implements AWSFinSpaceDataAsync {

    protected AbstractAWSFinSpaceDataAsync() {
    }

    @Override
    public java.util.concurrent.Future<AssociateUserToPermissionGroupResult> associateUserToPermissionGroupAsync(AssociateUserToPermissionGroupRequest request) {

        return associateUserToPermissionGroupAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<AssociateUserToPermissionGroupResult> associateUserToPermissionGroupAsync(AssociateUserToPermissionGroupRequest request,
            com.amazonaws.handlers.AsyncHandler<AssociateUserToPermissionGroupRequest, AssociateUserToPermissionGroupResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateChangesetResult> createChangesetAsync(CreateChangesetRequest request) {

        return createChangesetAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateChangesetResult> createChangesetAsync(CreateChangesetRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateChangesetRequest, CreateChangesetResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateDataViewResult> createDataViewAsync(CreateDataViewRequest request) {

        return createDataViewAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateDataViewResult> createDataViewAsync(CreateDataViewRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateDataViewRequest, CreateDataViewResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateDatasetResult> createDatasetAsync(CreateDatasetRequest request) {

        return createDatasetAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateDatasetResult> createDatasetAsync(CreateDatasetRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateDatasetRequest, CreateDatasetResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreatePermissionGroupResult> createPermissionGroupAsync(CreatePermissionGroupRequest request) {

        return createPermissionGroupAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreatePermissionGroupResult> createPermissionGroupAsync(CreatePermissionGroupRequest request,
            com.amazonaws.handlers.AsyncHandler<CreatePermissionGroupRequest, CreatePermissionGroupResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<CreateUserResult> createUserAsync(CreateUserRequest request) {

        return createUserAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<CreateUserResult> createUserAsync(CreateUserRequest request,
            com.amazonaws.handlers.AsyncHandler<CreateUserRequest, CreateUserResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeleteDatasetResult> deleteDatasetAsync(DeleteDatasetRequest request) {

        return deleteDatasetAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeleteDatasetResult> deleteDatasetAsync(DeleteDatasetRequest request,
            com.amazonaws.handlers.AsyncHandler<DeleteDatasetRequest, DeleteDatasetResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DeletePermissionGroupResult> deletePermissionGroupAsync(DeletePermissionGroupRequest request) {

        return deletePermissionGroupAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DeletePermissionGroupResult> deletePermissionGroupAsync(DeletePermissionGroupRequest request,
            com.amazonaws.handlers.AsyncHandler<DeletePermissionGroupRequest, DeletePermissionGroupResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DisableUserResult> disableUserAsync(DisableUserRequest request) {

        return disableUserAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DisableUserResult> disableUserAsync(DisableUserRequest request,
            com.amazonaws.handlers.AsyncHandler<DisableUserRequest, DisableUserResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<DisassociateUserFromPermissionGroupResult> disassociateUserFromPermissionGroupAsync(
            DisassociateUserFromPermissionGroupRequest request) {

        return disassociateUserFromPermissionGroupAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<DisassociateUserFromPermissionGroupResult> disassociateUserFromPermissionGroupAsync(
            DisassociateUserFromPermissionGroupRequest request,
            com.amazonaws.handlers.AsyncHandler<DisassociateUserFromPermissionGroupRequest, DisassociateUserFromPermissionGroupResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<EnableUserResult> enableUserAsync(EnableUserRequest request) {

        return enableUserAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<EnableUserResult> enableUserAsync(EnableUserRequest request,
            com.amazonaws.handlers.AsyncHandler<EnableUserRequest, EnableUserResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetChangesetResult> getChangesetAsync(GetChangesetRequest request) {

        return getChangesetAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetChangesetResult> getChangesetAsync(GetChangesetRequest request,
            com.amazonaws.handlers.AsyncHandler<GetChangesetRequest, GetChangesetResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetDataViewResult> getDataViewAsync(GetDataViewRequest request) {

        return getDataViewAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetDataViewResult> getDataViewAsync(GetDataViewRequest request,
            com.amazonaws.handlers.AsyncHandler<GetDataViewRequest, GetDataViewResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetDatasetResult> getDatasetAsync(GetDatasetRequest request) {

        return getDatasetAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetDatasetResult> getDatasetAsync(GetDatasetRequest request,
            com.amazonaws.handlers.AsyncHandler<GetDatasetRequest, GetDatasetResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetExternalDataViewAccessDetailsResult> getExternalDataViewAccessDetailsAsync(
            GetExternalDataViewAccessDetailsRequest request) {

        return getExternalDataViewAccessDetailsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetExternalDataViewAccessDetailsResult> getExternalDataViewAccessDetailsAsync(
            GetExternalDataViewAccessDetailsRequest request,
            com.amazonaws.handlers.AsyncHandler<GetExternalDataViewAccessDetailsRequest, GetExternalDataViewAccessDetailsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetPermissionGroupResult> getPermissionGroupAsync(GetPermissionGroupRequest request) {

        return getPermissionGroupAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetPermissionGroupResult> getPermissionGroupAsync(GetPermissionGroupRequest request,
            com.amazonaws.handlers.AsyncHandler<GetPermissionGroupRequest, GetPermissionGroupResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetProgrammaticAccessCredentialsResult> getProgrammaticAccessCredentialsAsync(
            GetProgrammaticAccessCredentialsRequest request) {

        return getProgrammaticAccessCredentialsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetProgrammaticAccessCredentialsResult> getProgrammaticAccessCredentialsAsync(
            GetProgrammaticAccessCredentialsRequest request,
            com.amazonaws.handlers.AsyncHandler<GetProgrammaticAccessCredentialsRequest, GetProgrammaticAccessCredentialsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetUserResult> getUserAsync(GetUserRequest request) {

        return getUserAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetUserResult> getUserAsync(GetUserRequest request,
            com.amazonaws.handlers.AsyncHandler<GetUserRequest, GetUserResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<GetWorkingLocationResult> getWorkingLocationAsync(GetWorkingLocationRequest request) {

        return getWorkingLocationAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<GetWorkingLocationResult> getWorkingLocationAsync(GetWorkingLocationRequest request,
            com.amazonaws.handlers.AsyncHandler<GetWorkingLocationRequest, GetWorkingLocationResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListChangesetsResult> listChangesetsAsync(ListChangesetsRequest request) {

        return listChangesetsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListChangesetsResult> listChangesetsAsync(ListChangesetsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListChangesetsRequest, ListChangesetsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListDataViewsResult> listDataViewsAsync(ListDataViewsRequest request) {

        return listDataViewsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListDataViewsResult> listDataViewsAsync(ListDataViewsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListDataViewsRequest, ListDataViewsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListDatasetsResult> listDatasetsAsync(ListDatasetsRequest request) {

        return listDatasetsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListDatasetsResult> listDatasetsAsync(ListDatasetsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListDatasetsRequest, ListDatasetsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListPermissionGroupsResult> listPermissionGroupsAsync(ListPermissionGroupsRequest request) {

        return listPermissionGroupsAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListPermissionGroupsResult> listPermissionGroupsAsync(ListPermissionGroupsRequest request,
            com.amazonaws.handlers.AsyncHandler<ListPermissionGroupsRequest, ListPermissionGroupsResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListPermissionGroupsByUserResult> listPermissionGroupsByUserAsync(ListPermissionGroupsByUserRequest request) {

        return listPermissionGroupsByUserAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListPermissionGroupsByUserResult> listPermissionGroupsByUserAsync(ListPermissionGroupsByUserRequest request,
            com.amazonaws.handlers.AsyncHandler<ListPermissionGroupsByUserRequest, ListPermissionGroupsByUserResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListUsersResult> listUsersAsync(ListUsersRequest request) {

        return listUsersAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListUsersResult> listUsersAsync(ListUsersRequest request,
            com.amazonaws.handlers.AsyncHandler<ListUsersRequest, ListUsersResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ListUsersByPermissionGroupResult> listUsersByPermissionGroupAsync(ListUsersByPermissionGroupRequest request) {

        return listUsersByPermissionGroupAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ListUsersByPermissionGroupResult> listUsersByPermissionGroupAsync(ListUsersByPermissionGroupRequest request,
            com.amazonaws.handlers.AsyncHandler<ListUsersByPermissionGroupRequest, ListUsersByPermissionGroupResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<ResetUserPasswordResult> resetUserPasswordAsync(ResetUserPasswordRequest request) {

        return resetUserPasswordAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<ResetUserPasswordResult> resetUserPasswordAsync(ResetUserPasswordRequest request,
            com.amazonaws.handlers.AsyncHandler<ResetUserPasswordRequest, ResetUserPasswordResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateChangesetResult> updateChangesetAsync(UpdateChangesetRequest request) {

        return updateChangesetAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateChangesetResult> updateChangesetAsync(UpdateChangesetRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateChangesetRequest, UpdateChangesetResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateDatasetResult> updateDatasetAsync(UpdateDatasetRequest request) {

        return updateDatasetAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateDatasetResult> updateDatasetAsync(UpdateDatasetRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateDatasetRequest, UpdateDatasetResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdatePermissionGroupResult> updatePermissionGroupAsync(UpdatePermissionGroupRequest request) {

        return updatePermissionGroupAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdatePermissionGroupResult> updatePermissionGroupAsync(UpdatePermissionGroupRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdatePermissionGroupRequest, UpdatePermissionGroupResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public java.util.concurrent.Future<UpdateUserResult> updateUserAsync(UpdateUserRequest request) {

        return updateUserAsync(request, null);
    }

    @Override
    public java.util.concurrent.Future<UpdateUserResult> updateUserAsync(UpdateUserRequest request,
            com.amazonaws.handlers.AsyncHandler<UpdateUserRequest, UpdateUserResult> asyncHandler) {

        throw new java.lang.UnsupportedOperationException();
    }

}


text:
var DEFAULT_TAG = 'NN';

var definitions = {
	fr: require('../lang/fr.dict.js'),
	en: require('../lang/en.dict.js')
};

var taggers = {
	fr: require('../lang/fr.rdr.js'),
	en: require('../lang/en.rdr.js')
};

function tag(word, lang) {
	var size = word.length;
	var wordL = word.toLowerCase();
	var dicRow = lang.dictionnary[size];
	var result = null;
	// dirrect match (normal & lower case)
	if (dicRow) {
		result = lang.dictionnary[size][word];
		if (!result) {
			result = lang.dictionnary[size][wordL];
		}
		if (result) return result; // found from dictionnary
	}
	// ends with
	for(var offset = 1; offset < size; offset ++) {
		dicRow = lang.endsWith[size - offset];
		if (dicRow) {
			result = dicRow[wordL.substring(offset, size)];
			if (result) return result; // found that ends with
		}
	}
	// starts with (seems not used from dictionnary)
	for(var offset = size - 1; offset > 0; offset ++) {
		dicRow = lang.startsWith[offset];
		if (dicRow) {
			result = dicRow[wordL.substring(0, offset)];
			if (result) return result; // found that ends with
		}
	}
	return false;
};

/**
 * Handling the parser
 */
var context = function(words, lang) {
	this.lang = lang;
	this.words = [];
	this.success = 0;
	this.offset = 0;
	if (!definitions.hasOwnProperty(lang)) {
		throw new Error('Unable to handle ' + lang);
	}
	var dict = definitions[lang];
	for(var i = 0; i < words.length; i++) {
		var func = tag(words[i], dict);
		this.words.push([words[i], func, func ? 0 : -1]);
		if (func !== false) {
			this.success ++;
		}
	}
	this.success = this.success / words.length;
};

/**
 * Use the rdr to correct the tagging
 */
context.prototype.correct = function(maxRun) {
	if (!taggers.hasOwnProperty(this.lang)) {
		throw new Error('Unable to handle ' + this.lang);
	}
	var it = 0;
	var changed = false;
	var tagger = taggers[this.lang];
	while(it++ < maxRun) {
		this.success = 0;
		for(this.offset = 0; this.offset < this.words.length; this.offset++) {
			this.w = this.words[this.offset][0];
			this.t = this.words[this.offset][1];
			if (!this.t) {
				this.t = DEFAULT_TAG;
			}
			this.t = tagger(this);
			if (this.t && this.t !== this.words[this.offset][1]) {
				this.words[this.offset][1] = this.t;
				this.words[this.offset][2] = it; // track when it was changed
				changed = true;
			}
			if (this.words[this.offset][1]) {
				this.success ++;
			}
		}
		this.success = this.success / this.words.length;
		if (!changed) {
			break;
		}
	}
};

/**
 * Checking tags or words from the current offset
 */
context.prototype.n = function(pos, at, check) {
	var idx = this.offset + pos;
	if (idx > -1 && idx < this.words.length) {
		return this.words[idx][at] === check;
	} else {
		return false;
	}
};

/**
 * Checking tags or words from the current offset
 */
context.prototype.s = function(size, check) {
	if (size > 0) {
		return this.w.substring(0, size) === check;
	} else {
		return this.w.substring(size) === check;
	}
};

/**
 * @throws Error when the detection level is low
 */
module.exports = function(words, lang) {
	var ctx = new context(words, lang);
	// if more than 3 words detection is less 20%
	if (words.length > 3 && ctx.success < 0.2) {
		throw new Error('Unable to understand text in ' + lang);
	}
	// correcting max 2 times each word
	ctx.correct(2);

	// Checking the detection levels
	if (ctx.success < 0.5) {
		throw new Error('Unable to understand text in ' + lang);
	} else {
		return ctx.words;
	}
};


text:
package org.apache.syncope.client.console.panels.search;

import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

public final class SearchClause implements Serializable {

    private static final long serialVersionUID = 2010794463096110104L;

    public enum Operator {

        AND,
        OR;

    }

    public enum Type {

        ATTRIBUTE,
        GROUP_MEMBERSHIP,
        GROUP_MEMBER,
        ROLE_MEMBERSHIP,
        RESOURCE,
        RELATIONSHIP;

    }

    public enum Comparator {

        IS_NULL,
        IS_NOT_NULL,
        EQUALS,
        NOT_EQUALS,
        GREATER_OR_EQUALS,
        GREATER_THAN,
        LESS_OR_EQUALS,
        LESS_THAN;

    }

    private Operator operator;

    private Type type;

    private String property;

    private Comparator comparator;

    private String value;

    public SearchClause() {
        setOperator(SearchClause.Operator.AND);
        setComparator(SearchClause.Comparator.EQUALS);
    }

    public Operator getOperator() {
        return operator;
    }

    public void setOperator(final Operator operator) {
        this.operator = operator;
    }

    public Type getType() {
        return type;
    }

    public void setType(final Type type) {
        this.type = type;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(final String property) {
        this.property = property;
    }

    public Comparator getComparator() {
        return comparator;
    }

    public void setComparator(final Comparator comparator) {
        this.comparator = comparator;
    }

    public String getValue() {
        return value;
    }

    public void setValue(final String value) {
        this.value = value;
    }

    @Override
    public boolean equals(final Object obj) {
        return EqualsBuilder.reflectionEquals(this, obj);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
    }
}


text:
package com.trein.gtfs.mongo.repository;

import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.trein.gtfs.mongo.entity.app.Audit;

public interface AuditRepository extends MongoRepository<Audit, ObjectId> {

}


text:
//
//  CatenateModel.h
//  TravelApp
//
//  Created by qianfeng on 15/11/30.
//  Copyright (c) 2015年 qianfeng. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CatenateModel : NSObject
/**大洲中文名字*/
@property (nonatomic, copy) NSString *catename;
/**大洲英文名字*/
@property (nonatomic, copy) NSString *catename_en;
/**其它国家*/
@property (nonatomic, strong) NSMutableArray * countrylist;
/**热门国家*/
@property (nonatomic, strong) NSMutableArray * hotcountrylist;

// 初始化方法
- (instancetype)initWithDic:(NSDictionary *)dic;

// 工厂方法
+ (CatenateModel *)catenateModelWithDict:(NSDictionary *)dic;

@end


text:
var zrUtil = require("zrender/lib/core/util");

function _default(option) {
  // Save geoCoord
  var mapSeries = [];
  zrUtil.each(option.series, function (seriesOpt) {
    if (seriesOpt && seriesOpt.type === 'map') {
      mapSeries.push(seriesOpt);
      seriesOpt.map = seriesOpt.map || seriesOpt.mapType; // Put x, y, width, height, x2, y2 in the top level

      zrUtil.defaults(seriesOpt, seriesOpt.mapLocation);
    }
  });
}

module.exports = _default;


text:
using System;
using System.Collections;
using Nwc.XmlRpc;
using OpenMetaverse;
using OpenSim.Framework;

namespace OpenSim.Data
{
    /// <summary>
    /// A class which contains information known to the grid server about a region
    /// </summary>
    [Serializable]
    public class RegionProfileData
    {
        /// <summary>
        /// The name of the region
        /// </summary>
        public string regionName = String.Empty;

        /// <summary>
        /// A 64-bit number combining map position into a (mostly) unique ID
        /// </summary>
        public ulong regionHandle;

        /// <summary>
        /// OGS/OpenSim Specific ID for a region
        /// </summary>
        public UUID UUID;

        /// <summary>
        /// Coordinates of the region
        /// </summary>
        public uint regionLocX;
        public uint regionLocY;
        public uint regionLocZ; // Reserved (round-robin, layers, etc)

        /// <summary>
        /// Authentication secrets
        /// </summary>
        /// <remarks>Not very secure, needs improvement.</remarks>
        public string regionSendKey = String.Empty;
        public string regionRecvKey = String.Empty;
        public string regionSecret = String.Empty;

        /// <summary>
        /// Whether the region is online
        /// </summary>
        public bool regionOnline;

        /// <summary>
        /// Information about the server that the region is currently hosted on
        /// </summary>
        public string serverIP = String.Empty;
        public uint serverPort;
        public string serverURI = String.Empty;

        public uint httpPort;
        public uint remotingPort;
        public string httpServerURI = String.Empty;

        /// <summary>
        /// Set of optional overrides. Can be used to create non-eulicidean spaces.
        /// </summary>
        public ulong regionNorthOverrideHandle;
        public ulong regionSouthOverrideHandle;
        public ulong regionEastOverrideHandle;
        public ulong regionWestOverrideHandle;

        /// <summary>
        /// Optional: URI Location of the region database
        /// </summary>
        /// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks>
        public string regionDataURI = String.Empty;

        /// <summary>
        /// Region Asset Details
        /// </summary>
        public string regionAssetURI = String.Empty;

        public string regionAssetSendKey = String.Empty;
        public string regionAssetRecvKey = String.Empty;

        /// <summary>
        /// Region Userserver Details
        /// </summary>
        public string regionUserURI = String.Empty;

        public string regionUserSendKey = String.Empty;
        public string regionUserRecvKey = String.Empty;

        /// <summary>
        /// Region Map Texture Asset
        /// </summary>
        public UUID regionMapTextureID = new UUID("00000000-0000-1111-9999-000000000006");

        /// <summary>
        /// this particular mod to the file provides support within the spec for RegionProfileData for the
        /// owner_uuid for the region
        /// </summary>
        public UUID owner_uuid = UUID.Zero;

        /// <summary>
        /// OGS/OpenSim Specific original ID for a region after move/split
        /// </summary>
        public UUID originUUID;

        /// <summary>
        /// The Maturity rating of the region
        /// </summary>
        public uint maturity;

        //Data Wrappers
        public string RegionName
        {
            get { return regionName; }
            set { regionName = value; }
        }
        public ulong RegionHandle
        {
            get { return regionHandle; }
            set { regionHandle = value; }
        }
        public UUID Uuid
        {
            get { return UUID; }
            set { UUID = value; }
        }
        public uint RegionLocX
        {
            get { return regionLocX; }
            set { regionLocX = value; }
        }
        public uint RegionLocY
        {
            get { return regionLocY; }
            set { regionLocY = value; }
        }
        public uint RegionLocZ
        {
            get { return regionLocZ; }
            set { regionLocZ = value; }
        }
        public string RegionSendKey
        {
            get { return regionSendKey; }
            set { regionSendKey = value; }
        }
        public string RegionRecvKey
        {
            get { return regionRecvKey; }
            set { regionRecvKey = value; }
        }
        public string RegionSecret
        {
            get { return regionSecret; }
            set { regionSecret = value; }
        }
        public bool RegionOnline
        {
            get { return regionOnline; }
            set { regionOnline = value; }
        }
        public string ServerIP
        {
            get { return serverIP; }
            set { serverIP = value; }
        }
        public uint ServerPort
        {
            get { return serverPort; }
            set { serverPort = value; }
        }
        public string ServerURI
        {
            get { return serverURI; }
            set { serverURI = value; }
        }
        public uint ServerHttpPort
        {
            get { return httpPort; }
            set { httpPort = value; }
        }
        public uint ServerRemotingPort
        {
            get { return remotingPort; }
            set { remotingPort = value; }
        }

        public ulong NorthOverrideHandle
        {
            get { return regionNorthOverrideHandle; }
            set { regionNorthOverrideHandle = value; }
        }
        public ulong SouthOverrideHandle
        {
            get { return regionSouthOverrideHandle; }
            set { regionSouthOverrideHandle = value; }
        }
        public ulong EastOverrideHandle
        {
            get { return regionEastOverrideHandle; }
            set { regionEastOverrideHandle = value; }
        }
        public ulong WestOverrideHandle
        {
            get { return regionWestOverrideHandle; }
            set { regionWestOverrideHandle = value; }
        }
        public string RegionDataURI
        {
            get { return regionDataURI; }
            set { regionDataURI = value; }
        }
        public string RegionAssetURI
        {
            get { return regionAssetURI; }
            set { regionAssetURI = value; }
        }
        public string RegionAssetSendKey
        {
            get { return regionAssetSendKey; }
            set { regionAssetSendKey = value; }
        }
        public string RegionAssetRecvKey
        {
            get { return regionAssetRecvKey; }
            set { regionAssetRecvKey = value; }
        }
        public string RegionUserURI
        {
            get { return regionUserURI; }
            set { regionUserURI = value; }
        }
        public string RegionUserSendKey
        {
            get { return regionUserSendKey; }
            set { regionUserSendKey = value; }
        }
        public string RegionUserRecvKey
        {
            get { return regionUserRecvKey; }
            set { regionUserRecvKey = value; }
        }
        public UUID RegionMapTextureID
        {
            get { return regionMapTextureID; }
            set { regionMapTextureID = value; }
        }
        public UUID Owner_uuid
        {
            get { return owner_uuid; }
            set { owner_uuid = value; }
        }
        public UUID OriginUUID
        {
            get { return originUUID; }
            set { originUUID = value; }
        }
        public uint Maturity
        {
            get { return maturity; }
            set { maturity = value; }
        }

        public byte AccessLevel
        {
            get { return Util.ConvertMaturityToAccessLevel(maturity); }
        }

        public RegionInfo ToRegionInfo()
        {
            return RegionInfo.Create(UUID, regionName, regionLocX, regionLocY, serverIP, httpPort, serverPort, remotingPort, serverURI);
        }

        public static RegionProfileData FromRegionInfo(RegionInfo regionInfo)
        {
            if (regionInfo == null)
            {
                return null;
            }

            return Create(regionInfo.RegionID, regionInfo.RegionName, regionInfo.RegionLocX,
                          regionInfo.RegionLocY, regionInfo.ExternalHostName,
                          (uint) regionInfo.ExternalEndPoint.Port, regionInfo.HttpPort, regionInfo.RemotingPort,
                          regionInfo.ServerURI, regionInfo.AccessLevel);
        }

        public static RegionProfileData Create(UUID regionID, string regionName, uint locX, uint locY, string externalHostName, uint regionPort, uint httpPort, uint remotingPort, string serverUri, byte access)
        {
            RegionProfileData regionProfile;
            regionProfile = new RegionProfileData();
            regionProfile.regionLocX = locX;
            regionProfile.regionLocY = locY;
            regionProfile.regionHandle =
                Utils.UIntsToLong((regionProfile.regionLocX * Constants.RegionSize),
                                  (regionProfile.regionLocY*Constants.RegionSize));
            regionProfile.serverIP = externalHostName;
            regionProfile.serverPort = regionPort;
            regionProfile.httpPort = httpPort;
            regionProfile.remotingPort = remotingPort;
            regionProfile.serverURI = serverUri;
            regionProfile.httpServerURI = "http://" + externalHostName + ":" + httpPort + "/";
            regionProfile.UUID = regionID;
            regionProfile.regionName = regionName;
            regionProfile.maturity = access;
            return regionProfile;
        }
    }
}


text:
<!DOCTYPE html>
<meta charset=utf-8>
<title>invalid formaction: port-single-letter</title>
<input type=image alt="foo" formaction="http://f:b/c">


text:
import createPredicateIndexFinder from './_createPredicateIndexFinder';

export default createPredicateIndexFinder(-1);


text:
classdef sync_compsel < handle

    % sync_compsel allows to sync
    % compsel subguis (pop_prop windows)
    % with the main compsel window
    %
    % does not handle litening to guis (yet)
    % relies on being called from relevant callbacks

    properties
        figh
        subh
        colorcycle
        stateNames
    end

    methods (Access = public)

        function obj = sync_compsel(h)
            obj.figh = h;
            obj.subh = [];
            info = getappdata(h, 'info');
            obj.colorcycle = info.comps.colorcycle;
            obj.stateNames = info.comps.stateNames;
            addlistener(h, 'ObjectBeingDestroyed', @(o, e) obj.close_children());
        end

        function add(obj, h, cmp)
            % add subgui to syncing
            % assumes the subgui is pop_prop
            if isempty(obj.subh)
                obj.subh(1).h = h;
                obj.subh(1).cmp = cmp;
            elseif ~any([obj.subh.h] == h)
                    obj.subh(end + 1).h = h;
                    obj.subh(end).cmp = cmp;
            end
        end

        function chng_comp_status(obj, cmp)

            % get info
            [info, curr_stat, indcmp] = get_info_and_status(obj, cmp);

            % generate new state
            newstat = mod(curr_stat + 1, ...
                size(info.comps.colorcycle, 1));
            info.comps.state(indcmp) = newstat;
            setappdata(obj.figh, 'info', info);

            % change main gui
            % if given component is visible
            set_main_button(obj, cmp, newstat);

            set_sub_button(obj, cmp, newstat);

        end

        function set_main_button(obj, cmp, newstat)

            % get info
            [info, ~, indcmp] = get_info_and_status(obj, cmp);
            nbut   = info.comps.visible == indcmp;

            if ~isempty(nbut)
                h = getappdata(obj.figh, 'h');
                set_button_status(obj, h.button(nbut), newstat, false);
            end
        end

        function set_sub_button(obj, cmp, newstat)

            % check if subguis are registered
            if isempty(obj.subh)
                return
            end

            % look for subguis representing given component
            ifcmp = [obj.subh.cmp] == cmp;

            if any(ifcmp)
                cmph = obj.subh(ifcmp).h;
                setappdata(cmph, 'status', newstat);
                h = getappdata(cmph, 'h');
                set_button_status(obj, h.status, newstat, true);
            end
        end

        function update_sub_button(obj, cmp)

            % get info
            [~, curr_stat] = get_info_and_status(obj, cmp);
            % change status
            set_sub_button(obj, cmp, curr_stat);

        end

        function update_main_button(obj, cmp)

            % get info
            [~, curr_stat] = get_info_and_status(obj, cmp);
            % change status
            set_main_button(obj, cmp, curr_stat);

        end

        function clear_h(obj, h)

            % remove handle
            obj.subh([obj.subh.h] == h) = [];
        end

        function close_children(obj)

            len = length(obj.subh);
            tocls = false(1, len);
            for i = 1:len
                if ishandle(obj.subh(i).h)
                    tocls(i) = true;
                end
            end

            if any(tocls)
                close(obj.subh(tocls).h);
            end
        end
    end

    methods (Access = private)

        function [info, curr_stat, indcmp] = get_info_and_status(obj, cmp)

            info = getappdata(obj.figh, 'info');

            % check current status of cmp:
            indcmp    = find(info.comps.all == cmp);
            curr_stat = info.comps.state(indcmp);
        end

        function set_button_status(obj, but, stt, ifstr)

            set(but, 'backgroundcolor', ...
                obj.colorcycle(stt+1,:))

            if ifstr
                set(but, 'string', obj.stateNames{stt+1});
            end

        end

    end
end


text:
from collections import namedtuple

planet = namedtuple("planet", "name system cartel start_loc to_link from_link to_exchange from_exchange to_bar from_bar")


text:
namespace MassTransit.Configuration
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Middleware;

    public class ConsumerSpecification<TConsumer> :
        OptionsSet,
        IConsumerSpecification<TConsumer>
        where TConsumer : class
    {
        readonly ConnectHandle[] _handles;
        readonly IReadOnlyDictionary<Type, IConsumerMessageSpecification<TConsumer>> _messageTypes;
        readonly ConsumerConfigurationObservable _observers;
        IConcurrencyLimiter? _concurrencyLimiter;

        public ConsumerSpecification(IEnumerable<IConsumerMessageSpecification<TConsumer>> messageSpecifications)
        {
            _messageTypes = messageSpecifications.ToDictionary(x => x.MessageType);

            _observers = new ConsumerConfigurationObservable();
            _handles = _messageTypes.Values.Select(x => x.ConnectConsumerConfigurationObserver(_observers)).ToArray();
        }

        public int? ConcurrentMessageLimit { get; set; }

        public void Message<T>(Action<IConsumerMessageConfigurator<T>>? configure)
            where T : class
        {
            IConsumerMessageSpecification<TConsumer, T> specification = GetMessageSpecification<T>();

            configure?.Invoke(specification);
        }

        public void ConsumerMessage<T>(Action<IConsumerMessageConfigurator<TConsumer, T>>? configure)
            where T : class
        {
            IConsumerMessageSpecification<TConsumer, T> specification = GetMessageSpecification<T>();

            configure?.Invoke(specification);
        }

        public IConsumerMessageSpecification<TConsumer, T> GetMessageSpecification<T>()
            where T : class
        {
            foreach (IConsumerMessageSpecification<TConsumer> messageSpecification in _messageTypes.Values)
            {
                if (messageSpecification.TryGetMessageSpecification(out IConsumerMessageSpecification<TConsumer, T> result))
                    return result;
            }

            throw new ArgumentException($"MessageType {TypeCache<T>.ShortName} is not consumed by {TypeCache<TConsumer>.ShortName}");
        }

        public void ConfigureMessagePipe<T>(IPipeConfigurator<ConsumeContext<T>> pipeConfigurator)
            where T : class
        {
            if (ConcurrentMessageLimit.HasValue)
            {
                _concurrencyLimiter ??= new ConcurrencyLimiter(ConcurrentMessageLimit.Value, TypeCache<TConsumer>.ShortName);

                pipeConfigurator.AddPipeSpecification(new ConcurrencyLimitConsumePipeSpecification<T>(_concurrencyLimiter));
            }
        }

        public IEnumerable<ValidationResult> Validate()
        {
            _observers.ForEach(observer => observer.ConsumerConfigured(this));

            foreach (var result in _messageTypes.Values.SelectMany(x => x.Validate()))
                yield return result;

            foreach (var result in ValidateOptions())
                yield return result;
        }

        public void AddPipeSpecification(IPipeSpecification<ConsumerConsumeContext<TConsumer>> specification)
        {
            foreach (IConsumerMessageSpecification<TConsumer> messageSpecification in _messageTypes.Values)
                messageSpecification.AddPipeSpecification(specification);
        }

        public ConnectHandle ConnectConsumerConfigurationObserver(IConsumerConfigurationObserver observer)
        {
            return _observers.Connect(observer);
        }
    }
}


text:
package com.github.awvalenti.javaweb.ingressolento;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

import org.hsqldb.jdbc.JDBCDriver;

@WebListener
public class PopuladorBancoListener implements ServletContextListener {

	@Override
	public void contextInitialized(ServletContextEvent event) {
		try {
			Class.forName(JDBCDriver.class.getName());
		} catch (ClassNotFoundException e1) {
			throw new RuntimeException(e1);
		}

		try (Connection conn = DriverManager.getConnection("jdbc:hsqldb:mem:banco", "sa", "")) {
			try (PreparedStatement stmt = conn.prepareStatement(""
					+ "CREATE TABLE Evento("
					+ " id BIGINT PRIMARY KEY,"
					+ " nome VARCHAR(255),"
					+ " descricao VARCHAR(255)"
					+ ")"
					+ "")) {
				stmt.execute();
			}
			try (PreparedStatement stmt = conn.prepareStatement("INSERT INTO Evento(id, nome, descricao) VALUES(?, ?, ?)")) {
				String[][] dados = {
						{ "Praiotecnico", "Uma explosao sonoro-visual de cores e decibeis" },
						{ "Virtuose Virtual", "Musica da melhor qualidade, tocada pelos antigos membros da Preto & Banda" },
						{ "Iridolofote", "Luminescencia para os olhares mais exigentes" },
				};
				for (int i = 0; i < dados.length; ++i) {
					stmt.setLong(1, i + 1);
					stmt.setString(2, dados[i][0]);
					stmt.setString(3, dados[i][1]);
					stmt.executeUpdate();
				}
			}
			try (PreparedStatement stmt = conn.prepareStatement(""
					+ "CREATE TABLE Usuario("
					+ " id BIGINT PRIMARY KEY,"
					+ " nomeUsuario VARCHAR(20),"
					+ " senha VARCHAR(20)"
					+ ")"
					+ "")) {
				stmt.execute();
			}
			try (PreparedStatement stmt = conn.prepareStatement("INSERT INTO Usuario(id, nomeUsuario, senha) VALUES(?, ?, ?)")) {
				String[][] dados = {
						{ "abner", "senha1" },
						{ "bianca", "senha2" },
						{ "carmelo", "senha3" },
						{ "diana", "senha4" },
				};
				for (int i = 0; i < dados.length; ++i) {
					stmt.setLong(1, i + 1);
					stmt.setString(2, dados[i][0]);
					stmt.setString(3, dados[i][1]);
					stmt.executeUpdate();
				}
			}
			try (PreparedStatement stmt = conn.prepareStatement(""
					+ "CREATE TABLE Ingresso("
					+ " preco DECIMAL(10, 2),"
					+ " dataHora DATETIME,"
					+ " usuario_id BIGINT,"
					+ " evento_id BIGINT,"
					+ " FOREIGN KEY (usuario_id) REFERENCES Usuario(id),"
					+ " FOREIGN KEY (evento_id) REFERENCES Evento(id)"
					+ ")"
					+ "")) {
				stmt.execute();
			}
		} catch (SQLException e) {
			throw new RuntimeException(e);
		}

	}

	@Override
	public void contextDestroyed(ServletContextEvent event) {
	}

}


text:
after "development:divisions" do
  puts "Seeding teams..."

  require 'csv'

  csv_text = File.read("#{Rails.root}/db/seeds/data/teams.csv")
  csv = CSV.parse(csv_text, headers: true)
  csv.each do |row|
    team_info = row.to_hash
    division = Division.where(name: team_info["division"]).first
    team = Team.where(
      name: team_info["name"],
      division_id: division.id
    ).first_or_create!
  end

end


text:
package ubuntu

import (
	"fmt"
	"github.com/megamsys/libmegdc/templates"
	"github.com/megamsys/urknall"
//	"strings"
)

const (
	DelPartitions = `
#!/bin/bash
Disk=(%s)
for i in ${Disk[@]}
do
echo "sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/$i" > delpart
for (( totalPartitions=$(grep -c $i[0-9] /proc/partitions); totalPartitions>0; totalPartitions-- ))
do
	echo "d" >> delpart
	echo $totalPartitions >> delpart
done
echo 'w' >> delpart
echo 'EOF' >> delpart
chmod +x delpart
echo "disk $i zapping unsuccessful" | ./delpart
done
`

)

var ubuntudeletepartitions *UbuntuDeletePartitions

func init() {
	ubuntudeletepartitions = &UbuntuDeletePartitions{}
	templates.Register("UbuntuDeletePartitions", ubuntudeletepartitions)
}

type UbuntuDeletePartitions struct {
	disks []string
}

func (tpl *UbuntuDeletePartitions) Options(t *templates.Template) {
	if disks, ok := t.Maps[Disks]; ok {
		tpl.disks = disks
	}
}

func (tpl *UbuntuDeletePartitions) Render(p urknall.Package) {
	p.AddTemplate("delpart", &UbuntuDeletePartitionsTemplate{
		disks: tpl.disks,
	})
}

func (tpl *UbuntuDeletePartitions) Run(target urknall.Target, inputs map[string]string) error {
	return urknall.Run(target, &UbuntuDeletePartitions{
		disks: tpl.disks,
	}, inputs)
}

type UbuntuDeletePartitionsTemplate struct {
	disks []string
}

func (m *UbuntuDeletePartitionsTemplate) Render(pkg urknall.Package) {
	Disk := ArraytoString("","",m.disks)
	path := "/var/lib/urknall/zapscripts.sh"
	pkg.AddCommands("write-scripts",
		WriteFile(path, fmt.Sprintf(DelPartitions, Disk), "root", 0755),
  )
	pkg.AddCommands("delete-partitions",
		Shell("cat "+path),
	)
}