text:
package producer

import (
	"crypto/tls"
	"crypto/x509"
	"io/ioutil"
	"strconv"
	"strings"
	"sync"
	"sync/atomic"
	"time"

	kafka "github.com/Shopify/sarama"
	"github.com/trivago/gollum/core"
	"github.com/trivago/tgo"
)

const (
	partRandom     = "random"
	partRoundrobin = "roundrobin"
	partHash       = "hash"
	compressNone   = "none"
	compressGZIP   = "zip"
	compressSnappy = "snappy"
)

// Kafka producer
//
// This producer writes messages to a kafka cluster. This producer is backed by
// the sarama library (https://github.com/Shopify/sarama) so most settings
// directly relate to the settings of that library.
//
// Parameters
//
// - Servers: Defines a list of ideally all brokers in the cluster. At least one
// broker is required.
// By default this parameter is set to an empty list.
//
// - Version: Defines the kafka protocol version to use. Common values are 0.8.2,
// 0.9.0 or 0.10.0. Values of the form "A.B" are allowed as well as "A.B.C"
// and "A.B.C.D". If the version given is not known, the closest possible
// version is chosen. If GroupId is set to a value < "0.9", "0.9.0.1" will be used.
// By default this parameter is set to "0.8.2".
//
// - Topics: Defines a stream to topic mapping. If a stream is not mapped the
// stream name is used as topic. You can define the wildcard stream (*) here,
// too. If defined, all streams that do not have a specific mapping will go to
// this topic (including _GOLLUM_).
// By default this parameter is set to an empty list.
//
// - ClientId: Sets the kafka client id used by this producer.
// By default this parameter is set to "gollum".
//
// - Partitioner: Defines the distribution algorithm to use. Valid values are:
// Random, Roundrobin and Hash.
// By default this parameter is set to "Roundrobin".
//
// - PartitionHasher: Defines the hash algorithm to use when Partitioner is set
// to "Hash". Accepted values are "fnv1-a" and "murmur2".
//
// - KeyFrom: Defines the metadata field that contains the string to be used as
// the key passed to kafka. When set to an empty string no key is used.
// By default this parameter is set to "".
//
// - Compression: Defines the compression algorithm to use.
// Possible values are "none", "zip" and "snappy".
// By default this parameter is set to "none".
//
// - RequiredAcks: Defines the numbers of acknowledgements required until a
// message is marked as "sent". When set to -1 all replicas must acknowledge a
// message.
// By default this parameter is set to 1.
//
// - TimeoutMs: Denotes the maximum time the broker will wait for acks. This
// setting becomes active when RequiredAcks is set to wait for multiple commits.
// By default this parameter is set to 10000.
//
// - GracePeriodMs: Defines the number of milliseconds to wait for Sarama to
// accept a single message. After this period a message is sent to the fallback.
// This setting mitigates a conceptual problem in the saram API which can lead
// to long blocking times during startup.
// By default this parameter is set to 100.
//
// - MaxOpenRequests: Defines the maximum number of simultaneous connections
// opened to a single broker at a time.
// By default this parameter is set to 5.
//
// - ServerTimeoutSec: Defines the time after which a connection is set to timed
// out.
// By default this parameter is set to 30.
//
// - SendTimeoutMs: Defines the number of milliseconds to wait for a broker to
// before marking a message as timed out.
// By default this parameter is set to 250.
//
// - SendRetries: Defines how many times a message should be send again before a
// broker is marked as not reachable. Please note that this setting should never
// be 0. See https://github.com/Shopify/sarama/issues/294.
// By default this parameter is set to 1.
//
// - AllowNilValue: When enabled messages containing an empty or nil payload
// will not be rejected.
// By default this parameter is set to false.
//
// - Batch/MinCount: Sets the minimum number of messages required to send a
// request.
// By default this parameter is set to 1.
//
// - Batch/MaxCount: Defines the maximum number of messages bufferd before a
// request is sent. A value of 0 will remove this limit.
// By default this parameter is set to 0.
//
// - Batch/MinSizeByte: Defines the minimum number of bytes to buffer before
// sending a request.
// By default this parameter is set to 8192.
//
// - Batch/SizeMaxKB: Defines the maximum allowed message size in KB.
// Messages bigger than this limit will be rejected.
// By default this parameter is set to 1024.
//
// - Batch/TimeoutMs: Defines the maximum time in milliseconds after which a
// new request will be sent, ignoring of Batch/MinCount and Batch/MinSizeByte
// By default this parameter is set to 3.
//
// - ElectRetries: Defines how many times a metadata request is to be retried
// during a leader election phase.
// By default this parameter is set to 3.
//
// - ElectTimeoutMs: Defines the number of milliseconds to wait for the cluster
// to elect a new leader.
// By default this parameter is set to 250.
//
// - MetadataRefreshMs: Defines the interval in milliseconds for refetching
// cluster metadata.
// By default this parameter is set to 600000.
//
// - TlsEnable: Enables TLS communication with brokers.
// By default this parameter is set to false.
//
// - TlsKeyLocation: Path to the client's private key (PEM) used for TLS based
// authentication.
// By default this parameter is set to "".
//
// - TlsCertificateLocation: Path to the client's public key (PEM) used for TLS
// based authentication.
// By default this parameter is set to "".
//
// - TlsCaLocation: Path to the CA certificate(s) used for verifying the
// broker's key.
// By default this parameter is set to "".
//
// - TlsServerName: Used to verify the hostname on the server's certificate
// unless TlsInsecureSkipVerify is true.
// By default this parameter is set to "".
//
// - TlsInsecureSkipVerify: Enables server certificate chain and host name
// verification.
// By default this parameter is set to false.
//
// - SaslEnable: Enables SASL based authentication.
// By default this parameter is set to false.
//
// - SaslUsername: Sets the user name used for SASL/PLAIN authentication.
// By default this parameter is set to "".
//
// - SaslPassword: Sets the password used for SASL/PLAIN authentication.
// By default this parameter is set to "".
//
// MessageBufferCount sets the internal channel size for the kafka client.
// By default this is set to 8192.
//
// Examples
//
//  kafkaWriter:
//    Type: producer.Kafka
//    Streams: logs
//    Compression: zip
//    Servers:
//      - "kafka01:9092"
//      - "kafka02:9092"
//      - "kafka03:9092"
//      - "kafka04:9092"
type Kafka struct {
	core.BufferedProducer `gollumdoc:"embed_type"`
	topicGuard            *sync.RWMutex
	topic                 map[core.MessageStreamID]*topicHandle
	topicHandles          map[string]*topicHandle
	streamToTopic         map[core.MessageStreamID]string
	servers               []string      `config:"Servers"`
	clientID              string        `config:"ClientId" default:"gollum"`
	gracePeriod           time.Duration `config:"GracePeriodMs" default:"100" metric:"ms"`
	client                kafka.Client
	config                *kafka.Config
	producer              kafka.AsyncProducer
	missCount             int64
	nilValueAllowed       bool   `config:"AllowNilValue" default:"false"`
	keyField              string `config:"KeyFrom"`
}

type topicHandle struct {
	name          string
	rttSum        int64
	sent          int64
	delivered     int64
	lastHeartBeat time.Time
}

const (
	kafkaMetricRoundtrip = "Kafka:AvgRoundtripMs-"
)

func init() {
	core.TypeRegistry.Register(Kafka{})
}

// Configure initializes this producer with values from a plugin config.
func (prod *Kafka) Configure(conf core.PluginConfigReader) {
	prod.SetStopCallback(prod.close)

	kafka.Logger = prod.Logger.WithField("Scope", "Sarama")

	prod.topicGuard = new(sync.RWMutex)
	prod.streamToTopic = conf.GetStreamMap("Topics", "")
	prod.topic = make(map[core.MessageStreamID]*topicHandle)
	prod.topicHandles = make(map[string]*topicHandle)

	prod.config = kafka.NewConfig()
	prod.config.ClientID = prod.clientID
	prod.config.ChannelBufferSize = int(conf.GetInt("MessageBufferCount", 8192))

	switch ver := conf.GetString("Version", "0.8.2"); ver {
	case "0.8.2.0":
		prod.config.Version = kafka.V0_8_2_0
	case "0.8.2.1":
		prod.config.Version = kafka.V0_8_2_1
	case "0.8", "0.8.2", "0.8.2.2":
		prod.config.Version = kafka.V0_8_2_2
	case "0.9.0", "0.9.0.0":
		prod.config.Version = kafka.V0_9_0_0
	case "0.9", "0.9.0.1":
		prod.config.Version = kafka.V0_9_0_1
	case "0.10", "0.10.0", "0.10.0.0":
		prod.config.Version = kafka.V0_10_0_0
	default:
		prod.Logger.Warning("Unknown kafka version given: ", ver)
		parts := strings.Split(ver, ".")
		if len(parts) < 2 {
			prod.config.Version = kafka.V0_8_2_2
		} else {
			minor, _ := strconv.ParseUint(parts[1], 10, 8)
			switch {
			case minor <= 8:
				prod.config.Version = kafka.V0_8_2_2
			case minor == 9:
				prod.config.Version = kafka.V0_9_0_1
			case minor >= 10:
				prod.config.Version = kafka.V0_10_0_0
			}
		}
	}

	prod.config.Net.MaxOpenRequests = int(conf.GetInt("MaxOpenRequests", 5))
	prod.config.Net.DialTimeout = time.Duration(int(conf.GetInt("ServerTimeoutSec", 30))) * time.Second
	prod.config.Net.ReadTimeout = prod.config.Net.DialTimeout
	prod.config.Net.WriteTimeout = prod.config.Net.DialTimeout

	prod.config.Net.TLS.Enable = conf.GetBool("TlsEnable", false)
	if prod.config.Net.TLS.Enable {
		prod.config.Net.TLS.Config = &tls.Config{}

		keyFile := conf.GetString("TlsKeyLocation", "")
		certFile := conf.GetString("TlsCertificateLocation", "")
		if keyFile != "" && certFile != "" {
			cert, err := tls.LoadX509KeyPair(certFile, keyFile)
			if conf.Errors.Push(err) {
				return
			}
			prod.config.Net.TLS.Config.Certificates = []tls.Certificate{cert}
		} else if certFile == "" {
			conf.Errors.Pushf("Cannot specify TlsKeyLocation without TlsCertificateLocation")
			return
		} else if keyFile == "" {
			conf.Errors.Pushf("Cannot specify TlsCertificateLocation without TlsKeyLocation")
			return
		}

		caFile := conf.GetString("TlsCaLocation", "")
		if caFile == "" {
			conf.Errors.Pushf("TlsEnable is set to true, but no TlsCaLocation was specified")
			return
		}
		caCert, err := ioutil.ReadFile(caFile)
		if conf.Errors.Push(err) {
			return
		}

		caCertPool := x509.NewCertPool()
		caCertPool.AppendCertsFromPEM(caCert)
		prod.config.Net.TLS.Config.RootCAs = caCertPool

		serverName := conf.GetString("TlsServerName", "")
		if serverName != "" {
			prod.config.Net.TLS.Config.ServerName = serverName
		}

		prod.config.Net.TLS.Config.InsecureSkipVerify = conf.GetBool("TlsInsecureSkipVerify", false)

	}

	prod.config.Net.SASL.Enable = conf.GetBool("SaslEnable", false)
	if prod.config.Net.SASL.Enable {
		prod.config.Net.SASL.User = conf.GetString("SaslUsername", "")
		prod.config.Net.SASL.Password = conf.GetString("SaslPassword", "")
	}

	prod.config.Metadata.Retry.Max = int(conf.GetInt("ElectRetries", 3))
	prod.config.Metadata.Retry.Backoff = time.Duration(conf.GetInt("ElectTimeoutMs", 250)) * time.Millisecond
	prod.config.Metadata.RefreshFrequency = time.Duration(conf.GetInt("MetadataRefreshMs", 600000)) * time.Millisecond

	prod.config.Producer.RequiredAcks = kafka.RequiredAcks(conf.GetInt("RequiredAcks", int64(kafka.WaitForLocal)))
	prod.config.Producer.Timeout = time.Duration(conf.GetInt("TimeoutMs", 10000)) * time.Millisecond
	prod.config.Producer.MaxMessageBytes = int(conf.GetInt("Batch/SizeMaxKB", 1<<10)) << 10
	prod.config.Producer.Flush.Bytes = int(conf.GetInt("Batch/MinSizeByte", 8192))
	prod.config.Producer.Flush.Messages = int(conf.GetInt("Batch/MinCount", 1))
	prod.config.Producer.Flush.Frequency = time.Duration(conf.GetInt("Batch/TimeoutMs", 3000)) * time.Millisecond
	prod.config.Producer.Flush.MaxMessages = int(conf.GetInt("Batch/MaxCount", 0))
	prod.config.Producer.Retry.Max = int(conf.GetInt("SendRetries", 1))
	prod.config.Producer.Retry.Backoff = time.Duration(conf.GetInt("SendTimeoutMs", 100)) * time.Millisecond

	prod.config.Producer.Return.Successes = true
	prod.config.Producer.Return.Errors = true
	prod.config.Producer.Return.Successes = true

	switch strings.ToLower(conf.GetString("Compression", compressNone)) {
	default:
		fallthrough
	case compressNone:
		prod.config.Producer.Compression = kafka.CompressionNone
	case compressGZIP:
		prod.config.Producer.Compression = kafka.CompressionGZIP
	case compressSnappy:
		prod.config.Producer.Compression = kafka.CompressionSnappy
	}

	switch strings.ToLower(conf.GetString("Partitioner", partRoundrobin)) {
	case partRandom:
		prod.config.Producer.Partitioner = kafka.NewRandomPartitioner
	case partRoundrobin:
		prod.config.Producer.Partitioner = kafka.NewRoundRobinPartitioner
	default:
		fallthrough
	case partHash:
		switch strings.ToLower(conf.GetString("PartitionHasher", "FNV-1a")) {
		case "murmur2":
			prod.config.Producer.Partitioner = NewMurmur2HashPartitioner
		default:
			fallthrough
		case "fnv-1a":
			prod.config.Producer.Partitioner = kafka.NewHashPartitioner

		}

	}
}

