text:
/*
 *                        AT&T - PROPRIETARY
 *          THIS FILE CONTAINS PROPRIETARY INFORMATION OF
 *        AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN
 *             ACCORDANCE WITH APPLICABLE AGREEMENTS.
 *
 *          Copyright (c) 2013 AT&T Knowledge Ventures
 *              Unpublished and Not for Publication
 *                     All Rights Reserved
 */
package org.apache.openaz.xacml.pdp.policy.dom;

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

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.openaz.xacml.api.XACML3;
import org.apache.openaz.xacml.pdp.policy.ObligationExpression;
import org.apache.openaz.xacml.pdp.policy.Policy;
import org.apache.openaz.xacml.pdp.policy.RuleEffect;
import org.apache.openaz.xacml.std.StdStatusCode;
import org.apache.openaz.xacml.std.dom.DOMProperties;
import org.apache.openaz.xacml.std.dom.DOMStructureException;
import org.apache.openaz.xacml.std.dom.DOMUtil;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

/**
 * DOMObligationExpression extends {@link org.apache.openaz.xacml.pdp.policy.ObligationExpression} with
 * methods for creation from {@link org.w3c.dom.Node}s.
 */
public class DOMObligationExpression extends ObligationExpression {
    private static final Log logger = LogFactory.getLog(DOMObligationExpression.class);

    protected DOMObligationExpression() {
    }

    /**
     * Creates a new ObligationExpression by parsing the given Node representing a
     * XACML ObligationExpression element.
     *
     * @param nodeObligationExpression the Node representing the XACML ObligationExpression
     *            element
     * @param policy the {@link org.apache.openaz.xacml.pdp.policy.Policy} encompassing the
     *            ObligationExpression element
     * @return a new ObligationExpression parsed from the given Node
     * @throws DOMStructureException if there is an error parsing the Node
     */
    public static ObligationExpression newInstance(Node nodeObligationExpression, Policy policy)
        throws DOMStructureException {
        Element elementObligationExpression = DOMUtil.getElement(nodeObligationExpression);
        boolean bLenient = DOMProperties.isLenient();

        DOMObligationExpression domObligationExpression = new DOMObligationExpression();

        try {
            NodeList children = elementObligationExpression.getChildNodes();
            int numChildren;
            if (children != null && (numChildren = children.getLength()) > 0) {
                for (int i = 0; i < numChildren; i++) {
                    Node child = children.item(i);
                    if (DOMUtil.isElement(child)) {
                        if (DOMUtil.isInNamespace(child, XACML3.XMLNS)
                            && XACML3.ELEMENT_ATTRIBUTEASSIGNMENTEXPRESSION.equals(child.getLocalName())) {
                            domObligationExpression
                                .addAttributeAssignmentExpression(DOMAttributeAssignmentExpression
                                    .newInstance(child, policy));
                        } else if (!bLenient) {
                            throw DOMUtil.newUnexpectedElementException(child, nodeObligationExpression);
                        }
                    }
                }
            }

            domObligationExpression
                .setObligationId(DOMUtil.getIdentifierAttribute(elementObligationExpression,
                                                                XACML3.ATTRIBUTE_OBLIGATIONID, !bLenient));

            String string = DOMUtil.getStringAttribute(elementObligationExpression,
                                                       XACML3.ATTRIBUTE_FULFILLON, !bLenient);
            RuleEffect ruleEffectType = RuleEffect.getRuleEffect(string);
            if (ruleEffectType == null) {
                if (!bLenient) {
                    throw new DOMStructureException(nodeObligationExpression,
                                                    "Invalid EffectType \"" + string + "\" in \""
                                                        + DOMUtil.getNodeLabel(nodeObligationExpression)
                                                        + "\"");
                }
            } else {
                domObligationExpression.setRuleEffect(ruleEffectType);
            }
        } catch (DOMStructureException ex) {
            domObligationExpression.setStatus(StdStatusCode.STATUS_CODE_SYNTAX_ERROR, ex.getMessage());
            if (DOMProperties.throwsExceptions()) {
                throw ex;
            }
        }
        return domObligationExpression;
    }

    public static boolean repair(Node nodeObligationExpression) throws DOMStructureException {
        Element elementObligationExpression = DOMUtil.getElement(nodeObligationExpression);
        boolean result = false;

        NodeList children = elementObligationExpression.getChildNodes();
        int numChildren;
        if (children != null && (numChildren = children.getLength()) > 0) {
            for (int i = 0; i < numChildren; i++) {
                Node child = children.item(i);
                if (DOMUtil.isElement(child)) {
                    if (DOMUtil.isInNamespace(child, XACML3.XMLNS)
                        && XACML3.ELEMENT_ATTRIBUTEASSIGNMENTEXPRESSION.equals(child.getLocalName())) {
                        result = DOMAttributeAssignmentExpression.repair(child) || result;
                    } else {
                        logger.warn("Unexpected element " + child.getNodeName());
                        elementObligationExpression.removeChild(child);
                        result = true;
                    }
                }
            }
        }

        result = DOMUtil.repairIdentifierAttribute(elementObligationExpression,
                                                   XACML3.ATTRIBUTE_OBLIGATIONID, logger) || result;
        result = DOMUtil.repairStringAttribute(elementObligationExpression, XACML3.ATTRIBUTE_FULFILLON,
                                               RuleEffect.DENY.getName(), logger) || result;

        String string = DOMUtil.getStringAttribute(elementObligationExpression, XACML3.ATTRIBUTE_FULFILLON);
        RuleEffect ruleEffectType = RuleEffect.getRuleEffect(string);
        if (ruleEffectType == null) {
            logger.warn("Setting invalid RuleEffect " + string + " to " + RuleEffect.DENY.getName());
            elementObligationExpression.setAttribute(XACML3.ATTRIBUTE_FULFILLON, RuleEffect.DENY.getName());
            result = true;
        }

        return result;
    }

    /**
     * Creates a List of ObligationExpressions by parsing the given
     * Node representing a XACML ObligationExpressions element.
     *
     * @param nodeObligationExpressions the Node representing the XACML ObligationExpressions
     *            element
     * @param policy the Policy encompassing the ObligationExpressions element
     * @return a new List of ObligationExpressions parsed from the given
     *         Node
     * @throws DOMStructureException if there is an error parsing the Node
     */
    public static List<ObligationExpression> newList(Node nodeObligationExpressions, Policy policy)
        throws DOMStructureException {
        Element elementObligationExpressions = DOMUtil.getElement(nodeObligationExpressions);
        boolean bLenient = DOMProperties.isLenient();

        List<ObligationExpression> listObligationExpressions = new ArrayList<ObligationExpression>();

        NodeList children = elementObligationExpressions.getChildNodes();
        int numChildren;
        if (children != null && (numChildren = children.getLength()) > 0) {
            for (int i = 0; i < numChildren; i++) {
                Node child = children.item(i);
                if (DOMUtil.isElement(child)) {
                    if (DOMUtil.isInNamespace(child, XACML3.XMLNS)
                        && XACML3.ELEMENT_OBLIGATIONEXPRESSION.equals(child.getLocalName())) {
                        listObligationExpressions.add(DOMObligationExpression.newInstance(child, policy));
                    } else if (!bLenient) {
                        throw DOMUtil.newUnexpectedElementException(child, elementObligationExpressions);
                    }
                }
            }
        }

        if (listObligationExpressions.size() == 0 && !bLenient) {
            throw DOMUtil.newMissingElementException(elementObligationExpressions, XACML3.XMLNS,
                                                     XACML3.ELEMENT_OBLIGATIONEXPRESSION);
        }

        return listObligationExpressions;
    }

    public static boolean repairList(Node nodeObligationExpressions) throws DOMStructureException {
        Element elementObligationExpressions = DOMUtil.getElement(nodeObligationExpressions);
        boolean result = false;

        boolean sawObligationExpression = false;
        NodeList children = elementObligationExpressions.getChildNodes();
        int numChildren;
        if (children != null && (numChildren = children.getLength()) > 0) {
            for (int i = 0; i < numChildren; i++) {
                Node child = children.item(i);
                if (DOMUtil.isElement(child)) {
                    if (DOMUtil.isInNamespace(child, XACML3.XMLNS)
                        && XACML3.ELEMENT_OBLIGATIONEXPRESSION.equals(child.getLocalName())) {
                        result = DOMObligationExpression.repair(child) || result;
                        sawObligationExpression = true;
                    } else {
                        logger.warn("Unexpected element " + child.getNodeName());
                        elementObligationExpressions.removeChild(child);
                        result = true;
                    }
                }
            }
        }
        if (!sawObligationExpression) {
            throw DOMUtil.newMissingElementException(elementObligationExpressions, XACML3.XMLNS,
                                                     XACML3.ELEMENT_OBLIGATIONEXPRESSION);
        }

        return result;
    }

}


text:
{% extends "header.html" %}
<section class="contribution">
    {% contribution %}
</section>
<form action="{{ url_for('contribute') }}" method="post" class="form">
    <textarea cols="20" rows="10" name="contribution" placeholder="White here your response.">
    <button type="submit" class="btn">Post</buttion>
