text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Qpstest.StartResult.Builder (grpc-benchmarks 0.1.0-SNAPSHOT API)</title>
<meta name="date" content="2015-03-16">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

grpc.testing

Class Qpstest.StartResult.Builder

java.lang.Object

com.google.protobuf.AbstractMessageLite.Builder<BuilderType>

com.google.protobuf.AbstractMessage.Builder<BuilderType>

com.google.protobuf.GeneratedMessage.Builder<Qpstest.StartResult.Builder>

grpc.testing.Qpstest.StartResult.Builder

All Implemented Interfaces:

com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Qpstest.StartResultOrBuilder, java.lang.Cloneable

Enclosing class:

Qpstest.StartResult

public static final class Qpstest.StartResult.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Qpstest.StartResult.Builder>
implements Qpstest.StartResultOrBuilder

Protobuf type grpc.testing.StartResult

Method Summary

Methods

Modifier and Type
Method and Description

Qpstest.StartResult
build()

Qpstest.StartResult
buildPartial()

Qpstest.StartResult.Builder
clear()

Qpstest.StartResult.Builder
clearLatencies()

required .grpc.testing.Latencies latencies = 1;

Qpstest.StartResult.Builder
clearNumRpcs()

required int32 num_rpcs = 2;

Qpstest.StartResult.Builder
clearTimeElapsed()

required double time_elapsed = 3;

Qpstest.StartResult.Builder
clearTimeSystem()

required double time_system = 5;

Qpstest.StartResult.Builder
clearTimeUser()

required double time_user = 4;

Qpstest.StartResult
getDefaultInstanceForType()

static com.google.protobuf.Descriptors.Descriptor
getDescriptor()

com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()

Qpstest.Latencies
getLatencies()

required .grpc.testing.Latencies latencies = 1;

Qpstest.Latencies.Builder
getLatenciesBuilder()

required .grpc.testing.Latencies latencies = 1;

Qpstest.LatenciesOrBuilder
getLatenciesOrBuilder()

required .grpc.testing.Latencies latencies = 1;

int
getNumRpcs()

required int32 num_rpcs = 2;

double
getTimeElapsed()

required double time_elapsed = 3;

double
getTimeSystem()

required double time_system = 5;

double
getTimeUser()

required double time_user = 4;

boolean
hasLatencies()

required .grpc.testing.Latencies latencies = 1;

boolean
hasNumRpcs()

required int32 num_rpcs = 2;

boolean
hasTimeElapsed()

required double time_elapsed = 3;

boolean
hasTimeSystem()

required double time_system = 5;

boolean
hasTimeUser()

required double time_user = 4;

protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable()

boolean
isInitialized()

Qpstest.StartResult.Builder
mergeFrom(com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)

Qpstest.StartResult.Builder
mergeFrom(com.google.protobuf.Message other)

Qpstest.StartResult.Builder
mergeFrom(Qpstest.StartResult other)

Qpstest.StartResult.Builder
mergeLatencies(Qpstest.Latencies value)

required .grpc.testing.Latencies latencies = 1;

Qpstest.StartResult.Builder
setLatencies(Qpstest.Latencies.Builder builderForValue)

required .grpc.testing.Latencies latencies = 1;

Qpstest.StartResult.Builder
setLatencies(Qpstest.Latencies value)

required .grpc.testing.Latencies latencies = 1;

Qpstest.StartResult.Builder
setNumRpcs(int value)

required int32 num_rpcs = 2;

Qpstest.StartResult.Builder
setTimeElapsed(double value)

required double time_elapsed = 3;

Qpstest.StartResult.Builder
setTimeSystem(double value)

required double time_system = 5;

Qpstest.StartResult.Builder
setTimeUser(double value)

required double time_user = 4;

Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isClean, markClean, mergeUnknownFields, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields

Methods inherited from class com.google.protobuf.AbstractMessage.Builder

findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

addAll, newUninitializedMessageException

Methods inherited from class java.lang.Object

equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Methods inherited from interface com.google.protobuf.MessageOrBuilder

findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof

Method Detail

getDescriptor

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()

internalGetFieldAccessorTable

protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

Specified by:

internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Qpstest.StartResult.Builder>

clear

public Qpstest.StartResult.Builder clear()

Specified by:

clear in interface com.google.protobuf.Message.Builder

Specified by:

clear in interface com.google.protobuf.MessageLite.Builder

Overrides:

clear in class com.google.protobuf.GeneratedMessage.Builder<Qpstest.StartResult.Builder>

getDescriptorForType

public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()

Specified by:

getDescriptorForType in interface com.google.protobuf.Message.Builder

Specified by:

getDescriptorForType in interface com.google.protobuf.MessageOrBuilder

Overrides:

getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Qpstest.StartResult.Builder>

getDefaultInstanceForType

public Qpstest.StartResult getDefaultInstanceForType()

Specified by:

getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder

Specified by:

getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder

build

public Qpstest.StartResult build()

Specified by:

build in interface com.google.protobuf.Message.Builder

Specified by:

build in interface com.google.protobuf.MessageLite.Builder

buildPartial

public Qpstest.StartResult buildPartial()

Specified by:

buildPartial in interface com.google.protobuf.Message.Builder

Specified by:

buildPartial in interface com.google.protobuf.MessageLite.Builder

mergeFrom

public Qpstest.StartResult.Builder mergeFrom(com.google.protobuf.Message other)

Specified by:

mergeFrom in interface com.google.protobuf.Message.Builder

Overrides:

mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Qpstest.StartResult.Builder>

mergeFrom

public Qpstest.StartResult.Builder mergeFrom(Qpstest.StartResult other)

isInitialized

public final boolean isInitialized()

Specified by:

isInitialized in interface com.google.protobuf.MessageLiteOrBuilder

Overrides:

isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Qpstest.StartResult.Builder>

mergeFrom

