text:
package com.amazonaws.services.chime.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ValidateE911AddressRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The AWS account ID.
     *

     */
    private String awsAccountId;
    /**
     *

     * The address street number, such as 200 or 2121.
     *

     */
    private String streetNumber;
    /**
     *

     * The address street information, such as 8th Avenue.
     *

     */
    private String streetInfo;
    /**
     *

     * The address city, such as Portland.
     *

     */
    private String city;
    /**
     *

     * The address state, such as ME.
     *

     */
    private String state;
    /**
     *

     * The address country, such as US.
     *

     */
    private String country;
    /**
     *

     * The address postal code, such as 04352.
     *

     */
    private String postalCode;

    /**
     *

     * The AWS account ID.
     *

     *
     * @param awsAccountId
     *        The AWS account ID.
     */

    public void setAwsAccountId(String awsAccountId) {
        this.awsAccountId = awsAccountId;
    }

    /**
     *

     * The AWS account ID.
     *

     *
     * @return The AWS account ID.
     */

    public String getAwsAccountId() {
        return this.awsAccountId;
    }

    /**
     *

     * The AWS account ID.
     *

     *
     * @param awsAccountId
     *        The AWS account ID.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ValidateE911AddressRequest withAwsAccountId(String awsAccountId) {
        setAwsAccountId(awsAccountId);
        return this;
    }

    /**
     *

     * The address street number, such as 200 or 2121.
     *

     *
     * @param streetNumber
     *        The address street number, such as 200 or 2121.
     */

    public void setStreetNumber(String streetNumber) {
        this.streetNumber = streetNumber;
    }

    /**
     *

     * The address street number, such as 200 or 2121.
     *

     *
     * @return The address street number, such as 200 or 2121.
     */

    public String getStreetNumber() {
        return this.streetNumber;
    }

    /**
     *

     * The address street number, such as 200 or 2121.
     *

     *
     * @param streetNumber
     *        The address street number, such as 200 or 2121.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ValidateE911AddressRequest withStreetNumber(String streetNumber) {
        setStreetNumber(streetNumber);
        return this;
    }

    /**
     *

     * The address street information, such as 8th Avenue.
     *

     *
     * @param streetInfo
     *        The address street information, such as 8th Avenue.
     */

    public void setStreetInfo(String streetInfo) {
        this.streetInfo = streetInfo;
    }

    /**
     *

     * The address street information, such as 8th Avenue.
     *

     *
     * @return The address street information, such as 8th Avenue.
     */

    public String getStreetInfo() {
        return this.streetInfo;
    }

    /**
     *

     * The address street information, such as 8th Avenue.
     *

     *
     * @param streetInfo
     *        The address street information, such as 8th Avenue.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ValidateE911AddressRequest withStreetInfo(String streetInfo) {
        setStreetInfo(streetInfo);
        return this;
    }

    /**
     *

     * The address city, such as Portland.
     *

     *
     * @param city
     *        The address city, such as Portland.
     */

    public void setCity(String city) {
        this.city = city;
    }

    /**
     *

     * The address city, such as Portland.
     *

     *
     * @return The address city, such as Portland.
     */

    public String getCity() {
        return this.city;
    }

    /**
     *

     * The address city, such as Portland.
     *

     *
     * @param city
     *        The address city, such as Portland.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ValidateE911AddressRequest withCity(String city) {
        setCity(city);
        return this;
    }

    /**
     *

     * The address state, such as ME.
     *

     *
     * @param state
     *        The address state, such as ME.
     */

    public void setState(String state) {
        this.state = state;
    }

    /**
     *

     * The address state, such as ME.
     *

     *
     * @return The address state, such as ME.
     */

    public String getState() {
        return this.state;
    }

    /**
     *

     * The address state, such as ME.
     *

     *
     * @param state
     *        The address state, such as ME.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ValidateE911AddressRequest withState(String state) {
        setState(state);
        return this;
    }

    /**
     *

     * The address country, such as US.
     *

     *
     * @param country
     *        The address country, such as US.
     */

    public void setCountry(String country) {
        this.country = country;
    }

    /**
     *

     * The address country, such as US.
     *

     *
     * @return The address country, such as US.
     */

    public String getCountry() {
        return this.country;
    }

    /**
     *

     * The address country, such as US.
     *

     *
     * @param country
     *        The address country, such as US.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ValidateE911AddressRequest withCountry(String country) {
        setCountry(country);
        return this;
    }

    /**
     *

     * The address postal code, such as 04352.
     *

     *
     * @param postalCode
     *        The address postal code, such as 04352.
     */

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    /**
     *

     * The address postal code, such as 04352.
     *

     *
     * @return The address postal code, such as 04352.
     */

    public String getPostalCode() {
        return this.postalCode;
    }

    /**
     *

     * The address postal code, such as 04352.
     *

     *
     * @param postalCode
     *        The address postal code, such as 04352.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ValidateE911AddressRequest withPostalCode(String postalCode) {
        setPostalCode(postalCode);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getAwsAccountId() != null)
            sb.append("AwsAccountId: ").append(getAwsAccountId()).append(",");
        if (getStreetNumber() != null)
            sb.append("StreetNumber: ").append("***Sensitive Data Redacted***").append(",");
        if (getStreetInfo() != null)
            sb.append("StreetInfo: ").append("***Sensitive Data Redacted***").append(",");
        if (getCity() != null)
            sb.append("City: ").append("***Sensitive Data Redacted***").append(",");
        if (getState() != null)
            sb.append("State: ").append("***Sensitive Data Redacted***").append(",");
        if (getCountry() != null)
            sb.append("Country: ").append("***Sensitive Data Redacted***").append(",");
        if (getPostalCode() != null)
            sb.append("PostalCode: ").append("***Sensitive Data Redacted***");
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ValidateE911AddressRequest == false)
            return false;
        ValidateE911AddressRequest other = (ValidateE911AddressRequest) obj;
        if (other.getAwsAccountId() == null ^ this.getAwsAccountId() == null)
            return false;
        if (other.getAwsAccountId() != null && other.getAwsAccountId().equals(this.getAwsAccountId()) == false)
            return false;
        if (other.getStreetNumber() == null ^ this.getStreetNumber() == null)
            return false;
        if (other.getStreetNumber() != null && other.getStreetNumber().equals(this.getStreetNumber()) == false)
            return false;
        if (other.getStreetInfo() == null ^ this.getStreetInfo() == null)
            return false;
        if (other.getStreetInfo() != null && other.getStreetInfo().equals(this.getStreetInfo()) == false)
            return false;
        if (other.getCity() == null ^ this.getCity() == null)
            return false;
        if (other.getCity() != null && other.getCity().equals(this.getCity()) == false)
            return false;
        if (other.getState() == null ^ this.getState() == null)
            return false;
        if (other.getState() != null && other.getState().equals(this.getState()) == false)
            return false;
        if (other.getCountry() == null ^ this.getCountry() == null)
            return false;
        if (other.getCountry() != null && other.getCountry().equals(this.getCountry()) == false)
            return false;
        if (other.getPostalCode() == null ^ this.getPostalCode() == null)
            return false;
        if (other.getPostalCode() != null && other.getPostalCode().equals(this.getPostalCode()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getAwsAccountId() == null) ? 0 : getAwsAccountId().hashCode());
        hashCode = prime * hashCode + ((getStreetNumber() == null) ? 0 : getStreetNumber().hashCode());
        hashCode = prime * hashCode + ((getStreetInfo() == null) ? 0 : getStreetInfo().hashCode());
        hashCode = prime * hashCode + ((getCity() == null) ? 0 : getCity().hashCode());
        hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
        hashCode = prime * hashCode + ((getCountry() == null) ? 0 : getCountry().hashCode());
        hashCode = prime * hashCode + ((getPostalCode() == null) ? 0 : getPostalCode().hashCode());
        return hashCode;
    }

    @Override
    public ValidateE911AddressRequest clone() {
        return (ValidateE911AddressRequest) super.clone();
    }

}


text:
package hudson.util;

import hudson.Util;
import org.junit.rules.ExternalResource;

import java.security.SecureRandom;

/**
 * JUnit rule that cleans that sets a temporary {@link Secret#SECRET} value.
 *
 * @author Kohsuke Kawaguchi
 */
public class MockSecretRule extends ExternalResource {

    private String value;

    @Override
    protected void before() throws Throwable {
        byte[] random = new byte[32];
        sr.nextBytes(random);
        value = Util.toHexString(random);
        Secret.SECRET = value;
    }

    @Override
    protected void after() {
        if (!Secret.SECRET.equals(value))
            throw new IllegalStateException("Someone tinkered with Secret.SECRET");
        Secret.SECRET = null;
    }

    private static final SecureRandom sr = new SecureRandom();
}

redpajama_set_name: RedPajamaGithub


text:
The theming support in coleslaw is very flexible and relatively easy
to use. However it does require some knowledge of HTML, CSS, and how
coleslaw processes content.

To understand how coleslaw works, a look at the [hacking][hck]
documentation will prove useful. This document focuses mainly on the
template engine and how you can influence the resulting HTML.

## High-Level Overview

Themes are written using [Closure Templates][clt]. Those templates are
then compiled into functions that Lisp calls with the blog data to get
HTML. Since the Lisp code to use theme functions is already written,
your theme must follow a few rules.

Every theme **must** be in a folder under "themes/" named after the
theme. The theme's templates must start with a namespace declaration
like so: `{namespace coleslaw.theme.$MY-THEME-NAME}`.

A theme must have three templates which take *specific arguments*
(to be described later).
1. Base
2. Post
3. Index

## Two types of pages

Coleslaw generates two types of pages: `index` pages and `post` pages.
Every page other than those in the `posts/` directory is an `index`.

**Every** page uses the `base.tmpl` and fills in the content using
either the `post` or `index` templates. No important logic should be
in *any* template, they are only used to provide a consistent layout.

*  `base.tmpl` This template generates the outer shell of the HTML.
   It keeps a consistent look and feel for all pages in the blog. The
   actual content (i.e., not header/footer/css) comes from other templates.

*  `index.tmpl` This template generates the content of the `index` pages.
   That is, any page with more than one content object, e.g. the homepage.

*  `post.tmpl` This templates generates content for the individual posts.

Here's a visual example to make things clearer:
```
INDEX HTML FILES                    INDIVIDUAL POST HTML FILES
|-------------------------|         |-------------------------|
| base.tmpl               |         | base.tmpl               |
|                         |         |                         |
|  |-------------------|  |         | |------------------|    |
|  |  index.tmpl       |  |         | | post.tmpl        |    |
|  |                   |  |         | |                  |    |
|  |-------------------|  |         | |------------------|    |
|                         |         |                         |
|-------------------------|         |-------------------------|
```

## Note on Style Sheets (css)

If you only want to change the way the blog is styled, it is probably
simplest to either modify the existing default theme, `hyde`, or copy
it in entirety and then tweak only the CSS of your new theme. A large
amount of visual difference can be had with a minimum of (or no)
template hacking. There is plenty of advice on CSS styling on the web.
I'm no expert but feel free to send pull requests modifying a theme's
CSS or improving this section, perhaps by recommending a CSS resource.

## Creating a Theme from Scratch (with code)

### Step 1. Create the directory.

A theme name must be a valid lisp symbol. For this example, we'll use
`trivial`, so create a `themes/trivial` directory in the *coleslaw* repo.

### Step 2. Create the templates.

As described above, we need 3 template files `base.tmpl`, `post.tmpl`
and `index.tmpl`. Initially, let's just create the simplest theme that
compiles correctly.

base.tmpl:
```
{namespace coleslaw.theme.trivial}
{template base}
{/template}
```
post.tmpl:
```
{namespace coleslaw.theme.trivial}
{template post}
{/template}
```
index.tmpl:
```
{namespace coleslaw.theme.trivial}
{template index}
{/template}
```

