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

namespace FourSquare.SharpSquare.Entities
{
    public class Venue : FourSquareEntity
    {
        /// <summary>
        /// A unique string identifier for this venue.
        /// </summary>
        public string id
        {
            get;
            set;
        }

        /// <summary>
        /// The best known name for this venue.
        /// </summary>
        public string name
        {
            get;
            set;
        }

        /// <summary>
        /// An object containing none, some, or all of twitter, phone, and formattedPhone. All are strings.
        /// </summary>
        public Contact contact
        {
            get;
            set;
        }

        /// <summary>
        ///  An object containing none, some, or all of address (street address), crossStreet, city, state, postalCode, country, lat, lng, and distance. All fields are strings, except for lat, lng, and distance. Distance is measured in meters.
        ///  Some venues have their locations intentionally hidden for privacy reasons (such as private residences). If this is the case, the parameter isFuzzed will be set to true, and the lat/lng parameters will have reduced precision.
        /// </summary>
        public Location location
        {
            get;
            set;
        }

        /// <summary>
        /// An array, possibly empty, of categories that have been applied to this venue. One of the categories will have a field primary indicating that it is the primary category for the venue. For the complete set of categories, see venues/categories.
        /// </summary>
        public List<Category> categories
        {
            get;
            set;
        }

        /// <summary>
        /// Boolean indicating whether the owner of this business has claimed it and verified the information.
        /// </summary>
        public bool verified
        {
            get;
            set;
        }

        public bool restricted
        {
            get;
            set;
        }

        /// <summary>
        /// Contains checkinsCount (total checkins ever here) and usersCount (total users who have ever checked in here).
        /// </summary>
        public Stat stats
        {
            get;
            set;
        }

        /// <summary>
        ///  URL of the venue's website, typically provided by the venue manager.
        /// </summary>
        public string url
        {
            get;
            set;
        }

        /// <summary>
        ///  Contains the hours during the week that the venue is open along with any named hours segments in a human-readable format. For machine readable hours see venues/hours
        /// </summary>
        public Hour hours
        {
            get;
            set;
        }

        /// <summary>
        /// Optional Contains the hours during the week when people usually go to the venue. For machine readable hours see venues/hours.
        /// </summary>
        public Hour popular
        {
            get;
            set;
        }

        /// <summary>
        ///  An object containing url and mobileUrl that display the menu information for this venue.
        /// </summary>
        public Menu menu
        {
            get;
            set;
        }

        /// <summary>
        ///  An object containing the price tier from 1 (least pricey) - 4 (most pricey) and a message describing the price tier.
        /// </summary>
        public Price price
        {
            get;
            set;
        }

        /// <summary>
        /// If v >= 20120121, a dictionary containing count and items array of specials at this venue. Otherwise, an array, possibly empty, of specials at this venue.
        /// </summary>
        public FourSquareEntityItems<Special> specials
        {
            get;
            set;
        }

        /// <summary>
        /// Optional. Information about who is here now. If present, there is always a count, the number of people here. If viewing details and there is a logged-in user, there is also a groups field with friends and others as types.
        /// </summary>
        public FourSquareEntityGroups<User> hereNow
        {
            get;
            set;
        }

        /// <summary>
        /// The manager's internal identifier for the venue.
        /// </summary>
        public string storeId
        {
            get;
            set;
        }

        /// <summary>
        /// Optional. Description of the venue provided by venue owner.
        /// </summary>
        public string description
        {
            get;
            set;
        }

        /// <summary>
        /// Seconds since epoch when the venue was created.
        /// </summary>
        public Int64 createdAt
        {
            get;
            set;
        }

        /// <summary>
        /// user is the compact user who is the mayor (absent if there is no mayor), and count is the number of times they have checked in within the last 60 days.
        /// </summary>
        public FourSquareEntityUsers mayor
        {
            get;
            set;
        }

        /// <summary>
        /// Contains the total count of tips and groups with friends and others as groupTypes. Groups may change over time.
        /// </summary>
        public FourSquareEntityGroups<Tip> tips
        {
            get;
            set;
        }

        /// <summary>
        /// A grouped response of lists that contain this venue. Contains a summary string representing the acting user's relationship to these lists. If an acting user is present, groups may include todos, created, edited, followed, friends, and others. If this venue is on the acting user's todo list, those items will be included in the todos group.
        /// </summary>
        public FourSquareEntityGroups<List> listed
        {
            get;
            set;
        }

        /// <summary>
        /// An array of string tags applied to this venue.
        /// </summary>
        public List<string> tags
        {
            get;
            set;
        }

        /// <summary>
        ///  Contains count of the number of times the acting user has been here. Absent if there is no acting user.
        /// </summary>
        public FourSquareEntityItems<User> beenHere
        {
            get;
            set;
        }

        /// <summary>
        /// A short URL for this venue, e.g. http://4sq.com/Ab123D
        /// </summary>
        public string shortUrl
        {
            get;
            set;
        }

        /// <summary>
        /// The canonical URL for this venue, e.g. https://foursquare.com/v/foursquare-hq/4ab7e57cf964a5205f7b20e3
        /// </summary>
        public string canonicalUrl
        {
            get;
            set;
        }

        /// <summary>
        /// An array of specials near this venue.
        /// </summary>
        public List<Special> specialsNearby
        {
            get;
            set;
        }

        /// <summary>
        /// A count and groups of photos for this venue. Group types are checkin and venue. Not all items will be present.
        /// </summary>
        public FourSquareEntityGroups<Photo> photos
        {
            get;
            set;
        }

        /// <summary>
        /// A count and groups of photos for this venue. Group types are checkin and venue. Not all items will be present.
        /// </summary>
        public FourSquareEntityGroups<User> likes
        {
            get;
            set;
        }

