text:
using System;
using System.Globalization;
using System.Windows.Data;

namespace LIC.Malone.Client.Desktop.Converters
{
	public class HistoryWidthConverter : IMultiValueConverter
	{
		public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
		{
			const double buttonWidth = 40;
			const double padding = 14;
			const double borderPadding = 1;

			var historyWidth = (double)values[0];
			var horizontalOffset = (double)values[1];
			var historyVerticalScrollBarOffset = (double)values[2];
			var source = (string)values[3];
			var isBorder = source == "Border";

			var width = historyWidth + horizontalOffset + historyVerticalScrollBarOffset - buttonWidth - padding;

			if (isBorder)
				width -= borderPadding;

			return width;
		}

		public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
		{
			throw new NotSupportedException();
		}
	}
}


text:
<?php

namespace ZendTest\Http\Header;

use Zend\Http\Header\WWWAuthenticate;

class WWWAuthenticateTest extends \PHPUnit_Framework_TestCase
{

    public function testWWWAuthenticateFromStringCreatesValidWWWAuthenticateHeader()
    {
        $wWWAuthenticateHeader = WWWAuthenticate::fromString('WWW-Authenticate: xxx');
        $this->assertInstanceOf('Zend\Http\Header\HeaderDescription', $wWWAuthenticateHeader);
        $this->assertInstanceOf('Zend\Http\Header\WWWAuthenticate', $wWWAuthenticateHeader);
    }

    public function testWWWAuthenticateGetFieldNameReturnsHeaderName()
    {
        $wWWAuthenticateHeader = new WWWAuthenticate();
        $this->assertEquals('WWW-Authenticate', $wWWAuthenticateHeader->getFieldName());
    }

    public function testWWWAuthenticateGetFieldValueReturnsProperValue()
    {
        $this->markTestIncomplete('WWWAuthenticate needs to be completed');

        $wWWAuthenticateHeader = new WWWAuthenticate();
        $this->assertEquals('xxx', $wWWAuthenticateHeader->getFieldValue());
    }

    public function testWWWAuthenticateToStringReturnsHeaderFormattedString()
    {
        $this->markTestIncomplete('WWWAuthenticate needs to be completed');

        $wWWAuthenticateHeader = new WWWAuthenticate();

        // @todo set some values, then test output
        $this->assertEmpty('WWW-Authenticate: xxx', $wWWAuthenticateHeader->toString());
    }

    /** Implmentation specific tests here */

}

redpajama_set_name: RedPajamaGithub


text:
/**
 * @fileoverview Requires all compression algorithms to load them into the
 * factory.
 */
/** @suppress {extraProvide} this aggregation needs a namespace */
goog.provide('e2e.compression.all');

/** @suppress {extraRequire} intentional import */
goog.require('e2e.compression.Bzip2');
/** @suppress {extraRequire} intentional import */
goog.require('e2e.compression.Zip');
/** @suppress {extraRequire} intentional import */
goog.require('e2e.compression.Zlib');


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**advertised** | **Boolean** |  |  [optional]
**originalDevPortalUrl** | **String** |  |  [optional]
**apiOwner** | **String** |  |  [optional]


text:
package org.apache.maven.plugin.changes;

import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * Abstract superclass for announcement mojos.
 *
 * @version $Id$
 * @since 2.9
 */
