text:
S.I.G - Semantic Innovation Group
###################
  - Config : application/config/config.php : $config['base_url'] = 'http://domainname.com';
  - Copyright 2015 Semantic Innovation Group

redpajama_set_name: RedPajamaGithub


text:
package cern.laser.client.data;

import java.net.URL;
import java.util.Collection;

/**
 * The alarm class. It describes a fault state in terms of its static and dynamic information.
 */
public interface Alarm {
  /**
   * Accessor method.
   *
   * @return the alarm unique identifier
   */
  public String getAlarmId();

  /**
   * Accessor method.
   *
   * @return the alarm unique triplet identifier
   */
  public Triplet getTriplet();

  /**
   * Accessor method.
   *
   * @return the alarm system name
   */
  public String getSystemName();

  /**
   * Accessor method.
   *
   * @return the alarm system identifier
   */
  public String getIdentifier();

  /**
   * Accessor method.
   *
   * @return the problem description
   */
  public String getProblemDescription();

  /**
   * Accessor method.
   *
   * @return the alarm priority (1..4)
   */
  public Integer getPriority();

  /**
   * Accessor method.
   *
   * @return the alarm cause
   */
  public String getCause();

  /**
   * Accessor method.
   *
   * @return the alarm action to be taken
   */
  public String getAction();

  /**
   * Accessor method.
   *
   * @return the alarm consequence
   */
  public String getConsequence();

  /**
   * Accessor method.
   *
   * @return the alarm source
   */
  public Source getSource();

  /**
   * Accessor method.
   *
   * @return the alarm URL, null if not available
   */
  public URL getHelpURL();

  /**
   * Accessor method.
   *
   * @return the alarm piquet GSM, null if not available
   */
  public String getPiquetGSM();

  /**
   * Accessor method.
   *
   * @return the alarm piquet email, null if not available
   */
  public String getPiquetEmail();

  /**
   * Accessor method.
   *
   * @return the alarm attached categories
   */
  public Collection getCategories();

  /**
   * Accessor method.
   *
   * @return the alarm location
   */
  public Location getLocation();

  /**
   * Accessor method.
   *
   * @return the alarm responsible
   */
  public ResponsiblePerson getResponsiblePerson();

  /**
   * Accessor method.
   *
   * @return the alarm dynamic information
   */
  public Status getStatus();

  /**
   * Accessor method.
   *
   * @return true, iff it is an instant alarm
   */
  public boolean isInstant();

  /**
   * Accessor method.
   *
   * @return true iff it is a multiplicity parent
   */
  public boolean isMultiplicityParent();

  /**
   * Accessor method.
   *
   * @return true iff it is a node parent
   */
  public boolean isNodeParent();

  /**
   * Accessor method.
   *
   * @return true iff it is a multiplicity child
   */
  public boolean isMultiplicityChild();

  /**
   * Accessor method.
   *
   * @return true iff it is a node child
   */
  public boolean isNodeChild();

  /**
   * Cloning method. The cloned object is a deep copy.
   *
   * @return a deep copy of the object
   * @throws CloneNotSupportedException if clone failed
   */
  public Object clone() throws CloneNotSupportedException;

}


text:
.class public Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions$ShowMenuAction;
.super Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions$EditModeActionBase;
.source "EditStyledText.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "ShowMenuAction"
.end annotation

# instance fields
.field final synthetic this$1:Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;

# direct methods
.method public constructor <init>(Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;)V
    .locals 0

    .prologue
    .line 3186
    iput-object p1, p0, Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions$ShowMenuAction;->this$1:Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;

    invoke-direct {p0, p1}, Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions$EditModeActionBase;-><init>(Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;)V

    return-void
.end method

# virtual methods
.method protected doNotSelected()Z
    .locals 1

    .prologue
    .line 3189
    iget-object v0, p0, Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions$ShowMenuAction;->this$1:Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;

    # getter for: Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;->mEST:Lcom/android/ex/editstyledtext/EditStyledText;
    invoke-static {v0}, Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;->access$1800(Lcom/android/ex/editstyledtext/EditStyledText$EditModeActions;)Lcom/android/ex/editstyledtext/EditStyledText;

    move-result-object v0

    # invokes: Lcom/android/ex/editstyledtext/EditStyledText;->showMenuAlertDialog()V
    invoke-static {v0}, Lcom/android/ex/editstyledtext/EditStyledText;->access$4400(Lcom/android/ex/editstyledtext/EditStyledText;)V

    .line 3190
    const/4 v0, 0x1

    return v0
.end method


text:
import os
import sys

from setuptools import setup

packages = [
    'hulu'
]

if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload')
    sys.exit()

setup(
    # Basic package information.
    name='hulu',
    version='0.1.0',
    packages=packages,
    include_package_data=True,
    install_requires=['requests>=1.0.0, <2.0.0', 'requests_oauthlib==0.3.0'],
    author='Mike Helmick',
    author_email='me@michaelhelmick.com',
    license=open('LICENSE').read(),
    url='http://github.com/michaelhelmick/hulu/tree/master',
    keywords='hulu python api json',
    description='A Python library to interact with Hulu\'s "hidden" 2.0 API.',
    long_description=open('README.rst').read(),
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ]
)


text:
<Record>
<Term>Etifelmine</Term>
<SemanticType>Pharmacologic Substance</SemanticType>
<ParentTerm>CNS Stimulant</ParentTerm>
<ClassificationPath>Chemicals_and_Drugs_Kind/Drug, Food, Chemical or Biomedical Material/Pharmacologic Substance/Adjuvant/CNS Stimulant/Etifelmine</ClassificationPath>
<BroaderTerm>Chemicals_and_Drugs_Kind</BroaderTerm>
<BroaderTerm>Etifelmine</BroaderTerm>
<BroaderTerm>Pharmacologic Substance</BroaderTerm>
<BroaderTerm>Adjuvant</BroaderTerm>
<BroaderTerm>CNS Stimulant</BroaderTerm>
<BroaderTerm>Drug, Food, Chemical or Biomedical Material</BroaderTerm>
<Synonym>ETIFELMINE</Synonym>
<Synonym>Etifelmine</Synonym>
<Source>NCI Thesaurus</Source>
</Record>


text:
<!DOCTYPE html>

	<meta charset="utf-8">

	<title>JMSGUserInfo Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">

				JMessage-iOS-SDK

				HXHG

Index

Hierarchy

							On This Page

							<select id="jump-to">
	<option value="top">Jump To…</option>

	<option value="overview">Overview</option>

	<option value="tasks">Tasks</option>

	<optgroup label="Properties">

		<option value="//api/name/nickname">nickname</option>

		<option value="//api/name/birthday">birthday</option>

		<option value="//api/name/signature">signature</option>

		<option value="//api/name/gender">gender</option>

		<option value="//api/name/region">region</option>

		<option value="//api/name/address">address</option>

		<option value="//api/name/avatarData">avatarData</option>

		<option value="//api/name/extras">extras</option>

	</optgroup>

</select>

JMSGUserInfo Class Reference

	Inherits from
	NSObject

	Declared in
	JMSGUser.h

Overview

用户信息类(用于修改用户信息、注册新用户)

  nickname

昵称

@property (nonatomic, strong) NSString *nickname

Declared In

JMSGUser.h

  birthday

生日,格式:时间戳

@property (nonatomic, strong) NSNumber *birthday

Declared In

JMSGUser.h

  signature

签名

@property (nonatomic, strong) NSString *signature

Declared In

JMSGUser.h

  gender

性别

@property (nonatomic, assign) JMSGUserGender gender

Declared In

JMSGUser.h

  region

区域

@property (nonatomic, strong) NSString *region

Declared In

JMSGUser.h

  address

地址

@property (nonatomic, strong) NSString *address

Declared In

JMSGUser.h

  avatarData

头像数据,注意:注册新用户时不支持同时上传头像

@property (nonatomic, strong) NSData *avatarData

Declared In

JMSGUser.h

  extras

信息扩展字段,value 仅支持 NSString 类型

@property (nonatomic, strong) NSDictionary *extras

Declared In

JMSGUser.h

Copyright © 2018 HXHG. All rights reserved. Updated: 2018-05-24

Generated by appledoc 2.2.1 (build 1334).


text:
            <md-input-container>
                <mw-label label-for="division-quantity-{{ctrl.question.id}}" label-class="col-sm-2 control-label" label-key="mwForm.question.division.quantity"></mw-label>

                    <input ng-attr-id="division-quantity-{{ctrl.question.id}}" type="number" ng-model="ctrl.question.quantity" required class="form-control" min="1" ng-readonly="ctrl.readOnly">

            </md-input-container>
            <md-input-container>
                <mw-label label-for="division-unit-{{ctrl.question.id}}" label-class="col-sm-2 control-label" label-key="mwForm.question.division.unit"></mw-label>

                    <input ng-attr-id="division-unit-{{ctrl.question.id}}" type="text" ng-model="ctrl.question.unit" required class="form-control" ng-readonly="ctrl.readOnly">

            </md-input-container>

                <md-input-container>
                    <input wd-focus-me="ctrl.isNewItem[item.id]" type="text" ng-model="item.value" ng-keypress="ctrl.keyPressedOnInput($event,item)" required class="form-control item-value "
                           ng-readonly="ctrl.readOnly">
                </md-input-container>
                <md-button role="button" class="md-raised md-icon-button remove-item-button" ng-click="ctrl.removeItem(item)" ng-if="!ctrl.readOnly"
                           ng-attr-title="{{'mwForm.buttons.remove' | translate}}">
                    <md-tooltip md-direction="top">
                        {{'mwForm.buttons.remove' | translate}}
                    </md-tooltip>

                </md-button>

            <md-input-container>

                    <input type="text" required class="form-control" value="{{'mwForm.question.priority.clickToAddItem'|translate}}">

            </md-input-container>


text:
<!DOCTYPE html>

    <title>The view 'missingview' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/home/missingview.aspx
~/Views/home/missingview.ascx
~/Views/Shared/missingview.aspx
~/Views/Shared/missingview.ascx
~/Views/home/missingview.cshtml
~/Views/home/missingview.vbhtml
~/Views/Shared/missingview.cshtml
~/Views/Shared/missingview.vbhtml</title>
    <meta name="viewport" content="width=device-width" />

Server Error in '/' Application.

 The view 'missingview' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/home/missingview.aspx
~/Views/home/missingview.ascx
~/Views/Shared/missingview.aspx
~/Views/Shared/missingview.ascx
~/Views/home/missingview.cshtml
~/Views/home/missingview.vbhtml
~/Views/Shared/missingview.cshtml
~/Views/Shared/missingview.vbhtml

         Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

         Exception Details: System.InvalidOperationException: The view 'missingview' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/home/missingview.aspx
~/Views/home/missingview.ascx
~/Views/Shared/missingview.aspx
~/Views/Shared/missingview.ascx
~/Views/home/missingview.cshtml
~/Views/home/missingview.vbhtml
~/Views/Shared/missingview.cshtml
~/Views/Shared/missingview.vbhtml

        Source Error:

                        An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

        Stack Trace:

[InvalidOperationException: The view 'missingview' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/home/missingview.aspx
~/Views/home/missingview.ascx
~/Views/Shared/missingview.aspx
~/Views/Shared/missingview.ascx
~/Views/home/missingview.cshtml
~/Views/home/missingview.vbhtml
~/Views/Shared/missingview.cshtml
~/Views/Shared/missingview.vbhtml]
   System.Web.Mvc.ViewResult.FindView(ControllerContext context) +413422
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +120
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +15
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +25
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +175
   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +89
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +102
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +58
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +44
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +15
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +12
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +11
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9702064
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

        Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.5.27.0


text:
package org.onosproject.pce.web;

import static javax.ws.rs.core.Response.Status.OK;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.LinkedList;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.onosproject.incubator.net.tunnel.Tunnel;
import org.onosproject.net.DeviceId;
import org.onosproject.net.intent.Constraint;
import org.onosproject.pce.pceservice.PcePath;
import org.onosproject.pce.pceservice.DefaultPcePath;
import org.onosproject.pce.pceservice.LspType;
import org.onosproject.rest.AbstractWebResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;