        /// <summary>
        /// Indicates if the current user has liked this venue.
        /// </summary>
        public bool like
        {
            get;
            set;
        }

        /// <summary>
        /// Indicates if the current user has disliked this venue.
        /// </summary>
        public bool dislike
        {
            get;
            set;
        }

        /// <summary>
        /// Time zone, e.g. America/New_York
        /// </summary>
        public string timeZone
        {
            get;
            set;
        }

        public double rating
        {
            get;
            set;
        }

        /// <summary>
        ///  Present if and only if the current user has at least one assigned role for this venue. The value is a list of all of the current user's assigned roles for this venue. Possible values for each element of the list are manager and employee. Subject to change as additional roles may be defined.
        /// </summary>
        public List<string> roles
        {
            get;
            set;
        }

        /// <summary>
        ///  Optional user is the branded page associated with the venue. If the venue is part of a chain, this will be a user object referring to the chain. For venues that are being managed and not part of a chain, this will contain a user object that uniquely refers to this venue.
        /// </summary>
        // public Int64 page
        // {
        //    get;
        //    set;
        // }
    }
}


text:
function addJqueryLikeFunctionality() {

    function parse(ele, key, options) {
        if (key.length === 0) return;

        var attr = 'text';

        if (key.indexOf('[') === 0) {
            var parts = key.split(']');
            key = parts[1];
            attr = parts[0].substr(1, parts[0].length-1);
        }

        if (key.indexOf(';') === key.length-1) {
            key = key.substr(0, key.length-2);
        }

        if (attr === 'html') {
            ele.innerHTML = translate(key, options);
        } else if (attr === 'text') {
            ele.textContent = translate(key, options);
        } else if (attr === 'prepend') {
            ele.insertAdjacentHTML(translate(key, options), 'afterbegin');
        } else if (attr === 'append') {
            ele.insertAdjacentHTML(translate(key, options), 'beforeend');
        } else {
            ele.setAttribute(attr, translate(key, options));
        }
    }

    function localize(ele, options) {
        var key = ele.getAttribute(o.selectorAttr);
        if (!key && typeof key !== 'undefined' && key !== false) key = ele.textContent || ele.value;
        if (!key) return;

        var target = ele
          , targetSelector = ele.getAttribute("i18n-target");
        if (targetSelector) {
            target = ele.querySelector(targetSelector) || ele;
        }

        if (key.indexOf(';') >= 0) {
            var keys = key.split(';'), index = 0, length = keys.length;

            for ( ; index < length; index++) {
                if (keys[index] !== '') parse(target, keys[index], options);
            }

        } else {
            parse(target, key, options);
        }
    }

    // fn
    i18n.translateObject = function (object, options) {
        // localize childs
        var elements =  object.querySelectorAll('[' + o.selectorAttr + ']');
        var index = 0, length = elements.length;
        for ( ; index < length; index++) {
            localize(elements[index], options);
        }
    };
}

redpajama_set_name: RedPajamaGithub


text:
package com.viesis.viescraft.configs;

import java.io.File;

import com.viesis.viescraft.api.util.LogHelper;

import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.common.config.Configuration;

public class ViesCraftConfig {

	public static Configuration config;
	public static final String CATEGORY_VC = "ViesCraft Config";

	public static boolean v1AirshipEnabled;
	public static boolean v2AirshipEnabled;
	public static boolean v3AirshipEnabled;
	public static boolean v4AirshipEnabled;

	//public static int v1FuelBurnTime;
	public static int v1AirshipSpeed;

	//public static int v2FuelBurnTime;
	public static int v2AirshipSpeed;

	//public static int v3FuelBurnTime;
	public static int v3AirshipSpeed;

	//public static int v4FuelBurnTime;
	public static int v4AirshipSpeed;

	public static boolean vanillaFuel;
	public static int viesolineBurnTime;

	public static String v1AirshipName;
	public static String v2AirshipName;
	public static String v3AirshipName;
	public static String v4AirshipName;

	public static final boolean V1AIRSHIPENABLED_DEFAULT = true;
	public static final String V1AIRSHIPENABLED_NAME = "Enable V1 Viesdenburg Airships?";
	public static final String V1AIRSHIPENABLED_COMMENT = "Should Viesdenburg airships be globally enabled?";

	public static final boolean V2AIRSHIPENABLED_DEFAULT = true;
	public static final String V2AIRSHIPENABLED_NAME = "Enable V2 Viesigible Airships?";
	public static final String V2AIRSHIPENABLED_COMMENT = "Should Viesigible airships be globally enabled?";

	public static final boolean V3AIRSHIPENABLED_DEFAULT = true;
	public static final String V3AIRSHIPENABLED_NAME = "Enable V3 Viesepelin Airships?";
	public static final String V3AIRSHIPENABLED_COMMENT = "Should Viesepelin airships be globally enabled?";

	public static final boolean V4AIRSHIPENABLED_DEFAULT = true;
	public static final String V4AIRSHIPENABLED_NAME = "Enable V4 Viesakron Airships?";
	public static final String V4AIRSHIPENABLED_COMMENT = "Should Viesakron airships be globally enabled?";

	public static final int V1AIRSHIPSPEED_DEFAULT = 100;
	public static final String V1AIRSHIPSPEED_NAME = "Airship Speed - Viesdenburg";
	public static final String V1AIRSHIPSPEED_COMMENT = "How fast do airships move based on walkspeed %? ";

	public static final int V2AIRSHIPSPEED_DEFAULT = 100;
	public static final String V2AIRSHIPSPEED_NAME = "Airship Speed - Viesigible";
	public static final String V2AIRSHIPSPEED_COMMENT = "How fast do airships move based on walkspeed %? ";