public abstract class AbstractChangesMojo
    extends AbstractMojo
{
    /**
     * The current project base directory.
     *
     * @since 2.1
     */
    @Parameter( property = "basedir", required = true )
    protected String basedir;

    /**
     * The Maven Session.
     *
     * @since 2.3
     */
    @Component
    protected MavenSession mavenSession;

    /**
     * This will cause the execution to be run only at the top of a given module
     * tree. That is, run in the project contained in the same folder where the
     * mvn execution was launched.
     *
     * @since 2.9
     */
    @Parameter( property = "changes.runOnlyAtExecutionRoot", defaultValue = "false" )
    protected boolean runOnlyAtExecutionRoot;

    /**
     * Returns true if the current project is located at the
     * Execution Root Directory (where mvn was launched).
     *
     * @return true if the current project is at the Execution Root
     */
    protected boolean isThisTheExecutionRoot()
    {
        getLog().debug( "Root Folder:" + mavenSession.getExecutionRootDirectory() );
        getLog().debug( "Current Folder:" + basedir );
        boolean result = mavenSession.getExecutionRootDirectory().equalsIgnoreCase( basedir );
        if ( result )
        {
            getLog().debug( "This is the execution root." );
        }
        else
        {
            getLog().debug( "This is NOT the execution root." );
        }
        return result;
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>About Pixyll – Juan Cabrera - Front-end Developer</title>
    <link rel="dns-prefetch" href="//maxcdn.bootstrapcdn.com">
    <link rel="dns-prefetch" href="//cdn.mathjax.org">
    <link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Javascript Developer.">
    <meta name="robots" content="all">
    <meta name="author" content="Juan Cabrera">

    <link rel="canonical" href="http://localhost:4000/about/">
    <link rel="alternate" type="application/rss+xml" title="RSS Feed for Juan Cabrera - Front-end Developer" href="/feed.xml" />

    <link rel="stylesheet" href="/css/pixyll.css?201708081406" type="text/css">

    <link href='//fonts.googleapis.com/css?family=Merriweather:900,900italic,300,300italic' rel='stylesheet' type='text/css'>
    <link href='//fonts.googleapis.com/css?family=Lato:900,300' rel='stylesheet' type='text/css'>

    <meta property="og:locale" content="en_US">
    <meta property="og:type" content="article">
    <meta property="og:title" content="About Pixyll">
    <meta property="og:description" content="Javascript Developer.">
    <meta property="og:url" content="http://localhost:4000/about/">
    <meta property="og:site_name" content="Juan Cabrera - Front-end Developer">

    <meta name="twitter:card" content="summary" />

    <meta name="twitter:title" content="About Pixyll" />
    <meta name="twitter:description" content="Javascript Developer." />
    <meta name="twitter:url" content="http://localhost:4000/about/" />

    <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
    <link rel="icon" type="image/png" href="/favicon-192x192.png" sizes="192x192">
    <link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160">
    <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">

      Juan Cabrera - Front-end Developer

About Pixyll

This Jekyll theme was crafted with <3 by John Otander
(@4lpine).

Checkout the Github repository to download it,
request a feature, report a bug, or contribute. It's free, and open source
(MIT).

Thanks to the following:

BASSCSS

Jekyll

Refills

Type Scale

      Theme crafted with <3 by John Otander (@4lpine).

      </> available on GitHub.


text:
package org.pentaho.di.trans.steps.getrepositorynames;

import java.util.ArrayList;
import java.util.List;

import org.pentaho.di.core.Const;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.row.RowDataUtil;
import org.pentaho.di.core.row.RowMeta;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.repository.Repository;
import org.pentaho.di.repository.RepositoryDirectoryInterface;
import org.pentaho.di.repository.RepositoryElementMetaInterface;
import org.pentaho.di.trans.Trans;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.BaseStep;
import org.pentaho.di.trans.step.StepDataInterface;
import org.pentaho.di.trans.step.StepInterface;
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.StepMetaInterface;

/**
 * Read all sorts of text files, convert them to rows and writes these to one or
 * more output streams.
 *
 * @author Matt
 * @since 4-apr-2003
 */
public class GetRepositoryNames extends BaseStep implements StepInterface {
  private static Class<?>        PKG = GetRepositoryNamesMeta.class; // for i18n purposes, needed by Translator2!! $NON-NLS-1$

  private GetRepositoryNamesMeta meta;

  private GetRepositoryNamesData data;

  public GetRepositoryNames(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans) {
    super(stepMeta, stepDataInterface, copyNr, transMeta, trans);
  }

  /**
   * Build an empty row based on the meta-data...
   *
   * @return
   */

  private Object[] buildEmptyRow() {
    Object[] rowData = RowDataUtil.allocateRowData(data.outputRowMeta.size());

    return rowData;
  }

  public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
    if (first) {
      first = false;

      data.outputRowMeta = new RowMeta();
      meta.getFields(data.outputRowMeta, getStepname(), null, null, this);
    }

    if (data.filenr>=data.list.size()) {
      setOutputDone();
      return false;
    }

    // Get the next repository object from the list...
    //
    RepositoryElementMetaInterface repositoryObject = data.list.get(data.filenr++);

    Object[] outputRow = buildEmptyRow();
    int outputIndex = 0;

    String directory = repositoryObject.getRepositoryDirectory().getPath();
    String name = repositoryObject.getName();
    String path = directory.endsWith("/") ? directory+name : directory+"/"+name;

    outputRow[outputIndex++] = path;        // the directory and name of the object
    outputRow[outputIndex++] = directory;   // the directory
    outputRow[outputIndex++] = name     ;   // the name
    outputRow[outputIndex++] = repositoryObject.getObjectType().getTypeDescription();   // the object type
    outputRow[outputIndex++] = repositoryObject.getObjectId().toString();   // the object ID
    outputRow[outputIndex++] = repositoryObject.getModifiedUser();   // modified user
    outputRow[outputIndex++] = repositoryObject.getModifiedDate();   // modified date
    outputRow[outputIndex++] = repositoryObject.getDescription(); // description

    if (meta.isIncludeRowNumber()) {
      outputRow[outputIndex++] = Long.valueOf(data.rownr++);
    }

    // Finally, let's give this row of data to the next steps...
    //
    putRow(data.outputRowMeta, outputRow);
    if (checkFeedback(getLinesInput())) {
      if (log.isBasic())
        logBasic(BaseMessages.getString(PKG, "GetRepositoryNames.Log.NrLine", "" + getLinesInput()));
    }

    return true;
  }

  public boolean init(StepMetaInterface smi, StepDataInterface sdi) {
    meta = (GetRepositoryNamesMeta) smi;
    data = (GetRepositoryNamesData) sdi;

    if (super.init(smi, sdi)) {

      try {
        // Get the repository objects from the repository...
        //
        data.list = getRepositoryObjects();

      } catch (Exception e) {
        logError("Error initializing step: ", e);
        return false;
      }

      data.rownr = 1L;
      data.filenr = 0;

      return true;
    }
    return false;
  }

  private List<RepositoryElementMetaInterface> getRepositoryObjects() throws KettleException {

    try {

      // The repository is available in the parent transformation metadata
      //
      Repository repository = getTransMeta().getRepository();

      // Get the repository directory tree.
      //
      RepositoryDirectoryInterface tree = repository.loadRepositoryDirectoryTree();

      // Now populate the list...
      //
      List<RepositoryElementMetaInterface> list = new ArrayList<RepositoryElementMetaInterface>();

      // Loop over the directories and add the discovered objects to the list...
      //
      for (int i=0;i<meta.getDirectory().length;i++) {

        RepositoryDirectoryInterface dir = tree.findDirectory(meta.getDirectory()[i]);
        if (dir!=null) {
          List<RepositoryElementMetaInterface> objects = getRepositoryObjects(repository, dir, meta.getIncludeSubFolders()[i], meta.getNameMask()[i], meta.getExcludeNameMask()[i]);
          list.addAll( objects );
        }
      }

      return list;
    } catch(Exception e) {
      throw new KettleException("Unable to get the list of repository objects from the repository", e);
    }
  }

  private List<RepositoryElementMetaInterface> getRepositoryObjects(Repository repository, RepositoryDirectoryInterface directory, boolean subdirs, String nameMask, String excludeNameMask) throws KettleException {
    List<RepositoryElementMetaInterface> list = new ArrayList<RepositoryElementMetaInterface>();
    List<RepositoryElementMetaInterface> objects = new ArrayList<RepositoryElementMetaInterface>();
    if (meta.getObjectTypeSelection().areTransformationsSelected()) {
      objects.addAll( repository.getTransformationObjects(directory.getObjectId(), false) );
    }
    if (meta.getObjectTypeSelection().areJobsSelected()) {
      objects.addAll( repository.getJobObjects(directory.getObjectId(), false) );
    }

    for (RepositoryElementMetaInterface object : objects) {
      boolean add = false;
      if (Const.isEmpty(nameMask) || object.getName().matches(nameMask)) {
        add=true;
      }
      if (!Const.isEmpty(excludeNameMask) && object.getName().matches(excludeNameMask)) {
        add=false;
      }
      if (add) {
        list.add(object);
      }
    }

    if (subdirs) {
      for (RepositoryDirectoryInterface child : directory.getChildren()) {
        list.addAll( getRepositoryObjects(repository, child, subdirs, nameMask, excludeNameMask) );
      }
    }

    return list;
  }
}


text:
package io.github.malteseduck.springframework.data.marklogic.core.mapping;

import org.springframework.data.annotation.Id;
import org.springframework.data.mapping.PersistentEntity;
import org.springframework.data.mapping.PersistentProperty;

public interface MarkLogicPersistentProperty extends PersistentProperty<MarkLogicPersistentProperty> {

    /**
     * Returns the name of the field a property is persisted to.
     *
     * @return
     */
    String getFieldName();

    /**
     * Returns whether the property is explicitly marked as an identifier property of the owning {@link PersistentEntity}.
     * A property is an explicit id property if it is annotated options @see {@link Id}.
     *
     * @return
     */
    boolean isExplicitIdProperty();

    String getPath();
    IndexType getIndexType();
}


text:
using Microsoft.Deployment.WindowsInstaller;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;

namespace WixSharp.UI.Forms
{
    /// <summary>
    /// Set of extension methods for working with ManagedUI dialogs
    /// </summary>
    public static class Extensions
    {
        /// <summary>
        /// Determines whether the feature checkbox is checked.
        /// </summary>
        /// <param name="feature">The feature.</param>
        /// <returns></returns>
        public static bool IsViewChecked(this FeatureItem feature)
        {
            if (feature.View is TreeNode)
                return (feature.View as TreeNode).Checked;
            return false;
        }

        /// <summary>
        /// Resets the whether the feature checkbox checked state to the initial stat.
        /// </summary>
        /// <param name="feature">The feature.</param>
        public static void ResetViewChecked(this FeatureItem feature)
        {
            if (feature.View is TreeNode)
                (feature.View as TreeNode).Checked = feature.DefaultIsToBeInstalled();
        }

        /// <summary>
        /// Returns default 'is to be installed' state of teh feature.
        /// </summary>
        /// <param name="feature">The feature.</param>
        /// <returns></returns>
        public static bool DefaultIsToBeInstalled(this FeatureItem feature)
        {
            return feature.RequestedState != InstallState.Absent;
        }

        /// <summary>
        /// Returns the FeatireItem bound to the TreeNode.
        /// </summary>
        /// <param name="node">The node.</param>
        /// <returns></returns>
        public static FeatureItem FeatureItem(this TreeNode node)
        {
            return node.Tag as FeatureItem;
        }

        /// <summary>
        /// Converts TreeNodeCollection into the TreeNode array.
        /// </summary>
        /// <param name="nodes">The nodes.</param>
        /// <returns></returns>
        public static TreeNode[] ToArray(this TreeNodeCollection nodes)
        {
            return nodes.Cast<TreeNode>().ToArray();
        }

        /// <summary>
        /// Aggregates all nodes of the TreeView control.
        /// </summary>
        /// <param name="treeView">The tree view.</param>
        /// <returns></returns>
        public static TreeNode[] AllNodes(this TreeView treeView)
        {
            var result = new List<TreeNode>();
            var queue = new Queue<TreeNode>(treeView.Nodes.Cast<TreeNode>());

            while (queue.Any())
            {
                TreeNode node = queue.Dequeue();
                result.Add(node);
                foreach (TreeNode child in node.Nodes)
                    queue.Enqueue(child);
            }
            return result.ToArray();
        }
    }

#pragma warning disable 1591
    public class ReadOnlyTreeNode : TreeNode
    {
        public bool IsReadOnly { get; set; }

        public class Behavior
        {

            public static void AttachTo(TreeView treeView, bool drawTextOnly = false)
            {
                if (drawTextOnly)
                {
                    treeView.DrawMode = TreeViewDrawMode.OwnerDrawText;
                    treeView.DrawNode += treeView_DrawNodeText;
                }
                else
                {
                    treeView.DrawMode = TreeViewDrawMode.OwnerDrawAll;
                    treeView.DrawNode += treeView_DrawNode;
                }
                treeView.BeforeCheck += treeView_BeforeCheck;
            }

            static void treeView_BeforeCheck(object sender, TreeViewCancelEventArgs e)
            {
                if (IsReadOnly(e.Node))
                {
                    e.Cancel = true;
                }
            }

            static Pen dotPen = new Pen(Color.FromArgb(128, 128, 128)) { DashStyle = DashStyle.Dot };
            static Brush selectionModeBrush = new SolidBrush(Color.FromArgb(51, 153, 255));

            static bool IsReadOnly(TreeNode node)
            {
                return (node is ReadOnlyTreeNode) && (node as ReadOnlyTreeNode).IsReadOnly;
            }

            static int cIndentBy = -1;
            static int cMargin = -1;

            static void treeView_DrawNodeText(object sender, DrawTreeNodeEventArgs e)
            {
                //Loosely based on Jason Williams solution (http://stackoverflow.com/questions/1003459/c-treeview-owner-drawing-with-ownerdrawtext-and-the-weird-black-highlighting-w)
                if (e.Bounds.Height < 1 || e.Bounds.Width < 1)
                    return;

                var treeView = (TreeView)sender;

                if (e.Node.IsSelected)
                {
                    e.Graphics.FillRectangle(selectionModeBrush, e.Bounds);
                    e.Graphics.DrawString(e.Node.Text, treeView.Font, Brushes.White, e.Bounds);
                }
                else
                {
                    if (IsReadOnly(e.Node))
                        e.Graphics.DrawString(e.Node.Text, treeView.Font, Brushes.Gray, e.Bounds);
                    else
                        e.Graphics.DrawString(e.Node.Text, treeView.Font, Brushes.Black, e.Bounds);
                }
            }

            static void treeView_DrawNode(object sender, DrawTreeNodeEventArgs e)
            {
                //Loosely based on Jason Williams solution (http://stackoverflow.com/questions/1003459/c-treeview-owner-drawing-with-ownerdrawtext-and-the-weird-black-highlighting-w)
                if (e.Bounds.Height < 1 || e.Bounds.Width < 1)
                    return;

                if (cIndentBy == -1)
                {
                    cIndentBy = e.Bounds.Height;
                    cMargin = e.Bounds.Height / 2;
                }

                var treeView = (TreeView)sender;

                Rectangle itemRect = e.Bounds;
                e.Graphics.FillRectangle(Brushes.White, itemRect);
                //e.Graphics.FillRectangle(Brushes.WhiteSmoke, itemRect);

                int cTwoMargins = cMargin * 2;

                int midY = (itemRect.Top + itemRect.Bottom) / 2;

                int iconWidth = itemRect.Height + 2;
                int checkboxWidth = itemRect.Height + 2;

                int indent = (e.Node.Level * cIndentBy) + cMargin;
                int iconLeft = indent;						                    // lines left position
                int checkboxLeft = iconLeft + iconWidth;                        // +/- icon left position

                int textLeft = checkboxLeft + checkboxWidth;	               // text left position
                if (!treeView.CheckBoxes)
                    textLeft = checkboxLeft;

                // Draw parentage lines
                if (treeView.ShowLines)
                {
                    int x = cMargin * 2;

                    if (e.Node.Level == 0 && e.Node.PrevNode == null)
                    {
                        // The very first node in the tree has a half-height line
                        e.Graphics.DrawLine(dotPen, x, midY, x, itemRect.Bottom);
                    }
                    else
                    {
                        TreeNode testNode = e.Node;			// Used to only draw lines to nodes with Next Siblings, as in normal TreeViews
                        for (int iLine = e.Node.Level; iLine >= 0; iLine--)
                        {
                            if (testNode.NextNode != null)
                            {
                                x = (iLine * cIndentBy) + (cMargin * 2);
                                e.Graphics.DrawLine(dotPen, x, itemRect.Top, x, itemRect.Bottom);
                            }

                            testNode = testNode.Parent;
                        }

                        x = (e.Node.Level * cIndentBy) + (cMargin * 2);
                        e.Graphics.DrawLine(dotPen, x, itemRect.Top, x, midY);
                    }

                    e.Graphics.DrawLine(dotPen, iconLeft + cMargin, midY, iconLeft + cMargin + 10, midY);
                }

                // Draw (plus/minus) icon if required
                if (e.Node.Nodes.Count > 0)
                {

                    var element = e.Node.IsExpanded ? VisualStyleElement.TreeView.Glyph.Opened : VisualStyleElement.TreeView.Glyph.Closed;
                    var renderer = new VisualStyleRenderer(element);
                    var iconTrueSize = renderer.GetPartSize(e.Graphics, ThemeSizeType.True);

                    var bounds = new Rectangle(itemRect.Left + iconLeft, itemRect.Top, iconWidth, iconWidth);

                    //e.Graphics.FillRectangle(Brushes.Salmon, bounds);

                    //deflate (resize and center) icon within bounds
                    var dif = (iconWidth - iconTrueSize.Height) / 2 - 1; //-1 is to compensate for rounding as icon is not getting rendered if the bounds is too small
                    bounds.Inflate(-dif, -dif);
                    renderer.DrawBackground(e.Graphics, bounds);
                }

                //Checkbox
                if (treeView.CheckBoxes)
                {
                    var element = e.Node.Checked ? VisualStyleElement.Button.CheckBox.CheckedNormal : VisualStyleElement.Button.CheckBox.UncheckedNormal;
                    if (IsReadOnly(e.Node))
                        element = e.Node.Checked ? VisualStyleElement.Button.CheckBox.CheckedDisabled : VisualStyleElement.Button.CheckBox.UncheckedDisabled;

                    var renderer = new VisualStyleRenderer(element);
                    var bounds = new Rectangle(itemRect.Left + checkboxLeft, itemRect.Top, checkboxWidth, itemRect.Height);
                    //e.Graphics.FillRectangle(Brushes.Bisque, bounds);
                    renderer.DrawBackground(e.Graphics, bounds);
                }

                //Text
                if (!string.IsNullOrEmpty(e.Node.Text))
                {
                    SizeF textSize = e.Graphics.MeasureString(e.Node.Text, treeView.Font);

                    var drawFormat = new StringFormat
                    {
                        Alignment = StringAlignment.Near,
                        LineAlignment = StringAlignment.Center,
                        FormatFlags = StringFormatFlags.NoWrap,
                    };

                    var bounds = new Rectangle(itemRect.Left + textLeft, itemRect.Top, (int)(textSize.Width + 2), itemRect.Height);

                    if (e.Node.IsSelected)
                    {
                        e.Graphics.FillRectangle(selectionModeBrush, bounds);
                        e.Graphics.DrawString(e.Node.Text, treeView.Font, Brushes.White, bounds, drawFormat);
                    }
                    else
                    {
                        //e.Graphics.FillRectangle(Brushes.Pink, bounds);
                        e.Graphics.DrawString(e.Node.Text, treeView.Font, Brushes.Black, bounds, drawFormat);
                    }

                }

                // Focus rectangle around the text
                if (e.State == TreeNodeStates.Focused)
                {
                    var r = itemRect;
                    r.Width -= 2;
                    r.Height -= 2;
                    r.Offset(indent, 0);
                    r.Width -= indent;
                    e.Graphics.DrawRectangle(dotPen, r);
                }
            }
        }
    }
#pragma warning restore 1591
}


text:
'use strict';
const _ = require('lodash');
const BaseApp = require('./app');

/**
 * User Class
 */
class User {

    /**
     * Constructor
     * @param {*} platform
     * @param {*=} config
     */
    constructor(platform, config) {
        this.platform = platform;
        this.config = {};
        this.config.intentMap = config.intentMap;
        this.config.userMetaData = config.userMetaData;
        this.config.userContext = config.userContext;
        // metaData && context are initialized at setData() | prevents saving an empty object
        this.metaData;
        this.context;
        this.data = {};
        this.isNew = false;
        this.isDeleted = false;
    }

    /**
     * Loads user data from database
     * @return {Promise<any>}
     */
    loadDataFromDb() {
        return new Promise((resolve, reject) => {
            this.platform.jovo.db().loadObject((error, data) => {
                if (error && (error.code === 'ERR_MAIN_KEY_NOT_FOUND' ||
                    error.code === 'ERR_DATA_KEY_NOT_FOUND')) {
                    this.setIsNewUser(true);
                    this.setData(this.createUserData());
                } else if (!data[this.platform.jovo.app.config.userDataCol]) {
                    this.setData(this.createUserData());
                } else {
                    this.setData(data[this.platform.jovo.app.config.userDataCol]);
                }
                resolve();
            });
        });
    }

    /**
     * Saves user data to database
     * @return {Promise<any>}
     */
    saveDataToDb() {
        return new Promise((resolve, reject) => {
            if (this.isDeleted) {
                resolve();
                return;
            }

            this.updateMetaData();
            this.updateContext();
            this.platform.jovo.db().saveFullObject(
                this.platform.jovo.app.config.userDataCol,
                this.getData(), function(error, data) {
                    if (error) {
                        reject(error);
                        return;
                    }
                    resolve();
                });
        });
    }

    /**
     * Deletes current user from db
     * @return {Promise<any>}
     */
    delete() {
        return new Promise((resolve, reject) => {
            this.isDeleted = true;
            this.platform.jovo.db().deleteUser((err) => {
                if (err) {
                    reject(err);
                    return;
                }
                resolve();
            });
        });
    }

    /**
     * Sets isNew flag for user
     * @param {boolean} isNew
     */
    setIsNewUser(isNew) {
        this.isNew = isNew;
    }

    /**
     * Returns isNew flag
     * @return {boolean|*}
     */
    isNewUser() {
        return this.isNew;
    }

    /**
     * Sets data
     * @param {*} data
     */
    setData(data) {
        if (!data) {
            data = {};
        }
        this.data = data.data;
        // Prevents saving an empty object
        _.values(this.config.userMetaData).forEach((element) => {
            if (element || element > 0) {
                this.metaData = data.metaData || {};
            }
        });
        // Prevents saving an empty object
        if (_.get(this, 'config.userContext.prev.size') > 0) {
            this.context = data.context || {};

            if (_.isEmpty(this.context)) {
                this.context.prev = [];
            }
        }
    }

    /**
     * Returns full user data object
     * @return {{data: *, metaData: *}}
     */
    getData() {
        return {
            data: this.data,
            metaData: this.metaData,
            context: this.context,
        };
    }

    /**
     * Updates dynamic meta data
     */
    updateMetaData() {
        if (_.get(this, 'config.userMetaData.lastUsedAt')) {
            this.metaData.lastUsedAt = new Date().toISOString();
        }

        if (_.get(this, 'config.userMetaData.sessionsCount')) {
            if (this.platform.isNewSession()) {
                if (!this.metaData.sessionsCount) {
                    this.metaData.sessionsCount = 0;
                }
                this.metaData.sessionsCount += 1;
            }
        }

        if (_.get(this, 'config.userMetaData.requestHistorySize') > 0) {
            if (!this.metaData.requests) {
                this.metaData.requests = {};
            }
            if (!this.metaData.requests[this.platform.jovo.getHandlerPath()]) {
                let requests = {
                    count: 0,
                    log: [],
                };
                this.metaData.requests[this.platform.jovo.getHandlerPath()] = requests;
            }
            let requestItem = this.metaData.requests[this.platform.jovo.getHandlerPath()];
            requestItem.count += 1;
            requestItem.log.push(new Date().toISOString());

            if (requestItem.log.length > this.config.requestHistorySize) {
                requestItem.log = requestItem.log.slice(1, requestItem.log.length);
            }
        }

        if (_.get(this, 'config.userMetaData.devices')) {
            if (!_.get(this.metaData, 'devices["'+this.platform.getDeviceId()+'"]')) {
                let device = {
                    hasAudioInterface: this.platform.hasAudioInterface(),
                    hasScreenInterface: this.platform.hasScreenInterface(),
                };
                _.set(this.metaData,
                    'devices["'+this.platform.getDeviceId()+'"]',
                    device);
            }
        }
    }

    /**
     * Updats the user context
     */
    updateContext() {
        if (_.get(this, 'config.userContext.prev.size') > 0) {
            this.updateContextPrev();
        }
    }

    /**
     * Updates context's prev array
     */
    updateContextPrev() {
        let prevObject = {
            request: {},
            response: {},
        };
        if (_.get(this, 'config.userContext.prev.response.speech')) {
            try { // sometimes there is no output
                prevObject.response.speech = this.platform.getSpeechText();
            } catch (error) {

            }
        }
        if (_.get(this, 'config.userContext.prev.response.reprompt')) {
            if (this.platform.getType() === BaseApp.PLATFORM_ENUM.ALEXA_SKILL) {
                try { // sometimes there is no reprompt
                    prevObject.response.reprompt = this.platform.getRepromptText();
                } catch (error) {

                }
            } else {
                try { // sometimes there is no reprompt
                    let response = this.platform.getResponse();
                    // Array length = amount of reprompts
                    let repromptCount = _.get(response, 'responseObj.data.google.noInputPrompts').length;
                    let repromptArray = new Array(repromptCount);
                    for (let i = 0; i < repromptArray.length; i++) {
                        let repromptStr = _.get(response, 'responseObj.data.google.noInputPrompts')[i].ssml;
                        repromptArray[i] = removeSpeakTags(repromptStr);
                    }
                    prevObject.response.reprompt = repromptArray;
                } catch (error) {

                }
            }
        }
        if (_.get(this, 'config.userContext.prev.response.state')) {
            if (this.platform.getType() === BaseApp.PLATFORM_ENUM.GOOGLE_ACTION) {
                prevObject.response.state = this.platform.getState();
            } else if (this.platform.getType() === BaseApp.PLATFORM_ENUM.ALEXA_SKILL) {
                prevObject.response.state = this.platform.getState();
            }
        }
        if (_.get(this, 'config.userContext.prev.request.intent')) {
            // Not platform specific
            if (this.platform.getRequestType() === BaseApp.REQUEST_TYPE_ENUM.INTENT) {
                /**
                 * Saves platform specific intent name first,
                 * but switches to intentMap value if defined
                 */
                let intentName = this.platform.getIntentName();
                prevObject.request.intent = intentName;
                _.keys(_.get(this, 'config.intentMap')).forEach((key) => {
                    if (intentName === key) {
                        prevObject.request.intent = this.config.intentMap[key];
                    }
                });
            } else if (this.platform.getType() === BaseApp.PLATFORM_ENUM.ALEXA_SKILL) {
                let request = this.platform.getRequest();
                let requestType = this.platform.getRequestType();
                switch (requestType) {
                    // Special cases: save specific request type, e.g.'AudioPlayer.PlaybackStarted'
                    case BaseApp.REQUEST_TYPE_ENUM.ON_EVENT:
                        prevObject.request.intent = _.get(request, 'request.type');
                        break;
                    case BaseApp.REQUEST_TYPE_ENUM.AUDIOPLAYER:
                        prevObject.request.intent = _.get(request, 'request.type');
                        break;
                    default:
                        // Save enum
                        prevObject.request.intent = requestType;
                }
            } else if (this.platform.getType() === BaseApp.PLATFORM_ENUM.GOOGLE_ACTION) {
                prevObject.request.intent = this.platform.getRequestType();
            }
        }
        if (_.get(this, 'config.userContext.prev.request.timestamp')) {
            prevObject.request.timestamp = this.platform.getTimestamp();
        }
        if (_.get(this, 'config.userContext.prev.request.state')) {
            if (this.platform.getType() === BaseApp.PLATFORM_ENUM.GOOGLE_ACTION) {
                let request = this.platform.getRequest();
                let contextSession = request.getContext('session');
                prevObject.request.state = _.get(contextSession, 'parameters.STATE');
            } else if (this.platform.getType() === BaseApp.PLATFORM_ENUM.ALEXA_SKILL) {
                try {
                    if (this.platform.request.getSessionAttribute('STATE')) {
                        prevObject.request.state = this.platform.request.getSessionAttribute('STATE');
                    }
                } catch (err) {
                    // Some requests don't have a state
                }
            }
        }
        if (_.get(this, 'config.userContext.prev.request.inputs')) {
            if (this.platform.getType() === BaseApp.PLATFORM_ENUM.ALEXA_SKILL) {
                if (this.platform.getRequestType() === BaseApp.REQUEST_TYPE_ENUM.INTENT) {
                    let inputsObject = this.platform.getInputsObj();
                    if (!_.isEmpty(inputsObject)) {
                        prevObject.request.inputs = inputsObject;
                    }
                }
            } else {
                let inputsObject = this.platform.getInputs();
                if (!_.isEmpty(inputsObject)) {
                    prevObject.request.inputs = inputsObject;
                }
            }
        }

        // Deletes request/response, if nothing was saved there
        if (Object.keys(prevObject.request).length === 0) {
            delete prevObject.request;
        }
        if (Object.keys(prevObject.response).length === 0) {
            delete prevObject.response;
        }
        if (this.context.prev.length === _.get(this, 'config.userContext.prev.size')) {
            this.context.prev.pop(); // remove last element
        }
        if (_.get(prevObject, 'request') || _.get(prevObject, 'response')) {
            // Prevents storing empty object
            this.context.prev.unshift(prevObject); // add new prevObject to the beginning
        }
    }

    /**
     * Creates initial user data object
     * @return {{metaData: {createdAt: string, sessionsCount: number}, data: {}}}
     */
    createUserData() {
        let obj = {
            metaData: {},
            data: {},
            context: {},
        };

        if (_.get(this, 'config.userContext.prev.size') > 0) {
            obj.context.prev = [];
        }

        if (this.config.userMetaData.createdAt) {
            obj.metaData['createdAt'] = new Date().toISOString();
        }

        return obj;
    }
    /**
     * Returns user id
     * @return {string}
     */
    getId() {
        return this.platform.getUserId();
    }

    /**
     * Returns locale
     * @return {string}
     */
    getLocale() {
        return this.platform.getLocale();
    }

    /**
     * Returns device id
     * @return {string}
     */
    getDeviceId() {
        return this.platform.getDeviceId();
    }

    /** META DATA HELPER */

    /**
     * Seconds since last session
     * @return {number} time in seconds
     */
    getSecondsSinceLastSession() {
        let now = new Date();
        let lastUsedAt = new Date(this.metaData.lastUsedAt);
        return Math.ceil((now - lastUsedAt)/1000);
    }

    /**
     * Returns number of sessions
     * @return {number}
     */
    getSessionsCount() {
        return this.metaData.sessionsCount;
    }

    /**
     * Returns last used at iso timestamp
     * @return {string|*}
     */
    getLastUsedAt() {
        return this.metaData.lastUsedAt;
    }

    /**
     * Returns created at iso timestamp
     * @return {string|*}
     */
    getCreatedAt() {
        return this.metaData.lastUsedAt;
    }

    /**
     * Return the intent at the specified index
     * @param {number} index
     * @return {String}
     */
    getPrevIntent(index) {
        this.errorIfIndexNotInteger(index);
        this.errorIfIndexBiggerPrevSize(index);
        return this.context.prev[index].request.intent;
    }

    /**
     * Returns request.state at the specified index
     * @param {number} index
     * @return {String}
     */
    getPrevRequestState(index) {
        this.errorIfIndexNotInteger(index);
        this.errorIfIndexBiggerPrevSize(index);
        return this.context.prev[index].request.state;
    }

    /**
     * Returns response.state at the specified index
     * @param {number} index
     * @return {String}
     */
    getPrevResponseState(index) {
        this.errorIfIndexNotInteger(index);
        this.errorIfIndexBiggerPrevSize(index);
        return this.context.prev[index].response.state;
    }

    /**
     * Returns the inputs at the specified index
     * @param {number} index
     * @return {*}
     */
    getPrevInputs(index) {
        this.errorIfIndexNotInteger(index);
        this.errorIfIndexBiggerPrevSize(index);
        return this.context.prev[index].request.inputs;
    }

    /**
     * Returns the timestamp at the specified index
     * @param {number} index
     * @return {String|*}
     */
    getPrevTimestamp(index) {
        this.errorIfIndexNotInteger(index);
        this.errorIfIndexBiggerPrevSize(index);
        return this.context.prev[index].request.timestamp;
    }

    /**
     * Returns the speech at the specified index
     * @param {number} index
     * @return {String}
     */
    getPrevSpeech(index) {
        this.errorIfIndexNotInteger(index);
        this.errorIfIndexBiggerPrevSize(index);
        return this.context.prev[index].response.speech;
    }

    /**
     * Returns the reprompt at the specified index
     * @param {number} index
     * @return {String}
     */
    getPrevReprompt(index) {
        this.errorIfIndexNotInteger(index);
        this.errorIfIndexBiggerPrevSize(index);
        return this.context.prev[index].response.reprompt;
    }

    /**
     * Error if index is bigger than userContext.prev.size
     * @param {number} index Must be an integer
     */
    errorIfIndexBiggerPrevSize(index) {
        if (index >= _.get(this, 'config.userContext.prev.size')) {
            throw new Error('index has to be an integer smaller than prev.size (default value: 1)');
        }
    }

    /**
     * Error if index is not an integer
     * @param {number} index
     */
    errorIfIndexNotInteger(index) {
        if (!_.isInteger(index)) {
            throw new Error('index has to be an integer');
        }
    }
}

/**
 * Removes speak tags
 * @param {string} text
 * @return {XML|string}
 */
function removeSpeakTags(text) {
    return text.replace(/<speak>/g, '').replace(/<\/speak>/g, '');
}

module.exports.User = User;


text:
/**
 * @Author Kayla
 */
var SpecialAttackHandler = Java.type('org.virtue.game.entity.combat.impl.SpecialAttackHandler');
var CombatStyle = Java.type('org.virtue.game.entity.combat.CombatStyle');
var AttackInfo = Java.type('org.virtue.game.entity.combat.impl.ImpactInfo');
var AnimationBlock = Java.type('org.virtue.network.protocol.update.block.AnimationBlock');
var SpotAnimationBlock = Java.type('org.virtue.network.protocol.update.block.SpotAnimationBlock');

var SpecialAttack = Java.extend(SpecialAttackHandler);
var saradominGodSword = new SpecialAttack(CombatStyle.MELEE, [11698]) {
	getImpacts : function(entity, lock) {
		var maximum = Java.super(saradominGodSword).getMaximumHit(entity, lock);
		var hit = Java.super(saradominGodSword).getHit(entity, lock, maximum);
		entity.getImpactHandler().heal(hit / 2, true);

		return [Java.super(saradominGodSword).impact(entity, lock, CombatStyle.MELEE, null, null, hit)];
	},
};

var listen = function(scriptManager) {
	saradominGodSword.animation = new AnimationBlock(12019);
	saradominGodSword.graphics = new SpotAnimationBlock(1, 2109);
	saradominGodSword.damageModifier = 1.75;
	SpecialAttackHandler.register(saradominGodSword);
};


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Friesia 3(1): 45 (1944)

#### Original name
Plectania coccinea f. albida A.B. Klinge

### Remarks
null


text:
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.

#pragma once

#include <stdint.h>

namespace faiss {

/** Product Quantizer. Implemented only for METRIC_L2 */
struct Quantizer {
    using idx_t = Index::idx_t;

    size_t d;         ///< size of the input vectors
    size_t code_size; ///< bytes per indexed vector

    explicit Quantizer(size_t d = 0, size_t code_size = 0)
            : d(d), code_size(code_size) {}

    /** Train the quantizer
     *
     * @param x       training vectors, size n * d
     */
    virtual void train(size_t n, const float* x) = 0;

    /** Quantize a set of vectors
     *
     * @param x        input vectors, size n * d
     * @param codes    output codes, size n * code_size
     */
    virtual void compute_codes(const float* x, uint8_t* codes, size_t n)
            const = 0;

    /** Decode a set of vectors
     *
     * @param codes    input codes, size n * code_size
     * @param x        output vectors, size n * d
     */
    virtual void decode(const uint8_t* code, float* x, size_t n) const = 0;

    virtual ~Quantizer() {}
};

} // namespace faiss


text:
package mu.nu.nullpo.gui.swing;

import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Locale;

import javax.swing.BoxLayout;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.EtchedBorder;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.filechooser.FileFilter;

import mu.nu.nullpo.game.component.RuleOptions;
import mu.nu.nullpo.game.net.NetObserverClient;
import mu.nu.nullpo.game.net.NetPlayerClient;
import mu.nu.nullpo.game.net.NetRoomInfo;
import mu.nu.nullpo.game.play.GameEngine;
import mu.nu.nullpo.game.play.GameManager;
import mu.nu.nullpo.game.subsystem.ai.DummyAI;
import mu.nu.nullpo.game.subsystem.mode.GameMode;
import mu.nu.nullpo.game.subsystem.mode.NetDummyMode;
import mu.nu.nullpo.game.subsystem.wallkick.Wallkick;
import mu.nu.nullpo.gui.net.NetLobbyFrame;
import mu.nu.nullpo.gui.net.NetLobbyListener;
import mu.nu.nullpo.gui.net.UpdateChecker;
import mu.nu.nullpo.gui.net.UpdateCheckerListener;
import mu.nu.nullpo.util.CustomProperties;
import mu.nu.nullpo.util.GeneralUtil;
import mu.nu.nullpo.util.ModeManager;
import net.omegaboshi.nullpomino.game.subsystem.randomizer.Randomizer;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

/**
 * NullpoMino SwingVersion
 */
public class NullpoMinoSwing extends JFrame implements ActionListener, NetLobbyListener, UpdateCheckerListener {
	/** Serial version ID */
	private static final long serialVersionUID = 1L;

	/** Log */
	static Logger log = Logger.getLogger(NullpoMinoSwing.class);

	/** メインウィンドウの frame */
	public static NullpoMinoSwing mainFrame;

	/** ゲームウィンドウの frame */
	public static GameFrame gameFrame;

	/** キーコンフィグ画面の frame */
	public static KeyConfigFrame keyConfigFrame;

	/** ルール選択画面の frame */
	public static RuleSelectFrame ruleSelectFrame;

	/** AI選択画面の frame */
	public static AISelectFrame aiSelectFrame;

	/** その他の設定画面の frame */
	public static GeneralConfigFrame generalConfigFrame;

	/** チューニング設定画面の frame */
	public static GameTuningFrame gameTuningFrame;

	/** 更新 check 設定画面の frame */
	public static UpdateCheckFrame updateCheckFrame;

	/** プログラムに渡されたコマンドLines引count */
	public static String[] programArgs;

	/** Save settings用Property file */
	public static CustomProperties propConfig;

	/** Save settings用Property file (全Version共通) */
	public static CustomProperties propGlobal;

	/** Observer機能用Property file */
	public static CustomProperties propObserver;

	/** Default language file */
	public static CustomProperties propLangDefault;

	/** 言語ファイル */
	public static CustomProperties propLang;

	/** Default game mode description file */
	public static CustomProperties propDefaultModeDesc;

	/** Game mode description file */
	public static CustomProperties propModeDesc;

	/** Mode 管理 */
	public static ModeManager modeManager;

	/** メイン画面のレイアウトマネージャ */
	public static CardLayout mainLayout;

	/** ゲームのメインクラス */
	public static GameManager gameManager;

	/** ゲームの event 処理と描画処理 */
	public static RendererSwing rendererSwing;

	/** ゲームMode nameの配列 */
	public static String[] modeList;

	/** Mode 選択リストボックス */
	public static JList listboxMode;

	/** Rule select listmodel */
	public static DefaultListModel listmodelRule;

	/** Rule select listbox */
	public static JList listboxRule;

	/** リプレイファイル選択ダイアログ */
	public static JFileChooser replayFileChooser;

	/** ロビー画面 */
	public static NetLobbyFrame netLobby;

	/** Observerクライアント */
	public static NetObserverClient netObserverClient;

	/** Mode セレクト画面のラベル(新Versionがある場合は切り替わる) */
	public static JLabel lModeSelect;

	/** HashMap of rules (ModeName->RuleEntry) */
	protected HashMap<String, RuleEntry> mapRuleEntries;

	/**
	 * メイン関count
	 * @param args プログラムに渡されたコマンドLines引count
	 */
	public static void main(String[] args) {
		programArgs = args;

		PropertyConfigurator.configure("config/etc/log_swing.cfg");
		log.debug("NullpoMinoSwing Start");

		// 設定ファイル読み込み
		propConfig = new CustomProperties();
		try {
			FileInputStream in = new FileInputStream("config/setting/swing.cfg");
			propConfig.load(in);
			in.close();
		} catch(IOException e) {}

		propGlobal = new CustomProperties();
		loadGlobalConfig();

		// Mode読み込み
		modeManager = new ModeManager();
		try {
			BufferedReader txtMode = new BufferedReader(new FileReader("config/list/mode.lst"));
			modeManager.loadGameModes(txtMode);
			txtMode.close();
			modeList = modeManager.getModeNames(false);
		} catch (IOException e) {
			log.error("Mode list load failed", e);
		}

		// 言語ファイル読み込み
		propLangDefault = new CustomProperties();
		try {
			FileInputStream in = new FileInputStream("config/lang/swing_default.properties");
			propLangDefault.load(in);
			in.close();
		} catch (IOException e) {
			log.error("Couldn't load default UI language file", e);
		}

		propLang = new CustomProperties();
		try {
			FileInputStream in = new FileInputStream("config/lang/swing_" + Locale.getDefault().getCountry() + ".properties");
			propLang.load(in);
			in.close();
		} catch(IOException e) {}

		// Game mode description
		propDefaultModeDesc = new CustomProperties();
		try {
			FileInputStream in = new FileInputStream("config/lang/modedesc_default.properties");
			propDefaultModeDesc.load(in);
			in.close();
		} catch(IOException e) {
			log.error("Couldn't load default mode description file", e);
		}

		propModeDesc = new CustomProperties();
		try {
			FileInputStream in = new FileInputStream("config/lang/modedesc_" + Locale.getDefault().getCountry() + ".properties");
			propModeDesc.load(in);
			in.close();
		} catch(IOException e) {}

		// Set default rule selections
		try {
			CustomProperties propDefaultRule = new CustomProperties();
			FileInputStream in = new FileInputStream("config/list/global_defaultrule.properties");
			propDefaultRule.load(in);
			in.close();

			for(int pl = 0; pl < 2; pl++)
				for(int i = 0; i < GameEngine.MAX_GAMESTYLE; i++) {
					// TETROMINO
					if(i == 0) {
						if(propGlobal.getProperty(pl + ".rule") == null) {
							propGlobal.setProperty(pl + ".rule", propDefaultRule.getProperty("default.rule", ""));
							propGlobal.setProperty(pl + ".rulefile", propDefaultRule.getProperty("default.rulefile", ""));
							propGlobal.setProperty(pl + ".rulename", propDefaultRule.getProperty("default.rulename", ""));
						}
					}
					// etc
					else {
						if(propGlobal.getProperty(pl + ".rule." + i) == null) {
							propGlobal.setProperty(pl + ".rule." + i, propDefaultRule.getProperty("default.rule." + i, ""));
							propGlobal.setProperty(pl + ".rulefile." + i, propDefaultRule.getProperty("default.rulefile." + i, ""));
							propGlobal.setProperty(pl + ".rulename." + i, propDefaultRule.getProperty("default.rulename." + i, ""));
						}
					}
				}
		} catch (Exception e) {}

		// Load keyboard settings
		GameKeySwing.initGlobalGameKeySwing();
		GameKeySwing.gamekey[0].loadConfig(propConfig);
		GameKeySwing.gamekey[1].loadConfig(propConfig);

		// Look&Feel
		if(propConfig.getProperty("option.usenativelookandfeel", true) == true) {
			try {
				UIManager.getInstalledLookAndFeels();
				UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			} catch(Exception e) {
				log.warn("Failed to set native look&feel", e);
			}
		}

		// Load images
		try {
			ResourceHolderSwing.load();
		} catch (Exception e) {
			log.error("Image load failed", e);
		}

		// First run?
		if(propConfig.getProperty("option.firstSetupMode", true) == true) {
			// Set various default settings here
			GameKeySwing.gamekey[0].loadDefaultKeymap();
			GameKeySwing.gamekey[0].saveConfig(propConfig);
			propConfig.setProperty("option.firstSetupMode", false);

			// Set default rotation button setting (only for first run)
			if(propGlobal.getProperty("global.firstSetupMode", true) == true) {
				for(int pl = 0; pl < 2; pl++) {
					if(propGlobal.getProperty(pl + ".tuning.owRotateButtonDefaultRight") == null) {
						propGlobal.setProperty(pl + ".tuning.owRotateButtonDefaultRight", 0);
					}
				}
				propGlobal.setProperty("global.firstSetupMode", false);
			}

			// Save settings
			saveConfig();
		}

		// Create and display main window
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				mainFrame = new NullpoMinoSwing();
			}
		});
	}

	/**
	 * 翻訳後のUIの文字列を取得
	 * @param str 文字列
	 * @return 翻訳後のUIの文字列 (無いならそのままstrを返す)
	 */
	public static String getUIText(String str) {
		String result = propLang.getProperty(str);
		if(result == null) {
			result = propLangDefault.getProperty(str, str);
		}
		return result;
	}

	/**
	 * 設定ファイルを保存
	 */
	public static void saveConfig() {
		try {
			FileOutputStream out = new FileOutputStream("config/setting/swing.cfg");
			propConfig.store(out, "NullpoMino Swing-frontend Config");
			out.close();
		} catch(IOException e) {
			log.error("Failed to save Swing-specific config", e);
		}

		try {
			FileOutputStream out = new FileOutputStream("config/setting/global.cfg");
			propGlobal.store(out, "NullpoMino Global Config");
			out.close();
		} catch(IOException e) {
			log.error("Failed to save global config", e);
		}
	}

	/**
	 * (Re-)Load global config file
	 */
	public static void loadGlobalConfig() {
		try {
			FileInputStream in = new FileInputStream("config/setting/global.cfg");
			propGlobal.load(in);
			in.close();
		} catch(IOException e) {}
	}

	/**
	 * テキストfieldからint型の値を取得
	 * @param value テキストfieldから値の取得に失敗したときの値
	 * @param txtfld テキストfield
	 * @return テキストfieldから値を取得できた場合はその値, 失敗したらvalueをそのまま返す
	 */
	public static int getIntTextField(int value, JTextField txtfld) {
		int v = value;

		try {
			v = Integer.parseInt(txtfld.getText());
		} catch(NumberFormatException e) {}

		return v;
	}

	/**
	 * テキストfieldからdouble型の値を取得
	 * @param value テキストfieldから値の取得に失敗したときの値
	 * @param txtfld テキストfield
	 * @return テキストfieldから値を取得できた場合はその値, 失敗したらvalueをそのまま返す
	 */
	public static double getDoubleTextField(double value, JTextField txtfld) {
		double v = value;

		try {
			v = Double.parseDouble(txtfld.getText());
		} catch(NumberFormatException e) {}

		return v;
	}

	/**
	 * テキストfieldからfloat型の値を取得
	 * @param value テキストfieldから値の取得に失敗したときの値
	 * @param txtfld テキストfield
	 * @return テキストfieldから値を取得できた場合はその値, 失敗したらvalueをそのまま返す
	 */
	public static float getFloatTextField(float value, JTextField txtfld) {
		float v = value;

		try {
			v = Float.parseFloat(txtfld.getText());
		} catch(NumberFormatException e) {}

		return v;
	}

	/**
	 * Get game mode description
	 * @param str Mode name
	 * @return Description
	 */
	protected static String getModeDesc(String str) {
		String str2 = str.replace(' ', '_');
		str2 = str2.replace('(', 'l');
		str2 = str2.replace(')', 'r');
		String result = propModeDesc.getProperty(str2);
		if(result == null) {
			result = propDefaultModeDesc.getProperty(str2, str2);
		}
		return result;
	}

	/**
	 * Constructor
	 * @throws HeadlessException キーボード, マウス, ディスプレイなどが存在しない場合の例外
	 */
	public NullpoMinoSwing() throws HeadlessException {
		super();

		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				shutdown();
			}
		});

		setTitle(getUIText("Title_Main") + " version" + GameManager.getVersionString());
		loadRecommendedRuleList();

		initUI();
		pack();

		if(propConfig.getProperty("mainwindow.width") != null)
			this.setSize(propConfig.getProperty("mainwindow.width", 500), propConfig.getProperty("mainwindow.height", 470));
		if(propConfig.getProperty("mainwindow.x") != null)
			this.setLocation(propConfig.getProperty("mainwindow.x", 0), propConfig.getProperty("mainwindow.y", 0));

		setVisible(true);

		// 新Version check
		if(propGlobal.getProperty("updatechecker.enable", true)) {
			int startupCount = propGlobal.getProperty("updatechecker.startupCount", 0);
			int startupMax = propGlobal.getProperty("updatechecker.startupMax", 20);

			if(startupCount >= startupMax) {
				String strURL = propGlobal.getProperty("updatechecker.url", "");
				UpdateChecker.addListener(this);
				UpdateChecker.startCheckForUpdates(strURL);
				startupCount = 0;
			} else {
				startupCount++;
			}

			if(startupMax >= 1) {
				propGlobal.setProperty("updatechecker.startupCount", startupCount);
				saveConfig();
			}
		}

		// コマンドLinesからリプレイ再生
		if((programArgs != null) && (programArgs.length > 0)) {
			startReplayGame(programArgs[0]);
		}
	}

	/**
	 * GUIのInitialization
	 */
	protected void initUI() {
		mainLayout = new CardLayout();
		this.setLayout(mainLayout);

		// Top screen
		JPanel panelTop = new JPanel();
		initTopScreenUI(panelTop);
		this.add(panelTop, "top");
	}

	/**
	 * Init top screen
	 */
	protected void initTopScreenUI(JComponent p) {
		p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));

		// Label
		lModeSelect = new JLabel(getUIText("Top_ModeSelect"));
		lModeSelect.setAlignmentX(0f);
		p.add(lModeSelect);

		// Mode & rule select panel
		JPanel subpanelModeSelect = new JPanel(new BorderLayout());
		subpanelModeSelect.setBorder(new EtchedBorder());
		subpanelModeSelect.setAlignmentX(0f);
		p.add(subpanelModeSelect);

		// * Mode select listbox
		listboxMode = new JList(modeList);
		listboxMode.addMouseListener(new ListboxModeMouseAdapter());
		listboxMode.addListSelectionListener(new ListSelectionListener() {
			public void valueChanged(ListSelectionEvent e) {
				String strMode = (String)listboxMode.getSelectedValue();
				lModeSelect.setText(getModeDesc(strMode));
				prepareRuleList(strMode);
			}
		});
		JScrollPane scpaneListboxMode = new JScrollPane(listboxMode);
		scpaneListboxMode.setPreferredSize(new Dimension(280, 375));
		subpanelModeSelect.add(scpaneListboxMode, BorderLayout.WEST);

		// * Rule select listbox
		listmodelRule = new DefaultListModel();
		listboxRule = new JList(listmodelRule);
		listboxRule.addMouseListener(new ListboxModeMouseAdapter());
		JScrollPane scpaneListBoxRule = new JScrollPane(listboxRule);
		scpaneListBoxRule.setPreferredSize(new Dimension(150, 375));
		subpanelModeSelect.add(scpaneListBoxRule, BorderLayout.CENTER);

		// * Set default selected index
		listboxMode.setSelectedValue(propGlobal.getProperty("name.mode", ""), true);
		if(listboxMode.getSelectedIndex() == -1) listboxMode.setSelectedIndex(0);
		prepareRuleList((String)listboxMode.getSelectedValue());

		// Start button
		JButton buttonStartOffline = new JButton(getUIText("Top_StartOffline"));
		buttonStartOffline.setMnemonic('S');
		buttonStartOffline.addActionListener(this);
		buttonStartOffline.setActionCommand("Top_StartOffline");
		buttonStartOffline.setAlignmentX(0f);
		buttonStartOffline.setMaximumSize(new Dimension(Short.MAX_VALUE, buttonStartOffline.getMaximumSize().height));
		p.add(buttonStartOffline);
		this.getRootPane().setDefaultButton(buttonStartOffline);

		// Menu
		initMenu();
	}

	/**
	 * Menu のInitialization
	 */
	protected void initMenu() {
		JMenuBar menubar = new JMenuBar();
		this.setJMenuBar(menubar);

		// ファイルMenu
		JMenu menuFile = new JMenu(getUIText("Menu_File"));
		menuFile.setMnemonic('F');
		menubar.add(menuFile);

		// リプレイを開く
		JMenuItem miOpen = new JMenuItem(getUIText("Menu_Open"));
		miOpen.setMnemonic('O');
		miOpen.addActionListener(this);
		miOpen.setActionCommand("Menu_Open");
		menuFile.add(miOpen);

		// ネットプレイ開始
		JMenuItem miNetPlay = new JMenuItem(getUIText("Menu_NetPlay"));
		miNetPlay.setMnemonic('N');
		miNetPlay.addActionListener(this);
		miNetPlay.setActionCommand("Menu_NetPlay");
		menuFile.add(miNetPlay);

		// 終了
		JMenuItem miExit = new JMenuItem(getUIText("Menu_Exit"));
		miExit.setMnemonic('X');
		miExit.addActionListener(this);
		miExit.setActionCommand("Menu_Exit");
		menuFile.add(miExit);

		// 設定Menu
		JMenu menuConfig = new JMenu(getUIText("Menu_Config"));
		menuConfig.setMnemonic('C');
		menubar.add(menuConfig);

		// ルール選択
		JMenuItem miRuleSelect = new JMenuItem(getUIText("Menu_RuleSelect"));
		miRuleSelect.setMnemonic('R');
		miRuleSelect.addActionListener(this);
		miRuleSelect.setActionCommand("Menu_RuleSelect");
		menuConfig.add(miRuleSelect);

		// ルール選択(2P)
		JMenuItem miRuleSelect2P = new JMenuItem(getUIText("Menu_RuleSelect2P"));
		miRuleSelect2P.setMnemonic('S');
		miRuleSelect2P.addActionListener(this);
		miRuleSelect2P.setActionCommand("Menu_RuleSelect2P");
		menuConfig.add(miRuleSelect2P);

		// チューニング設定
		JMenuItem miGameTuning = new JMenuItem(getUIText("Menu_GameTuning"));
		miGameTuning.setMnemonic('T');
		miGameTuning.addActionListener(this);
		miGameTuning.setActionCommand("Menu_GameTuning");
		menuConfig.add(miGameTuning);

		// チューニング設定(2P)
		JMenuItem miGameTuning2P = new JMenuItem(getUIText("Menu_GameTuning2P"));
		miGameTuning2P.setMnemonic('U');
		miGameTuning2P.addActionListener(this);
		miGameTuning2P.setActionCommand("Menu_GameTuning2P");
		menuConfig.add(miGameTuning2P);

		// AI設定
		JMenuItem miAIConfig = new JMenuItem(getUIText("Menu_AIConfig"));
		miAIConfig.setMnemonic('A');
		miAIConfig.addActionListener(this);
		miAIConfig.setActionCommand("Menu_AIConfig");
		menuConfig.add(miAIConfig);

		// AI設定(2P)
		JMenuItem miAIConfig2P = new JMenuItem(getUIText("Menu_AIConfig2P"));
		miAIConfig2P.setMnemonic('Z');
		miAIConfig2P.addActionListener(this);
		miAIConfig2P.setActionCommand("Menu_AIConfig2P");
		menuConfig.add(miAIConfig2P);

		// キー設定
		JMenuItem miKeyConfig = new JMenuItem(getUIText("Menu_KeyConfig"));
		miKeyConfig.setMnemonic('K');
		miKeyConfig.addActionListener(this);
		miKeyConfig.setActionCommand("Menu_KeyConfig");
		menuConfig.add(miKeyConfig);

		// キー設定(2P)
		JMenuItem miKeyConfig2P = new JMenuItem(getUIText("Menu_KeyConfig2P"));
		miKeyConfig2P.setMnemonic('E');
		miKeyConfig2P.addActionListener(this);
		miKeyConfig2P.setActionCommand("Menu_KeyConfig2P");
		menuConfig.add(miKeyConfig2P);

		// 更新 check 設定
		JMenuItem miUpdateCheck = new JMenuItem(getUIText("Menu_UpdateCheck"));
		miUpdateCheck.setMnemonic('D');
		miUpdateCheck.addActionListener(this);
		miUpdateCheck.setActionCommand("Menu_UpdateCheck");
		menuConfig.add(miUpdateCheck);

		// その他の設定
		JMenuItem miGeneralConfig = new JMenuItem(getUIText("Menu_GeneralConfig"));
		miGeneralConfig.setMnemonic('G');
		miGeneralConfig.addActionListener(this);
		miGeneralConfig.setActionCommand("Menu_GeneralConfig");
		menuConfig.add(miGeneralConfig);
	}

	/**
	 * Load list file
	 */
	protected void loadRecommendedRuleList() {
		mapRuleEntries = new HashMap<String, RuleEntry>();

		try {
			BufferedReader in = new BufferedReader(new FileReader("config/list/recommended_rules.lst"));
			String strMode = "";

			String str;
			while((str = in.readLine()) != null) {
				str = str.trim();	// Trim the space

				if(str.startsWith("#")) {
					// Commment-line. Ignore it.
				} else if(str.startsWith(":")) {
					// Mode change
					strMode = str.substring(1);
				} else {
					// File Path
					File file = new File(str);
					if(file.exists() && file.isFile()) {
						try {
							FileInputStream ruleIn = new FileInputStream(file);
							CustomProperties propRule = new CustomProperties();
							propRule.load(ruleIn);
							ruleIn.close();

							String strRuleName = propRule.getProperty("0.ruleopt.strRuleName", "");
							if(strRuleName.length() > 0) {
								RuleEntry entry = mapRuleEntries.get(strMode);
								if(entry == null) {
									entry = new RuleEntry();
									mapRuleEntries.put(strMode, entry);
								}
								entry.listName.add(strRuleName);
								entry.listPath.add(str);
							}
						} catch (IOException e2) {
							log.error("File " + str + " doesn't exist", e2);
						}
					}
				}
			}

			in.close();
		} catch (IOException e) {
			log.error("Failed to load recommended rules list", e);
		}
	}

	/**
	 * Prepare rule list
	 */
	protected void prepareRuleList(String strCurrentMode) {
		listmodelRule.clear();
		listmodelRule.addElement(getUIText("Top_CurrentRule"));

		if(strCurrentMode != null) {
			RuleEntry entry = mapRuleEntries.get(strCurrentMode);

			if(entry != null) {
				for(int i = 0; i < entry.listName.size(); i++) {
					listmodelRule.addElement(entry.listName.get(i));
				}
			}
		}

		listboxRule.setSelectedIndex(0);
		String strLastRule = propGlobal.getProperty("lastrule." + strCurrentMode);
		if((strLastRule != null) && (strLastRule.length() > 0)) {
			listboxRule.setSelectedValue(strLastRule, true);
		}
	}

	/**
	 * オフLinesStart game buttonが押されたとき
	 */
	protected void onStartOfflineClicked() {
		String strMode = (String)listboxMode.getSelectedValue();
		propGlobal.setProperty("name.mode", strMode);

		String strRulePath = null;
		if(listboxRule.getSelectedIndex() >= 1) {
			int index = listboxRule.getSelectedIndex();
			String strRuleName = (String)listboxRule.getSelectedValue();
			RuleEntry entry = mapRuleEntries.get(strMode);
			if(entry != null) {
				strRulePath = entry.listPath.get(index - 1);
				propGlobal.setProperty("lastrule." + strMode, strRuleName);
			}
		} else {
			propGlobal.setProperty("lastrule." + strMode, "");
		}

		saveConfig();

		startNewGame(strRulePath);
		if(gameFrame == null) {
			gameFrame = new GameFrame(this);
		}
		if((gameManager != null) && (gameManager.mode != null)) {
			gameFrame.setTitle(getUIText("Title_Game") + " - " + gameManager.mode.getName());
			gameFrame.maxfps = propConfig.getProperty("option.maxfps", 60);
			gameFrame.isNetPlay = false;
		}
		hideAllSubWindows();
		this.setVisible(false);
		gameFrame.displayWindow();
	}

	/**
	 * Shutdown this application
	 */
	public void shutdown() {
		log.debug("Main shutdown() called");
		propConfig.setProperty("mainwindow.width", getSize().width);
		propConfig.setProperty("mainwindow.height", getSize().height);
		propConfig.setProperty("mainwindow.x", getLocation().x);
		propConfig.setProperty("mainwindow.y", getLocation().y);
		saveConfig();
		System.exit(0);
	}

	/*
	 * Menu 実行時の処理
	 */
	public void actionPerformed(ActionEvent e) {
		// オフLinesStart game
		if(e.getActionCommand() == "Top_StartOffline") {
			onStartOfflineClicked();
		}
		// リプレイ開く
		else if(e.getActionCommand() == "Menu_Open") {
			if(replayFileChooser == null) {
				File dir = new File(propGlobal.getProperty("custom.replay.directory", "replay"));
				replayFileChooser = new JFileChooser(dir);
				replayFileChooser.addChoosableFileFilter(new ReplayFileFilter());
			}
			if(replayFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
				startReplayGame(replayFileChooser.getSelectedFile().getPath());
				if(gameFrame == null) {
					gameFrame = new GameFrame(this);
				}
				if((gameManager != null) && (gameManager.mode != null)) {
					gameFrame.setTitle(getUIText("Title_Game") + " - " + gameManager.mode.getName() + " (Replay)");
					gameFrame.maxfps = propConfig.getProperty("option.maxfps", 60);
					gameFrame.isNetPlay = false;
				}
				hideAllSubWindows();
				this.setVisible(false);
				gameFrame.displayWindow();
			}
		}
		// ネットプレイ開始
		else if(e.getActionCommand() == "Menu_NetPlay") {
			startNetPlayGame();
			if(gameFrame == null) {
				gameFrame = new GameFrame(this);
			}
			if((gameManager != null) && (gameManager.mode != null)) {
				gameFrame.setTitle(getUIText("Title_Game") + " - " + gameManager.mode.getName());
				gameFrame.maxfps = 60;
				gameFrame.isNetPlay = true;
			}
			hideAllSubWindows();
			this.setVisible(false);
			gameFrame.displayWindow();
		}
		// ルール選択
		else if(e.getActionCommand() == "Menu_RuleSelect") {
			if(ruleSelectFrame == null) {
				ruleSelectFrame = new RuleSelectFrame(this);
			}
			ruleSelectFrame.load(0);
			ruleSelectFrame.setVisible(true);
		}
		// ルール選択(2P)
		else if(e.getActionCommand() == "Menu_RuleSelect2P") {
			if(ruleSelectFrame == null) {
				ruleSelectFrame = new RuleSelectFrame(this);
			}
			ruleSelectFrame.load(1);
			ruleSelectFrame.setVisible(true);
		}
		// キーボード設定
		else if(e.getActionCommand() == "Menu_KeyConfig") {
			if(keyConfigFrame == null) {
				keyConfigFrame = new KeyConfigFrame(this);
			}
			keyConfigFrame.load(0);
			keyConfigFrame.setVisible(true);
		}
		// キーボード設定(2P)
		else if(e.getActionCommand() == "Menu_KeyConfig2P") {
			if(keyConfigFrame == null) {
				keyConfigFrame = new KeyConfigFrame(this);
			}
			keyConfigFrame.load(1);
			keyConfigFrame.setVisible(true);
		}
		// AI設定
		else if(e.getActionCommand() == "Menu_AIConfig") {
			if(aiSelectFrame == null) {
				aiSelectFrame = new AISelectFrame(this);
			}
			aiSelectFrame.load(0);
			aiSelectFrame.setVisible(true);
		}
		// AI設定(2P)
		else if(e.getActionCommand() == "Menu_AIConfig2P") {
			if(aiSelectFrame == null) {
				aiSelectFrame = new AISelectFrame(this);
			}
			aiSelectFrame.load(1);
			aiSelectFrame.setVisible(true);
		}
		// チューニング設定
		else if(e.getActionCommand() == "Menu_GameTuning") {
			if(gameTuningFrame == null) {
				gameTuningFrame = new GameTuningFrame(this);
			}
			gameTuningFrame.load(0);
			gameTuningFrame.setVisible(true);
		}
		// チューニング設定(2P)
		else if(e.getActionCommand() == "Menu_GameTuning2P") {
			if(gameTuningFrame == null) {
				gameTuningFrame = new GameTuningFrame(this);
			}
			gameTuningFrame.load(1);
			gameTuningFrame.setVisible(true);
		}
		// 更新 check 設定
		else if(e.getActionCommand() == "Menu_UpdateCheck") {
			if(updateCheckFrame == null) {
				updateCheckFrame = new UpdateCheckFrame(this);
			}
			updateCheckFrame.load();
			updateCheckFrame.setVisible(true);
		}
		// その他の設定
		else if(e.getActionCommand() == "Menu_GeneralConfig") {
			if(generalConfigFrame == null) {
				generalConfigFrame = new GeneralConfigFrame(this);
			}
			generalConfigFrame.load();
			generalConfigFrame.setVisible(true);
		}
		// 終了
		else if(e.getActionCommand() == "Menu_Exit") {
			shutdown();
		}
	}

	/**
	 * すべてのサブウィンドウを隠す
	 */
	public void hideAllSubWindows() {
		if(keyConfigFrame != null) keyConfigFrame.setVisible(false);
		if(ruleSelectFrame != null) ruleSelectFrame.setVisible(false);
		if(aiSelectFrame != null) aiSelectFrame.setVisible(false);
		if(generalConfigFrame != null) generalConfigFrame.setVisible(false);
		if(gameTuningFrame != null) gameTuningFrame.setVisible(false);
		if(updateCheckFrame != null) updateCheckFrame.setVisible(false);
	}

	/**
	 * Start a new game (Rule will be user-selected one))
	 */
	public void startNewGame() {
		startNewGame(null);
	}

	/**
	 * Start a new game
	 * @param strRulePath Rule file path (null if you want to use user-selected one)
	 */
	public void startNewGame(String strRulePath) {
		rendererSwing = new RendererSwing();
		gameManager = new GameManager(rendererSwing);

		// Mode
		String modeName = propGlobal.getProperty("name.mode", "");
		GameMode modeObj = modeManager.getMode(modeName);
		if(modeObj == null) {
			log.error("Couldn't find mode:" + modeName);
		} else {
			gameManager.mode = modeObj;
		}

		gameManager.init();

		// Initialization for each player
		for(int i = 0; i < gameManager.getPlayers(); i++) {
			// チューニング設定
			gameManager.engine[i].owRotateButtonDefaultRight = propGlobal.getProperty(i + ".tuning.owRotateButtonDefaultRight", -1);
			gameManager.engine[i].owSkin = propGlobal.getProperty(i + ".tuning.owSkin", -1);
			gameManager.engine[i].owMinDAS = propGlobal.getProperty(i + ".tuning.owMinDAS", -1);
			gameManager.engine[i].owMaxDAS = propGlobal.getProperty(i + ".tuning.owMaxDAS", -1);
			gameManager.engine[i].owDasDelay = propGlobal.getProperty(i + ".tuning.owDasDelay", -1);
			gameManager.engine[i].owReverseUpDown = propGlobal.getProperty(i + ".tuning.owReverseUpDown", false);
			gameManager.engine[i].owMoveDiagonal = propGlobal.getProperty(i + ".tuning.owMoveDiagonal", -1);
			gameManager.engine[i].owBlockOutlineType = propGlobal.getProperty(i + ".tuning.owBlockOutlineType", -1);
			gameManager.engine[i].owBlockShowOutlineOnly = propGlobal.getProperty(i + ".tuning.owBlockShowOutlineOnly", -1);

			// ルール
			RuleOptions ruleopt = null;
			String rulename = strRulePath;
			if(rulename == null) {
				rulename = propGlobal.getProperty(i + ".rule", "");
				if(gameManager.mode.getGameStyle() > 0) {
					rulename = propGlobal.getProperty(i + ".rule." + gameManager.mode.getGameStyle(), "");
				}
			}
			if((rulename != null) && (rulename.length() > 0)) {
				log.debug("Load rule options from " + rulename);
				ruleopt = GeneralUtil.loadRule(rulename);
			} else {
				log.debug("Load rule options from setting file");
				ruleopt = new RuleOptions();
				ruleopt.readProperty(propGlobal, i);
			}
			gameManager.engine[i].ruleopt = ruleopt;

			// NEXT順生成アルゴリズム
			if((ruleopt.strRandomizer != null) && (ruleopt.strRandomizer.length() > 0)) {
				Randomizer randomizerObject = GeneralUtil.loadRandomizer(ruleopt.strRandomizer);
				gameManager.engine[i].randomizer = randomizerObject;
			}

			// Wallkick
			if((ruleopt.strWallkick != null) && (ruleopt.strWallkick.length() > 0)) {
				Wallkick wallkickObject = GeneralUtil.loadWallkick(ruleopt.strWallkick);
				gameManager.engine[i].wallkick = wallkickObject;
			}

			// AI
			String aiName = propGlobal.getProperty(i + ".ai", "");
			if(aiName.length() > 0) {
				DummyAI aiObj = GeneralUtil.loadAIPlayer(aiName);
				gameManager.engine[i].ai = aiObj;
				gameManager.engine[i].aiMoveDelay = propGlobal.getProperty(i + ".aiMoveDelay", 0);
				gameManager.engine[i].aiThinkDelay = propGlobal.getProperty(i + ".aiThinkDelay", 0);
				gameManager.engine[i].aiUseThread = propGlobal.getProperty(i + ".aiUseThread", true);
				gameManager.engine[i].aiShowHint = propGlobal.getProperty(i+".aiShowHint", false);
				gameManager.engine[i].aiPrethink = propGlobal.getProperty(i+".aiPrethink", false);
				gameManager.engine[i].aiShowState = NullpoMinoSwing.propGlobal.getProperty(i+".aiShowState", false);
			}
			gameManager.showInput = NullpoMinoSwing.propConfig.getProperty("option.showInput", false);

			// Called at initialization
			gameManager.engine[i].init();
		}
	}

	/**
	 * リプレイを読み込んで再生
	 * @param filename リプレイ dataのFilename
	 */
	public void startReplayGame(String filename) {
		log.info("Loading Replay:" + filename);
		CustomProperties prop = new CustomProperties();

		try {
			FileInputStream stream = new FileInputStream(filename);
			prop.load(stream);
			stream.close();
		} catch (IOException e) {
			log.error("Couldn't load replay file from " + filename, e);
			return;
		}

		rendererSwing = new RendererSwing();
		gameManager = new GameManager(rendererSwing);
		gameManager.replayMode = true;
		gameManager.replayProp = prop;

		// Mode
		String modeName = prop.getProperty("name.mode", "");
		GameMode modeObj = modeManager.getMode(modeName);
		if(modeObj == null) {
			log.error("Couldn't find mode:" + modeName);
		} else {
			gameManager.mode = modeObj;
		}

		gameManager.init();

		// Initialization for each player
		for(int i = 0; i < gameManager.getPlayers(); i++) {
			// ルール
			RuleOptions ruleopt = new RuleOptions();
			ruleopt.readProperty(prop, i);
			gameManager.engine[i].ruleopt = ruleopt;

			// NEXT順生成アルゴリズム
			if((ruleopt.strRandomizer != null) && (ruleopt.strRandomizer.length() > 0)) {
				Randomizer randomizerObject = GeneralUtil.loadRandomizer(ruleopt.strRandomizer);
				gameManager.engine[i].randomizer = randomizerObject;
			}

			// Wallkick
			if((ruleopt.strWallkick != null) && (ruleopt.strWallkick.length() > 0)) {
				Wallkick wallkickObject = GeneralUtil.loadWallkick(ruleopt.strWallkick);
				gameManager.engine[i].wallkick = wallkickObject;
			}

			// AI (リプレイ追記用)
			String aiName = propGlobal.getProperty(i + ".ai", "");
			if(aiName.length() > 0) {
				DummyAI aiObj = GeneralUtil.loadAIPlayer(aiName);
				gameManager.engine[i].ai = aiObj;
				gameManager.engine[i].aiMoveDelay = propGlobal.getProperty(i + ".aiMoveDelay", 0);
				gameManager.engine[i].aiThinkDelay = propGlobal.getProperty(i + ".aiThinkDelay", 0);
				gameManager.engine[i].aiUseThread = propGlobal.getProperty(i + ".aiUseThread", true);
				gameManager.engine[i].aiShowHint = propGlobal.getProperty(i+".aiShowHint", false);
				gameManager.engine[i].aiPrethink = propGlobal.getProperty(i+".aiPrethink", false);
				gameManager.engine[i].aiShowState = NullpoMinoSwing.propGlobal.getProperty(i+".aiShowState", false);
			}
			gameManager.showInput = NullpoMinoSwing.propConfig.getProperty("option.showInput", false);

			// Called at initialization
			gameManager.engine[i].init();
		}
	}

	/**
	 * ネットプレイ開始処理
	 */
	public void startNetPlayGame() {
		// gameManager Initialization
		rendererSwing = new RendererSwing();
		gameManager = new GameManager(rendererSwing);

		// Lobby Initialization
		netLobby = new NetLobbyFrame();
		netLobby.addListener(this);

		// Mode initialization
		enterNewMode(null);

		// Lobby start
		netLobby.init();
		netLobby.setVisible(true);
	}

	/**
	 * Enter to a new mode in netplay
	 * @param modeName Mode name
	 */
	public void enterNewMode(String modeName) {
		loadGlobalConfig();	// Reload global config file

		GameMode previousMode = gameManager.mode;
		GameMode newModeTemp = (modeName == null) ? new NetDummyMode() : NullpoMinoSwing.modeManager.getMode(modeName);

		if(newModeTemp == null) {
			log.error("Cannot find a mode:" + modeName);
		} else if(newModeTemp instanceof NetDummyMode) {
			log.info("Enter new mode:" + newModeTemp.getName());

			NetDummyMode newMode = (NetDummyMode)newModeTemp;

			if(previousMode != null) {
				if(gameManager.engine[0].ai != null) {
					gameManager.engine[0].ai.shutdown(gameManager.engine[0], 0);
				}
				previousMode.netplayUnload(netLobby);
			}
			gameManager.mode = newMode;
			gameManager.init();

			// Tuning
			gameManager.engine[0].owRotateButtonDefaultRight = NullpoMinoSwing.propGlobal.getProperty(0 + ".tuning.owRotateButtonDefaultRight", -1);
			gameManager.engine[0].owSkin = NullpoMinoSwing.propGlobal.getProperty(0 + ".tuning.owSkin", -1);
			gameManager.engine[0].owMinDAS = NullpoMinoSwing.propGlobal.getProperty(0 + ".tuning.owMinDAS", -1);
			gameManager.engine[0].owMaxDAS = NullpoMinoSwing.propGlobal.getProperty(0 + ".tuning.owMaxDAS", -1);
			gameManager.engine[0].owDasDelay = NullpoMinoSwing.propGlobal.getProperty(0 + ".tuning.owDasDelay", -1);
			gameManager.engine[0].owReverseUpDown = NullpoMinoSwing.propGlobal.getProperty(0 + ".tuning.owReverseUpDown", false);
			gameManager.engine[0].owMoveDiagonal = NullpoMinoSwing.propGlobal.getProperty(0 + ".tuning.owMoveDiagonal", -1);
			gameManager.engine[0].owBlockOutlineType = propGlobal.getProperty(0 + ".tuning.owBlockOutlineType", -1);
			gameManager.engine[0].owBlockShowOutlineOnly = propGlobal.getProperty(0 + ".tuning.owBlockShowOutlineOnly", -1);

			// Rule
			RuleOptions ruleopt = null;
			String rulename = NullpoMinoSwing.propGlobal.getProperty(0 + ".rule", "");
			if(gameManager.mode.getGameStyle() > 0) {
				rulename = propGlobal.getProperty(0 + ".rule." + gameManager.mode.getGameStyle(), "");
			}
			if((rulename != null) && (rulename.length() > 0)) {
				log.info("Load rule options from " + rulename);
				ruleopt = GeneralUtil.loadRule(rulename);
			} else {
				log.info("Load rule options from setting file");
				ruleopt = new RuleOptions();
				ruleopt.readProperty(NullpoMinoSwing.propGlobal, 0);
			}
			gameManager.engine[0].ruleopt = ruleopt;

			// Randomizer
			if((ruleopt.strRandomizer != null) && (ruleopt.strRandomizer.length() > 0)) {
				Randomizer randomizerObject = GeneralUtil.loadRandomizer(ruleopt.strRandomizer);
				gameManager.engine[0].randomizer = randomizerObject;
			}

			// Wallkick
			if((ruleopt.strWallkick != null) && (ruleopt.strWallkick.length() > 0)) {
				Wallkick wallkickObject = GeneralUtil.loadWallkick(ruleopt.strWallkick);
				gameManager.engine[0].wallkick = wallkickObject;
			}

			// AI
			String aiName = NullpoMinoSwing.propGlobal.getProperty(0 + ".ai", "");
			if(aiName.length() > 0) {
				DummyAI aiObj = GeneralUtil.loadAIPlayer(aiName);
				gameManager.engine[0].ai = aiObj;
				gameManager.engine[0].aiMoveDelay = NullpoMinoSwing.propGlobal.getProperty(0 + ".aiMoveDelay", 0);
				gameManager.engine[0].aiThinkDelay = NullpoMinoSwing.propGlobal.getProperty(0 + ".aiThinkDelay", 0);
				gameManager.engine[0].aiUseThread = NullpoMinoSwing.propGlobal.getProperty(0 + ".aiUseThread", true);
				gameManager.engine[0].aiShowHint = NullpoMinoSwing.propGlobal.getProperty(0+".aiShowHint", false);
				gameManager.engine[0].aiPrethink = NullpoMinoSwing.propGlobal.getProperty(0+".aiPrethink", false);
				gameManager.engine[0].aiShowState = NullpoMinoSwing.propGlobal.getProperty(0+".aiShowState", false);
			}
			gameManager.showInput = NullpoMinoSwing.propConfig.getProperty("option.showInput", false);

			// Initialization for each player
			for(int i = 0; i < gameManager.getPlayers(); i++) {
				gameManager.engine[i].init();
			}

			newMode.netplayInit(netLobby);
		} else {
			log.error("This mode does not support netplay:" + modeName);
		}

		if(gameFrame != null) gameFrame.updateTitleBarCaption();
	}

	/**
	 * Observerクライアントを開始
	 */
	public synchronized static void startObserverClient() {
		log.debug("startObserverClient called");

		propObserver = new CustomProperties();
		try {
			FileInputStream in = new FileInputStream("config/setting/netobserver.cfg");
			propObserver.load(in);
			in.close();
		} catch (IOException e) {}

		if(propObserver.getProperty("observer.enable", false) == false) return;
		if((netObserverClient != null) && netObserverClient.isConnected()) return;

		String host = propObserver.getProperty("observer.host", "");
		int port = propObserver.getProperty("observer.port", NetObserverClient.DEFAULT_PORT);

		if((host.length() > 0) && (port > 0)) {
			netObserverClient = new NetObserverClient(host, port);
			netObserverClient.start();
			log.debug("Observer started");
		}
	}

	/**
	 * Observerクライアントを停止
	 */
	public synchronized static void stopObserverClient() {
		log.debug("stopObserverClient called");

		if(netObserverClient != null) {
			if(netObserverClient.isConnected()) {
				netObserverClient.send("disconnect\n");
			}
			netObserverClient.threadRunning = false;
			netObserverClient.connectedFlag = false;
			netObserverClient = null;
			log.debug("Observer stoped");
		}
	}

	/**
	 * Observerクライアント取得
	 * @return Observerクライアント
	 */
	public synchronized static NetObserverClient getObserverClient() {
		return netObserverClient;
	}

	public void netlobbyOnDisconnect(NetLobbyFrame lobby, NetPlayerClient client, Throwable ex) {
		if(gameFrame != null) gameFrame.strModeToEnter = null;
	}

	public void netlobbyOnExit(NetLobbyFrame lobby) {
		if(gameManager != null) {
			gameManager.engine[0].quitflag = true;
		}
	}

	public void netlobbyOnInit(NetLobbyFrame lobby) {
	}

	public void netlobbyOnLoginOK(NetLobbyFrame lobby, NetPlayerClient client) {
	}

	public void netlobbyOnMessage(NetLobbyFrame lobby, NetPlayerClient client, String[] message) throws IOException {
	}

	public void netlobbyOnRoomJoin(NetLobbyFrame lobby, NetPlayerClient client, NetRoomInfo roomInfo) {
		//enterNewMode(roomInfo.strMode);
		if(gameFrame != null) gameFrame.strModeToEnter = roomInfo.strMode;
	}

	public void netlobbyOnRoomLeave(NetLobbyFrame lobby, NetPlayerClient client) {
		//enterNewMode(null);
		if(gameFrame != null) gameFrame.strModeToEnter = null;
	}

	public void onUpdateCheckerStart() {
	}

	public void onUpdateCheckerEnd(int status) {
		if(UpdateChecker.isNewVersionAvailable(GameManager.getVersionMajor(), GameManager.getVersionMinor())) {
			SwingUtilities.invokeLater(new Runnable() {
				public void run() {
					if(lModeSelect != null) {
						String strTemp = String.format(getUIText("Top_NewVersion"),
								UpdateChecker.getLatestVersionFullString(), UpdateChecker.getStrReleaseDate());
						lModeSelect.setText(strTemp);
					}
				}
			});
		}
	}

	/**
	 * リプレイファイル選択用フィルタ
	 */
	protected class ReplayFileFilter extends FileFilter {
		/*
		 * ファイルを表示するかどうか判定
		 */
		@Override
		public boolean accept(File f) {
			// ディレクトリなら無条件表示
			// またはファイル末尾が.repだったら表示
			if(f.isDirectory() || f.getName().endsWith(".rep")) return true;
			return false;
		}

		/*
		 * このフィルタの表示名を返す
		 */
		@Override
		public String getDescription() {
			return getUIText("FileChooser_ReplayFile");
		}
	}

	/**
	 * Mode 選択リストボックス用MouseAdapter
	 */
	protected class ListboxModeMouseAdapter extends MouseAdapter {
		@Override
		public void mouseClicked(MouseEvent e) {
			if((e.getClickCount() == 2) && (e.getButton() == MouseEvent.BUTTON1)) {
				onStartOfflineClicked();
			}
		}
	}

	/**
	 * RuleEntry
	 */
	protected class RuleEntry {
		public LinkedList<String> listPath = new LinkedList<String>();
		public LinkedList<String> listName = new LinkedList<String>();
	}
}