</form>

redpajama_set_name: RedPajamaGithub


text:
package shuhelper.ui;

import java.io.IOException;

import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

public class XK_IdentFrameWindow {
	XK_IdentFrame controller = new XK_IdentFrame();
	Stage stage = new Stage();

	XK_IdentFrameWindow() throws IOException
	{
		FXMLLoader fxmlloader = new FXMLLoader(getClass().getResource("XK_IdentFrame.fxml"));
		Parent root = fxmlloader.load();
		Scene scene = new Scene(root,266,294);
		controller = fxmlloader.getController();
		controller.setStage(stage);
	    controller.setScene(scene);
		stage.setScene(scene);
		stage.initStyle(StageStyle.TRANSPARENT);
	}

}


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W26220_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans21.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">
NRTH DAKOTA     Q (Q
Lynn D. Helms - Director Bruce E. Hicks - Assistant Director
Department of Mineral Resources Lynn D. Helms - Director
North Dakota Industrial Commission O'L AND GAS DIVIS'ON www.dmr.nd.gov/oilgas/

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans12.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">. July 21, 2014
BURLINGTON RES O&G CO PO BOX 51810 MIDLAND, TX 79710-1810
RE: HARLEY 41-2TFH LOTl Sec. 2-151N-95W MCKENZIE COUNTY WELL FILE NO. 26220
Gentlemen:
The records and files of the Industrial Commission indicate that the above referenced permit will expire August 19, 2014.
Permits to drill are only valid for one year in the State of North Dakota. If you would like to renew for another year, please submit a Form 4 along with the $100.00 filing fee. Alternatively, you may elect to send in a Form 4 cancelling the permit. If you have any questions, please contact Todd Holweger.
Sincerely,

Administrative Assist: nt

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">600 E Boulevard Ave - Dept 405, Bismarck, North Dakota 58505-0840 Phone (701)328—8020 Fax (701)328-8022


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Report of the New Jersey State Agricultural Experimental Station 293 (1891)

#### Original name
Colletotrichum omnivorum Halst.

### Remarks
null


text:
package org.jetbrains.plugins.groovy.codeInspection.bugs;

import com.intellij.psi.*;
import com.intellij.psi.util.InheritanceUtil;
import com.intellij.psi.util.PsiUtil;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.groovy.codeInspection.BaseInspection;
import org.jetbrains.plugins.groovy.codeInspection.BaseInspectionVisitor;
import org.jetbrains.plugins.groovy.codeInspection.GroovyInspectionBundle;
import org.jetbrains.plugins.groovy.lang.lexer.GroovyTokenTypes;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrBinaryExpression;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression;
import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.TypesUtil;

/**
 * @author Max Medvedev
 */
public class GroovyInArgumentCheckInspection extends BaseInspection {
  @NotNull
  @Override
  protected BaseInspectionVisitor buildVisitor() {
    return new MyVisitor();
  }

  @Override
  protected String buildErrorString(Object... args) {
    PsiType ltype = (PsiType)args[0];
    PsiType rtype = (PsiType)args[1];
    return GroovyInspectionBundle.message("rtype.cannot.contain.ltype", ltype.getPresentableText(), rtype.getPresentableText());

  }

  @Nls
  @NotNull
  @Override
  public String getDisplayName() {
    return "Incompatible 'in' argument types";
  }

  private static class MyVisitor extends BaseInspectionVisitor {
    @Override
    public void visitBinaryExpression(@NotNull GrBinaryExpression expression) {
      super.visitBinaryExpression(expression);

      if (expression.getOperationTokenType() != GroovyTokenTypes.kIN) return;

      GrExpression leftOperand = expression.getLeftOperand();
      GrExpression rightOperand = expression.getRightOperand();
      if (rightOperand == null) return;

      PsiType ltype = leftOperand.getType();
      PsiType rtype = rightOperand.getType();
      if (ltype == null || rtype == null) return;

      PsiType component;

      if (rtype instanceof PsiArrayType) {
        component = ((PsiArrayType)rtype).getComponentType();
      }
      else if (InheritanceUtil.isInheritor(rtype, CommonClassNames.JAVA_UTIL_COLLECTION)) {
        component = PsiUtil.substituteTypeParameter(rtype, CommonClassNames.JAVA_UTIL_COLLECTION, 0, false);
      }
      else {
        checkSimpleClasses(ltype, rtype, expression);
        return;
      }

      if (component == null) return;

      if (TypesUtil.isAssignableWithoutConversions(component, ltype, expression)) return;

      registerError(expression, ltype, rtype);
    }

    private void checkSimpleClasses(PsiType ltype, PsiType rtype, GrBinaryExpression expression) {
      if (!(rtype instanceof PsiClassType)) return;
      if (!(ltype instanceof PsiClassType)) return;

      PsiClass lclass = ((PsiClassType)ltype).resolve();
      PsiClass rclass = ((PsiClassType)rtype).resolve();

      if (lclass == null || rclass == null) return;

      if (expression.getManager().areElementsEquivalent(lclass, rclass)) return;

      if (lclass.isInterface() || rclass.isInterface()) return;

      if (lclass.isInheritor(rclass, true) || rclass.isInheritor(lclass, true)) return;

      registerError(expression, ltype, rtype);
    }
  }

  @Override
  public boolean isEnabledByDefault() {
    return true;
  }
}


text:
package main

import (
	_ "github.com/micro/go-plugins/broker/nsq/v2"
	_ "github.com/micro/go-plugins/transport/tcp/v2"
)


text:
layout: post
date: 2021-07-28
title: How to make HDBScan an inductive clustering method
---

There is a large difference between inductive and transductive clustering methods.
While the first are more similar to supervised learning, in the sense that once trained on N examples they can generalize to M unseen new samples, transductive method instead need to see all data, but cannot generalize to new samples.

HDBscan is largely a transductive method, and to make it able to generalize to new data we can wrap in a new class the `approximate_predict` method offered by the library.

    {%highlight python%)
    from hdbscan import HDBSCAN
    from hdbscan import approximate_predict

    class HDBSCANPredict(HDBSCAN):
        def __init__(self, min_cluster_size=10, alpha=1.0, cluster_selection_epsilon=0.0):
            super().__init__(
                min_cluster_size=min_cluster_size,
                alpha=alpha,
                cluster_selection_epsilon=cluster_selection_epsilon,
                prediction_data=True,
            )

        def predict(self, X, y=None):
            self.generate_prediction_data()
            return approximate_predict(self, X)[0]

        def predict_proba(self, X):
            self.generate_prediction_data()
            return approximate_predict(self, X)[1]

        def fit_transform(self, X, y=None):
            super().fit(X)
            out = approximate_predict(self, X)[0][:, None]
            return out

        def transform(self, X, y=None):
            return approximate_predict(self, X)[0][:, None]

        def fit(self, X, y=None):
            super().fit(X, y)
            self.generate_prediction_data()
            return self    }
    {%endhighlight%)


text:
package org.openstack.atlas.rax.api.validation.validator;

import org.openstack.atlas.api.v1.extensions.rax.NetworkItem;
import org.openstack.atlas.api.v1.extensions.rax.NetworkItemType;
import org.openstack.atlas.api.validation.Validator;
import org.openstack.atlas.api.validation.ValidatorBuilder;
import org.openstack.atlas.api.validation.context.NetworkItemContext;
import org.openstack.atlas.api.validation.result.ValidatorResult;
import org.openstack.atlas.api.validation.util.IPString.IPUtils;
import org.openstack.atlas.api.validation.validator.ResourceValidator;
import org.openstack.atlas.api.validation.validator.ValidatorUtilities;
import org.openstack.atlas.api.validation.verifier.MustBeInArray;
import org.openstack.atlas.api.validation.verifier.Verifier;
import org.openstack.atlas.api.validation.verifier.VerifierResult;
import org.openstack.atlas.common.ip.IPv4ToolSet;

import static org.openstack.atlas.api.validation.ValidatorBuilder.build;
import static org.openstack.atlas.api.validation.context.NetworkItemContext.FULL;

public class NetworkItemValidator implements ResourceValidator<NetworkItem> {

    private final Validator<NetworkItem> validator;