	public static final int V3AIRSHIPSPEED_DEFAULT = 100;
	public static final String V3AIRSHIPSPEED_NAME = "Airship Speed - Viesepelin";
	public static final String V3AIRSHIPSPEED_COMMENT = "How fast do airships move based on walkspeed %? ";

	public static final int V4AIRSHIPSPEED_DEFAULT = 100;
	public static final String V4AIRSHIPSPEED_NAME = "Airship Speed - Viesakron";
	public static final String V4AIRSHIPSPEED_COMMENT = "How fast do airships move based on walkspeed %? ";

	public static final String V1AIRSHIPNAME_DEFAULT = "Viesdenburg";
	public static final String V1AIRSHIPNAME_NAME = "Airship Name - Viesdenburg";
	public static final String V1AIRSHIPNAME_COMMENT = "Change the name of Viesdenburg Airships?";

	public static final String V2AIRSHIPNAME_DEFAULT = "Viesigible";
	public static final String V2AIRSHIPNAME_NAME = "Airship Name - Viesigible";
	public static final String V2AIRSHIPNAME_COMMENT = "Change the name of Viesigible Airships?";

	public static final String V3AIRSHIPNAME_DEFAULT = "Viesepelin";
	public static final String V3AIRSHIPNAME_NAME = "Airship Name - Viesepelin";
	public static final String V3AIRSHIPNAME_COMMENT = "Change the name of Viespelin Airships?";

	public static final String V4AIRSHIPNAME_DEFAULT = "Viesakron";
	public static final String V4AIRSHIPNAME_NAME = "Airship Name - Viesakron";
	public static final String V4AIRSHIPNAME_COMMENT = "Change the name of Viesakron Airships?";

	public static final boolean VANILLAFUEL_DEFAULT = true;
	public static final String VANILLAFUEL_NAME = "Enable using vanilla fuel?";
	public static final String VANILLAFUEL_COMMENT = "Should airships be able to use vanilla fuel?";

	public static final int VIESOLINEBURNTIME_DEFAULT = 90;
	public static final String VIESOLINEBURNTIME_NAME = "Viesoline Burn Time?";
	public static final String VIESOLINEBURNTIME_COMMENT = "How long does Viesoline burn for in seconds? ";

	public static void init(File file)
	{
		config = new Configuration(file);
		syncConfig();
		LogHelper.info("Good news everyone! The config has been loaded!");
	}

	public static void syncConfig()
	{
		//Main settings
		final String category1 = CATEGORY_VC + config.CATEGORY_SPLITTER + TextFormatting.LIGHT_PURPLE + "Global";
		config.addCustomCategoryComment(category1, "Global Airship settings.");

		v1AirshipEnabled = config.getBoolean(TextFormatting.WHITE + V1AIRSHIPENABLED_NAME, category1, V1AIRSHIPENABLED_DEFAULT, V1AIRSHIPENABLED_COMMENT);
		v2AirshipEnabled = config.getBoolean(TextFormatting.WHITE + V2AIRSHIPENABLED_NAME, category1, V2AIRSHIPENABLED_DEFAULT, V2AIRSHIPENABLED_COMMENT);
		v3AirshipEnabled = config.getBoolean(TextFormatting.WHITE + V3AIRSHIPENABLED_NAME, category1, V3AIRSHIPENABLED_DEFAULT, V3AIRSHIPENABLED_COMMENT);
		v4AirshipEnabled = config.getBoolean(TextFormatting.WHITE + V4AIRSHIPENABLED_NAME, category1, V4AIRSHIPENABLED_DEFAULT, V4AIRSHIPENABLED_COMMENT);

		//General settings
		final String category2 = CATEGORY_VC + config.CATEGORY_SPLITTER + TextFormatting.GREEN + "General";
		config.addCustomCategoryComment(category2, "General airship options.");

		//v1FuelBurnTime = config.getInt(TextFormatting.WHITE + V1FUELBURNTIME_NAME, category1, V1FUELBURNTIME_DEFAULT, 1, 600, V1FUELBURNTIME_COMMENT);
		v1AirshipSpeed = config.getInt(TextFormatting.WHITE + V1AIRSHIPSPEED_NAME, category2, V1AIRSHIPSPEED_DEFAULT, 100, 400, V1AIRSHIPSPEED_COMMENT);

		//v2FuelBurnTime = config.getInt(TextFormatting.WHITE + V2FUELBURNTIME_NAME, category1, V2FUELBURNTIME_DEFAULT, 1, 600, V2FUELBURNTIME_COMMENT);
		v2AirshipSpeed = config.getInt(TextFormatting.WHITE + V2AIRSHIPSPEED_NAME, category2, V2AIRSHIPSPEED_DEFAULT, 100, 400, V2AIRSHIPSPEED_COMMENT);

		//v3FuelBurnTime = config.getInt(TextFormatting.WHITE + V3FUELBURNTIME_NAME, category1, V3FUELBURNTIME_DEFAULT, 1, 600, V3FUELBURNTIME_COMMENT);
		v3AirshipSpeed = config.getInt(TextFormatting.WHITE + V3AIRSHIPSPEED_NAME, category2, V3AIRSHIPSPEED_DEFAULT, 100, 400, V3AIRSHIPSPEED_COMMENT);

		//v4FuelBurnTime = config.getInt(TextFormatting.WHITE + V4FUELBURNTIME_NAME, category1, V4FUELBURNTIME_DEFAULT, 1, 600, V4FUELBURNTIME_COMMENT);
		v4AirshipSpeed = config.getInt(TextFormatting.WHITE + V4AIRSHIPSPEED_NAME, category2, V4AIRSHIPSPEED_DEFAULT, 100, 400, V4AIRSHIPSPEED_COMMENT);

		v1AirshipName = config.getString(TextFormatting.WHITE + V1AIRSHIPNAME_NAME, category2, V1AIRSHIPNAME_DEFAULT, V1AIRSHIPNAME_COMMENT);
		v2AirshipName = config.getString(TextFormatting.WHITE + V2AIRSHIPNAME_NAME, category2, V2AIRSHIPNAME_DEFAULT, V2AIRSHIPNAME_COMMENT);
		v3AirshipName = config.getString(TextFormatting.WHITE + V3AIRSHIPNAME_NAME, category2, V3AIRSHIPNAME_DEFAULT, V3AIRSHIPNAME_COMMENT);
		v4AirshipName = config.getString(TextFormatting.WHITE + V4AIRSHIPNAME_NAME, category2, V4AIRSHIPNAME_DEFAULT, V4AIRSHIPNAME_COMMENT);

		//Fuel settings
		final String category3 = CATEGORY_VC + config.CATEGORY_SPLITTER + TextFormatting.AQUA + "Fuel";
		config.addCustomCategoryComment(category3, "Airship fuel options.");

		vanillaFuel = config.getBoolean(TextFormatting.WHITE + VANILLAFUEL_NAME, category3, VANILLAFUEL_DEFAULT, VANILLAFUEL_COMMENT);
		viesolineBurnTime = config.getInt(TextFormatting.WHITE + VIESOLINEBURNTIME_NAME, category3, VIESOLINEBURNTIME_DEFAULT, 1, 500, VIESOLINEBURNTIME_COMMENT);

		//Save the config
		config.save();
	}
}