text:
package com.jhlabs.map.proj;

import java.awt.*;
import java.awt.geom.*;
import com.jhlabs.map.*;

/**
 * The superclass for all azimuthal map projections
 */
public class AzimuthalProjection extends Projection {

	public final static int NORTH_POLE = 1;
	public final static int SOUTH_POLE = 2;
	public final static int EQUATOR = 3;
	public final static int OBLIQUE = 4;

	protected int mode;
	protected double sinphi0, cosphi0;
	private double mapRadius = 90.0;

	public AzimuthalProjection() {
		this( 0,0);//Math.toRadians(45.0), Math.toRadians(45.0) );
	}

	public AzimuthalProjection(double projectionLatitude, double projectionLongitude) {
		this.projectionLatitude = projectionLatitude;
		this.projectionLongitude = projectionLongitude;
		initialize();
	}

	public void initialize() {
		super.initialize();
		if (Math.abs(Math.abs(projectionLatitude) - MapMath.HALFPI) < EPS10)
			mode = projectionLatitude < 0. ? SOUTH_POLE : NORTH_POLE;
		else if (Math.abs(projectionLatitude) > EPS10) {
			mode = OBLIQUE;
			sinphi0 = Math.sin(projectionLatitude);
			cosphi0 = Math.cos(projectionLatitude);
		} else
			mode = EQUATOR;
	}