    public NetworkItemValidator() {
        validator = build(new ValidatorBuilder<NetworkItem>(NetworkItem.class) {

            {
                // SHARED EXPECTATIONS
                result(validationTarget().getId()).must().not().exist().withMessage("Network item id field cannot be modified.");
                result(validationTarget().getType()).if_().exist().then().must().adhereTo(new MustBeInArray(NetworkItemType.values())).withMessage("Network item type is invalid. Please specify a valid network item type.");

                must().adhereTo(new Verifier<NetworkItem>() {

                    @Override
                    public VerifierResult verify(NetworkItem ni) {
                        String ipStr = ni.getAddress();
                        VerifierResult passed = new VerifierResult(true);
                        VerifierResult failed = new VerifierResult(false);
                        if (ipStr == null) {
                            return passed;
                        }
                        if(IPUtils.isValidIpv4String(ipStr)) {
                            return passed;
                        }

                        if(IPUtils.isValidIpv4Subnet(ipStr)) {
                            return passed;
                        }
                        if(IPUtils.isValidIpv6String(ipStr)) {
                            return passed;
                        }
                        if(IPUtils.isValidIpv6Subnet(ipStr)) {
                            return passed;
                        }

                        return failed;

                    }
                }).withMessage("Network Address must be valid Ip Address");

                must().adhereTo(new Verifier<NetworkItem>() {
                    @Override
                    public VerifierResult verify(NetworkItem nwi) {
                        String address = nwi.getAddress();
                        if(address == null) {
                            return new VerifierResult(true);
                        }
                        if(IPv4ToolSet.rejectUnwantedIps(address)) {
                            return new VerifierResult(false);
                        }
                        return new VerifierResult(true);
                    }
                }).withMessage("Please specify a valid network item address.");

                // FULL EXPECTATIONS
                result(validationTarget().getAddress()).must().exist().forContext(FULL).withMessage("Must provide an address for the network item.");
                result(validationTarget().getIpVersion()).must().not().exist().forContext(FULL).withMessage("The ip version field cannot be modified.");
                result(validationTarget().getType()).must().exist().forContext(FULL).withMessage("Must provide a valid type for the network item.");

                // PARTIAL EXPECTATIONS
                must().adhereTo(new Verifier<NetworkItem>() {

                    @Override
                    public VerifierResult verify(NetworkItem ni) {
                        return new VerifierResult((ni.getAddress() != null || ni.getType() != null));
                    }
                }).forContext(NetworkItemContext.PARTIAL).withMessage("The network item must have at least one of the following to update: ip address and/or type.");
            }
        });
    }

    @Override
    public ValidatorResult validate(NetworkItem objectToValidate, Object context) {
        ValidatorResult result = validator.validate(objectToValidate, context);
        return ValidatorUtilities.removeEmptyMessages(result);
    }

    @Override
    public Validator<NetworkItem> getValidator() {
        return validator;
    }
}


text:
package com.lsm;

public class BubbleSortMerger implements ListSortMerger {

    private final InsertPosition insertPosition;

    public BubbleSortMerger(InsertPosition insertPosition) {
        this.insertPosition = insertPosition;
    }

    /**
     * Taken from https://en.wikipedia.org/wiki/Bubble_sort#Optimizing_bubble_sort
     *
     * @param array array to sort in-place
     */
    private static void bubbleSort(int[] array) {

        int n = array.length;

        do {
            int newN = 0;

            for (int i = 1; i < n; i++) {
                if (array[i - 1] > array[i]) {
                    swap(array, i - 1, i);
                    newN = i;
                }
            }

            n = newN;
        } while (n != 0);

    }

    private static void swap(int[] array, int i1, int i2) {
        int tmp = array[i1];
        array[i1] = array[i2];
        array[i2] = tmp;
    }

    @Override
    public int[] sortMerge(int[] left, int[] right) {
        int[] result = ListSortMerger.createResultArray(insertPosition, left, right);
        bubbleSort(result);
        return result;
    }

    @Override
    public String getName() {
        return "BubbleSort-" + insertPosition;
    }

}


text:
package pal;

import java.util.ConcurrentModificationException;
import java.util.Iterator;

public class Queue implements Iterable<Integer>, Iterator<Integer>
{

    private Node  head     =  null;
    private Node  tail     =  null;
    private Node  current  =  null;

    public boolean isEmpty()
    { return head == null; }

    public void enqueue( int id )
    {
        Node old   =  tail;
        tail       =  new Node();
        tail.id    =  id;
        tail.next  =  null;

        if (isEmpty()) head      =  tail;
        else           old.next  =  tail;
    }

    public Integer dequeue()
    {
        int id  =  head.id;
        head    =  head.next;
        if (isEmpty()) tail = null;
        return id;
    }

    public Iterator<Integer> iterator()
    {
    	current  =  head;
    	return this;
    }

    public boolean hasNext()
    { return current != null; }

    public void remove()
    { throw new ConcurrentModificationException();  }

    public Integer next()
    {
    	int id   =  current.id;
    	current  =  current.next;
    	return id;
    }

    private static class Node
    {
        private int   id;
        private Node  next;
    }

}


text:
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.TraceAdminPB.ListSpanReceiversRequestProto (ListSpanReceiversRequestProto(..)) where
import Prelude ((+), (/))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
import qualified Data.Data as Prelude'
import qualified Text.ProtocolBuffers.Header as P'

data ListSpanReceiversRequestProto = ListSpanReceiversRequestProto{}
                                   deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data)

instance P'.Mergeable ListSpanReceiversRequestProto where
  mergeAppend ListSpanReceiversRequestProto ListSpanReceiversRequestProto = ListSpanReceiversRequestProto

instance P'.Default ListSpanReceiversRequestProto where
  defaultValue = ListSpanReceiversRequestProto

instance P'.Wire ListSpanReceiversRequestProto where
  wireSize ft' self'@(ListSpanReceiversRequestProto)
   = case ft' of
       10 -> calc'Size
       11 -> P'.prependMessageSize calc'Size
       _ -> P'.wireSizeErr ft' self'
    where
        calc'Size = 0
  wirePut ft' self'@(ListSpanReceiversRequestProto)
   = case ft' of
       10 -> put'Fields
       11 -> do
               P'.putSize (P'.wireSize 10 self')
               put'Fields
       _ -> P'.wirePutErr ft' self'
    where
        put'Fields
         = do
             Prelude'.return ()
  wireGet ft'
   = case ft' of
       10 -> P'.getBareMessageWith update'Self
       11 -> P'.getMessageWith update'Self
       _ -> P'.wireGetErr ft'
    where
        update'Self wire'Tag old'Self
         = case wire'Tag of
             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self

instance P'.MessageAPI msg' (msg' -> ListSpanReceiversRequestProto) ListSpanReceiversRequestProto where
  getVal m' f' = f' m'

instance P'.GPB ListSpanReceiversRequestProto

instance P'.ReflectDescriptor ListSpanReceiversRequestProto where
  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [])
  reflectDescriptorInfo _
   = Prelude'.read
      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".hadoop.common.ListSpanReceiversRequestProto\", haskellPrefix = [MName \"Hadoop\",MName \"Protos\"], parentModule = [MName \"TraceAdminPB\"], baseName = MName \"ListSpanReceiversRequestProto\"}, descFilePath = [\"Hadoop\",\"Protos\",\"TraceAdminPB\",\"ListSpanReceiversRequestProto.hs\"], isGroup = False, fields = fromList [], descOneofs = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False, lazyFields = False, makeLenses = False}"

instance P'.TextType ListSpanReceiversRequestProto where
  tellT = P'.tellSubMessage
  getT = P'.getSubMessage

instance P'.TextMsg ListSpanReceiversRequestProto where
  textPut msg = Prelude'.return ()
  textGet = Prelude'.return P'.defaultValue


text:
mount -o remount,ro /
zerofree /dev/sda1
shutdown now -h


text:
<!DOCTYPE HTML>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
	<base href="http://www.gameonnation.com/" />
	<meta name="generator" content="notionCMS" />
	<title>game on NATION</title>
	<link href="/?format=feed&type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
	<link href="/?format=feed&type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" />
	<link href="/templates/yoo_bento/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />

<link rel="apple-touch-icon-precomposed" href="/templates/yoo_bento/apple_touch_icon.png">
<link rel="stylesheet" href="/templates/yoo_bento/styles/gameon/css/bootstrap.css">
<link rel="stylesheet" href="/templates/yoo_bento/styles/gameon/css/theme.css">
<link rel="stylesheet" href="/templates/yoo_bento/styles/gameon/css/custom.css">
<link rel="stylesheet" href="/templates/yoo_bento/styles/gameon/css/custom.css">

     BOOK NOW
     CONTACT
     SEARCH

ABOUT

Why game on?

Testimonials

OUR TEAM

PROGRAMS

BLOG

CLIENTS

MEDIA

VIDEOS

PRESS

 div > .uk-panel'}" data-uk-grid-margin>

Steve Shenbaum

Founder and President

Blair Bloomston

Vice President

Leonard Wheeler

Communication Consultant

Erik Stolhanske

Communication Consultant

Chris Friday

Communication Consultant

Brenna Thys

Communication Consultant

Chris Singleton

Communication Consultant

"The game on leadership training will dramatically change the way I do my day to day work. It was exceptional!"

– MCPO Richard Nieman, Commander Master Chief, United States Coast Guard

"Steve and game on's impact is vital to our character development and team morale."

– Neal Huntington, General Manager, Pittsburgh Pirates

"We loved using game on's exercises as inspiration while climbing Mt. Kilimanjaro. Unforgettable!"

– Jason Martinez, Senior Physical Health and Wellness Specialist, Wounded Warrior Project

"Fortune 500 companies and coaches... call game on to get the best out of each other."

– Abby Wambach, 2 Time Olympic Gold Medalist

"game on took us to another level. Any business would benefit from this invaluable curriculum."