/**
 * Query and program pce path.
 */

@Path("path")
public class PcePathWebResource extends AbstractWebResource {

    private final Logger log = LoggerFactory.getLogger(PcePathWebResource.class);
    public static final String PCE_PATH_NOT_FOUND = "Path not found";
    public static final String PCE_PATH_ID_EXIST = "Path exists";
    public static final String PCE_PATH_ID_NOT_EXIST = "Path does not exist for the identifier";

    /**
     * Retrieve details of all paths created.
     *
     * @return 200 OK
     */
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Response queryAllPath() {
        log.debug("Query all paths.");
        //TODO: need to uncomment below line once queryAllPath method is added to PceService
        Iterable<Tunnel> tunnels = null; // = get(PceService.class).queryAllPath();
        ObjectNode result = mapper().createObjectNode();
        ArrayNode pathEntry = result.putArray("paths");
        if (tunnels != null) {
            for (final Tunnel tunnel : tunnels) {
                PcePath path = DefaultPcePath.builder().of(tunnel).build();
                pathEntry.add(codec(PcePath.class).encode(path, this));
            }
        }
        return ok(result.toString()).build();
    }

    /**
     * Retrieve details of a specified path id.
     *
     * @param id path id
     * @return 200 OK, 404 if given identifier does not exist
     */
    @GET
    @Path("{path_id}")
    @Produces(MediaType.APPLICATION_JSON)
    public Response queryPath(@PathParam("path_id") String id) {
        log.debug("Query path by identifier {}.", id);
        //TODO: need to uncomment below lines once queryPath method is added to PceService
        Tunnel tunnel = null; // = nullIsNotFound(get(PceService.class).queryPath(PcePathId.of(id)),
                //PCE_PATH_NOT_FOUND);
        PcePath path = DefaultPcePath.builder().of(tunnel).build();
        ObjectNode result = mapper().createObjectNode();
        result.set("path", codec(PcePath.class).encode(path, this));
        return ok(result.toString()).build();
    }

    /**
     * Creates a new path.
     *
     * @param stream pce path from json
     * @return status of the request
     */
    @POST
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public Response setupPath(InputStream stream) {
        log.debug("Setup path.");
        try {
            ObjectNode jsonTree = (ObjectNode) mapper().readTree(stream);
            JsonNode port = jsonTree.get("path");
            PcePath path = codec(PcePath.class).decode((ObjectNode) port, this);

            DeviceId srcDevice = DeviceId.deviceId(path.source());
            DeviceId dstDevice = DeviceId.deviceId(path.destination());
            LspType lspType = path.lspType();
            List<Constraint> listConstrnt = new LinkedList<Constraint>();

            // add cost
            //TODO: need to uncomment below lines once Bandwidth and Cost constraint classes are ready
            //CostConstraint.Type costType = CostConstraint.Type.values()[Integer.valueOf(path.constraint().cost())];
            //listConstrnt.add(CostConstraint.of(costType));

            // add bandwidth. Data rate unit is in BPS.
            //listConstrnt.add(LocalBandwidthConstraint.of(Double.valueOf(path.constraint().bandwidth()), DataRateUnit
            //        .valueOf("BPS")));

            //TODO: need to uncomment below lines once setupPath method is modified in PceService
            Boolean issuccess = true; // = (null != get(PceService.class)
                    //.setupPath(srcDevice, dstDevice, path.name(), listConstrnt, lspType)) ? true : false;
            return Response.status(OK).entity(issuccess.toString()).build();
        } catch (IOException e) {
            log.error("Exception while creating path {}.", e.toString());
            throw new IllegalArgumentException(e);
        }
    }

    /**
     * Update details of a specified path id.
     *
     * @param id path id
     * @param stream pce path from json
     * @return 200 OK, 404 if given identifier does not exist
     */
    @PUT
    @Path("{path_id}")
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    public Response updatePath(@PathParam("path_id") String id,
            final InputStream stream) {
        log.debug("Update path by identifier {}.", id);
        try {
            ObjectNode jsonTree = (ObjectNode) mapper().readTree(stream);
            JsonNode pathNode = jsonTree.get("path");
            PcePath path = codec(PcePath.class).decode((ObjectNode) pathNode, this);
            // Assign cost
            List<Constraint> constrntList = new LinkedList<Constraint>();
            //TODO: need to uncomment below lines once CostConstraint class is ready
            if (path.costConstraint() != null) {
                //CostConstraint.Type costType = CostConstraint.Type.values()[path.constraint().cost()];
                //constrntList.add(CostConstraint.of(costType));
            }

            // Assign bandwidth. Data rate unit is in BPS.
            if (path.bandwidthConstraint() != null) {
                //TODO: need to uncomment below lines once BandwidthConstraint class is ready
                //constrntList.add(LocalBandwidthConstraint
                //        .of(path.constraint().bandwidth(), DataRateUnit.valueOf("BPS")));
            }

            //TODO: need to uncomment below line once updatePath is added to PceService
            Boolean result = true; // = (null != (get(PceService.class).updatePath(PcePathId.of(id), constrntList)))
                                      //? true : false;
            return Response.status(OK).entity(result.toString()).build();
        } catch (IOException e) {
            log.error("Update path failed because of exception {}.", e.toString());
            throw new IllegalArgumentException(e);
        }
    }

    /**
     * Release a specified path.
     *
     * @param id path id
     * @return 200 OK, 404 if given identifier does not exist
     */
    @Path("{path_id}")
    @DELETE
    public Response releasePath(@PathParam("path_id") String id) {
        log.debug("Deletes path by identifier {}.", id);

        //TODO: need to uncomment below lines once releasePath method is added to PceService
        Boolean isSuccess = true; // = nullIsNotFound(get(PceService.class).releasePath(PcePathId.of(id)),
                //PCE_PATH_NOT_FOUND);
        if (!isSuccess) {
            log.debug("Path identifier {} does not exist", id);
        }

        return Response.status(OK).entity(isSuccess.toString()).build();
    }
}


text:
#include <stdlib.h>
#include <string.h>

#include <gfarm/error.h>
#include <gfarm/gfarm_misc.h>

#include <gfarm/host_info.h>
#include <gfarm/group_info.h>
#include <gfarm/user_info.h>
#include <gfarm/gfs.h>

#include "metadb_common.h"
#include "xattr_info.h"
#include "quota_info.h"

/**********************************************************************/

void
gfarm_base_generic_info_free_all(
	int n,
	void *vinfos,
	const struct gfarm_base_generic_info_ops *ops)
{
	int i;
	char *infos = vinfos;

	for (i = 0; i < n; i++) {
		ops->free(infos);
		infos += ops->info_size;
	}
	free(vinfos);
}

/**********************************************************************/

static void gfarm_base_host_info_clear(void *info);
static int gfarm_base_host_info_validate(void *info);

const struct gfarm_base_generic_info_ops gfarm_base_host_info_ops = {
	sizeof(struct gfarm_host_info),
	(void (*)(void *))gfarm_host_info_free,
	gfarm_base_host_info_clear,
	gfarm_base_host_info_validate,
};

void
gfarm_host_info_free(
	struct gfarm_host_info *info)
{
	int i;

	if (info->hostname != NULL)
		free(info->hostname);
	if (info->hostaliases != NULL) {
		for (i = 0; i < info->nhostaliases; i++)
			free(info->hostaliases[i]);
		free(info->hostaliases);
	}
	if (info->architecture != NULL)
		free(info->architecture);
}

static void
gfarm_base_host_info_clear(void *vinfo)
{
	struct gfarm_host_info *info = vinfo;

	memset(info, 0, sizeof(*info));
#if 0
	info->ncpu = GFARM_HOST_INFO_NCPU_NOT_SET;
#else
	info->ncpu = 1; /* assume 1 CPU by default */
#endif
}

static int
gfarm_base_host_info_validate(void *vinfo)
{
	struct gfarm_host_info *info = vinfo;

	/* info->hostaliases may be NULL */
	return (
	    info->hostname != NULL &&
	    info->architecture != NULL &&
	    info->ncpu != GFARM_HOST_INFO_NCPU_NOT_SET
	);
}

void
gfarm_host_info_free_all(
	int n,
	struct gfarm_host_info *infos)
{
	gfarm_base_generic_info_free_all(n, infos,
	    &gfarm_base_host_info_ops);
}

/**********************************************************************/

static void gfarm_base_user_info_clear(void *info);
static int gfarm_base_user_info_validate(void *info);

const struct gfarm_base_generic_info_ops gfarm_base_user_info_ops = {
	sizeof(struct gfarm_user_info),
	(void (*)(void *))gfarm_user_info_free,
	gfarm_base_user_info_clear,
	gfarm_base_user_info_validate,
};

void
gfarm_user_info_free(struct gfarm_user_info *info)
{
	if (info->username != NULL)
		free(info->username);
	if (info->realname != NULL)
		free(info->realname);
	if (info->homedir != NULL)
		free(info->homedir);
	if (info->gsi_dn != NULL)
		free(info->gsi_dn);
}

static void
gfarm_base_user_info_clear(void *vinfo)
{
	struct gfarm_user_info *info = vinfo;

	memset(info, 0, sizeof(*info));
}

static int
gfarm_base_user_info_validate(void *vinfo)
{
	struct gfarm_user_info *info = vinfo;

	return (
	    info->username != NULL &&
	    info->realname != NULL &&
	    info->homedir != NULL &&
	    info->gsi_dn != NULL
	);
}

void
gfarm_user_info_free_all(
	int n,
	struct gfarm_user_info *infos)
{
	gfarm_base_generic_info_free_all(n, infos,
	    &gfarm_base_user_info_ops);
}

/**********************************************************************/

static void gfarm_base_group_info_clear(void *info);
static int gfarm_base_group_info_validate(void *info);

const struct gfarm_base_generic_info_ops gfarm_base_group_info_ops = {
	sizeof(struct gfarm_group_info),
	(void (*)(void *))gfarm_group_info_free,
	gfarm_base_group_info_clear,
	gfarm_base_group_info_validate,
};

void
gfarm_group_info_free(struct gfarm_group_info *info)
{
	int i;

	if (info->groupname != NULL)
		free(info->groupname);
	if (info->usernames != NULL) {
		for (i = 0; i < info->nusers; i++)
			free(info->usernames[i]);
		free(info->usernames);
	}
}

static void
gfarm_base_group_info_clear(void *vinfo)
{
	struct gfarm_group_info *info = vinfo;

	memset(info, 0, sizeof(*info));
}

static int
gfarm_base_group_info_validate(void *vinfo)
{
	struct gfarm_group_info *info = vinfo;

	return (
	    info->groupname != NULL
	);
}

void
gfarm_group_info_free_all(
	int n,
	struct gfarm_group_info *infos)
{
	gfarm_base_generic_info_free_all(n, infos,
	    &gfarm_base_group_info_ops);
}

/**********************************************************************/

void
gfarm_group_names_free(struct gfarm_group_names *info)
{
	int i;

	for (i = 0; i < info->ngroups; i++)
		free(info->groupnames[i]);
}

/**********************************************************************/

static void gfarm_base_gfs_stat_clear(void *info);
static int gfarm_base_gfs_stat_validate(void *info);

const struct gfarm_base_generic_info_ops gfarm_base_gfs_stat_ops = {
	sizeof(struct gfs_stat),
	(void (*)(void *))gfs_stat_free,
	gfarm_base_gfs_stat_clear,
	gfarm_base_gfs_stat_validate,
};

void
gfs_stat_free(struct gfs_stat *s)
{
	if (s->st_user != NULL)
		free(s->st_user);
	if (s->st_group != NULL)
		free(s->st_group);
}

static void
gfarm_base_gfs_stat_clear(void *vinfo)
{
	struct gfs_stat *info = vinfo;

	memset(info, 0, sizeof(*info));
}

