text:
"""Functions that alter the matplotlib rc dictionary on the fly."""
from distutils.version import LooseVersion
import functools

import numpy as np
import matplotlib as mpl

from . import palettes, _orig_rc_params

mpl_ge_150 = LooseVersion(mpl.__version__) >= '1.5.0'

__all__ = ["set", "reset_defaults", "reset_orig",
           "axes_style", "set_style", "plotting_context", "set_context",
           "set_palette"]

_style_keys = (

    "axes.facecolor",
    "axes.edgecolor",
    "axes.grid",
    "axes.axisbelow",
    "axes.linewidth",
    "axes.labelcolor",

    "figure.facecolor",

    "grid.color",
    "grid.linestyle",

    "text.color",

    "xtick.color",
    "ytick.color",
    "xtick.direction",
    "ytick.direction",
    "xtick.major.size",
    "ytick.major.size",
    "xtick.minor.size",
    "ytick.minor.size",

    "legend.frameon",
    "legend.numpoints",
    "legend.scatterpoints",

    "lines.solid_capstyle",

    "image.cmap",
    "font.family",
    "font.sans-serif",
    )

_context_keys = (
    "figure.figsize",

    "font.size",
    "axes.labelsize",
    "axes.titlesize",
    "xtick.labelsize",
    "ytick.labelsize",
    "legend.fontsize",

    "grid.linewidth",
    "lines.linewidth",
    "patch.linewidth",
    "lines.markersize",
    "lines.markeredgewidth",

    "xtick.major.width",
    "ytick.major.width",
    "xtick.minor.width",
    "ytick.minor.width",

    "xtick.major.pad",
    "ytick.major.pad"
    )

def set(context="notebook", style="darkgrid", palette="deep",
        font="sans-serif", font_scale=1, color_codes=False, rc=None):
    """Set aesthetic parameters in one step.

    Each set of parameters can be set directly or temporarily, see the
    referenced functions below for more information.

    Parameters
    ----------
    context : string or dict
        Plotting context parameters, see :func:`plotting_context`
    style : string or dict
        Axes style parameters, see :func:`axes_style`
    palette : string or sequence
        Color palette, see :func:`color_palette`
    font : string
        Font family, see matplotlib font manager.
    font_scale : float, optional
        Separate scaling factor to independently scale the size of the
        font elements.
    color_codes : bool
        If ``True`` and ``palette`` is a seaborn palette, remap the shorthand
        color codes (e.g. "b", "g", "r", etc.) to the colors from this palette.
    rc : dict or None
        Dictionary of rc parameter mappings to override the above.

    """
    set_context(context, font_scale)
    set_style(style, rc={"font.family": font})
    set_palette(palette, color_codes=color_codes)
    if rc is not None:
        mpl.rcParams.update(rc)

def reset_defaults():
    """Restore all RC params to default settings."""
    mpl.rcParams.update(mpl.rcParamsDefault)

def reset_orig():
    """Restore all RC params to original settings (respects custom rc)."""
    mpl.rcParams.update(_orig_rc_params)

def axes_style(style=None, rc=None):
    """Return a parameter dict for the aesthetic style of the plots.

    This affects things like the color of the axes, whether a grid is
    enabled by default, and other aesthetic elements.

    This function returns an object that can be used in a ``with`` statement
    to temporarily change the style parameters.

    Parameters
    ----------
    style : dict, None, or one of {darkgrid, whitegrid, dark, white, ticks}
        A dictionary of parameters or the name of a preconfigured set.
    rc : dict, optional
        Parameter mappings to override the values in the preset seaborn
        style dictionaries. This only updates parameters that are
        considered part of the style definition.

    Examples
    --------
    >>> st = axes_style("whitegrid")

    >>> set_style("ticks", {"xtick.major.size": 8, "ytick.major.size": 8})

    >>> import matplotlib.pyplot as plt
    >>> with axes_style("white"):
    ...     f, ax = plt.subplots()
    ...     ax.plot(x, y)               # doctest: +SKIP

    See Also
    --------
    set_style : set the matplotlib parameters for a seaborn theme
    plotting_context : return a parameter dict to to scale plot elements
    color_palette : define the color palette for a plot

    """
    if style is None:
        style_dict = {k: mpl.rcParams[k] for k in _style_keys}

    elif isinstance(style, dict):
        style_dict = style

    else:
        styles = ["white", "dark", "whitegrid", "darkgrid", "ticks"]
        if style not in styles:
            raise ValueError("style must be one of %s" % ", ".join(styles))

        # Define colors here
        dark_gray = ".15"
        light_gray = ".8"

        # Common parameters
        style_dict = {
            "figure.facecolor": "white",
            "text.color": dark_gray,
            "axes.labelcolor": dark_gray,
            "legend.frameon": False,
            "legend.numpoints": 1,
            "legend.scatterpoints": 1,
            "xtick.direction": "out",
            "ytick.direction": "out",
            "xtick.color": dark_gray,
            "ytick.color": dark_gray,
            "axes.axisbelow": True,
            "image.cmap": "Greys",
            "font.family": ["sans-serif"],
            "font.sans-serif": ["Arial", "Liberation Sans",
                                "Bitstream Vera Sans", "sans-serif"],
            "grid.linestyle": "-",
            "lines.solid_capstyle": "round",
            }

        # Set grid on or off
        if "grid" in style:
            style_dict.update({
                "axes.grid": True,
                })
        else:
            style_dict.update({
                "axes.grid": False,
                })

        # Set the color of the background, spines, and grids
        if style.startswith("dark"):
            style_dict.update({
                "axes.facecolor": "#EAEAF2",
                "axes.edgecolor": "white",
                "axes.linewidth": 0,
                "grid.color": "white",
                })

        elif style == "whitegrid":
            style_dict.update({
                "axes.facecolor": "white",
                "axes.edgecolor": light_gray,
                "axes.linewidth": 1,
                "grid.color": light_gray,
                })

        elif style in ["white", "ticks"]:
            style_dict.update({
                "axes.facecolor": "white",
                "axes.edgecolor": dark_gray,
                "axes.linewidth": 1.25,
                "grid.color": light_gray,
                })

        # Show or hide the axes ticks
        if style == "ticks":
            style_dict.update({
                "xtick.major.size": 6,
                "ytick.major.size": 6,
                "xtick.minor.size": 3,
                "ytick.minor.size": 3,
                })
        else:
            style_dict.update({
                "xtick.major.size": 0,
                "ytick.major.size": 0,
                "xtick.minor.size": 0,
                "ytick.minor.size": 0,
                })

    # Override these settings with the provided rc dictionary
    if rc is not None:
        rc = {k: v for k, v in rc.items() if k in _style_keys}
        style_dict.update(rc)

    # Wrap in an _AxesStyle object so this can be used in a with statement
    style_object = _AxesStyle(style_dict)

    return style_object

def set_style(style=None, rc=None):
    """Set the aesthetic style of the plots.

    This affects things like the color of the axes, whether a grid is
    enabled by default, and other aesthetic elements.

    Parameters
    ----------
    style : dict, None, or one of {darkgrid, whitegrid, dark, white, ticks}
        A dictionary of parameters or the name of a preconfigured set.
    rc : dict, optional
        Parameter mappings to override the values in the preset seaborn
        style dictionaries. This only updates parameters that are
        considered part of the style definition.

    Examples
    --------
    >>> set_style("whitegrid")

    >>> set_style("ticks", {"xtick.major.size": 8, "ytick.major.size": 8})

    See Also
    --------
    axes_style : return a dict of parameters or use in a ``with`` statement
                 to temporarily set the style.
    set_context : set parameters to scale plot elements
    set_palette : set the default color palette for figures

    """
    style_object = axes_style(style, rc)
    mpl.rcParams.update(style_object)

def plotting_context(context=None, font_scale=1, rc=None):
    """Return a parameter dict to scale elements of the figure.

    This affects things like the size of the labels, lines, and other
    elements of the plot, but not the overall style. The base context
    is "notebook", and the other contexts are "paper", "talk", and "poster",
    which are version of the notebook parameters scaled by .8, 1.3, and 1.6,
    respectively.

    This function returns an object that can be used in a ``with`` statement
    to temporarily change the context parameters.

    Parameters
    ----------
    context : dict, None, or one of {paper, notebook, talk, poster}
        A dictionary of parameters or the name of a preconfigured set.
    font_scale : float, optional
        Separate scaling factor to independently scale the size of the
        font elements.
    rc : dict, optional
        Parameter mappings to override the values in the preset seaborn
        context dictionaries. This only updates parameters that are
        considered part of the context definition.

    Examples
    --------
    >>> c = plotting_context("poster")

    >>> c = plotting_context("notebook", font_scale=1.5)

    >>> c = plotting_context("talk", rc={"lines.linewidth": 2})

    >>> import matplotlib.pyplot as plt
    >>> with plotting_context("paper"):
    ...     f, ax = plt.subplots()
    ...     ax.plot(x, y)                 # doctest: +SKIP

    See Also
    --------
    set_context : set the matplotlib parameters to scale plot elements
    axes_style : return a dict of parameters defining a figure style
    color_palette : define the color palette for a plot

    """
    if context is None:
        context_dict = {k: mpl.rcParams[k] for k in _context_keys}

    elif isinstance(context, dict):
        context_dict = context

    else:

        contexts = ["paper", "notebook", "talk", "poster"]
        if context not in contexts:
            raise ValueError("context must be in %s" % ", ".join(contexts))

        # Set up dictionary of default parameters
        base_context = {

            "figure.figsize": np.array([8, 5.5]),
            "font.size": 12,
            "axes.labelsize": 11,
            "axes.titlesize": 12,
            "xtick.labelsize": 10,
            "ytick.labelsize": 10,
            "legend.fontsize": 10,

            "grid.linewidth": 1,
            "lines.linewidth": 1.75,
            "patch.linewidth": .3,
            "lines.markersize": 7,
            "lines.markeredgewidth": 0,

            "xtick.major.width": 1,
            "ytick.major.width": 1,
            "xtick.minor.width": .5,
            "ytick.minor.width": .5,

            "xtick.major.pad": 7,
            "ytick.major.pad": 7,
            }

        # Scale all the parameters by the same factor depending on the context
        scaling = dict(paper=.8, notebook=1, talk=1.3, poster=1.6)[context]
        context_dict = {k: v * scaling for k, v in base_context.items()}

        # Now independently scale the fonts
        font_keys = ["axes.labelsize", "axes.titlesize", "legend.fontsize",
                     "xtick.labelsize", "ytick.labelsize", "font.size"]
        font_dict = {k: context_dict[k] * font_scale for k in font_keys}
        context_dict.update(font_dict)

    # Implement hack workaround for matplotlib bug
    # See https://github.com/mwaskom/seaborn/issues/344
    # There is a bug in matplotlib 1.4.2 that makes points invisible when
    # they don't have an edgewidth. It will supposedly be fixed in 1.4.3.
    if mpl.__version__ == "1.4.2":
        context_dict["lines.markeredgewidth"] = 0.01

    # Override these settings with the provided rc dictionary
    if rc is not None:
        rc = {k: v for k, v in rc.items() if k in _context_keys}
        context_dict.update(rc)

    # Wrap in a _PlottingContext object so this can be used in a with statement
    context_object = _PlottingContext(context_dict)

    return context_object