– Steven Hunter, Branch Manager, TD Waterhouse, London, Ontario

"That was one of the best team building sessions we've ever experienced."

– Rick Carlisle, Head Coach, 2011 NBA Champion Dallas Mavericks

"The feedback to us as individuals and as a group was spot-on and invaluable."

– Kim Stein, Senior Principal Scientist, Gatorade Sports Science Institute

"With game on, you get an experience like no other. Our teammates remember their "tie-backs" and put them in action to achieve sustainable results."

– Kristi Hoskinson, Wellbeing, Performance and Development Consultant

 div > .uk-panel'}" data-uk-grid-margin>

 div > .uk-panel', row:true}" data-uk-grid-margin >

    Live
Interactive
Training

   Corporate

Military

Sports

    Behavioral
Gamification
Consulting

Organizational Culture

Events

    Digital
Training
Resources

Public Speaking

Team Development

Media Training

 div > .uk-panel'}" data-uk-grid-margin>

"Doing our best to improve the world through purposeful and authentic engagement."

BOOK NOW

 div > .uk-panel'}" data-uk-grid-margin>

 Recent Tweets

 div > .uk-panel', row:true}" data-uk-grid-margin >

                                    game on Nation

Written on <time datetime="10-07-2017 17:18:16 +0000">Monday, 10 July 2017</time>

We've been on this incredible journey for 20 years! Sincere thanks to 941 CEO for honoring our story.

Our... fb.me/wokxQHcv

                                    game on Nation

Written on <time datetime="06-07-2017 20:54:55 +0000">Thursday, 06 July 2017</time>

We are so excited about the new and revamped Season One @Lead_Em_Up curriculum. Check it out. Let's go! #LeadEmUp twitter.com/Lead_Em_Up/sta…

                                    game on Nation

Written on <time datetime="06-07-2017 20:45:16 +0000">Thursday, 06 July 2017</time>

We are so grateful to be partnered with Lead 'Em Up, providing high school coaches with an engaging, cutting edge... fb.me/S7t0rzAg

                                    game on Nation

Written on <time datetime="28-06-2017 19:46:04 +0000">Wednesday, 28 June 2017</time>

It's more than a game. #LetsMovePeople fb.me/QWXu105V

 Recent Posts

 div > .uk-panel', row:true}" data-uk-grid-margin >

                                    Consultant Feature - Brenna Thys

Q&A: Getting to Know Senior Consultant Brenna Thys

Senior Communication Consultant Brenna Thys is a leading expert in communication, presentation, and public speaking skills with a background as...

Read more

                                    Consultant Feature - Chris Friday

Q&A: Getting to Know Senior Consultant Chris Friday

Senior Communication Consultant Chris Friday has been an integral part of the game on team since our days overseeing the Communication &...

Read more

                                    Consultant Feature - Erik Stolhanske

Q&A: Getting to Know Senior Consultant Erik Stolhanske

Senior Communication Consultant Erik Stolhanske is a nationally recognized actor, comedian, writer, and producer. He is best known for...

Read more

Moving people for 20+ years through authentic
and purposeful engagement. Experience the impact.

 div > .uk-panel'}" data-uk-grid-margin>

Copyright © 2017 game on. All Rights Reserved.

ABOUT

Why game on?

Testimonials

OUR TEAM

PROGRAMS

BLOG

CLIENTS

MEDIA

VIDEOS

PRESS


text:
using System.Collections.Generic;
using System.Drawing;

namespace Sokoban.Core
{
    /// <summary>
    /// Contains and manages data (player, level's cells, statistics)
    /// </summary>
    public class Logic
    {
        public readonly Level Map = null;  // template of the level
        Cell[,] cells = null;              // editable instance of the current level

        int playerHx = 0;
        int playerVy = 0;
        Point playerDir = Point.Empty;

        int steps = 0;
        int movements = 0;
        int inPlace = 0;

        public int Steps        { get { return steps;       } }
        public int Movements    { get { return movements;   } }
        public int InPlace      { get { return inPlace;     } }
        public int PlayerHx     { get { return playerHx;    } }
        public int PlayerVy     { get { return playerVy;    } }
        public Point PlayerDir  { get { return playerDir;   } }

        public readonly List<Point> CellsChanged = new List<Point>();
        private Stack<Action> history = new Stack<Action>();

        public Logic(Level map)
        {
            steps = 0;
            Map = map;
            cells = (Cell[,])Map.Cells.Clone();
            inPlace = Map.InPlace;
            playerHx = Map.StartAt.X;
            playerVy = Map.StartAt.Y;
        }

        public Cell CellAt(int hx, int vy)
        {
            return cells[hx, vy];
        }

        private bool CanPlayerMove(Point dir)
        {
            bool canMove = false;

            int newX = playerHx + dir.X;
            int newY = playerVy + dir.Y;

            if (newX > -1 && newX < Map.WidthHx &&
                newY > -1 && newY < Map.HeightVy)
            {
                canMove =
                    cells[newX, newY] == Cell.Empty ||
                    cells[newX, newY] == Cell.Plate;
            }

            return canMove;
        }

        private bool CanPushObject(Point dir)
        {
            bool canPush = false;

            int newX = playerHx + dir.X;
            int newY = playerVy + dir.Y;

            int nextX = newX + dir.X;
            int nextY = newY + dir.Y;

            if (nextX > -1 && nextX < Map.WidthHx &&
                nextY > -1 && nextY < Map.HeightVy)
            {
                canPush =
                    (cells[newX, newY] != Cell.Wall)
                    &&
                    (cells[nextX, nextY] == Cell.Empty ||
                     cells[nextX, nextY] == Cell.Plate);
            }

            return canPush;
        }

        private WhatsUp MoveObjectAbsolute(Point from, Point to)
        {
            WhatsUp result = WhatsUp.Move;
            movements++;

            int fromHx = from.X;
            int fromVy = from.Y;

            Cell cfrom = cells[fromHx, fromVy];
            if (cfrom != Cell.BarrelOnPlate)
                cells[fromHx, fromVy] = Cell.Empty;
            else
            {
                cfrom = Cell.Barrel;
                cells[fromHx, fromVy] = Cell.Plate;
                inPlace--;
            }

            int toHx = to.X;
            int toVy = to.Y;

            if (cells[toHx, toVy] != Cell.Plate)
                cells[toHx, toVy] = cfrom;
            else
            {
                cells[toHx, toVy] = Cell.BarrelOnPlate;
                inPlace++;
                result = WhatsUp.InPlace;
            }

            CellsChanged.Add(new Point(fromHx, fromVy));
            CellsChanged.Add(new Point(toHx, toVy));

            return result;
        }

        private WhatsUp MoveObjectRelative(Point dir)
        {
            Point from = new Point(
                playerHx + dir.X,
                playerVy + dir.Y);

            Point to = new Point(
                from.X + dir.X,
                from.Y + dir.Y);

            return MoveObjectAbsolute(from, to);
        }

        public WhatsUp MovePlayer(Point dir)
        {
            return MovePlayer(dir, false);
        }

        private WhatsUp MovePlayer(Point dir, bool undoMove)
        {
            CellsChanged.Clear();
            WhatsUp result = WhatsUp.Nothing;
            Action act = new Action();

            CellsChanged.Add(new Point(playerHx, playerVy));
            if (CanPlayerMove(dir))
            {
                playerHx += dir.X;
                playerVy += dir.Y;
                CellsChanged.Add(new Point(playerHx, playerVy));
                act.PlayerMove = dir;

                steps++;
                result = WhatsUp.Step;
            }
            else
            {
                if (CanPushObject(dir))
                {
                    result = MoveObjectRelative(dir);

                    CellsChanged.Add(new Point(playerHx, playerVy));
                    playerHx += dir.X;
                    playerVy += dir.Y;
                    CellsChanged.Add(new Point(playerHx, playerVy));
                    act.PlayerMove = dir;
                    act.IsBarrelMovedToo = true;

                    steps++;
                }
            }

            if (!undoMove && !act.IsEmpty)
                history.Push(act);

            if (dir.X != 0)
                playerDir.X = dir.X;

            if (dir.Y != 0)
                playerDir.Y = dir.Y;

            if (inPlace == Map.Plates ||
                inPlace == Map.Barrels)
            {
                result = WhatsUp.Win;
                G.I.Win();
            }

            return result;
        }

        public WhatsUp Undo()
        {
            if (history.Count == 0)
                return WhatsUp.Nothing;

            Action act = history.Pop();

            MovePlayer(
                new Point(-act.PlayerMove.X, -act.PlayerMove.Y),
                true);

            if (act.IsBarrelMovedToo)
                MoveObjectAbsolute(
                    new Point(playerHx + act.PlayerMove.X * 2, playerVy + act.PlayerMove.Y * 2),
                    new Point(playerHx + act.PlayerMove.X, PlayerVy + act.PlayerMove.Y));

            return WhatsUp.Undo;
        } // Undo()

        private class Action
        {
            public Point PlayerMove = Point.Empty;
            public bool IsBarrelMovedToo = false;