static int
gfarm_base_gfs_stat_validate(void *vinfo)
{
	struct gfs_stat *info = vinfo;

	/* XXX - should check all fields are filled */
	return (
	    info->st_user != NULL &&
	    info->st_group != NULL
	);
}

/* extra utility function to do deep copy */
gfarm_error_t
gfs_stat_copy(struct gfs_stat *d, const struct gfs_stat *s)
{
	char *user, *group;

	GFARM_MALLOC_ARRAY(user, strlen(s->st_user) + 1);
	GFARM_MALLOC_ARRAY(group, strlen(s->st_group) + 1);
	if (user == NULL || group == NULL) {
		if (user != NULL)
			free(user);
		if (group != NULL)
			free(group);
		return (GFARM_ERR_NO_MEMORY);
	}
	*d = *s;
	strcpy(user, s->st_user);
	strcpy(group, s->st_group);
	d->st_user = user;
	d->st_group = group;
	return (GFARM_ERR_NO_ERROR);
}

/**********************************************************************/

static void
xattr_info_free(void *vinfo)
{
	struct xattr_info *info = vinfo;

	free(info->attrname);
	free(info->attrvalue);
}

void
gfarm_base_xattr_info_free_array(int n, void *vinfo)
{
	int i;
	struct xattr_info *info = vinfo;

	for (i = 0; i < n; i++) {
		xattr_info_free(&info[i]);
	}
	free(info);
}

static void
xattr_info_clear(void *vinfo)
{
	struct xattr_info *info = vinfo;

	info->inum = 0;
	info->attrname = NULL;
	info->namelen = 0;
	info->attrvalue = NULL;
	info->attrsize = 0;
}

static int
xattr_info_validate(void *vinfo)
{
	return 1;
}

const struct gfarm_base_generic_info_ops gfarm_base_xattr_info_ops = {
	sizeof(struct xattr_info),
	xattr_info_free,
	xattr_info_clear,
	xattr_info_validate
};

/**********************************************************************/

static void gfarm_base_quota_info_clear(void *info);
static int gfarm_base_quota_info_validate(void *info);

const struct gfarm_base_generic_info_ops gfarm_base_quota_info_ops = {
	sizeof(struct gfarm_quota_info),
	(void (*)(void *))gfarm_quota_info_free,
	gfarm_base_quota_info_clear,
	gfarm_base_quota_info_validate,
};

static void
gfarm_base_quota_info_clear(void *vinfo)
{
	struct gfarm_quota_info *info = vinfo;

	memset(info, 0, sizeof(*info));
}

static int
gfarm_base_quota_info_validate(void *vinfo)
{
	struct gfarm_quota_info *info = vinfo;

	return (info->name != NULL);
}

void
gfarm_quota_info_free_all(
	int n,
	struct gfarm_quota_info *infos)
{
	gfarm_base_generic_info_free_all(n, infos,
	    &gfarm_base_quota_info_ops);
}


text:
/*.demoHeaders { margin-top: 2em; }
#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
ul#icons {margin: 0; padding: 0;}
ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
ul#icons span.ui-icon {float: left; margin: 0 4px;}*/

/* General Styles */
#gc-footer {
	margin-top: 10px;
	border-top: 1px solid gray;
	margin-left: 50px;
	width: 115%;
}

#gc-footer .text {
	/*padding-top: 0;*/
	padding: 0;
}

h3.incompatBrowser{
	color: red;
}

#gc-container {
	min-height: 30px;
	margin-left: 300px;
}

div.demo {
	min-height: 600px;
	margin-left: 30px;
}

/* Utility Styles */
.nohighlight {
	font-weight: normal;
}

.asterisk {
	font-color: red;
}

/***********************************************/
/* Report Generator Pages */
/***********************************************/
body {
	/*background: url("../images/barchart.jpg") 50px 150px no-repeat #FFFFFF;*/
	background: #FFFFFF;
	width: 1000px;
}

.menu_container, .submenu_container {
	background: url(../images/menu.png) no-repeat;
	height: 30px;
	margin-top: 8px;
	margin-left: 20px;
	width: 1160px;
}
.menu_container {
    border-bottom: 1px inset;
    border-right: 1px inset black;
    height: 20px;
    margin-top: 19px;
    padding-left: 810px;
    padding-top: 10px;
    width: 350px;
}
.submenu_container {
	width: 1095px;
	margin-top:0;
	height:1px;
	/*background: url("../images/submenugradient.jpg") repeat-x #6EA0DB;*/
	border-right: 1px solid #9E344F;
	color: wheat;
	font-weight: bold;
	font-size: 11px;
	padding-left:65px;
}
.submenu_container div.tabs{
	float: right;
}
.submenu_container span{
	margin-right: 28px;
	padding: 0 5px;
}
.submenu_container span.current, .submenu_container span:hover {
	background: #B72540;
	border-bottom: 1px dotted black;
}
.submenu_container span:hover {
	cursor: pointer;
	color: #E6CB50;

}

/*Search Styles*/
#selectedQuestionAnswers div#helpSearchBox {
	width: 174px;
	margin: 10px;
	margin-bottom: 25px;
	padding: 4px 25px 4px 25px;
	background: url("../images/helpSearchBoxGradient.jpg") repeat-x scroll 0 0 #CAE080;
	line-height: 200%;
	border: 3px ridge #383838;
}

.ui-widget input[type=text] {
    font-size: 16px;
    width: 300px;
    font-family: Arial Narrow;
}

#selectedQuestionAnswers fieldset#helpSearchBox legend{
	border: 1px solid #827276;
	color: black;
    padding: 1px 10px;
    background: url("../images/confirmboxgradient2.jpg") repeat-x scroll 0 0 #F5F4AF;
    font-family: Arial Narrow;
    font-size: 11px;
    font-weight: bold;
    margin-left: 26px;
    padding: 1px 50px;
    line-height: 100%;
}

#helpSearchBox .searchSection{
	padding: 3px;
}

#helpSearchBox .searchSection:hover, #helpSearchBox .searchSection .current{
	font-weight: bold;
	background: url("../images/searchSectionGradient.jpg") repeat-y scroll 0 0 #E0EDB3;
}

#helpSearchBox .searchSection .current:hover {
}

.submenu_container span.searchIconImg, span.searchIconImg {
	background: url("../images/searchIcon.png") no-repeat;
	cursor: pointer;
	padding: 0;
	margin-right: 0;
}

.submenu_container span#list_search_tab {
	margin-right: 0;
	background: none;
}

.submenu_container span.searchLabel:hover {
	background: none;
	cursor: default;
}

#searchFormStatusFld {
	color: red;
	font-family: Times;
	margin-right: 0;
	font-size: 15px;
	word-wrap: break-word;
}

.submenu_container span.searchTokenFld {
	color: #E2A122;
	margin-right: 0;
}

span.searchTokenFld {
	line-height:100%;
}

.submenu_container span.searchLabel, span.searchLabel {
	cursor: pointer;
	padding: 0;
	margin-right: 0;
	font-style: italic;
	font-family: Times;
	color: #262262;
	font-weight: bold;
}

.menu_container a, .submenu_container a{
	font-family: Times;
	text-decoration: none;
	color: white;
}
.submenu_container a{
	color:#849768;
	padding-left:5px;
	padding-right: 5px;
}
.menu_container a {
	border-right: 1px dashed #5885BE;
    color: #2DAEB3;
    font-weight: bold;
	border-right: 1px dashed #5885BE;
}
.menu_container a:hover, .menu_container a.current {
	color: #262262;
	border-right: 1px dashed #262262;
    font-weight: bold;
}

.menu_container a.current {
	color: #262262;
    font-weight: bold;
}

.menu_container a#reports_container_tab {
    display: none;
}

.menu_container a#reports_container_tab.current {
    display: inline;
}

.menu_container .menu_ctn_content {
	float: right;
}

.menu_container a:hover {

}

span.tablemetadataspan {
	font-style: italic;
	font-weight: bold;
	color: #383838;
}

span.searchmetadataspan {
	display: none;
}

#reports_container .menu_container {
	font-size: 11px;
	/*margin-left: 0;*/
	padding-left: 0;
	margin-top: 0;
	/*width: 100%;*/
	margin-left:300px;
	width:800px;
}

#reports_container .reportsHeaderBanner .menu_container {
	font-size: 11px;
	padding-left: 0;
	margin-top: 2px;
	margin-left:0;
	width:740px;
	background: black;
	border: 1px solid #AD6C73;
}

#reports_container .reportsHeaderBanner span.currentTabTitle{
	float: right;
	margin-right: 15px;
	font-style: italic;
	color: #383838;
}

#reports_container .reportsHeaderBanner .menu_container a.current {
	background:#80223A;
	padding-bottom:4px;
	padding-left:5px;
	padding-right:5px;
	font-size:9px;
	color: wheat;
}

#reports_container .reportsHeaderBanner .menu_container a {
	padding-left: 0;
	padding-right: 0;
	color: wheat;
	font-weight: normal;
}

#reports_container .reportsHeaderBanner .menu_container a:hover,
#reports_container .reportsHeaderBanner .menu_container a.current {
	font-weight: bold;
}

#reports_container .menu_container a {
	padding-left: 0;
	padding-right: 0;
}

#reports_title {
	font-size: 20px;
	padding: 10px 0 20px 0;
}

#page_container {
	margin-left: 50px;
	margin-top: 0;
	display: block;
	width:1230px;
}

#reportTitleFormErrorWarnings, #joinContextFormErrorWarnings {
	color:red;
	margin-bottom:10px;
	padding:5px;
}

#reportTitleForm span.guidance {
	font-size: 11px;
}

#joinContextForm{
	font-family:Arial Narrow;
	font-size:16px;
}

#joinContextForm div.subsection {
	background-color: #F5DEB3;
	border: 1px dotted #B5792B;
	margin-top: 20px;
	padding-left: 3px;
}

#joinContextForm div.guidance {
	margin-bottom: 20px;
}

#joinContextForm div.guidance2 {
	/*margin-top: 20px;*/
}

#joinContextForm div.guidance3 {
	margin-top:4px;
	color:black;
	margin-bottom: 12px;
}

#joinContextForm div.guidance3 span.selected{
	font-weight: bold;
	color: #B5792B;
	border: 1px dotted #B5792B;
	padding-left: 3px;
	padding-right: 3px;
	background-color: #F5DEB3;
	font-family: Times;
}

#joinContextForm div.guidance3 span.clearlabel{
	font-size: 12px;
}

#joinContextForm div.guidance3 span.selected:hover{
	cursor: pointer;
	background-color: #E5C091;
}

#joinContextFld {
	font-weight: bold;
	color: #A66635;
	font-size: 14px;
}

#otherJoinContextValueFld {
	font-family: Arial Narrow;
	width: 400px;
}

span.dropdownIcon {
	background: url(../images/dropdown_icon.png) no-repeat;
	width: 20px;
	cursor: pointer;
}

.otherJoinTxt {
	width:220px;
	margin-left:3px;
}

.otherJoinTxt span {
	font-weight: bold;
	cursor:pointer;
	border: 1px dotted white;
	padding:0;
	background:wheat;
}

#joinContextFld:focus, #joinContextFld:hover{
	border-width: 2px;
}

span.highlighted{
	font-weight: bold;
}

span.red-asterisk {
	color: red;
}

/* Welcome Styles */

#welcome_container {
	width:801px;
	margin-left: 300px;
}

 .reportList #savedReportsDiv{
	overflow:auto;
	height:220px;
	width:798px;
}

.reportList #savedReportsDiv .item{
	margin-left: 15px;
}

#showSavedReportsContainer, #generateNewReportsContainer {
	margin-top: 10px;
}

#showSavedReportsContainer .content,
#generateNewReportsContainer .content,
#welcomeMessageContainer .content{
	background: url(../images/confirmboxgradient.jpg) repeat-x #FAF7F2;
	border: 1px solid gray;
}

#showSavedReportsContainer .content{
	min-height:60px;
	width: 798px;
}