text:
package riofs

import (
	"fmt"
	"reflect"

	"go-hep.org/x/hep/groot/rbytes"
	"go-hep.org/x/hep/groot/rdict"
	"go-hep.org/x/hep/groot/rmeta"
	"go-hep.org/x/hep/groot/root"
)

func stdvecSIFrom(name, ename string, ctx rbytes.StreamerInfoContext) rbytes.StreamerInfo {
	if etyp, ok := rmeta.CxxBuiltins[ename]; ok {
		return rdict.StreamerOf(ctx, reflect.SliceOf(etyp))
	}
	esi, err := ctx.StreamerInfo(ename, -1)
	if esi == nil || err != nil {
		return nil
	}
	etyp, err := rdict.TypeFromSI(ctx, esi)
	if err != nil || etyp == nil {
		return nil
	}
	return rdict.StreamerOf(ctx, reflect.SliceOf(etyp))
}

type streamerInfoStore interface {
	addStreamer(si rbytes.StreamerInfo)
}

func streamerInfoFrom(obj root.Object, sictx streamerInfoStore) (rbytes.StreamerInfo, error) {
	var (
		typename = obj.Class()
		cxxtype  = rdict.GoName2Cxx(typename)
		vers     = -1
	)

	if o, ok := obj.(rbytes.RVersioner); ok {
		vers = int(o.RVersion())
	}

	si, ok := rdict.StreamerInfos.Get(cxxtype, vers)
	if !ok {
		return nil, fmt.Errorf("riofs: could not find streamer for %q (version=%d)", cxxtype, vers)
	}
	sictx.addStreamer(si)
	return si, nil
}


text:
<?php
require_once (dirname(__FILE__). '/kii/private/KiiHttpClientFactory.php');

class KiiContext {
	const SITE_US = "https://api.kii.com/api";
	const SITE_JP = "https://api-jp.kii.com/api";
	const SITE_CN = "https://api-cn2.kii.com/api";

	private $appId;
	private $appKey;
	private $serverUrl;
	private $token;

	private $clientFactory;

	public function __construct($appId, $appKey, $serverUrl) {
		$this->appId = $appId;
		$this->appKey = $appKey;
		$this->serverUrl = $serverUrl;
		$this->clientFactory = new KiiHttpClientFactory();
	}

	public function getAppId() {
		return $this->appId;
	}

	public function getAppKey() {
		return $this->appKey;
	}

	public function getServerUrl() {
		return $this->serverUrl;
	}

	public function setAccessToken($token) {
		$this->token = $token;
	}

	public function getAccessToken() {
		return $this->token;
	}

	public function setClientFactory($factory) {
		$this->clientFactory = $factory;
	}

	public function getNewClient() {
		return $this->clientFactory->newClient();
	}
}
?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="(C) Copyright 2005" />
<meta name="DC.rights.owner" content="(C) Copyright 2005" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="reference" name="DC.Type" />
<meta name="DC.Title" content="derby.stream.error.rollingFile.pattern" />
<meta name="abstract" content="The derby.stream.error.rollingFile.pattern property specifies the naming pattern to use for the rolling log files, if derby.stream.error.style is set to rollingFile." />
<meta name="description" content="The derby.stream.error.rollingFile.pattern property specifies the naming pattern to use for the rolling log files, if derby.stream.error.style is set to rollingFile." />
<meta content="derby.stream.error.rollingFile.pattern property, Error log, file name pattern, rolling over" name="DC.subject" />
<meta content="derby.stream.error.rollingFile.pattern property, Error log, file name pattern, rolling over" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="crefproper22250.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperbuiltinalgorithm.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperiterations.html" />
<meta scheme="URI" name="DC.Relation" content="rrefpropersaltlength.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperauthdn.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperauthpw.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper26978.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper37341.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperpasswordmillis.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperpasswordthreshold.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper13766.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper25581.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper27467.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperclasspath.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper24846.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper81405.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper25025.html" />
<meta scheme="URI" name="DC.Relation" content="rrefpropernoautoboot.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper24390.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper39325.html" />
<meta scheme="URI" name="DC.Relation" content="rrefpropersqlauth.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper13217.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperxatrantimeout.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper43414.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper43517.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperpreallocator.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperstatementcachesize.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper10607.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper23835.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper40346.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper98166.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper46141.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperlogbuffersize.html" />
<meta scheme="URI" name="DC.Relation" content="rrefpropermaxlogshippinginterval.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperminlogshippinginterval.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperverbose.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperindexstatsauto.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperindexstatslog.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperindexstatstrace.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper27529.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperstormin.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper81359.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper28026.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper40688.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperrowlocking.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper34037.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperdefaultfileperms.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperextdiagsevlevel.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper33027.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper18151.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperlogboottrace.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper26985.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper35028.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperrollingfilecount.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperrollingfilelimit.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperrollingfile.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperbootall.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperdurability.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper32066.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproper27355.html" />
<meta scheme="URI" name="DC.Relation" content="rrefproperdatadictversion.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="rrefproperrollingfilepattern" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="commonltr.css" type="text/css" rel="stylesheet" />
<title>derby.stream.error.rollingFile.pattern</title>