            public bool IsEmpty { get { return PlayerMove == Point.Empty; } }
        }

    } // class Logic
}


text:
// <auto-generated />
namespace MvcEasyOrderSystem.Migrations
{
    using System.Data.Entity.Migrations;
    using System.Data.Entity.Migrations.Infrastructure;
    using System.Resources;

    public sealed partial class Order_TPH : IMigrationMetadata
    {
        private readonly ResourceManager Resources = new ResourceManager(typeof(Order_TPH));

        string IMigrationMetadata.Id
        {
            get { return "201211111132246_Order_TPH"; }
        }

        string IMigrationMetadata.Source
        {
            get { return Resources.GetString("Source"); }
        }

        string IMigrationMetadata.Target
        {
            get { return Resources.GetString("Target"); }
        }
    }
}


text:
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.Collections.Generic;

namespace System.Management.Automation
{
    //
    // SpecialVariables contains the names and variable paths to any variable that PowerShell depends
    // on in some way, either in that it is an automatic variable (created and updated automatically)
    // or configuration variables that users may or may not set.
    //
    // The convention is to have a const string field with either the exact variable name, or if that's
    // not possible, a suggestive name, such as Underbar.  Having a field is preferred over explicit strings
    // to make searching easier.
    //
    // The other convention is to have a VariablePath field with "VarPath" appended to the string
    // field name.  In general, it is preferred to use the VariablePath instead of the string
    // because we'll end up creating a VariablePath anyway, so doing it once is faster.
    //
    internal static class SpecialVariables
    {
        internal const string HistorySize = "MaximumHistoryCount";

        internal static readonly VariablePath HistorySizeVarPath = new VariablePath(HistorySize);

        internal const string MyInvocation = "MyInvocation";

        internal static readonly VariablePath MyInvocationVarPath = new VariablePath(MyInvocation);

        internal const string OFS = "OFS";

        internal static readonly VariablePath OFSVarPath = new VariablePath(OFS);

        internal const string PSStyle = "PSStyle";

        internal static readonly VariablePath PSStyleVarPath = new VariablePath(PSStyle);

        internal const string OutputEncoding = "OutputEncoding";

        internal static readonly VariablePath OutputEncodingVarPath = new VariablePath(OutputEncoding);

        internal const string VerboseHelpErrors = "VerboseHelpErrors";

        internal static readonly VariablePath VerboseHelpErrorsVarPath = new VariablePath(VerboseHelpErrors);

        #region Logging Variables

        internal const string LogEngineHealthEvent = "LogEngineHealthEvent";

        internal static readonly VariablePath LogEngineHealthEventVarPath = new VariablePath(LogEngineHealthEvent);

        internal const string LogEngineLifecycleEvent = "LogEngineLifecycleEvent";

        internal static readonly VariablePath LogEngineLifecycleEventVarPath = new VariablePath(LogEngineLifecycleEvent);

        internal const string LogCommandHealthEvent = "LogCommandHealthEvent";

        internal static readonly VariablePath LogCommandHealthEventVarPath = new VariablePath(LogCommandHealthEvent);

        internal const string LogCommandLifecycleEvent = "LogCommandLifecycleEvent";

        internal static readonly VariablePath LogCommandLifecycleEventVarPath = new VariablePath(LogCommandLifecycleEvent);

        internal const string LogProviderHealthEvent = "LogProviderHealthEvent";

        internal static readonly VariablePath LogProviderHealthEventVarPath = new VariablePath(LogProviderHealthEvent);

        internal const string LogProviderLifecycleEvent = "LogProviderLifecycleEvent";

        internal static readonly VariablePath LogProviderLifecycleEventVarPath = new VariablePath(LogProviderLifecycleEvent);

        internal const string LogSettingsEvent = "LogSettingsEvent";

        internal static readonly VariablePath LogSettingsEventVarPath = new VariablePath(LogSettingsEvent);

        internal const string PSLogUserData = "PSLogUserData";

        internal static readonly VariablePath PSLogUserDataPath = new VariablePath(PSLogUserData);

        #endregion Logging Variables

        internal const string NestedPromptLevel = "NestedPromptLevel";

        internal static readonly VariablePath NestedPromptCounterVarPath = new VariablePath("global:" + NestedPromptLevel);

        internal const string CurrentlyExecutingCommand = "CurrentlyExecutingCommand";

        internal static readonly VariablePath CurrentlyExecutingCommandVarPath = new VariablePath(CurrentlyExecutingCommand);

        internal const string PSBoundParameters = "PSBoundParameters";

        internal static readonly VariablePath PSBoundParametersVarPath = new VariablePath(PSBoundParameters);

        internal const string Matches = "Matches";

        internal static readonly VariablePath MatchesVarPath = new VariablePath(Matches);

        internal const string LastExitCode = "LASTEXITCODE";

        internal static readonly VariablePath LastExitCodeVarPath = new VariablePath("global:" + LastExitCode);

        internal const string PSDebugContext = "PSDebugContext";

        internal static readonly VariablePath PSDebugContextVarPath = new VariablePath(PSDebugContext);

        internal const string StackTrace = "StackTrace";

        internal static readonly VariablePath StackTraceVarPath = new VariablePath("global:" + StackTrace);

        internal const string FirstToken = "^";

        internal static readonly VariablePath FirstTokenVarPath = new VariablePath("global:" + FirstToken);

        internal const string LastToken = "$";

        internal static readonly VariablePath LastTokenVarPath = new VariablePath("global:" + LastToken);

        internal static bool IsUnderbar(string name) { return name.Length == 1 && name[0] == '_'; }

        internal const string PSItem = "PSItem";  // simple alias for $_
        internal const string Underbar = "_";

        internal static readonly VariablePath UnderbarVarPath = new VariablePath(Underbar);

        internal const string Question = "?";

        internal static readonly VariablePath QuestionVarPath = new VariablePath(Question);

        internal const string Args = "args";

        internal static readonly VariablePath ArgsVarPath = new VariablePath("local:" + Args);

        internal const string This = "this";

        internal static readonly VariablePath ThisVarPath = new VariablePath("this");

        internal const string Input = "input";

        internal static readonly VariablePath InputVarPath = new VariablePath("local:" + Input);

        internal const string PSCmdlet = "PSCmdlet";

        internal static readonly VariablePath PSCmdletVarPath = new VariablePath("PSCmdlet");

        internal const string Error = "error";

        internal static readonly VariablePath ErrorVarPath = new VariablePath("global:" + Error);

        internal const string EventError = "error";

        internal static readonly VariablePath EventErrorVarPath = new VariablePath("script:" + EventError);
#if !UNIX
        internal const string PathExt = "env:PATHEXT";

        internal static readonly VariablePath PathExtVarPath = new VariablePath(PathExt);
#endif
        internal const string PSEmailServer = "PSEmailServer";

        internal static readonly VariablePath PSEmailServerVarPath = new VariablePath(PSEmailServer);

        internal const string PSDefaultParameterValues = "PSDefaultParameterValues";

        internal static readonly VariablePath PSDefaultParameterValuesVarPath = new VariablePath(PSDefaultParameterValues);

        internal const string PSScriptRoot = "PSScriptRoot";

        internal static readonly VariablePath PSScriptRootVarPath = new VariablePath(PSScriptRoot);

        internal const string PSCommandPath = "PSCommandPath";

        internal static readonly VariablePath PSCommandPathVarPath = new VariablePath(PSCommandPath);

        internal const string PSSenderInfo = "PSSenderInfo";

        internal static readonly VariablePath PSSenderInfoVarPath = new VariablePath(PSSenderInfo);

        internal const string @foreach = "foreach";

        internal static readonly VariablePath foreachVarPath = new VariablePath("local:" + @foreach);

        internal const string @switch = "switch";

        internal static readonly VariablePath switchVarPath = new VariablePath("local:" + @switch);

        internal const string pwd = "PWD";

        internal static readonly VariablePath PWDVarPath = new VariablePath("global:" + pwd);

        internal const string Null = "null";

        internal static readonly VariablePath NullVarPath = new VariablePath("null");

        internal const string True = "true";

        internal static readonly VariablePath TrueVarPath = new VariablePath("true");

        internal const string False = "false";

        internal static readonly VariablePath FalseVarPath = new VariablePath("false");

        internal const string PSModuleAutoLoading = "PSModuleAutoLoadingPreference";

        internal static readonly VariablePath PSModuleAutoLoadingPreferenceVarPath = new VariablePath("global:" + PSModuleAutoLoading);

        #region Platform Variables

        internal const string IsLinux = "IsLinux";

        internal static readonly VariablePath IsLinuxPath = new VariablePath("IsLinux");

        internal const string IsMacOS = "IsMacOS";

        internal static readonly VariablePath IsMacOSPath = new VariablePath("IsMacOS");

        internal const string IsWindows = "IsWindows";

        internal static readonly VariablePath IsWindowsPath = new VariablePath("IsWindows");

        internal const string IsCoreCLR = "IsCoreCLR";

        internal static readonly VariablePath IsCoreCLRPath = new VariablePath("IsCoreCLR");