	public boolean inside(double lon, double lat) {
		return MapMath.greatCircleDistance( Math.toRadians(lon), Math.toRadians(lat), projectionLongitude, projectionLatitude) < Math.toRadians(mapRadius);
	}

	/**
	 * Set the map radius (in degrees). 180 shows a hemisphere, 360 shows the whole globe.
	 */
	public void setMapRadius(double mapRadius) {
		this.mapRadius = mapRadius;
	}

	public double getMapRadius() {
		return mapRadius;
	}

}


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

<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Digits Terms and Conditions-->
    <!--suppress MissingTranslation StringFormatMatches-->
    <string name="dgts__terms_text">By tapping %1$sSend confirmation code%1$s above, %6$sDigits by Twitter%5$s will send you an SMS to confirm your phone number. On the next screen, you can choose "Resend code" to receive a new SMS or "Call me" to initiate a phone call to confirm your phone number. Message, call & data rates may apply.</string>
    <!--suppress MissingTranslation-->
    <string name="dgts__terms_text_call_me">By tapping %1$sCall me%1$s above, %6$sDigits by Twitter%5$s will send you a voice call to confirm your phone number. Call & data rates may apply.</string>
    <!--suppress MissingTranslation-->
    <string name="dgts__terms_text_create">By tapping %1$sCreate account%1$s above, you agree to the %8$sTerms of Service%5$s, %9$sPrivacy Policy%5$s, and %10$sCookies Use%5$s of %6$sDigits by Twitter%5$s, to share your phone number with %4$s, and that other users of %4$s can discover you by phone number.</string>
    <!--suppress MissingTranslation-->
    <string name="dgts__terms_text_updated">By tapping %1$sContinue%1$s above, you agree to the %8$sTerms of Service%5$s, %9$sPrivacy Policy%5$s, and %10$sCookies Use%5$s of %6$sDigits by Twitter%5$s, to share your %7$sDigits phone number and/or email address%5$s with %4$s, and other users of %4$s can discover you by phone number and/or email.</string>
    <!--suppress MissingTranslation-->
    <string name="dgts__terms_text_sign_in">By tapping %1$sContinue%1$s above, your %7$sDigits phone number and/or email address%5$s will be shared with %4$s and other users of %4$s can discover you by phone number and/or email.</string>
    <!--suppress MissingTranslation-->
    <string name="dgts_pin_code_terms">You have previously set a 2-step verification code on digits.com</string>
    <!--suppress MissingTranslation-->
    <string name="dgts__terms_email_request">By tapping %1$sContinue%1$s above, you are adding this email to your Digits account. You agree that this app and %7$sall apps listed in your Digits account%5$s can access this email address and their users can discover you by email.</string>

    <!-- button text for sign up -->
    <!--suppress MissingTranslation-->
    <string name="dgts__login_digits_text">Use my phone number</string>

    <!-- Phone number screen -->
    <!-- Text on the top of the screen -->
    <!--suppress MissingTranslation-->
    <string name="dgts__phone_number_text">Enter your phone number</string>
    <!-- hint for the user on a input field -->
    <!--suppress MissingTranslation-->
    <string name="dgts__phone_number_edit_hint">Your Number</string>
    <!--suppress MissingTranslation, UnusedResources-->
    <string name="dgts__confirmation_code">Confirmation code</string>
    <!-- Confirmation code screen -->
    <string name="dgts__confirmation_edit_hint">Enter the 6-digit code we sent you</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__pin_code_verification_title">Enter 2-step verification code</string>
    <!-- Button text -->
    <!--suppress UnusedResources MissingTranslation-->
    <string name="dgts__resend_confirmation_text">Resend confirmation code</string>
    <!-- Button text -->
    <!--suppress UnusedResources MissingTranslation  -->
    <string name="dgts__resend_confirmation_button_code">Resend code</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__success_desc">Success Icon</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__okay">Okay</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__not_now">Not now</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__try_again_phone_number">Please check your number and try again.</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__try_again_confirmation">Please check your code and try again.</string>
    <!--suppress UnusedResources MissingTranslation-->
    <string name="dgts__confirmation_expired">This code has expired. Please resend confirmation code.</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__network_error">Please check your network and try again.</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__try_another_phone">Try a different phone number</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__dismiss">Dismiss</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__try_again">Try Again</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__confirmation_error">Unable to confirm your phone number</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__confirmation_error_alternative">Sorry, we are having trouble sending you a confirmation code.</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__image_header_description">Image header for login</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__find_your_friends">Find your friends</string>
    <!-- Terms and conditions for upload address book screen -->
    <!--suppress MissingTranslation -->
    <string name="dgts__upload_contacts">We use Digits by Twitter to find more of your friends who use this app. When you tap Okay, we\'ll upload your address book to Digits by Twitter so that we can help you find users of %1$s that you know or help other users of %1$s find you.</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__digits_logo_desc">digits logo icon</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__digits_logo_name_desc">digits logo name</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__verification_code">Verification code</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__call_me">Call me</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__calling">Calling…</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__unsupported_operator_error">Unable to send this number an SMS message.</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__email_request_edit_hint">Email address</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__create_account">Create account</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__send_confirmation_code">Send confirmation code</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__continue">Continue</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__sending">Sending…</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__done">Done</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__email_request_title">Enter email address</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__try_again_email">Please check your email and try again</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__invalid_email">Invalid Email. Try Again</string>
    <!--suppress MissingTranslation -->
    <string name="dgts__confirmationEditTextPlaceholder">------</string>