#showSavedReportsContainer .content .reports{
	margin: 0;
	min-height:246px;
}

#generateNewReportsContainer .content{
	min-height: 60px;
	padding-top: 20px;
	padding-left: 10px;
	width: 788px;
}

#showSavedReportsContainer .title, #generateNewReportsContainer .title {
	font-family:Times;
	font-style:italic;
	color: #262262;
	font-size:16px;
	font-weight: bold;
	padding: 10px;
	background:url(../images/header_long.png) no-repeat 0 0;
}

#showSavedReportsContainer .item, #generateNewReportsContainer .item{
	width:720px;
	font-family: Times;
	font-size: 14px;
	height: 30px;
	padding-left: 40px;
	color:#0F0D0D;
	padding-top:10px;border-bottom: 1px dotted #242121;
	background: url(../images/secondgeneratereportgradient.jpg) repeat-y;
}

#showSavedReportsContainer .item {
	width: 710px;
}

#showSavedReportsContainer .item span.titleText, #generateNewReportsContainer .item span.titleText{
	background: url(../images/ReportIcon.bmp) no-repeat;
	padding-left: 40px;
	padding-bottom:10px;
	padding-top: 5px
}

#showSavedReportsContainer .item span.private{
	background: url(../images/PrivateReport.jpg) no-repeat;
	padding-right: 40px;
	padding-bottom:10px;
	padding-top: 5px
}

#showSavedReportsContainer .item span.non-private{
	padding-right: 40px;
	padding-bottom:10px;
	padding-top: 5px
}

#showSavedReportsContainer .item span.delete{
	background: url(../images/x_red_transparent.gif) no-repeat;
	float: right;
	width: 11px;
	height: 11px;
	visibility: hidden;
}

#showSavedReportsContainer .item:hover span.delete{
	visibility:visible;
}

#showSavedReportsContainer .item span.delete:hover{
	cursor: pointer;
	border: 2px outset white;
}

#showSavedReportsContainer .item span.setup_msg,#showSavedReportsContainer .item span.delete_setup_msg{
	margin-left: 16px;
	padding-left: 16px;
	font-family: Times;
	font-size:12px;
	font-weight:bold;
	font-style:italic;
	display:none;
	color:#2F2F2F;
}
#showSavedReportsContainer .item span.delete_setup_msg{
	margin-left:316px;
	display: inline;
	color: red;
}

#showSavedReportsContainer .item.none,#showSavedReportsContainer .item.none span{
	background: none;
	padding-left: 0;
	border-bottom: none;
}

#showSavedReportsContainer .item.last,#generateNewReportsContainer .item.last{
	margin-bottom: 10px;
}

#showSavedReportsContainer .item.none span.number{
	font-weight: bold;
}

#generateNewReportsContainer .item span{
	background: url(../images/generate.png) no-repeat;
	padding-left: 40px;
	padding-bottom:10px;
	padding-top: 5px
}

#generateNewReportsContainer .item{
	background: url(../images/secondgeneratereportgradient.jpg) repeat-y;
	border-color: white;
}

#showSavedReportsContainer .item:hover, #generateNewReportsContainer .item:hover {
	background: url(../images/tablegradient.jpg) repeat-y white;
	/*color: white;*/
}

#showSavedReportsContainer .clicked, #generateNewReportsContainer .clicked {
	background: url(../images/tablegradient.jpg) repeat-y white;
	font-weight: bold;
}

#showSavedReportsContainer .item span.titleText:hover, #generateNewReportsContainer .item:hover {
	cursor: pointer;
	font-weight: bold;
	font-size: 16px;
}

#showSavedReportsContainer {
	margin-top: 50px;
}

#showSavedReportsContainer .item.none:hover {
	cursor: none;
	font-weight: normal;
	/*color: #483B63;*/
	font-size: 14px;
	background: none;
}

#welcomeMessageContainer {
}

#welcomeMessageContainer .title{
	width:228px;
	height:23px;
	color: #262262;
	font-weight: bold;
	font-style: italic;
	font-family:Times;
	font-size:14px;
	padding-left: 50px;
	padding-top: 10px;
	margin-top: 10px;
	background: url(../images/header_short.png) no-repeat white;
}

#welcomeMessageContainer .content{
	border: 1px solid gray;
	padding: 15px;
	color: #OFOFOD;
	min-height: 270px;
	padding-top: 140px;
	line-height: 200%;
}

#currentQueryName {
	margin: 10px 10px 25px;
	padding: 5px;
	color: #F4F4F4;
	background: #859D2B;
	font-family: Times;
	font-weight: bold;
	font-size: 14px;
	border: 1px dotted black;
	text-align: center;
}

#currentQueryName .value {
	font-style: italic;
}

.loading {
	background: url("../images/loading.gif") no-repeat 300px 0;
	height: 80px;
}

div.questionTypeSelect{
	margin-top:8px;
	border: 1px outset lightgray;
	padding-bottom: 10px;
}

div.questionTypeSelectChild1{
	width:100px;
	float:left;
}

div.questionTypeSelectChild5{
	clear:left;
	padding-top:10px;
	padding-bottom:0;
	margin-bottom:-5px;
}

div.questionTypeSelectChild5 .tableOnlyDiv{
	display:none;
	padding-top:0;
}

div.questionTypeSelectChild3{
	clear:left;
}

div.questionTypeSelectChild3 select{
	width: 180px;
}

fieldset.questionTypeDisplay {
	clear: left;
	margin-top: 15px;
	line-height: 12px;
}

fieldset.questionTypeDisplay legend span{
	font-size: 11px;
}

select.questionDateFormat {
	width: 140px;
}

span.questionDateFormatWrapper{
}

div.dataTypeWarn {
	color: red;
	clear: left;
	font-family: Times;
	font-size: 11px;
}

div.questionTypeSelectChild2{
	width:100px;
	display:inline;
}

div.questionTypeSelect *{
	font-size:9px;
	font-weight:bold;
}

div.questionTypeSelect select{
	width: 100px;
}

div.questionTypeSelect span{
	font-size: 10px;
}

#table_container {

}

#table_paginator_container{
	margin-top:15px;
	margin-left:250px;
}

div.questionTypeSelect select.tabledata_select{
	width:160px;
}

.tableContent {
	height: 475px;
	margin-top: 10px;
	overflow-y: scroll;
	width:880px;
	display: inline;
}

#table_container_content{
	width:850px;
}

#table_container_message {
	padding-left:350px;
	font-weight:bold;
	margin-top: 5px;
}

#help_container {
	background: none repeat scroll 0 0 white;
    float: left;
    margin-left: 20px;
    margin-right: 33px;
    width: 248px;
}
#reports_container {
	width: 1100px;
	background: white;
	margin-top: 11px;
}

#reports_div_5{
	margin-top: 45px;
}

#selectedQuestionAnswers{
	margin-top: 11px;
	background: #E6E5F3;
	/*font-family: Courier;
	font-size: 13px;
	color: #7D253B;
	margin-bottom: 8px;
	padding: 0 40px 0 40px;*/
}

#selectedQuestionAnswers p {
	/*padding: 5px;*/
	display: none;
}

#selectedQuestionAnswerBtnPanel {
	margin-left: 32px;
	margin-bottom: 10px;
	margin-top:100px;
}

#selectedQuestionAnswerBtnPanel input[type=button]{
	background: url(../images/legendBg.jpg) repeat-x #CAE080;/*#847BC5;*/
	color: #383838;
	font-weight: bold;
	margin-top: 10px;
}

.spinner {
	background: url("../images/spinner.gif") no-repeat;
	width: 16px;
	z-index: 10000;
}
.selectAnswerSpan {
	background: url("../images/confirmboxgradient2.jpg") repeat-x #F5F4AF;
	color: #262262;
	border: 3px ridge #383838;
	padding: 6px;
	font-size: 11px;
}

#selectedQuestionAnswers .selectAnswerSpan{
	/*background: url("../images/confirmboxgradient.jpg") repeat-x;*/
	margin-right: 35px;
	margin-bottom: 30px;
	margin-left: 10px;
}

#selectedQuestionAnswers .selectAnswerSpan li {
	font-weight: bold;
	color: #4F484A;
	list-style: square;
	width: 160px;
	word-wrap: break-word;
}

#selectedQuestionAnswers .selectAnswerSpan li.aggregation {
	list-style-type: none;
	font-weight: normal;
	float: right;
	width: 170px;
	height: 18px;
	background: none repeat scroll 0% 0% #CFC8CA;
	border: 1px dotted #A39D9E;
}

#selectedQuestionAnswers .selectAnswerSpan li.aggregation span {
	float: right;
	font-style: italic;
}

#selectedQuestionAnswers .selectAnswerSpan li.aggregation span.upAndDownTextBox {
	font-weight: bold;
	margin-left: 10px;
}

#selectedQuestionAnswers #dependentQtnSet li.none,
#selectedQuestionAnswers #independentQtnSet li.none,
#selectedQuestionAnswers #filterQtnSet li.none {
	font-weight: bold;
	color: #383838;
}

#selectedQuestionAnswers fieldset {
	/*display: inline;*/
	width: 207px;
}

.answerSpanHeader {
	background: url(../images/legendBg.jpg) repeat-x #CAE080;/*#847BC5;*/
	padding:1px;
	border: 1px solid #847BC5;
	color: black;
	padding: 1px 10px;
}

#selectedQuestionAnswers .answerSpanHeader {
	border: 1px solid #827276;
	margin-left: 43px;
}

#help_container_header{
	background:url(../images/header_short.png) no-repeat white;
	width:228px;/*180px;*/
	height:23px;
	margin-top: 0;
	color: #262262;
	font-weight: bold;
	font-style: italic;
	font-family:Times;
	font-size:14px;
	padding-left: 50px;
	padding-top: 10px;
}

#help_container_content{
	border: 1px solid gray;
	padding-top: 10px;
}

#selectedQuestionAnswers #help_container_content{
	border: 1px solid gray;
	padding-top: 15px;
	min-height: 424px;
}

#dependentQtnSet, #filterQtnSet {
	/*float: right;*/
}

#selectedQuestionAnswers #dependentQtnSet li {
	color: #9E344F;
}

#filterQtnSet legend.answerSpanHeader {
	margin-left:57px;
}

#selectedQuestionAnswers #dependentQtnSet a,
#selectedQuestionAnswers #independentQtnSet a,
#selectedQuestionAnswers #filterQtnSet a,
#selectedQuestionAnswers #dependentQtnSet a:visited,
#selectedQuestionAnswers #independentQtnSet a:visited,
#selectedQuestionAnswers #filterQtnSet a:visited{
	color: #2D4C75;
	text-decoration: none;
	border-bottom: 1px solid #2D4C75;
}

#selectedQuestionAnswers #dependentQtnSet a:hover,
#selectedQuestionAnswers #independentQtnSet a:hover,
#selectedQuestionAnswers #filterQtnSet a:hover{
	background: #AD9EA2;
}

#selectedQuestionAnswers #dependentQtnSet a,
#selectedQuestionAnswers #dependentQtnSet a:visited{
	color: #9E344F;
	border-bottom: 1px solid #9E344F;
}

#selectedQuestionAnswers #dependentQtnSet a:hover{
	background: #CF9FAB;
}

.selectAnswerSpan ul.answers {
}

.selectAnswerSpan ul.answers li {
	list-style: circle;
	font-weight: normal;
}

fieldset.joinContextSection{
	border: none;
	font-size: 12px;
	font-family: Times;
}

fieldset.joinContextSection div.joinContextType{
	border:1px dotted gray;
	background:#F0EBEC;
	margin-bottom: 5px;
}

fieldset.joinContextSection div.joinContextType div.text{
	clear:right;
}

fieldset.joinContextSection div.joinContextType div.radio,
fieldset.joinContextSection div.joinContextType div.select {
	margin-left: 100px;
	font-style: italic;
}

fieldset.joinContextSection div.joinContextType div.radio input[type=radio]{
	margin-left: 20px;
}