        #endregion

        #region Preference Variables

        internal const string DebugPreference = "DebugPreference";

        internal static readonly VariablePath DebugPreferenceVarPath = new VariablePath(DebugPreference);

        internal const string ErrorActionPreference = "ErrorActionPreference";

        internal static readonly VariablePath ErrorActionPreferenceVarPath = new VariablePath(ErrorActionPreference);

        internal const string ProgressPreference = "ProgressPreference";

        internal static readonly VariablePath ProgressPreferenceVarPath = new VariablePath(ProgressPreference);

        internal const string VerbosePreference = "VerbosePreference";

        internal static readonly VariablePath VerbosePreferenceVarPath = new VariablePath(VerbosePreference);

        internal const string WarningPreference = "WarningPreference";

        internal static readonly VariablePath WarningPreferenceVarPath = new VariablePath(WarningPreference);

        internal const string WhatIfPreference = "WhatIfPreference";

        internal static readonly VariablePath WhatIfPreferenceVarPath = new VariablePath(WhatIfPreference);

        internal const string ConfirmPreference = "ConfirmPreference";

        internal static readonly VariablePath ConfirmPreferenceVarPath = new VariablePath(ConfirmPreference);

        internal const string InformationPreference = "InformationPreference";

        internal static readonly VariablePath InformationPreferenceVarPath = new VariablePath(InformationPreference);

        #endregion Preference Variables

        internal const string PSNativeCommandUseErrorActionPreference = nameof(PSNativeCommandUseErrorActionPreference);

        internal static readonly VariablePath PSNativeCommandUseErrorActionPreferenceVarPath =
            new(PSNativeCommandUseErrorActionPreference);

        // Native command argument passing style
        internal const string NativeArgumentPassing = "PSNativeCommandArgumentPassing";

        internal static readonly VariablePath NativeArgumentPassingVarPath = new VariablePath(NativeArgumentPassing);

        internal const string ErrorView = "ErrorView";

        internal static readonly VariablePath ErrorViewVarPath = new VariablePath(ErrorView);

        /// <summary>
        /// Shell environment variable.
        /// </summary>
        internal const string PSSessionConfigurationName = "PSSessionConfigurationName";

        internal static readonly VariablePath PSSessionConfigurationNameVarPath = new VariablePath("global:" + PSSessionConfigurationName);

        /// <summary>
        /// Environment variable that will define the default
        /// application name for the connection uri.
        /// </summary>
        internal const string PSSessionApplicationName = "PSSessionApplicationName";

        internal static readonly VariablePath PSSessionApplicationNameVarPath = new VariablePath("global:" + PSSessionApplicationName);

        #region AllScope variables created in every session

        internal const string ExecutionContext = "ExecutionContext";
        internal const string Home = "HOME";
        internal const string Host = "Host";
        internal const string PID = "PID";
        internal const string PSCulture = "PSCulture";
        internal const string PSHome = "PSHOME";
        internal const string PSUICulture = "PSUICulture";
        internal const string PSVersionTable = "PSVersionTable";
        internal const string PSEdition = "PSEdition";
        internal const string ShellId = "ShellId";
        internal const string EnabledExperimentalFeatures = "EnabledExperimentalFeatures";

        #endregion AllScope variables created in every session

        internal static readonly string[] AutomaticVariables = {
                                                                   SpecialVariables.Underbar,
                                                                   SpecialVariables.Args,
                                                                   SpecialVariables.This,
                                                                   SpecialVariables.Input,
                                                                   SpecialVariables.PSCmdlet,
                                                                   SpecialVariables.PSBoundParameters,
                                                                   SpecialVariables.MyInvocation,
                                                                   SpecialVariables.PSScriptRoot,
                                                                   SpecialVariables.PSCommandPath,
                                                               };

        internal static readonly Type[] AutomaticVariableTypes = {
                                                                   /* Underbar */          typeof(object),
                                                                   /* Args */              typeof(object[]),
                                                                   /* This */              typeof(object),
                                                                   /* Input */             typeof(object),
                                                                   /* PSCmdlet */          typeof(PSScriptCmdlet),
                                                                   /* PSBoundParameters */ typeof(PSBoundParametersDictionary),
                                                                   /* MyInvocation */      typeof(InvocationInfo),
                                                                   /* PSScriptRoot */      typeof(string),
                                                                   /* PSCommandPath */     typeof(string),
                                                                 };

        // This array and the one below it exist to optimize the way common parameters work in advanced functions.
        // Common parameters work by setting preference variables in the scope of the function and restoring the old value afterward.
        // Variables that don't correspond to common cmdlet parameters don't need to be added here.
        internal static readonly string[] PreferenceVariables =
        {
            SpecialVariables.DebugPreference,
            SpecialVariables.VerbosePreference,
            SpecialVariables.ErrorActionPreference,
            SpecialVariables.WhatIfPreference,
            SpecialVariables.WarningPreference,
            SpecialVariables.InformationPreference,
            SpecialVariables.ConfirmPreference,
        };

        internal static readonly Type[] PreferenceVariableTypes =
        {
            /* DebugPreference */                         typeof(ActionPreference),
            /* VerbosePreference */                       typeof(ActionPreference),
            /* ErrorPreference */                         typeof(ActionPreference),
            /* WhatIfPreference */                        typeof(SwitchParameter),
            /* WarningPreference */                       typeof(ActionPreference),
            /* InformationPreference */                   typeof(ActionPreference),
            /* ConfirmPreference */                       typeof(ConfirmImpact),
        };

        // The following variables are created in every session w/ AllScope.  We avoid creating local slots when we
        // see an assignment to any of these variables so that they get handled properly (either throwing an exception
        // because they are constant/readonly, or having the value persist in parent scopes where the allscope variable
        // also exists.
        internal static readonly string[] AllScopeVariables = {
                                                                  SpecialVariables.Question,
                                                                  SpecialVariables.ExecutionContext,
                                                                  SpecialVariables.False,
                                                                  SpecialVariables.Home,
                                                                  SpecialVariables.Host,
                                                                  SpecialVariables.PID,
                                                                  SpecialVariables.PSCulture,
                                                                  SpecialVariables.PSHome,
                                                                  SpecialVariables.PSUICulture,
                                                                  SpecialVariables.PSVersionTable,
                                                                  SpecialVariables.PSEdition,
                                                                  SpecialVariables.ShellId,
                                                                  SpecialVariables.True,
                                                                  SpecialVariables.EnabledExperimentalFeatures,
                                                              };

        private static readonly HashSet<string> s_classMethodsAccessibleVariables = new HashSet<string>
            (
                new string[]
                {
                    SpecialVariables.LastExitCode,
                    SpecialVariables.Error,
                    SpecialVariables.StackTrace,
                    SpecialVariables.OutputEncoding,
                    SpecialVariables.NestedPromptLevel,
                    SpecialVariables.pwd,
                    SpecialVariables.Matches,
                },
                StringComparer.OrdinalIgnoreCase
            );

        internal static bool IsImplicitVariableAccessibleInClassMethod(VariablePath variablePath)
        {
            return s_classMethodsAccessibleVariables.Contains(variablePath.UserPath);
        }
    }

    internal enum AutomaticVariable
    {
        Underbar = 0,
        Args = 1,
        This = 2,
        Input = 3,
        PSCmdlet = 4,
        PSBoundParameters = 5,
        MyInvocation = 6,
        PSScriptRoot = 7,
        PSCommandPath = 8,
        NumberOfAutomaticVariables // 1 + the last, used to initialize global scope.
    }

    internal enum PreferenceVariable
    {
        Debug = 9,
        Verbose = 10,
        Error = 11,
        WhatIf = 12,
        Warning = 13,
        Information = 14,
        Confirm = 15,
    }
}