public Qpstest.StartResult.Builder mergeFrom(com.google.protobuf.CodedInputStream input,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws java.io.IOException

Specified by:

mergeFrom in interface com.google.protobuf.Message.Builder

Specified by:

mergeFrom in interface com.google.protobuf.MessageLite.Builder

Overrides:

mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Qpstest.StartResult.Builder>

Throws:

java.io.IOException

hasLatencies

public boolean hasLatencies()

required .grpc.testing.Latencies latencies = 1;

Specified by:

hasLatencies in interface Qpstest.StartResultOrBuilder

getLatencies

public Qpstest.Latencies getLatencies()

required .grpc.testing.Latencies latencies = 1;

Specified by:

getLatencies in interface Qpstest.StartResultOrBuilder

setLatencies

public Qpstest.StartResult.Builder setLatencies(Qpstest.Latencies value)

required .grpc.testing.Latencies latencies = 1;

setLatencies

public Qpstest.StartResult.Builder setLatencies(Qpstest.Latencies.Builder builderForValue)

required .grpc.testing.Latencies latencies = 1;

mergeLatencies

public Qpstest.StartResult.Builder mergeLatencies(Qpstest.Latencies value)

required .grpc.testing.Latencies latencies = 1;

clearLatencies

public Qpstest.StartResult.Builder clearLatencies()

required .grpc.testing.Latencies latencies = 1;

getLatenciesBuilder

public Qpstest.Latencies.Builder getLatenciesBuilder()

required .grpc.testing.Latencies latencies = 1;

getLatenciesOrBuilder

public Qpstest.LatenciesOrBuilder getLatenciesOrBuilder()

required .grpc.testing.Latencies latencies = 1;

Specified by:

getLatenciesOrBuilder in interface Qpstest.StartResultOrBuilder

hasNumRpcs

public boolean hasNumRpcs()

required int32 num_rpcs = 2;

Specified by:

hasNumRpcs in interface Qpstest.StartResultOrBuilder

getNumRpcs

public int getNumRpcs()

required int32 num_rpcs = 2;

Specified by:

getNumRpcs in interface Qpstest.StartResultOrBuilder

setNumRpcs

public Qpstest.StartResult.Builder setNumRpcs(int value)

required int32 num_rpcs = 2;

clearNumRpcs

public Qpstest.StartResult.Builder clearNumRpcs()

required int32 num_rpcs = 2;

hasTimeElapsed

public boolean hasTimeElapsed()

required double time_elapsed = 3;

Specified by:

hasTimeElapsed in interface Qpstest.StartResultOrBuilder

getTimeElapsed

public double getTimeElapsed()

required double time_elapsed = 3;

Specified by:

getTimeElapsed in interface Qpstest.StartResultOrBuilder

setTimeElapsed

public Qpstest.StartResult.Builder setTimeElapsed(double value)

required double time_elapsed = 3;

clearTimeElapsed

public Qpstest.StartResult.Builder clearTimeElapsed()

required double time_elapsed = 3;

hasTimeUser

public boolean hasTimeUser()

required double time_user = 4;

Specified by:

hasTimeUser in interface Qpstest.StartResultOrBuilder

getTimeUser

public double getTimeUser()

required double time_user = 4;

Specified by:

getTimeUser in interface Qpstest.StartResultOrBuilder

setTimeUser

public Qpstest.StartResult.Builder setTimeUser(double value)

required double time_user = 4;

clearTimeUser

public Qpstest.StartResult.Builder clearTimeUser()

required double time_user = 4;

hasTimeSystem

public boolean hasTimeSystem()

required double time_system = 5;

Specified by:

hasTimeSystem in interface Qpstest.StartResultOrBuilder

getTimeSystem

public double getTimeSystem()

required double time_system = 5;

Specified by:

getTimeSystem in interface Qpstest.StartResultOrBuilder

setTimeSystem

public Qpstest.StartResult.Builder setTimeSystem(double value)

required double time_system = 5;

clearTimeSystem

public Qpstest.StartResult.Builder clearTimeSystem()

required double time_system = 5;

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
// Copyright © 2018 Wave Engine S.L. All rights reserved. Use is subject to license terms.

#region Using Statements
using System;
using System.Collections.Generic;
using System.Text;
using WaveEngine.Common.Media;
using WaveEngine.Framework;
using WaveEngine.Framework.Services;
#endregion

namespace WaveEngine.Components.GameActions
{
    /// <summary>
    /// A game action to wait for a time
    /// </summary>
    public class WaitGameAction : GameAction
    {
        /// <summary>
        /// Number of instances
        /// </summary>
        private static int instances;

        /// <summary>
        /// Cached timer factory
        /// </summary>
        private static TimerFactory timerFactory = WaveServices.TimerFactory;

        /// <summary>
        /// The timer
        /// </summary>
        private Timer timer;

        #region Properties

        /// <summary>
        /// Gets or sets the duration of the game action
        /// </summary>
        public TimeSpan Duration { get; set; }
        #endregion

        #region Public Methods

        /// <summary>
        /// Initializes a new instance of the <see cref="WaitGameAction" /> class.
        /// </summary>
        /// <param name="duration">The duration of the action</param>
        /// <param name="scene">The scene.</param>
        public WaitGameAction(TimeSpan duration, Scene scene = null)
            : base("WaitGameAction" + instances++, scene)
        {
            this.Duration = duration;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="WaitGameAction" /> class.
        /// </summary>
        /// <param name="parent">The parent action</param>
        /// <param name="duration">The duration of the action</param>
        public WaitGameAction(IGameAction parent, TimeSpan duration)
            : base(parent, "WaitGameAction" + instances++)
        {
            this.Duration = duration;
        }
        #endregion

        #region Private Methods

        /// <summary>
        /// Perform Run actions
        /// </summary>
        protected override void PerformRun()
        {
            // Play sound
            this.timer = timerFactory.CreateTimer(this.Duration, this.TimerCompleted, false, this.Scene);
        }

        /// <summary>
        /// The timer has been fired
        /// </summary>
        private void TimerCompleted()
        {
            if (this.State == WaveEngine.Framework.Services.GameActionState.Running)
            {
                this.PerformCompleted();
            }
            else
            {
#if DEBUG
                throw new NotSupportedException("This point should be not executed because if it has been skiped or aborted the timer (of the TimerTask)should have been removed");
#endif
            }

            timerFactory.RemoveTimer(this.timer);
        }

        /// <summary>
        /// Perform cancel
        /// </summary>
        protected override void PerformCancel()
        {
            timerFactory.RemoveTimer(this.timer);
            base.PerformCancel();
        }

        /// <summary>
        /// Skip the action
        /// </summary>
        /// <returns>A value indicating it the game action is susscessfully skipped</returns>
        protected override bool PerformSkip()
        {
            if (this.IsSkippable)
            {
                this.Cancel();
                return base.PerformSkip();
            }
            else
            {
                return false;
            }
        }
        #endregion
    }
}

redpajama_set_name: RedPajamaGithub


text:
// BEGIN LICENSE BLOCK
// Version: CMPL 1.1
//
// The contents of this file are subject to the Cisco-style Mozilla Public
// License Version 1.1 (the "License"); you may not use this file except
// in compliance with the License.  You may obtain a copy of the License
// at www.eclipse-clp.org/license.
//
// Software distributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
// the License for the specific language governing rights and limitations
// under the License.
//
// The Original Code is  CPViz Constraint Visualization System
// The Initial Developer of the Original Code is  Helmut Simonis
// Portions created by the Initial Developer are
// Copyright (C) 2009-2010 Helmut Simonis
//
// Contributor(s): 	Helmut Simonis, 4C, Univerity College Cork, Cork
//
//
// END LICENSE BLOCK
// ----------------------------------------------------------------------
package ie.ucc.cccc.viz;

/**
 * Utility class to store the parameter information about a visualizer
 * @author hsimonis
 *
 */
public class VisualContext {
	private int id;
	private String type;
	private String display;
	private int x;
	private int y;
	private int width;
	private int height;
	private String group;
	private int min;
	private int max;
	private int indexStart;
	/**
	 * the width of the total drawing area for this visualizer
	 */
	private int boxWidth=1;
	/**
	 * the height of the total drawing area of this visualizer
	 */
	private int boxHeight=1;

	@Override public String toString() {
		return "Context Id "+ id + " type "+ type + " display "+ display +
		" x "+ x + " y "+ y + " width "+ width + " height "+ height +
		" group "+ group + " min "+ min + " max "+ max;
	}
	public VisualContext(int id,String type,String display,
			int x, int y, int width, int height,
			String group,
			int min,int max,int indexStart) {
		this.id = id;
		this.type = type;
		this.display = display;
		this.x = x;
		this.y = y;
		setWidth(width);
		setHeight(height);
		this.group = group;
		this.min = min;
		this.max = max;
		this.indexStart = indexStart;
//		System.out.println("Index start "+indexStart);
	}

	public int getId() {
		return id;
	}
	public String getType() {
		return type;
	}
	public String getDisplay() {
		return display;
	}
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
	public int getWidth() {
		return width;
	}
	public int getHeight() {
		return height;
	}
	public int getBoxWidth() {
		return boxWidth;
	}
	public int getBoxHeight() {
		return boxHeight;
	}
	public int getMin() {
		return min;
	}
	public int getMax() {
		return max;
	}
	public int getIndexStart() {
		return indexStart;
	}
	public String getGroup() {
		return group;
	}

	public void setWidth(int width) {
		this.width = width;
		boxWidth = Math.max(boxWidth,width+2);
	}
	public void setHeight(int height) {
		this.height = height;
		boxHeight = Math.max(boxHeight,height+2);
	}
	public void setBoxWidth(int width) {
		this.boxWidth = width;
	}
	public void setBoxHeight(int height) {
		this.boxHeight = height;
	}
	public void setMin(int min) {
		this.min = min;
	}
	public void setMax(int max) {
		this.max = max;
	}
	public Box getBox() {
		return new Box(getX(),getY(),getBoxWidth(),getBoxHeight());
	}
}


text:
/**
 * Application Constants
 */
'use strict';

var AppConstants = {

  CHANGE_EVENT: 'change',
  SELECT_OBJECT: 'select_object'

};

module.exports = AppConstants;


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

package com.xerox.amazonws.monitoring;

/**
 * This enumeration represents different image types that can be launched.
 */
public enum Statistics {
	AVERAGE ("Average"),
	SUM ("Sum"),
	MINIMUM ("Minimum"),
	MAXIMUM ("Maximum");

	private final String statId;

	Statistics(String statId) {
		this.statId = statId;
	}

	public String getStatId() {
		return statId;
	}

	public static Statistics getTypeFromString(String val) {
		for (Statistics t : Statistics.values()) {
			if (t.getStatId().equals(val)) {
				return t;
			}
		}
		return null;
	}
}


text:
package org.docksidestage.dockside.dbflute.exentity.customize;

import org.docksidestage.dockside.dbflute.bsentity.customize.BsSurpriseSimilarPKComment;

/**
 * The entity of SurpriseSimilarPKComment.
 * <p>
 * You can implement your original methods here.
 * This class remains when re-generating.
 * </p>
 * @author DBFlute(AutoGenerator)
 */
public class SurpriseSimilarPKComment extends BsSurpriseSimilarPKComment {

    /** Serial version UID. (Default) */
    private static final long serialVersionUID = 1L;
}


text:
package braintree

import "time"

// A Paypal account on braintree.
type Paypal struct {
	BillingAgreementID string         `xml:"billing-agreement-id"`
	CreatedAt          time.Time      `xml:"created-at"`
	CustomerID         string         `xml:"customer-id"`
	Default            bool           `xml:"default"`
	Email              string         `xml:"email"`
	ImageURL           string         `xml:"image-url"`
	Subscriptions      []Subscription `xml:"subscriptions>subscription"`
	Token              string         `xml:"token"`
	UpdatedAt          time.Time      `xml:"updated-at"`
}

func (pp Paypal) private() {}


text:
using namespace cocos2d;

//---------------------------------------------------------------------//
Packet::Packet(Tower& startTower, Tower& destTower)
:Entity{}, m_startTower{ &startTower }, m_destTower{ &destTower }
{
	m_edge = startTower.getEdge(destTower);
}
//---------------------------------------------------------------------//
bool Packet::init()
{
	if (!CocosBase::init())
		return false;

	this->setTextureRect({ 0, 0, 25, 25 });
	this->scheduleUpdate();

	switch (m_startTower->getTowerType())
	{
	case TowerType::Ally:		this->setPacketType(PacketType::Ally); break;
	case TowerType::Enemy:		this->setPacketType(PacketType::Enemy); break;
	default:break;
	}

	//Init shader
	if (!ShaderCache::getInstance()->getGLProgram("shader_packet")) {
		auto shader = GLProgram::createWithFilenames("shader/packet.vert", "shader/packet.frag");
		shader->link();
		shader->updateUniforms();
		ShaderCache::getInstance()->addGLProgram(shader, "shader_packet");
	}

	auto shader = ShaderCache::getInstance()->getGLProgram("shader_packet");

	auto glProgramState = GLProgramState::create(shader);
	glProgramState->setUniformVec2("packetSize", this->getContentSize());

	this->setGLProgram(shader);
	this->setGLProgramState(glProgramState);

	return true;
}
//---------------------------------------------------------------------//
void Packet::update(float delta)
{
	//passed time
	m_timeAlreadyMoved += delta;

	auto origin = m_startTower->getPosition();
	auto destination = m_destTower->getPosition();
	auto control = m_edge->getMovecControlPoint();
	auto t = m_timeAlreadyMoved;

	float x = powf(1 - t, 2) * origin.x + 2.0f * (1 - t) * t * control.x + t * t * destination.x;
	float y = powf(1 - t, 2) * origin.y + 2.0f * (1 - t) * t * control.y + t * t * destination.y;
	this->setPosition(x,y);

	//every second
	if (m_timeAlreadyMoved > 1.0f) {
		m_timeAlreadyMoved = 0;

		//Go to next node
		auto lastStartTower = m_startTower;
		m_startTower = m_destTower;
		m_destTower = m_startTower->getRandomNextTower(*lastStartTower);

		//Get edge
		m_edge = m_startTower->getEdge(*m_destTower);

		//Send packet receive to the tower
		m_startTower->receivePacket(*this);

		if (!m_edge) {
			this->deleteEntity<Packet>();
			return;
		}
	}

}
//---------------------------------------------------------------------//
void Packet::setPacketType(PacketType type)
{
	m_packetType = type;

	switch (type)
	{
	case PacketType::Ally:	this->setColor({ 86, 195, 83 }); break;
	case PacketType::Enemy:	this->setColor({ 195, 83, 139 }); break;
	default: break;
	}
}


text:
package kr.lul.kobalttown.document.service;

import kr.lul.kobalttown.document.test.DocumentTestAnchor;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author justburrow
 * @since 2020/02/11
 */
@SpringBootApplication(scanBasePackageClasses = {DocumentServiceAnchor.class, DocumentTestAnchor.class})
public class DocumentServiceTestConfiguration {
}


text:
using System;
using UnityEngine;
using LuaInterface;
using Object = UnityEngine.Object;

public class UnityEngine_Audio_AudioMixerWrap
{
	public static void Register(IntPtr L)
	{
		LuaMethod[] regs = new LuaMethod[]
		{
			new LuaMethod("FindMatchingGroups", FindMatchingGroups),
			new LuaMethod("FindSnapshot", FindSnapshot),
			new LuaMethod("TransitionToSnapshots", TransitionToSnapshots),
			new LuaMethod("SetFloat", SetFloat),
			new LuaMethod("ClearFloat", ClearFloat),
			new LuaMethod("GetFloat", GetFloat),
			new LuaMethod("New", _CreateUnityEngine_Audio_AudioMixer),
			new LuaMethod("GetClassType", GetClassType),
			new LuaMethod("__eq", Lua_Eq),
		};

		LuaField[] fields = new LuaField[]
		{
			new LuaField("outputAudioMixerGroup", get_outputAudioMixerGroup, set_outputAudioMixerGroup),
		};

		LuaScriptMgr.RegisterLib(L, "UnityEngine.Audio.AudioMixer", typeof(UnityEngine.Audio.AudioMixer), regs, fields, typeof(Object));
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int _CreateUnityEngine_Audio_AudioMixer(IntPtr L)
	{
		LuaDLL.luaL_error(L, "UnityEngine.Audio.AudioMixer class does not have a constructor function");
		return 0;
	}

	static Type classType = typeof(UnityEngine.Audio.AudioMixer);

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetClassType(IntPtr L)
	{
		LuaScriptMgr.Push(L, classType);
		return 1;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int get_outputAudioMixerGroup(IntPtr L)
	{
		object o = LuaScriptMgr.GetLuaObject(L, 1);
		UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)o;

		if (obj == null)
		{
			LuaTypes types = LuaDLL.lua_type(L, 1);

			if (types == LuaTypes.LUA_TTABLE)
			{
				LuaDLL.luaL_error(L, "unknown member name outputAudioMixerGroup");
			}
			else
			{
				LuaDLL.luaL_error(L, "attempt to index outputAudioMixerGroup on a nil value");
			}
		}

		LuaScriptMgr.Push(L, obj.outputAudioMixerGroup);
		return 1;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int set_outputAudioMixerGroup(IntPtr L)
	{
		object o = LuaScriptMgr.GetLuaObject(L, 1);
		UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)o;

		if (obj == null)
		{
			LuaTypes types = LuaDLL.lua_type(L, 1);

			if (types == LuaTypes.LUA_TTABLE)
			{
				LuaDLL.luaL_error(L, "unknown member name outputAudioMixerGroup");
			}
			else
			{
				LuaDLL.luaL_error(L, "attempt to index outputAudioMixerGroup on a nil value");
			}
		}

		obj.outputAudioMixerGroup = (UnityEngine.Audio.AudioMixerGroup)LuaScriptMgr.GetUnityObject(L, 3, typeof(UnityEngine.Audio.AudioMixerGroup));
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int FindMatchingGroups(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.Audio.AudioMixer");
		string arg0 = LuaScriptMgr.GetLuaString(L, 2);
		UnityEngine.Audio.AudioMixerGroup[] o = obj.FindMatchingGroups(arg0);
		LuaScriptMgr.PushArray(L, o);
		return 1;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int FindSnapshot(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.Audio.AudioMixer");
		string arg0 = LuaScriptMgr.GetLuaString(L, 2);
		UnityEngine.Audio.AudioMixerSnapshot o = obj.FindSnapshot(arg0);
		LuaScriptMgr.Push(L, o);
		return 1;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int TransitionToSnapshots(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 4);
		UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.Audio.AudioMixer");
		UnityEngine.Audio.AudioMixerSnapshot[] objs0 = LuaScriptMgr.GetArrayObject<UnityEngine.Audio.AudioMixerSnapshot>(L, 2);
		float[] objs1 = LuaScriptMgr.GetArrayNumber<float>(L, 3);
		float arg2 = (float)LuaScriptMgr.GetNumber(L, 4);
		obj.TransitionToSnapshots(objs0,objs1,arg2);
		return 0;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetFloat(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 3);
		UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.Audio.AudioMixer");
		string arg0 = LuaScriptMgr.GetLuaString(L, 2);
		float arg1 = (float)LuaScriptMgr.GetNumber(L, 3);
		bool o = obj.SetFloat(arg0,arg1);
		LuaScriptMgr.Push(L, o);
		return 1;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int ClearFloat(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.Audio.AudioMixer");
		string arg0 = LuaScriptMgr.GetLuaString(L, 2);
		bool o = obj.ClearFloat(arg0);
		LuaScriptMgr.Push(L, o);
		return 1;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetFloat(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 3);
		UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.Audio.AudioMixer");
		string arg0 = LuaScriptMgr.GetLuaString(L, 2);
		float arg1;
		bool o = obj.GetFloat(arg0,out arg1);
		LuaScriptMgr.Push(L, o);
		LuaScriptMgr.Push(L, arg1);
		return 2;
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int Lua_Eq(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		Object arg0 = LuaScriptMgr.GetLuaObject(L, 1) as Object;
		Object arg1 = LuaScriptMgr.GetLuaObject(L, 2) as Object;
		bool o = arg0 == arg1;
		LuaScriptMgr.Push(L, o);
		return 1;
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mbean PUBLIC
   "-//JBoss//DTD JBOSS XMBEAN 1.1//EN"
   "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_1.dtd">

<mbean>
   <description><![CDATA[Service for IHE Transaction 'Modality Procedure Step Completed/Dicontinued' Option: PPS Exception Managment.

   				Checks a received MPPS for Discontinuation Reason Code 'Incorrect Worklist Entry Selected' (code:110514 designator:DCM)
   				and move all referenced series to trash folder.

   				Instances stored after receiving such an MPPS will be ignored in StoreSCP directly. (if CheckIncorrectWorklistEntry is enabled)
   				]]>
   </description>

   <descriptors>
      <persistence persistPolicy="OnUpdate"/>
      <persistence-manager value="org.jboss.mx.persistence.DelegatingPersistenceManager"/>
   </descriptors>

   <class>org.dcm4chex.archive.mbean.PPSExceptionMgtService</class>

   <constructor>
      <description>The default constructor</description>
      <name>PPSExceptionMgtService</name>
   </constructor>

    <attribute access="read-write" getMethod="getDelay" setMethod="setDelay">
      <description>Set delay for removing discontinued series in millisecond after MPPS received.
      </description>
      <name>Delay</name>
      <type>long</type>
      <descriptors>
         <value value="0"/>
      </descriptors>
   </attribute>
   <attribute access="read-write"
      getMethod="getQueueName"
      setMethod="setQueueName">
      <description>Used internally. Do NOT modify.
      </description>
      <name>QueueName</name>
      <type>java.lang.String</type>
   </attribute>
    <attribute access="read-write"
      getMethod="getMppsScpServiceName"
      setMethod="setMppsScpServiceName">
      <description>Used internally. Do not modify.
      </description>
      <name>MppsScpServiceName</name>
      <type>javax.management.ObjectName</type>
   </attribute>
   <attribute access="read-write"
      getMethod="getJmsServiceName"
      setMethod="setJmsServiceName">
      <description>Used internally. Do NOT modify.
      </description>
      <name>JMSServiceName</name>
      <type>javax.management.ObjectName</type>
   </attribute>

   &defaultAttributes;

   &defaultOperations;

</mbean>


text:
package com.amazonaws.services.glue.model.transform;

import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.glue.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * CatalogKinesisSourceMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class CatalogKinesisSourceMarshaller {

    private static final MarshallingInfo<String> NAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Name").build();
    private static final MarshallingInfo<Integer> WINDOWSIZE_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("WindowSize").build();
    private static final MarshallingInfo<Boolean> DETECTSCHEMA_BINDING = MarshallingInfo.builder(MarshallingType.BOOLEAN)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("DetectSchema").build();
    private static final MarshallingInfo<String> TABLE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Table").build();
    private static final MarshallingInfo<String> DATABASE_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Database").build();
    private static final MarshallingInfo<StructuredPojo> STREAMINGOPTIONS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("StreamingOptions").build();
    private static final MarshallingInfo<StructuredPojo> DATAPREVIEWOPTIONS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("DataPreviewOptions").build();

    private static final CatalogKinesisSourceMarshaller instance = new CatalogKinesisSourceMarshaller();

    public static CatalogKinesisSourceMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(CatalogKinesisSource catalogKinesisSource, ProtocolMarshaller protocolMarshaller) {

        if (catalogKinesisSource == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(catalogKinesisSource.getName(), NAME_BINDING);
            protocolMarshaller.marshall(catalogKinesisSource.getWindowSize(), WINDOWSIZE_BINDING);
            protocolMarshaller.marshall(catalogKinesisSource.getDetectSchema(), DETECTSCHEMA_BINDING);
            protocolMarshaller.marshall(catalogKinesisSource.getTable(), TABLE_BINDING);
            protocolMarshaller.marshall(catalogKinesisSource.getDatabase(), DATABASE_BINDING);
            protocolMarshaller.marshall(catalogKinesisSource.getStreamingOptions(), STREAMINGOPTIONS_BINDING);
            protocolMarshaller.marshall(catalogKinesisSource.getDataPreviewOptions(), DATAPREVIEWOPTIONS_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}


text:
#region Copyright

#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kodestruct.Common.Section.Interfaces;
using Kodestruct.Common.Section.SectionTypes;

namespace Kodestruct.Common.Section.Predefined
{
    /// <summary>
    /// Predefined rectangular section is used for rectangular shapes having known properties
    /// from catalog such as precast concrete shapes.
    /// </summary>
    public class PredefinedSectionRectangle : SectionPredefinedBase, ISectionRectangular, ISliceableShapeProvider
    {
        public PredefinedSectionRectangle(ISection section)
            : base(section)
        {

        }

        public PredefinedSectionRectangle(double Width, double Height, ISection section)
            : base(section)
        {
            this.B = Width;
            this.H = Height;
        }

        public double H { get; set; }
        public double B { get; set; }

        public ISection GetWeakAxisClone()
        {
            throw new NotImplementedException();
        }

        //public override ISection Clone()
        //{
        //    throw new NotImplementedException();
        //}

        public ISliceableSection GetSliceableShape()
        {
            SectionRectangular r = new SectionRectangular(this.B, this.H);
            return r;
        }
    }
}


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

<FLOW VERSION="3.0" CLEANUP="true">
  <COMMENT></COMMENT>

  <!-- nodes -->

<INVOKE TIMEOUT="" SERVICE="tundra.content:retrieve" VALIDATE-IN="$none" VALIDATE-OUT="$none">
  <COMMENT></COMMENT>

  <!-- nodes -->

<MAP MODE="INPUT">
  <MAPTARGET>

<Values version="2.0">
  <record name="xml" javaclass="com.wm.util.Values">
    <value name="node_type">record</value>
    <value name="field_type">record</value>
    <value name="field_dim">0</value>
    <value name="nillable">true</value>
    <value name="form_qualified">false</value>
    <value name="is_global">false</value>
    <array name="rec_fields" type="record" depth="1">
      <record javaclass="com.wm.util.Values">
        <value name="node_type">record</value>
        <value name="node_comment"></value>
        <record name="node_hints" javaclass="com.wm.util.Values">
          <null name="field_usereditable"/>
          <value name="field_largerEditor">false</value>
          <value name="field_password">false</value>
        </record>
        <value name="field_name">$source</value>
        <value name="field_type">string</value>
        <value name="field_dim">0</value>
        <record name="field_content_type" javaclass="com.wm.util.Values">
          <value name="contentType">1</value>
          <value name="internalType">reference</value>
          <value name="dataTypeVersion">dtVersion2</value>
          <array name="targetNames" type="record" depth="1">
            <record javaclass="com.wm.util.Values">
              <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
              <value name="ncName">anyURI</value>
            </record>
          </array>
        </record>
        <value name="nillable">false</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
      </record>
      <record javaclass="com.wm.util.Values">
        <value name="node_type">record</value>
        <value name="node_comment"></value>
        <record name="node_hints" javaclass="com.wm.util.Values">
          <null name="field_usereditable"/>
          <value name="field_largerEditor">false</value>
          <value name="field_password">false</value>
        </record>
        <value name="field_name">$service</value>
        <value name="field_type">string</value>
        <value name="field_dim">0</value>
        <record name="field_content_type" javaclass="com.wm.util.Values">
          <value name="contentType">1</value>
          <value name="internalType">reference</value>
          <value name="dataTypeVersion">dtVersion2</value>
          <array name="targetNames" type="record" depth="1">
            <record javaclass="com.wm.util.Values">
              <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
              <value name="ncName">string</value>
            </record>
          </array>
        </record>
        <value name="nillable">false</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
      </record>
      <record javaclass="com.wm.util.Values">
        <value name="node_type">record</value>
        <value name="node_comment"></value>
        <record name="node_hints" javaclass="com.wm.util.Values">
          <null name="field_usereditable"/>
          <value name="field_largerEditor">false</value>
          <value name="field_password">false</value>
        </record>
        <value name="field_name">$limit</value>
        <value name="field_type">string</value>
        <value name="field_dim">0</value>
        <value name="field_opt">true</value>
        <record name="field_content_type" javaclass="com.wm.util.Values">
          <value name="contentType">1</value>
          <value name="internalType">reference</value>
          <value name="dataTypeVersion">dtVersion2</value>
          <array name="targetNames" type="record" depth="1">
            <record javaclass="com.wm.util.Values">
              <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
              <value name="ncName">positiveInteger</value>
            </record>
          </array>
        </record>
        <value name="nillable">true</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
      </record>
      <record javaclass="com.wm.util.Values">
        <value name="node_type">unknown</value>
        <value name="field_name">$strict?</value>
        <value name="field_type">string</value>
        <value name="field_dim">0</value>
        <value name="nillable">true</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
      </record>
    </array>
  </record>
</Values>
</MAPTARGET>
  <MAPSOURCE>

<Values version="2.0">
  <record name="xml" javaclass="com.wm.util.Values">
    <value name="node_type">record</value>
    <value name="field_type">record</value>
    <value name="field_dim">0</value>
    <value name="nillable">true</value>
    <value name="form_qualified">false</value>
    <value name="is_global">false</value>
    <array name="rec_fields" type="record" depth="1">
    </array>
  </record>
</Values>
</MAPSOURCE>

  <!-- nodes -->

<MAPSET NAME="Setter" OVERWRITE="true" VARIABLES="false" FIELD="/$service;1;0">
  <DATA ENCODING="XMLValues" I18N="true">

<Values version="2.0">
  <value name="xml">tundra.tn.support.retrieve:route</value>
  <record name="type" javaclass="com.wm.util.Values">
    <value name="node_type">record</value>
    <value name="node_comment"></value>
    <record name="node_hints" javaclass="com.wm.util.Values">
      <null name="field_usereditable"/>
      <value name="field_largerEditor">false</value>
      <value name="field_password">false</value>
    </record>
    <value name="field_name">$service</value>
    <value name="field_type">string</value>
    <value name="field_dim">0</value>
    <record name="field_content_type" javaclass="com.wm.util.Values">
      <value name="contentType">1</value>
      <value name="internalType">reference</value>
      <value name="dataTypeVersion">dtVersion2</value>
      <array name="targetNames" type="record" depth="1">
        <record javaclass="com.wm.util.Values">
          <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
          <value name="ncName">string</value>
        </record>
      </array>
    </record>
    <value name="nillable">false</value>
    <value name="form_qualified">false</value>
    <value name="is_global">false</value>
  </record>
</Values>
</DATA>
</MAPSET>
</MAP>

<MAP MODE="OUTPUT">
  <MAPTARGET>

<Values version="2.0">
  <record name="xml" javaclass="com.wm.util.Values">
    <value name="node_type">record</value>
    <value name="field_type">record</value>
    <value name="field_dim">0</value>
    <value name="nillable">true</value>
    <value name="form_qualified">false</value>
    <value name="is_global">false</value>
    <array name="rec_fields" type="record" depth="1">
      <record javaclass="com.wm.util.Values">
        <value name="node_type">record</value>
        <value name="node_comment"></value>
        <record name="node_hints" javaclass="com.wm.util.Values">
          <null name="field_usereditable"/>
          <value name="field_largerEditor">false</value>
          <value name="field_password">false</value>
        </record>
        <value name="field_name">$source</value>
        <value name="field_type">string</value>
        <value name="field_dim">0</value>
        <record name="field_content_type" javaclass="com.wm.util.Values">
          <value name="contentType">1</value>
          <value name="internalType">reference</value>
          <value name="dataTypeVersion">dtVersion2</value>
          <array name="targetNames" type="record" depth="1">
            <record javaclass="com.wm.util.Values">
              <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
              <value name="ncName">anyURI</value>
            </record>
          </array>
        </record>
        <value name="nillable">false</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
      </record>
      <record javaclass="com.wm.util.Values">
        <value name="node_type">unknown</value>
        <value name="field_name">$service</value>
        <value name="field_type">string</value>
        <value name="field_dim">0</value>
        <value name="nillable">true</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
      </record>
      <record javaclass="com.wm.util.Values">
        <value name="node_type">record</value>
        <value name="node_comment"></value>
        <record name="node_hints" javaclass="com.wm.util.Values">
          <null name="field_usereditable"/>
          <value name="field_largerEditor">false</value>
          <value name="field_password">false</value>
        </record>
        <value name="field_name">$limit</value>
        <value name="field_type">string</value>
        <value name="field_dim">0</value>
        <value name="field_opt">true</value>
        <record name="field_content_type" javaclass="com.wm.util.Values">
          <value name="contentType">1</value>
          <value name="internalType">reference</value>
          <value name="dataTypeVersion">dtVersion2</value>
          <array name="targetNames" type="record" depth="1">
            <record javaclass="com.wm.util.Values">
              <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
              <value name="ncName">positiveInteger</value>
            </record>
          </array>
        </record>
        <value name="nillable">true</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
      </record>
      <record javaclass="com.wm.util.Values">
        <value name="node_type">record</value>
        <value name="node_comment"></value>
        <record name="node_hints" javaclass="com.wm.util.Values">
          <value name="field_usereditable">false</value>
          <value name="field_largerEditor">false</value>
          <value name="field_password">false</value>
        </record>
        <value name="field_name">$strict?</value>
        <value name="field_type">string</value>
        <value name="field_dim">0</value>
        <value name="field_opt">true</value>
        <array name="field_options" type="value" depth="1">
          <value>false</value>
          <value>true</value>
        </array>
        <record name="field_content_type" javaclass="com.wm.util.Values">
          <value name="contentType">1</value>
          <value name="internalType">reference</value>
          <value name="dataTypeVersion">dtVersion2</value>
          <array name="targetNames" type="record" depth="1">
            <record javaclass="com.wm.util.Values">
              <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
              <value name="ncName">boolean</value>
            </record>
          </array>
        </record>
        <value name="nillable">true</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
      </record>
      <record javaclass="com.wm.util.Values">
        <value name="node_type">record</value>
        <value name="node_comment">Trading Networks routing parameters.  The following parameters should ideally be specified for
non-XML content:
- SenderID
- ReceiverID
- DocumentID
- DoctypeName or some other parameter used to recognise the TN Document Type
- $contentType</value>
        <record name="node_hints" javaclass="com.wm.util.Values">
          <value name="field_largerEditor">false</value>
          <value name="field_password">false</value>
        </record>
        <value name="field_name">TN_parms</value>
        <value name="field_type">record</value>
        <value name="field_dim">0</value>
        <value name="field_opt">true</value>
        <value name="nillable">true</value>
        <value name="form_qualified">false</value>
        <value name="is_global">false</value>
        <array name="rec_fields" type="record" depth="1">
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment">The mime type of the content being routed.  For example text/xml for XML, or text/csv for CSV content etc</value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">$contentType</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">$contentEncoding</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">$contentName</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">SenderID</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">ReceiverID</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">DocumentID</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">DoctypeID</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">DoctypeName</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">GroupID</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
          <record javaclass="com.wm.util.Values">
            <value name="node_type">record</value>
            <value name="node_comment"></value>
            <record name="node_hints" javaclass="com.wm.util.Values">
              <null name="field_usereditable"/>
              <value name="field_largerEditor">false</value>
              <value name="field_password">false</value>
            </record>
            <value name="field_name">ConversationID</value>
            <value name="field_type">string</value>
            <value name="field_dim">0</value>
            <value name="field_opt">true</value>
            <record name="field_content_type" javaclass="com.wm.util.Values">
              <value name="contentType">1</value>
              <value name="internalType">reference</value>
              <value name="dataTypeVersion">dtVersion2</value>
              <array name="targetNames" type="record" depth="1">
                <record javaclass="com.wm.util.Values">
                  <value name="xmlns">http://www.w3.org/2001/XMLSchema</value>
                  <value name="ncName">string</value>
                </record>
              </array>
            </record>
            <value name="nillable">true</value>
            <value name="form_qualified">false</value>
            <value name="is_global">false</value>
          </record>
        </array>
      </record>
    </array>
  </record>
</Values>
</MAPTARGET>
  <MAPSOURCE>

<Values version="2.0">
  <record name="xml" javaclass="com.wm.util.Values">
    <value name="node_type">record</value>
    <value name="field_type">record</value>
    <value name="field_dim">0</value>
    <value name="nillable">true</value>
    <value name="form_qualified">false</value>
    <value name="is_global">false</value>
    <array name="rec_fields" type="record" depth="1">
    </array>
  </record>
</Values>
</MAPSOURCE>

  <!-- nodes -->

<MAPDELETE NAME="Dropper" FIELD="/$source;1;0">
</MAPDELETE>

<MAPDELETE NAME="Dropper" FIELD="/$service;1;0">
</MAPDELETE>

<MAPDELETE NAME="Dropper" FIELD="/TN_parms;2;0">
</MAPDELETE>

<MAPDELETE NAME="Dropper" FIELD="/$limit;1;0">
</MAPDELETE>
</MAP>
</INVOKE>
</FLOW>


text:
try {
var input = $('#tempfile-input');
input.addClass('hidden');
var uploader = litepubl.fileman.uploader.handler;
            uploader.queue.push(input.get(0).files[0]);
uploader.start();
        } catch (e) {
return e.message;
}


text:
window.utils = window.utils || {};

(function(namespace){

	namespace.setOnReady = function(onReady){
		document.onreadystatechange = function () {
			if(document.readyState == 'complete') {
				onReady();
			}
		}
	};

	namespace.getHtmlFromTemplate = function(templateId){
		var element = document.getElementById(templateId);
		return element.innerHTML;
	};

	namespace.getNodeFromText = function(text){
		var div = document.createElement('div');
		div.innerHTML = text;
		return div;
	}

	namespace.getElementById = function(id){
		return document.getElementById(id);
	}

	namespace.insertElement = function(parent, child, position){
		parent.insertBefore(child, parent.children[position]);
	}

	namespace.hideElement = function(element){
		element.style.display = "none";
	}

	namespace.showElement = function(element){
		element.removeAttribute("style");
	}

	namespace.removeElement = function(element){
		element.parentElement.removeChild(element);
	};

})(window.utils);


text:
"""Session implementation for CherryPy.

We use cherrypy.request to store some convenient variables as
well as data about the session for the current request. Instead of
polluting cherrypy.request we use a Session object bound to
cherrypy.session to store these variables.
"""

import datetime
import os
try:
    import cPickle as pickle
except ImportError:
    import pickle
import random

try:
    # Python 2.5+
    from hashlib import sha1 as sha
except ImportError:
    from sha import new as sha

import time
import threading
import types
from warnings import warn

import cherrypy
from cherrypy.lib import http

missing = object()

class Session(object):
    """A CherryPy dict-like Session object (one per request)."""

    __metaclass__ = cherrypy._AttributeDocstrings

    _id = None
    id_observers = None
    id_observers__doc = "A list of callbacks to which to pass new id's."

    id__doc = "The current session ID."
    def _get_id(self):
        return self._id
    def _set_id(self, value):
        self._id = value
        for o in self.id_observers:
            o(value)
    id = property(_get_id, _set_id, doc=id__doc)

    timeout = 60
    timeout__doc = "Number of minutes after which to delete session data."

    locked = False
    locked__doc = """
    If True, this session instance has exclusive read/write access
    to session data."""

    loaded = False
    loaded__doc = """
    If True, data has been retrieved from storage. This should happen
    automatically on the first attempt to access session data."""

    clean_thread = None
    clean_thread__doc = "Class-level Monitor which calls self.clean_up."

    clean_freq = 5
    clean_freq__doc = "The poll rate for expired session cleanup in minutes."

    def __init__(self, id=None, **kwargs):
        self.id_observers = []
        self._data = {}

        for k, v in kwargs.iteritems():
            setattr(self, k, v)

        if id is None:
            self.regenerate()
        else:
            self.id = id
            if not self._exists():
                # Expired or malicious session. Make a new one.
                # See http://www.cherrypy.org/ticket/709.
                self.id = None
                self.regenerate()

    def regenerate(self):
        """Replace the current session (with a new id)."""
        if self.id is not None:
            self.delete()

        old_session_was_locked = self.locked
        if old_session_was_locked:
            self.release_lock()

        self.id = None
        while self.id is None:
            self.id = self.generate_id()
            # Assert that the generated id is not already stored.
            if self._exists():
                self.id = None

        if old_session_was_locked:
            self.acquire_lock()

    def clean_up(self):
        """Clean up expired sessions."""
        pass

    try:
        os.urandom(20)
    except (AttributeError, NotImplementedError):
        # os.urandom not available until Python 2.4. Fall back to random.random.
        def generate_id(self):
            """Return a new session id."""
            return sha('%s' % random.random()).hexdigest()
    else:
        def generate_id(self):
            """Return a new session id."""
            return os.urandom(20).encode('hex')

    def save(self):
        """Save session data."""
        try:
            # If session data has never been loaded then it's never been
            #   accessed: no need to delete it
            if self.loaded:
                t = datetime.timedelta(seconds = self.timeout * 60)
                expiration_time = datetime.datetime.now() + t
                self._save(expiration_time)

        finally:
            if self.locked:
                # Always release the lock if the user didn't release it
                self.release_lock()

    def load(self):
        """Copy stored session data into this session instance."""
        data = self._load()
        # data is either None or a tuple (session_data, expiration_time)
        if data is None or data[1] < datetime.datetime.now():
            # Expired session: flush session data
            self._data = {}
        else:
            self._data = data[0]
        self.loaded = True

        # Stick the clean_thread in the class, not the instance.
        # The instances are created and destroyed per-request.
        cls = self.__class__
        if self.clean_freq and not cls.clean_thread:
            # clean_up is in instancemethod and not a classmethod,
            # so that tool config can be accessed inside the method.
            t = cherrypy.process.plugins.Monitor(
                cherrypy.engine, self.clean_up, self.clean_freq * 60)
            t.subscribe()
            cls.clean_thread = t
            t.start()

    def delete(self):
        """Delete stored session data."""
        self._delete()

    def __getitem__(self, key):
        if not self.loaded: self.load()
        return self._data[key]

    def __setitem__(self, key, value):
        if not self.loaded: self.load()
        self._data[key] = value

    def __delitem__(self, key):
        if not self.loaded: self.load()
        del self._data[key]

    def pop(self, key, default=missing):
        """Remove the specified key and return the corresponding value.
        If key is not found, default is returned if given,
        otherwise KeyError is raised.
        """
        if not self.loaded: self.load()
        if default is missing:
            return self._data.pop(key)
        else:
            return self._data.pop(key, default)

    def __contains__(self, key):
        if not self.loaded: self.load()
        return key in self._data

    def has_key(self, key):
        """D.has_key(k) -> True if D has a key k, else False."""
        if not self.loaded: self.load()
        return self._data.has_key(key)

    def get(self, key, default=None):
        """D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None."""
        if not self.loaded: self.load()
        return self._data.get(key, default)

    def update(self, d):
        """D.update(E) -> None.  Update D from E: for k in E: D[k] = E[k]."""
        if not self.loaded: self.load()
        self._data.update(d)

    def setdefault(self, key, default=None):
        """D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D."""
        if not self.loaded: self.load()
        return self._data.setdefault(key, default)

    def clear(self):
        """D.clear() -> None.  Remove all items from D."""
        if not self.loaded: self.load()
        self._data.clear()

    def keys(self):
        """D.keys() -> list of D's keys."""
        if not self.loaded: self.load()
        return self._data.keys()

    def items(self):
        """D.items() -> list of D's (key, value) pairs, as 2-tuples."""
        if not self.loaded: self.load()
        return self._data.items()

    def values(self):
        """D.values() -> list of D's values."""
        if not self.loaded: self.load()
        return self._data.values()

class RamSession(Session):

    # Class-level objects. Don't rebind these!
    cache = {}
    locks = {}

    def clean_up(self):
        """Clean up expired sessions."""
        now = datetime.datetime.now()
        for id, (data, expiration_time) in self.cache.items():
            if expiration_time < now:
                try:
                    del self.cache[id]
                except KeyError:
                    pass
                try:
                    del self.locks[id]
                except KeyError:
                    pass

    def _exists(self):
        return self.id in self.cache

    def _load(self):
        return self.cache.get(self.id)

    def _save(self, expiration_time):
        self.cache[self.id] = (self._data, expiration_time)

    def _delete(self):
        del self.cache[self.id]

    def acquire_lock(self):
        """Acquire an exclusive lock on the currently-loaded session data."""
        self.locked = True
        self.locks.setdefault(self.id, threading.RLock()).acquire()

    def release_lock(self):
        """Release the lock on the currently-loaded session data."""
        self.locks[self.id].release()
        self.locked = False

    def __len__(self):
        """Return the number of active sessions."""
        return len(self.cache)

class FileSession(Session):
    """Implementation of the File backend for sessions

    storage_path: the folder where session data will be saved. Each session
        will be saved as pickle.dump(data, expiration_time) in its own file;
        the filename will be self.SESSION_PREFIX + self.id.
    """

    SESSION_PREFIX = 'session-'
    LOCK_SUFFIX = '.lock'

    def __init__(self, id=None, **kwargs):
        # The 'storage_path' arg is required for file-based sessions.
        kwargs['storage_path'] = os.path.abspath(kwargs['storage_path'])
        Session.__init__(self, id=id, **kwargs)

    def setup(cls, **kwargs):
        """Set up the storage system for file-based sessions.

        This should only be called once per process; this will be done
        automatically when using sessions.init (as the built-in Tool does).
        """
        # The 'storage_path' arg is required for file-based sessions.
        kwargs['storage_path'] = os.path.abspath(kwargs['storage_path'])

        for k, v in kwargs.iteritems():
            setattr(cls, k, v)

        # Warn if any lock files exist at startup.
        lockfiles = [fname for fname in os.listdir(cls.storage_path)
                     if (fname.startswith(cls.SESSION_PREFIX)
                         and fname.endswith(cls.LOCK_SUFFIX))]
        if lockfiles:
            plural = ('', 's')[len(lockfiles) > 1]
            warn("%s session lockfile%s found at startup. If you are "
                 "only running one process, then you may need to "
                 "manually delete the lockfiles found at %r."
                 % (len(lockfiles), plural, cls.storage_path))
    setup = classmethod(setup)

    def _get_file_path(self):
        f = os.path.join(self.storage_path, self.SESSION_PREFIX + self.id)
        if not os.path.abspath(f).startswith(self.storage_path):
            raise cherrypy.HTTPError(400, "Invalid session id in cookie.")
        return f

    def _exists(self):
        path = self._get_file_path()
        return os.path.exists(path)

    def _load(self, path=None):
        if path is None:
            path = self._get_file_path()
        try:
            f = open(path, "rb")
            try:
                return pickle.load(f)
            finally:
                f.close()
        except (IOError, EOFError):
            return None

    def _save(self, expiration_time):
        f = open(self._get_file_path(), "wb")
        try:
            pickle.dump((self._data, expiration_time), f)
        finally:
            f.close()

    def _delete(self):
        try:
            os.unlink(self._get_file_path())
        except OSError:
            pass

    def acquire_lock(self, path=None):
        """Acquire an exclusive lock on the currently-loaded session data."""
        if path is None:
            path = self._get_file_path()
        path += self.LOCK_SUFFIX
        while True:
            try:
                lockfd = os.open(path, os.O_CREAT|os.O_WRONLY|os.O_EXCL)
            except OSError:
                time.sleep(0.1)
            else:
                os.close(lockfd)
                break
        self.locked = True

    def release_lock(self, path=None):
        """Release the lock on the currently-loaded session data."""
        if path is None:
            path = self._get_file_path()
        os.unlink(path + self.LOCK_SUFFIX)
        self.locked = False

    def clean_up(self):
        """Clean up expired sessions."""
        now = datetime.datetime.now()
        # Iterate over all session files in self.storage_path
        for fname in os.listdir(self.storage_path):
            if (fname.startswith(self.SESSION_PREFIX)
                and not fname.endswith(self.LOCK_SUFFIX)):
                # We have a session file: lock and load it and check
                #   if it's expired. If it fails, nevermind.
                path = os.path.join(self.storage_path, fname)
                self.acquire_lock(path)
                try:
                    contents = self._load(path)
                    # _load returns None on IOError
                    if contents is not None:
                        data, expiration_time = contents
                        if expiration_time < now:
                            # Session expired: deleting it
                            os.unlink(path)
                finally:
                    self.release_lock(path)

    def __len__(self):
        """Return the number of active sessions."""
        return len([fname for fname in os.listdir(self.storage_path)
                    if (fname.startswith(self.SESSION_PREFIX)
                        and not fname.endswith(self.LOCK_SUFFIX))])

class PostgresqlSession(Session):
    """ Implementation of the PostgreSQL backend for sessions. It assumes
        a table like this:

            create table session (
                id varchar(40),
                data text,
                expiration_time timestamp
            )

    You must provide your own get_db function.
    """

    def __init__(self, id=None, **kwargs):
        Session.__init__(self, id, **kwargs)
        self.cursor = self.db.cursor()

    def setup(cls, **kwargs):
        """Set up the storage system for Postgres-based sessions.

        This should only be called once per process; this will be done
        automatically when using sessions.init (as the built-in Tool does).
        """
        for k, v in kwargs.iteritems():
            setattr(cls, k, v)

        self.db = self.get_db()
    setup = classmethod(setup)

    def __del__(self):
        if self.cursor:
            self.cursor.close()
        self.db.commit()

    def _exists(self):
        # Select session data from table
        self.cursor.execute('select data, expiration_time from session '
                            'where id=%s', (self.id,))
        rows = self.cursor.fetchall()
        return bool(rows)

    def _load(self):
        # Select session data from table
        self.cursor.execute('select data, expiration_time from session '
                            'where id=%s', (self.id,))
        rows = self.cursor.fetchall()
        if not rows:
            return None

        pickled_data, expiration_time = rows[0]
        data = pickle.loads(pickled_data)
        return data, expiration_time

    def _save(self, expiration_time):
        pickled_data = pickle.dumps(self._data)
        self.cursor.execute('update session set data = %s, '
                            'expiration_time = %s where id = %s',
                            (pickled_data, expiration_time, self.id))

    def _delete(self):
        self.cursor.execute('delete from session where id=%s', (self.id,))

    def acquire_lock(self):
        """Acquire an exclusive lock on the currently-loaded session data."""
        # We use the "for update" clause to lock the row
        self.locked = True
        self.cursor.execute('select id from session where id=%s for update',
                            (self.id,))

    def release_lock(self):
        """Release the lock on the currently-loaded session data."""
        # We just close the cursor and that will remove the lock
        #   introduced by the "for update" clause
        self.cursor.close()
        self.locked = False

    def clean_up(self):
        """Clean up expired sessions."""
        self.cursor.execute('delete from session where expiration_time < %s',
                            (datetime.datetime.now(),))

class MemcachedSession(Session):

    # The most popular memcached client for Python isn't thread-safe.
    # Wrap all .get and .set operations in a single lock.
    mc_lock = threading.RLock()

    # This is a seperate set of locks per session id.
    locks = {}

    servers = ['127.0.0.1:11211']

    def setup(cls, **kwargs):
        """Set up the storage system for memcached-based sessions.

        This should only be called once per process; this will be done
        automatically when using sessions.init (as the built-in Tool does).
        """
        for k, v in kwargs.iteritems():
            setattr(cls, k, v)

        import memcache
        cls.cache = memcache.Client(cls.servers)
    setup = classmethod(setup)

    def _exists(self):
        self.mc_lock.acquire()
        try:
            return bool(self.cache.get(self.id))
        finally:
            self.mc_lock.release()

    def _load(self):
        self.mc_lock.acquire()
        try:
            return self.cache.get(self.id)
        finally:
            self.mc_lock.release()

    def _save(self, expiration_time):
        # Send the expiration time as "Unix time" (seconds since 1/1/1970)
        td = int(time.mktime(expiration_time.timetuple()))
        self.mc_lock.acquire()
        try:
            if not self.cache.set(self.id, (self._data, expiration_time), td):
                raise AssertionError("Session data for id %r not set." % self.id)
        finally:
            self.mc_lock.release()

    def _delete(self):
        self.cache.delete(self.id)

    def acquire_lock(self):
        """Acquire an exclusive lock on the currently-loaded session data."""
        self.locked = True
        self.locks.setdefault(self.id, threading.RLock()).acquire()

    def release_lock(self):
        """Release the lock on the currently-loaded session data."""
        self.locks[self.id].release()
        self.locked = False

    def __len__(self):
        """Return the number of active sessions."""
        raise NotImplementedError

# Hook functions (for CherryPy tools)

def save():
    """Save any changed session data."""

    if not hasattr(cherrypy.serving, "session"):
        return

    # Guard against running twice
    if hasattr(cherrypy.request, "_sessionsaved"):
        return
    cherrypy.request._sessionsaved = True

    if cherrypy.response.stream:
        # If the body is being streamed, we have to save the data
        #   *after* the response has been written out
        cherrypy.request.hooks.attach('on_end_request', cherrypy.session.save)
    else:
        # If the body is not being streamed, we save the data now
        # (so we can release the lock).
        if isinstance(cherrypy.response.body, types.GeneratorType):
            cherrypy.response.collapse_body()
        cherrypy.session.save()
save.failsafe = True

def close():
    """Close the session object for this request."""
    sess = getattr(cherrypy.serving, "session", None)
    if getattr(sess, "locked", False):
        # If the session is still locked we release the lock
        sess.release_lock()
close.failsafe = True
close.priority = 90

def init(storage_type='ram', path=None, path_header=None, name='session_id',
         timeout=60, domain=None, secure=False, clean_freq=5, **kwargs):
    """Initialize session object (using cookies).

    storage_type: one of 'ram', 'file', 'postgresql'. This will be used
        to look up the corresponding class in cherrypy.lib.sessions
        globals. For example, 'file' will use the FileSession class.
    path: the 'path' value to stick in the response cookie metadata.
    path_header: if 'path' is None (the default), then the response
        cookie 'path' will be pulled from request.headers[path_header].
    name: the name of the cookie.
    timeout: the expiration timeout (in minutes) for both the cookie and
        stored session data.
    domain: the cookie domain.
    secure: if False (the default) the cookie 'secure' value will not
        be set. If True, the cookie 'secure' value will be set (to 1).
    clean_freq (minutes): the poll rate for expired session cleanup.

    Any additional kwargs will be bound to the new Session instance,
    and may be specific to the storage type. See the subclass of Session
    you're using for more information.
    """

    request = cherrypy.request

    # Guard against running twice
    if hasattr(request, "_session_init_flag"):
        return
    request._session_init_flag = True

    # Check if request came with a session ID
    id = None
    if name in request.cookie:
        id = request.cookie[name].value

    # Find the storage class and call setup (first time only).
    storage_class = storage_type.title() + 'Session'
    storage_class = globals()[storage_class]
    if not hasattr(cherrypy, "session"):
        if hasattr(storage_class, "setup"):
            storage_class.setup(**kwargs)

    # Create and attach a new Session instance to cherrypy.serving.
    # It will possess a reference to (and lock, and lazily load)
    # the requested session data.
    kwargs['timeout'] = timeout
    kwargs['clean_freq'] = clean_freq
    cherrypy.serving.session = sess = storage_class(id, **kwargs)
    def update_cookie(id):
        """Update the cookie every time the session id changes."""
        cherrypy.response.cookie[name] = id
    sess.id_observers.append(update_cookie)

    # Create cherrypy.session which will proxy to cherrypy.serving.session
    if not hasattr(cherrypy, "session"):
        cherrypy.session = cherrypy._ThreadLocalProxy('session')

    set_response_cookie(path=path, path_header=path_header, name=name,
                        timeout=timeout, domain=domain, secure=secure)

def set_response_cookie(path=None, path_header=None, name='session_id',
                        timeout=60, domain=None, secure=False):
    """Set a response cookie for the client.

    path: the 'path' value to stick in the response cookie metadata.
    path_header: if 'path' is None (the default), then the response
        cookie 'path' will be pulled from request.headers[path_header].
    name: the name of the cookie.
    timeout: the expiration timeout for the cookie.
    domain: the cookie domain.
    secure: if False (the default) the cookie 'secure' value will not
        be set. If True, the cookie 'secure' value will be set (to 1).
    """
    # Set response cookie
    cookie = cherrypy.response.cookie
    cookie[name] = cherrypy.serving.session.id
    cookie[name]['path'] = (path or cherrypy.request.headers.get(path_header)
                            or '/')

    # We'd like to use the "max-age" param as indicated in
    # http://www.faqs.org/rfcs/rfc2109.html but IE doesn't
    # save it to disk and the session is lost if people close
    # the browser. So we have to use the old "expires" ... sigh ...
##    cookie[name]['max-age'] = timeout * 60
    if timeout:
        cookie[name]['expires'] = http.HTTPDate(time.time() + (timeout * 60))
    if domain is not None:
        cookie[name]['domain'] = domain
    if secure:
        cookie[name]['secure'] = 1

def expire():
    """Expire the current session cookie."""
    name = cherrypy.request.config.get('tools.sessions.name', 'session_id')
    one_year = 60 * 60 * 24 * 365
    exp = time.gmtime(time.time() - one_year)
    t = time.strftime("%a, %d-%b-%Y %H:%M:%S GMT", exp)
    cherrypy.response.cookie[name]['expires'] = t


text:
<!doctype html>

    <meta charset="utf-8">
    <title>Scroller Demo (datasource within scope)</title>

is loading: {{loading}};        browse sample code

*{{item}}*


text:
#include "config.h"

#if ENABLE(SVG)
#include "SVGPathStringBuilder.h"

namespace WebCore {

String SVGPathStringBuilder::result()
{
    unsigned size = m_stringBuilder.length();
    if (!size)
        return String();

    // Remove trailing space.
    m_stringBuilder.resize(size - 1);
    return m_stringBuilder.toString();
}

void SVGPathStringBuilder::moveTo(const FloatPoint& targetPoint, bool, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("M %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));
    else
        m_stringBuilder.append(String::format("m %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));
}

void SVGPathStringBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("L %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));
    else
        m_stringBuilder.append(String::format("l %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));
}

void SVGPathStringBuilder::lineToHorizontal(float x, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("H %.6lg ", x));
    else
        m_stringBuilder.append(String::format("h %.6lg ", x));
}

void SVGPathStringBuilder::lineToVertical(float y, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("V %.6lg ", y));
    else
        m_stringBuilder.append(String::format("v %.6lg ", y));
}

void SVGPathStringBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("C %.6lg %.6lg %.6lg %.6lg %.6lg %.6lg ", point1.x(), point1.y(), point2.x(), point2.y(), targetPoint.x(), targetPoint.y()));
    else
        m_stringBuilder.append(String::format("c %.6lg %.6lg %.6lg %.6lg %.6lg %.6lg ", point1.x(), point1.y(), point2.x(), point2.y(), targetPoint.x(), targetPoint.y()));
}

void SVGPathStringBuilder::curveToCubicSmooth(const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("S %.6lg %.6lg %.6lg %.6lg ", point2.x(), point2.y(), targetPoint.x(), targetPoint.y()));
    else
        m_stringBuilder.append(String::format("s %.6lg %.6lg %.6lg %.6lg ", point2.x(), point2.y(), targetPoint.x(), targetPoint.y()));
}

void SVGPathStringBuilder::curveToQuadratic(const FloatPoint& point1, const FloatPoint& targetPoint, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("Q %.6lg %.6lg %.6lg %.6lg ", point1.x(), point1.y(), targetPoint.x(), targetPoint.y()));
    else
        m_stringBuilder.append(String::format("q %.6lg %.6lg %.6lg %.6lg ", point1.x(), point1.y(), targetPoint.x(), targetPoint.y()));
}

void SVGPathStringBuilder::curveToQuadraticSmooth(const FloatPoint& targetPoint, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("T %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));
    else
        m_stringBuilder.append(String::format("t %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));
}

void SVGPathStringBuilder::arcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, const FloatPoint& targetPoint, PathCoordinateMode mode)
{
    if (mode == AbsoluteCoordinates)
        m_stringBuilder.append(String::format("A %.6lg %.6lg %.6lg %d %d %.6lg %.6lg ", r1, r2, angle, largeArcFlag, sweepFlag, targetPoint.x(), targetPoint.y()));
    else
        m_stringBuilder.append(String::format("a %.6lg %.6lg %.6lg %d %d %.6lg %.6lg ", r1, r2, angle, largeArcFlag, sweepFlag, targetPoint.x(), targetPoint.y()));
}

void SVGPathStringBuilder::closePath()
{
    m_stringBuilder.append("Z ");
}

} // namespace WebCore

#endif // ENABLE(SVG)