fieldset.joinContextSection select {
	width: 120px;
	border: 1px solid #9E344F;
	color: #9E344F;
	background: #EDE4D4;
	-moz-border-radius-bottomleft: 6px;
    -moz-border-radius-topleft: 6px;
	-moz-border-radius-bottomright: 6px;
    -moz-border-radius-topright: 6px;
}

.helpheaderBanner, .reportsHeaderBanner {
	background: url("../images/header_longer.png") repeat scroll 0 0 transparent;
    color: white;
    font-weight: bold;
    height: 25px;
    margin-left: 250px;
    padding-left: 40px;
    padding-top: 5px;
    width: 811px;
}

.helpContent {
	/*border: 1px solid #EEEEEE;*/
	font-family: Arial;
	font-size: 12px;
	/*padding: 5px 10px;*/
	/*min-height: 135px;*/
	/*height: 170px;overflow: auto;*/
}

.reportsContent {
	border: 1px solid gray;
	border-top: none;
	font-family: Arial;
	font-size: 12px;
	padding: 5px 10px;
	min-height: 135px;
	overflow: auto;
}
.reportsTableHeader {
	background: url("../images/header_longer.png") no-repeat;
	color: #262262;
	font-weight: bold;
	text-align: center;
	width: 100%;
}
.reportsTableHeader2 {
	background: #CCC;
	color: #9E344F;
	font-weight: bold;
}
.reportsTableHeaderCell2 {
	border: 1px solid #9E344F;
	background: #CCC;
}

.google-visualization-table-tr-odd, .google-visualization-table-tr-odd td, .google-visualization-table-tr-odd-nonstrict {
    background-color: #E6E5F3;
}

.google-visualization-table-table .reportsTableHeaderCell {
	background: none;
	border: none;
	padding: 8px 0 8px 40px;
	min-width: 200px;
	border-bottom: 1px solid #383838;
}

/*styling for table of questions with search boxes*/
#table_container_content .google-visualization-table-table{
	width:800px;
}
#table_container_content #search_columns{
    color: #9E344F;
    font-size: 11px;
    padding: 10px 60px 25px 5px;
}

#table_container_content .search_wrapper{
	padding-bottom:5px;
	float:left;
}

#table_container_content .search_wrapper .add_search_link, #table_container_content .search_wrapper .remove_search_link{
	color:#9E344F;
}

#table_container_content #result_counter{
	float:right;
}

.google-visualization-table-td {
	vertical-align: top;
	border: 1px solid gray;
}

.google-visualization-table-table tr.noBackground td{
	background-color: #D6D5EB;
}

.google-visualization-table-table {
	margin-left: 1px;
}

div.plusicon {
	background: url("../images/plusicon.png") no-repeat 0 5px;
	padding-left: 10px;
	color: #9E344F;
	margin-top: 8px;
}
div.minusicon{
	background: url("../images/minusicon.jpg") no-repeat 0 5px;
	padding-left: 10px;
	color: #9E344F;
	margin-top: 8px;
}
.pageTitle {
	line-height: 430%;
	color: white;
	background: url("../images/banner.png") no-repeat #FFF;
	margin: -8px;
	margin-left: 50px;
	margin-top: 0;
    font-size: 20px;
    width: 1161px;
    margin-bottom: -19px;
}

.pageTitleImage{
	width: 140px;
	margin-right: 30px;
	float: left;
	margin-left: 10px;
	margin-top: 5px;
	height:75px;
}

.cChartControl {
	font: normal bold 13px Arial;
	margin: 10px;
}

.cChartControlContainer {
	padding: 5px;
	background: url('../images/cChartGradient.jpg') #E6E6FC repeat-x;
	border: 2px solid #ACACFC;
}

#report_controls a{
	float:left;
	/*width:800px;*/
	/*margin-top:10px;*/
	margin-top: 0;
	display: block;
	background: url('../images/icon_download.gif') no-repeat 0 10px;
	text-decoration: None;
	color: #9E344F;
	font-weight: bold;
	padding-left: 20px;
	height: 20px;
	padding-top: 4px;
	padding-bottom: 5px;
}

.selectAnswerSpan{width:169px;}

/*show more and show less links*/
.google-visualization-table-table .showMore, .google-visualization-table-table .showLessLink{
   color: #333;
    display: block;
    font-size: 10px;
    height: 10px;
    margin-bottom: 5px;
    width: 120px;
    text-decoration:none;
    background:url(../images/moreLessBg.jpg) repeat-x;
    padding:0;
    padding-bottom:7px;
    border: 1px dotted #847BC5;
    width:64px;
    margin-top:2px;
}

.google-visualization-table-table .showMore{
    color: #333;
    font-weight: normal;
    /*margin-left: 130px;*/
    float:right;
}

.google-visualization-table-table .showLessLink{
    color: red;
    font-weight: normal;
}

.google-visualization-table-table .showMore:hover, .google-visualization-table-table .showLessLink:hover{
	text-decoration:none;
}

.selectAnswerSpan div{padding:0px;}

fieldset.selectAnswerSpan .leftColumn{float:left;width:110px;}
fieldset.selectAnswerSpan .rightColumn{float:left;}

#table_container_content .google-visualization-table-table tr .google-visualization-table-td-number{
	display:none;
	text-align:left;
	white-space:normal;
	padding: 0 -15px 0 0;
	max-width: 160px;
}

div.rightColumnWrap {
	width: 187px;
}

#table_container_content .google-visualization-table-table td.answersShow{
	display:table-cell;
	text-align:left;
	white-space:normal;
	padding: 0 -15px 0 0;
	max-width: 160px;
}

#table_container_content .google-visualization-table-table td.answersHide{
	display:none;
	padding: 0;
}

/*#reportOptionsControlDiv,*/
.report_controls {
	background: none repeat scroll 0 0 #F5F4AF;
    border: 1px solid gray;
    color: #4D3E42;
    float: right;
    font-family: Times;
    font-size: 14px;
    line-height: 200%;
    margin-bottom: 5px;
    margin-top: 0px;
    padding-left: 5px;
    width: 820px;
}

#reportOptionalControls {
	float: right;
	font-family: Arial;
    margin-top:4px;
    font-size:10px;
}

#reportOptionalControls select {
	color: gray;
	font-size: 10px;
}

#report_controls a.showFilterLink {
	color: #716380;
	margin-left: 15px;
	background: url('../images/filter.png') no-repeat 0 10px;
}

#report_controls a.saveQueryLink {
	color: #6B857B;
	margin-left: 15px;
	background: url('../images/save.png') no-repeat 0 10px;
}

#reportOptionsControlDiv span{
	float: right;
	font-size:10px;
}

#reportOptionsControlDiv select {
	width: 100px;
	border: 1px solid gray;
	font-size: 10px;
	color: gray;
	margin-right: 5px;
}

#reportOptionsControlDiv option {
	background: wheat;
}

.reportImageDlgBtn {
	float:right;
	background:darkgray;
	color:black;
	font-weight:bold;
	margin-top:5px;
}

/* Tooltip styles */
.tooltip {
	display:none;
	background:transparent url(../images/tooltip.png) no-repeat;
	font-size:12px;
	min-height: 80px;
	width:160px;
	padding:25px;
	color:#fff;
}

#showSavedReportsContainer .tooltip .content{
	margin: 0;
	font-size: 12px;
	background: none;
	border: none;
}

/* Navbar-related styles*/
ul.menutabs
{	margin: 0;
	padding: 0;
	z-index: 30;
	position: absolute;}

ul.menutabs li
{	margin: 0;
	padding: 0;
	list-style: none;
	float: left;
	font: bold 11px arial}

ul.menutabs li a
{	background: none repeat scroll 0 0 #77D8F7;
    border-left: 1px solid #14BBF2;
    border-right: 1px solid #14BBF2;
    border-top: 1px solid #14BBF2;
    color: black;
    display: block;
    margin: 2px 5px 0 0;
    padding: 4px 10px;
    text-align: center;
    text-decoration: none;
}

ul.menutabs li a:hover
{	background: #14BBF2;
	color: #A8234B;}

ul.menutabs div
{	position: absolute;
	visibility: hidden;
	margin: 0;
	padding: 0;
	background:#A4C1E4;
	border: 1px solid #DE9EAE}

ul.menutabs div a
	{	position: relative;
		display: block;
		margin: 0;
		padding: 5px 10px;
		width: auto;
		white-space: nowrap;
		text-align: left;
		text-decoration: none;
		font: 11px arial;
		background: none repeat scroll 0 0 #3874BE;
    	border: 1px solid #A4C1E4;
    	color: #A4C1E4;}

ul.menutabs div a:hover
	{	background: #14BBF2;
		color: #A8234B}

/*JQuery UI-related overrides */
.ui-widget input {
	font-size: 15px;
}
.ui-corner-left {
    -moz-border-radius-bottomleft: 6px;
    -moz-border-radius-topleft: 6px;
	-moz-border-radius-bottomright: 6px;
    -moz-border-radius-topright: 6px;
}

.ui-corner-right {
    -moz-border-radius-bottomleft: 6px;
    -moz-border-radius-topleft: 6px;
	-moz-border-radius-bottomright: 6px;
    -moz-border-radius-topright: 6px;
}

.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
	background: url("images/ui-bg_glass_70_ede4d4_1x400.png") repeat-x scroll 50% 50% #EDE4D4;
    border: 1px solid #9E344F;
    color: #9E344F;
    font-weight: bold;
}

ul.ui-autocomplete {
	max-height: 100px;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 20px;
	width: 125px;
	font-family: Arial Narrow;
	font-size: 16px;
}

ul.ui-autocomplete li {
	list-style: none;
}

ul.ui-autocomplete.ui-menu {
	width: 500px;
}

/*END JQuery UI-related overrides */

/*Filter-related styles are now in css/filterDataTableControl1.css*/
#filter_container {
	/*margin-bottom: 160px;*/
}

#filter_container_wrapper {
	position: absolute;
	z-index: 1000;
	top:150px;
	left:320px;
	border:3px ridge darkgray;
	padding-bottom:10px;
	padding-left:10px;
	padding-right:10px;
	background: url('../images/filterwrapper.jpg') repeat-y #433F43;
}

/*styling for table of questions with search boxes*/
#table_container_content .google-visualization-table-table{
	width:851px;
}
#table_container_content #search_columns{
    color: #9E344F;
    font-size: 11px;
    padding: 10px 60px 25px 5px;
}

#table_container_content .search_wrapper{
	padding-bottom:5px;
	float:left;
	clear:right;
}

#table_container_content .search_wrapper .add_search_link, #table_container_content .search_wrapper .remove_search_link{
	color:#9E344F;
}

fieldset#search_columns #result_counter{
	float:right;
	margin-top: 3px;
	color: black;
	display: inline;
}

fieldset#search_columns{
	font-family: Times;
	width: 830px;
	margin-left:0px;
	border: 1px dotted #CCC;
	margin-bottom: 20px;
	background: url("../images/custom-reports.png") no-repeat 10px 8px #FFF;
	margin-top:18px;
}

fieldset#search_columns legend{
	background: url("../images/submenugradient.jpg") repeat-x scroll 0 0 #000000;
	color: wheat;
	padding: 0pt 340px 0px;
	margin: 0px 0px 0pt 70px;
	font-style: italic;
	font-weight: bold;
}

fieldset#search_columns .search_wrapper{
	margin-left: 183px;
	text-align: center;
}

fieldset#search_columns .search_box_content {
	/*float: right;*/
	text-align: center;
	margin-bottom: 8px;
	font-family:Arial;
	font-size:12px;
}

fieldset#search_columns span.searchIcon{
	background: url('../images/searchIcon.png') no-repeat;
	padding-left: 18px;
}

fieldset#search_columns .column_indicator{
	margin-right: 5px;
}

fieldset#search_columns #current_rows, fieldset#search_columns #total_rows{
	font-weight: bold;
}

/*END styling for table of questions with search boxes*/

/* Mask-related styles */

.loadmask-msg {
	border: 1px solid #A4C1E4;
}