func (prod *Kafka) storeRTT(msg *core.Message) {
	rtt := time.Since(msg.GetCreationTime())

	prod.topicGuard.RLock()
	topic := prod.topic[msg.GetStreamID()]
	prod.topicGuard.RUnlock()

	atomic.AddInt64(&topic.rttSum, rtt.Nanoseconds()/1000) // microseconds
	atomic.AddInt64(&topic.delivered, 1)
}

func (prod *Kafka) pollResults() {
	// Check for results
	keepPolling := true
	timeout := time.NewTimer(prod.config.Producer.Flush.Frequency / 2)
	for keepPolling && prod.producer != nil {
		select {
		case result, hasMore := <-prod.producer.Successes():
			if hasMore {
				if msg, hasMsg := result.Metadata.(core.Message); hasMsg {
					prod.storeRTT(&msg)
				}
			}

		case err, hasMore := <-prod.producer.Errors():
			if hasMore {
				if msg, hasMsg := err.Msg.Metadata.(core.Message); hasMsg {
					prod.Logger.Warning("Kafka producer error on return: ", err)
					prod.storeRTT(&msg)
					if err == kafka.ErrMessageTooLarge {
						prod.Logger.Error("Message discarded as too large.")
						core.CountMessageDiscarded()
					} else {
						prod.TryFallback(&msg)
					}
				}
			}

		case <-timeout.C:
			keepPolling = false
		}
	}

	prod.topicGuard.RLock()
	defer prod.topicGuard.RUnlock()

	// Update metrics
	for _, topic := range prod.topic {
		rttSum := atomic.SwapInt64(&topic.rttSum, 0)
		delivered := atomic.SwapInt64(&topic.delivered, 0)
		topicName := topic.name

		avgRoundtripMs := int64(0)
		if delivered > 0 {
			avgRoundtripMs = rttSum / (delivered * 1000)
		}

		tgo.Metric.Set(kafkaMetricRoundtrip+topicName, avgRoundtripMs)
	}
}

func (prod *Kafka) registerNewTopic(topicName string, streamID core.MessageStreamID) *topicHandle {
	prod.topicGuard.Lock()
	defer prod.topicGuard.Unlock()

	if topic, exists := prod.topicHandles[topicName]; exists {
		prod.topic[streamID] = topic
		return topic
	}

	topic := &topicHandle{
		name: topicName,
	}

	prod.topicHandles[topicName] = topic
	prod.topic[streamID] = topic

	tgo.Metric.New(kafkaMetricRoundtrip + topicName)

	return topic
}

func (prod *Kafka) produceMessage(msg *core.Message) {
	if !prod.nilValueAllowed && len(msg.GetPayload()) == 0 {
		streamName := core.StreamRegistry.GetStreamName(msg.GetStreamID())
		prod.Logger.Errorf("0 byte message detected on %s. Discarded", streamName)
		core.CountMessageDiscarded()
		return // ### return, invalid data ###
	}

	prod.topicGuard.RLock()
	topic, topicRegistered := prod.topic[msg.GetStreamID()]
	prod.topicGuard.RUnlock()

	if !topicRegistered {
		var wildcardSet bool
		topicName, isMapped := prod.streamToTopic[msg.GetStreamID()]
		if !isMapped {
			if topicName, wildcardSet = prod.streamToTopic[core.WildcardStreamID]; !wildcardSet {
				topicName = core.StreamRegistry.GetStreamName(msg.GetStreamID())
			}
		}
		topic = prod.registerNewTopic(topicName, msg.GetStreamID())
	}

	if isConnected, err := prod.isConnected(topic.name); !isConnected {
		prod.TryFallback(msg)
		if err != nil {
			prod.Logger.Errorf("%s is not connected: %s", topic.name, err.Error())
		}
		// TBD: health check? (ex-fuse breaker)
		return // ### return, not connected ###
	}

	kafkaMsg := &kafka.ProducerMessage{
		Topic:    topic.name,
		Value:    kafka.ByteEncoder(msg.GetPayload()),
		Metadata: &msg,
	}

	kafkaKey := prod.getKafkaMsgKey(msg)
	if len(kafkaKey) > 0 {
		kafkaMsg.Key = kafka.ByteEncoder(kafkaKey)
	}

	// Sarama can block on single messages if all buffers are full.
	// So we stop trying after a few milliseconds
	timeout := time.NewTimer(prod.gracePeriod)
	select {
	case prod.producer.Input() <- kafkaMsg:
		timeout.Stop()

	case <-timeout.C:
		// Sarama channels are full -> fallback
		prod.TryFallback(msg)
	}
}

func (prod *Kafka) getKafkaMsgKey(msg *core.Message) []byte {
	if len(prod.keyField) > 0 {
		if metadata := msg.TryGetMetadata(); metadata != nil {
			return metadata.GetValue(prod.keyField)
		}
	}

	return []byte{}

}

func (prod *Kafka) checkAllTopics() bool {
	topics, err := prod.client.Topics()
	if err != nil {
		prod.Logger.Error("Failed to get topics ", err.Error())
	}

	for _, topic := range topics {
		connected, _ := prod.isConnected(topic)
		if !connected {
			return false
		}
	}

	return true
}

func (prod *Kafka) isConnected(topic string) (bool, error) {
	if prod.client == nil || prod.producer == nil {
		if !prod.tryOpenConnection() {
			return false, nil // ### return, error ###
		}
	}

	partitions, err := prod.client.Partitions(topic)
	if err != nil {
		return false, err // ### return, error ###
	}

	prod.topicGuard.RLock()
	handle := prod.topicHandles[topic]
	prod.topicGuard.RUnlock()

	doHeartBeat := time.Since(handle.lastHeartBeat) > prod.config.Net.DialTimeout
	if doHeartBeat {
		defer func() { handle.lastHeartBeat = time.Now() }()
	}

	for _, p := range partitions {
		broker, err := prod.client.Leader(topic, p)
		if err != nil {
			return false, err // ### return, error ###
		}

		// Do a heartbeat to check if connection is functional
		if doHeartBeat {
			if connected, _ := broker.Connected(); connected {
				req := &kafka.MetadataRequest{Topics: []string{topic}}
				if _, err := broker.GetMetadata(req); err != nil {
					prod.Logger.Debug("Server ", broker.Addr(), " found to have an invalid connection: ", err)
					broker.Close()
				}
			}
		}

		// Reconnect if necessary
		if connected, _ := broker.Connected(); !connected {
			if errOpen := broker.Open(prod.config); errOpen != nil {
				return false, errOpen
			}
		}
	}

	return true, nil
}

func (prod *Kafka) tryOpenConnection() bool {
	// Reconnect the client first
	if prod.client == nil {
		if client, err := kafka.NewClient(prod.servers, prod.config); err == nil {
			prod.client = client
		} else {
			prod.Logger.Error("Client initialization error:", err)
			return false // ### return, connection failed ###
		}
	}

	// Make sure we have a producer up and running
	if prod.producer == nil {
		if producer, err := kafka.NewAsyncProducerFromClient(prod.client); err == nil {
			prod.producer = producer
		} else {
			prod.Logger.Error("Producer initialization error:", err)
			return false // ### return, connection failed ###
		}
	}

	return true
}

func (prod *Kafka) closeConnection() {
	if prod.producer != nil {
		prod.producer.Close()
	}
	if prod.client != nil {
		prod.client.Close()
	}
}

func (prod *Kafka) close() {
	defer prod.WorkerDone()
	prod.DefaultClose()
	prod.closeConnection()
}

// Produce writes to a buffer that is sent to a given socket.
func (prod *Kafka) Produce(workers *sync.WaitGroup) {
	prod.AddMainWorker(workers)
	prod.tryOpenConnection()
	prod.TickerMessageControlLoop(prod.produceMessage, prod.config.Producer.Flush.Frequency, prod.pollResults)
}


text:
package spartan

import (
	termbox "github.com/nsf/termbox-go"
	"github.com/sparkymat/spartan/direction"
)

type Divider struct {
	View
	Direction direction.Type
}