text:
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (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.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Jetpack.
 *
 * The Initial Developer of the Original Code is Nickolay Ponomarev.
 * Portions created by the Initial Developer are Copyright (C) 2010
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Nickolay Ponomarev <asqueella@gmail.com> (Original Author)
 *   Irakli Gozalishvili <gozala@mozilla.com>
 *   Drew Willcoxon <adw@mozilla.com>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

"use strict";
const { URL } = require("./url");

exports.MatchPattern = MatchPattern;

function MatchPattern(pattern) {
  if (typeof pattern.test == "function") {

    // For compatibility with -moz-document rules, we require the RegExp's
    // global, ignoreCase, and multiline flags to be set to false.
    if (pattern.global) {
      throw new Error("A RegExp match pattern cannot be set to `global` " +
                      "(i.e. //g).");
    }
    if (pattern.ignoreCase) {
      throw new Error("A RegExp match pattern cannot be set to `ignoreCase` " +
                      "(i.e. //i).");
    }
    if (pattern.multiline) {
      throw new Error("A RegExp match pattern cannot be set to `multiline` " +
                      "(i.e. //m).");
    }

    this.regexp = pattern;
  }
  else {
    let firstWildcardPosition = pattern.indexOf("*");
    let lastWildcardPosition = pattern.lastIndexOf("*");
    if (firstWildcardPosition != lastWildcardPosition)
      throw new Error("There can be at most one '*' character in a wildcard.");

    if (firstWildcardPosition == 0) {
      if (pattern.length == 1)
        this.anyWebPage = true;
      else if (pattern[1] != ".")
        throw new Error("Expected a *.<domain name> string, got: " + pattern);
      else
        this.domain = pattern.substr(2);
    }
    else {
      if (pattern.indexOf(":") == -1) {
        throw new Error("When not using *.example.org wildcard, the string " +
                        "supplied is expected to be either an exact URL to " +
                        "match or a URL prefix. The provided string ('" +
                        pattern + "') is unlikely to match any pages.");
      }

      if (firstWildcardPosition == -1)
        this.exactURL = pattern;
      else if (firstWildcardPosition == pattern.length - 1)
        this.urlPrefix = pattern.substr(0, pattern.length - 1);
      else {
        throw new Error("The provided wildcard ('" + pattern + "') has a '*' " +
                        "in an unexpected position. It is expected to be the " +
                        "first or the last character in the wildcard.");
      }
    }
  }
}

MatchPattern.prototype = {

  test: function MatchPattern_test(urlStr) {
    try {
      var url = URL(urlStr);
    }
    catch (err) {
      return false;
    }

    // Test the URL against a RegExp pattern.  For compatibility with
    // -moz-document rules, we require the RegExp to match the entire URL,
    // so we not only test for a match, we also make sure the matched string
    // is the entire URL string.
    //
    // Assuming most URLs don't match most match patterns, we call `test` for
    // speed when determining whether or not the URL matches, then call `exec`
    // for the small subset that match to make sure the entire URL matches.
    //
    if (this.regexp && this.regexp.test(urlStr) &&
        this.regexp.exec(urlStr)[0] == urlStr)
      return true;

    if (this.anyWebPage && /^(https?|ftp)$/.test(url.scheme))
      return true;
    if (this.exactURL && this.exactURL == urlStr)
      return true;
    if (this.domain && url.host &&
        url.host.slice(-this.domain.length) == this.domain)
      return true;
    if (this.urlPrefix && 0 == urlStr.indexOf(this.urlPrefix))
      return true;

    return false;
  }

};


text:
var _ = require('lodash');
var sub = require('string-sub');

var base = require('../../../base');

var STR_SUB_HAS_CHANGED = base.STR_SUB_HAS_CHANGED;

var REGEX = require('../regex');

var btnRegex = REGEX.REGEX_BTN_CLASS;
var getRegExp = REGEX.getRegExp;

var js = {};

_.forEach(
	REGEX.MAP_CLASS_NAMES_CONVERT_JS,
	function(item, index) {
		js[index] = {
			message: function(result, rule, context) {
				return sub(STR_SUB_HAS_CHANGED, result[0], item);
			},
			regex: getRegExp('\\b(-)?(' + index + ')\\b', 'g'),
			replacer: function(result, rule, context) {
				var rawContent = context.rawContent;

				rawContent = rawContent.replace(rule.regex, rule._formatReplacement());

				return rawContent;
			},
			test: function(content, regex, rule) {
				var match = content.match(regex);

				if (match && !_.startsWith(match[0], '-') && !btnRegex.test(content)) {
					return match;
				}
			},
			_formatReplacement: function() {
				var formattedReplacement = item;

				var items = formattedReplacement.split(' ');

				if (items.length > 1) {
					formattedReplacement = _.map(
						items,
						function(className, index) {
							if (index > 0) {
								className = '.' + className;
							}

							return className;
						}
					).join(' ');
				}

				return formattedReplacement;
			}
		};
	}
);

module.exports = js;


text:
<!DOCTYPE html>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge>
<meta name="viewport" content="width=device-width, initial-scale=1">
	<title> All_American_Code // Profile</title>
<meta name="descripition" content="Software Engineering Firm ">
<meta name="keywords" content="All American, code, profile, Mudassir Faraz Sharif, html, javascript, java, css, php, sql, linux, seo,
web development, software engineering, jquery, debugging, networking, cybersecurity, cryptography, integration, programming, Database">
	<link rel="stylesheet" href="stylesheets/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" herf="stylesheets/style.css">
	<link herf="https://fonts.googleapis.com/css?family=Fira+Sans:500 rel="stylesheet">
	<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" intergrity="sha384-wvfXpqpZZVQGK6TAhPV1GOfQNHSoD2xbE+QkPxCAF1NEevoEH3S10sibVcOQVnN" crossorigin="ananymous">

			::before

									HOME

									WORK

									ABOUT

									CONTACT

							::after

				::after

				::before

							::before

All American Code

Software Development

						::after

				::before

Start up based in chicago

 We specilize in software and algorithmic development for product enhancement and
						marketibility

				::after

					::before

FULL-STACK DEVELOPER

RECENT WORK

					::after

					::before

								<img class="img-responsive" src="imgs/angular.png" alt="Partner Company"

Front-End

Angular.JS Based Suggestion Box

							<a href="https://image-search-api1.herokuapp.com/

						:after

					::before

						View More Work

						::after

					::before

								::before

								::before

								:before

								::before

					::after

					::before

					 (c) 2017 Mudassir F. Sharif. All rights reserved

					::after


text:
'''
Test for reconnect primary storage

@author: quarkonics
'''

import os
import time
import commands
#import sys

import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.operations.resource_operations as res_ops
import zstackwoodpecker.operations.primarystorage_operations as ps_ops

_config_ = {
        'timeout' : 360,
        'noparallel' : True
        }

def test():
    test_util.test_dsc('primary storage reconnection check test')

    for ps in res_ops.query_resource(res_ops.PRIMARY_STORAGE):
        reconnect_ret =  ps_ops.reconnect_primary_storage(ps.uuid)
        if reconnect_ret.status != "Connected":
            test_util.test_pass("Reconnect primary storage fail: %s" % (reconnect_ret.status))

    test_util.test_pass("Reconnect primary storage pass")


text:
namespace sdk_util {

// ThreadSafeQueue
//
// A simple template to support multithreaded and optionally blocking access
// to a Queue of object pointers.
//
template<class T> class ThreadSafeQueue {
 public:
  ThreadSafeQueue() {
    pthread_cond_init(&cond_, NULL);
  }

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

  ~ThreadSafeQueue() {
    pthread_cond_destroy(&cond_);
  }

  void Enqueue(T* item) {
    AUTO_LOCK(lock_);
    list_.push_back(item);

    pthread_cond_signal(&cond_);
  }

  T* Dequeue(bool block) {
    AUTO_LOCK(lock_);

    // If blocking enabled, wait until we queue is non-empty
    if (block) {
      while (list_.empty()) pthread_cond_wait(&cond_, lock_.mutex());
    }

    if (list_.empty()) return NULL;

    T* item = list_.front();
    list_.pop_front();
    return item;
  }

 private:
  std::list<T*> list_;
  pthread_cond_t  cond_;
  SimpleLock lock_;
};

}  // namespace sdk_util

#endif  // LIBRARIES_SDK_UTIL_THREAD_SAFE_QUEUE_H_


text:
package synergynetframework.appsystem.services.net.tablecomms.messages.control.fromclient;

import synergynetframework.appsystem.services.net.tablecomms.messages.control.FromClientTableControlMessage;

/**
 * The Class ApplicationCommsRequest.
 */
public class ApplicationCommsRequest extends FromClientTableControlMessage {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -4243901423562317496L;

	/** The application name. */
	private String applicationName;

	/**
	 * Instantiates a new application comms request.
	 */
	public ApplicationCommsRequest() {
		super();
	}

	/**
	 * Instantiates a new application comms request.
	 *
	 * @param name
	 *            the name
	 */
	public ApplicationCommsRequest(String name) {
		this.setApplicationName(name);
	}

	/**
	 * Gets the application name.
	 *
	 * @return the application name
	 */
	public String getApplicationName() {
		return applicationName;
	}

	/**
	 * Sets the application name.
	 *
	 * @param name
	 *            the new application name
	 */
	public void setApplicationName(String name) {
		this.applicationName = name;
	}

	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return ApplicationCommsRequest.class.getName() + " for "
				+ applicationName + " from " + getSender();
	}
}


text:
require('@babel/register')({
  presets: ['@babel/preset-env', '@babel/preset-react']
})

const express = require('express')
const path = require('path')
const ssr = require('./ssr').default

const app = express()

const port = 4000

app.use(express.static(path.join(__dirname, 'static')))

app.get('/', (req, res) => {
  res.send(ssr())
})

app.listen(port, () => console.log(`server is listening at http://localhost:${port}`))


text:
package io.fabric8.dosgi.util;

import java.io.StringReader;
import java.io.StringWriter;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;

import io.fabric8.dosgi.impl.EndpointDescription;
import org.osgi.framework.BundleContext;

public class Utils {

    public static final String FRAMEWORK_UUID = "org.osgi.framework.uuid";