derby.stream.error.rollingFile.pattern

The derby.stream.error.rollingFile.pattern property specifies
the naming pattern to use for the rolling log files, if
derby.stream.error.style is set to
<samp class="codeph">rollingFile</samp>.

If derby.stream.error.style is not set, this property
setting is ignored.

You can override other rolling log file defaults by setting
derby.stream.error.rollingFile.count or
derby.stream.error.rollingFile.limit.

A pattern consists of a string that includes the following special components
that will be replaced at runtime.

Table 1. Rolling log file pattern components

Pattern component

Description

<samp class="codeph">/</samp>

Local path name separator

<samp class="codeph">%t</samp>

The system temporary directory

<samp class="codeph">%h</samp>

The value of the user.home system property

<samp class="codeph">%d</samp>

The value of the derby.system.home system property

<samp class="codeph">%g</samp>

The generation number to distinguish rotated log files.
Generation numbers follow the sequence 0, 1, 2, and so on. If you do not specify
a <samp class="codeph">%g</samp> field and the file count is greater than one, the
generation number will be added to the end of the generated filename, after a
dot.

<samp class="codeph">%u</samp>

A unique number to resolve conflicts.

<samp class="codeph">%%</samp>

Translates to a single percent sign (<samp class="codeph">%</samp>)

Thus, for example, a derby.stream.error.rollingFile.pattern setting of
<samp class="codeph">%t/java%g.log</samp> with a
derby.stream.error.rollingFile.count setting of 2 might cause log files
on a UNIX system to be written to /var/tmp/java0.log and
/var/tmp/java1.log, whereas on a Windows 7 system they might be written
to %USERPROFILE%\AppData\Local\Temp\java0.log and
%USERPROFILE%\AppData\Local\Temp\java1.log.

Normally, the <samp class="codeph">%u</samp> unique field is set to 0 (zero). However,
if Derby tries to open the
file by the specified name and finds that the file is currently in use by
another process, it will increment the unique number field and try again. This
action will be repeated until
Derby finds a file name that
is not currently in use. If there is a conflict and no <samp class="codeph">%u</samp> field
has been specified, the unique number will be added at the end of the filename
after a dot. (This will be after any automatically added generation number.)

For example, if three processes are all trying to log to
<samp class="codeph">fred%u.%g.txt</samp>, they might have log files named
fred0.0.txt, fred1.0.txt, fred2.0.txt as the first file in
their rotating sequences.

Note: The use of unique fields to avoid conflicts is guaranteed to work reliably
only when you are using a local disk file system.

Syntax

derby.stream.error.rollingFile.pattern=pattern

The number of characters in the specified pattern value must be equal
to or greater than 1.

Default

<samp class="codeph">%d/derby-%g.log</samp>.

Example

The following setting creates files named myDBlog-0.txt,
myDBlog-1.txt, and so on, in the user's home directory:

derby.stream.error.rollingFile.pattern=%h/myDBlog-%g.txt

Scope

system-wide

Dynamic or static

This property is static; if you change it while
Derby is running, the change
does not take effect until you reboot.

Parent topic: Derby properties

Related reference

derby.authentication.builtin.algorithm

derby.authentication.builtin.iterations

derby.authentication.builtin.saltLength

derby.authentication.ldap.searchAuthDN

derby.authentication.ldap.searchAuthPW

derby.authentication.ldap.searchBase

derby.authentication.ldap.searchFilter

derby.authentication.native.passwordLifetimeMillis

derby.authentication.native.passwordLifetimeThreshold

derby.authentication.provider

derby.authentication.server

derby.connection.requireAuthentication

derby.database.classpath

derby.database.defaultConnectionMode

derby.database.forceDatabaseLock

derby.database.fullAccessUsers

derby.database.noAutoBoot

derby.database.propertiesOnly

derby.database.readOnlyAccessUsers

derby.database.sqlAuthorization

derby.infolog.append

derby.jdbc.xaTransactionTimeout

derby.language.logQueryPlan

derby.language.logStatementText

derby.language.sequence.preallocator

derby.language.statementCacheSize

derby.locks.deadlockTimeout

derby.locks.deadlockTrace

derby.locks.escalationThreshold

derby.locks.monitor

derby.locks.waitTimeout

derby.replication.logBufferSize

derby.replication.maxLogShippingInterval

derby.replication.minLogShippingInterval

derby.replication.verbose

derby.storage.indexStats.auto

derby.storage.indexStats.log

derby.storage.indexStats.trace

derby.storage.initialPages

derby.storage.minimumRecordSize

derby.storage.pageCacheSize

derby.storage.pageReservedSpace

derby.storage.pageSize