.loadmask-msg div {
	padding: 10px 140px 15px 50px;
	border: 1px solid #A4C1E4;
	font-size: 14px;
	color: #A4C1E4;
	background: url(../images/loadmask_bg.jpg) repeat-y black;
}
.loadmask-msg div .loadmask-msg-messageContent{
	background: url(../images/loadmask_circle.gif) no-repeat;
	border: none;
	margin-left: -40px;
	padding-top: 15px;
}
.loadmask-msg div .loadmask-msg-messageContent span{
	padding-left: 10px;
}
/* END Mask-related styles */

/* Popup Styles */
.popup-dialog-wrapper {
	/*background-color: darkgray;*/
}

div#popup_container #popup_message {
	padding-top: 10px;
}

div#popup_container #popup_message li {
	padding: 5px;
	line-height: 150%;
}
/* END Popup Styles */

/* Login styles */
.inputTable {
	font-size: 1.1em;
	width: 250px;
	border-spacing: 0;
	border-color: #f4f7fb;
}
.inputTable td, .inputTable th
{
    padding: 5px;
}
.inputTable * {
	background-color: #f4f7fb;
}

.inputTable input {
	background-color: white;
	margin: 5px;
}

#userCredentials .inputTable {
	margin-left: 280px;
}

.loginHeader, .loginBottom {
	background-color: #e9eff6;
	color: #5f82a9;
	font-size: 1.2em;
	font-weight: bold;
}

.requiredField {
    background-image: url("../images/required-field.png");
    background-position:left 3px;
	background-repeat:no-repeat;
	margin-left: 3px;
	padding-left:10px;
}

.twoColFixLtHdr #container {
	width: 872px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
	background: none;
	margin: 15px auto; /* the auto margins (in conjunction with a width) center the page */
	border: 0;
	text-align: left; /* this overrides the text-align: center on the body element. */
}
.twoColFixLtHdr #header {
	background: none;
	padding: 0;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.twoColFixLtHdr #header h1 {
	margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
	padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}

.twoColFixLtHdr #content {
	background: url(../images/07.jpg) repeat-y scroll left top;
	text-align:left;
	/* padding-left: 20px;
	padding: 5px 45px 10px; */
	padding: 5px 45px 0px;
	width: 884px;
}

.twoColFixLtHdr #sidebar1 {
	float: left; /* since this element is floated, a width must be given */
	width: 170px; /* the actual width of this div, in standards-compliant browsers, or standards mode in Internet Explorer will include the padding and border in addition to the width */
	background:#F5F5F5; /* the background color will be displayed for the length of the content in the column, but no further */
	padding: 15px 10px 15px 20px;
	margin-left:18px;
}
.twoColFixLtHdr #mainContent {
	margin: 0 0 0 250px; /* the left margin on this div element creates the column down the left side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */
	padding: 10px 40px 10px 10px; /* remember that padding is the space inside the div box and margin is the space outside the div box */

}

.border {
	border-bottom:2px solid #CCCCCC;
	border-left:2px solid #CCCCCC;
	border-right:2px solid #CCCCCC;
	padding:0;
}

.d0 td {
	margin:0;
	padding:5px 0 5px 10px;
}

.d1 td {
	margin:0;
	padding:5px 0 5px 10px;
}

h4 {
color:#4F81BD;
font-family:Verdana,Geneva,sans-serif;
margin:0;
padding:10px;
}

.validation-error {
	color:red;
	padding-left: 15px;
	font-size: small;
}

.loginFormContainer {
	padding-top: 100px;
	width: 100%;
}

.loginTitle{
	width: 800px;
	font-family:Times;
	font-style:italic;
	color: #262262;
	font-size:16px;
	font-weight: bold;
	padding: 10px;
	background:url(../images/header_long.png) no-repeat 0 0;
}

.webkit-title{
	padding-left: 0px !important;
	padding-right: 0px !important;
}

.loginForm{
	border: 1px solid gray;
	background: url("../images/confirmboxgradient.jpg") repeat-x;
	width: 800px;
	margin-right: 10px;
	margin-left: -10px;
}

.loginForm table {
	width: 300px;
}

.login-errror {
	color:red;
	font-weight: bold;
}

.admin-container {
	padding-top: 20px;
	width: 100%;
}

.admin-title {
	width: 800px;
	font-family:Times;
	font-style:italic;
	color: #262262;
	font-size:16px;
	font-weight: bold;
	padding: 10px;
	background:url(../images/header_long.png) no-repeat 0 0;
}

.admin-content {
	border: 1px solid gray;
	background: url("../images/confirmboxgradient.jpg") repeat-x;
	width: 800px;
	margin-right: 10px;
	margin-left: -10px;
}

.admin-content  table {
	margin-top: 40px;
	width: 500px;
	border: 0px !important;
}

.admin-content  table td{
	border: 0px !important;
	vertical-align: middle;
}

.admin-content  table td a{
	vertical-align: middle;
}

.admin-user-edit img{
	border: 0px !important;
}


text:
{% extends "account/base.html" %}

{% load i18n %}
{% load account %}
{% load url from future %}
{% load crispy_forms_tags %}

{% block head_title %}{% trans "Sign In" %}{% endblock %}

{% block header %}

{% trans "Sign In" %}

{% endblock %}

{% block content %}

{% if socialaccount.providers  %}

{% blocktrans with site.name as site_name %}Please sign in with one
    of your existing third party accounts. Or, sign up
    for a {{ site_name }} account and sign in below:{% endblocktrans %}

      {% include "socialaccount/snippets/provider_list.html" with process="login" %}

{% trans 'or' %}

{% include "socialaccount/snippets/login_extra.html" %}

{% endif %}

<form class="login" method="POST" action="{% url 'account_login' %}">
    {% csrf_token %}
    {{ form|crispy }}
    {% if redirect_field_value %}
    <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
    {% endif %}

{% trans "Forgot Password?" %}

    <button class="btn btn-primary" type="submit">{% trans "Sign In" %}</button>
</form>
{% endblock %}


text:
# WARNING: THIS HAS MINIMAL TESTING AND SHOULD BE CONSIDERED EXPERIMENTAL
#          Use at your own risk, and read through the code before using it
function Invoke-AzureRmVmScript {
<#
    .SYNOPSIS
        Invoke an ad hoc PowerShell script on an AzureRM VM

    .DESCRIPTION
        Invoke an ad hoc PowerShell script on an AzureRM VM

        Prerequisites:
            * You have the AzureRM module
            * You're authenticated and have appropriate privileges
            * You're running PowerShell 3 or later (tested on 5, YMMV)

    .PARAMETER ResourceGroupName
        Resource group for the specified VMs

    .PARAMETER VMName
        One or more VM names to run against

    .PARAMETER StorageAccountName
        Storage account to store the script we invoke

    .PARAMETER StorageAccountKey
        Optional storage account key to generate StorageContext

        If not specified, we look one up via Get-AzureRmStorageAccountKey

        Note that this is a string. Beware, given the sensitivity of this key

    .PARAMETER StorageContext
        Optional Azure storage context to use.  We build one if not provided

    .PARAMETER StorageContainer
        Optional StorageContainer to use.  Defaults to 'scripts'

    .PARAMETER Filename
        Optional Filename to use.  Defaults to CustomScriptExtension.ps1

    .PARAMETER ExtensionName
        Optional arbitrary name for the extension we add.  Defaults to CustomScriptExtension

    .PARAMETER ForceExtension
        If specified and a CustomScriptExtension already exists on a VM, we will remove it

    .PARAMETER ForceBlob
        If specified and a blob exists with the same Filename and StorageContainer used here, we overwrite it

    .PARAMETER Force
        If specified, we trigger both ForceExtension and ForceBlob

    .PARAMETER ScriptBlock
        Scriptblock to invoke.  It appears we can collect output from StdOut and StdErr.  Keep in mind these will be in string form.

    .EXAMPLE

    $params = @{
        ResourceGroupName = 'My-Resource-Group'
        VMName = 'VM-22'
        StorageAccountName = 'storageaccountname'
    }
    Invoke-AzureRmVmScript @params -ScriptBlock {
        "Hello world! Running on $(hostname)"
        Write-Error "This is an error"
        Write-Warning "This is a warning"
        Write-Verbose "This is verbose!"
    }

        # ResourceGroupName : My-Resource-Group
        # VMName            : VM-22
        # Substatuses       : {Microsoft.Azure.Management.Compute.Models.InstanceViewStatus,
        #                      Microsoft.Azure.Management.Compute.Models.InstanceViewStatus}
        # StdOut_succeeded  : Hello world! Running on VM-22\nWARNING: This is a warning
        # StdErr_succeeded  : C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.
        #                     8\Downloads\0\Cus\ntomScriptExtension.ps1 : This is an
        #                     error\n    + CategoryInfo          : NotSpecified: (:)
        #                     [Write-Error], WriteErrorExcep \n   tion\n    +
        #                     FullyQualifiedErrorId :
        #                     Microsoft.PowerShell.Commands.WriteErrorExceptio \n
        #                     n,CustomScriptExtension.ps1\n

    # This example runs a simple hello world script on VM-22
    # The force parameter removed an existing CustomScriptExtension,
    #     and overwrote a matching container/file in my azure storage account

    .FUNCTIONALITY
        Azure
#>
    [cmdletbinding()]
    param(
        # todo: add various parameter niceties
        [Parameter(Mandatory = $True,
                   Position = 0,
                   ValueFromPipelineByPropertyName = $True)]
        [string[]]$ResourceGroupName,

        [Parameter(Mandatory = $True,
                   Position = 1,
                   ValueFromPipelineByPropertyName = $True)]
        [string[]]$VMName,

        [Parameter(Mandatory = $True,
                   Position = 2)]
        [scriptblock]$ScriptBlock, #todo: add file support.

        [Parameter(Mandatory = $True,
                   Position = 3)]
        [string]$StorageAccountName,

        [string]$StorageAccountKey, #Maybe don't use string...

        $StorageContext,

        [string]$StorageContainer = 'scripts',

        [string]$Filename, # Auto defined if not specified...

        [string]$ExtensionName, # Auto defined if not specified

        [switch]$ForceExtension,
        [switch]$ForceBlob,
        [switch]$Force
    )
    begin
    {
        if($Force)
        {
            $ForceExtension = $True
            $ForceBlob = $True
        }
    }
    process
    {
        Foreach($ResourceGroup in $ResourceGroupName)
        {
            Foreach($VM in $VMName)
            {
                if(-not $Filename)
                {
                    $GUID = [GUID]::NewGuid().Guid -replace "-", "_"
                    $FileName = "$GUID.ps1"
                }
                if(-not $ExtensionName)
                {
                    $ExtensionName = $Filename -replace '.ps1', ''
                }

                $CommonParams = @{
                    ResourceGroupName = $ResourceGroup
                    VMName = $VM
                }

                Write-Verbose "Working with ResourceGroup $ResourceGroup, VM $VM"
                # Why would Get-AzureRMVmCustomScriptExtension support listing extensions regardless of name? /grumble
                Try
                {
                    $AzureRmVM = Get-AzureRmVM @CommonParams -ErrorAction Stop
                    $AzureRmVMExtended = Get-AzureRmVM @CommonParams -Status -ErrorAction Stop
                }
                Catch
                {
                    Write-Error $_
                    Write-Error "Failed to retrieve existing extension data for $VM"
                    continue
                }

                # Handle existing extensions
                Write-Verbose "Checking for existing extensions on VM '$VM' in resource group '$ResourceGroup'"
                $Extensions = $null
                $Extensions = @( $AzureRmVMExtended.Extensions | Where {$_.Type -like 'Microsoft.Compute.CustomScriptExtension'} )
                if($Extensions.count -gt 0)
                {
                    Write-Verbose "Found extensions on $VM`:`n$($Extensions | Format-List | Out-String)"
                    if(-not $ForceExtension)
                    {
                        Write-Warning "Found CustomScriptExtension '$($Extensions.Name)' on VM '$VM' in Resource Group '$ResourceGroup'.`n Use -ForceExtension or -Force to remove this"
                        continue
                    }
                    Try
                    {
                        # Theoretically can only be one, so... no looping, just remove.
                        $Output = Remove-AzureRmVMCustomScriptExtension @CommonParams -Name $Extensions.Name -Force -ErrorAction Stop
                        if($Output.StatusCode -notlike 'OK')
                        {
                            Throw "Remove-AzureRmVMCustomScriptExtension output seems off:`n$($Output | Format-List | Out-String)"
                        }
                    }
                    Catch
                    {
                        Write-Error $_
                        Write-Error "Failed to remove existing extension $($Extensions.Name) for VM '$VM' in ResourceGroup '$ResourceGroup'"
                        continue
                    }
                }

                # Upload the script
                Write-Verbose "Uploading script to storage account $StorageAccountName"
                if(-not $StorageContainer)
                {
                    $StorageContainer = 'scripts'
                }
                if(-not $Filename)
                {
                    $Filename = 'CustomScriptExtension.ps1'
                }
                if(-not $StorageContext)
                {
                    if(-not $StorageAccountKey)
                    {
                        Try
                        {
                            $StorageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $ResourceGroup -Name $storageAccountName -ErrorAction Stop)[0].value
                        }
                        Catch
                        {
                            Write-Error $_
                            Write-Error "Failed to obtain Storage Account Key for storage account '$StorageAccountName' in Resource Group '$ResourceGroup' for VM '$VM'"
                            continue
                        }
                    }
                    Try
                    {
                        $StorageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
                    }
                    Catch
                    {
                        Write-Error $_
                        Write-Error "Failed to generate storage context for storage account '$StorageAccountName' in Resource Group '$ResourceGroup' for VM '$VM'"
                        continue
                    }
                }

                Try
                {
                    $Script = $ScriptBlock.ToString()
                    $LocalFile = [System.IO.Path]::GetTempFileName()
                    Start-Sleep -Milliseconds 500 #This might not be needed
                    Set-Content $LocalFile -Value $Script -ErrorAction Stop

                    $params = @{
                        Container = $StorageContainer
                        Context = $StorageContext
                    }

                    $Existing = $Null
                    $Existing = @( Get-AzureStorageBlob @params -ErrorAction Stop )

                    if($Existing.Name -contains $Filename -and -not $ForceBlob)
                    {
                        Write-Warning "Found blob '$FileName' in container '$StorageContainer'.`n Use -ForceBlob or -Force to overwrite this"
                        continue
                    }
                    $Output = Set-AzureStorageBlobContent @params -File $Localfile -Blob $Filename -ErrorAction Stop -Force
                    if($Output.Name -notlike $Filename)
                    {
                        Throw "Set-AzureStorageBlobContent output seems off:`n$($Output | Format-List | Out-String)"
                    }
                }
                Catch
                {
                    Write-Error $_
                    Write-Error "Failed to generate or upload local script for VM '$VM' in Resource Group '$ResourceGroup'"
                    continue
                }

                # We have a script in place, set up an extension!
                Write-Verbose "Adding CustomScriptExtension to VM '$VM' in resource group '$ResourceGroup'"
                Try
                {
                    $Output = Set-AzureRmVMCustomScriptExtension -ResourceGroupName $ResourceGroup `
                                                                 -VMName $VM `
                                                                 -Location $AzureRmVM.Location `
                                                                 -FileName $Filename `
                                                                 -ContainerName $StorageContainer `
                                                                 -StorageAccountName $StorageAccountName `
                                                                 -StorageAccountKey $StorageAccountKey `
                                                                 -Name $ExtensionName `
                                                                 -TypeHandlerVersion 1.1 `
                                                                 -ErrorAction Stop

                    if($Output.StatusCode -notlike 'OK')
                    {
                        Throw "Set-AzureRmVMCustomScriptExtension output seems off:`n$($Output | Format-List | Out-String)"
                    }
                }
                Catch
                {
                    Write-Error $_
                    Write-Error "Failed to set CustomScriptExtension for VM '$VM' in resource group $ResourceGroup"
                    continue
                }

                # collect the output!
                Try
                {
                    $AzureRmVmOutput = $null
                    $AzureRmVmOutput = Get-AzureRmVM @CommonParams -Status -ErrorAction Stop
                    $SubStatuses = ($AzureRmVmOutput.Extensions | Where {$_.name -like $ExtensionName} ).substatuses
                }
                Catch
                {
                    Write-Error $_
                    Write-Error "Failed to retrieve script output data for $VM"
                    continue
                }

                $Output = [ordered]@{
                    ResourceGroupName = $ResourceGroup
                    VMName = $VM
                    Substatuses = $SubStatuses
                }

                foreach($Substatus in $SubStatuses)
                {
                    $ThisCode = $Substatus.Code -replace 'ComponentStatus/', '' -replace '/', '_'
                    $Output.add($ThisCode, $Substatus.Message)
                }

                [pscustomobject]$Output
            }
        }
    }
}