This will create three template functions that coleslaw can find, named
`base`, `post`, and `index`.

### Step 3. Use it in your config.

At this point, you can change the `:theme` in your `.coleslawrc` to
`trivial` and then generate your blog with `(coleslaw:main)`. However,
all the HTML files will be empty because our templates are empty!

### Intermezzo I, The Templating Language

The templating language is documented [elsewhere][clt].
However as a short primer:

*  Everything is output literally, except template commands.
*  Template commands are enclosed in `{` and `}`.
*  Variables, which are provided by coleslaw, can be referenced
   inside a template command. So to use a variable you have to say
   `{$variable}` or `{$variable.key}`.
   **WARNING**: At present, cl-closure-template does not have great debugging.
   If you typo this, e.g. `${variable}`, you will receive an *uninformative*
   and apparently unrelated error. Also, attempted access of non-existent keys
   fails silently. We are exploring options for making debugging easier in a
   future release.
*  If statements are written as `{if ...} ... {else} ... {/if}`.
   Typical examples are: `{if $injections.body} ... {/if}` or
   `{if not isLast($link)} ... {/if}`.
*  Loops can be written as `{foreach $var in $sequence} ... {/foreach}`.

### Intermezzo II, Variables provided by Coleslaw

The variable that should be available to all templates is:
- **config**       This contains the `.coleslawrc` content.

#### Base Template Variables

- **raw**          HTML generated by a sub template, `index` or `post`.
- **content**      The object which was used to generate **raw**.
- **pubdate**      A string containing the publication date.
- **injections**   A list containing the injections. Injections are used
                   by plugins mostly to add Javascript to the page.

#### Index Template Variables

- **tags**         A list containing all the tags, each with keys
                   `name` and `url`.
- **months**       A list of all the content months, each with keys
                   `name` and `url`.
- **index**        This is the meat of the content. This variable has
                   the following keys:
   - `content`, a list of content (see below)
   - `name`,  a name to use in links or href tags
   - `title`, a title to use in H1 or header tags
- **prev**         Nil or the previous index with keys: `url` and `title`.
- **next**         Nil or the next index with keys: `url` and `title`.

#### Post Template Variable

- **prev**
- **next**
- **post**         All these variables are post objects. **prev** and
                   **next** are the adjacent posts when put in
                   chronological order. Each post has the following keys:
   - `url`, the relative url of the post
   - `tags`, a list of tags (each with keys `name` and `url`)
   - `date`, the date of posting
   - `text`, the HTML of the post's body
   - `title`, the title of the post

### Step 4. Include the content

*NOTE*: We can keep the template engine from escaping raw HTML by
adding a `|noAutoescape` clause to commands, like so: `{$raw |noAutoescape}`.

Let's now rewrite `base.tmpl` like this:
```
{namespace coleslaw.theme.trivial}
{template base}
<html>
  <head><title>Trivial Theme For Coleslaw</title></head>
  <body>
    <h1>All my pages have this title</h1>
    {$raw |noAutoescape}
  </body>
</html>
{/template}
```

A simple `index.tmpl` looks like this:
```
{namespace coleslaw.theme.trivial}
{template index}
{foreach $obj in $index.content}
<h1>{$object.title}</h1>
  {$object.text |noAutoescape}
{/foreach}
{/template}
```

And a simple `post.tmpl` is similarly:
```
{namespace coleslaw.theme.trivial}
{template post}
<h1>{$post.title}</h1>
  {$post.text |noAutoescape}
{/template}
```

### Conclusion

All of the files are now populated with content. There are still no links
between the pages so navigation is cumbersome but adding links is simple.
Just do: `<a href="{$config.domain}/{$object.url}">{$object.name}</a>`.

[clt]: https://developers.google.com/closure/templates/
[ovr]: https://github.com/redline6561/coleslaw/blob/master/docs/overview.md
[hck]: https://github.com/redline6561/coleslaw/blob/master/docs/hacking.md


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
    <gradient
	    android:startColor="#ffff00"
	    android:endColor="#00ffff"
	    android:angle="45"/>

</shape>


text:
/*
 * @format
 */

import { Ellipsoid, Ellipsoids, Format, Dp, Plural } from '.';

import LatLonEllipsoidal, { Cartesian, Dms } from './latlon-ellipsoidal';

interface TxParam {
    epoch: string;
    params: [number, number, number, number, number, number];
    rates: [number, number, number, number, number, number];
}

type TxParams = Plural<TxParam>;

interface ReferenceFrame {
    name: string;
    epoch: number;
    ellipsoid: Ellipsoid;
}

type ReferenceFrames = Plural<ReferenceFrame>;

declare class LatLonEllipsoidal_ReferenceFrame extends LatLonEllipsoidal {
    constructor(lat: number, lon: number, height?: number, referenceFrame?: ReferenceFrame, epoch?: number);
    get referenceFrame(): ReferenceFrame;
    get epoch(): number;
    static get ellipsoids(): Ellipsoids;
    static get referenceFrames(): ReferenceFrames;
    static get transformParameters(): TxParams;
    static parse(
        lat: number | string | object,
        lon?: number,
        height?: number,
        referenceFrame?: ReferenceFrame,
        epoch?: number,
    ): LatLonEllipsoidal_ReferenceFrame;
    convertReferenceFrame(toReferenceFrame: ReferenceFrame): LatLonEllipsoidal_ReferenceFrame;
    toCartesian(): Cartesian_ReferenceFrame;
    toString(format: Format, dp?: Dp, dpHeight?: number, referenceFrame?: ReferenceFrame): string;
}

declare class Cartesian_ReferenceFrame extends Cartesian {
    constructor(x: number, y: number, z: number, referenceFrame?: ReferenceFrame, epoch?: number);
    get referenceFrame(): ReferenceFrame;
    get epoch(): number;
    toLatLon(): LatLonEllipsoidal_ReferenceFrame;
    convertReferenceFrame(toReferenceFrame: ReferenceFrame): Cartesian_ReferenceFrame;
    toString(dp?: number): string;
}

export { LatLonEllipsoidal_ReferenceFrame as default, Cartesian_ReferenceFrame as Cartesian, Dms };


text:
package org.spincast.plugins.jacksonjson.tests.utils;

public interface User {

    public String getName();

    public void setName(String name);

    public int getAge();

    public void setAge(int age);

    public String getTitle();

    public void setTitle(String title);

}


text:
package com.planet_ink.coffee_mud.Common;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;

import java.util.*;

import org.mozilla.javascript.Context;
import org.mozilla.javascript.ScriptableObject;

@SuppressWarnings("unchecked")
public class DefaultCharStats implements CharStats
{

    public String ID(){return "DefaultCharStats";}
    public CMObject newInstance(){try{return (CMObject)getClass().newInstance();}catch(Exception e){return new DefaultCharStats();}}
    public void initializeClass(){}
	// competency characteristics
	protected short[] stats=new short[NUM_STATS];
	protected CharClass[] myClasses=null;
	protected Integer[] myLevels=null;
	protected Race myRace=null;
	protected String raceName=null;
	protected String genderName=null;
	protected String displayClassName=null;
	protected String displayClassLevel=null;
	protected short[] bodyAlterations=null;
	protected long unwearableBitmap=0;

	public DefaultCharStats()
	{
        setAllBaseValues(VALUE_ALLSTATS_DEFAULT);
		stats[STAT_GENDER]='M';
	}
    public void setAllBaseValues(int def)
    {
        for(int i=0;i<NUM_BASE_STATS;i++)
            stats[i]=(short)def;
    }
    public void setAllValues(int def)
    {
        for(int i=0;i<NUM_STATS;i++)
            stats[i]=(short)def;
        unwearableBitmap=0;
    }

    public void copyInto(CharStats intoStats)
    {
    	if(intoStats instanceof DefaultCharStats)
    	{
    		if(myClasses==null)
	    		((DefaultCharStats)intoStats).myClasses=null;
    		else
    		if((((DefaultCharStats)intoStats).myClasses!=null)
    		&&(((DefaultCharStats)intoStats).myClasses.length==myClasses.length))
    			for(int i=0;i<myClasses.length;i++)
    				((DefaultCharStats)intoStats).myClasses[i]=myClasses[i];
    		else
	    		((DefaultCharStats)intoStats).myClasses=(CharClass[])myClasses.clone();
    		if(myLevels==null)
	    		((DefaultCharStats)intoStats).myLevels=null;
    		else
    		if((((DefaultCharStats)intoStats).myLevels!=null)
    		&&(((DefaultCharStats)intoStats).myLevels.length==myLevels.length))
    			for(int i=0;i<myLevels.length;i++)
    				((DefaultCharStats)intoStats).myLevels[i]=myLevels[i];
    		else
	    		((DefaultCharStats)intoStats).myLevels=(Integer[])myLevels.clone();
    		((DefaultCharStats)intoStats).myRace=myRace;
    		((DefaultCharStats)intoStats).raceName=raceName;
    		((DefaultCharStats)intoStats).genderName=genderName;
    		((DefaultCharStats)intoStats).displayClassName=displayClassName;
    		((DefaultCharStats)intoStats).displayClassLevel=displayClassLevel;
    		if(bodyAlterations==null)
	    		((DefaultCharStats)intoStats).bodyAlterations=null;
    		else
    		if((((DefaultCharStats)intoStats).bodyAlterations!=null)
    		&&(((DefaultCharStats)intoStats).bodyAlterations.length==bodyAlterations.length))
    			for(int i=0;i<bodyAlterations.length;i++)
    				((DefaultCharStats)intoStats).bodyAlterations[i]=bodyAlterations[i];
    		else
	    		((DefaultCharStats)intoStats).bodyAlterations=(short[])bodyAlterations.clone();
    		for(int i=0;i<stats.length;i++)
    			((DefaultCharStats)intoStats).stats[i]=stats[i];
			((DefaultCharStats)intoStats).unwearableBitmap=unwearableBitmap;
    	}
    	else
    	{
    		intoStats.setMyClasses(getMyClassesStr());
    		intoStats.setMyLevels(getMyLevelsStr());
    		intoStats.setMyRace(getMyRace());
    		intoStats.setRaceName(raceName);
    		intoStats.setRaceName(raceName);
    		intoStats.setGenderName(genderName);
    		intoStats.setDisplayClassName(displayClassName);
    		intoStats.setDisplayClassLevel(displayClassLevel);
    		intoStats.setBodyPartsFromStringAfterRace(getBodyPartsAsString());
    		intoStats.setWearableRestrictionsBitmap(unwearableBitmap);
    	}
    }