def set_context(context=None, font_scale=1, rc=None):
    """Set the plotting context parameters.

    This affects things like the size of the labels, lines, and other
    elements of the plot, but not the overall style. The base context
    is "notebook", and the other contexts are "paper", "talk", and "poster",
    which are version of the notebook parameters scaled by .8, 1.3, and 1.6,
    respectively.

    Parameters
    ----------
    context : dict, None, or one of {paper, notebook, talk, poster}
        A dictionary of parameters or the name of a preconfigured set.
    font_scale : float, optional
        Separate scaling factor to independently scale the size of the
        font elements.
    rc : dict, optional
        Parameter mappings to override the values in the preset seaborn
        context dictionaries. This only updates parameters that are
        considered part of the context definition.

    Examples
    --------
    >>> set_context("paper")

    >>> set_context("talk", font_scale=1.4)

    >>> set_context("talk", rc={"lines.linewidth": 2})

    See Also
    --------
    plotting_context : return a dictionary of rc parameters, or use in
                       a ``with`` statement to temporarily set the context.
    set_style : set the default parameters for figure style
    set_palette : set the default color palette for figures

    """
    context_object = plotting_context(context, font_scale, rc)
    mpl.rcParams.update(context_object)

class _RCAesthetics(dict):
    def __enter__(self):
        rc = mpl.rcParams
        self._orig = {k: rc[k] for k in self._keys}
        self._set(self)

    def __exit__(self, exc_type, exc_value, exc_tb):
        self._set(self._orig)

    def __call__(self, func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            with self:
                return func(*args, **kwargs)
        return wrapper

class _AxesStyle(_RCAesthetics):
    """Light wrapper on a dict to set style temporarily."""
    _keys = _style_keys
    _set = staticmethod(set_style)

class _PlottingContext(_RCAesthetics):
    """Light wrapper on a dict to set context temporarily."""
    _keys = _context_keys
    _set = staticmethod(set_context)

def set_palette(palette, n_colors=None, desat=None, color_codes=False):
    """Set the matplotlib color cycle using a seaborn palette.

    Parameters
    ----------
    palette : hls | husl | matplotlib colormap | seaborn color palette
        Palette definition. Should be something that :func:`color_palette`
        can process.
    n_colors : int
        Number of colors in the cycle. The default number of colors will depend
        on the format of ``palette``, see the :func:`color_palette`
        documentation for more information.
    desat : float
        Proportion to desaturate each color by.
    color_codes : bool
        If ``True`` and ``palette`` is a seaborn palette, remap the shorthand
        color codes (e.g. "b", "g", "r", etc.) to the colors from this palette.

    Examples
    --------
    >>> set_palette("Reds")

    >>> set_palette("Set1", 8, .75)

    See Also
    --------
    color_palette : build a color palette or set the color cycle temporarily
                    in a ``with`` statement.
    set_context : set parameters to scale plot elements
    set_style : set the default parameters for figure style

    """
    colors = palettes.color_palette(palette, n_colors, desat)
    if mpl_ge_150:
        from cycler import cycler
        cyl = cycler('color', colors)
        mpl.rcParams['axes.prop_cycle'] = cyl
    else:
        mpl.rcParams["axes.color_cycle"] = list(colors)
    mpl.rcParams["patch.facecolor"] = colors[0]
    if color_codes:
        palettes.set_color_codes(palette)


text:
class Sample
  include Nanite::Actor

  expose :echo

  # Print to STDOUT and return
  def echo( payload )
    p payload
    payload
  end
end

redpajama_set_name: RedPajamaGithub


text:
package org.jetbrains.plugins.github.ui;

import com.intellij.openapi.project.ProjectManager;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.components.JBCheckBox;
import gnu.trove.Equality;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.github.util.GithubAuthData;
import org.jetbrains.plugins.github.util.GithubSettings;

import javax.swing.*;

public class GithubSettingsPanel {
  private final GithubSettings mySettings;

  private JPanel myPane;
  private JSpinner myTimeoutSpinner;
  private JBCheckBox myCloneUsingSshCheckBox;
  private GithubCredentialsPanel myCredentialsPanel;

  public GithubSettingsPanel() {
    mySettings = GithubSettings.getInstance();

    reset();
  }

  public JComponent getPanel() {
    return myPane;
  }

  @NotNull
  public GithubAuthData getAuthData() {
    GithubAuthData authData = myCredentialsPanel.getAuthData();
    if (authData.getBasicAuth() != null && StringUtil.isEmptyOrSpaces(authData.getBasicAuth().getLogin()) ||
        authData.getTokenAuth() != null && StringUtil.isEmptyOrSpaces(authData.getTokenAuth().getToken())) {
      return GithubAuthData.createAnonymous(myCredentialsPanel.getHost());
    }

    return authData;
  }

  public void setConnectionTimeout(int timeout) {
    myTimeoutSpinner.setValue(Integer.valueOf(timeout));
  }

  public int getConnectionTimeout() {
    return ((SpinnerNumberModel)myTimeoutSpinner.getModel()).getNumber().intValue();
  }

  public void reset() {
    myCredentialsPanel.setAuthData(mySettings.getAuthData());

    setConnectionTimeout(mySettings.getConnectionTimeout());
    myCloneUsingSshCheckBox.setSelected(mySettings.isCloneGitUsingSsh());
  }

  public void apply() {
    if (!equal(mySettings.getAuthData(), getAuthData())) {
      mySettings.setAuthData(getAuthData(), true);
    }
    mySettings.setConnectionTimeout(getConnectionTimeout());
    mySettings.setCloneGitUsingSsh(myCloneUsingSshCheckBox.isSelected());
  }

  public boolean isModified() {
    return !equal(mySettings.getAuthData(), getAuthData()) ||
           !Comparing.equal(mySettings.getConnectionTimeout(), getConnectionTimeout()) ||
           !Comparing.equal(mySettings.isCloneGitUsingSsh(), myCloneUsingSshCheckBox.isSelected());
  }

  private void createUIComponents() {
    myCredentialsPanel = new GithubCredentialsPanel(ProjectManager.getInstance().getDefaultProject());
    myTimeoutSpinner = new JSpinner(new SpinnerNumberModel(5000, 0, 60000, 500));
  }

  private static boolean equal(@NotNull GithubAuthData data1, @NotNull GithubAuthData data2) {
    return Comparing.equal(data1.getHost(), data2.getHost()) &&
           Comparing.equal(data1.getAuthType(), data2.getAuthType()) &&
           equal(data1.getBasicAuth(), data2.getBasicAuth(),
                 (auth1, auth2) -> Comparing.equal(auth1.getLogin(), auth2.getLogin()) &&
                                   Comparing.equal(auth1.getPassword(), auth2.getPassword())) &&
           equal(data1.getTokenAuth(), data2.getTokenAuth(),
                 (auth1, auth2) -> Comparing.equal(auth1.getToken(), auth2.getToken()));
  }

  private static <T> boolean equal(@Nullable T o1, @Nullable T o2, @NotNull Equality<T> notNullEquality) {
    if (o1 == o2) return true;
    if (o1 == null) return false;
    if (o2 == null) return false;
    return notNullEquality.equals(o1, o2);
  }
}


text:
export WGET="wget"
cd test/data/
${WGET} https://dl.dropboxusercontent.com/u/14421778/IkaLog/test/scoreboard_ja_nawabari_won.png
${WGET} https://dl.dropboxusercontent.com/u/14421778/IkaLog/test/scoreboard_ja_nawabari_lost.png


text:
package org.pengyou.client.lib.util;

import org.w3c.dom.Node;

/**
 * A QName represents a fully-qualified name.
 */
public class QName
{
	private String namespaceURI;
	private String localName;
	private int hashCode;

	public QName(String namespaceURI, String localName)
	{
		this.namespaceURI = (namespaceURI == null ? "" : namespaceURI).intern();
		this.localName = localName.intern();

		String hash1 = this.namespaceURI.hashCode() + "";
		String hash2 = this.localName.hashCode() + "";
		String hash3 = hash1 + '_' + hash2;
		this.hashCode=hash3.hashCode();
	}

	public String getNamespaceURI()
	{
		return this.namespaceURI;
	}

	public String getLocalName()
	{
		return this.localName;
	}

	public int hashCode()
	{
		return this.hashCode;
	}

	public boolean equals(Object obj)
	{
		return (obj != null
			&& (obj instanceof QName)
	        && namespaceURI == ((QName)obj).getNamespaceURI()
	        && localName == ((QName)obj).getLocalName());
	}

	public boolean matches(Node node)
	{
		return (node!=null)
					&& (node.getNamespaceURI()!=null)
					&& (node.getLocalName()!=null)
					&& (node.getNamespaceURI().intern()==this.namespaceURI)
					&& (node.getLocalName().intern()==this.localName);
	}

	public String toString()
	{
		return namespaceURI + ':' + localName;
	}
}


text:
'use strict';

//Setting up route
angular.module('mean.system').config(['$stateProvider', '$urlRouterProvider', '$translateProvider',
        function($stateProvider, $urlRouterProvider, $translateProvider) {
            // For unmatched routes:
            $urlRouterProvider.otherwise('/');

            // states for my app
            $stateProvider
                .state('home', {
                    url: '/',
                    templateUrl: 'public/system/views/index.html'
                })
                .state('auth', {
                    templateUrl: 'public/auth/views/index.html'
                })
                .state('search', {
                    url: '/search/{searchQuery}',
                    templateUrl: 'public/search/views/index.html'
                });
              $translateProvider.translations('en', {
    HEADLINE: 'Hello there, This is my awesome app!',
    INTRO_TEXT: 'And it has i18n support!'
              });
        }
    ])
    .config(['$locationProvider',
        function($locationProvider) {
            $locationProvider.hashPrefix('!');
        }
    ]);


text:
package org.eclipse.php.internal.ui.editor.highlighters;

import java.util.Collection;

import org.eclipse.dltk.core.*;
import org.eclipse.php.internal.core.Logger;
import org.eclipse.php.internal.core.ast.nodes.*;
import org.eclipse.php.internal.core.typeinference.IModelAccessCache;
import org.eclipse.php.internal.ui.editor.highlighter.AbstractSemanticApply;
import org.eclipse.php.internal.ui.editor.highlighter.AbstractSemanticHighlighting;
import org.eclipse.php.internal.ui.editor.highlighter.ModelUtils;

public class DeprecatedHighlighting extends AbstractSemanticHighlighting {

	protected class DeprecatedApply extends AbstractSemanticApply {

		@Override
		public boolean visit(Program program) {
			try {
				IModelElement[] children = getSourceModule().getChildren();
				for (IModelElement child : children) {
					if (ModelUtils.isDeprecated(child)) {
						highlight(((IMember) child).getNameRange());
					}

					IModelElement[] children1 = ((IParent) child).getChildren();
					for (IModelElement child1 : children1) {
						if (ModelUtils.isDeprecated(child1)) {
							highlight(((IMember) child1).getNameRange());
						}
					}
				}
			} catch (ModelException e) {
				Logger.logException(e);
			}
			return true;
		}

		@Override
		public boolean visit(ClassName classConst) {
			if (classConst.getName() instanceof Identifier) {
				String className = ((Identifier) classConst.getName())
						.getName();
				IModelAccessCache cache = classConst.getAST()
						.getBindingResolver().getModelAccessCache();
				if (cache != null) {
					Collection<IType> types = cache.getTypes(getSourceModule(),
							className, null, null);
					if (types != null) {
						for (IType type : types) {
							if (ModelUtils.isDeprecated(type)) {
								highlight(classConst);
								break;
							}
						}
					}
				}
			}
			return true;
		}

		public boolean visit(FieldAccess fieldAccess) {
			IField field = ModelUtils.getField(fieldAccess);
			if (field != null && ModelUtils.isDeprecated(field)) {
				highlight(fieldAccess.getMember());
			}
			return true;
		}

		public boolean visit(MethodInvocation methodInv) {
			IMethod method = ModelUtils.getMethod(methodInv);
			if (method != null && ModelUtils.isDeprecated(method)) {
				highlight(methodInv.getMethod().getFunctionName());
			}
			return true;
		}

		public boolean visit(FunctionInvocation funcInv) {
			if ((funcInv.getParent() instanceof StaticMethodInvocation)) {
				StaticMethodInvocation methodInvocation = (StaticMethodInvocation) funcInv
						.getParent();
				IMethod method = ModelUtils.getMethod(methodInvocation);
				if (method != null && ModelUtils.isDeprecated(method)) {
					highlight(methodInvocation.getMethod().getFunctionName());
				}
			} else if (!(funcInv.getParent() instanceof MethodInvocation)) {
				IModelAccessCache cache = funcInv.getAST().getBindingResolver()
						.getModelAccessCache();
				if (cache != null) {
					String functionName = ModelUtils.getFunctionName(funcInv
							.getFunctionName());
					// functionName will be null if the function call looks like
					// ${func}(&$this),the ${func} is type of ReflectionVariable
					if (functionName != null) {
						Collection<IMethod> functions = cache
								.getGlobalFunctions(getSourceModule(),
										functionName, null);
						if (functions != null) {
							for (IMethod function : functions) {
								if (ModelUtils.isDeprecated(function)) {
									highlight(funcInv.getFunctionName());
									break;
								}
							}
						}
					}
				}
			}
			return true;
		}
	}

	@Override
	public AbstractSemanticApply getSemanticApply() {
		return new DeprecatedApply();
	}

	@Override
	public void initDefaultPreferences() {
		getStyle().setStrikethroughByDefault(true).setEnabledByDefault(false);
	}

	@Override
	public int getPriority() {
		return 120;
	}

	public String getDisplayName() {
		return Messages.DeprecatedHighlighting_0;
	}
}


text:
package org.apache.jmeter.protocol.jms.client;

import java.io.Closeable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.apache.jorphan.util.JOrphanUtils;

/**
 *
 * ClientPool holds the client instances in an ArrayList. The main purpose of
 * this is to make it easier to clean up all the instances at the end of a test.
 * If we didn't do this, threads might become zombie.
 *
 * N.B. This class is thread safe as it is called from sample threads
 * and the thread that runs testEnded() methods.
 */
public class ClientPool {

    private static final List<Closeable> CLIENTS = Collections.synchronizedList(new ArrayList<>());

    private ClientPool() {
        super();
    }

    /**
     * Add a ReceiveClient to the ClientPool. This is so that we can make sure
     * to close all clients and make sure all threads are destroyed.
     *
     * @param client the ReceiveClient to add
     */
    public static void addClient(Closeable client) {
        CLIENTS.add(client);
    }

    /**
     * Remove publisher from clients
     * @param publisher {@link Publisher}
     */
    public static void removeClient(Publisher publisher) {
        CLIENTS.remove(publisher);
    }

    /**
     * Clear all the clients created by either Publish or Subscribe sampler. We
     * need to do this to make sure all the threads created during the test are
     * destroyed and cleaned up. In some cases, the client provided by the
     * manufacturer of the JMS server may have bugs and some threads may become
     * zombie. In those cases, it is not JMeter's responsibility.
     */
    public static void clearClient() {
        synchronized (CLIENTS) {
            CLIENTS.forEach(JOrphanUtils::closeQuietly);
        }
        CLIENTS.clear();
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
	<File path="Categories/UIColor+ICSRGB.html">

		<Token>
			<TokenIdentifier>//apple_ref/occ/cat/UIColor(ICSRGB)</TokenIdentifier>
			<Abstract type="html">The ICSRGB category adds easy UIColor instance creation
given RGB and RGBA values.</Abstract>
			<DeclaredIn>UIColor+ICSRGB.h</DeclaredIn>

			<NodeRef refid="3"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/UIColor/ics_colorWithRGBValues:</TokenIdentifier>
			<Abstract type="html">Returns a color created with the given RGB components. The alpha
component of the new color is set to 1.0.</Abstract>
			<DeclaredIn>UIColor+ICSRGB.h</DeclaredIn>

			<Declaration>+ (UIColor *)ics_colorWithRGBValues:(ICSRGB)rgbValues</Declaration>
			<Parameters>
				<Parameter>
					<Name>rgbValues</Name>
					<Abstract type="html">The RGB components of the new color.</Abstract>
				</Parameter>
			</Parameters>
			<ReturnValue><Abstract type="html">A color created with the given RGB components.</Abstract></ReturnValue>
			<Anchor>//api/name/ics_colorWithRGBValues:</Anchor>
            <NodeRef refid="3"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/UIColor/ics_colorWithRGBValues:alpha:</TokenIdentifier>
			<Abstract type="html">Returns a color created with the given RGB and alpha components.</Abstract>
			<DeclaredIn>UIColor+ICSRGB.h</DeclaredIn>

			<Declaration>+ (UIColor *)ics_colorWithRGBValues:(ICSRGB)rgbValues alpha:(CGFloat)alpha</Declaration>
			<Parameters>
				<Parameter>
					<Name>rgbValues</Name>
					<Abstract type="html">The RGB components of the new color.</Abstract>
				</Parameter><Parameter>
					<Name>alpha</Name>
					<Abstract type="html">The alpha component of the new color.</Abstract>
				</Parameter>
			</Parameters>
			<ReturnValue><Abstract type="html">A color created with the given RGB and alpha components.</Abstract></ReturnValue>
			<Anchor>//api/name/ics_colorWithRGBValues:alpha:</Anchor>
            <NodeRef refid="3"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/UIColor/ics_colorWithRGBAValues:</TokenIdentifier>
			<Abstract type="html">Returns a color created with the given RGBA components. This
is equivalent to calling ics_colorWithRGBValues:alpha: and passing
rgbaValues.a as alpha parameter.</Abstract>
			<DeclaredIn>UIColor+ICSRGB.h</DeclaredIn>

	<RelatedTokens>
		<TokenIdentifier>//apple_ref/occ/instm/UIColor/ics_colorWithRGBValues:alpha:</TokenIdentifier>

	</RelatedTokens>

			<Declaration>+ (UIColor *)ics_colorWithRGBAValues:(ICSRGBA)rgbaValues</Declaration>
			<Parameters>
				<Parameter>
					<Name>rgbaValues</Name>
					<Abstract type="html">The RGBA components of the new color.</Abstract>
				</Parameter>
			</Parameters>
			<ReturnValue><Abstract type="html">A color created with the given RGBA components.</Abstract></ReturnValue>
			<Anchor>//api/name/ics_colorWithRGBAValues:</Anchor>
            <NodeRef refid="3"/>
		</Token>

	</File>
</Tokens>


text:
* Fix flor_pointers var deletion mechanism (type = ' var ')

## flor 1.3.0  released 2021-04-13

* Insert a row flor_pointers for 'failure'

## flor 1.2.2  released 2021-03-29

* Include data in flor_pointers
* Ensure flor_pointers name is a string

## flor 1.2.1  released 2021-03-22

* If conf sto_db_logger is false, do not attach a logger to the db connection

## flor 1.2.0  released 2021-03-15

* Add #attd, #attl, #att_texts to Flor::Pointer

## flor 1.1.1  released 2021-03-03

* Use YAML to have more compact msg_to_detail_s

## flor 1.1.0  released 2021-01-06

* Introduce Tasker #set_payload and #set_vars
* Introduce the ModuleGanger
* Allow for domain/dot.json taskers
* Introduce Flor::StagedBasicTasker
* Fix service/executor issue in Caller

## flor 1.0.1  released 2020-11-23

* Accept sto_uri strings pointing to constant like 'DB'

## flor 1.0.0  released 2020-11-22

* Lots of incremental improvements

## flor 0.18.0  released 2019-05-05

* Refine BasicTasker#reply (more arg patterns)
* Fix "signal" vs exid: and payload:
* Make payload optional when cancelling
* Unlock `signal exid: other_execution_id "xxx"`
* Allow for `trap 'signal0' payload: { a: 'A' }`
* Allow for "on" in blocking mode (no block given)
* Turn "sequence" single string att results to tags
* gh-26, refine cancel / on_cancel and payload return
* Allow for custom :schema_info migration table
* Introduce a dedicated #refresh for all flor models
* Let scheduler sleep only 0.001s if @idle_count less than 1
* Implement Scheduler #dump and #load
* Default target #cancel and #kill to node '0'
* Expose taskname to tasker on detasking (@Subtletree)
* Refine BasicTasker#reply (more arg patterns)
* Allow for `trap 'signal0' payload: { a: 'A' }`
* Allow for "on" in blocking mode (no block given)
* Unlock `signal exid: other_execution_id "xxx"`
* Make payload optional when cancelling (default to payload as it was
  upon reaching the cancelled node)

## flor 0.17.0  released 2019-04-08

- Switch to 0.17.x

## flor 0.16.2  released 2019-04-08

- Many improvements
- Allow for `[ 'he' 'll' 'o' ] | + join: '.'` (yields "he.ll.o")
- Allow for `[ 1 2 3 ] | + _` (yields `6`)
- Make "child_on_error:"/"children_on_error:" a common attribute
- Ensure "on_cancel" sets only one handler

## flor 0.16.1  released 2019-02-05

- Depend on Sequel 5 (Sequel 4 and 5 seem OK)

## flor 0.16.0  released 2019-02-04

- Many many improvements
- Include "undense" work ("_ref" and friends)
- Include "undense" work (killing the dollar subsystem)
- Fix dereserving delayed messages
- allow for cancel behaviour when "cursor", "sequence", and "until"
  node_status flavour is "on-error"

## flor 0.15.0  released 2018-06-15

- Many many improvements
- Implement "cron" (macro for "schedule cron:")
- Introduce Flor.point?(s)
- Archive terminated, failed and ceased messages (Tsunehisa Doi)
- Let "case" match regular expressions

## flor 0.14.0  released 2017-06-13

- Implement "match"
- Implement "range"
- Implement "for-each"
- Merge enhancements by @jfrioux

## flor 0.13.0  released 2017-04-24

- Simplify "trace" implementation
- Simplify "task" implementation

## flor 0.12.0  released 2017-04-14

- Implementation of 'flank' and application to "trap" and "schedule"
- Introduce `{ a : 0 } quote: 'keys'`
- Introduce `vars: copy` or `vars: '*'`

## flor 0.11.0  released 2017-03-17

- Simplification of the tasker configuration files
  (alignment on hooks configuration files)
- Introduction of lib/hooks/
- go for ; and | (same level) and \ (child level)
- Implement "twig"
- Implement basic spooler (var/spool/)
- Introduce runner service
- Fix Storage#any_message (misuse of Sequel Dataset#count)

## flor 0.10.0  released 2017-03-03

- Enhance shell, bring in bin/flosh (though not in gem)
- Rework "deep" tools (accept square bracket indexes)
- Implement vanilla "case"
- Implement "graft"
- Link unit name and unit identifier
- Scheduler rework, emphasis on optimistic locking for messages and timers

## flor 0.9.5  released 2017-02-10

- Don't load exids for which there are "loaded" messages
- Use Flor.tstamp for flor_messages :mtime

## flor 0.9.4  released 2017-02-09

- Allow setting of flor_debug in ENV (FLOR_DEBUG) and in conf
- Revise Storage#load_exids (distinct/order by problem on MS-SQL)

## flor 0.9.3  released 2017-02-07

- Rename the head 'tasker' as 'ganger'
- Allow for (tasker, conf, message) ruby taskers

## flor 0.9.2  released 2017-02-03

- Allow for domain taskers (retasking)
- Pass flow path (if any) in launch message

## flor 0.9.1.1  released 2017-01-31

- Fix Gemfile.lock not updated...

## flor 0.9.1  released 2017-01-31

- Fix dropped exids problem

## flor 0.9.0  released 2017-01-30

- Initial release

## flor 0.0.1  released 2015-11-04

- Initial, empty, release (Juan's verandah)


text:
angular.module('cookbookApp', [])
  .controller('MainController', function($scope, $q) {
    $q.when($.ajax({url: 'users.json'})).then(function(users) {
      $scope.users = users;
    });
  });


text:
if defined?(JRUBY_VERSION) && defined?(JRuby)

  # @see https://github.com/jruby/jruby/issues/1196
  # @see https://github.com/metricfu/metric_fu/pull/226
  # @see https://github.com/colszowka/simplecov/issues/420
  # @see https://github.com/colszowka/simplecov/issues/86
  # @see https://jira.codehaus.org/browse/JRUBY-6106

  unless org.jruby.RubyInstanceConfig.FULL_TRACE_ENABLED
    warn 'Coverage may be inaccurate; set the "--debug" command line option,' \
      ' or do JRUBY_OPTS="--debug"' \
      ' or set the "debug.fullTrace=true" option in your .jrubyrc'
  end
end
module SimpleCov
  class << self
    attr_accessor :running
    attr_accessor :pid

    #
    # Sets up SimpleCov to run against your project.
    # You can optionally specify a profile to use as well as configuration with a block:
    #   SimpleCov.start
    #    OR
    #   SimpleCov.start 'rails' # using rails profile
    #    OR
    #   SimpleCov.start do
    #     add_filter 'test'
    #   end
    #     OR
    #   SimpleCov.start 'rails' do
    #     add_filter 'test'
    #   end
    #
    # Please check out the RDoc for SimpleCov::Configuration to find about available config options
    #
    def start(profile = nil, &block)
      if SimpleCov.usable?
        load_profile(profile) if profile
        configure(&block) if block_given?
        @result = nil
        self.running = true
        self.pid = Process.pid
        Coverage.start
      else
        warn "WARNING: SimpleCov is activated, but you're not running Ruby 1.9+ - no coverage analysis will happen"
        warn "Starting with SimpleCov 1.0.0, even no-op compatibility with Ruby <= 1.8 will be entirely dropped."
        false
      end
    end

    #
    # Finds files that were to be tracked but were not loaded and initializes
    # their coverage to zero.
    #
    def add_not_loaded_files(result)
      if tracked_files
        result = result.dup
        Dir[tracked_files].each do |file|
          absolute = File.expand_path(file)

          result[absolute] ||= [0] * File.foreach(absolute).count
        end
      end

      result
    end

    #
    # Returns the result for the current coverage run, merging it across test suites
    # from cache using SimpleCov::ResultMerger if use_merging is activated (default)
    #
    def result
      # Ensure the variable is defined to avoid ruby warnings
      @result = nil unless defined?(@result)

      # Collect our coverage result
      if running && !result?
        @result = SimpleCov::Result.new add_not_loaded_files(Coverage.result)
      end

      # If we're using merging of results, store the current result
      # first, then merge the results and return those
      if use_merging
        SimpleCov::ResultMerger.store_result(@result) if result?

        SimpleCov::ResultMerger.merged_result
      else
        @result
      end
    ensure
      self.running = false
    end

    #
    # Returns nil if the result has not been computed
    # Otherwise, returns the result
    #
    def result?
      defined?(@result) && @result
    end

    #
    # Applies the configured filters to the given array of SimpleCov::SourceFile items
    #
    def filtered(files)
      result = files.clone
      filters.each do |filter|
        result = result.reject { |source_file| filter.matches?(source_file) }
      end
      SimpleCov::FileList.new result
    end

    #
    # Applies the configured groups to the given array of SimpleCov::SourceFile items
    #
    def grouped(files)
      grouped = {}
      grouped_files = []
      groups.each do |name, filter|
        grouped[name] = SimpleCov::FileList.new(files.select { |source_file| filter.matches?(source_file) })
        grouped_files += grouped[name]
      end
      if !groups.empty? && !(other_files = files.reject { |source_file| grouped_files.include?(source_file) }).empty?
        grouped["Ungrouped"] = SimpleCov::FileList.new(other_files)
      end
      grouped
    end

    #
    # Applies the profile of given name on SimpleCov configuration
    #
    def load_profile(name)
      profiles.load(name)
    end

    def load_adapter(name)
      warn "#{Kernel.caller.first}: [DEPRECATION] #load_adapter is deprecated. Use #load_profile instead."
      load_profile(name)
    end

    #
    # Checks whether we're on a proper version of Ruby (likely 1.9+) which
    # provides coverage support
    #
    def usable?
      return @usable if defined?(@usable) && !@usable.nil?

      @usable = begin
        require "coverage"
        require "simplecov/jruby_fix"
        true
      rescue LoadError
        false
      end
    end
  end
end

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))
require "simplecov/configuration"
SimpleCov.send :extend, SimpleCov::Configuration
require "simplecov/exit_codes"
require "simplecov/profiles"
require "simplecov/source_file"
require "simplecov/file_list"
require "simplecov/result"
require "simplecov/filter"
require "simplecov/formatter"
require "simplecov/last_run"
require "simplecov/raw_coverage"
require "simplecov/result_merger"
require "simplecov/command_guesser"
require "simplecov/version"

# Load default config
require "simplecov/defaults" unless ENV["SIMPLECOV_NO_DEFAULTS"]

# Load Rails integration (only for Rails 3, see #113)
require "simplecov/railtie" if defined? Rails::Railtie


text:
using System;
using System.Collections.Specialized;
using System.Configuration;
using System.IO;
using System.Linq;

namespace NuGet.Lucene.Web
{
    public class NuGetWebApiSettings : INuGetWebApiSettings
    {
        public const string DefaultAppSettingPrefix = "NuGet.Lucene.Web:";
        public const string BlankAppSettingPrefix = "";

        public const string DefaultRoutePathPrefix = "api/";

        private readonly string prefix;
        private readonly NameValueCollection settings;
        private readonly NameValueCollection roleMappings;

        public NuGetWebApiSettings()
            : this(DefaultAppSettingPrefix)
        {
        }

        public NuGetWebApiSettings(string prefix)
            : this(prefix, ConfigurationManager.AppSettings, ConfigurationManager.GetSection("roleMappings") as NameValueCollection)
        {
        }

        public NuGetWebApiSettings(string prefix, NameValueCollection settings, NameValueCollection roleMappings)
        {
            this.prefix = prefix;
            this.settings = settings;
            this.roleMappings = roleMappings ?? new NameValueCollection();
        }

        public bool ShowExceptionDetails
        {
            get { return GetFlagFromAppSetting("showExceptionDetails", false); }
        }

        public bool EnableCrossDomainRequests
        {
            get { return GetFlagFromAppSetting("enableCrossDomainRequests", false); }
        }

        public bool HandleLocalRequestsAsAdmin
        {
            get { return GetFlagFromAppSetting("handleLocalRequestsAsAdmin", false); }
        }

        public string LocalAdministratorApiKey
        {
            get
            {
                return GetAppSetting("localAdministratorApiKey", string.Empty);
            }
        }

        public bool AllowAnonymousPackageChanges
        {
            get { return GetFlagFromAppSetting("allowAnonymousPackageChanges", false); }
        }

        public string RoutePathPrefix
        {
            get { return GetAppSetting("routePathPrefix", DefaultRoutePathPrefix); }
        }

        public string PackageMirrorTargetUrl
        {
            get { return GetAppSetting("packageMirrorTargetUrl", String.Empty); }
        }

        public bool AlwaysCheckMirror
        {
            get { return GetFlagFromAppSetting("alwaysCheckMirror", false); }
        }

        public TimeSpan PackageMirrorTimeout
        {
            get
            {
                var str = GetAppSetting("packageMirrorTimeout", "0:00:15");
                TimeSpan ts;
                return TimeSpan.TryParse(str, out ts) ? ts : TimeSpan.FromSeconds(15);
            }
        }

        public bool RoleMappingsEnabled
        {
            get
            {
                var mappings = RoleMappings;
                return mappings.AllKeys.Any(key => !String.IsNullOrWhiteSpace(mappings.Get(key)));
            }
        }

        public NameValueCollection RoleMappings
        {
            get
            {
                return roleMappings;
            }
        }

        public string SymbolsPath
        {
            get
            {
                return MapPathFromAppSetting("symbolsPath", "~/App_Data/Symbols");
            }
        }

        public string ToolsPath
        {
            get
            {
                return MapPathFromAppSetting("debuggingToolsPath", "");
            }
        }

        public bool DisablePackageHash
        {
            get
            {
                return GetFlagFromAppSetting("disablePackageHash", false);
            }
        }

        public bool IgnorePackageFiles
        {
            get
            {
                return GetFlagFromAppSetting("ignorePackageFiles", false);
            }
        }

        public bool SynchronizeOnStart
        {
            get
            {
                return GetFlagFromAppSetting("synchronizeOnStart", true);
            }
        }

        public bool EnablePackageFileWatcher
        {
            get
            {
                return GetFlagFromAppSetting("enablePackageFileWatcher", true);
            }
        }

        public bool GroupPackageFilesById
        {
            get
            {
                return GetFlagFromAppSetting("groupPackageFilesById", true);
            }
        }

        public string LucenePackagesIndexPath
        {
            get
            {
                return MapPathFromAppSetting("lucenePath", "~/App_Data/Lucene");
            }
        }

        public string PackagesPath
        {
            get
            {
                return MapPathFromAppSetting("packagesPath", "~/App_Data/Packages");
            }
        }

        public PackageOverwriteMode PackageOverwriteMode
        {
            get { return GetEnumFromAppSetting("packageOverwriteMode", PackageOverwriteMode.Allow); }
        }

        public string LuceneUsersIndexPath
        {
            get
            {
                return Path.Combine(LucenePackagesIndexPath, "Users");
            }
        }

        public int LuceneMergeFactor
        {
            get
            {
                int value;
                return int.TryParse(GetAppSetting("luceneMergeFactor", "0"), out value) ? value : 0;
            }
        }

        protected bool GetFlagFromAppSetting(string key, bool defaultValue)
        {
            var flag = GetAppSetting(key, String.Empty);

            bool result;
            return Boolean.TryParse(flag ?? String.Empty, out result) ? result : defaultValue;
        }

        protected virtual string MapPathFromAppSetting(string key, string defaultValue)
        {
            var path = GetAppSetting(key, defaultValue);

            if (path.StartsWith("~/"))
            {
                path = Path.Combine(Environment.CurrentDirectory, path.Replace("~/", ""));
            }

            return path.Replace('/', Path.DirectorySeparatorChar);
        }

        protected virtual T GetEnumFromAppSetting<T>(string appSetting, T defaultValue) where T : struct
        {
            T value;
            var parsed = Enum.TryParse(GetAppSetting(appSetting, defaultValue.ToString()), out value);
            return parsed ? value : defaultValue;
        }

        protected internal virtual string GetAppSetting(string key, string defaultValue)
        {
            var value = settings[GetAppSettingKey(key)];
            return String.IsNullOrWhiteSpace(value) ? defaultValue : value;
        }

        private string GetAppSettingKey(string key)
        {
            return prefix + key;
        }
    }
}


text:
.tip-wrap {
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
    overflow: visible;
}

.tip-wrap:after {
    position: absolute;
    z-index: 2;
    width: 0;
    height: 0;
    border: 6px solid #FFF;
    content: '';
    overflow: hidden;
}

.tip-content {
    display: inline-block;
    position: relative;
    z-index: 1;
    margin: 0;
    line-height: 150%;
    font-size: 12px;
    font-family: 'Microsoft YaHei', Georgia, Arial, sans-serif;
    padding: 4px 9px;
    background-color: #FFF;
    color: #8d8d8d;
    border-radius: 3px;
    box-shadow: 0 1px 13px #C1C2C9;
    white-space: nowrap;
    overflow: hidden;
}

/* Top */
.tip-top-right-wrap:after,
.tip-top-center-wrap:after,
.tip-top-left-wrap:after {
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
    bottom: -10px;
}

/* Right */
.tip-right-wrap:after {
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
    left: -10px;
}

/* Bottom */
.tip-bottom-right-wrap:after,
.tip-bottom-center-wrap:after,
.tip-bottom-left-wrap:after {
    border-top-color: transparent;
    border-right-color: transparent;
    border-left-color: transparent;
    top: -10px;
}

/* Left */
.tip-left-wrap:after {
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
    right: -10px;
}

/* Position */
.tip-top-right-wrap:after,
.tip-bottom-right-wrap:after {
    right: 10px;
}

.tip-top-center-wrap:after,
.tip-bottom-center-wrap:after {
    left: 50%;
    margin-left: -5px;
}

.tip-top-left-wrap:after,
.tip-bottom-left-wrap:after {
    left: 10px;
}

.tip-left-wrap:after,
.tip-right-wrap:after {
    top: 50%;
    margin-top: -6px;
}

.tip-hidden {
    visibility: hidden;
}


text:
package uk.co.inhealthcare.smsp.client.examples;

import uk.co.inhealthcare.smsp.client.itk.ITKGateway;
import uk.co.inhealthcare.smsp.client.model.DateOfBirth;
import uk.co.inhealthcare.smsp.client.model.Gender;
import uk.co.inhealthcare.smsp.client.model.Name;
import uk.co.inhealthcare.smsp.client.model.Postcode;
import uk.co.inhealthcare.smsp.client.model.Gender.Type;
import uk.co.inhealthcare.smsp.client.services.RequestContext;
import uk.co.inhealthcare.smsp.client.services.pds.GetPatientDetailsBySearchMiniService;
import uk.co.inhealthcare.smsp.client.services.pds.GetPatientDetailsBySearchRequest;
import uk.co.inhealthcare.smsp.client.services.pds.GetPatientDetailsResponse;
import uk.co.inhealthcare.smsp.client.services.pds.MiniServiceException;

public class GetPatientDetailsBySearchMiniServiceClient extends AbstractGetPatientDetailsMiniServiceClient {

	private static final String EXAMPLE_POSTCODE = "KT20 5BS";
	private static final String EXAMPLE_DOB = "20110402";
	private static final String EXAMPLE_GIVEN_NAME = "Old";
	private static final String EXAMPLE_FAMILY_NAME = "History";

	public GetPatientDetailsBySearchMiniServiceClient(ITKGateway itkGateway, RequestContext context) {
		super(itkGateway, context);
	}

	@Override
	protected void runClient(ITKGateway itkGateway, RequestContext context) throws MiniServiceException {

		// create the get nhs number service
		GetPatientDetailsBySearchMiniService service = new GetPatientDetailsBySearchMiniService(itkGateway);

		// create the request
		GetPatientDetailsBySearchRequest request = createRequest();

		// invoke the service
		GetPatientDetailsResponse response = service.getPatientDetailsBySearch(context, request);

		// handle response
		handleResponse(response);

	}

	private GetPatientDetailsBySearchRequest createRequest() {
		GetPatientDetailsBySearchRequest request = new GetPatientDetailsBySearchRequest.Builder()
				.dateOfBirth(new DateOfBirth(EXAMPLE_DOB)).gender(new Gender(Type.male))
				.name(new Name.Builder().given(EXAMPLE_GIVEN_NAME).family(EXAMPLE_FAMILY_NAME).build())
				.postcode(new Postcode(EXAMPLE_POSTCODE)).build();
		return request;
	}

}


text:
import allergy_intolerance from 'ember-fhir-adapter/models/allergy-intolerance';
export default allergy_intolerance;


text:
<?php
/**
 * This file is part of the BEAR.SsrModule package.
 *
 * @license http://opensource.org/licenses/MIT MIT
 */
namespace BEAR\SsrModule\Exception;

class MetaKeyNotExistsException extends \LogicException
{
}


text:
- Get the titles of top HN stories in your console
- **Skip stories** - the next time you run the tool, you'll see only unskipped stories
- Launch any story in the default browser

### Usage
The interface is ~~still somewhat cruddy~~ getting better. Here are the basics:
- There are 10 articles on a page
- The active article appears with more contrast, and has an asterisk to its left
- Press the arrow keys to navigate without skipping:
  - top and down to move between stories
  - left and right to move between pages
- Press 'enter' to launch the active article in the system default browser
- Press 'c' to launch the comments page for the active article
- Press 'n' to go to the next story and mark the current one skipped
- Press 'p' to go to the previous story and mark the current one skipped
- Press 'page down' to go to the next page and mark all stories on the current page skipped
- Press 'page up' to go to the previous page and mark all stories on the current page skipped
- Press 'q' to quit

### To build
You'll need:
- a PC with Windows (duh!)
- Visual C++ (2013 or later)
- [rapidjson](https://github.com/miloyip/rapidjson) (put the header files anywhere in your project's INCLUDE path)

And that's it.


text:
package com.arangodb.internal.cursor;

import com.arangodb.ArangoIterable;
import com.arangodb.ArangoIterator;
import com.arangodb.Consumer;
import com.arangodb.Predicate;

/**
 * @author Mark Vollmary
 */
@Deprecated
public class ArangoFilterIterable<T> extends AbstractArangoIterable<T> implements ArangoIterable<T> {

    private final ArangoIterable<T> iterable;
    private final Predicate<? super T> predicate;

    protected ArangoFilterIterable(final ArangoIterable<T> iterable, final Predicate<? super T> predicate) {
        super();
        this.iterable = iterable;
        this.predicate = predicate;
    }

    @Override
    public ArangoIterator<T> iterator() {
        return new ArangoFilterIterator<>(iterable.iterator(), predicate);
    }

    @Override
    public void foreach(final Consumer<? super T> action) {
        for (final T t : iterable) {
            if (predicate.test(t)) {
                action.accept(t);
            }
        }
    }

}


text:
"use strict" ;

const http = require( 'http' ) ;
const url = require( 'url' ) ;
const domain = require( 'domain' ) ;
const NextGenEvents = require( 'nextgen-events' ) ;

const log = require( 'logfella' ).global.use( 'server-kit' ) ;

const Dicer = require( 'server-kit-dicer' ) ;	// Multipart handler
const ws = require( 'ws' ) ;

const Client = require( './Client.js' ) ;
const ErrorDocument = require( './ErrorDocument.js' ) ;

//const util = require( 'util' ) ;

function noop() {}

/*
	new Server( options , requestHandler )
		options: object of options, where:
			port: the port where the server is listening, default to 80
			http: `boolean` spawn an http server
			ws: `boolean` spawn an websocket server
			catchErrors: `boolean` (default: false) catch uncaught userland errors (using try-catch and domain)

	Spawn a new server
*/
function Server( options , requestHandler ) {
	if ( ! options || typeof options !== 'object' ) { options = { http: true , port: 80 } ; }

	this.port = options.port || 80 ;
	this.uncaughtError = 0 ;
	this.catchErrors = !! options.catchErrors ;
	this.http = !! options.http ;
	this.ws = !! options.ws ;
	this.multipart = !! options.multipart ;
	this.httpServer = null ;
	this.wsServer = null ;
	this.queryParserOptions = options.queryParserOptions || null ;

	if ( typeof requestHandler === 'function' ) {
		this.requestHandler = requestHandler ;
	}
	else if ( requestHandler && typeof requestHandler === 'object' && typeof requestHandler.handle === 'function' ) {
		this.requestHandler = requestHandler.handle.bind( requestHandler ) ;
	}
	else {
		throw new Error( "Argument #2 should be a function or an object with a 'handle' method" ) ;
	}

	if ( this.catchErrors ) {
		this.domain = domain.create() ;
		this.domain.on( 'error' , this.errorHandler.bind( this ) ) ;
		this.domain.run( this.startServer.bind( this ) ) ;
	}
	else {
		this.startServer() ;
	}

	this.defineStates( 'running' , 'closing' , 'close' ) ;
}

Server.prototype = Object.create( NextGenEvents.prototype ) ;
Server.prototype.constructor = Server ;

module.exports = Server ;

// For backward compatibility
Server.create = ( ... args ) => new Server( ... args ) ;

Server.prototype.startServer = function() {
	var wsUpgradeListenerCount , wsUpgradeListeners ;

	if ( this.http ) {
		// Configure our HTTP server
		this.httpServer = http.createServer() ;

		try {
			// Listen and accept connection to the specified port
			this.httpServer.listen( this.port ) ;
		}
		catch ( error ) {
			// Since we exit ATM, we should log even when verbose is off
			log.warning( "Can't open port %i: %E" , this.port , error ) ;
			throw error ;
		}

		// Request handlers
		this.httpServer.on( 'request' , this.httpRequestHandler.bind( this ) ) ;
		this.httpServer.on( 'upgrade' , this.httpUpgradeRequestHandler.bind( this ) ) ;
		this.httpServer.on( 'connect' , this.httpConnectRequestHandler.bind( this ) ) ;

		this.httpServer.on( 'error' , ( ... args ) => {
			this.emit( 'error' , ... args ) ;
		} ) ;

		this.httpServer.on( 'listening' , ( ... args ) => {
			log.debug( 'Listening (HTTP) on port %i' , this.port ) ;
			this.emit( 'listening' , ... args ) ;
			this.emit( 'running' ) ;
		} ) ;

		this.httpServer.on( 'close' , () => this.closeEvent( 'http' ) ) ;
	}

	if ( this.ws ) {
		if ( this.httpServer ) {
			wsUpgradeListenerCount = this.httpServer.listeners( 'upgrade' ).length ;

			// If an HTTP server is already created, use it, so it can use 'upgrade' properly over the existing server
			this.wsServer = new ws.Server( { server: this.httpServer } ) ;

			// Looks like a hack here, but we don't want to allow the 'ws' module to trash upgrade request
			// that are specifying another protocol than 'websocket'.
			// So we simply remove the 'ws' module listener.
			wsUpgradeListeners = this.httpServer.listeners( 'upgrade' ) ;

			if ( wsUpgradeListeners.length > wsUpgradeListenerCount ) {
				//log.debug( 'WS listener spotted!' ) ;
				this.httpServer.removeListener( 'upgrade' , wsUpgradeListeners[ wsUpgradeListeners.length - 1 ] ) ;
			}
		}
		else {
			// If no other server has been created, create a new server on this port
			this.wsServer = new ws.Server( { port: this.port } ) ;

			this.wsServer.on( 'listening' , ( ... args ) => {
				log.debug( 'Listening (WS) on port %i' , this.port ) ;
				this.emit( 'listening' , ... args ) ;
				this.emit( 'running' ) ;
			} ) ;
		}

		this.wsServer.on( 'close' , () => this.closeEvent( 'ws' ) ) ;

		this.wsServer.on( 'error' , ( ... args ) => {
			this.emit( 'error' , ... args ) ;
		} ) ;

		this.wsServer.on( 'connection' , this.wsHandler.bind( this ) ) ;
	}
} ;

Server.prototype.wsHandler = async function( websocket , upgradeReq ) {
	log.debug( "Websocket port %i - connection established, request on path: %s" , this.port , upgradeReq.url ) ;

	// The ws module does not have an event when the websocket is closing...
	// This is the big nasty hack to do it: replace the readyState property by a getter/setter
	var readyState = websocket.readyState ;

	Object.defineProperty( websocket , 'readyState' , {
		get: function() { return readyState ; } ,
		set: function( v ) {
			readyState = v ;
			if ( readyState === ws.CLOSING ) {
				websocket.emit( 'end' ) ;
			}
		}
	} ) ;

	var client = new Client( this , {
		type: 'ws' ,
		protocol: 'ws' ,
		request: upgradeReq ,
		websocket: websocket
	} ) ;

	try {
		await this.requestHandler( client ) ;
	}
	catch ( error ) {
		if ( ! this.catchErrors ) { throw error ; }

		log.error( "Websocket port %i - requestHandler uncaught exception: %E" , this.port , error ) ;
		ErrorDocument.defaultHandler( 500 , client ) ;
	}
} ;

var multipartBoundaryRegex = /^multipart\/.+?(?:; boundary=(?:(?:"(.+)")|(?:([^\s]+))))$/ ;

Server.prototype.httpRequestHandler = async function( request , response ) {
	var client , multipartBoundary ;

	log.debug( "Http port %i - received request %s on path: %s" , this.port , request.method , request.url ) ;

	client = new Client( this , {
		type: 'http' ,
		protocol: 'http' ,
		request: request ,
		response: response
	} ) ;

	if ( this.multipart && request.headers['content-type'] && request.headers['content-type'].startsWith( 'multipart/' ) ) {
		log.debug( 'multipart detected' ) ;

		// Get the multipart boundary
		multipartBoundary = request.headers['content-type'].match( multipartBoundaryRegex ) ;

		if ( ! multipartBoundary ) {
			log.debug( 'bad multipart content-type (or missing boundary)' ) ;
			ErrorDocument.defaultHandler( 400 , client ) ;
			return ;
		}

		multipartBoundary = multipartBoundary[ 1 ] || multipartBoundary[ 2 ] ;

		// Create the Dicer object and put it into the multipart property
		request.multipart = new Dicer( { boundary: multipartBoundary , maxHeaderPairs: 20 } ) ;

		request.multipart.on( 'error' , error => {
			log.debug( 'multipart error: %E' , error ) ;
			ErrorDocument.defaultHandler( 400 , client ) ;
		} ) ;

		// Pipe the current request into Dicer
		request.pipe( request.multipart ) ;
	}

	try {
		await this.requestHandler( client ) ;
	}
	catch ( error ) {
		if ( ! this.catchErrors ) { throw error ; }

		log.error( "Http port %i - requestHandler uncaught exception: %E" , this.port , error ) ;
		ErrorDocument.defaultHandler( 500 , client ) ;
	}
} ;

Server.prototype.httpUpgradeRequestHandler = async function( request , socket , headBuffer_ ) {
	var client , response , headBuffer ;

	// From the 'ws' module:
	// copy headBuffer to avoid retention of large slab buffers used in node core
	headBuffer = Buffer.allocUnsafe( headBuffer_.length ) ;
	headBuffer_.copy( headBuffer ) ;

	log.debug(
		"Http port %i - received an UPGRADE request to the '%s' protocol on path: %s" ,
		this.port , request.headers.upgrade , request.url
	) ;

	// Force a response object:
	response = new http.ServerResponse( request ) ;
	response.assignSocket( socket ) ;

	client = new Client( this , {
		type: 'http.upgrade' ,
		protocol: 'http' ,
		request: request ,
		response: response ,
		headBuffer: headBuffer ,
		socket: socket
	} ) ;

	response.accept = accepted => {

		if ( arguments.length && ! accepted ) {
			response.writeHeader( 400 , {} ) ;
			response.end() ;
			return ;
		}

		switch ( request.headers.upgrade.toLowerCase() ) {
			case 'websocket' :
				if ( ! this.ws ) {
					//this.sendHttpOverSocket( socket , 400 , {} , '' , true ) ;
					response.writeHeader( 400 , {} ) ;
					response.end() ;
					return ;
				}

				// From the 'ws' module:
				this.wsServer.handleUpgrade( request , socket , headBuffer , websocket => {
					this.wsServer.emit( 'connection' + request.url , websocket , request ) ;
					this.wsServer.emit( 'connection' , websocket , request ) ;
				} ) ;

				break ;

			default :
				//this.sendHttpOverSocket( socket , 400 , {} , '' , true ) ;
				response.writeHeader( 400 , {} ) ;
				response.end() ;
		}
	} ;

	try {
		await this.requestHandler( client ) ;
	}
	catch ( error ) {
		if ( ! this.catchErrors ) { throw error ; }

		log.error( "Http port %i - requestHandler uncaught exception: %E" , this.port , error ) ;
		ErrorDocument.defaultHandler( 500 , client ) ;
	}
} ;

Server.prototype.httpConnectRequestHandler = async function( request , socket , headBuffer_ ) {
	var client , response , headBuffer ;

	// From the 'ws' module:
	// copy headBuffer to avoid retention of large slab buffers used in node core
	headBuffer = Buffer.allocUnsafe( headBuffer_.length ) ;
	headBuffer_.copy( headBuffer ) ;

	log.debug( "Http port %i - received a CONNECT on path: %s" , this.port , request.url ) ;

	// Force a response object:
	response = new http.ServerResponse( request ) ;
	response.assignSocket( socket ) ;

	client = new Client( this , {
		type: 'http.connect' ,
		protocol: 'http' ,
		request: request ,
		response: response ,
		headBuffer: headBuffer ,
		socket: socket
	} ) ;

	// There is an issue: https://github.com/joyent/node/issues/7019
	// Any body advertised by "Content-Length" > 0 or "Transfer-Encoding: chunked" will cause a parse error
	// for a node.js client receiving the response, so we should set "Content-Length: 0" and forbid any write.

	//response.setHeader( 'Connection' , 'close' ) ;
	response.setHeader( 'Content-Length' , 0 ) ;
	response.write = noop ;
	response.end = ( data , encoding , callback ) =>
		http.ServerResponse.prototype.end.call( response , undefined , undefined , callback ) ;

	try {
		await this.requestHandler( client ) ;
	}
	catch ( error ) {
		if ( ! this.catchErrors ) { throw error ; }

		log.error( "Http port %i - requestHandler uncaught exception: %E" , this.port , error ) ;
		ErrorDocument.defaultHandler( 500 , client ) ;
	}
} ;

Server.prototype.errorHandler = function( error ) {
	// For instance, we increment the number of uncaught error,
	// Later it could be a good idea to restart the server when this number reaches some limits.
	this.uncaughtError ++ ;
	log.error( "Http port %i - Uncaught async error #%i: %E" , this.port , this.uncaughtError , error ) ;
} ;

/*
	Useful when no facilities can be used.

	Most of time, this trick can be used instead:
		var response = new http.ServerResponse( request ) ;
		response.assignSocket( socket ) ;
*/
Server.prototype.sendHttpOverSocket = function( socket , statusCode , headers , body , destroy ) {
	var key , responseHead = '' ;

	if ( body ) {
		if ( ! Buffer.isBuffer( body ) ) {
			if ( typeof body !== 'string' ) { body = JSON.stringify( body ) ; }
			body = Buffer.from( body ) ;
		}

		// This is not done automatically!
		headers['Content-Length'] = body.length ;
	}

	responseHead += 'HTTP/1.1 ' + statusCode + ' ' + http.STATUS_CODES[ statusCode ] + '\r\n' ;

	for ( key in headers ) {
		responseHead.push( key + ': ' + headers[ key ] + '\r\n' ) ;
	}

	responseHead += '\r\n' ;

	try {
		socket.write( responseHead ) ;

		if ( body ) {
			socket.write( body ) ;
		}
	}
	catch ( error ) {
		// Not sure how to handle that ATM. We will just destroy the sockect for instance.
		destroy = true ;
	}
	finally {
		if ( destroy ) {
			try {
				socket.destroy() ;
			}
			catch ( error ) {
			}
		}
	}
} ;

Server.prototype.closeEvent = function( type ) {
	if ( type === 'ws' ) {
		this.wsServer.__closed__ = true ;
		if ( ! this.httpServer || this.httpServer.__closed__ ) {
			this.emit( 'close' ) ;
		}
	}
	else if ( type === 'http' ) {
		this.httpServer.__closed__ = true ;
		if ( ! this.wsServer || this.wsServer.__closed__ ) {
			this.emit( 'close' ) ;
		}
	}
} ;

Server.prototype.close = function() {
	this.emit( 'closing' ) ;
	if ( this.httpServer ) { this.httpServer.close() ; }
	if ( this.wsServer ) { this.wsServer.close() ; }
} ;

Server.prototype.gracefulClose = function() {
	// TODO
} ;


text:
app.controller('MainController', ['$scope', '$http', '$window', 'playlist', 'postRequest', 'audaciousStatus', function ($scope, $http, $window, playlist, postRequest, audaciousStatus){
	$scope.ip = '10.0.0.219';

	Storage.prototype.setObj = function(key, obj){
		return this.setItem(key, JSON.stringify(obj))
	};

	Storage.prototype.getObj = function(key){
		return JSON.parse(this.getItem(key))
	};

	var checkStatus = function () {
		console.log('Checking status');
		$http.get('http://10.0.0.219:3000/audaciousApi/audaciousStatus')
		.success(function (res){
			if(res === 'off'){
				window.location = '/#/start-audacious';
			} else{
				var e = document.getElementById('bt-play');
				if (!document.getElementById('playback-status')){
					res = res.replace(/\s/g, '');
					if (res === 'playing'){
						e.innerHTML = 'playing';
					} else{
						e.innerHTML = 'paused';
					}
				}
			}
		});
	}
	checkStatus();

	var toggleIcons = function (){
		var e = document.getElementById('bt-play');
		var ee = document.getElementById('playback-status');
		console.log(ee.innerHTML);
		var innerHtml = '';
		if (ee.innerHTML === 'paused'){
			// Toggle icons
			e.innerHTML = 'playing';
		} else{
			e.innerHTML = 'paused';
		}
	};

	/*(function setButtonsStatus (){
		$http({
			method: 'GET',
			url: '/audaciousApi/playbackStatus'
		})
		.success(function (res){
			console.log('hola ' +res);
			var e = document.getElementById('playback-status');
			if (res.replace(/\s/g, '') === 'paused'){
				e.innerHTML = 'paused';
			} else{
				e.innerHTML = 'hola';
			}
		});
	})();*/

	// Socket.io setup
	var socket = io.connect('http://'+$scope.ip+':3001/', {
		'reconnection': true,
		'reconnectionDelayMax': 2000,
		'timeout': 3000
	});
	socket.on('event', function (data){
		$scope.songChange();
	});

	socket.on('disconnect', function (){
		// What to do when socket disconnect
	});

	if (localStorage.getItem('playlist')){
		$scope.playlist = localStorage.getObj('playlist').songs;
		console.log('Stored Playlist: ');
		// console.log(storedPlaylist);
	}else {
		playlist.success(function (data){
			console.log("playlist downloaded: ");
			console.log(data);
			$scope.playlist = data.songs;
		});
		playlist.error(function (data){
			console.log(data);
		});
	}

	$scope.playSong = function (item) {
		checkStatus();
		var songId = item.target.attributes['song-id'].value;
		var data = {songId: songId};
		var callback = function (html){
			console.log('callback executed')
		}
		postRequest.fn({
			url: 'http://'+$scope.ip+':3000/audaciousCmd/playSong',
			data: data
		});
	}

	$scope.btForward = function (){
		checkStatus();
		postRequest.fn({
			url: '/audaciousCmd/next-previous',
			data: {cmd: 'next'}
		})
		.success(function (res){
			// console.log(res);
		});
	}

	$scope.btBackward = function (){
		checkStatus();
		postRequest.fn({
			url: '/audaciousCmd/next-previous',
			data: {cmd: 'previous'}
		})
		.success(function (res){
			// console.log(res);
		});
	}

	$scope.playpause = function (){
		checkStatus();
		postRequest.fn({
			url: '/audaciousCmd/playpause',
			data: {cmd: 'playpause'}
		});
		toggleIcons();
	}

	$scope.btPlaylist = function (){
		window.location = '/#/playlist';
	}
	$scope.btNowplaying = function (){
		window.location = '/#/nowplaying';
	}

	$scope.songChange = function (){
		var defaultData = {artist: 'N/A', album: 'N/A', title: 'N/A'};
		$scope.currentSong = defaultData;
		$http.get('http://'+$scope.ip+':3000/audaciousApi/currentSong')
		.success(function (data){
			data = data || defaultData;
			if (data.title.length > 18){
				if (document.getElementById('current-title')){
					var e = document.getElementById('current-title');
					e.setAttribute('class', 'title');
					// e.setAttribute('class', 'title scroll');
				}
			} else{
					if (document.getElementById('current-title')){
						document.getElementById('current-title').setAttribute('class', 'title');
					}
			  }
			$scope.currentSong = data;
		})
		.error(function (data){
			console.log(data)
		});
	}
	$scope.songChange();

	$scope.startAudacious = function(){
		postRequest.fn({
			url: '/audaciousCmd/start-audacious',
			data: {cmd: 'start'}
		})
		.success(function (res){
			if (res === 'OK'){
				var e = document.getElementById('bt-on');
				e.setAttribute('class', 'pure-button pure-button-primary green');
				setTimeout(function(){
					$window.location.href = 'http://10.0.0.219:3000/#/nowplaying';
				}, 1000);
			}
		})
	}
}]);


text:
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
	style="?android:buttonBarStyle"
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	android:gravity="right"
	android:orientation="horizontal">

	<Button
		android:id="@+id/bReference"
		style="?android:buttonBarButtonStyle"
		android:layout_width="wrap_content"
		android:layout_height="match_parent"
		android:paddingLeft="16dp"
		android:paddingRight="16dp"
		android:text="@string/patch_text_menu_reference"
		android:textAllCaps="true"
		android:textSize="14sp" />

	<Button
		android:id="@+id/bSend"
		style="?android:buttonBarButtonStyle"
		android:layout_width="wrap_content"
		android:layout_height="match_parent"
		android:paddingLeft="16dp"
		android:paddingRight="16dp"
		android:text="@string/patch_text_menu_send"
		android:textAllCaps="true"
		android:textSize="14sp" />

</LinearLayout>


text:
namespace junior
{
	class window
	{
	public:
		window(const wchar_t* title);
		window(const window& other);
		window(window&& other);
		window& operator=(const window& other);
		window& operator=(window&& other);
		~window();

		window& begin_draw();
		window& end_draw();

		window& draw_line(const int x1, const int y1, const int x2, const int y2);
		window& draw_line(const int x1, const int y1, const int x2, const int y2, const unsigned int color);
		window& draw_circle(const int x, const int y, const int radius);
		window& fill_circle(const int x, const int y, const int radius);
		window& write(const wchar_t* text, const int x, const int y);
		window& write(const wchar_t* text);

	private:
		void* _engine;
		unsigned int _last_color;
	};

	enum class event_type : int
	{
		invalid,
		quit,
		window_destroy,
		key_down, key_up,
		mouse_move, mouse_wheel,
		mouse_lbutton_down, mouse_lbutton_up,
		mouse_rbutton_down, mouse_rbutton_up,
		mouse_mbutton_down, mouse_mbutton_up,
	};

	struct mouse_event
	{
	public:
		mouse_event() : _valid(false) {}
		mouse_event(bool valid) : _valid(valid) {}
		inline operator bool() const { return _valid; }

		int x;
		int y;
		struct button_pressed
		{
			bool left;
			bool middle;
			bool right;
			bool control;
			bool shift;
		} is_button_pressed;
		int wheel_delta;

	private:
		bool _valid;
	};

	struct keyboard_event
	{
	public:
		keyboard_event() : _valid(false) {}
		keyboard_event(bool valid) : _valid(valid) {}
		inline operator bool() const { return _valid; }

		int code;

	private:
		bool _valid;
	};

	struct event
	{
	public:
		event() : type(event_type::invalid), window(nullptr) {}
		event(const event_type event_type) : type(event_type), window(nullptr) {}
		event(const event_type event_type, window* event_window, const mouse_event& event_mouse, const keyboard_event& event_key)
			: type(event_type), window(event_window), mouse(event_mouse), key(event_key) {}

		inline operator bool() const { return type != event_type::invalid && type != event_type::quit; }
		inline bool operator==(const event_type val) const { return type == val; }

		const event_type type;
		window* const window;
		const mouse_event mouse;
		const keyboard_event key;
	};

	event wait_for_event();
}


text:
var yaml = require('js-yaml');
var fs   = require('fs');

exports.parseConfig = function (path) {
  try {
    var doc = yaml.safeLoad(fs.readFileSync(path, 'utf8'));
    return doc;
  } catch (e) {
    console.error(e);
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.mnemonic</groupId>
    <artifactId>mnemonic-benches</artifactId>
    <version>0.11.0-SNAPSHOT</version>
  </parent>

  <artifactId>mnemonic-sort-bench</artifactId>
  <name>mnemonic-sort-bench</name>
  <packaging>jar</packaging>

  <properties>
    <mode></mode>
    <input></input>
    <output></output>
  </properties>

  <dependencies>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>${project.groupId}.bench.Sort</mainClass>
                </transformer>
              </transformers>
              <minimizeJar>true</minimizeJar>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.10</version>
        <executions>
          <execution>
            <id>copy</id>
            <phase>package</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>mnemonic-nvml-vmem-service</artifactId>
                  <version>${project.version}</version>
                  <classifier>${os.detected.classifier}</classifier>
                  <type>jar</type>
                </artifactItem>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>mnemonic-sys-vmem-service</artifactId>
                  <version>${project.version}</version>
                  <classifier>${os.detected.classifier}</classifier>
                  <type>jar</type>
                </artifactItem>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>mnemonic-nvml-pmem-service</artifactId>
                  <version>${project.version}</version>
                  <classifier>${os.detected.classifier}</classifier>
                  <type>jar</type>
                </artifactItem>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>mnemonic-pmalloc-service</artifactId>
                  <version>${project.version}</version>
                  <classifier>${os.detected.classifier}</classifier>
                  <type>jar</type>
                </artifactItem>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>mnemonic-utilities-service</artifactId>
                  <version>${project.version}</version>
                  <classifier>${os.detected.classifier}</classifier>
                  <type>jar</type>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.build.directory}/service-dist</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>bench</id>
      <activation>
        <property>
          <name>bench</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-Djava.ext.dirs=${project.build.directory}/service-dist</argument>
                <argument>-ea</argument>
                <argument>-classpath</argument>
                <classpath />
                <argument>${project.groupId}.bench.Sort</argument>
                <argument>-m</argument>
                <argument>${mode}</argument>
                <argument>-i</argument>
                <argument>${input}</argument>
                <argument>-o</argument>
                <argument>${output}</argument>
              </arguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

</project>