</resources>


text:
(function(define) {
    define([ "./when" ], function(when) {
        return function(deferred, canceler) {
            var delegate = when.defer();
            deferred.cancel = function() {
                return delegate.reject(canceler(deferred));
            };
            deferred.promise.then(delegate.resolve, delegate.reject, delegate.notify);
            deferred.promise = delegate.promise;
            deferred.then = delegate.promise.then;
            return deferred;
        };
    });
})("function" == typeof define ? define : function(deps, factory) {
    "undefined" != typeof module ? module.exports = factory(require("./when")) : this.when_cancelable = factory(this.when);
});


text:
package mempool

import (
	"github.com/go-kit/kit/metrics"
)

const (
	// MetricsSubsystem is a subsystem shared by all metrics exposed by this
	// package.
	MetricsSubsystem = "mempool"
)

//go:generate go run ../scripts/metricsgen -struct=Metrics

// Metrics contains metrics exposed by this package.
// see MetricsProvider for descriptions.
type Metrics struct {
	// Number of uncommitted transactions in the mempool.
	Size metrics.Gauge

	// Histogram of transaction sizes in bytes.
	TxSizeBytes metrics.Histogram `metrics_buckettype:"exp" metrics_bucketsizes:"1,3,7"`

	// Number of failed transactions.
	FailedTxs metrics.Counter

	// RejectedTxs defines the number of rejected transactions. These are
	// transactions that passed CheckTx but failed to make it into the mempool
	// due to resource limits, e.g. mempool is full and no lower priority
	// transactions exist in the mempool.
	//metrics:Number of rejected transactions.
	RejectedTxs metrics.Counter

	// EvictedTxs defines the number of evicted transactions. These are valid
	// transactions that passed CheckTx and existed in the mempool but were later
	// evicted to make room for higher priority valid transactions that passed
	// CheckTx.
	//metrics:Number of evicted transactions.
	EvictedTxs metrics.Counter

	// Number of times transactions are rechecked in the mempool.
	RecheckTimes metrics.Counter
}


text:
using UnityEngine;

public class AnimationManager : MonoBehaviour {
    Animation anim;
    void Start() {
        anim = GetComponent<Animation>();
        foreach (AnimationState state in anim) {
            state.time = Random.Range(0, state.length);
        }
    }

    // Update is called once per frame
    void Update () {

	}
}