	public void setMyClasses(String classes)
	{
		int x=classes.indexOf(";");
		Vector MyClasses=new Vector();
        CharClass C=null;
		while(x>=0)
		{
			String theClass=classes.substring(0,x).trim();
			classes=classes.substring(x+1);
			if(theClass.length()>0)
            {
                C=CMClass.getCharClass(theClass);
                if(C==null) C=CMClass.getCharClass("StdCharClass");
                MyClasses.addElement(C);
            }
			x=classes.indexOf(";");
		}
		if(classes.trim().length()>0)
        {
            C=CMClass.getCharClass(classes.trim());
            if(C==null) C=CMClass.getCharClass("StdCharClass");
            MyClasses.addElement(C);
        }
		myClasses=new CharClass[MyClasses.size()];
		for(int i=0;i<MyClasses.size();i++)
			myClasses[i]=(CharClass)MyClasses.elementAt(i);
	}
	public void setMyLevels(String levels)
	{
		if((levels.length()==0)&&(myClasses!=null)&&(myClasses.length>0))
			levels="0";
		int x=levels.indexOf(";");
		Vector MyLevels=new Vector();
		while(x>=0)
		{
			String theLevel=levels.substring(0,x).trim();
			levels=levels.substring(x+1);
			if(theLevel.length()>0)
				MyLevels.addElement(Integer.valueOf(CMath.s_int(theLevel)));
			x=levels.indexOf(";");
		}
		if(levels.trim().length()>0)
			MyLevels.addElement(Integer.valueOf(CMath.s_int(levels)));
		Integer[] myNewLevels=new Integer[MyLevels.size()];
		for(int i=0;i<MyLevels.size();i++)
			myNewLevels[i]=(Integer)MyLevels.elementAt(i);
		myLevels=myNewLevels;
	}
	public String getMyClassesStr()
	{
		if(myClasses==null)	return "StdCharClass";
		String classStr="";
		for(int i=0;i<myClasses.length;i++)
			classStr+=";"+myClasses[i].ID();
		if(classStr.length()>0)
			classStr=classStr.substring(1);
		return classStr;
	}
	public String getMyLevelsStr()
	{
		if(myLevels==null) return "";
		String levelStr="";
		for(int i=0;i<myLevels.length;i++)
			levelStr+=";"+myLevels[i].intValue();
		if(levelStr.length()>0)
			levelStr=levelStr.substring(1);
		return levelStr;
	}
    public long getWearableRestrictionsBitmap(){return unwearableBitmap|this.getMyRace().forbiddenWornBits();}
    public void setWearableRestrictionsBitmap(long bitmap){ unwearableBitmap=bitmap;}

	public int numClasses()
	{
		if(myClasses==null) return 0;
		return myClasses.length;
	}
	public int combinedSubLevels()
	{
		if((myClasses==null)
		   ||(myLevels==null)
		   ||(myClasses.length<2))
			return 0;

		int combined=0;
		for(int i=0;i<myLevels.length-1;i++)
			combined+=myLevels[i].intValue();
		return combined;
	}
	public int combinedLevels()
	{
		if((myClasses==null)
		   ||(myLevels==null))
			return 0;

		int combined=0;
		for(int i=0;i<myLevels.length-1;i++)
			combined+=myLevels[i].intValue();
		return combined;
	}
	public void setDisplayClassName(String newName){displayClassName=newName;}
	public String displayClassName()
	{
		if(displayClassName!=null) return displayClassName;
		return getCurrentClass().name(getCurrentClassLevel());
	}
	public void setDisplayClassLevel(String newLevel){displayClassLevel=newLevel;}
	public String displayClassLevel(MOB mob, boolean shortForm)
	{
		if(displayClassLevel!=null)
		{
			if(shortForm)
				return displayClassName()+" "+displayClassLevel;
			return "level "+displayClassLevel+" "+displayClassName;
		}
        if(mob==null) return "";
		int classLevel=getClassLevel(getCurrentClass());
		String levelStr=null;
		if(classLevel>=mob.envStats().level())
			levelStr=""+mob.envStats().level();
		else
			levelStr=classLevel+"/"+mob.envStats().level();
		if(shortForm)
			return displayClassName()+" "+levelStr;
		return "level "+levelStr+" "+displayClassName();
	}
	public String displayClassLevelOnly(MOB mob)
	{
        if(mob==null) return "";
		if(displayClassLevel!=null)
			return displayClassLevel;
		int classLevel=getClassLevel(getCurrentClass());
		String levelStr=null;
		if(classLevel>=mob.envStats().level())
			levelStr=""+mob.envStats().level();
		else
			levelStr=classLevel+"/"+mob.envStats().level();
		return levelStr;
	}

	public String getNonBaseStatsAsString()
	{
		StringBuffer str=new StringBuffer("");
		for(int x=NUM_SAVE_START;x<NUM_STATS;x++)
			str.append(stats[x]+";");
		return str.toString();
	}
	public void setNonBaseStatsFromString(String str)
	{
		Vector V=CMParms.parseSemicolons(str,false);
		for(int x=NUM_SAVE_START;x<NUM_STATS;x++)
		{
			int vnum=x-NUM_SAVE_START;
			if((vnum<V.size())&&(vnum>=0))
				stats[x]=CMath.s_short((String)V.elementAt(vnum));
		}
	}
	public void setRaceName(String newRaceName){raceName=newRaceName;}
	public String raceName(){
		if(raceName!=null) return raceName;
		if(myRace!=null) return myRace.name();
		return "MOB";
	}
	public CharClass getMyClass(int i)
	{
		if((myClasses==null)
		||(i<0)
		||(i>=myClasses.length))
			return CMClass.getCharClass("StdCharClass");
		return myClasses[i];
	}
	public int getClassLevel(String aClass)
	{
		if(myClasses==null)	return -1;
		for(int i=0;i<myClasses.length;i++)
			if((myClasses[i]!=null)
			&&(myClasses[i].ID().equals(aClass))
            &&(i<myLevels.length))
			   return myLevels[i].intValue();
		return -1;
	}
	public int getClassLevel(CharClass aClass)
	{
		if((myClasses==null)||(aClass==null))	return -1;
		for(int i=0;i<myClasses.length;i++)
			if((myClasses[i]!=null)
			&&(myClasses[i].ID().equals(aClass.ID()))
            &&(i<myLevels.length))
			   return myLevels[i].intValue();
		return -1;
	}

	public void setClassLevel(CharClass aClass, int level)
	{
        if(aClass==null) return;
		if(myClasses==null)
		{
			myClasses=new CharClass[1];
			myLevels=new Integer[1];
			myClasses[0]=aClass;
			myLevels[0]=Integer.valueOf(level);
		}
		else
		{
			if((level<0)&&(myClasses.length>1))
			{
				CharClass[] oldClasses=myClasses;
				Integer[] oldLevels=myLevels;
				CharClass[] myNewClasses=new CharClass[oldClasses.length-1];
				Integer[] myNewLevels=new Integer[oldClasses.length-1];
				for(int c=0;c<myNewClasses.length;c++)
				{
					myNewClasses[c]=oldClasses[c];
					if(c<oldLevels.length)
						myNewLevels[c]=oldLevels[c];
					else
						myNewLevels[c]=Integer.valueOf(0);
				}
				myClasses=myNewClasses;
				myLevels=myNewLevels;
			}
			else
			if(getClassLevel(aClass)<0)
				setCurrentClass(aClass);
			for(int i=0;i<numClasses();i++)
			{
				CharClass C=getMyClass(i);
				if((C==aClass)&&(myLevels[i].intValue()!=level))
				{
					myLevels[i]=Integer.valueOf(level);
					break;
				}
			}
		}
	}

    public boolean isLevelCapped(CharClass C) {
        if((C==null)||(C.getLevelCap()<0)||(C.getLevelCap()==Integer.MAX_VALUE))
            return false;
        return getClassLevel(C) >= C.getLevelCap();
    }

    public void setCurrentClassLevel(int level)
    {
        CharClass currentClass=getCurrentClass();
        if(currentClass!=null)
            setClassLevel(currentClass,level);
    }

	public void setCurrentClass(CharClass aClass)
	{
        if(aClass==null) return;
		if(((myClasses==null)||(myLevels==null))
		||((numClasses()==1)&&(myClasses[0].ID().equals("StdCharClass"))))
		{
			myClasses=new CharClass[1];
			myLevels=new Integer[1];
			myClasses[0]=aClass;
			myLevels[0]=Integer.valueOf(0);
			return;
		}

		int level=getClassLevel(aClass);
		if(level<0)
		{
			CharClass[] oldClasses=myClasses;
			Integer[] oldLevels=myLevels;
			CharClass[] myNewClasses=new CharClass[oldClasses.length+1];
			Integer[] myNewLevels=new Integer[oldClasses.length+1];
			for(int c=0;c<oldClasses.length;c++)
			{
				myNewClasses[c]=oldClasses[c];
				myNewLevels[c]=oldLevels[c];
			}
			myNewClasses[oldClasses.length]=aClass;
			myNewLevels[oldClasses.length]=Integer.valueOf(0);
			myClasses=myNewClasses;
			myLevels=myNewLevels;
		}
		else
		{
			if(myClasses[myClasses.length-1]==aClass)
				return;
			Integer oldI=Integer.valueOf(level);
			boolean go=false;
			CharClass[] myNewClasses=(CharClass[])myClasses.clone();
			Integer[] myNewLevels=(Integer[])myLevels.clone();
			for(int i=0;i<myNewClasses.length-1;i++)
			{
				CharClass C=getMyClass(i);
				if((C==aClass)||(go))
				{
					go=true;
					myNewClasses[i]=myNewClasses[i+1];
					myNewLevels[i]=myNewLevels[i+1];
				}
			}
			myNewClasses[myNewClasses.length-1]=aClass;
			myNewLevels[myNewClasses.length-1]=oldI;
			myClasses=myNewClasses;
			myLevels=myNewLevels;
		}
	}
	public CharClass getCurrentClass()
	{
		if(myClasses==null)
			setCurrentClass(CMClass.getCharClass("StdCharClass"));
		return myClasses[myClasses.length-1];
	}

    public int getCurrentClassLevel()
    {
        if(myLevels==null) return -1;
        return myLevels[myLevels.length-1].intValue();
    }

	public Race getMyRace()
	{
		if(myRace==null)
			myRace=CMClass.getRace("StdRace");
		return myRace;
	}

	public void setMyRace(Race newVal){myRace=newVal;}
	public int getBodyPart(int racialPartNumber)
	{
		int num=getMyRace().bodyMask()[racialPartNumber];
		if((num<0)||(bodyAlterations==null)) return num;
		num+=bodyAlterations[racialPartNumber];
		if(num<0) return 0;
		return num;
	}

	public String getBodyPartsAsString()
	{
		StringBuffer str=new StringBuffer("");
		for(int i=0;i<getMyRace().bodyMask().length;i++)
			str.append(getBodyPart(i)+";");
		return str.toString();
	}

	public void setBodyPartsFromStringAfterRace(String str)
	{
		Vector V=CMParms.parseSemicolons(str,true);
		bodyAlterations=null;
		for(int i=0;i<getMyRace().bodyMask().length;i++)
		{
			if(V.size()<=i) break;
			int val=CMath.s_int((String)V.elementAt(i));
			int num=getMyRace().bodyMask()[i];
			if(num!=val) alterBodypart(i,val-num);
		}
	}

	public int getBodypartAlteration(int racialPartNumber)
	{
	    if(bodyAlterations==null) return 0;
	    return bodyAlterations[racialPartNumber];
	}
	public void alterBodypart(int racialPartNumber, int deviation)
	{
		if(bodyAlterations==null) bodyAlterations=new short[Race.BODY_PARTS];
		bodyAlterations[racialPartNumber]+=deviation;
	}

	public int ageCategory()
	{
		int age=getStat(STAT_AGE);
		int cat=Race.AGE_INFANT;
		int[] chart=getMyRace().getAgingChart();
		if(age<chart[1]) return cat;
		while((cat<=Race.AGE_ANCIENT)&&(age>=chart[cat]))
			cat++;
		return cat-1;
	}

	public String ageName()
	{
		int cat=ageCategory();
		if(cat<Race.AGE_ANCIENT) return Race.AGE_DESCS[cat];
		int age=getStat(STAT_AGE);
		int[] chart=getMyRace().getAgingChart();
		int diff=chart[Race.AGE_ANCIENT]-chart[Race.AGE_VENERABLE];
		age=age-chart[Race.AGE_ANCIENT];
		int num=(diff>0)?(int)Math.abs(Math.floor(CMath.div(age,diff))):0;
		if(num<=0) return Race.AGE_DESCS[cat];
		return Race.AGE_DESCS[cat]+" "+CMath.convertToRoman(num);
	}