# TODO:
    # Parameters could be nicer
    # Allow parallelization. Default unspecified Filename should be unique
    # Should we clean up script in Azure after running it?
    # Should we allow running an existing script?
    # Should we clean up the temp file?
    # Other stuff, this was a super quick implementation


text:
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}

module Text.XML.ToJSON
  (
{-| This library provide a way to convert xml to json.

    Further more, by combining with aeson's parsing facility, it provide a way to parse xml to haskell data type.
 -}
    xmlToJSON
  , parseXML
  , JSONParseError(JSONParseError)
    -- * utils
  , tokensToJSON
  , elementToJSON
  , tokensToElement
  , tokenToBuilder
  ) where

import Control.Monad (when, liftM)
import Control.Arrow (second)
import Control.Exception (Exception)

import Data.Typeable (Typeable)
import qualified Data.Text as T
import qualified Data.ByteString.Lazy as L
import Data.Conduit (($=), ($$), MonadThrow(monadThrow))
import qualified Data.Conduit.List as C
import qualified Data.HashMap.Strict as HM
import qualified Data.Vector as V

import Text.HTML.TagStream
import qualified Text.HTML.TagStream.Text as T
import Text.XML.ToJSON.Builder
import Data.Aeson (Value(..), Object, FromJSON, fromJSON, Result(Error, Success))

-- | Convert tagstream-conduit `Token' to xml element `Builder'
tokenToBuilder :: T.Token -> Builder
tokenToBuilder (TagOpen s as selfClose) = do
    beginElement s
    addAttrs as
    when selfClose endElement
tokenToBuilder (TagClose _) = endElement -- FIXME should match tag name?
tokenToBuilder (Text s) = addValue s
tokenToBuilder _ = return ()

-- |Convert xml `Element' to aeson `Value' .
--
-- xml attributes and text values are converted to special object attribute @__attributes@ and @__values@.
elementToJSON :: Element -> Value
elementToJSON (Element as vs cs) =
    if null as && null cs
      then
        String (T.concat vs)
      else
        Object $ HM.fromListWith mergeObject
                   $ attrs
                  ++ values
                  ++ map (second elementToJSON) cs
  where
    attrs = if null as
              then []
              else [("__attributes", Object (attrsToObject as))]
    values = if null vs
               then []
               else [("__values", Array (V.fromList (map String vs)))]

    attrsToObject :: [(T.Text, T.Text)] -> Object
    attrsToObject = HM.fromList . map (second String)

    mergeObject :: Value -> Value -> Value
    mergeObject v (Array arr) = Array (V.snoc arr v)
    mergeObject v1         v2 = Array (V.fromList [v2, v1])

-- | Consume a list of `T.Token' to build an `Element'
tokensToElement :: [T.Token] -> Element
tokensToElement ts = runBuilder (mapM_ tokenToBuilder ts)

-- |Convert list of tagstream-conduit `T.Token` to aeson `Value', combining of `tokensToElement' and `elementToJSON'
tokensToJSON :: [T.Token] -> Value
tokensToJSON = elementToJSON . tokensToElement

newtype JSONParseError = JSONParseError String
  deriving (Typeable, Show)
instance Exception JSONParseError

-- | parse xml to haskell data type by using aeson's `FromJSON'.
parseXML :: (MonadThrow m, FromJSON a) => L.ByteString -> m a
parseXML s = xmlToJSON s >>= convert
  where
    convert v =
        case fromJSON v of
            Error err -> monadThrow (JSONParseError err)
            Success a -> return a

-- | Parse lazy xml `ByteString' to aeson `Value'.
xmlToJSON :: MonadThrow m => L.ByteString -> m Value
xmlToJSON s = liftM tokensToJSON $ C.sourceList (L.toChunks s) $= T.tokenStreamBS $$ C.consume


text:
package org.ebayopensource.fidouaf.marvin.client.msg.client;

public enum UAFIntentType {
		DISCOVER,
		DISCOVER_RESULT,
		CHECK_POLICY,
		CHECK_POLICY_RESULT,
		UAF_OPERATION,
		UAF_OPERATION_RESULT,
		UAF_OPERATION_COMPLETION_STATUS
}


text:
using System.IO;
using AldursLab.WurmApi.Tests.Integration.Builders;
using AldursLab.WurmApi.Tests.Integration.Builders.WurmClient;
using AldursLab.WurmApi.Tests.Integration.TempDirs;
using Telerik.JustMock;

namespace AldursLab.WurmApi.Tests
{
    class WurmApiIntegrationFixtureV2
    {
        readonly Platform targetPlatform;
        // note:
        // using default ThreadPool marshallers for both internal and public events
        // while simple marshaller would speed tests, using thread pool can potentially uncover more bugs

        WurmApiManager wurmApiManager;
        readonly object locker = new object();

        public WurmApiIntegrationFixtureV2(Platform targetPlatform)
        {
            this.targetPlatform = targetPlatform;

            var handle = TempDirectoriesFactory.CreateEmpty();
            WurmApiDataDir = new DirectoryInfo(handle.AbsolutePath);
            WurmClientMock = WurmClientMockBuilder.Create(targetPlatform);
            LoggerMock = Mock.Create<IWurmApiLogger>().RedirectToTraceOut(true);
            HttpWebRequestsMock = Mock.Create<IHttpWebRequests>();
        }

        public DirectoryInfo WurmApiDataDir { get; private set; }

        public WurmClientMock WurmClientMock { get; private set; }

        public IWurmApiLogger LoggerMock { get; set; }

        public WurmApiManager WurmApiManager
        {
            get
            {
                lock (locker)
                {
                    if (wurmApiManager == null)
                    {
                        wurmApiManager = new WurmApiManager(
                            WurmApiDataDir.FullName,
                            WurmClientMock.InstallDirectory,
                            HttpWebRequestsMock,
                            LoggerMock,
                            new WurmApiConfig() { Platform = targetPlatform });
                    }
                    return wurmApiManager;
                }
            }
        }

        public IHttpWebRequests HttpWebRequestsMock { get; private set; }
    }
}


text:
package com.batyanko.strokeratecoach.sync;

/**
 * Created by batyanko on 9/4/17.
 */

import android.content.Intent;
import android.location.LocationManager;
import android.os.Binder;
import android.os.IBinder;
import androidx.annotation.Nullable;

import com.batyanko.strokeratecoach.Utils.NotificationUtils;

public class BeeperService extends NonStopIntentService {

    BeeperTasks beeperTasks;

    public BeeperTasks.TehLocListener locListener;
    public LocationManager locationManager;

    public BeeperService() {
        super("BeeperService");
    }

    public class BeeperBinder extends Binder {
        public BeeperService getService() {

            return BeeperService.this;
        }
    }