func (d Divider) Draw(left uint32, top uint32, right uint32, bottom uint32) {
	if d.Direction == direction.Vertical {
		vertical := '\u2502'
		for i := top; i <= bottom; i++ {
			termbox.SetCell(int(left), int(i), vertical, d.ForegroundColor, d.BackgroundColor)
		}
	} else {
		horizontal := '\u2500'
		for i := left; i <= right; i++ {
			termbox.SetCell(int(i), int(top), horizontal, d.ForegroundColor, d.BackgroundColor)
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <gradient
        android:startColor="#99000000"
        android:centerColor="@android:color/transparent"
        android:endColor="#99000000"
        android:type="linear"
        android:angle="90"
        />
</shape>


text:
#include "ChipDeviceController-ScriptDevicePairingDelegate.h"
#include "lib/support/TypeTraits.h"

namespace chip {
namespace Controller {

void ScriptDevicePairingDelegate::SetKeyExchangeCallback(DevicePairingDelegate_OnPairingCompleteFunct callback)
{
    mOnPairingCompleteCallback = callback;
}

void ScriptDevicePairingDelegate::SetCommissioningCompleteCallback(DevicePairingDelegate_OnCommissioningCompleteFunct callback)
{
    mOnCommissioningCompleteCallback = callback;
}

void ScriptDevicePairingDelegate::SetCommissioningSuccessCallback(DevicePairingDelegate_OnCommissioningSuccessFunct callback)
{
    mOnCommissioningSuccessCallback = callback;
}

void ScriptDevicePairingDelegate::SetCommissioningFailureCallback(DevicePairingDelegate_OnCommissioningFailureFunct callback)
{
    mOnCommissioningFailureCallback = callback;
}

void ScriptDevicePairingDelegate::SetCommissioningStatusUpdateCallback(
    DevicePairingDelegate_OnCommissioningStatusUpdateFunct callback)
{
    mOnCommissioningStatusUpdateCallback = callback;
}

void ScriptDevicePairingDelegate::OnPairingComplete(CHIP_ERROR error)
{
    if (mOnPairingCompleteCallback != nullptr)
    {
        mOnPairingCompleteCallback(error.AsInteger());
    }
}

void ScriptDevicePairingDelegate::OnCommissioningComplete(NodeId nodeId, CHIP_ERROR error)
{
    if (mOnCommissioningCompleteCallback != nullptr)
    {
        mOnCommissioningCompleteCallback(nodeId, error.AsInteger());
    }
}

void ScriptDevicePairingDelegate::OnCommissioningSuccess(PeerId peerId)
{
    if (mOnCommissioningSuccessCallback != nullptr)
    {
        mOnCommissioningSuccessCallback(peerId);
    }
}

void ScriptDevicePairingDelegate::OnCommissioningFailure(PeerId peerId, CHIP_ERROR error, CommissioningStage stageFailed,
                                                         Optional<Credentials::AttestationVerificationResult> additionalErrorInfo)
{
    if (mOnCommissioningFailureCallback != nullptr)
    {
        mOnCommissioningFailureCallback(peerId, error, stageFailed, additionalErrorInfo);
    }
}

void ScriptDevicePairingDelegate::OnCommissioningStatusUpdate(PeerId peerId, CommissioningStage stageCompleted, CHIP_ERROR error)
{
    if (mOnCommissioningStatusUpdateCallback != nullptr)
    {
        mOnCommissioningStatusUpdateCallback(peerId, stageCompleted, error);
    }
}

} // namespace Controller
} // namespace chip


text:
namespace Microsoft.Exchange.WebServices.Data
{
    using System.Collections.ObjectModel;
    using System.IO;
    using System.Xml;

    /// <summary>
    /// Represents the response to a InstallApp operation.
    /// Today this class doesn't add extra functionality. Keep this class here so future
    /// we can return extension info up-on installation complete.
    /// </summary>
    internal sealed class InstallAppResponse : ServiceResponse
    {
        private bool? wasFirstInstall;

        /// <summary>
        /// Initializes a new instance of the <see cref="InstallAppResponse"/> class.
        /// </summary>
        public InstallAppResponse()
            : base()
        {
        }

        /// <summary>
        /// Reads response elements from XML.
        /// </summary>
        /// <param name="reader">The reader.</param>
        internal override void ReadElementsFromXml(EwsServiceXmlReader reader)
        {
            base.ReadElementsFromXml(reader);

            if (this.ErrorCode == ServiceError.NoError && reader.IsStartElement(XmlNamespace.NotSpecified, XmlElementNames.WasFirstInstall))
            {
                this.wasFirstInstall = reader.ReadElementValue<bool>(XmlNamespace.NotSpecified, XmlElementNames.WasFirstInstall);
            }
        }

        /// <summary>
        /// Was this first install
        /// </summary>
        public bool? WasFirstInstall
        {
            get { return this.WasFirstInstall; }
        }
    }
}


text:
<?php
/**
 * 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.
 *
 * @category    Phrozn
 * @package     Phrozn\Processor
 * @author      Victor Farazdagi
 * @license     http://www.apache.org/licenses/LICENSE-2.0
 */

namespace Phrozn\Processor;
use Phrozn\Autoloader as Loader,
    Phrozn\Path\Project as ProjectPath;

/**
 * Twig templates processor
 *
 * @category    Phrozn
 * @package     Phrozn\Processor
 * @author      Victor Farazdagi
 */
class Twig
    extends Base
    implements \Phrozn\Processor
{
    /**
     * Reference to twig engine environment object
     * @var \Twig_Environment
     */
    protected $twig;

    /**
     * Reference to twig current template loader
     *
     * @var \Twig_LoaderInterface
     */
    protected $loader;

    /**
     * If configuration options are passed then twig environment
     * is initialized right away
     *
     * @param array $options Processor options
     *
     * @return \Phrozn\Processor\Twig
     */
    public function __construct($options = array())
    {
        $path = Loader::getInstance()->getPath('library');

        if (count($options)) {
            $this->setConfig($options)
                 ->getEnvironment();
        }
    }

    /**
     * Parse the incoming template
     *
     * @param string $tpl Source template content
     * @param array $vars List of variables passed to template engine
     *
     * @return string Processed template
     */
    public function render($tpl, $vars = array())
    {
        return $this->getEnvironment()
                    ->loadTemplate($tpl)
                    ->render($vars);
    }

    /**
     * Get (init if necessary) twig environment
     *
     * @param boolean $reset Force re-initialization (helpful for UTs)
     *
     * @return \Twig_Environment
     */
    protected function getEnvironment($reset = false)
    {
        if ($reset === true || null === $this->twig) {
            $this->twig = new \Twig_Environment(
                $this->getLoader(), $this->getConfig());
            $this->twig->removeExtension('escaper');
        }

        return $this->twig;
    }

    /**
     * Get template loader chain
     *
     * @return \Twig_LoaderInterface
     */
    protected function getLoader()
    {
        $config = $this->getConfig();
        $chain = new \Twig_Loader_Chain();

        // use template's own directory to search for templates
        $paths = array($config['phr_template_dir']);

        // inject common paths
        $projectPath = new ProjectPath($config['phr_template_dir']);
        if ($projectPath = $projectPath->get()) {
            $paths[] = $projectPath . DIRECTORY_SEPARATOR . 'layouts';
            $paths[] = $projectPath;
        }
        $chain->addLoader(new \Twig_Loader_Filesystem($paths));

        // add string template loader, which is responsible for loading templates
        // and removing front-matter
        $chain->addLoader(new \Phrozn\Twig\Loader\String);

        return $chain;
    }

}


text:
import { createSelector } from "../../../angular-redux/createSelector"
import { edgeMetricDataSelector } from "./edgeMetricData.selector"

export const metricNamesSelector = createSelector([edgeMetricDataSelector], edgeMetricData => edgeMetricData.map(x => x.name))


text:
/** @file reutils.h
  * @brief Regular expression utilities.
  *
  * From a high level, this interface is used by doing the following.
  *  - (optional) translate Perl re modifiers to PCRE flags with
  *    crush_re_make_flags().
  *  - compile a PCRE matching regex with pcre_compile().
  *  - compile the substitution pattern using crush_resubst_compile().
  *  - perform substitutions using crush_re_substitute().
  *
  * Example:

#include <crush/reutils.h>

int main (int argc, char *argv[]) {
  char *str = argv[1];
  char *pattern = argv[2];
  char *subst = argv[3];

  char *subst_buffer = NULL;
  size_t subst_buffer_sz = 0;
  pcre *re;
  pcre_extra *re_extra;

  struct crush_resubst_elem *compiled_subst = NULL;
  size_t compiled_subst_sz = 0;
  int n_subst_elems = 0;

  int re_flags = 0;
  int subst_globally = 0;
  const char *re_error;
  int re_err_offset;

  if (argc > 4)
    re_flags = crush_re_make_flags(argv[4], &subst_globally);

  re = pcre_compile(pattern, re_flags, &re_error, &re_err_offset, NULL);
  if (! re) {
    fprintf(stderr, "re compile failed: %s\n", re_error);
    exit(1);
  }
  re_extra = pcre_study(re, 0, &re_error);

  n_subst_elems = crush_resubst_compile(subst, &compiled_subst,
                                        &compiled_subst_sz);

  if (crush_re_substitute(re, re_extra,
                          compiled_subst, n_subst_elems,
                          str, subst,
                          &subst_buffer, &subst_buffer_sz, subst_globally)) {
    printf("%s\n", subst_buffer);
  } else {
    fprintf(stderr, "substitution failed.\n");
    exit(1);
  }
  return 0;
}

 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifndef REUTILS_H
#define REUTILS_H

#if HAVE_PCRE_H && HAVE_LIBPCRE
#include <pcre.h>

/** @brief describes a part of a regex substitution.
  * Substitution strings are compiled down to a list of elements which are
  * either string literals or captured variable references.
  */
struct crush_resubst_elem {
  /** @brief what kind of thing this is. */
  enum { resubst_literal = 1,
         resubst_variable = 2 } elem_type;
  /** @brief for literals, a pointer into the substitution string where it
    * begins.  For variables, the captured number number. */
  union { char *begin;
          int variable_num; };
  /** @brief for literals only, how long the substring is. */
  size_t elem_len;
};

/** @brief compiles a substitution pattern.
  *
  * compiled_subst and compiled_subst_sz will be modified if they are NULL
  * or not large enough.
  *
  * @arg subst_pattern the string to substitute into a regex match.
  * @arg compiled_subst where the output should be stored.
  * @arg compiled_subst_sz how much memory is allocated to compiled_subst.
  */
int crush_resubst_compile(const char *subst_pattern,
                          struct crush_resubst_elem **compiled_subst,
                          size_t *compiled_subst_sz);

/** @brief translates Perl-style RE modifiers into PCRE flags.
  *
  * Global substitution is not a PCRE flag, so it is stored in a separate
  * variable.
  *
  * @arg modifiers Perl RE modifier string.
  * @arg global value is set to 1 if 'g' is one of the modifiers.
  *
  * @return flags which can be passed to pcre_compile().
  */
int crush_re_make_flags(const char const *modifiers, int *global);

/** @brief performs a regex substitution on a subject string.
  *
  * @arg re a compile match regular expression
  * @arg re_extra result of pcre_study() against re.
  * @arg compiled_subst result of crush_resubst_compile().
  * @arg n_subst_elems the number of elements in compiled_subst.
  * @arg subject the string to match against.
  * @arg substitution the substitution pattern string.
  * @arg target pointer to a dynamically-allocated buffer to hold the result of
  *             the substitution.
  * @arg target_sz pointer to the size of *target.
  * @arg subst_globally non-zero to perform global substitution.
  *
  * @return the target string, or NULL on error.
  */
char * crush_re_substitute(pcre *re, pcre_extra *re_extra,
                           struct crush_resubst_elem *compiled_subst,
                           size_t n_subst_elems,
                           const char *subject,
                           const char *substitution,
                           char **target, size_t *target_sz,
                           int subst_globally);

#endif /* HAVE_PCRE_H && HAVE_LIBPCRE */
#endif /* REUTILS_H */


text:
package com.vzome.core.algebra;

public class Vector3d
{
    final AlgebraicNumber a, b, c;

	public Vector3d( AlgebraicNumber a, AlgebraicNumber b, AlgebraicNumber c )
	{
		this .a = a;
		this .b = b;
		this .c = c;
	}

	public Vector3d( AlgebraicVector v )
	{
		this .a = v .getComponent( 0 );
		this .b = v .getComponent( 1 );
		this .c = v .getComponent( 2 );
	}

	public Bivector3d outer( Vector3d that )
	{
	    AlgebraicNumber a = this.a .times( that.b ) .minus( this.b .times( that.a ) );
	    AlgebraicNumber b = this.b .times( that.c ) .minus( this.c .times( that.b ) );
	    AlgebraicNumber c = this.c .times( that.a ) .minus( this.a .times( that.c ) );
		return new Bivector3d( a, b, c );
	}
}


text:
#include "ScreenshotHelper.h"

#include <dwmapi.h>

#include "Func/WinUtils.h"

namespace ScreenshotHelper {

std::vector<RECT> monitorsRects;

BOOL getActualWindowRect(HWND hWnd, RECT* res, bool maximizedFix) {
    BOOL isEnabled = false;
    if (S_OK == DwmIsCompositionEnabled(&isEnabled)) {
        if (isEnabled) {
            if (S_OK == DwmGetWindowAttribute(hWnd, DWMWA_EXTENDED_FRAME_BOUNDS, res, sizeof(RECT))) {
                /*if (maximizedFix)
                    *res = maximizedWindowFix(hWnd, *res);*/
                return TRUE;
            }

        }
    }

    return GetWindowRect(hWnd, res);
}

RECT maximizedWindowFix(HWND handle, RECT windowRect) {
    RECT res = windowRect;
    if (isWindowMaximized(handle)) {
        RECT screenRect = screenFromRectangle(windowRect);
        if (windowRect.left < screenRect.left) {
            windowRect.right -= (screenRect.left - windowRect.left) /** 2*/;
            windowRect.left = screenRect.left;
        }
        if (windowRect.top < screenRect.top) {
            windowRect.bottom -= (screenRect.top - windowRect.top) /** 2*/;
            windowRect.top = screenRect.top;
        }
        IntersectRect(&res, &windowRect, &screenRect);
        //  windowRect.Intersect(screenRect);
    }
    return res;
}

bool isWindowMaximized(HWND handle) {
    WINDOWPLACEMENT wp;
    memset(&wp, 0, sizeof(WINDOWPLACEMENT));
    wp.length = sizeof(WINDOWPLACEMENT);

    if (GetWindowPlacement(handle, &wp)) {
        return wp.showCmd == static_cast<UINT>(SW_MAXIMIZE);
    }
    return false;
}

RECT screenFromRectangle(RECT rc) {
    monitorsRects.clear();
    EnumDisplayMonitors(nullptr, nullptr, monitorEnumProc, 0);
    int max = 0;
    size_t iMax = 0;
    for (size_t i = 0; i < monitorsRects.size(); i++) {
        CRect Bounds = monitorsRects[i];
        Bounds.IntersectRect(&Bounds, &rc);
        if (Bounds.Width() * Bounds.Height() > max) {
            max = Bounds.Width() * Bounds.Height();
            iMax = i;
        }
        // result.UnionRect(result,Bounds);
    }
    return monitorsRects[iMax];
}

BOOL CALLBACK monitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData) {
    if (lprcMonitor) {
        monitorsRects.push_back(*lprcMonitor);
    }
    return TRUE;
}

HRGN getWindowRegion(HWND wnd) {
    RECT WndRect;
    getActualWindowRect(wnd, &WndRect);
    CRgn WindowRgn;
    WindowRgn.CreateRectRgnIndirect(&WndRect);
    if (::GetWindowRgn(wnd, WindowRgn) != ERROR) {
        // WindowRegion.GetRgnBox( &WindowRect);
        WindowRgn.OffsetRgn(WndRect.left, WndRect.top);
    }
    return WindowRgn.Detach();
}

HRGN getWindowVisibleRegion(HWND wnd) {
    CRgn winReg;
    CRect result;
    if (!(GetWindowLong(wnd, GWL_STYLE) & WS_CHILD)) {
        winReg = getWindowRegion(wnd);
        return winReg.Detach();
    }
    getActualWindowRect(wnd, &result);
    while (GetWindowLong(wnd, GWL_STYLE) & WS_CHILD) {
        wnd = GetParent(wnd);
        RECT rc;
        if (GetClientRect(wnd, &rc)) {
            MapWindowPoints(wnd, 0, reinterpret_cast<POINT*>(&rc), 2);
            // parentRgn.CreateRectRgnIndirect(&rc);
        }
        result.IntersectRect(&result, &rc);
    }
    winReg.CreateRectRgnIndirect(&result);
    return winReg.Detach();
}
}


text:
import os
import json
import yaml

import subprocess
from datadog import initialize, api

options = {
    'api_key': os.environ['DATADOG_API_KEY'],
    'app_key': os.environ['DATADOG_APP_KEY'],
}

initialize(**options)

repo_name = os.environ["REPO_NAME"]
print "Code stats for " + repo_name
cloc_output = subprocess.check_output("cloc code-repo --json", shell=True)

stats = json.loads(cloc_output)

del stats['header']

metrics = []

metric_name = 'codestat.' + repo_name
for lang in stats:
  if lang == 'SUM':
    continue
  for attr in stats[lang]:
    count = stats[lang].get(attr)
    metrics.append({'metric': metric_name, 'points': count, 'tags': [lang, attr], 'host': 'ci'})

pipelines_count = 0

total_params = {}
for dir, subdirs, files in os.walk('code-repo'):
  if 'pipeline.yml' in files:
    pipelines_count +=1
    try:
      params_file = open(os.path.join(dir, 'params.yml'))
      params = yaml.load(params_file)
      total_params.update(params)

      pipeline_name = dir[10:]  # strip 'code-repo/'
      metrics.append({'metric': metric_name + '.' + pipeline_name, 'points': len(params), 'tags': ['params'], 'host': 'ci'})
    except Exception, e:
      print e

metrics.append({'metric': metric_name + '.pipelines_total', 'points': pipelines_count, 'tags': [], 'host': 'ci'})
metrics.append({'metric': metric_name + '.params_total', 'points': len(total_params), 'tags': [], 'host': 'ci'})

api.Metric.send(metrics)

print "Total Pipelines: %i / Total params %i" % (pipelines_count, len(total_params))


text:
class TestConfig:
    def __init__(self):

        # Where the testsuite root is
        self.top = ''

        # Directories below which to look for test description files (foo.T)
        self.rootdirs = []

        # Run these tests only (run all tests if empty)
        self.only = []

        # Accept new output which differs from the sample?
        self.accept = 0

        # File in which to save the summary
        self.output_summary = ''

        # File in which to save the times
        self.times_file = ''

        # What platform are we running on?
        self.platform = ''

        # Verbosity level
        self.verbose = 1

        # run the "fast" version of the test suite
        self.fast = 0

        # Compiler type (ghc, hugs, nhc, etc.)
        self.compiler_type = ''

        # Path to the compiler
        self.compiler = ''

        # Compiler version info
        self.compiler_version = ''
        self.compiler_maj_version = ''
        self.compiler_tags = []

        # Flags we always give to this compiler
        self.compiler_always_flags = []

        # Which ways to run tests (when compiling and running respectively)
        # Other ways are added from the command line if we have the appropriate
        # libraries.
        self.compile_ways = []
        self.run_ways     = []
        self.other_ways   = []

        # The ways selected via the command line.
        self.cmdline_ways = []

        # Lists of flags for each way
        self.way_flags = {}
        self.way_rts_flags = {}

        # Do we have profiling support?
        self.have_profiling = False

        # Do we have UTF-8 support?
        self.have_utf8 = False

        # Do we have shared libraries?
        self.have_shared_libs = False

        # Are we testing an in-tree compiler?
        self.in_tree_compiler = True

        # the timeout program
        self.timeout_prog = ''
        self.timeout = 300

        # threads
        self.threads = 1
        self.use_threads = 0

global config
config = TestConfig()

def getConfig():
    return config

# -----------------------------------------------------------------------------
# Information about the current test run

class TestRun:
   def __init__(self):
       self.start_time = ''
       self.total_tests = 0
       self.total_test_cases = 0
       self.n_framework_failures = 0
       self.framework_failures = {}
       self.n_tests_skipped = 0
       self.tests_skipped = {}
       self.n_expected_passes = 0
       self.expected_passes = {}
       self.n_expected_failures = 0
       self.expected_failures = {}
       self.n_unexpected_passes = 0
       self.unexpected_passes = {}
       self.n_unexpected_failures = 0
       self.unexpected_failures = {}

global t
t = TestRun()

def getTestRun():
    return t

# -----------------------------------------------------------------------------
# Information about the current test

class TestOptions:
   def __init__(self):

       # if not None then we look for namebase.stderr etc rather than
       # using the test name
       self.with_namebase = None;

       # skip this test?
       self.skip = 0;

       # skip these ways
       self.omit_ways = []

       # skip all ways except these ([] == do all ways)
       self.only_ways = []

       # add these ways to the default set
       self.extra_ways = []

       # the result we normally expect for this test
       self.expect = 'pass'

       # override the expected result for certain ways
       self.expect_fail_for = []

       # the stdin file that this test will use (empty for <name>.stdin)
       self.stdin = ''

       # don't compare output
       self.ignore_output = 0

       # don't give anything as stdin
       self.no_stdin = 0

       # extra compiler opts for this test
       self.extra_hc_opts = ''

       # extra run opts for this test
       self.extra_run_opts = ''

       # expected exit code
       self.exit_code = 0

       # should we clean up after ourselves?
       self.cleanup = ''

       # extra files to clean afterward
       self.clean_files = []

       # should we run this test alone, i.e. not run it in parallel with
       # any other threads
       self.alone = 0

       # Command to run before the test
       self.pre_cmd = None

       # Command to run for extra cleaning
       self.clean_cmd = None

       # Prefix to put on the command before running it
       self.cmd_prefix = ''

       # Prefix to put on the command before compiling it
       self.compile_cmd_prefix = ''

       # Extra output normalisation
       self.extra_normaliser = lambda x: x

       # The directory the test is in
       self.testdir = '.'

# The default set of options
global default_testopts
default_testopts = TestOptions()


text:
'use strict';

const models = require('./index');

/**
 * Definition of the runbook type.
 *
 * @extends models['TrackedResource']
 */
class Runbook extends models['TrackedResource'] {
  /**
   * Create a Runbook.
   * @member {string} [runbookType] Gets or sets the type of the runbook.
   * Possible values include: 'Script', 'Graph', 'PowerShellWorkflow',
   * 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell'
   * @member {object} [publishContentLink] Gets or sets the published runbook
   * content link.
   * @member {string} [publishContentLink.uri] Gets or sets the uri of the
   * runbook content.
   * @member {object} [publishContentLink.contentHash] Gets or sets the hash.
   * @member {string} [publishContentLink.contentHash.algorithm] Gets or sets
   * the content hash algorithm used to hash the content.
   * @member {string} [publishContentLink.contentHash.value] Gets or sets
   * expected hash value of the content.
   * @member {string} [publishContentLink.version] Gets or sets the version of
   * the content.
   * @member {string} [state] Gets or sets the state of the runbook. Possible
   * values include: 'New', 'Edit', 'Published'
   * @member {boolean} [logVerbose] Gets or sets verbose log option.
   * @member {boolean} [logProgress] Gets or sets progress log option.
   * @member {number} [logActivityTrace] Gets or sets the option to log
   * activity trace of the runbook.
   * @member {number} [jobCount] Gets or sets the job count of the runbook.
   * @member {object} [parameters] Gets or sets the runbook parameters.
   * @member {array} [outputTypes] Gets or sets the runbook output types.
   * @member {object} [draft] Gets or sets the draft runbook properties.
   * @member {boolean} [draft.inEdit] Gets or sets whether runbook is in edit
   * mode.
   * @member {object} [draft.draftContentLink] Gets or sets the draft runbook
   * content link.
   * @member {string} [draft.draftContentLink.uri] Gets or sets the uri of the
   * runbook content.
   * @member {object} [draft.draftContentLink.contentHash] Gets or sets the
   * hash.
   * @member {string} [draft.draftContentLink.contentHash.algorithm] Gets or
   * sets the content hash algorithm used to hash the content.
   * @member {string} [draft.draftContentLink.contentHash.value] Gets or sets
   * expected hash value of the content.
   * @member {string} [draft.draftContentLink.version] Gets or sets the version
   * of the content.
   * @member {date} [draft.creationTime] Gets or sets the creation time of the
   * runbook draft.
   * @member {date} [draft.lastModifiedTime] Gets or sets the last modified
   * time of the runbook draft.
   * @member {object} [draft.parameters] Gets or sets the runbook draft
   * parameters.
   * @member {array} [draft.outputTypes] Gets or sets the runbook output types.
   * @member {string} [provisioningState] Gets or sets the provisioning state
   * of the runbook. Possible values include: 'Succeeded'
   * @member {string} [lastModifiedBy] Gets or sets the last modified by.
   * @member {date} [creationTime] Gets or sets the creation time.
   * @member {date} [lastModifiedTime] Gets or sets the last modified time.
   * @member {string} [description] Gets or sets the description.
   * @member {string} [etag] Gets or sets the etag of the resource.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Runbook
   *
   * @returns {object} metadata of Runbook
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Runbook',
      type: {
        name: 'Composite',
        className: 'Runbook',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          runbookType: {
            required: false,
            serializedName: 'properties.runbookType',
            type: {
              name: 'String'
            }
          },
          publishContentLink: {
            required: false,
            serializedName: 'properties.publishContentLink',
            type: {
              name: 'Composite',
              className: 'ContentLink'
            }
          },
          state: {
            required: false,
            serializedName: 'properties.state',
            type: {
              name: 'String'
            }
          },
          logVerbose: {
            required: false,
            serializedName: 'properties.logVerbose',
            type: {
              name: 'Boolean'
            }
          },
          logProgress: {
            required: false,
            serializedName: 'properties.logProgress',
            type: {
              name: 'Boolean'
            }
          },
          logActivityTrace: {
            required: false,
            serializedName: 'properties.logActivityTrace',
            type: {
              name: 'Number'
            }
          },
          jobCount: {
            required: false,
            serializedName: 'properties.jobCount',
            type: {
              name: 'Number'
            }
          },
          parameters: {
            required: false,
            serializedName: 'properties.parameters',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'RunbookParameterElementType',
                  type: {
                    name: 'Composite',
                    className: 'RunbookParameter'
                  }
              }
            }
          },
          outputTypes: {
            required: false,
            serializedName: 'properties.outputTypes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          draft: {
            required: false,
            serializedName: 'properties.draft',
            type: {
              name: 'Composite',
              className: 'RunbookDraft'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Succeeded' ]
            }
          },
          lastModifiedBy: {
            required: false,
            serializedName: 'properties.lastModifiedBy',
            type: {
              name: 'String'
            }
          },
          creationTime: {
            required: false,
            nullable: false,
            serializedName: 'properties.creationTime',
            type: {
              name: 'DateTime'
            }
          },
          lastModifiedTime: {
            required: false,
            nullable: false,
            serializedName: 'properties.lastModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Runbook;


text:
#ifndef ZENI_FILE_OPS_H
#define ZENI_FILE_OPS_H

#include <Zeni/Error.h>
#include <Zeni/Singleton.h>

#if defined(ANDROID)
#include <sys/types.h>
#include <android/asset_manager.h>
#include <android/asset_manager_jni.h>
#endif

namespace Zeni {

  class ZENI_DLL File_Ops;

#ifdef _WINDOWS
  ZENI_EXT template class ZENI_DLL Singleton<File_Ops>;
#endif

  class ZENI_DLL File_Ops : public Singleton<File_Ops> {
    friend class Singleton<File_Ops>;

    static File_Ops * create();

    File_Ops();
    ~File_Ops();

    // Undefined
    File_Ops(const File_Ops &);
    File_Ops & operator=(const File_Ops &);

  public:
#ifdef ANDROID
    static void init_AAssetManager(AAssetManager * const &asset_manager); ///< Initialize the AAssetManager
    static AAssetManager * const get_AAssetManager(); ///< Get the AAssetManager
#endif
    static FILE * get_asset_FILE(const String &filename, off_t * const &start = 0, off_t * const &length = 0); ///< Get a FILE * from an Asset
    static String & load_asset(String &memory, const String &filename); ///< Load a file into memory
    static const String & get_uniqname(); ///< Get the unique app identifier for the game, set in zenilib.xml
    const String & get_username(); ///< Get the logged-in user's username
    String get_appdata_path(); ///< Get the path that should be used for user-modifiable storage

    static bool create_directory(const String &directory_path); ///< Create a directory if it doesn't already exist; It is not considered an error if it already exists.
    static bool remove_directory(const String &directory_path); ///< Remove a directory if it exists; It is not considered an error if it does not exist.

    static bool file_exists(const String &file_path); ///< Test for the existence of a file
    static bool delete_file(const String &file_path); ///< Delete a file
    static bool copy_file(const String &from, const String &to); ///< Copy a file from one filepath to another

    // Can be called once only, and only before File_Ops is initialized; May throw File_Ops_Initialized
    static void preinit(const String &unique_app_identifier);

  private:
    static String & get_unique_app_identifier();

#ifdef ANDROID
    static AAssetManager * m_asset_manager;
#endif

    String m_username;
    String m_appdata_path;
  };

  ZENI_DLL File_Ops & get_File_Ops(); ///< Get access to the singleton.

  struct ZENI_DLL File_Ops_Init_Failure : public Error {
    File_Ops_Init_Failure() : Error("Zeni File_Ops Failed to Initialize Correctly") {}
  };

#ifdef ANDROID
  struct ZENI_DLL File_Ops_No_AAssetManager : public Error {
    File_Ops_No_AAssetManager() : Error("Zeni File_Ops No AAssetManager") {}
  };
#endif

  struct ZENI_DLL File_Ops_Asset_Load_Failure : public Error {
    File_Ops_Asset_Load_Failure() : Error("Zeni File_Ops Failed to Load Asset") {}
  };

  struct ZENI_DLL File_Ops_Initialized : public Error {
    File_Ops_Initialized() : Error("Zeni File_Ops Already Initialized") {}
  };

}

#endif


text:
import type { Observable } from '../../Rx';

export const asObservable = function<T>(): Observable<T> {
  (this: Observable<T>)

  return {
    subscribe: this.subscribe,
  };
};


text:
import time
from openerp.osv import osv
from openerp.report import report_sxw

class pos_user_product(report_sxw.rml_parse):

    def __init__(self, cr, uid, name, context):
        super(pos_user_product, self).__init__(cr, uid, name, context)
        self.localcontext.update({
            'time': time,
            'get_data':self._get_data,
            'get_user':self._get_user,
            'get_total':self._get_total,

        })

    def _get_data(self, o):
        self.total = 0.0
        data={}
        sql1=""" SELECT distinct(o.id) from account_bank_statement s, account_bank_statement_line l,pos_order o,pos_order_line i where  i.order_id=o.id and o.state='paid' and l.statement_id=s.id and l.pos_statement_id=o.id and s.id=%d"""%(o.id)
        self.cr.execute(sql1)
        data = self.cr.dictfetchall()
        a_l=[]
        for r in data:
            a_l.append(r['id'])
        if len(a_l):
            sql2="""SELECT sum(qty) as qty,l.price_unit*sum(l.qty) as amt,t.name as name, p.default_code as code, pu.name as uom from product_product p, product_template t,product_uom pu,pos_order_line l where order_id = %d and p.product_tmpl_id=t.id and l.product_id=p.id and pu.id=t.uom_id group by t.name,p.default_code,pu.name,l.price_unit"""%(o.id)
            self.cr.execute(sql2)
            data = self.cr.dictfetchall()
        for d in data:
            self.total += d['amt']
        return data

    def _get_user(self, object):
        names = []
        users_obj = self.pool['res.users']
        for o in object:
            sql = """select ru.id from account_bank_statement as abs,res_users ru
                                    where abs.user_id = ru.id
                                    and abs.id = %d"""%(o.id)
            self.cr.execute(sql)
            data = self.cr.fetchone()
            if data:
                user = users_obj.browse(self.cr, self.uid, data[0])
                names.append(user.partner_id.name)
        return list(set(names))

    def _get_total(self, o):
        return self.total

class report_pos_user_product(osv.AbstractModel):
    _name = 'report.point_of_sale.report_usersproduct'
    _inherit = 'report.abstract_report'
    _template = 'point_of_sale.report_usersproduct'
    _wrapped_report_class = pos_user_product

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:


text:
import sys
sys.path.append('/home/jwalker/dynamics/python/atmos-tools')
sys.path.append('/home/jwalker/dynamics/python/atmos-read')

import os
import numpy as np
import matplotlib.pyplot as plt
import merra
import atmos as atm
from merra import load_daily_season

datadir = '/home/jwalker/datastore/merra/daily/'
savedir = datadir
#plev = 200
plev = 850
varnm = 'T'
years = np.arange(1979, 2015)
season = 'ann'
lon1, lon2 = 40, 120
lat1, lat2 = -60, 60
nperday = 8

def pathstr(var, plev):
    return datadir + 'merra_' + var + str(plev) + '_'

def outfile(year, var, plev):
    lats = atm.latlon_labels([lat1, lat2], 'lat', '%.0f', deg_symbol=False)
    lons = atm.latlon_labels([lon1, lon2], 'lon', '%.0f', deg_symbol=False)
    subset = '%s-%s_%s-%s' % (lons[0], lons[1], lats[0], lats[1])
    return datadir + 'merra_%s%d_%s_%d.nc' % (var, plev, subset, year)

for year in years:
    print('Loading data')
    data = load_daily_season(pathstr(varnm, plev), year, season, varnm,
                             lat1, lat2, lon1, lon2)

    print('Calculating daily means from 3-hourly data')
    days = np.arange(1, data.shape[0]/nperday + 1)
    data = atm.daily_from_subdaily(data, nperday, dayname='Day', dayvals=days)

    savefile = outfile(year, varnm, plev)
    print('Saving to ' + savefile)
    atm.save_nc(savefile, data)


text:
function isMultiline (val) {
  return (typeof val === 'string' && val.indexOf('\n') > 0);
}

module.exports = function convertDocToArchie (doc) {
  const lines = Object.keys(doc).map(function (key) {
    // ignore reserved keys
    if (key[0] === '_') { return; }

    let val = doc[key];
    if (isMultiline(val)) {
      return key + ': ' + val + '\n:end';
    }
    else {
      return key + ': ' + val;
    }
  });

  return lines.filter(Boolean).join('\n');
};


text:
yum -y install xmlstarlet
yum -y install nc


text:
import { toSignedNumber } from '@kjirou/utils';
import { last } from 'lodash';
import { alterTransition, generateTransition, totalDurations } from 'react-flip-book';

export const EFFECT_ANIMATIONS = {
  crossed_slash: [
    { duration: 50, flipIconId: 'red_slash_1' },
    { duration: 100, flipIconId: 'red_slash_2' },
    { duration: 50, flipIconId: 'red_slash_1' },
    { duration: 50, flipIconId: null },
    { duration: 50, flipIconId: 'reversed_red_slash_1' },
    { duration: 100, flipIconId: 'reversed_red_slash_2' },
    { duration: 50, flipIconId: 'reversed_red_slash_1' },
  ],
  slash: [
    { duration: 50, flipIconId: 'red_slash_1' },
    { duration: 100, flipIconId: 'red_slash_2' },
    { duration: 50, flipIconId: 'red_slash_1' },
  ],
};

const _getEffectAnimationOrError = (animationType) => {
  const animation = EFFECT_ANIMATIONS[animationType];
  if (!animation) {
    throw new Error(`${animationType} is invalid animationType`);
  }
  return animation;
};

export const generateAnimatedIconTransition = (defaultProps, animationType, options = {}) => {
  options = Object.assign({
    delay: null,
    hpDelta: 0,
  }, options);

  const transitionSource = [];

  if (options.delay !== null) {
    transitionSource.unshift({ duration: options.delay });
  }

  const effectAnimation = _getEffectAnimationOrError(animationType);
  transitionSource.push(...effectAnimation);

  let transition = generateTransition(defaultProps, transitionSource);

  // Display damaging/healing text over the tail of the effect animation
  if (options.hpDelta) {
    const durationUntilNow = totalDurations(transition);
    const overlappingDuration = Math.min(50, durationUntilNow);
    const hpDeltaDuration = 500;
    transition = alterTransition(transition, [{
      keyframe: durationUntilNow - overlappingDuration,
      text: toSignedNumber(options.hpDelta),
      textClassNames: ['text-hp-delta'],
    }]);
    const lastTransition = generateTransition(last(transition), [{
      duration: hpDeltaDuration - overlappingDuration,
      flipIconId: null,
    }]);
    transition.push(...lastTransition);
  }

  return transition;
};


text:
'''
	This script is used to operate unicode characters

	Created by Mei Xiao? Kenneth?
'''
import re
import codecs
class UnicodeOps(object):

	def __init__(self,logger,puncfname):
		self.logger = logger
		self.puncfname = puncfname
		self.logger.debug("Unicode Operation Init...")
		self.puncs = None

	def getAllPuncs(self):
		'''
			full set of puncs, Notice:return a set
		'''

		if self.puncs != None:
			return list(self.puncs.keys())

		f = codecs.open(self.puncfname,"r",encoding='utf8')
		self.puncs={}
		for line in f:
			line = line.strip()
			lineA = re.split("[ \t]+",line)
			if lineA[0] in self.puncs:
				self.logger.error("Duplicated puncs:%s,IGNORE!" % lineA[0])
			else:
				self.puncs[lineA[0]] = lineA[2]
		f.close()
		self.logger.debug("There are %d puncs in file" % len(self.puncs))
		return list(self.puncs.keys())

	def getPuncMap(self):
		if self.puncs == None:
			self.getAllPuncs()
		return self.puncs

	def getSentenceDelimiter(self):
		return ['\u3002','\uff01','\uff1f']   #see http://www.unicode.org/charts/PDF/U3000.pdf,http://www.unicode.org/charts/PDF/UFF00.pdf

	def getSentenceDefaultDelimiter(self):
		return '\u3002'

	def getSkipCodes(self):
		return re.compile(r"[\r\n]")

	def getAlphabets(self):
		'''
			full width & half width alphabets
		'''
		return re.compile(r"([a-zA-Z\uFF21-\uFF3A\uFF41-\uFF5A]+)")

	def getNumbers(self):
		'''
			full width & half width Numbers
		'''
		return re.compile(r"([0-9\uFF10-\uFF19]+)")

	def getMNC(self):
		'''
			get Chinese Characters, we use 4E00 - 9FA5 now, and it can be extended easily in this function
			see http://www.unicode.org/charts/PDF/U4E00.pdf
		'''
		return re.compile(r"([\u4E00-\u9FA5]+)")

	def isChinese(self, c):
		try:
			x = ord(c)
		except:
		    return False

		# CJK Unified Ideographs
		if x >= 0x4e00 and x <= 0x9fbb:
			return True

		# CJK Compatibility Ideographs
		elif x >= 0xf900 and x <= 0xfad9:
			return True

		# CJK Unified Ideographs Extension A
		elif x >= 0x3400 and x <= 0x4dbf:
			return True

		# CJK Unified Ideographs Extension B
		elif x >= 0x20000 and x <= 0x2a6d6:
			return True

		# CJK Unified Ideographs Extension C+D+E
		elif x >= 0x2a700 and x <= 0x2ceaf:
			return True

		# CJK Compatibility Supplement
		elif x >= 0x2f800 and x <= 0x2fa1d:
			return True

		#add more characters for SHC
		elif x == 0x20c8e:

			return True
		else:
			return False


text:
import React from 'react';
import s from './TextField.css';
class TextField extends React.Component {
    componentDidMount(){
        componentHandler.upgradeDom();
    }

  render() {

    return (

    {this.props.label}
    <input  onChange={this.props.onChange} type={this.props.inputType} className={`mdl-textfield__input ${s.input}`} id={this.props.id} />

    )
  }
}

TextField.defaultProps = {
  inputType: 'text'
};

TextField.propTypes = {
    id: React.PropTypes.string,
    label: React.PropTypes.string,
    inputType: React.PropTypes.string
}

export default TextField;


text:
#ifdef TIMER
#if defined(__MICROBLAZE__) || defined(__PPC__)
#	include <xtmrctr.h>
#	define MAX_LOG 40
/*
 * Xilinx EDK environment doesn't provide strings.h which has the prototyp declaration of bzero().
 * We don't know the reason.
 */
extern void bzero (void *__s, size_t __n);

void Timer_Initialize();
void Timer(u8* String);
void Timer_Start(u8 id);
void Timer_End(u8 id, u8* String);
void Show_Log();
#endif	/* (__MICROBLASE__) || (__PPC__) */
#else
#define Timer_Initialize()		(0)
#define Timer(x)				(0)
#define Timer_Start(x)			(0)
#define Timer_End(x,y)			(0)
#define Show_Log()
#endif	/* TIMER */


text:
#import "ANLogManager.h"

#import <Foundation/Foundation.h>

#define AN_DEBUG_MODE                1

extern NSString *const kANLoggingNotification;
extern NSString *const kANLogMessageKey;
extern NSString *const kANLogMessageLevelKey;

void notifyListener(NSString *message, NSInteger messageLevel);

#if AN_DEBUG_MODE

void _ANLog(ANLogLevel level, NSString *levelString, char const *logContext, NSString *format, ...)  NS_FORMAT_FUNCTION(4, 5);
#define ANLogMark()             _ANLog(ANLogLevelTrace, @"MARK",    __PRETTY_FUNCTION__, @"")
#define ANLogMarkMessage(...)   _ANLog(ANLogLevelTrace, @"MARK",    __PRETTY_FUNCTION__, __VA_ARGS__)
#define ANLogTrace(...)         _ANLog(ANLogLevelTrace, @"TRACE",   __PRETTY_FUNCTION__, __VA_ARGS__)
#define ANLogDebug(...)         _ANLog(ANLogLevelDebug, @"DEBUG",   __PRETTY_FUNCTION__, __VA_ARGS__)
#define ANLogInfo(...)          _ANLog(ANLogLevelInfo,  @"INFO",    __PRETTY_FUNCTION__, __VA_ARGS__)
#define ANLogWarn(...)          _ANLog(ANLogLevelWarn,  @"WARNING", __PRETTY_FUNCTION__, __VA_ARGS__)
#define ANLogError(...)         _ANLog(ANLogLevelError, @"ERROR",   __PRETTY_FUNCTION__, __VA_ARGS__)

#else

#define ANLogMark() {}
#define ANLogMarkMessage(...) {}
#define ANLogTrace(...) {}
#define ANLogDebug(...) {}
#define ANLogInfo(...) {}
#define ANLogWarn(...) {}
#define ANLogError(...) {}

#endif


text:
<?xml version='1.0' encoding='UTF-8'?>
<!--
  ~ Copyright 2017 Red Hat, Inc, and individual contributors.
  ~
  ~ 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.
  -->

<!--  See src/resources/configuration/ReadMe.txt for how the configuration assembly works -->
<config>
    <subsystems>
    </subsystems>
</config>


text:
'use strict';

var React = require('react-native');

var {
  ActivityIndicatorIOS,
  AppRegistry,
  AlertIOS,
  Image,
  ListView,
  StyleSheet,
  Text,
  TouchableHighlight,
  View,
  Navigator,
  PixelRatio
} = React;

var ActionSheetIOS = require('ActionSheetIOS');

var reloadApp = require('../Utilities/reloadApp');
var Api = require("../Api/Core");
var NoResults = require('../Components/NoResults');
var generateAppURL = require('../Utilities/generateAppURL');

var AppList = React.createClass({
  getInitialState() {
    return {
      page: 1,
      data: [],
      hasError: false,
      dataSource: new ListView.DataSource({
        rowHasChanged: (row1, row2) => row1 !== row2,
      }),
    };
  },

  componentDidMount() {
    this.fetchApps();
  },

  componentDidUpdate: function(prevProps) {
    if (prevProps.url !== this.props.url) {
      this.setState({ hasError: false, loaded: false, page: 1, data: [] });
      this.fetchApps();
    }
  },

  fetchApps(page = 1) {
    if (!this.requestInFlight) {
      this.requestInFlight = true;
      var separator = this.props.url.indexOf('?') !== -1 ?
        '&' :
        '?';
      var url = `${this.props.url}${separator}page=${page}`;
      console.log(page);

      Api.get(url)
        .then((data) => {
          if (data.error) {
            // TODO: check for 401 Unauthorized
            if (Navigator.getContext(this)) {
              Navigator.getContext(this).replace({id: "login", error: data.error});
            }
            return;
          }

          var newData = this.state.data.concat(data);

          this.setState({
            data: newData,
            dataSource: this.state.dataSource.cloneWithRows(newData),
            loaded: true,
            hasError: false
          });
        })
        .catch((e) => {
          this.setState({hasError: true});
          this.requestInFlight = false;
        })
        .finally(() => {
          this.requestInFlight = false;
        })
        .done();
    }
  },

  _handleEndReached() {
    var nextPage = this.state.page += 1;
    this.setState({ page: nextPage });
    this.fetchApps(nextPage);
  },

  renderAppList() {
    return (
      <View style={styles.container}>
        <ListView
          dataSource={this.state.dataSource}
          renderRow={this.renderApp}
          initialPageSize={10}
          pageSize={5}
          onEndReachedThreshold={1200}
          onEndReached={this._handleEndReached}
          style={styles.listView} />
      </View>
    );
  },

  renderCreator(app) {
    if (app.creator && !this.props.hideCreator) {
      var avatarUrl = 'https://rnplay.org/' + app.creator.avatar_url + "?v=1";

      return (
        <View style={styles.creator}>
          <Image style={styles.avatar} resizeMode="contain" source={{uri: avatarUrl}} />
          <Text style={styles.username} numberOfLines={1}>{app.creator.username || 'guest'}</Text>
        </View>
      )
    }
  },

  shareApp(app) {
    var url = 'https://rnplay.org/apps/' + app.url_token;
    var message = '"' + (app.name || app.module_name) + '" on rnplay.org';

    ActionSheetIOS.showShareActionSheetWithOptions(
      {url: url, message: message},
      (error) => console.log(error),
      (success) => console.log(success)
    );
  },

  renderApp(app) {
    return (
      <View style={{marginBottom: 15}}>
        <TouchableHighlight underlayColor="#F5F5F5" onLongPress={() => this.shareApp(app)}
                                                    onPress={() => this.selectApp(app)}>
          <View style={styles.appContainer}>
            <View style={styles.appTextDescription}>
              <Text style={styles.appTitle} numberOfLines={1}>{app.name || app.module_name}</Text>
              <View style={styles.targetBuild}>
                <Text style={styles.targetBuildText}>Targets <Text>{app.build_name}</Text></Text>
              </View>

              <View style={styles.viewCount}>
                <Text style={styles.viewCountText}>{app.view_count} <Text>views</Text></Text>
              </View>
            </View>

            { this.renderCreator(app) }
          </View>
        </TouchableHighlight>
      </View>
    );
  },

  selectApp(app) {
    Api.post("/apps/"+app.url_token+"/view.json");
    reloadApp(generateAppURL(app), app.module_name, app.name);
  },

  renderLoading() {
    return (
      <View style={styles.loadingContainer}>
        <ActivityIndicatorIOS color={'#712FA9'} style={styles.spinner} size="large" />
      </View>
    );
  },

  renderNoResults() {
    return(
      <NoResults />
    );
  },

  renderRetry() {
    return (
      <View style={styles.retryButtonWrapper}>
        <Image source={require("image!network_error")} style={{opacity: 0.9, marginBottom: 30}} />
        <TouchableHighlight
          style={styles.retryButtonHighlight}
          onPress={() => this.fetchApps()}>
          <View style={styles.retryButtonView}>
            <Text style={styles.retryButtonText}>Connection failed. Retry?</Text>
          </View>
        </TouchableHighlight>
      </View>
    );
  },

  render() {
    if (!this.state.loaded && !this.state.hasError) {
      return this.renderLoading();
    } else if (this.state.hasError && !this.state.data.length) {
      return this.renderRetry();
    } else {
      if (this.state.dataSource.getRowCount() > 0) {
        return this.renderAppList();
      }
      else {
        return this.renderNoResults();
      }
    }
  }
});

var deviceWidth = require('Dimensions').get('window').width;

var styles = StyleSheet.create({
  retryButtonWrapper: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    paddingBottom: 80,
  },

  retryButtonHighlight: {
    borderRadius: 7,
    overflow: 'hidden',
  },

  retryButtonView: {
    height: 40,
    backgroundColor:'#712FA9',
  },

  retryButtonText: {
    padding:10,
    paddingLeft: 20,
    paddingRight: 20,
    color:'#fff',
    textAlign:'center',
    fontWeight:'700'
  },

  listView: {
    marginTop: -9,
    paddingTop: 0,
  },

  container: {
    flex: 1,
    backgroundColor: 'transparent',
  },

  loadingContainer: {
    flex: 1,
    paddingBottom: 80,
    alignItems: 'center'
  },

  appContainer: {
    overflow: 'hidden',
    marginTop: -18,
    flexDirection: 'row',
    flex: 1,
    paddingBottom: 8,
    paddingTop: 15,
    borderBottomWidth: 3 / PixelRatio.get(),
    borderBottomColor: "#eee"
  },

  appTextDescription: {
    flexDirection: 'column',
    marginLeft: 10,
  },

  targetBuild: {
    opacity: 0.4,
    paddingBottom: 2,
  },

  viewCount: {
    opacity: 0.4,
  },

  targetBuildText: {
    fontSize: 12,
    fontFamily: 'Avenir Next',
  },

  viewCountText: {
    fontSize: 12,
    fontFamily: 'Avenir Next',
  },

  creator: {
    position: 'absolute',
    right: 0,
    width: 70,
    flexDirection: 'column',
    justifyContent: 'center',
    alignItems: 'center',
  },

  username: {
    fontSize: 11,
    opacity: 0.4,
    width: 50,
    textAlign: 'center',
  },

  avatar: {
    width: 30,
    height: 30,
    marginBottom: 5,
    borderRadius: 15,
    backgroundColor: "#000"
  },

  cancelButton: {
    color: '#fff',
    flex: 1,
    fontSize: 25,
    marginLeft: 20
  },

  appTitle: {
    fontSize: 18,
    fontFamily: 'Avenir Next',
    color: '#712FA9',
    width: deviceWidth - 70,
    flex: 1,
  },

  spinner: {
    flex: 1,
  },
});

module.exports = AppList;


text:
pymatgen.io.qchem.utils module
==============================

.. automodule:: pymatgen.io.qchem.utils
    :members:
    :undoc-members:
    :show-inheritance:


text:
exports.definition = {
	config: {
		columns: {
		    "id": "INTEGER",
		    "agency": "TEXT",
		    "representative": "TEXT",
		    "tel1": "TEXT",
		    "tel2": "TEXT",
		    "mail": "TEXT",
		    "url": "TEXT",
		    "image": "BLOB",
		    "memo": "TEXT",
		    "prior": "boolean",
		    "agencyCode": "TEXT",
		    "updateDate": "TEXT",
		    "newOkuraNo": "TEXT"
		},
		adapter: {
			type: "sql",
			collection_name: "agency"
		}
	},
	extendModel: function(Model) {
		_.extend(Model.prototype, {
			// extended functions and properties go here
		});

		return Model;
	},
	extendCollection: function(Collection) {
		_.extend(Collection.prototype, {
			// extended functions and properties go here
		});

		return Collection;
	}
};


text:
{% extends "notifications/notification.html" %}

{% block subject %}{{subject}}{% endblock %}
{% block email %}{{content}}{% endblock %}
{% block text %}

You have received an email: {{subject}}

{% endblock %}


text:
package com.microsoft.azure.management.containerservice.v2020_09_01;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * A Kubernetes add-on profile for a managed cluster.
 */
public class ManagedClusterAddonProfile {
    /**
     * Whether the add-on is enabled or not.
     */
    @JsonProperty(value = "enabled", required = true)
    private boolean enabled;

    /**
     * Key-value pairs for configuring an add-on.
     */
    @JsonProperty(value = "config")
    private Map<String, String> config;

    /**
     * Information of user assigned identity used by this add-on.
     */
    @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY)
    private ManagedClusterAddonProfileIdentity identity;

    /**
     * Get whether the add-on is enabled or not.
     *
     * @return the enabled value
     */
    public boolean enabled() {
        return this.enabled;
    }

    /**
     * Set whether the add-on is enabled or not.
     *
     * @param enabled the enabled value to set
     * @return the ManagedClusterAddonProfile object itself.
     */
    public ManagedClusterAddonProfile withEnabled(boolean enabled) {
        this.enabled = enabled;
        return this;
    }

    /**
     * Get key-value pairs for configuring an add-on.
     *
     * @return the config value
     */
    public Map<String, String> config() {
        return this.config;
    }

    /**
     * Set key-value pairs for configuring an add-on.
     *
     * @param config the config value to set
     * @return the ManagedClusterAddonProfile object itself.
     */
    public ManagedClusterAddonProfile withConfig(Map<String, String> config) {
        this.config = config;
        return this;
    }

    /**
     * Get information of user assigned identity used by this add-on.
     *
     * @return the identity value
     */
    public ManagedClusterAddonProfileIdentity identity() {
        return this.identity;
    }

}


text:
title: Symbol.getName - aesi-eclipse
---

[aesi-eclipse](../../index.html) / [com.virtlink.aesi.structureoutline](../index.html) / [Symbol](index.html) / [getName](.)

# getName

`open fun getName(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)


text:
package lonefly.game.engine.environment;

/*
 * Author: Rice Shelley
 * Version: 3/19/2016
 * Purpose: to store a point on a 2D grid implements coordinate
 */

public class Point implements Coordinate {

	private double x;
	private double y;

	public Point(double x, double y) {
		this.x = x;
		this.y = y;
	}

	public double[] getPointD() {
		double[] point = { x, y };
		return point;
	}

	public int[] getPointI() {
		int[] point = { (int) x, (int) y };
		return point;
	}

	@Override
	public float getX() {
		return (float) x;
	}

	@Override
	public float getY() {
		return (float) y;
	}

	@Override
	public void setX(float x) {
		this.x = x;
	}

	@Override
	public void setY(float y) {
		this.y = y;
	}

	@Override
	public String toString() {
		return "Point X: " + x + " Y: " + y;
	}
}


text:
namespace onnxruntime {
namespace contrib {
namespace cuda {

ONNX_OPERATOR_KERNEL_EX(BitmaskDropout, kMSDomain, 1, kCudaExecutionProvider,
                        (*KernelDefBuilder::Create())
                            .TypeConstraint("T", BuildKernelDefConstraints<MLFloat16, float, double, BFloat16>())
                            .TypeConstraint("T1", BuildKernelDefConstraints<MLFloat16, float, double, BFloat16>())
                            .TypeConstraint("T2", DataTypeImpl::GetTensorType<bool>())
                            .TypeConstraint("T3", DataTypeImpl::GetTensorType<onnxruntime::cuda::BitmaskElementType>())
                            .InputMemoryType(OrtMemTypeCPUInput, 1)
                            .InputMemoryType(OrtMemTypeCPUInput, 2),
                        onnxruntime::cuda::Dropout<true>);

}  // namespace cuda
}  // namespace contrib
}  // namespace onnxruntime


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

<!--

  Copyright 2003 - 2015 The eFaps Team

  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.

-->

<ui-menu xmlns="http://www.efaps.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.efaps.org/xsd http://www.efaps.org/xsd/eFaps_1.0.xsd">
    <uuid>1f64d98c-eb58-421d-adb5-e2da34ff49d4</uuid>
    <file-application>eFapsApp-Sales</file-application>
    <definition>
        <version-expression>(version==latest)</version-expression>
        <name>Sales_ReminderTree</name>
        <target>
            <menu>Sales_ReminderTree_Menu</menu>
            <form>Sales_ReminderForm</form>
        </target>
        <type>Sales_Reminder</type>
        <childs>
            <child>Sales_ReminderTree_Payment</child>
            <child>Sales_ReminderTree_PaymentAnalysis</child>
            <child>Sales_ReminderTree_Position</child>
            <child>Sales_ReminderTree_Doc</child>
        </childs>
        <property name="Target">content</property>
        <property name="TargetMode">view</property>
    </definition>
</ui-menu>


text:
import time

import tensorflow as tf
import tensorflow.contrib.slim as slim

def dcgan_train_step(sess, train_ops, global_step, train_step_kwargs):
  """Function that takes a gradient step and specifies whether to stop.

  Args:
    sess: The current session.
    train_ops: An `Operation` list that evaluates the gradients and returns the
      total loss for generator and for discriminator.
    global_step: A `Tensor` list representing the global training step of
      generator and discriminator respectively.
    train_step_kwargs: A dictionary of keyword arguments.

  Returns:
    The generator loss, discriminator loss and a boolean indicating whether or
    not to stop training.

  Raises:
    ValueError: if 'should_trace' is in `train_step_kwargs` but `logdir` is not.
  """
  start_time = time.time()
  assert(slim.get_global_step() == global_step)
  trace_run_options = None
  run_metadata = None
  if 'should_trace' in train_step_kwargs:
    if 'logdir' not in train_step_kwargs:
      raise ValueError('logdir must be present in train_step_kwargs when '
                       'should_trace is present')
    if sess.run(train_step_kwargs['should_trace']):
      trace_run_options = config_pb2.RunOptions(
          trace_level=config_pb2.RunOptions.FULL_TRACE)
      run_metadata = config_pb2.RunMetadata()

  generator_train_op = train_ops[0]
  discriminator_train_op = train_ops[1]
  global_step_train_op = train_ops[2]
  generator_global_step = train_step_kwargs['g']
  discriminator_global_step = train_step_kwargs['d']
  dis_g, dis_d = sess.run([tf.get_default_graph().get_tensor_by_name('Discriminator/Sigmoid:0'), tf.get_default_graph().get_tensor_by_name('Discriminator_1/Sigmoid:0')])
  #dis_g1, dis_d1 = tf.get_default_graph().get_tensor_by_name('Discriminator/conv2d1/Maximum:0'), tf.get_default_graph().get_tensor_by_name('Discriminator_1/conv2d1/Maximum:0')
  #dis_g2, dis_d2 = tf.get_default_graph().get_tensor_by_name('Discriminator/conv2d2/Maximum:0'), tf.get_default_graph().get_tensor_by_name('Discriminator_1/conv2d2/Maximum:0')
  #dis_g3, dis_d3 = tf.get_default_graph().get_tensor_by_name('Discriminator/conv2d3/Maximum:0'), tf.get_default_graph().get_tensor_by_name('Discriminator_1/conv2d3/Maximum:0')
  #dis_g4, dis_d4 = tf.get_default_graph().get_tensor_by_name('Discriminator/conv2d4/Maximum:0'), tf.get_default_graph().get_tensor_by_name('Discriminator_1/conv2d4/Maximum:0')
  print(dis_g)
  print(dis_d)

  # Discriminator step
  discriminator_loss, np_discriminator_global_step = sess.run([discriminator_train_op, discriminator_global_step],
                                                              options=trace_run_options,
                                                              run_metadata=run_metadata)
  # One more generator step
  #generator_loss, np_generator_global_step = sess.run([generator_train_op, generator_global_step],
  #                                                    options=trace_run_options,
  #                                                    run_metadata=run_metadata)
  # Generator step
  generator_loss, np_generator_global_step = sess.run([generator_train_op, generator_global_step],
                                                      options=trace_run_options,
                                                      run_metadata=run_metadata)
  # Increase global_step
  np_global_step = sess.run(global_step_train_op)

  time_elapsed = time.time() - start_time
  total_loss = generator_loss + discriminator_loss

  if run_metadata is not None:
    tl = timeline.Timeline(run_metadata.step_stats)
    trace = tl.generate_chrome_trace_format()
    trace_filename = os.path.join(train_step_kwargs['logdir'],
                                  'tf_trace-%d.json' % np_global_step)
    tf.logging.info('Writing trace to %s', trace_filename)
    file_io.write_string_to_file(trace_filename, trace)
    if 'summary_writer' in train_step_kwargs:
      train_step_kwargs['summary_writer'].add_run_metadata(run_metadata,
                                                           'run_metadata-%d' %
                                                           np_global_step)

  if 'should_log' in train_step_kwargs:
    if sess.run(train_step_kwargs['should_log']):
      tf.logging.info('global step %d: loss = %.4f g_step = %d g_loss = %.4f d_step = %d d_loss = %.4f (%.3f sec/step)',
                     np_global_step, total_loss, np_generator_global_step, generator_loss, np_discriminator_global_step, discriminator_loss, time_elapsed)
  # TODO(nsilberman): figure out why we can't put this into sess.run. The
  # issue right now is that the stop check depends on the global step. The
  # increment of global step often happens via the train op, which used
  # created using optimizer.apply_gradients.
  #
  # Since running `train_op` causes the global step to be incremented, one
  # would expected that using a control dependency would allow the
  # should_stop check to be run in the same session.run call:
  #
  #   with ops.control_dependencies([train_op]):
  #     should_stop_op = ...
  #
  # However, this actually seems not to work on certain platforms.
  if 'should_stop' in train_step_kwargs:
    should_stop = sess.run(train_step_kwargs['should_stop'])
  else:
    should_stop = False

  return total_loss, should_stop


text:
package term

import "golang.org/x/sys/unix"

// IsTty returns true if the given file descriptor is a terminal.
func IsTty(fd uintptr) bool {
	_, err := unix.IoctlGetTermios(int(fd), unix.TCGETA)
	return err == nil
}


text:
import React from 'react';
import {ListItem, Icon} from 'framework7-react';

export const NewsItem = (props) => {
    const {content} = props;
    // const date = new Date(content.body.date);

    const styles = {
        backgroundImage: `url(`+content.body.linkImg+`)`,
        backgroundSize: 'cover, 80px',
        backgroundRepeat: 'no-repeat, no-repeat',
        backgroundPosition: 'center, center'
    }
    const _handleClick = () => {
        props.setCurrentNews(props);
    }
    const Container = function() {
        return (
            <div className={`img__container ${content.body.linkImg === '' || content.body.linkImg === undefined ? 'no-image' : ''}`} style={styles}>
                { content.type === 'videos' ?  : ''}

        )
    }
    return (

            {/* <Icon onClick={handleClick} className="save-news ictv-icon" ></Icon>         */}
            <ListItem className="Card" link={`/news/${content.id}/`} >
                { Container() }

{content.category}

{content.body.time}

            </ListItem>

    )
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.arp.example</groupId>
	<artifactId>enterprise-todo</artifactId>
	<version>0.2-SNAPSHOT</version>
	<packaging>war</packaging>

	<name>Enterprise TO-DO</name>
	<description>Sample JavaEE 7 webapp with Backbone.js</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<failOnMissingWebXml>false</failOnMissingWebXml>
	</properties>

	<dependencies>
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-web-api</artifactId>
			<version>7.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.4.191</version>
		</dependency>
	</dependencies>
</project>


text:
const expect = require('expect');
const path = require('path');
const { skipPrettierHelpers: helpers } = require('../utils/utils');
const { OAUTH2 } = require('../../jdl/jhipster/authentication-types');
const { MICROSERVICE } = require('../../jdl/jhipster/application-types');
const { REACT } = require('../../jdl/jhipster/client-framework-types');

const commonOptions = { clientFramework: REACT };

describe('JHipster react generator', () => {
  describe('microfrontend', () => {
    it('should not succeed', async () => {
      await expect(
        helpers
          .create(path.join(__dirname, '../../generators/client'))
          .withOptions({
            skipInstall: true,
            auth: OAUTH2,
            enableTranslation: true,
            applicationType: MICROSERVICE,
            nativeLanguage: 'en',
            languages: ['fr', 'en'],
            ...commonOptions,
          })
          .run()
      ).rejects.toThrow("Client framework react doesn't support microfrontends");
    });
  });
});


text: console.log(getSum(...values));  // 10


text:
package ua.zs.elements;

public class Equipage {

    private int id;
    private Person commander;

    public Equipage(int id, Person commander) {
        this.id = id;
        this.commander = commander;
    }

    public int getId() {
        return id;
    }

    public Person getCommander() {
        return commander;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setCommander(Person commander) {
        this.commander = commander;
    }

    @Override
    public String toString() {
        return "№" + String.valueOf(id);
    }

}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.forpdi</groupId>
	<artifactId>forpdi</artifactId>
	<version>2.0.0.beta1-SNAPSHOT</version>
	<packaging>war</packaging>

	<parent>
		<groupId>br.com.progolden</groupId>
		<artifactId>webapp-parent</artifactId>
		<version>1.3</version>
	</parent>

	<name>ForPDI</name>
	<description>Ferramenta para gestão e controle de Planos de Desenvolvimento Institucional.</description>
	<url>https://forpdi.org/</url>
	<scm>
		<connection>scm:git:git@github.com:forpdi/forpdi.git</connection>
		<developerConnection>scm:git:git@github.com:forpdi/forpdi.git</developerConnection>
		<url>https://github.com/forpdi/forpdi</url>
	</scm>

	<licenses>
		<license>
			<name>Apache License 2.0</name>
		</license>
	</licenses>

	<properties>
		<version.vraptor.boilerplate>1.0.0</version.vraptor.boilerplate>
		<dbConfigFile>hibernate.cfg.xml</dbConfigFile>
		<propertiesfile>dev.properties</propertiesfile>
		<war.frontenddir>development</war.frontenddir>
	</properties>

	<profiles>
		<profile>
			<id>test</id>
			<properties>
				<propertiesfile>test.properties</propertiesfile>
				<war.frontenddir>production</war.frontenddir>
			</properties>
		</profile>
		<profile>
			<id>mirror</id>
			<properties>
				<propertiesfile>mirror.properties</propertiesfile>
				<war.frontenddir>production</war.frontenddir>
			</properties>
		</profile>
		<profile>
			<id>prd</id>
			<properties>
				<propertiesfile>prd.properties</propertiesfile>
				<war.frontenddir>production</war.frontenddir>
			</properties>
		</profile>
	</profiles>

	<build>
		<finalName>${project.artifactId}</finalName>
		<filters>
			<filter>${propertiesfile}</filter>
		</filters>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/*.xml</include>
					<include>**/*.properties</include>
				</includes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>**/*.xml</exclude>
					<exclude>**/*.properties</exclude>
				</excludes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<failOnMissingWebXml>false</failOnMissingWebXml>
					<resourceEncoding>UTF-8</resourceEncoding>
					<filters>
						<filter>${propertiesfile}</filter>
					</filters>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>1.0.0</version>
				<executions>
					<!-- Associate the read-project-properties goal with the initialize phase, to read the properties file. -->
					<execution>
						<phase>initialize</phase>
						<goals>
							<goal>read-project-properties</goal>
						</goals>
						<configuration>
							<files>
								<file>${propertiesfile}</file>
							</files>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>br.com.progolden</groupId>
			<artifactId>vraptor-boilerplate-hibernate</artifactId>
			<version>${version.vraptor.boilerplate}</version>
		</dependency>
		<dependency>
			<groupId>br.com.progolden</groupId>
			<artifactId>vraptor-boilerplate-core</artifactId>
			<version>${version.vraptor.boilerplate}</version>
		</dependency>
		<dependency>
			<groupId>br.com.progolden</groupId>
			<artifactId>vraptor-boilerplate-utils</artifactId>
			<version>${version.vraptor.boilerplate}</version>
		</dependency>

		<dependency>
			<groupId>com.itextpdf</groupId>
			<artifactId>itextpdf</artifactId>
			<version>5.5.10</version>
		</dependency>

		<dependency>
			<groupId>com.itextpdf.tool</groupId>
		    <artifactId>xmlworker</artifactId>
		    <version>5.5.13</version>
		</dependency>

		<dependency>
		    <groupId>com.googlecode.json-simple</groupId>
		    <artifactId>json-simple</artifactId>
		    <version>1.1</version>
		</dependency>
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
			<exclusions>
				<exclusion>
					<groupId>c3p0</groupId>
					<artifactId>c3p0</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.github.rholder/snowball-stemmer -->
		<dependency>
		    <groupId>com.github.rholder</groupId>
		    <artifactId>snowball-stemmer</artifactId>
		    <version>1.3.0.581.1</version>
		</dependency>
	</dependencies>

</project>


text:
"use strict";

function viewGraph(y, z) {
  var x = new XMLHttpRequest();
  var d = document.getElementById(z);
  x.onreadystatechange = function() {
    if (x.readyState == 4 && x.status == 200) {
      d.innerHTML = x.responseText;
    }
    else {
      try {
        if (x.status == 404)
          throw new Error(y);
        if (x.status == 500)
          throw new Error("Internal Server");
        else
          return;
      }
      catch(e) {
        d.innerHTML = "<p class=\'errormessage\'>" +
        e.name + " " + e.message + "<\/p>";
      }
    }
  }
  x.open("GET", y, true);
  x.send();
}

document.getElementById("gstn0").addEventListener("click",
  function() {
    viewGraph("images\/guitar\/gst_n0.xml", "view_00");
  }, false);
document.getElementById("q4tn0").addEventListener("click",
  function() {
    viewGraph("images\/bass\/q4t_n0.xml", "view_00");
  }, false);
document.getElementById("q5tn0").addEventListener("click",
  function() {
    viewGraph("images\/cello\/q5t_n0.xml", "view_00");
  }, false);
document.getElementById("menu_00").addEventListener("click",
  function() {
    var nwDt = new Date();
    document.getElementById("serial").textContent = nwDt.getTime();
  }, false);


text:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>

<link href="doc-style.css" type="text/css" rel="StyleSheet">

		Local Properties

Managed Object Types	Data Object Types	All Properties	All Methods

Data Object - HostMultipathInfoLogicalUnit

Property of

HostMultipathInfo, HostMultipathInfoPath

Extends

DynamicData

See also

HostMultipathInfoLogicalUnitPolicy, HostMultipathInfoLogicalUnitStorageArrayTypePolicy, HostMultipathInfoPath, ScsiLun

Data Object
                  Description

         The HostMultipathInfoLogicalUnit data object
  represents a storage entity that provides disk blocks to a host.

Properties

	          Name

	          Type

	          Description

id	xsd:string

         Identifier of LogicalUnit.

  Use this id to configure LogicalUnit multipathing policy using SetMultipathLunPolicy.

key	xsd:string

         Linkable identifier.

lun	xsd:string

         SCSI device corresponding to logical unit.

path	HostMultipathInfoPath[]

         Array of paths available to access this LogicalUnit.

policy	HostMultipathInfoLogicalUnitPolicy

         Policy that the logical unit should use when selecting a path.

storageArrayTypePolicy*	HostMultipathInfoLogicalUnitStorageArrayTypePolicy

         Policy used to determine how a storage device is accessed.  This policy
  is currently immutable.

Since vSphere API 4.0

						Properties inherited from DynamicData

dynamicProperty, dynamicType

*Need not be set

Show WSDL type definition

<textarea cols="20" rows="10" name="wsdl-textarea" wrap="off" readonly="1" id="wsdl-textarea">         <complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vim25="urn:vim25" name="HostMultipathInfoLogicalUnit">
            <complexContent>
               <extension base="vim25:DynamicData">
                  <sequence>
                     <element name="key" type="xsd:string"/>
                     <element name="id" type="xsd:string"/>
                     <element name="lun" type="xsd:string"/>
                     <element name="path" type="vim25:HostMultipathInfoPath" maxOccurs="unbounded"/>
                     <element name="policy" type="vim25:HostMultipathInfoLogicalUnitPolicy"/>
                     <element name="storageArrayTypePolicy" type="vim25:HostMultipathInfoLogicalUnitStorageArrayTypePolicy" minOccurs="0"/>
                  </sequence>
               </extension>
            </complexContent>
         </complexType></textarea>

Top of page		Local Properties

Managed Object Types	Data Object Types	All Properties	All Methods