	public int getSave(int which)
	{
		switch(which)
		{
		case STAT_SAVE_PARALYSIS:
			return getStat(STAT_SAVE_PARALYSIS)+(int)Math.round(CMath.div(getStat(STAT_CONSTITUTION)+getStat(STAT_STRENGTH),2.0));
		case STAT_SAVE_FIRE:
			return getStat(STAT_SAVE_FIRE)+(int)Math.round(CMath.div(getStat(STAT_CONSTITUTION)+getStat(STAT_DEXTERITY),2.0));
		case STAT_SAVE_COLD:
			return getStat(STAT_SAVE_COLD)+(int)Math.round(CMath.div(getStat(STAT_CONSTITUTION)+getStat(STAT_DEXTERITY),2.0));
		case STAT_SAVE_WATER:
			return getStat(STAT_SAVE_WATER)+(int)Math.round(CMath.div(getStat(STAT_CONSTITUTION)+getStat(STAT_DEXTERITY),2.0));
		case STAT_SAVE_GAS:
			return getStat(STAT_SAVE_GAS)+(int)Math.round(CMath.div(getStat(STAT_CONSTITUTION)+getStat(STAT_STRENGTH),2.0));
		case STAT_SAVE_MIND:
			return getStat(STAT_SAVE_MIND)+(int)Math.round(CMath.div(getStat(STAT_WISDOM)+getStat(STAT_INTELLIGENCE)+getStat(STAT_CHARISMA),3.0));
		case STAT_SAVE_GENERAL:
			return getStat(STAT_SAVE_GENERAL)+getStat(STAT_CONSTITUTION);
		case STAT_SAVE_JUSTICE:
			return getStat(STAT_SAVE_JUSTICE)+getStat(STAT_CHARISMA);
		case STAT_SAVE_ACID:
			return getStat(STAT_SAVE_ACID)+(int)Math.round(CMath.div(getStat(STAT_CONSTITUTION)+getStat(STAT_DEXTERITY),2.0));
		case STAT_SAVE_ELECTRIC:
			return getStat(STAT_SAVE_ELECTRIC)+(int)Math.round(CMath.div(getStat(STAT_CONSTITUTION)+getStat(STAT_DEXTERITY),2.0));
		case STAT_SAVE_POISON:
			return getStat(STAT_SAVE_POISON)+getStat(STAT_CONSTITUTION);
		case STAT_SAVE_UNDEAD:
			return getStat(STAT_SAVE_UNDEAD)+getStat(STAT_WISDOM)+getStat(STAT_FAITH);
		case STAT_SAVE_DISEASE:
			return getStat(STAT_SAVE_DISEASE)+getStat(STAT_CONSTITUTION);
		case STAT_SAVE_MAGIC:
			return getStat(STAT_SAVE_MAGIC)+getStat(STAT_INTELLIGENCE);
		case STAT_SAVE_TRAPS:
			return getStat(STAT_SAVE_TRAPS)+getStat(STAT_DEXTERITY);
		case STAT_SAVE_OVERLOOKING:
			return getStat(STAT_SAVE_OVERLOOKING);
		case STAT_SAVE_DETECTION:
			return getStat(STAT_SAVE_DETECTION);
        case STAT_FAITH:
            return getStat(STAT_FAITH);
		}
		return getStat(which);
	}

	// create a new one of these
    public CMObject copyOf()
	{
		DefaultCharStats newOne=new DefaultCharStats();
		if(myClasses!=null)
			newOne.myClasses=(CharClass[])myClasses.clone();
		newOne.myRace=myRace;
		if(myLevels!=null)
			newOne.myLevels=(Integer[])myLevels.clone();
        if(bodyAlterations!=null)
            newOne.bodyAlterations=(short[])bodyAlterations.clone();
		newOne.stats=(short[])stats.clone();
		return newOne;
	}

	public void setGenderName(String gname)
	{
		genderName=gname;
	}

	public String genderName()
	{
		if(genderName!=null)
			return genderName;
		switch(getStat(STAT_GENDER))
		{
		case 'M': return "male";
		case 'F': return "female";
		default: return "neuter";
		}
	}
	public String himher()
	{
		char c=(char)getStat(STAT_GENDER);
		if((genderName!=null)&&(genderName.length()>0))
			c=Character.toUpperCase(genderName.charAt(0));
		switch(c)
		{
		case 'M': return "him";
		case 'F': return "her";
		default: return "it";
		}
	}

	public String hisher()
	{
		char c=(char)getStat(STAT_GENDER);
		if((genderName!=null)&&(genderName.length()>0))
			c=Character.toUpperCase(genderName.charAt(0));
		switch(c)
		{
		case 'M': return "his";
		case 'F': return "her";
		default: return "its";
		}
	}

	public String heshe()
	{
		char c=(char)getStat(STAT_GENDER);
		if((genderName!=null)&&(genderName.length()>0))
			c=Character.toUpperCase(genderName.charAt(0));
		switch(c)
		{
		case 'M': return "he";
		case 'F': return "she";
		default: return "it";
		}
	}
    public String sirmadam()
    {
        char c=(char)getStat(STAT_GENDER);
        if((genderName!=null)&&(genderName.length()>0))
            c=Character.toUpperCase(genderName.charAt(0));
        switch(c)
        {
        case 'M': return "sir";
        case 'F': return "madam";
        default: return "sir";
        }
    }
    public String SirMadam()
    {
        char c=(char)getStat(STAT_GENDER);
        if((genderName!=null)&&(genderName.length()>0))
            c=Character.toUpperCase(genderName.charAt(0));
        switch(c)
        {
        case 'M': return "Sir";
        case 'F': return "Madam";
        default: return "Sir";
        }
    }

	public String HeShe()
	{
		char c=(char)getStat(STAT_GENDER);
		if((genderName!=null)&&(genderName.length()>0))
			c=Character.toUpperCase(genderName.charAt(0));
		switch(c)
		{
		case 'M': return "He";
		case 'F': return "She";
		default: return "It";
		}
	}

	public int getStat(int abilityCode)
	{
		return stats[abilityCode];
	}

	public void setPermanentStat(int abilityCode, int value)
	{
		setStat(abilityCode,value);
		if(abilityCode<NUM_BASE_STATS)
			setStat(STAT_MAX_STRENGTH_ADJ+abilityCode,
					value-CMProps.getIntVar(CMProps.SYSTEMI_BASEMAXSTAT));
	}

	public int getMaxStat(int abilityCode)
	{
		int baseMax = CMProps.getIntVar(CMProps.SYSTEMI_BASEMAXSTAT);
		return baseMax + getStat(STAT_MAX_STRENGTH_ADJ + abilityCode);
	}

    public void setRacialStat(int abilityCode, int racialMax)
    {
        if((abilityCode>=NUM_BASE_STATS)||(getStat(abilityCode)==VALUE_ALLSTATS_DEFAULT))
            setPermanentStat(abilityCode,racialMax);
        else
        {
            int baseMax=CMProps.getIntVar(CMProps.SYSTEMI_BASEMAXSTAT);
            int currMax=getStat(STAT_MAX_STRENGTH_ADJ+abilityCode)+baseMax;
            if(currMax<=0) currMax=1;
            int curStat=getStat(abilityCode);
            int racialStat=Math.round(((float)curStat/(float)currMax)*(float)racialMax)+Math.round((((float)(currMax-VALUE_ALLSTATS_DEFAULT))/(float)currMax)*(float)racialMax);
            setStat(abilityCode,((racialStat<1)&&(racialMax>0))?1:racialStat);
            setStat(STAT_MAX_STRENGTH_ADJ+abilityCode,racialMax-baseMax);
        }
    }

	public void setStat(int abilityCode, int value)
	{
        if((value>Short.MAX_VALUE)||(value<Short.MIN_VALUE))
            Log.errOut("Value out of range",new Exception("Value out of range: "+value+" for "+abilityCode));
		stats[abilityCode]=(short)value;
	}

	public int getCode(String abilityName)
	{
		for(int i=0;i<STAT_DESCS.length;i++)
			if(STAT_DESCS[i].startsWith(abilityName))
				return i;
		return -1;
	}
    public int compareTo(CMObject o){ return CMClass.classID(this).compareToIgnoreCase(CMClass.classID(o));}
	public int getSaveStatIndex() { return getStatCodes().length;}

	public String getStat(String abilityName)
	{
		int dex=CMParms.indexOfIgnoreCase(getStatCodes(),abilityName);
		if(dex>=0) return Integer.toString(getStat(dex));

		for(int i=0;i<STAT_DESCS.length;i++)
			if(STAT_DESCS[i].startsWith(abilityName))
				return Integer.toString(getStat(i));
		return null;
	}

	public String[] getStatCodes() { return CharStats.STAT_NAMES;}
	public boolean isStat(String code) { return CMParms.containsIgnoreCase(getStatCodes(),code);}
	public void setStat(String code, String val) {
		int dex=CMParms.indexOfIgnoreCase(getStatCodes(),code);
		if(dex>=0)
			setStat(dex,CMath.s_parseIntExpression(val));
		else
		for(int i=0;i<STAT_DESCS.length;i++)
			if(STAT_DESCS[i].startsWith(code))
			{
				setStat(dex,CMath.s_parseIntExpression(val));
				return;
			}
	}
}


text: php transform_all_lastcraft.php lastcraft.xslt ../docs/source/en/ ../docs/lastcraft/


text:
Helm uses a packaging format called _charts_. A chart is a collection of files
that describe a related set of Kubernetes resources. A single chart
might be used to deploy something simple, like a memcached pod, or
something complex, like a full web app stack with HTTP servers,
databases, caches, and so on.

Charts are created as files laid out in a particular directory tree,
then they can be packaged into versioned archives to be deployed.

This document explains the chart format, and provides basic guidance for
building charts with Helm.

## The Chart File Structure

A chart is organized as a collection of files inside of a directory. The
directory name is the name of the chart (without versioning information). Thus,
a chart describing Wordpress would be stored in the `wordpress/` directory.

Inside of this directory, Helm will expect a structure that matches this:

```
wordpress/
  Chart.yaml          # A YAML file containing information about the chart
  LICENSE             # OPTIONAL: A plain text file containing the license for the chart
  README.md           # OPTIONAL: A human-readable README file
  values.yaml         # The default configuration values for this chart
  charts/             # OPTIONAL: A directory containing any charts upon which this chart depends.
  templates/          # OPTIONAL: A directory of templates that, when combined with values,
                      # will generate valid Kubernetes manifest files.
  templates/NOTES.txt # OPTIONAL: A plain text file containing short usage notes
```

Helm will silently strip out any other files.

## The Chart.yaml File

The `Chart.yaml` file is required for a chart. It contains the following fields:

```yaml
name: The name of the chart (required)
version: A SemVer 2 version (required)
description: A single-sentence description of this project (optional)
keywords:
  - A list of keywords about this project (optional)
home: The URL of this project's home page (optional)
sources:
  - A list of URLs to source code for this project (optional)
maintainers: # (optional)
  - name: The maintainer's name (required for each maintainer)
    email: The maintainer's email (optional for each maintainer)
engine: gotpl # The name of the template engine (optional, defaults to gotpl)
icon: A URL to an SVG or PNG image to be used as an icon (optional).
```

If you are familiar with the `Chart.yaml` file format for Helm Classic, you will
notice that fields specifying dependencies have been removed. That is because
the new Chart format expresses dependencies using the `charts/` directory.

Other fields will be silently ignored.

### Charts and Versioning