derby.storage.rowLocking

derby.storage.tempDirectory

derby.storage.useDefaultFilePermissions

derby.stream.error.extendedDiagSeverityLevel

derby.stream.error.field

derby.stream.error.file

derby.stream.error.logBootTrace

derby.stream.error.logSeverityLevel

derby.stream.error.method

derby.stream.error.rollingFile.count

derby.stream.error.rollingFile.limit

derby.stream.error.style

derby.system.bootAll

derby.system.durability

derby.system.home

derby.user.UserName

DataDictionaryVersion


text:
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { authRequired } from '../utils/auth'
import BaseLayout from './layouts/BaseLayout'
import { Link } from 'react-router-dom'
import ImageList from './images/List'
import Stats from './dashboard/Stats'

class Dashboard extends PureComponent {
  constructor() {
    super()

    this.onClickImage = this.onClickImage.bind(this)
  }

  onClickImage(e, image) {
    e.preventDefault()

    this.props.router.history.push(`/images/${image.hash}`)
  }

  render() {
    return (
      <BaseLayout className="rka-dashboard" {...this.props}>

          <Stats organization={this.props.auth.organization} />

Latest images

            <Link to="images" className="rka-box-link rka-link">
              View all
            </Link>
            <ImageList
              onClickImage={this.onClickImage}
              limit={12}
              organization={this.props.auth.organization}
              uploadedImages={this.props.uploadedImages}
              deletedImages={this.props.deletedImages}
            />

      </BaseLayout>
    )
  }
}
Dashboard.propTypes = {
  auth: PropTypes.shape({
    organization: PropTypes.string.isRequired
  }).isRequired,
  router: PropTypes.shape({
    history: PropTypes.shape({
      push: PropTypes.func.isRequired
    }).isRequired
  }).isRequired,
  uploadedImages: PropTypes.array,
  deletedImages: PropTypes.array
}

export default authRequired(Dashboard)


text:
local action = _ACTION or ""

solution "nanovg"
	location ( "build" )
	configurations { "Debug", "Release" }
	platforms {"native", "x64", "x32"}

   	project "nanovg"
		language "C"
		kind "StaticLib"
		includedirs { "src" }
		files { "src/*.c" }
		targetdir("build")
		defines { "_CRT_SECURE_NO_WARNINGS" } --,"FONS_USE_FREETYPE" } Uncomment to compile with FreeType support

		configuration "Debug"
			defines { "DEBUG" }
			flags { "Symbols", "ExtraWarnings"}

		configuration "Release"
			defines { "NDEBUG" }
			flags { "Optimize", "ExtraWarnings"}

	project "example_gl2"

		kind "ConsoleApp"
		language "C"
		files { "example/example_gl2.c", "example/demo.c", "example/perf.c" }
		includedirs { "src", "example" }
		targetdir("build")
		links { "nanovg" }

		configuration { "linux" }
			 linkoptions { "`pkg-config --libs glfw3`" }
			 links { "GL", "GLU", "m", "GLEW" }
			 defines { "NANOVG_GLEW" }

		configuration { "windows" }
			 links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32", "kernel32" }
			 defines { "NANOVG_GLEW", "_CRT_SECURE_NO_WARNINGS" }

		configuration { "macosx" }
			links { "glfw3" }
			linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }

		configuration "Debug"
			defines { "DEBUG" }
			flags { "Symbols", "ExtraWarnings"}

		configuration "Release"
			defines { "NDEBUG" }
			flags { "Optimize", "ExtraWarnings"}

	project "example_gl3"
		kind "ConsoleApp"
		language "C"
		files { "example/example_gl3.c", "example/demo.c", "example/perf.c" }
		includedirs { "src", "example" }
		targetdir("build")
		links { "nanovg" }

		configuration { "linux" }
			 linkoptions { "`pkg-config --libs glfw3`" }
			 links { "GL", "GLU", "m", "GLEW" }
			 defines { "NANOVG_GLEW" }

		configuration { "windows" }
			 links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32", "kernel32" }
			 defines { "NANOVG_GLEW", "_CRT_SECURE_NO_WARNINGS" }

		configuration { "macosx" }
			links { "glfw3" }
			linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }

		configuration "Debug"
			defines { "DEBUG" }
			flags { "Symbols", "ExtraWarnings"}

		configuration "Release"
			defines { "NDEBUG" }
			flags { "Optimize", "ExtraWarnings"}

	project "example_gl2_msaa"
		kind "ConsoleApp"
		language "C"
		defines { "DEMO_MSAA" }
		files { "example/example_gl2.c", "example/demo.c", "example/perf.c" }
		includedirs { "src", "example" }
		targetdir("build")
		links { "nanovg" }

		configuration { "linux" }
			 linkoptions { "`pkg-config --libs glfw3`" }
			 links { "GL", "GLU", "m", "GLEW" }
			 defines { "NANOVG_GLEW" }

		configuration { "windows" }
			 links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32", "kernel32" }
			 defines { "NANOVG_GLEW", "_CRT_SECURE_NO_WARNINGS" }

		configuration { "macosx" }
			links { "glfw3" }
			linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }

		configuration "Debug"
			defines { "DEBUG" }
			flags { "Symbols", "ExtraWarnings"}

		configuration "Release"
			defines { "NDEBUG" }
			flags { "Optimize", "ExtraWarnings"}

	project "example_gl3_msaa"
		kind "ConsoleApp"
		language "C"
		defines { "DEMO_MSAA" }
		files { "example/example_gl3.c", "example/demo.c", "example/perf.c" }
		includedirs { "src", "example" }
		targetdir("build")
		links { "nanovg" }

		configuration { "linux" }
			 linkoptions { "`pkg-config --libs glfw3`" }
			 links { "GL", "GLU", "m", "GLEW" }
			 defines { "NANOVG_GLEW" }

		configuration { "windows" }
			 links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32", "kernel32" }
			 defines { "NANOVG_GLEW", "_CRT_SECURE_NO_WARNINGS" }

		configuration { "macosx" }
			links { "glfw3" }
			linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }

		configuration "Debug"
			defines { "DEBUG" }
			flags { "Symbols", "ExtraWarnings"}

		configuration "Release"
			defines { "NDEBUG" }
			flags { "Optimize", "ExtraWarnings"}

	project "example_fbo"
		kind "ConsoleApp"
		language "C"
		files { "example/example_fbo.c", "example/perf.c" }
		includedirs { "src", "example" }
		targetdir("build")
		links { "nanovg" }

		configuration { "linux" }
			 linkoptions { "`pkg-config --libs glfw3`" }
			 links { "GL", "GLU", "m", "GLEW" }

		configuration { "windows" }
			 links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32", "kernel32" }
			 defines { "NANOVG_GLEW", "_CRT_SECURE_NO_WARNINGS" }

		configuration { "macosx" }
			links { "glfw3" }
			linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }

		configuration "Debug"
			defines { "DEBUG" }
			flags { "Symbols", "ExtraWarnings"}

		configuration "Release"
			defines { "NDEBUG" }
			flags { "Optimize", "ExtraWarnings"}

	project "example_gles2"
		kind "ConsoleApp"
		language "C"
		files { "example/example_gles2.c", "example/demo.c", "example/perf.c" }
		includedirs { "src", "example" }
		targetdir("build")
		links { "nanovg" }

		configuration { "linux" }
			 linkoptions { "`pkg-config --libs glfw3`" }
			 links { "GL", "GLU", "m", "GLEW" }

		configuration { "windows" }
			 links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32", "kernel32" }
			 defines { "NANOVG_GLEW", "_CRT_SECURE_NO_WARNINGS" }

		configuration { "macosx" }
			links { "glfw3" }
			linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }

		configuration "Debug"
			defines { "DEBUG" }
			flags { "Symbols", "ExtraWarnings"}

		configuration "Release"
			defines { "NDEBUG" }
			flags { "Optimize", "ExtraWarnings"}

	project "example_gles3"
		kind "ConsoleApp"
		language "C"
		files { "example/example_gles3.c", "example/demo.c", "example/perf.c" }
		includedirs { "src", "example" }
		targetdir("build")
		links { "nanovg" }

		configuration { "linux" }
			 linkoptions { "`pkg-config --libs glfw3`" }
			 links { "GL", "GLU", "m", "GLEW" }

		configuration { "windows" }
			 links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32", "kernel32" }
			 defines { "NANOVG_GLEW", "_CRT_SECURE_NO_WARNINGS" }

		configuration { "macosx" }
			links { "glfw3" }
			linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }

		configuration "Debug"
			defines { "DEBUG" }
			flags { "Symbols", "ExtraWarnings"}

		configuration "Release"
			defines { "NDEBUG" }
			flags { "Optimize", "ExtraWarnings"}