    public static String getUUID(BundleContext bundleContext) {
        String uuid = bundleContext.getProperty(FRAMEWORK_UUID);
        if (uuid == null) {
            synchronized (FRAMEWORK_UUID) {
                uuid = bundleContext.getProperty(FRAMEWORK_UUID);
                if (uuid == null) {
                    uuid = UuidGenerator.getUUID();
                    System.setProperty(FRAMEWORK_UUID, uuid);
                }
            }
        }
        return uuid;
    }

    public static Set<String> normalize(Object object) {
        Set<String> strings = new HashSet<String>();
        if (object instanceof String) {
            strings.add((String) object);
        } else if (object instanceof String[]) {
            for (String s : (String[]) object) {
                strings.add(s);
            }
        } else if (object instanceof Collection) {
            for (Object o : (Collection) object) {
                if (o instanceof String) {
                    strings.add((String) o);
                }
            }
        }
        return strings;
    }

    private static final String REMOTE_SERVICES_ADMIN_NS = "http://www.osgi.org/xmlns/rsa/v1.0.0";
    private static final String ENDPOINT_DESCRIPTIONS = "endpoint-descriptions";
    private static final String ENDPOINT_DESCRIPTION = "endpoint-description";
    private static final String PROPERTY = "property";
    private static final String ARRAY = "array";
    private static final String SET = "set";
    private static final String LIST = "list";
    private static final String NAME = "name";
    private static final String VALUE = "value";
    private static final String VALUE_TYPE = "value-type";

    public static String getEndpointDescriptionXML(EndpointDescription endpoint) throws XMLStreamException {
        Map<String, Object> properties = endpoint.getProperties();
        StringWriter writer = new StringWriter();
        XMLStreamWriter xml = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);

        xml.writeStartDocument();
        xml.setDefaultNamespace(REMOTE_SERVICES_ADMIN_NS);
        xml.writeStartElement(REMOTE_SERVICES_ADMIN_NS, ENDPOINT_DESCRIPTIONS);
        xml.writeNamespace("", REMOTE_SERVICES_ADMIN_NS);
        xml.writeStartElement(REMOTE_SERVICES_ADMIN_NS, ENDPOINT_DESCRIPTION);

        for (Map.Entry<String, Object> entry : properties.entrySet()) {
            String key = entry.getKey();
            Object val = entry.getValue();
            xml.writeStartElement(REMOTE_SERVICES_ADMIN_NS, PROPERTY);
            xml.writeAttribute(NAME, key);
            if (val.getClass().isArray()) {
                setValueType(xml, val.getClass().getComponentType().getName());
                xml.writeStartElement(REMOTE_SERVICES_ADMIN_NS, ARRAY);
                for (int i = 0, l = Array.getLength(val); i < l; i++) {
                    xml.writeStartElement(REMOTE_SERVICES_ADMIN_NS, VALUE);
                    xml.writeCharacters(Array.get(val, i).toString());
                    xml.writeEndElement();
                }
                xml.writeEndElement();
            } else if (val instanceof List) {
                xml.writeStartElement(REMOTE_SERVICES_ADMIN_NS, LIST);
                handleCollectionValue(xml, (Collection) val);
                xml.writeEndElement();
            } else if (val instanceof Set) {
                xml.writeStartElement(REMOTE_SERVICES_ADMIN_NS, SET);
                handleCollectionValue(xml, (Collection) val);
                xml.writeEndElement();
            } else {
                xml.writeAttribute(VALUE, val.toString());
                setValueType(xml, val.getClass().getName());
            }
            xml.writeEndElement();
        }

        xml.writeEndElement();
        xml.writeEndElement();
        xml.writeEndDocument();
        xml.close();

        return writer.toString();
    }

    private static void handleCollectionValue(XMLStreamWriter xml, Collection val) throws XMLStreamException {
        for (Object o : val) {
            xml.writeStartElement(REMOTE_SERVICES_ADMIN_NS, VALUE);
            setValueType(xml, o.getClass().getName());
            xml.writeCharacters(o.toString());
            xml.writeEndElement();
        }
    }

    private static void setValueType(XMLStreamWriter xml, String dataType) throws XMLStreamException {
        if (dataType.equals(String.class.getName())) {
            return;
        }
        if (dataType.startsWith("java.lang.")) {
            dataType = dataType.substring("java.lang.".length());
        }
        xml.writeAttribute(VALUE_TYPE, dataType);
    }

    public static EndpointDescription getEndpointDescription(String data) throws XMLStreamException {
        List<EndpointDescription> endpoints = getEndpointDescriptions(data);
        if (endpoints == null || endpoints.size() != 1) {
            throw new IllegalArgumentException();
        }
        return endpoints.get(0);
    }

    public static List<EndpointDescription> getEndpointDescriptions(String data) throws XMLStreamException {
        List<EndpointDescription> endpoints = new ArrayList<EndpointDescription>();
        Map<String, Object> properties = null;
        String key = null;
        String type = null;
        String value = null;
        Object val = null;
        String txt = null;
        XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(data));
        for (;;) {
            int code = reader.next();
            switch (code) {
                case XMLStreamConstants.START_DOCUMENT:
                    break;
                case XMLStreamConstants.START_ELEMENT:
                    if (ENDPOINT_DESCRIPTION.equals(reader.getLocalName())) {
                        properties = new HashMap<String, Object>();
                    } else if (PROPERTY.equals(reader.getLocalName())) {
                        key = reader.getAttributeValue(null, NAME);
                        type = reader.getAttributeValue(null, VALUE_TYPE);
                        value = reader.getAttributeValue(null, VALUE);
                        val = null;
                    } else if (ARRAY.equals(reader.getLocalName())) {
                        val = Array.newInstance(TYPES.get(type == null ? "String" : type), 0);
                    } else if (SET.equals(reader.getLocalName())) {
                        val = new HashSet<Object>();
                    } else if (LIST.equals(reader.getLocalName())) {
                        val = new ArrayList<Object>();
                    } else if (VALUE.equals(reader.getLocalName())) {
                        txt = null;
                    }
                    break;
                case XMLStreamConstants.CHARACTERS:
                    if (txt == null) {
                        txt = reader.getText();
                    } else {
                        txt += reader.getText();
                    }
                    break;
                case XMLStreamConstants.END_ELEMENT:
                    if (ENDPOINT_DESCRIPTION.equals(reader.getLocalName())) {
                        endpoints.add(new EndpointDescription(properties));
                        properties = null;
                    } else if (PROPERTY.equals(reader.getLocalName())) {
                        if (key == null || (val == null && value == null) || (val != null && value != null)) {
                            throw new IllegalArgumentException();
                        }
                        if (value != null) {
                            val = instantiate(type == null ? "String" : type, value);
                        }
                        properties.put(key, val);
                    } else if (VALUE.equals(reader.getLocalName())) {
                        if (val.getClass().isArray()) {
                            int len = Array.getLength(val);
                            Object a = Array.newInstance(TYPES.get(type == null ? "String" : type), len + 1);
                            System.arraycopy(val, 0, a, 0, len);
                            Array.set(a, len, instantiate(type == null ? "String" : type, txt));
                            val = a;
                        } else {
                            ((Collection) val).add(instantiate(type == null ? "String" : type, txt));
                        }
                    }
                    break;
                case XMLStreamConstants.END_DOCUMENT:
                    return endpoints;
            }
        }
    }

    private static final Map<String, Class> TYPES;
    static {
        Map<String, Class> types = new HashMap<String, Class>();
        types.put("long", long.class);
        types.put("Long", Long.class);
        types.put("double", double.class);
        types.put("Double", Double.class);
        types.put("float", float.class);
        types.put("Float", Float.class);
        types.put("int", int.class);
        types.put("Integer", Integer.class);
        types.put("byte", byte.class);
        types.put("Byte", Byte.class);
        types.put("char", char.class);
        types.put("Character", Character.class);
        types.put("boolean", boolean.class);
        types.put("Double", Double.class);
        types.put("short", short.class);
        types.put("Short", Short.class);
        types.put("String", String.class);
        TYPES = types;
    }

    private static Object instantiate(String type, String value) {
        if ("String".equals(type)) {
            return value;
        }
        value = value.trim();
        String boxedType = null;
        if ("long".equals(type)) {
            boxedType = "Long";
        } else if ("double".equals(type)) {
            boxedType = "Double";
        } else if ("float".equals(type)) {
            boxedType = "Float";
        } else if ("int".equals(type)) {
            boxedType = "Integer";
        } else if ("byte".equals(type)) {
            boxedType = "Byte";
        } else if ("char".equals(type)) {
            boxedType = "Character";
        } else if ("boolean".equals(type)) {
            boxedType = "Boolean";
        } else if ("short".equals(type)) {
            boxedType = "Short";
        }
        if (boxedType == null) {
            boxedType = type;
        }
        String javaType = "java.lang." + boxedType;
        if (boxedType.equals("Character")) {
            return value.charAt(0);
        }
        try {
            Class<?> cls = ClassLoader.getSystemClassLoader().loadClass(javaType);
            Constructor<?> ctor = cls.getConstructor(String.class);
            return ctor.newInstance(value);
        } catch (Exception e) {
            return null;
        }
    }
}