Every chart must have a version number. A version must follow the
[SemVer 2](http://semver.org/) standard. Unlike Helm Classic, Kubernetes
Helm uses version numbers as release markers. Packages in repositories
are identified by name plus version.

For example, an `nginx` chart whose version field is set to `version:
1.2.3` will be named:

```
nginx-1.2.3.tgz
```

More complex SemVer 2 names are also supported, such as
`version: 1.2.3-alpha.1+ef365`. But non-SemVer names are explicitly
disallowed by the system.

**NOTE:** Whereas Helm Classic and Deployment Manager were both
very GitHub oriented when it came to charts, Kubernetes Helm does not
rely upon or require GitHub or even Git. Consequently, it does not use
Git SHAs for versioning at all.

The `version` field inside of the `Chart.yaml` is used by many of the
Helm tools, including the CLI and the Tiller server. When generating a
package, the `helm package` command will use the version that it finds
in the `Chart.yaml` as a token in the package name. The system assumes
that the version number in the chart package name matches the version number in
the `Chart.yaml`. Failure to meet this assumption will cause an error.

## Chart LICENSE, README and NOTES

Charts can also contain files that describe the installation, configuration, usage and license of a
chart. A README for a chart should be formatted in Markdown (README.md), and should generally
contain:

- A description of the application or service the chart provides
- Any prerequisites or requirements to run the chart
- Descriptions of options in `values.yaml` and default values
- Any other information that may be relevant to the installation or configuration of the chart

The chart can also contain a short plain text `templates/NOTES.txt` file that will be printed out
after installation, and when viewing the status of a release. This file is evaluated as a
[template](#templates-and-values), and can be used to display usage notes, next steps, or any other
information relevant to a release of the chart. For example, instructions could be provided for
connecting to a database, or accessing a web UI. Since this file is printed to STDOUT when running
`helm install` or `helm status`, it is recommended to keep the content brief and point to the README
for greater detail.

## Chart Dependencies

In Helm, one chart may depend on any number of other charts. These
dependencies are expressed explicitly by copying the dependency charts
into the `charts/` directory.

**Note:** The `dependencies:` section of the `Chart.yaml` from Helm
Classic has been completely removed.

For example, if the Wordpress chart depends on the Apache chart, the
Apache chart (of the correct version) is supplied in the Wordpress
chart's `charts/` directory:

```
wordpress:
  Chart.yaml
  # ...
  charts/
    apache/
      Chart.yaml
      # ...
    mysql/
      Chart.yaml
      # ...
```

The example above shows how the Wordpress chart expresses its dependency
on Apache and MySQL by including those charts inside of its `charts/`
directory.

**TIP:** _To drop a dependency into your `charts/` directory, use the
`helm fetch` command._

## Templates and Values

By default, Helm Chart templates are written in the Go template language, with the
addition of 50 or so [add-on template
functions](https://github.com/Masterminds/sprig). (In the future, Helm
may support other template languages, like Python Jinja.)

All template files are stored in a chart's `templates/` folder. When
Helm renders the charts, it will pass every file in that directory
through the template engine.

Values for the templates are supplied two ways:
  - Chart developers may supply a file called `values.yaml` inside of a
    chart. This file can contain default values.
  - Chart users may supply a YAML file that contains values. This can be
    provided on the command line with `helm install`.

When a user supplies custom values, these values will override the
values in the chart's `values.yaml` file.
### Template Files

Template files follow the standard conventions for writing Go templates
(see [the text/template Go package documentation](https://golang.org/pkg/text/template/)
for details).
An example template file might look something like this:

```yaml
apiVersion: v1
kind: ReplicationController
metadata:
  name: deis-database
  namespace: deis
  labels:
    heritage: deis
spec:
  replicas: 1
  selector:
    app: deis-database
  template:
    metadata:
      labels:
        app: deis-database
    spec:
      serviceAccount: deis-database
      containers:
        - name: deis-database
          image: {{.imageRegistry}}/postgres:{{.dockerTag}}
          imagePullPolicy: {{.pullPolicy}}
          ports:
            - containerPort: 5432
          env:
            - name: DATABASE_STORAGE
              value: {{default "minio" .storage}}
```

The above example, based loosely on [https://github.com/deis/charts](https://github.com/deis/charts), is a template for a Kubernetes replication controller.
It can use the following four template values:

- `imageRegistry`: The source registry for the Docker image.
- `dockerTag`: The tag for the docker image.
- `pullPolicy`: The Kubernetes pull policy.
- `storage`: The storage backend, whose default is set to `"minio"`

All of these values are defined by the template author. Helm does not
require or dictate parameters.

### Predefined Values

The following values are pre-defined, are available to every template, and
cannot be overridden. As with all values, the names are _case
sensitive_.

- `Release.Name`: The name of the release (not the chart)
- `Release.Time`: The time the chart release was last updated. This will
  match the `Last Released` time on a Release object.
- `Release.Namespace`: The namespace the chart was released to.
- `Release.Service`: The service that conducted the release. Usually
  this is `Tiller`.
- `Chart`: The contents of the `Chart.yaml`. Thus, the chart version is
  obtainable as `Chart.Version` and the maintainers are in
  `Chart.Maintainers`.
- `Files`: A map-like object containing all non-special files in the chart. This
  will not give you access to templates, but will give you access to additional
  files that are present. Files can be accessed using `{{index .Files "file.name"}}`
  or using the `{{.Files.Get name}}` or `{{.Files.GetString name}}` functions. Note that
  file data is returned as a `[]byte` unless `{{.Files.GetString}}` is used.

**NOTE:** Any unknown Chart.yaml fields will be dropped. They will not
be accessible inside of the `Chart` object. Thus, Chart.yaml cannot be
used to pass arbitrarily structured data into the template.

### Values files

Considering the template in the previous section, a `values.yaml` file
that supplies the necessary values would look like this:

```yaml
imageRegistry: "quay.io/deis"
dockerTag: "latest"
pullPolicy: "alwaysPull"
storage: "s3"
```

A values file is formatted in YAML. A chart may include a default
`values.yaml` file. The Helm install command allows a user to override
values by supplying additional YAML values:

```console
$ helm install --values=myvals.yaml wordpress
```

When values are passed in this way, they will be merged into the default
values file. For example, consider a `myvals.yaml` file that looks like
this:

```yaml
storage: "gcs"
```

When this is merged with the `values.yaml` in the chart, the resulting
generated content will be:

```yaml
imageRegistry: "quay.io/deis"
dockerTag: "latest"
pullPolicy: "alwaysPull"
storage: "gcs"
```

Note that only the last field was overridden.

**NOTE:** The default values file included inside of a chart _must_ be named
`values.yaml`. But files specified on the command line can be named
anything.

### Scope, Dependencies, and Values

Values files can declare values for the top-level chart, as well as for
any of the charts that are included in that chart's `charts/` directory.
Or, to phrase it differently, a values file can supply values to the
chart as well as to any of its dependencies. For example, the
demonstration Wordpress chart above has both `mysql` and `apache` as
dependencies. The values file could supply values to all of these
components:

```yaml
title: "My Wordpress Site" # Sent to the Wordpress template

mysql:
  max_connections: 100 # Sent to MySQL
  password: "secret"

apache:
  port: 8080 # Passed to Apache
```

Charts at a higher level have access to all of the variables defined
beneath. So the wordpress chart can access `.mysql.password`. But lower
level charts cannot access things in parent charts, so MySQL will not be
able to access the `title` property. Nor, for that matter, can it access
`.apache.port`.

Values are namespaced, but namespaces are pruned. So for the Wordpress
chart, it can access the MySQL password field as `.mysql.password`. But
for the MySQL chart, the scope of the values has been reduced and the
namespace prefix removed, so it will see the password field simply as
`.password`.

#### Global Values

As of 2.0.0-Alpha.2, Helm supports special "global" value. Consider
this modified version of the previous example:

```yaml
title: "My Wordpress Site" # Sent to the Wordpress template

global:
  app: MyWordpress

mysql:
  max_connections: 100 # Sent to MySQL
  password: "secret"

apache:
  port: 8080 # Passed to Apache
```

The above adds a `global` section with the value `app: MyWordpress`.
This value is available to _all_ charts as `.Values.global.app`.

For example, the `mysql` templates may access `app` as `{{.Values.global.app}}`, and
so can the `apache` chart. Effectively, the values file above is
regenerated like this:

```yaml
title: "My Wordpress Site" # Sent to the Wordpress template

global:
  app: MyWordpress

mysql:
  global:
    app: MyWordpress
  max_connections: 100 # Sent to MySQL
  password: "secret"

apache:
  global:
    app: MyWordpress
  port: 8080 # Passed to Apache
```

This provides a way of sharing one top-level variable with all
subcharts, which is useful for things like setting `metadata` properties
like labels.

If a subchart declares a global variable, that global will be passed
_downward_ (to the subchart's subcharts), but not _upward_ to the parent
chart. There is no way for a subchart to influence the values of the
parent chart.

_Global sections are restricted to only simple key/value pairs. They do
not support nesting._

For example, the following is **illegal** and will not work:

```yaml
global:
  foo:  # It is illegal to nest an object inside of global.
    bar: baz
```

### References

When it comes to writing templates and values files, there are several
standard references that will help you out.

- [Go templates](https://godoc.org/text/template)
- [Extra template functions](https://godoc.org/github.com/Masterminds/sprig)
- [The YAML format]()

## Hooks

Helm provides a _hook_ mechanism to allow chart developers to intervene
at certain points in a release's life cycle. For example, you can use
hooks to:

- Load a ConfigMap or Secret during install before any other charts are
  loaded.
- Execute a Job to backup up a database before installing a new chart,
  and then execute a second job after the upgrade in order to restore
  data.
- Run a Job before deleting a release to gracefully take a service out
  of rotation before removing it.

Hooks work like regular templates, but they have special annotations
that cause Helm to utilize them differently. In this section, we cover
the basic usage pattern for hooks.

### The Available Hooks

The following hooks are defined:

- pre-install: Executes after templates are rendered, but before any
  resources are created in Kubernetes.
- post-install: Executes after all resources are loaded into Kubernetes
- pre-delete: Executes on a deletion request before any resources are
  deleted from Kubernetes.
- post-delete: Executes on a deletion request after all of the release's
  resources have been deleted.
- pre-upgrade: Executes on an upgrade request after templates are
  rendered, but before any resources are loaded into Kubernetes (e.g.
  before a kuberntes apply operation).
- post-upgrade: Executes on an upgrade after all resources have been
  upgraded.

### Hooks and the Release Lifecycle

Hooks allow you, the chart developer, an opportunity to perform
operations at strategic points in a release lifecycle. For example,
consider the lifecycle for a `helm install`. By default, the lifecycle
looks like this:

1. User runs `helm install foo`
2. Chart is loaded into Tiller
3. After some verification, Tiller renders the `foo` templates
4. Tiller loads the resulting resources into Kubernetes
5. Tiller returns the release name (and other data) to the client
6. The client exits

Helm defines two hooks for the `install` lifecycle: `pre-install` and
`post-install`. If the developer of the `foo` chart implements both
hooks, the lifecycle is altered like this:

1. User runs `helm install foo`
2. Chart is loaded into Tiller
3. After some verification, Tiller renders the `foo` templates
4. Tiller executes the `pre-install` hook (loading hook resources into
   Kubernetes)
5. Tiller waits until the hook is "Ready"
6. Tiller loads the resulting resources into Kubernetes
7. Tiller executes the `post-install` hook (loading hook resources)
8. Tiller waits until the hook is "Ready"
9. Tiller returns the release name (and other data) to the client
10. The client exits

What does it mean to wait until a hook is ready? This depends on the
resource declared in the hook. If the resources is a `Job` kind, Tiller
will wait until the job successfully runs to completion. And if the job
fails, the release will fail. This is a _blocking operation_, so the
Helm client will pause while the Job is run.

For all other kinds, as soon as Kubernetes marks the resource as loaded
(added or updated), the resource is considered "Ready". When many
resources are declared in a hook, the resources are executed serially,
but the order of their execution is not guaranteed.

#### Hook resources are unmanaged

The resources that a hook creates are not tracked or managed as part of the
release. Once Tiller verifies that the hook has reached its ready state, it
will leave the hook resource alone.

Practically speaking, this means that if you create resources in a hook, you
cannot rely upon `helm delete` to remove the resources. To destroy such
resources, you need to write code to perform this operation in a `pre-delete`
or `post-delete` hook.

### Writing a Hook

Hooks are just Kubernetes manfiest files with special annotations in the
`metadata` section. Because they are template files, you can use all of
the normal template features, including reading `.Values`, `.Release`,
and `.Template`.

For example, this template, stored in `templates/post-install-job.yaml`,
declares a job to be run on `post-install`:

```yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: "{{.Release.Name}}"
  labels:
    heritage: {{.Release.Service | quote }}
    release: {{.Release.Name | quote }}
    chart: "{{.Chart.Name}}-{{.Chart.Version}}"
  annotations:
    # This is what defines this resource as a hook. Without this line, the
    # job is considered part of the release.
    "helm.sh/hook": post-install
spec:
  template:
    metadata:
      name: "{{.Release.Name}}"
      labels:
        heritage: {{.Release.Service | quote }}
        release: {{.Release.Name | quote }}
        chart: "{{.Chart.Name}}-{{.Chart.Version}}"
    spec:
      restartPolicy: Never
      containers:
      - name: post-install-job
        image: "alpine:3.3"
        command: ["/bin/sleep","{{default "10" .Values.sleepyTime}}"]

```

What makes this template a hook is the annotation:

```
  annotations:
    "helm.sh/hook": post-install
```

One resource can implement multiple hooks:

```
  annotations:
    "helm.sh/hook": post-install,post-upgrade
```

Similarly, there is no limit to the number of different resources that
may implement a given hook. For example, one could declare both a secret
as a config map as a pre-install hook. It is important to keep in mind,
though, that there are no ordering guarantees about hooks.

When subcharts declare hooks, those are also evaluated. There is no way
for a top-level chart to disable the hooks declared by subcharts. And
again, there is no guaranteed ordering.

## Using Helm to Manage Charts

The `helm` tool has several commands for working with charts.

It can create a new chart for you:

```console
$ helm create mychart
Created mychart/
```

Once you have edited a chart, `helm` can package it into a chart archive
for you:

```console
$ helm package mychart
Archived mychart-0.1.-.tgz
```

You can also use `helm` to help you find issues with your chart's
formatting or information:

```console
$ helm lint mychart
No issues found
```

## Chart Repositories

A _chart repository_ is an HTTP server that houses one or more packaged
charts. While `helm` can be used to manage local chart directories, when
it comes to sharing charts, the preferred mechanism is a chart
repository.

Any HTTP server that can serve YAML files and tar files and can answer
GET requests can be used as a repository server.

Helm comes with built-in package server for developer testing (`helm
serve`). The Helm team has tested other servers, including Google Cloud
Storage with website mode enabled, and S3 with website mode enabled.

A repository is characterized primarily by the presence of a special
file called `index.yaml` that has a list of all of the packages supplied
by the repository, together with metadata that allows retrieving and
verifying those packages.

On the client side, repositories are managed with the `helm repo`
commands. However, Helm does not provide tools for uploading charts to
remote repository servers. This is because doing so would add
substantial requirements to an implementing server, and thus raise the
barrier for setting up a repository.


text:
package br.com.scrumtaskboard.model.tests;

import javax.persistence.EntityManager;

import br.com.scrumtaskboard.model.bean.Profile;
import br.com.scrumtaskboard.model.dao.JPAUtil;
import br.com.scrumtaskboard.model.dao.ProfileDAO;

public class TestProfileUpdate {

	public static void main(String[] args) {
		EntityManager em = JPAUtil.getEntityManager();
		ProfileDAO dao = new ProfileDAO(em);

		em.getTransaction().begin();

		Profile profile = dao.search(2);
		profile.setName("New Profile Name");

		em.getTransaction().commit();
		em.close();
	}

}


text:
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
local isIOS64bit     = cc.Application:getInstance():isIOS64bit()
if cc.PLATFORM_OS_LINUX ~= targetPlatform and isIOS64bit ~= true then
require("ByteCodeEncryptTest/ByteCodeTest")
require("ByteCodeEncryptTest/ByteCodeAndEncryptTest")
end

local LINE_SPACE = 40
local ItemTagBasic = 1000

local ByteCodeEncryptEnum =
{
    TEST_BYTECODE = 0,
    TEST_BYTECODE_ENCRYPT = 1,
    TEST_MAX_COUNT = 2,
}

local TestsName =
{
    "ByteCodeFileTest",
    "ByteCodeAndEncryptFileTest",
}

local CreateByteCodeEncryptTestTable =
{
    runByteCodeFileTest,
    runByteCodeAndEncryptFileTest,
}

local function byteCodeEncryptMainLayer()
    local size = cc.Director:getInstance():getWinSize()

    local function createByteCodeEncryptTestScene(index)
        local newScene = CreateByteCodeEncryptTestTable[index]()
        return newScene
    end

    local function menuCallback(tag, sender)
        local scene = nil
        local index = sender:getLocalZOrder() - ItemTagBasic
        local byteCodeEncryptScene = createByteCodeEncryptTestScene(index)
        if nil ~= byteCodeEncryptScene then
            cc.Director:getInstance():replaceScene(byteCodeEncryptScene)
        end
    end

    local layer = cc.Layer:create()
    local menu = cc.Menu:create()
    menu:setPosition(cc.p(0, 0))
    cc.MenuItemFont:setFontName("Arial")
    cc.MenuItemFont:setFontSize(24)

    for i = 1, ByteCodeEncryptEnum.TEST_MAX_COUNT do
        local item = cc.MenuItemFont:create(TestsName[i])
        item:registerScriptTapHandler(menuCallback)
        item:setPosition(size.width / 2, size.height - i * LINE_SPACE)
        menu:addChild(item, ItemTagBasic + i)
        if cc.PLATFORM_OS_LINUX == targetPlatform or isIOS64bit == true then
            item:setEnabled(false)
        end
    end

    layer:addChild(menu)

    -- handling touch events
    local beginPos = {x = 0, y = 0}
    local function onTouchesBegan(touches, event)
         beginPos = touches[1]:getLocation()
    end

    local function onTouchesMoved(touches, event)
        local location = touches[1]:getLocation()

        local nMoveY = location.y - beginPos.y
        local curPosx, curPosy = menu:getPosition()
        local nextPosy = curPosy + nMoveY
        local winSize = cc.Director:getInstance():getWinSize()
        if nextPosy < 0 then
            menu:setPosition(0, 0)
            return
        end

        if nextPosy > ((ByteCodeEncryptEnum.TEST_MAX_COUNT + 1) * LINE_SPACE - winSize.height) then
            menu:setPosition(0, ((ByteCodeEncryptEnum.TEST_MAX_COUNT + 1) * LINE_SPACE - winSize.height))
            return
        end

        menu:setPosition(curPosx, nextPosy)
        beginPos = {x = location.x, y = location.y}
    end

    local listener = cc.EventListenerTouchAllAtOnce:create()
    listener:registerScriptHandler(onTouchesBegan,cc.Handler.EVENT_TOUCHES_BEGAN )
    listener:registerScriptHandler(onTouchesMoved,cc.Handler.EVENT_TOUCH_MOVED )

    local eventDispatcher = layer:getEventDispatcher()
    eventDispatcher:addEventListenerWithSceneGraphPriority(listener, layer)

    return layer
end
-------------------------------------
--  ByteCodeEncrypt Test
-------------------------------------
function ByteCodeEncryptTestMain()
    local scene = cc.Scene:create()

    scene:addChild(byteCodeEncryptMainLayer())
    scene:addChild(CreateBackMenuItem())

    return scene
end


text:
package com.leansoft.luxun.common.exception;

/**
 * Indicates that client is sending event to a closed queue
 *
 * @author bulldog
 *
 */
public class QueueClosedException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    public QueueClosedException() {
    }

    /**
     * @param message
     */
    public QueueClosedException(String message) {
        super(message);
    }

    /**
     * @param cause
     */
    public QueueClosedException(Throwable cause) {
        super(cause);
    }

    /**
     * @param message
     * @param cause
     */
    public QueueClosedException(String message, Throwable cause) {
        super(message, cause);
    }

}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Globalization;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Caliburn.Micro;
using Microsoft.AppCenter.Analytics;
using UwCore.Application;
using UwCore.Services.Analytics;
using UwCoreTest.ApplicationModes;
using UwCoreTest.Views.HeaderDetails;
using UwCoreTest.Views.MahPopup;
using UwCoreTest.Views.Test;
using INavigationService = UwCore.Services.Navigation.INavigationService;

namespace UwCoreTest
{
    public interface IMyService
    {

    }

    public class MyService : IMyService
    {

    }

    /// <summary>
    /// Provides application-specific behavior to supplement the default Application class.
    /// </summary>
    sealed partial class App
    {
        public App()
        {
            this.InitializeComponent();
        }

        public override IEnumerable<Type> GetViewModelTypes()
        {
            yield return typeof(TestViewModel);
            yield return typeof(HeaderDetailsViewModel);
            yield return typeof(MahPopupViewModel);
        }

        public override IEnumerable<Type> GetShellModeTypes()
        {
            yield return typeof(NormalShellMode);
        }

        public override IEnumerable<Type> GetServiceTypes()
        {
            yield return typeof(IMyService);
            yield return typeof(MyService);
        }

        public override ShellMode GetCurrentMode()
        {
            return IoC.Get<NormalShellMode>();
        }

        public override void CustomizeShell(IShell shell)
        {
            base.CustomizeShell(shell);

            shell.Theme = ElementTheme.Light;
            shell.HeaderDetailsViewModel = IoC.Get<HeaderDetailsViewModel>();
        }

        public override bool IsAnalyticsServiceEnabled()
        {
            return true;
        }

        public override IAnalyticsService GetAnalyticsService()
        {
            return new AppCenterAnalyticsService("08633b56-6a0b-4568-8b93-b5024a34ef20");
        }

        public override bool UseNewShellIfPossible()
        {
            return true;
        }

        public override void Configure()
        {
            ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(360, 500));
        }

        public override string GetErrorTitle() => "Fehler";

        public override string GetErrorMessage() => "Ups, es ist ein Fehler aufgetreten.";

        public override Type GetCommonExceptionType() => typeof(Exception);
    }
}


text:
@extends('layouts.layout')

@section('title')
    @parent
    {{$skill->english_description}} | enstars.info
@stop

@section('content')

{{$skill->english_description}}

@endsection


text:
read name
echo "Welcome $name"


text:
package com.mossle.auth.domain;

// Generated by Hibernate Tools
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Access .
 *
 * @author Lingo
 */
@Entity
@Table(name = "AUTH_ACCESS")
public class Access implements java.io.Serializable {
    private static final long serialVersionUID = 0L;

    /** null. */
    private Long id;

    /** null. */
    private Perm perm;

    /** null. */
    private String type;

    /** null. */
    private String value;

    /** null. */
    private Integer priority;

    /** null. */
    private String descn;

    /** null. */
    private String scopeId;

    public Access() {
    }

    public Access(Perm perm, String type, String value, Integer priority,
            String descn, String scopeId) {
        this.perm = perm;
        this.type = type;
        this.value = value;
        this.priority = priority;
        this.descn = descn;
        this.scopeId = scopeId;
    }

    /** @return null. */
    @Id
    @GeneratedValue
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    /**
     * @param id
     *            null.
     */
    public void setId(Long id) {
        this.id = id;
    }

    /** @return null. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PERM_ID")
    public Perm getPerm() {
        return this.perm;
    }

    /**
     * @param perm
     *            null.
     */
    public void setPerm(Perm perm) {
        this.perm = perm;
    }

    /** @return null. */
    @Column(name = "TYPE", length = 50)
    public String getType() {
        return this.type;
    }

    /**
     * @param type
     *            null.
     */
    public void setType(String type) {
        this.type = type;
    }

    /** @return null. */
    @Column(name = "VALUE", length = 200)
    public String getValue() {
        return this.value;
    }

    /**
     * @param value
     *            null.
     */
    public void setValue(String value) {
        this.value = value;
    }

    /** @return null. */
    @Column(name = "PRIORITY")
    public Integer getPriority() {
        return this.priority;
    }

    /**
     * @param priority
     *            null.
     */
    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    /** @return null. */
    @Column(name = "DESCN", length = 200)
    public String getDescn() {
        return this.descn;
    }

    /**
     * @param descn
     *            null.
     */
    public void setDescn(String descn) {
        this.descn = descn;
    }

    /** @return null. */
    @Column(name = "SCOPE_ID", length = 50)
    public String getScopeId() {
        return this.scopeId;
    }

    /**
     * @param scopeId
     *            null.
     */
    public void setScopeId(String scopeId) {
        this.scopeId = scopeId;
    }
}


text:
.. _bool: https://docs.python.org/2/library/stdtypes.html

.. _vSphere API 5.5: ../../../vim/version.rst#vimversionversion9

.. _VirtualSriovEthernetCard: ../../../vim/vm/device/VirtualSriovEthernetCard.rst

.. _vim.vm.device.VirtualEthernetCard: ../../../vim/vm/device/VirtualEthernetCard.rst

.. _vim.vm.device.VirtualSriovEthernetCard.SriovBackingInfo: ../../../vim/vm/device/VirtualSriovEthernetCard/SriovBackingInfo.rst

vim.vm.device.VirtualSriovEthernetCard
======================================
  The `VirtualSriovEthernetCard`_ data object defines the properties of a SR-IOV enabled Ethernet card attached to a virtual machine.
:extends: vim.vm.device.VirtualEthernetCard_
:since: `vSphere API 5.5`_

Attributes:
    allowGuestOSMtuChange (`bool`_, optional):

       Indicates whether MTU can be changed from guest OS.
    sriovBacking (`vim.vm.device.VirtualSriovEthernetCard.SriovBackingInfo`_, optional):

       Information about SR-IOV passthrough backing of this VirtualSriovEthernetCard.


text:
using System;
using System.Collections;
using System.IO;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Lifetime;
using System.Runtime.Serialization.Formatters.Binary;
using System.Threading;
using System.Windows.Forms;
using System.Text;

using DAQ.Environment;
using DAQ.HAL;
using Data;
using Data.Scans;
using ScanMaster.GUI;
using ScanMaster.Acquire;
using ScanMaster.Acquire.Test;
using ScanMaster.Acquire.Plugin;
using ScanMaster.Analyze;

namespace ScanMaster
{
	/// <summary>
	/// The controller is the heart of ScanMaster. The application is built around this
	/// controller, which gets the execution thread early on in application startup (look
	/// at the Main method in Runner).
	///
	/// The controller is a singleton (there is only ever one controller). And I really mean
	/// only one - as in there is only ever one running on the machine. There are two ways to
	/// get hold of a reference to the controller object. If you are in the same (local) context
	/// that the Controller was instantiated in (which means, almost certainly, that you are writing
	/// code that is part of ScanMaster) then you should use the static factory method
	/// Controller.GetController(). If you are outside the Controller's context (which means you are
	/// probably writing another application that wants to use ScanMaster's services) then you should
	/// get hold of an object reference through the remoting system. You might well do this by
	/// registering the Controller type as well known within your application and then using new to
	/// to get a reference, but you shouldn't forget that you're actually dealing with a singleton !
	///
	/// The controller is published at "tcp://localhost:1170/controller.rem".
	///
	/// The controller inherits from MarshalByRefObject so that references to it can be passed
	/// around by the remoting system.
	/// </summary>
	public class Controller : MarshalByRefObject
	{

		#region Class members

		public enum AppState {stopped, running};

     	private ControllerWindow controllerWindow;
		private Acquisitor acquisitor;
		public Acquisitor Acquisitor
		{
			get { return acquisitor; }
		}
		public ScanSerializer serializer = new ScanSerializer();
		private ProfileManager profileManager = new ProfileManager();
		public ProfileManager ProfileManager
		{
			get { return profileManager; }
		}
		private ViewerManager viewerManager = new ViewerManager();
		public ViewerManager ViewerManager
		{
			get { return viewerManager; }
		}

		private DataStore dataStore = new DataStore();
		public DataStore DataStore
		{
			get { return dataStore; }
		}

		private ParameterHelper parameterHelper = new ParameterHelper();
		public ParameterHelper ParameterHelper
		{
			get { return parameterHelper;}
		}

		private static Controller controllerInstance;
		public AppState appState = AppState.stopped;

		#endregion

		#region Initialisation

		// This is the right way to get a reference to the controller. You shouldn't create a
		// controller yourself.
		public static Controller GetController()
		{
			if (controllerInstance == null)
			{
				controllerInstance = new Controller();
			}
			return controllerInstance;
		}

		// without this method, any remote connections to this object will time out after
		// five minutes of inactivity.
		// It just overrides the lifetime lease system completely.
		public override Object InitializeLifetimeService()
		{
			return null;
		}

		// This function is called at the very start of application execution.
		public void StartApplication()
		{
            // make an acquisitor and connect ourself to its events
			acquisitor = new Acquisitor();
			acquisitor.Data += new DataEventHandler(DataHandler);
			acquisitor.ScanFinished += new ScanFinishedEventHandler(ScanFinishedHandler);

            // ask the remoting system for access to the EDMHardwareController
            //RemotingConfiguration.RegisterWellKnownClientType(
            //    Type.GetType("EDMHardwareControl.Controller, EDMHardwareControl"),
            //    "tcp://localhost:1172/controller.rem"
            //    );

			controllerWindow = new ControllerWindow(this);
			controllerWindow.Show();

			// initialise the profile manager
			profileManager.Window = controllerWindow;
			profileManager.Start();

			// try to load in the last profile set
			// first deserialize the profile set path
			//try
			//{
			//    BinaryFormatter bf = new BinaryFormatter();
			//    String settingsPath = (string)Environs.FileSystem.Paths["settingsPath"];
			//    String filePath = settingsPath + "\\ScanMaster\\profilePath.bin";
			//    FileStream fs = File.Open(filePath, FileMode.Open);
			//    lastProfileSetPath = (string)bf.Deserialize(fs);
			//    fs.Close();
			//}
			//catch (Exception)
			//{
			//    Console.Error.WriteLine("Couldn't find saved profile path");
			//}
			//try
			//{
			//    if (lastProfileSetPath != null) LoadProfileSet(lastProfileSetPath);
			//}
			//catch (Exception e)
			//{
			//    Console.Error.WriteLine("Couldn't load last profile set");
			//    Console.Error.WriteLine(e.Message);
			//}

			// initialise the parameter helper
			parameterHelper = new ParameterHelper();
			parameterHelper.Initialise();

			// connect the acquisitor to the profile manager, which will send it events when the
			// user is in tweak mode.
			profileManager.Tweak +=new TweakEventHandler(acquisitor.HandleTweak);

            // Get access to any other applications required
            Environs.Hardware.ConnectApplications();

			// run the main event loop
			Application.Run(controllerWindow);

		}

		// When the main window gets told to shut, it calls this function.
		// In here things that need to be done before the application stops
		// are sorted out.
		public void StopApplication()
		{
			AcquireStop();
			profileManager.Exit();

			// serialize the lastProfileSet path
			if (lastProfileSetPath != null)
			{
				BinaryFormatter bf = new BinaryFormatter();
				String settingsPath = (string)Environs.FileSystem.Paths["settingsPath"];
				String filePath = settingsPath + "\\ScanMaster\\profilePath.bin";
				FileStream fs = File.Open(filePath, FileMode.Create);
				bf.Serialize(fs, lastProfileSetPath);
				fs.Close();
			}

			parameterHelper.Exit();
		}

		#endregion

		#region Local functions - these should only be called locally

		// Main window File->Save
        public void SaveData()
        {
            // saves a zip file containing each scan, plus the average
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();
            saveFileDialog1.Filter = "zipped xml data file|*.zip";
            saveFileDialog1.Title = "Save scan data";
            saveFileDialog1.InitialDirectory = Environs.FileSystem.GetDataDirectory(
                                                (String)Environs.FileSystem.Paths["scanMasterDataPath"]);
            saveFileDialog1.FileName = Environs.FileSystem.GenerateNextDataFileName();
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                if (saveFileDialog1.FileName != "")
                {
                    SaveData(saveFileDialog1.FileName);
                }

            }
        }

		// Main window File->Save Average
		public void SaveAverageData()
		{
			// serialize the average scan as zipped xml
			SaveFileDialog saveFileDialog1 = new SaveFileDialog();
			saveFileDialog1.Filter = "zipped xml data file|*.zip";
			saveFileDialog1.Title = "Save averaged scan data";
			saveFileDialog1.InitialDirectory = Environs.FileSystem.GetDataDirectory(
												(String)Environs.FileSystem.Paths["scanMasterDataPath"]);
			saveFileDialog1.FileName = Environs.FileSystem.GenerateNextDataFileName();
			if (saveFileDialog1.ShowDialog() == DialogResult.OK)
			{
				if (saveFileDialog1.FileName != "")
				{
					SaveAverageData((System.IO.FileStream)saveFileDialog1.OpenFile());
				}
			}
		}

		// Main window File->Load Average
		public void LoadData()
		{
			OpenFileDialog dialog = new OpenFileDialog();
			dialog.Filter = "zipped xml data|*.zip";
			dialog.Title = "Open profile set";
			dialog.InitialDirectory = Environs.FileSystem.GetDataDirectory(
												(String)Environs.FileSystem.Paths["scanMasterDataPath"]);
			dialog.ShowDialog();
			if(dialog.FileName != "") LoadData(dialog.FileName);
		}

		private String lastProfileSetPath;
		public void LoadProfileSet()
		{
			OpenFileDialog dialog = new OpenFileDialog();
			dialog.Filter = "xml profile set|*.xml";
			dialog.Title = "Open profile set";
			dialog.InitialDirectory = Environs.FileSystem.Paths["settingsPath"] + "ScanMaster";
			dialog.ShowDialog();
			if(dialog.FileName != "")
			{
				System.IO.FileStream fs =
					(System.IO.FileStream)dialog.OpenFile();
				profileManager.LoadProfileSetFromXml(fs);
				fs.Close();
				lastProfileSetPath = dialog.FileName;
                UpdateWindowTitle(dialog.FileName);
			}
		}

		private void LoadProfileSet(string path)
		{
			System.IO.FileStream fs = File.Open(path, FileMode.Open);
			profileManager.LoadProfileSetFromXml(fs);
			fs.Close();
			lastProfileSetPath = path;
            UpdateWindowTitle(path);
        }

		public void SaveProfileSet()
		{
			SaveFileDialog dialog = new SaveFileDialog();
			dialog.Filter = "xml profile set|*.xml";
			dialog.Title = "Save profile set";
			dialog.InitialDirectory = Environs.FileSystem.Paths["settingsPath"] + "ScanMaster";
			dialog.ShowDialog();
			if(dialog.FileName != "")
			{
				System.IO.FileStream fs =
					(System.IO.FileStream)dialog.OpenFile();
				profileManager.SaveProfileSetAsXml(fs);
				fs.Close();
                UpdateWindowTitle(dialog.FileName);
			}
		}

        // puts the current profile's filename in the window title
        private void UpdateWindowTitle(string path)
        {
            string[] pathBits = path.Split(new char[] { '\\' });
            string profileName = pathBits[pathBits.Length - 1];
            controllerWindow.SetWindowTitle("ScanMaster 2k8 - " + profileName);
        }

		#endregion

		#region Remote functions - these functions can be called remotely

		// this method prepares the application for remote control
		public void CaptureRemote()
		{
			controllerWindow.DisableMenus();
		}

		// remote clients call this to release control
		public void ReleaseRemote()
		{
			controllerWindow.EnableMenus();
		}

		// Selecting Acquire->Start on the main window will result in this function being called.
		// If numberOfScans == -1, the acquisitor will scan forever.
		public void AcquireStart(int numberOfScans)
		{
			if (appState != AppState.running)
			{
				if (profileManager.CurrentProfile == null)
				{
					MessageBox.Show("No profile selected !", "Profile error", MessageBoxButtons.OK,
						MessageBoxIcon.Exclamation);
					return;
				}
				Profile currentProfile = profileManager.GetCloneOfCurrentProfile();

				// clear stored data
				dataStore.ClearAll();

                // delete any temporary files
                string tempPath = Environment.GetEnvironmentVariable("TEMP") + "\\ScanMasterTemp";
                if (Directory.Exists(tempPath))
                {
                    string[] tempFiles = Directory.GetFiles(tempPath);
                    foreach (string file in tempFiles) File.Delete(file);
                }

				// tell the viewers that acquisition is starting
				viewerManager.AcquireStart();

				// start the acquisition
				acquisitor.Configuration = currentProfile.AcquisitorConfig;
                WriteScanSettings(DataStore.TotalScan);
				acquisitor.AcquireStart(numberOfScans);
				appState = AppState.running;
			}
		}

		// Selecting Acquire->Stop on the front panel will result in this function being called.
		public void AcquireStop()
		{
			if (appState == AppState.running)
			{
				acquisitor.AcquireStop();
				appState = AppState.stopped;

				// tell the viewers acquisition has stopped
				viewerManager.AcquireStop();
             }
		}

		public void AcquireAndWait(int numberOfScans)
		{
			Monitor.Enter(acquisitor.AcquisitorMonitorLock);
			AcquireStart(numberOfScans);
            // check that acquisition is underway. Provided it is, release the lock
			if (appState == AppState.running) Monitor.Wait(acquisitor.AcquisitorMonitorLock);
			Monitor.Exit(acquisitor.AcquisitorMonitorLock);
			AcquireStop();
		}

        bool patternRunning = false;

		// outputs the pattern from the currently selected profile - used by BlockHead
		public void OutputPattern()
		{
            if (!patternRunning)
            {
                PatternPlugin pgPlugin = profileManager.CurrentProfile.AcquisitorConfig.pgPlugin;
                YAGPlugin yagPlugin = profileManager.CurrentProfile.AcquisitorConfig.yagPlugin;
                pgPlugin.AcquisitionStarting();
                yagPlugin.AcquisitionStarting();
                pgPlugin.ScanStarting();
                yagPlugin.ScanStarting();
                patternRunning = true;
            }
		}

		// stop outputting the pattern started above
		public void StopPatternOutput()
		{
            if (patternRunning)
            {
                PatternPlugin pgPlugin = profileManager.CurrentProfile.AcquisitorConfig.pgPlugin;
                YAGPlugin yagPlugin = profileManager.CurrentProfile.AcquisitorConfig.yagPlugin;
                yagPlugin.AcquisitionFinished();
                pgPlugin.AcquisitionFinished();
                controllerWindow.EnableMenus();
                patternRunning = false;
            }
		}

		// select a profile by name
		public void SelectProfile(String profile)
		{
			profileManager.SelectProfile(profile);
		}

		// change a parameter in the current profile. The way that the plugin is selected is a cheesy hack -
		// clearly the commandProcessor/pluginManager/settingsReflector design is inadequate
		// The group mode flag is also a cheesy hack, but might be quite useful
		public void AdjustProfileParameter(String plugin, String parameter, String newValue, bool groupMode)
		{
			SettingsReflector sr = new SettingsReflector();
			if (!groupMode)
			{
				sr.SetField(profileManager.Processor.PluginForString(profileManager.CurrentProfile, plugin),
					parameter, newValue);
			}
			else
			{
				ArrayList profiles = profileManager.ProfilesInGroup(profileManager.CurrentProfile.Group);
				foreach (Profile p in profiles)
					sr.SetField(profileManager.Processor.PluginForString(p, plugin), parameter, newValue);
			}
		}

		// this is a bit unclean ! It lets you pull out a setting from the PG plugin. Mainly a hack
		// to get BlockHead working
		public object GetPGSetting(String key)
		{
			return profileManager.CurrentProfile.AcquisitorConfig.pgPlugin.Settings[key];
		}

		public PluginSettings GetPGSettings()
		{
			return profileManager.CurrentProfile.AcquisitorConfig.pgPlugin.Settings;
		}

		// this is even more cheesy !
		public object GetShotSetting(String key)
		{
			return profileManager.CurrentProfile.AcquisitorConfig.shotGathererPlugin.Settings[key];
		}

        public object GetOutputSetting(String key)
        {
            return profileManager.CurrentProfile.AcquisitorConfig.outputPlugin.Settings[key];
        }

        // Saves the scan data to the specified file
        public void SaveData(string filename)
        {
            System.IO.FileStream fs = new FileStream(filename, FileMode.Create);
            serializer.PrepareZip(fs);
            string tempPath = Environment.GetEnvironmentVariable("TEMP") + "\\ScanMasterTemp";
            for (int k = 1; k <= DataStore.NumberOfScans; k++)
            {
                Scan sc = serializer.DeserializeScanAsBinary(tempPath + "\\scan_" + k.ToString());
                serializer.AppendToZip(sc, "scan_" + k.ToString() + ".xml");
            }
            serializer.AppendToZip(DataStore.AverageScan, "average.xml");
            serializer.CloseZip();
            fs.Close();
            Console.WriteLine(((int)(DataStore.AverageScan.GetSetting("out", "pointsPerScan"))).ToString());
        }

		// Saves the latest average scan in the datastore to the given filestream
		public void SaveAverageData( System.IO.FileStream fs )
		{
            serializer.SerializeScanAsZippedXML(fs, dataStore.AverageScan, "average.xml");
			fs.Close();
		}

		public void SaveAverageData( String filePath )
		{
			SaveAverageData( File.Create(filePath) );
		}

		public void LoadData( String path )
		{
			Scan scan = serializer.DeserializeScanFromZippedXML(path, "average.xml");
			dataStore.AverageScan = scan;
			viewerManager.NewScanLoaded();
		}

		#endregion

		#region Private functions

		// This function is registered to handle data events from the acquisitor.
		// Whenever the acquisitor has new data it will call this function.
		// Note well that this will be called on the acquisitor thread (meaning
		// no direct GUI manipulation in this function).
		private void DataHandler(object sender, DataEventArgs e)
		{
			lock (this)
			{
				// grab the settings
				GUIConfiguration guiConfig = profileManager.CurrentProfile.GUIConfig;
				// store the datapoint
				dataStore.AddScanPoint(e.point);

				// tell the viewers to handle the data point
				viewerManager.HandleDataPoint(e);
			}
		}

        // a method for saving the acquisitior settings into the scan
        private void WriteScanSettings(Scan scan)
        {
            PluginSettings st;
            ICollection keys;

            scan.ScanSettings.Add("out:pluginName", acquisitor.Configuration.outputPlugin.GetType().ToString());
            scan.ScanSettings.Add("switch:pluginName", acquisitor.Configuration.switchPlugin.GetType().ToString());
            scan.ScanSettings.Add("shot:pluginName", acquisitor.Configuration.shotGathererPlugin.GetType().ToString());
            scan.ScanSettings.Add("pg:pluginName", acquisitor.Configuration.pgPlugin.GetType().ToString());
            scan.ScanSettings.Add("yag:pluginName", acquisitor.Configuration.yagPlugin.GetType().ToString());
            scan.ScanSettings.Add("analog:pluginName", acquisitor.Configuration.analogPlugin.GetType().ToString());
            scan.ScanSettings.Add("gpib:pluginName", acquisitor.Configuration.gpibPlugin.GetType().ToString());

            // settings from the output plugin
            st = acquisitor.Configuration.outputPlugin.Settings;
            keys = st.Keys;
            foreach (String key in keys) scan.ScanSettings.Add("out:" + key, st[key]);

            // settings from the switch plugin
            st = acquisitor.Configuration.switchPlugin.Settings;
            keys = st.Keys;
            foreach (String key in keys) scan.ScanSettings.Add("switch:" + key, st[key]);

            // settings from the shot gatherer plugin
            st = acquisitor.Configuration.shotGathererPlugin.Settings;
            keys = st.Keys;
            foreach (String key in keys) scan.ScanSettings.Add("shot:" + key, st[key]);

            // settings from the pattern plugin
            st = acquisitor.Configuration.pgPlugin.Settings;
            keys = st.Keys;
            foreach (String key in keys) scan.ScanSettings.Add("pg:" + key, st[key]);

            // settings from the yag plugin
            st = acquisitor.Configuration.yagPlugin.Settings;
            keys = st.Keys;
            foreach (String key in keys) scan.ScanSettings.Add("yag:" + key, st[key]);

            // settings from the analog plugin
            st = acquisitor.Configuration.analogPlugin.Settings;
            keys = st.Keys;
            foreach (String key in keys) scan.ScanSettings.Add("analog:" + key, st[key]);

            // settings from the gpib plugin
            st = acquisitor.Configuration.gpibPlugin.Settings;
            keys = st.Keys;
            foreach (String key in keys) scan.ScanSettings.Add("gpib:" + key, st[key]);
        }

		// This function is registered with the acquisitor to handle
		// scan finished events.
		// Note well that this will be called on the acquisitor thread (meaning
		// no direct GUI manipulation in this function).
		private void ScanFinishedHandler(object sender, EventArgs e)
		{
			lock (this)
			{
				// update the datastore
				dataStore.UpdateTotal();

                // save the acquisitior settings in the scan
                WriteScanSettings(DataStore.CurrentScan);

				// serialize the last scan
                string tempPath = Environment.GetEnvironmentVariable("TEMP") + "\\ScanMasterTemp";
                if (!Directory.Exists(tempPath)) Directory.CreateDirectory(tempPath);
                serializer.SerializeScanAsBinary(tempPath + "\\scan_" +
                    dataStore.NumberOfScans.ToString(), dataStore.CurrentScan);

				dataStore.ClearCurrentScan();

				// tell the viewers that the scan is finished
				viewerManager.ScanFinished();

				// hint to the GC that now might be a good time
				GC.Collect();
			}
		}

		#endregion
	}
}


text:
namespace ppapi_proxy {

namespace {
PP_Resource Create(PP_Instance instance,
                   PP_Resource config,
                   PPB_Audio_Callback audio_callback,
                   void* user_data) {
  UNREFERENCED_PARAMETER(instance);
  UNREFERENCED_PARAMETER(config);
  UNREFERENCED_PARAMETER(audio_callback);
  UNREFERENCED_PARAMETER(user_data);
  return kInvalidResourceId;
}

bool IsAudio(PP_Resource resource) {
  UNREFERENCED_PARAMETER(resource);
  return false;
}

PP_Resource GetCurrentConfig(PP_Resource audio) {
  UNREFERENCED_PARAMETER(audio);
  return kInvalidResourceId;
}

bool StartPlayback(PP_Resource audio) {
  UNREFERENCED_PARAMETER(audio);
  return false;
}

bool StopPlayback(PP_Resource audio) {
  UNREFERENCED_PARAMETER(audio);
  return false;
}
}  // namespace

const PPB_Audio_Dev* PluginAudio::GetInterface() {
  static const PPB_Audio_Dev intf = {
    Create,
    IsAudio,
    GetCurrentConfig,
    StartPlayback,
    StopPlayback,
  };
  return &intf;
}

}  // namespace ppapi_proxy