    public void doEpicShit(Intent intent) {
        if (intent == null || intent.getAction() == null) {
            return;
        }
        String action = intent.getAction();
        if (beeperTasks == null) {
            beeperTasks = new BeeperTasks();
        }

        int[] workoutSpp = intent.getIntArrayExtra(BeeperTasks.EXTRA_WORKOUT_SPP);
        int[] workoutGears = intent.getIntArrayExtra(BeeperTasks.EXTRA_WORKOUT_GEARS);
        int sppType = intent.getIntExtra(BeeperTasks.EXTRA_WORKOUT_SPP_TYPE, 1);

        beeperTasks.executeTask(this, action, workoutSpp, workoutGears, sppType);
    }

    public void stopShit(Intent intent) {

    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return mBinder;
    }

    private final IBinder mBinder = new BeeperBinder();

    @Override
    protected void onHandleIntent(Intent intent) {
        if (intent == null || intent.getAction() == null) {
            return;
        }

        String action = intent.getAction();
        if (action.equals(BeeperTasks.ACTION_JUST_BIND)) {
            return;
        }

        beeperTasks = new BeeperTasks();
        int[] workoutSpp = intent.getIntArrayExtra(BeeperTasks.EXTRA_WORKOUT_SPP);
        int[] workoutGears = intent.getIntArrayExtra(BeeperTasks.EXTRA_WORKOUT_GEARS);
        int sppType = intent.getIntExtra(BeeperTasks.EXTRA_WORKOUT_SPP_TYPE, 1);

        beeperTasks.executeTask(this, action, workoutSpp, workoutGears, sppType);
    }

    @Override
    public boolean stopService(Intent name) {
        beeperTasks.executeTask(this, BeeperTasks.ACTION_STOP_BEEP, null, null, 0);
        return super.stopService(name);
    }

    @Override
    public void onDestroy() {
        beeperTasks.executeTask(this, BeeperTasks.ACTION_STOP_BEEP, null, null, 0);
        stopSelf();
        super.onDestroy();
    }

    @Override
    public void onTaskRemoved(Intent rootIntent) {
        NotificationUtils.clearAllNotifications(this);
        super.onTaskRemoved(rootIntent);
    }
}


text:
package proofpeer.proofscript.serialization

import proofpeer.proofscript.logic._
import proofpeer.general._
import proofpeer.proofscript.frontend.{ParseTree, SourcePosition}
import Pretype._
import Preterm._
import proofpeer.indent.Span

final class CustomizablePretermSerializer(
  SourcePositionSerializer : Serializer[SourcePosition],
  IndexedNameSerializer : Serializer[IndexedName],
  NamespaceSerializer : Serializer[Namespace],
  NameSerializer : Serializer[Name],
  TermSerializer : Serializer[Term],
  TypeSerializer : Serializer[Type],
  ParseTreeSerializer : Serializer[ParseTree])
extends NestedSerializer[Preterm]
{

  val PretermSerializer = this

  object QuotedSerializer extends TypecastSerializer[Any, ParseTree](ParseTreeSerializer)

  object PretypeSerializer extends CaseClassSerializerBase[Pretype] {

    object Kind {
      val PTYUNIVERSE = 0
      val PTYPROP = 1
      val PTYFUN = -1
      val PTYANY = 2
      val PTYVAR = -2
      val PTYQUOTE = 3
    }

    object Serializers {
      val PTYFUN = PairSerializer(PretypeSerializer,PretypeSerializer)
      val PTYVAR = BigIntSerializer
      val PTYQUOTE = QuotedSerializer
    }

    def decomposeAndSerialize(obj : Pretype) : (Int, Option[Any]) = {
      obj match {
        case PTyUniverse =>
          (Kind.PTYUNIVERSE, None)
        case PTyProp =>
          (Kind.PTYPROP, None)
        case t : PTyFun =>
          (Kind.PTYFUN, Some(Serializers.PTYFUN.serialize(PTyFun.unapply(t).get)))
        case PTyAny =>
          (Kind.PTYANY, None)
        case PTyVar(x) =>
          (Kind.PTYVAR, Some(Serializers.PTYVAR.serialize(x)))
        case PTyQuote(x) =>
          (Kind.PTYQUOTE, Some(Serializers.PTYQUOTE.serialize(x)))
        case _ => throw new RuntimeException("PretypeSerializer: cannot serialize " + obj)
      }
    }

    def deserializeAndCompose(kind : Int, args : Option[Any]) : Pretype = {
      kind match {
        case Kind.PTYUNIVERSE if args.isEmpty =>
          PTyUniverse
        case Kind.PTYPROP if args.isEmpty =>
          PTyProp
        case Kind.PTYFUN if args.isDefined =>
          PTyFun.tupled(Serializers.PTYFUN.deserialize(args.get))
        case Kind.PTYANY if args.isEmpty =>
          PTyAny
        case Kind.PTYVAR if args.isDefined =>
          PTyVar(Serializers.PTYVAR.deserialize(args.get))
        case Kind.PTYQUOTE if args.isDefined =>
          PTyQuote(Serializers.PTYQUOTE.deserialize(args.get))
        case _ => throw new RuntimeException("PretypeSerializer: cannot deserialize " + (kind, args))
      }
    }

  }

  object PretermSerializerBase extends CaseClassSerializerBase[Preterm] {

    object Kind {
      val PTMTYPING = 0
      val PTMNAME = 1
      val PTMABS = -1
      val PTMCOMB = 2
      val PTMQUOTE = -2
      val PTMTERM = 3
      val PTMERROR = -3
    }

    object Serializers {
      val PTMTYPING = PairSerializer(PretermSerializer,PretypeSerializer)
      val PTMNAME = PairSerializer(NameSerializer,PretypeSerializer)
      val PTMABS = QuadrupleSerializer(IndexedNameSerializer,PretypeSerializer,PretermSerializer,PretypeSerializer)
      val PTMCOMB = QuadrupleSerializer(PretermSerializer,PretermSerializer,OptionSerializer(BooleanSerializer),PretypeSerializer)
      val PTMQUOTE = PairSerializer(QuotedSerializer,PretypeSerializer)
      val PTMTERM = PairSerializer(TermSerializer,TypeSerializer)
      val PTMERROR = StringSerializer
    }

    def decomposeAndSerialize(obj : Preterm) : (Int, Option[Any]) = {
      obj match {
        case t : PTmTyping =>
          (Kind.PTMTYPING, Some(Serializers.PTMTYPING.serialize(PTmTyping.unapply(t).get)))
        case t : PTmName =>
          (Kind.PTMNAME, Some(Serializers.PTMNAME.serialize(PTmName.unapply(t).get)))
        case t : PTmAbs =>
          (Kind.PTMABS, Some(Serializers.PTMABS.serialize(PTmAbs.unapply(t).get)))
        case t : PTmComb =>
          (Kind.PTMCOMB, Some(Serializers.PTMCOMB.serialize(PTmComb.unapply(t).get)))
        case t : PTmQuote =>
          (Kind.PTMQUOTE, Some(Serializers.PTMQUOTE.serialize(PTmQuote.unapply(t).get)))
        case t : PTmTerm =>
          (Kind.PTMTERM, Some(Serializers.PTMTERM.serialize(PTmTerm.unapply(t).get)))
        case PTmError(x) =>
          (Kind.PTMERROR, Some(Serializers.PTMERROR.serialize(x)))
        case _ => throw new RuntimeException("PretermSerializerBase: cannot serialize " + obj)
      }
    }

    def deserializeAndCompose(kind : Int, args : Option[Any]) : Preterm = {
      kind match {
        case Kind.PTMTYPING if args.isDefined =>
          PTmTyping.tupled(Serializers.PTMTYPING.deserialize(args.get))
        case Kind.PTMNAME if args.isDefined =>
          PTmName.tupled(Serializers.PTMNAME.deserialize(args.get))
        case Kind.PTMABS if args.isDefined =>
          PTmAbs.tupled(Serializers.PTMABS.deserialize(args.get))
        case Kind.PTMCOMB if args.isDefined =>
          PTmComb.tupled(Serializers.PTMCOMB.deserialize(args.get))
        case Kind.PTMQUOTE if args.isDefined =>
          PTmQuote.tupled(Serializers.PTMQUOTE.deserialize(args.get))
        case Kind.PTMTERM if args.isDefined =>
          PTmTerm.tupled(Serializers.PTMTERM.deserialize(args.get))
        case Kind.PTMERROR if args.isDefined =>
          PTmError(Serializers.PTMERROR.deserialize(args.get))
        case _ => throw new RuntimeException("PretermSerializerBase: cannot deserialize " + (kind, args))
      }
    }

  }
  protected lazy val innerSerializer : Serializer[Preterm] = PretermSerializerBase

}

/** This is code used to create most of the above code. It is not needed during runtime, just during programming. */
object PretermSerializerGenerator {

  val typeCases : Vector[Any] = Vector(
    "PTyUniverse",
    "PTyProp",
    ("PTyFun", "PretypeSerializer", "PretypeSerializer"),
    "PTyAny",
    ("PTyVar", "BigIntSerializer"),
    ("PTyQuote", "QuotedSerializer")
  )

  val termCases : Vector[Any] = Vector(
    ("PTmTyping", "PretermSerializer", "PretypeSerializer"),
    ("PTmName", "NameSerializer", "PretypeSerializer"),
    ("PTmAbs", "IndexedNameSerializer", "PretypeSerializer", "PretermSerializer", "PretypeSerializer"),
    ("PTmComb", "PretermSerializer", "PretermSerializer", "OptionSerializer(BooleanSerializer)", "PretypeSerializer"),
    ("PTmQuote", "QuotedSerializer", "PretypeSerializer"),
    ("PTmTerm", "TermSerializer", "TypeSerializer"),
    ("PTmError", "StringSerializer")
  )

  /** Rename _main to main to generate the code. */
  def _main(args : Array[String]) {
    val typeTool = new CaseClassSerializerTool("PretypeSerializer", typeCases, "Pretype")
    //typeTool.output()
    val termTool = new CaseClassSerializerTool("PretermSerializerBase", termCases, "Preterm")
    termTool.output()
  }

}


text: dev_appserver.py --show_mail_body --datastore_path=dev.appstore src --blobstore_path=/var/tmp/blob


text:
<?php

class HighRollerXAxisLabels {

  public $style;

  function __construct(){
    $this->style = new HighRollerStyle();
  }

}
?>


text:
'use strict'

let cli = require('heroku-cli-util')
let co = require('co')

function * run (context, heroku) {
  let lib = require('../../lib/log-drains')(heroku)
  let drain = yield lib.getLogDrain(context.flags.space)
  if (context.flags.json) {
    cli.log(JSON.stringify(drain, null, 2))
  } else {
    let output = `${cli.color.cyan(drain.url)} (${cli.color.green(drain.token)})`
    cli.log(output)
  }
}

module.exports = {
  topic: 'drains',
  command: 'get',
  hidden: true,
  description: 'display the log drain for a space',
  needsApp: false,
  needsAuth: true,
  flags: [
    {name: 'space', char: 's', hasValue: true, description: 'space for which to get log drain', required: true},
    {name: 'json', description: 'output in json format'}
  ],
  run: cli.command(co.wrap(run))
}


text:
const array = [9, 2, 5, 6, 4, 3, 7, 10, 1, 8];

// be careful: this is a very basic implementation which is nice to understand the deep principle of bubble sort (going through all comparisons) but it can be greatly improved for performances
function bubbleSortBasic(array) {
  for(let i = 0; i < array.length; i++) {
    for(let j = 1; j < array.length; j++) {
      if(array[j - 1] > array[j]) {
        [array[j - 1], array[j]] = [array[j], array[j - 1]];
      }
    }
  }
  return array;
}

console.log(bubbleSortBasic(array.slice())); // => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]

// correct implementation: this is the usual implementation of the bubble sort algorithm. Some loops execution are avoided if not they are not needed
function bubbleSort(array) {
  let swapped;
  do {
    swapped = false;
    for(let i = 0; i < array.length; i++) {
      if(array[i] && array[i + 1] && array[i] > array[i + 1]) {
        [array[i], array[i + 1]] = [array[i + 1], array[i]];
        swapped = true;
      }
    }
  } while(swapped);
  return array;
}

console.log(bubbleSort(array.slice())); // => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]