text:
Apache ZooKeeper is a software project of the Apache Software Foundation, providing an open source distributed configuration service, synchronization service, and naming registry for large distributed systems. ZooKeeper was a sub-project of Hadoop but is now a top-level project in its own right.

> [wikipedia.org/wiki/Apache_ZooKeeper](https://en.wikipedia.org/wiki/Apache_ZooKeeper)

%%LOGO%%

# How to use this image

## Start a Zookeeper server instance

```console
$ docker run --name some-zookeeper --restart always -d %%IMAGE%%
```

This image includes `EXPOSE 2181 2888 3888` (the zookeeper client port, follower port, election port respectively), so standard container linking will make it automatically available to the linked containers. Since the Zookeeper "fails fast" it's better to always restart it.

## Connect to Zookeeper from an application in another Docker container

```console
$ docker run --name some-app --link some-zookeeper:zookeeper -d application-that-uses-zookeeper
```

## Connect to Zookeeper from the Zookeeper command line client

```console
$ docker run -it --rm --link some-zookeeper:zookeeper zookeeper zkCli.sh -server zookeeper
```

## %%STACK%%

This will start Zookeeper in [replicated mode](http://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_RunningReplicatedZooKeeper). Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`) and wait for it to initialize completely. Ports `2181-2183` will be exposed.

> Please be aware that setting up multiple servers on a single machine will not create any redundancy. If something were to happen which caused the machine to die, all of the zookeeper servers would be offline. Full redundancy requires that each server have its own machine. It must be a completely separate physical server. Multiple virtual machines on the same physical host are still vulnerable to the complete failure of that host.

Consider using [Docker Swarm](https://www.docker.com/products/docker-swarm) when running Zookeeper in replicated mode.

## Configuration

Zookeeper configuration is located in `/conf`. One way to change it is mounting your config file as a volume:

```console
$ docker run --name some-zookeeper --restart always -d -v $(pwd)/zoo.cfg:/conf/zoo.cfg %%IMAGE%%
```

## Environment variables

ZooKeeper recommended defaults are used if `zoo.cfg` file is not provided. They can be overridden using the following environment variables.

```console
$ docker run -e "ZOO_INIT_LIMIT=10" --name some-zookeeper --restart always -d 31z4/zookeeper
```

### `ZOO_TICK_TIME`

Defaults to `2000`. ZooKeeper's `tickTime`

> The length of a single tick, which is the basic time unit used by ZooKeeper, as measured in milliseconds. It is used to regulate heartbeats, and timeouts. For example, the minimum session timeout will be two ticks

### `ZOO_INIT_LIMIT`

Defaults to `5`. ZooKeeper's `initLimit`

> Amount of time, in ticks (see tickTime), to allow followers to connect and sync to a leader. Increased this value as needed, if the amount of data managed by ZooKeeper is large.

### `ZOO_SYNC_LIMIT`

Defaults to `2`. ZooKeeper's `syncLimit`

> Amount of time, in ticks (see tickTime), to allow followers to sync with ZooKeeper. If followers fall too far behind a leader, they will be dropped.

### `ZOO_MAX_CLIENT_CNXNS`

Defaults to `60`. ZooKeeper's `maxClientCnxns`

> Limits the number of concurrent connections (at the socket level) that a single client, identified by IP address, may make to a single member of the ZooKeeper ensemble.

### `ZOO_STANDALONE_ENABLED`

Defaults to `false`. Zookeeper's [`standaloneEnabled`](http://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html#sc_reconfig_standaloneEnabled)

> Prior to 3.5.0, one could run ZooKeeper in Standalone mode or in a Distributed mode. These are separate implementation stacks, and switching between them during run time is not possible. By default (for backward compatibility) standaloneEnabled is set to true. The consequence of using this default is that if started with a single server the ensemble will not be allowed to grow, and if started with more than one server it will not be allowed to shrink to contain fewer than two participants.

### `ZOO_AUTOPURGE_PURGEINTERVAL`

Defaults to `0`. Zookeeper's [`autoPurge.purgeInterval`](https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_advancedConfiguration)

> New in 3.4.0: The time interval in hours for which the purge task has to be triggered. Set to a positive integer (1 and above) to enable the auto purging. Defaults to 0.

### `ZOO_AUTOPURGE_SNAPRETAINCOUNT`

Defaults to `3`. Zookeeper's [`autoPurge.snapRetainCount`](https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_advancedConfiguration)

> New in 3.4.0: When enabled, ZooKeeper auto purge feature retains the autopurge.snapRetainCount most recent snapshots and the corresponding transaction logs in the dataDir and dataLogDir respectively and deletes the rest. Defaults to 3. Minimum value is 3.

## Replicated mode

Environment variables below are mandatory if you want to run Zookeeper in replicated mode.

### `ZOO_MY_ID`

The id must be unique within the ensemble and should have a value between 1 and 255. Do note that this variable will not have any effect if you start the container with a `/data` directory that already contains the `myid` file.

### `ZOO_SERVERS`

This variable allows you to specify a list of machines of the Zookeeper ensemble. Each entry has the form of `server.id=host:port:port`. Entries are separated with space. Do note that this variable will not have any effect if you start the container with a `/conf` directory that already contains the `zoo.cfg` file.

In 3.5, the syntax of this has changed. Servers should be specified as such: `server.id=<address1>:<port1>:<port2>[:role];[<client port address>:]<client port>` [Zookeeper Dynamic Reconfiguration](http://zookeeper.apache.org/doc/r3.5.3-beta/zookeeperReconfig.html)

## Where to store data

This image is configured with volumes at `/data` and `/datalog` to hold the Zookeeper in-memory database snapshots and the transaction log of updates to the database, respectively.

> Be careful where you put the transaction log. A dedicated transaction log device is key to consistent good performance. Putting the log on a busy device will adversely affect performance.


text:
module UnitTests
  module ModelCreationStrategies
    class ActiveModel
      def self.call(name, attribute_names = [], options = {}, &block)
        new(name, attribute_names, options, &block).call
      end

      def initialize(name, attribute_names = [], options = {}, &block)
        @name = name
        @attribute_names =
          if attribute_names.is_a?(Hash)
            # mimicking columns
            attribute_names.keys
          else
            attribute_names
          end
        @options = options
        @model_customizers = []

        if block
          customize_model(&block)
        end
      end

      def customize_model(&block)
        model_customizers << block
      end

      def call
        ClassBuilder.define_class(name, Model).tap do |model|
          attribute_names.each do |attribute_name|
            model.attribute(attribute_name)
          end

          model_customizers.each do |block|
            run_block(model, block)
          end
        end
      end

      private

      attr_reader :name, :attribute_names, :model_customizers, :options

      def run_block(model, block)
        if block
          if block.arity == 0
            model.class_eval(&block)
          else
            block.call(model)
          end
        end
      end

      module PoorMansAttributes
        extend ActiveSupport::Concern

        included do
          class_attribute :attribute_names

          self.attribute_names = Set.new
        end

        module ClassMethods
          def attribute(name)
            include attributes_module

            name = name.to_sym

            if (
              attribute_names.include?(name) &&
              attributes_module.instance_methods.include?(name)
            )
              attributes_module.module_eval do
                remove_method(name)
                remove_method("#{name}=")
              end
            end

            self.attribute_names += [name]

            attributes_module.module_eval do
              define_method(name) do
                attributes[name]
              end

              define_method("#{name}=") do |value|
                attributes[name] = value
              end
            end
          end

          private

          def attributes_module
            @_attributes_module ||= Module.new
          end
        end

        attr_reader :attributes

        def initialize(attributes = {})
          @attributes = attributes.symbolize_keys
        end

        def inspect
          middle = '%s:0x%014x%s' % [
            self.class,
            object_id * 2,
            ' ' + inspected_attributes.join(' '),
          ]

          "#<#{middle.strip}>"
        end

        private

        def inspected_attributes
          self.class.attribute_names.map do |name|
            "#{name}: #{attributes[name].inspect}"
          end
        end
      end

      class Model
        include ::ActiveModel::Model

        if defined?(::ActiveModel::Attributes)
          include ::ActiveModel::Attributes
        else
          include PoorMansAttributes
        end
      end
    end
  end
end