text:
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<VerticalScroll>useIfNecessary</VerticalScroll>
	<AutoCommandBar name="ФормаКоманднаяПанель" id="-1">
		<Autofill>false</Autofill>
		<ChildItems>
			<Button name="РазрешитьРедактирование" id="5">
				<Type>CommandBarButton</Type>
				<DefaultButton>true</DefaultButton>
				<SkipOnInput>false</SkipOnInput>
				<CommandName>Form.Command.РазрешитьРедактирование</CommandName>
				<Parameter xsi:nil="true"/>
				<ExtendedTooltip name="РазрешитьРедактированиеExtendedTooltip" id="23"/>
			</Button>
			<Button name="Закрыть" id="12">
				<Type>CommandBarButton</Type>
				<Representation>PictureAndText</Representation>
				<SkipOnInput>false</SkipOnInput>
				<CommandName>Form.StandardCommand.Close</CommandName>
				<Parameter xsi:nil="true"/>
				<ExtendedTooltip name="ЗакрытьExtendedTooltip" id="24"/>
			</Button>
		</ChildItems>
	</AutoCommandBar>
	<Events>
		<Event name="OnCreateAtServer">ПриСозданииНаСервере</Event>
	</Events>
	<ChildItems>
		<UsualGroup name="ГруппаВладелец" id="18">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Склад</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Группа использовать адресное хранение</v8:content>
				</v8:item>
			</ToolTip>
			<HorizontalStretch>true</HorizontalStretch>
			<Representation>None</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ГруппаВладелецExtendedTooltip" id="25"/>
			<ChildItems>
				<LabelDecoration name="ОписаниеВладелец" id="19">
					<SkipOnInput>false</SkipOnInput>
					<TextColor>web:FireBrick</TextColor>
					<Title formatted="false">
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Склад не рекомендуется изменять, если есть ячейки, прикрепленные к этой области хранения</v8:content>
						</v8:item>
					</Title>
					<ContextMenu name="ОписаниеВладелецКонтекстноеМеню" id="20"/>
					<ExtendedTooltip name="ОписаниеВладелецExtendedTooltip" id="26"/>
				</LabelDecoration>
				<CheckBoxField name="РазрешитьРедактированиеВладелец" id="21">
					<DataPath>РазрешитьРедактированиеВладелец</DataPath>
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Разрешить редактирование склада</v8:content>
						</v8:item>
					</Title>
					<TitleLocation>Right</TitleLocation>
					<CheckBoxType>Auto</CheckBoxType>
					<ContextMenu name="РазрешитьРедактированиеВладелецКонтекстноеМеню" id="22"/>
					<ExtendedTooltip name="РазрешитьРедактированиеВладелецExtendedTooltip" id="27"/>
				</CheckBoxField>
			</ChildItems>
		</UsualGroup>
		<UsualGroup name="ГруппаПомещение" id="13">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Использовать адресное хранение</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Группа складское помещение</v8:content>
				</v8:item>
			</ToolTip>
			<HorizontalStretch>true</HorizontalStretch>
			<Representation>None</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ГруппаПомещениеExtendedTooltip" id="28"/>
			<ChildItems>
				<LabelDecoration name="ОписаниеПомещение" id="14">
					<SkipOnInput>false</SkipOnInput>
					<TextColor>web:FireBrick</TextColor>
					<Title formatted="false">
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Помещение не рекомендуется изменять, если есть ячейки, прикрепленные к этой области хранения</v8:content>
						</v8:item>
					</Title>
					<ContextMenu name="ОписаниеПомещениеКонтекстноеМеню" id="15"/>
					<ExtendedTooltip name="ОписаниеПомещениеExtendedTooltip" id="29"/>
				</LabelDecoration>
				<CheckBoxField name="РазрешитьРедактированиеПомещение" id="16">
					<DataPath>РазрешитьРедактированиеПомещение</DataPath>
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Разрешить редактирование помещения</v8:content>
						</v8:item>
					</Title>
					<TitleLocation>Right</TitleLocation>
					<CheckBoxType>Auto</CheckBoxType>
					<ContextMenu name="РазрешитьРедактированиеПомещениеКонтекстноеМеню" id="17"/>
					<ExtendedTooltip name="РазрешитьРедактированиеПомещениеExtendedTooltip" id="30"/>
				</CheckBoxField>
			</ChildItems>
		</UsualGroup>
	</ChildItems>
	<Attributes>
		<Attribute name="РазрешитьРедактированиеПомещение" id="1">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Разрешить редактирование складское помещение</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:boolean</v8:Type>
			</Type>
		</Attribute>
		<Attribute name="РазрешитьРедактированиеВладелец" id="3">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Разрешить редактирование владелец</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>xs:boolean</v8:Type>
			</Type>
		</Attribute>
	</Attributes>
	<Commands>
		<Command name="РазрешитьРедактирование" id="1">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Разрешить редактирование</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Разрешить редактирование</v8:content>
				</v8:item>
			</ToolTip>
			<Action>РазрешитьРедактирование</Action>
		</Command>
	</Commands>
</Form>


text:
<?xml version="1.0" encoding="UTF-8"?>
<image-types>
	<image-type>
		<name>OpenStack Compute Image</name>
		<description>OpenStack Compute Image</description>
		<property-definitions>
			<property-definition>
				<name>Image Ref</name>
				<description>Image Ref</description>
				<required>true</required>
				<type>STRING</type>
				<default-string-value></default-string-value>
				<string-max-length>80</string-max-length>
				<allowed-string-values></allowed-string-values>
				<default-file-value></default-file-value>
			</property-definition>
		</property-definitions>
		<supported-compute-center-types>
			<compute-center-type>OpenStack Compute</compute-center-type>
		</supported-compute-center-types>
	</image-type>
	<image-type>
		<name>Rackspace OpenStack Cloud Server Image</name>
		<description>Rackspace OpenStack Cloud Server Image</description>
		<property-definitions>
			<property-definition>
				<name>Image Ref</name>
				<description>Image Ref</description>
				<required>true</required>
				<type>STRING</type>
				<default-string-value></default-string-value>
				<string-max-length>80</string-max-length>
				<allowed-string-values></allowed-string-values>
				<default-file-value></default-file-value>
			</property-definition>
		</property-definitions>
		<supported-compute-center-types>
			<compute-center-type>Rackspace OpenStack Cloud Server</compute-center-type>
			<compute-center-type>Rackspace Openstack Private Cloud</compute-center-type>
		</supported-compute-center-types>
	</image-type>
	<image-type>
		<name>HP Cloud Compute Image</name>
		<description>HP Cloud Compute Image</description>
		<property-definitions>
			<property-definition>
				<name>Image Ref</name>
				<description>Image Ref</description>
				<required>true</required>
				<type>STRING</type>
				<default-string-value></default-string-value>
				<string-max-length>80</string-max-length>
				<allowed-string-values></allowed-string-values>
				<default-file-value></default-file-value>
			</property-definition>
		</property-definitions>
		<supported-compute-center-types>
			<compute-center-type>HP Cloud Compute</compute-center-type>
		</supported-compute-center-types>
	</image-type>
</image-types>

redpajama_set_name: RedPajamaGithub


text:
package dao

import (
	"context"
	"strconv"

	"go-common/app/admin/main/usersuit/model"
	gmc "go-common/library/cache/memcache"
	"go-common/library/log"
)

const (
	_prefixActivatedNid = "usma:" // key of activated medal nid
	_prefixOwners       = "umos:" // key of owners info
	_prefixRedPoint     = "usrp:" // key of red point
	_prefixPopup        = "uspp:" // key of new medal popup
)

// medalactivated medal nid key.
func activatedNidKey(mid int64) string {
	return _prefixActivatedNid + strconv.FormatInt(mid, 10)
}

// ownersKey medal_owner key.
func ownersKey(mid int64) string {
	return _prefixOwners + strconv.FormatInt(mid, 10)
}

//RedPointKey new medal RedPoint key.
func RedPointKey(mid int64) string {
	return _prefixRedPoint + strconv.FormatInt(mid, 10)
}

// PopupKey new medal popup key.
func PopupKey(mid int64) string {
	return _prefixPopup + strconv.FormatInt(mid, 10)
}

func (d *Dao) pingMC(c context.Context) (err error) {
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Set(&gmc.Item{Key: "ping", Value: []byte{1}, Expiration: d.mcExpire}); err != nil {
		log.Error("conn.Store(set, ping, 1) error(%v)", err)
	}
	return
}

// MedalOwnersCache get medal_owner cache.
func (d *Dao) MedalOwnersCache(c context.Context, mid int64) (res []*model.MedalOwner, err error) {
	conn := d.mc.Get(c)
	defer conn.Close()
	item, err := conn.Get(ownersKey(mid))
	if err != nil {
		if err == gmc.ErrNotFound {
			res = nil
			err = nil
			return
		}
		log.Error("d.MedalOwnersCache err(%v)", err)
		return
	}
	res = make([]*model.MedalOwner, 0)
	if err = conn.Scan(item, &res); err != nil {
		log.Error("d.MedalOwnersCache err(%v)", err)
	}
	return
}

// SetMedalOwnersache set medal_owner cache.
func (d *Dao) SetMedalOwnersache(c context.Context, mid int64, nos []*model.MedalOwner) (err error) {
	key := ownersKey(mid)
	item := &gmc.Item{Key: key, Object: nos, Expiration: d.mcExpire, Flags: gmc.FlagJSON}
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Set(item); err != nil {
		log.Error("SetMedalOwnersache err(%v)", err)
	}
	return
}

// DelMedalOwnersCache delete medal_owner cache.
func (d *Dao) DelMedalOwnersCache(c context.Context, mid int64) (err error) {
	key := ownersKey(mid)
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Delete(key); err != nil {
		if err == gmc.ErrNotFound {
			err = nil
		} else {
			log.Error("d.DelMedalOwnersCache(%s) error(%v)", key, err)
		}
	}
	return
}

// MedalActivatedCache get user activated medal nid.
func (d *Dao) MedalActivatedCache(c context.Context, mid int64) (nid int64, err error) {
	conn := d.mc.Get(c)
	defer conn.Close()
	item, err := conn.Get(activatedNidKey(mid))
	if err != nil {
		if err == gmc.ErrNotFound {
			nid = 0
			err = nil
			return
		}
		log.Error("d.MedalActivatedCache(mid:%d) err(%v)", mid, err)
		return
	}
	if err = conn.Scan(item, &nid); err != nil {
		log.Error("d.MedalActivatedCache(mid:%d) err(%v)", mid, err)
	}
	return
}

// SetMedalActivatedCache set activated medal  cache.
func (d *Dao) SetMedalActivatedCache(c context.Context, mid, nid int64) (err error) {
	key := activatedNidKey(mid)
	item := &gmc.Item{Key: key, Object: nid, Expiration: d.mcExpire, Flags: gmc.FlagJSON}
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Set(item); err != nil {
		log.Error("SetMedalActivatedCache err(%v)", err)
	}
	return
}

// DelMedalActivatedCache delete activated medal cache.
func (d *Dao) DelMedalActivatedCache(c context.Context, mid int64) (err error) {
	key := activatedNidKey(mid)
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Delete(key); err != nil {
		if err == gmc.ErrNotFound {
			err = nil
		} else {
			log.Error("d.DelMedalActivatedCache(%s) error(%v)", key, err)
		}
	}
	return
}

// PopupCache get new medal info popup cache.
func (d *Dao) PopupCache(c context.Context, mid int64) (nid int64, err error) {
	conn := d.mc.Get(c)
	defer conn.Close()
	item, err := conn.Get(PopupKey(mid))
	if err != nil {
		if err == gmc.ErrNotFound {
			nid = 0
			err = nil
			return
		}
		log.Error("d.PopupCache(mid:%d) err(%v)", mid, err)
		return
	}
	if err = conn.Scan(item, &nid); err != nil {
		log.Error("d.PopupCache(mid:%d) err(%v)", mid, err)
	}
	return
}

// SetPopupCache set popup cache.
func (d *Dao) SetPopupCache(c context.Context, mid, nid int64) (err error) {
	key := PopupKey(mid)
	item := &gmc.Item{Key: key, Object: nid, Expiration: d.pointExpire, Flags: gmc.FlagJSON}
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Set(item); err != nil {
		log.Error("SetMedalOwnersache err(%v)", err)
	}
	return
}

// DelPopupCache delete new medal info popup cache.
func (d *Dao) DelPopupCache(c context.Context, mid int64) (err error) {
	key := PopupKey(mid)
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Delete(key); err != nil {
		if err == gmc.ErrNotFound {
			err = nil
		} else {
			log.Error("d.DelPopupCache(%s) error(%v)", key, err)
		}
	}
	return
}

// RedPointCache get new medal info red point cache.
func (d *Dao) RedPointCache(c context.Context, mid int64) (nid int64, err error) {
	conn := d.mc.Get(c)
	defer conn.Close()
	item, err := conn.Get(RedPointKey(mid))
	if err != nil {
		if err == gmc.ErrNotFound {
			err = nil
			return
		}
		log.Error("d.RedPointCache(mid:%d) err(%v)", mid, err)
		return
	}
	if err = conn.Scan(item, &nid); err != nil {
		log.Error("d.RedPointCache(mid:%d) err(%v)", mid, err)
	}
	return
}

// SetRedPointCache set red point cache.
func (d *Dao) SetRedPointCache(c context.Context, mid, nid int64) (err error) {
	key := RedPointKey(mid)
	item := &gmc.Item{Key: key, Object: nid, Expiration: d.pointExpire, Flags: gmc.FlagJSON}
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Set(item); err != nil {
		log.Error("SetRedPointCache(%d %d) err(%v)", mid, nid, err)
	}
	return
}

// DelRedPointCache delete new medal info red point cache.
func (d *Dao) DelRedPointCache(c context.Context, mid int64) (err error) {
	key := RedPointKey(mid)
	conn := d.mc.Get(c)
	defer conn.Close()
	if err = conn.Delete(key); err != nil {
		if err == gmc.ErrNotFound {
			err = nil
		} else {
			log.Error("d.DelRedPointCache(%d) error(%v)", mid, err)
		}
	}
	return
}


text:
<!--
  ~ Copyright 2012 Kevan Dunsmore.  All rights reserved.
  ~
  ~    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.
  -->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">

    <id>all-sources</id>

    <formats>
        <format>dir</format>
        <format>jar</format>
    </formats>

    <includeBaseDirectory>false</includeBaseDirectory>

    <moduleSets>
        <moduleSet>

            <useAllReactorProjects>true</useAllReactorProjects>

            <!--<includes>-->
                <!--<include>com.sunsprinter.diffunit:*</include>-->
            <!--</includes>-->

            <!--<binaries>-->
                <!--<unpack>true</unpack>-->
                <!--<includeDependencies>false</includeDependencies>-->
            <!--</binaries>-->

            <sources>
                <fileSets>
                    <fileSet>
                        <includes>
                            <include>${project.build.directory}/sources/**/*</include>
                        </includes>
                    </fileSet>
                </fileSets>
            </sources>

        </moduleSet>
    </moduleSets>
</assembly>


text:
<?php

/** */
namespace Install;

use Laminas\ModuleManager\Feature;
use Laminas\EventManager\EventInterface;

/**
 * Module "Install" initialization.
 *
 * @author Mathias Gelhausen <gelhausen@cross-solution.de>
 * @since 0.20
 */
class Module implements Feature\ConfigProviderInterface, Feature\BootstrapListenerInterface
{
    public function getConfig()
    {
        return include __DIR__ . '/../config/module.config.php';
    }

    /**
     * Listen to the bootstrap event.
     *
     * @param EventInterface|\Laminas\Mvc\MvcEvent $e
     *
     * @return void
     * @throws \Exception
     */
    public function onBootstrap(EventInterface $e)
    {
        $application  = $e->getApplication();
        $eventManager = $application->getEventManager();
        $services     = $application->getServiceManager();

        $services->get('Install/Listener/LanguageSetter')
                 ->attach($eventManager);

        // start tracy debugging
        $services->get('Tracy')->startDebug();
    }
}


text:
.class public interface abstract Lcom/android/ims/internal/IImsCallSessionListener;
.super Ljava/lang/Object;
.source "IImsCallSessionListener.java"

# interfaces
.implements Landroid/os/IInterface;

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/ims/internal/IImsCallSessionListener$Stub;
    }
.end annotation

# virtual methods
.method public abstract callSessionConferenceExtendFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionConferenceExtendReceived(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionConferenceExtended(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionConferenceStateUpdated(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsConferenceState;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionDeflectFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionDeflected(Lcom/android/ims/internal/IImsCallSession;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionHandover(Lcom/android/ims/internal/IImsCallSession;IILcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionHandoverFailed(Lcom/android/ims/internal/IImsCallSession;IILcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionHeld(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionHoldFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionHoldReceived(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionInviteParticipantsRequestDelivered(Lcom/android/ims/internal/IImsCallSession;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionInviteParticipantsRequestFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionMergeComplete(Lcom/android/ims/internal/IImsCallSession;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionMergeFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionMergeStarted(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionMerged(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionProgressing(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsStreamMediaProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionRemoveParticipantsRequestDelivered(Lcom/android/ims/internal/IImsCallSession;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionRemoveParticipantsRequestFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionResumeFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionResumeReceived(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionResumed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionStartFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionStarted(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionTerminated(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionTtyModeReceived(Lcom/android/ims/internal/IImsCallSession;I)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionUpdateFailed(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsReasonInfo;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionUpdateReceived(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionUpdated(Lcom/android/ims/internal/IImsCallSession;Lcom/android/ims/ImsCallProfile;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method

.method public abstract callSessionUssdMessageReceived(Lcom/android/ims/internal/IImsCallSession;ILjava/lang/String;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method


text:
@interface KintoneFileFieldCell ()

@property (nonatomic) KintoneAppDelegate *appDelegate;

@end

@implementation KintoneFileFieldCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //
    }
    return self;
}

- (KintoneAppDelegate *)appDelegate
{
    if (_appDelegate == nil) {
        _appDelegate = [[UIApplication sharedApplication] delegate];
    }

    return _appDelegate;
}

+ (NSCache *)sharedImageCache
{
    static NSCache *sharedImageCache = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedImageCache = [NSCache new];
    });

    return sharedImageCache;
}

- (void)setValueWithKintoneField:(KintoneField *)field form:(NSDictionary *)form
{
    CGFloat contentViewHeight = 0;

    KintoneField *fieldInfo = (KintoneField *)form[field.code];
    if (fieldInfo != nil && !fieldInfo.noLabel) {
        UILabel *label = [UILabel new];
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = [UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:1];
        label.text = fieldInfo.label;
        [self.contentView addSubview:label];

        // resize and add mergin
        [label sizeToFit];
        label.frame = CGRectMake(10, 2, CGRectGetWidth(label.frame), CGRectGetHeight(label.frame) + 2);
        contentViewHeight += CGRectGetHeight(label.frame);
    }

    for (KintoneFile *file in field.value) {
        if ([KintoneFileFieldCell isSupportedImage:file.contentType]) {
            // image file
            NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"fileFieldCellDefault" ofType:@"png"];
            UIImageView *imageView = [self imageView:file placeholderImage:[UIImage imageWithContentsOfFile:imagePath]];
            [self.contentView addSubview:imageView];
            imageView.frame = CGRectMake(10, contentViewHeight, CGRectGetWidth(imageView.frame), CGRectGetHeight(imageView.frame) + 2);
            contentViewHeight += CGRectGetHeight(imageView.frame);
        }
        else {
            // not image file
            UILabel *fileInfoLabel = [KintoneFileFieldCell fileInfoLabel:file];
            [self.contentView addSubview:fileInfoLabel];
            fileInfoLabel.frame = CGRectMake(10, contentViewHeight, CGRectGetWidth(fileInfoLabel.frame), CGRectGetHeight(fileInfoLabel.frame) + 2);
            contentViewHeight += CGRectGetHeight(fileInfoLabel.frame);
        }
    }

    // resize content view
    self.contentView.frame = CGRectMake(CGRectGetMinX(self.contentView.frame), CGRectGetMinY(self.contentView.frame),
                                        CGRectGetWidth(self.contentView.frame), contentViewHeight);
}

- (CGFloat)height:(CGSize)maxSize
{
    return self.contentView.frame.size.height;
}

+ (BOOL)isSupportedImage:(NSString *)contentType
{
    NSSet *supportedImageFormats = [NSSet setWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon" @"image/x-xbitmap", @"image/x-win-bitmap", nil];

    return [supportedImageFormats containsObject:contentType];
}

- (void)fetchImage:(KintoneFile *)file imageView:(UIImageView *)imageView
{
    UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    indicator.center = imageView.center;
    [imageView addSubview:indicator];
    [indicator startAnimating];

    NSOutputStream *output = [NSOutputStream outputStreamToMemory];

    CBNetworkingSuccessBlockForHTTPResponse success = ^(NSURLRequest *request, NSHTTPURLResponse *response, id responseObject) {
        UIImage *image = [UIImage imageWithData:[output propertyForKey:NSStreamDataWrittenToMemoryStreamKey]];
        imageView.image = [KintoneFileFieldCell thumnailImage:image];
        [[KintoneFileFieldCell sharedImageCache] setObject:image forKey:file.fileKey];

        [indicator stopAnimating];
    };
    CBNetworkingFailureBlockForHTTPResponse failure = ^(NSURLRequest *request, NSHTTPURLResponse *response, CBError *error) {
        [indicator stopAnimating];
    };

    [self.appDelegate.kintoneApplication.kintoneAPI fileDownload:file.fileKey
                                                         success:success
                                                         failure:failure
                                                        download:nil
                                                          output:output
                                                           queue:[CBOperationQueue sharedConcurrentQueue]];
}

- (UIImageView *)imageView:(KintoneFile *)file placeholderImage:(UIImage *)placeholderImage
{
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 150, 150)];
    UIImage *image = [[KintoneFileFieldCell sharedImageCache] objectForKey:file.fileKey];
    if (image) {
        imageView.image = image;
    }
    else {
        imageView.image = placeholderImage;
        [self fetchImage:file imageView:imageView];
    }

    return imageView;
}

+ (UIImage *)thumnailImage:(UIImage *)image
{
    CGSize thumnailSize = CGSizeMake(150, 150);
    UIGraphicsBeginImageContext(thumnailSize);
    [image drawInRect:CGRectMake(0, 0, thumnailSize.width, thumnailSize.height)];
    UIImage *thumnailImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    return thumnailImage;
}

+ (UILabel *)fileInfoLabel:(KintoneFile *)file
{
    UILabel *label = [UILabel new];
    label.font = [UIFont systemFontOfSize:18];
    label.text = [NSString stringWithFormat:@"%@ (%d bytes)", file.name, file.size];
    [label sizeToFit];

    return label;
}

@end


text:
package com.consol.citrus.camel.integration;

import com.consol.citrus.annotations.CitrusXmlTest;
import com.consol.citrus.testng.spring.TestNGCitrusSpringSupport;
import org.testng.annotations.Test;

/**
 * @author Christoph Deppisch
 * @since 1.4.1
 */
@Test
public class CamelSyncEndpointIT extends TestNGCitrusSpringSupport {

    @CitrusXmlTest(name = "CamelSyncEndpointIT")
    public void testCamelSyncEndpoint() {}
}


text:
const gs = require('ghostscript4js');
console.dir(gs.version());


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WTalk.Core.Reflection
{
    public enum AttributeTypeEnum : int
    {
        ProtoContract = 1,
        Enum,
        Value
    }
}


text:
<?php

namespace Optimus\Bruno;

use JsonSerializable;
use InvalidArgumentException;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Routing\Controller;
use Illuminate\Routing\Router;
use Illuminate\Http\JsonResponse;
use Optimus\Architect\Architect;
use Illuminate\Http\Request;

abstract class LaravelController extends Controller
{
    /**
     * Defaults
     * @var array
     */
    protected $defaults = [];

    /**
     * Create a json response
     * @param  mixed  $data
     * @param  integer $statusCode
     * @param  array  $headers
     * @return Illuminate\Http\JsonResponse
     */
    protected function response($data, $statusCode = 200, array $headers = [])
    {
        if ($data instanceof Arrayable && !$data instanceof JsonSerializable) {
            $data = $data->toArray();
        }

        return new JsonResponse($data, $statusCode, $headers);
    }

    /**
     * Parse data using architect
     * @param  mixed $data
     * @param  array  $options
     * @param  string $key
     * @return mixed
     */
    protected function parseData($data, array $options, $key = null)
    {
        $architect = new Architect();

        return $architect->parseData($data, $options['modes'], $key);
    }

    /**
     * Page sort
     * @param array $sort
     * @return array
     */
    protected function parseSort(array $sort) {
        return array_map(function($sort) {
            if (!isset($sort['direction'])) {
                $sort['direction'] = 'asc';
            }

            return $sort;
        }, $sort);
    }

    /**
     * Parse include strings into resource and modes
     * @param  array  $includes
     * @return array The parsed resources and their respective modes
     */
    protected function parseIncludes(array $includes)
    {
        $return = [
            'includes' => [],
            'modes' => []
        ];

        foreach ($includes as $include) {
            $explode = explode(':', $include);

            if (!isset($explode[1])) {
                $explode[1] = $this->defaults['mode'];
            }

            $return['includes'][] = $explode[0];
            $return['modes'][$explode[0]] = $explode[1];
        }

        return $return;
    }

    /**
     * Parse filter group strings into filters
     * Filters are formatted as key:operator(value)
     * Example: name:eq(esben)
     * @param  array  $filter_groups
     * @return array
     */
    protected function parseFilterGroups(array $filter_groups)
    {
        $return = [];

        foreach($filter_groups as $group) {
            if (!array_key_exists('filters', $group)) {
                throw new InvalidArgumentException('Filter group does not have the \'filters\' key.');
            }

            $filters = array_map(function($filter){
                if (!isset($filter['not'])) {
                    $filter['not'] = false;
                }

                return $filter;
            }, $group['filters']);

            $return[] = [
                'filters' => $filters,
                'or' => isset($group['or']) ? $group['or'] : false
            ];
        }

        return $return;
    }

    /**
     * Parse GET parameters into resource options
     * @return array
     */
    protected function parseResourceOptions($request = null)
    {
        if ($request === null) {
            $request = request();
        }

        $this->defaults = array_merge([
            'includes' => [],
            'sort' => [],
            'limit' => null,
            'page' => null,
            'mode' => 'embed',
            'filter_groups' => [],
            'start' => null
        ], $this->defaults);

        $includes = $this->parseIncludes($request->get('includes', $this->defaults['includes']));
        $sort = $this->parseSort($request->get('sort', $this->defaults['sort']));
        $limit = $request->get('limit', $this->defaults['limit']);
        $page = $request->get('page', $this->defaults['page']);
        $filter_groups = $this->parseFilterGroups($request->get('filter_groups', $this->defaults['filter_groups']));
        $start = $request->get('start', $this->defaults['start']);

        if ($page !== null && $limit === null) {
            throw new InvalidArgumentException('Cannot use page option without limit option');
        }

        return [
            'includes' => $includes['includes'],
            'modes' => $includes['modes'],
            'sort' => $sort,
            'limit' => $limit,
            'page' => $page,
            'filter_groups' => $filter_groups,
            'start' => $start,
        ];
    }
}


text:
def setup_routes(app, handler, project_root):
    add_route = app.router.add_route
    add_route('GET', '/', handler.timeline, name='timeline')
    add_route('GET', '/public',
              handler.public_timeline, name='public_timeline')
    add_route('GET', '/logout', handler.logout, name='logout')

    add_route('GET', '/login', handler.login, name='login')
    add_route('POST', '/login', handler.login)

    add_route('GET', '/register', handler.register, name='register')
    add_route('POST', '/register', handler.register)
    add_route('GET', '/{username}', handler.user_timeline,
              name='user_timeline')
    add_route('GET', '/{username}/follow', handler.follow_user,
              name='follow_user')
    add_route('GET', '/{username}/unfollow', handler.unfollow_user,
              name='unfollow_user')
    add_route('POST', '/add_message', handler.add_message,
              name='add_message')
    app.router.add_static('/static/',
                          path=str(project_root / 'static'),
                          name='static')


text:
<tool id="maf_limit_size1" name="Filter MAF blocks">
  <description>by Size</description>
  <command interpreter="python">maf_limit_size.py $input1 $out_file1 $min_size $max_size</command>
  <inputs>
    <page>
        <param format="maf" name="input1" label="MAF File" type="data"/>
        <param name="min_size" label="Minimum Size" value="0" type="integer"/>
        <param name="max_size" label="Maximum Size" value="0" type="integer" help="A maximum size less than 1 indicates no limit"/>
    </page>
   </inputs>
  <outputs>
    <data format="maf" name="out_file1" />
  </outputs>
  <tests>
    <test>
      <param name="input1" value="3.maf" ftype="maf" />
      <param name="min_size" value="0"/>
      <param name="max_size" value="0"/>
      <output name="out_file1" file="maf_limit_size1_out.maf" />
    </test>
  </tests>
  <help>

**What it does**

This tool takes a MAF file and a size range and extracts the MAF blocks which fall within the specified range.
  </help>
</tool>


text:
import { Component, Directive, HostBinding, HostListener, Injectable, Input, Output, Query, resolveForwardRef } from '@angular/core';
import { ListWrapper, StringMapWrapper } from './facade/collection';
import { stringify } from './facade/lang';
import { ReflectorReader, reflector } from './private_import_core';
import { splitAtColon } from './util';
/*
 * Resolve a `Type` for {@link Directive}.
 *
 * This interface can be overridden by the application developer to create custom behavior.
 *
 * See {@link Compiler}
 */
export var DirectiveResolver = (function () {
    /**
     * @param {?=} _reflector
     */
    function DirectiveResolver(_reflector) {
        if (_reflector === void 0) { _reflector = reflector; }
        this._reflector = _reflector;
    }
    /**
     * @param {?} type
     * @return {?}
     */
    DirectiveResolver.prototype.isDirective = function (type) {
        var /** @type {?} */ typeMetadata = this._reflector.annotations(resolveForwardRef(type));
        return typeMetadata && typeMetadata.some(isDirectiveMetadata);
    };
    /**
     *  Return {@link Directive} for a given `Type`.
     * @param {?} type
     * @param {?=} throwIfNotFound
     * @return {?}
     */
    DirectiveResolver.prototype.resolve = function (type, throwIfNotFound) {
        if (throwIfNotFound === void 0) { throwIfNotFound = true; }
        var /** @type {?} */ typeMetadata = this._reflector.annotations(resolveForwardRef(type));
        if (typeMetadata) {
            var /** @type {?} */ metadata = ListWrapper.findLast(typeMetadata, isDirectiveMetadata);
            if (metadata) {
                var /** @type {?} */ propertyMetadata = this._reflector.propMetadata(type);
                return this._mergeWithPropertyMetadata(metadata, propertyMetadata, type);
            }
        }
        if (throwIfNotFound) {
            throw new Error("No Directive annotation found on " + stringify(type));
        }
        return null;
    };
    /**
     * @param {?} dm
     * @param {?} propertyMetadata
     * @param {?} directiveType
     * @return {?}
     */
    DirectiveResolver.prototype._mergeWithPropertyMetadata = function (dm, propertyMetadata, directiveType) {
        var /** @type {?} */ inputs = [];
        var /** @type {?} */ outputs = [];
        var /** @type {?} */ host = {};
        var /** @type {?} */ queries = {};
        Object.keys(propertyMetadata).forEach(function (propName) {
            var /** @type {?} */ input = ListWrapper.findLast(propertyMetadata[propName], function (a) { return a instanceof Input; });
            if (input) {
                if (input.bindingPropertyName) {
                    inputs.push(propName + ": " + input.bindingPropertyName);
                }
                else {
                    inputs.push(propName);
                }
            }
            var /** @type {?} */ output = ListWrapper.findLast(propertyMetadata[propName], function (a) { return a instanceof Output; });
            if (output) {
                if (output.bindingPropertyName) {
                    outputs.push(propName + ": " + output.bindingPropertyName);
                }
                else {
                    outputs.push(propName);
                }
            }
            var /** @type {?} */ hostBinding = ListWrapper.findLast(propertyMetadata[propName], function (a) { return a instanceof HostBinding; });
            if (hostBinding) {
                if (hostBinding.hostPropertyName) {
                    var /** @type {?} */ startWith = hostBinding.hostPropertyName[0];
                    if (startWith === '(') {
                        throw new Error("@HostBinding can not bind to events. Use @HostListener instead.");
                    }
                    else if (startWith === '[') {
                        throw new Error("@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.");
                    }
                    host[("[" + hostBinding.hostPropertyName + "]")] = propName;
                }
                else {
                    host[("[" + propName + "]")] = propName;
                }
            }
            var /** @type {?} */ hostListener = ListWrapper.findLast(propertyMetadata[propName], function (a) { return a instanceof HostListener; });
            if (hostListener) {
                var /** @type {?} */ args = hostListener.args || [];
                host[("(" + hostListener.eventName + ")")] = propName + "(" + args.join(',') + ")";
            }
            var /** @type {?} */ query = ListWrapper.findLast(propertyMetadata[propName], function (a) { return a instanceof Query; });
            if (query) {
                queries[propName] = query;
            }
        });
        return this._merge(dm, inputs, outputs, host, queries, directiveType);
    };
    /**
     * @param {?} def
     * @return {?}
     */
    DirectiveResolver.prototype._extractPublicName = function (def) { return splitAtColon(def, [null, def])[1].trim(); };
    /**
     * @param {?} bindings
     * @return {?}
     */
    DirectiveResolver.prototype._dedupeBindings = function (bindings) {
        var /** @type {?} */ names = new Set();
        var /** @type {?} */ reversedResult = [];
        // go last to first to allow later entries to overwrite previous entries
        for (var /** @type {?} */ i = bindings.length - 1; i >= 0; i--) {
            var /** @type {?} */ binding = bindings[i];
            var /** @type {?} */ name_1 = this._extractPublicName(binding);
            if (!names.has(name_1)) {
                names.add(name_1);
                reversedResult.push(binding);
            }
        }
        return reversedResult.reverse();
    };
    /**
     * @param {?} directive
     * @param {?} inputs
     * @param {?} outputs
     * @param {?} host
     * @param {?} queries
     * @param {?} directiveType
     * @return {?}
     */
    DirectiveResolver.prototype._merge = function (directive, inputs, outputs, host, queries, directiveType) {
        var /** @type {?} */ mergedInputs = this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);
        var /** @type {?} */ mergedOutputs = this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);
        var /** @type {?} */ mergedHost = directive.host ? StringMapWrapper.merge(directive.host, host) : host;
        var /** @type {?} */ mergedQueries = directive.queries ? StringMapWrapper.merge(directive.queries, queries) : queries;
        if (directive instanceof Component) {
            return new Component({
                selector: directive.selector,
                inputs: mergedInputs,
                outputs: mergedOutputs,
                host: mergedHost,
                exportAs: directive.exportAs,
                moduleId: directive.moduleId,
                queries: mergedQueries,
                changeDetection: directive.changeDetection,
                providers: directive.providers,
                viewProviders: directive.viewProviders,
                entryComponents: directive.entryComponents,
                template: directive.template,
                templateUrl: directive.templateUrl,
                styles: directive.styles,
                styleUrls: directive.styleUrls,
                encapsulation: directive.encapsulation,
                animations: directive.animations,
                interpolation: directive.interpolation
            });
        }
        else {
            return new Directive({
                selector: directive.selector,
                inputs: mergedInputs,
                outputs: mergedOutputs,
                host: mergedHost,
                exportAs: directive.exportAs,
                queries: mergedQueries,
                providers: directive.providers
            });
        }
    };
    DirectiveResolver.decorators = [
        { type: Injectable },
    ];
    /** @nocollapse */
    DirectiveResolver.ctorParameters = function () { return [
        { type: ReflectorReader, },
    ]; };
    return DirectiveResolver;
}());
function DirectiveResolver_tsickle_Closure_declarations() {
    /** @type {?} */
    DirectiveResolver.decorators;
    /**
     * @nocollapse
     * @type {?}
     */
    DirectiveResolver.ctorParameters;
    /** @type {?} */
    DirectiveResolver.prototype._reflector;
}
/**
 * @param {?} type
 * @return {?}
 */
function isDirectiveMetadata(type) {
    return type instanceof Directive;
}
//# sourceMappingURL=directive_resolver.js.map


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.hybridcontainerservice.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of HybridIdentityMetadatas. */
public interface HybridIdentityMetadatas {
    /**
     * Get the hybrid identity metadata resource
     *
     *
Get the hybrid identity metadata proxy resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param provisionedClustersName Parameter for the name of the provisioned cluster.
     * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata resource.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the hybrid identity metadata proxy resource along with {@link Response}.
     */
    Response<HybridIdentityMetadata> getWithResponse(
        String resourceGroupName,
        String provisionedClustersName,
        String hybridIdentityMetadataResourceName,
        Context context);

    /**
     * Get the hybrid identity metadata resource
     *
     *
Get the hybrid identity metadata proxy resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param provisionedClustersName Parameter for the name of the provisioned cluster.
     * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata resource.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the hybrid identity metadata proxy resource.
     */
    HybridIdentityMetadata get(
        String resourceGroupName, String provisionedClustersName, String hybridIdentityMetadataResourceName);

    /**
     * Deletes the hybrid identity metadata resource
     *
     *
Deletes the hybrid identity metadata proxy resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param provisionedClustersName Parameter for the name of the provisioned cluster.
     * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata resource.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    Response<Void> deleteWithResponse(
        String resourceGroupName,
        String provisionedClustersName,
        String hybridIdentityMetadataResourceName,
        Context context);

    /**
     * Deletes the hybrid identity metadata resource
     *
     *
Deletes the hybrid identity metadata proxy resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param provisionedClustersName Parameter for the name of the provisioned cluster.
     * @param hybridIdentityMetadataResourceName Parameter for the name of the hybrid identity metadata resource.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void delete(String resourceGroupName, String provisionedClustersName, String hybridIdentityMetadataResourceName);

    /**
     * Lists the hybrid identity metadata resources in a cluster
     *
     *
Lists the hybrid identity metadata proxy resource in a cluster.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param provisionedClustersName Parameter for the name of the provisioned cluster.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of hybridIdentityMetadata as paginated response with {@link PagedIterable}.
     */
    PagedIterable<HybridIdentityMetadata> listByCluster(String resourceGroupName, String provisionedClustersName);

    /**
     * Lists the hybrid identity metadata resources in a cluster
     *
     *
Lists the hybrid identity metadata proxy resource in a cluster.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param provisionedClustersName Parameter for the name of the provisioned cluster.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of hybridIdentityMetadata as paginated response with {@link PagedIterable}.
     */
    PagedIterable<HybridIdentityMetadata> listByCluster(
        String resourceGroupName, String provisionedClustersName, Context context);

    /**
     * Get the hybrid identity metadata resource
     *
     *
Get the hybrid identity metadata proxy resource.
     *
     * @param id the resource ID.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the hybrid identity metadata proxy resource along with {@link Response}.
     */
    HybridIdentityMetadata getById(String id);

    /**
     * Get the hybrid identity metadata resource
     *
     *
Get the hybrid identity metadata proxy resource.
     *
     * @param id the resource ID.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the hybrid identity metadata proxy resource along with {@link Response}.
     */
    Response<HybridIdentityMetadata> getByIdWithResponse(String id, Context context);

    /**
     * Deletes the hybrid identity metadata resource
     *
     *
Deletes the hybrid identity metadata proxy resource.
     *
     * @param id the resource ID.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteById(String id);

    /**
     * Deletes the hybrid identity metadata resource
     *
     *
Deletes the hybrid identity metadata proxy resource.
     *
     * @param id the resource ID.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    Response<Void> deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new HybridIdentityMetadata resource.
     *
     * @param name resource name.
     * @return the first stage of the new HybridIdentityMetadata definition.
     */
    HybridIdentityMetadata.DefinitionStages.Blank define(String name);
}


text:
using Melanchall.DryWetMidi.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace Melanchall.DryWetMidi.Interaction
{
    /// <summary>
    /// Represents a result of summation or subtraction of two <see cref="ITimeSpan"/>.
    /// </summary>
    public sealed class MathTimeSpan : ITimeSpan
    {
        #region Constants

        private const string TimeModeString = "T";
        private const string LengthModeString = "L";

        private static readonly Dictionary<TimeSpanMode, Tuple<string, string>> ModeStrings =
            new Dictionary<TimeSpanMode, Tuple<string, string>>
            {
                [TimeSpanMode.TimeTime] = Tuple.Create(TimeModeString, TimeModeString),
                [TimeSpanMode.TimeLength] = Tuple.Create(TimeModeString, LengthModeString),
                [TimeSpanMode.LengthLength] = Tuple.Create(LengthModeString, LengthModeString),
            };

        #endregion

        #region Constructor

        internal MathTimeSpan(ITimeSpan timeSpan1, ITimeSpan timeSpan2, MathOperation operation, TimeSpanMode mode)
        {
            TimeSpan1 = timeSpan1;
            TimeSpan2 = timeSpan2;
            Operation = operation;
            Mode = mode;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets the first <see cref="ITimeSpan"/>.
        /// </summary>
        public ITimeSpan TimeSpan1 { get; }

        /// <summary>
        /// Gets the second <see cref="ITimeSpan"/>.
        /// </summary>
        public ITimeSpan TimeSpan2 { get; }

        /// <summary>
        /// Gets the mathematical operation between <see cref="TimeSpan1"/> and <see cref="TimeSpan2"/>.
        /// </summary>
        public MathOperation Operation { get; }

        /// <summary>
        /// Get the mode of the mathematical operation represented by the current <see cref="MathTimeSpan"/>.
        /// </summary>
        public TimeSpanMode Mode { get; }

        #endregion

        #region Operators

        /// <summary>
        /// Determines if two <see cref="MathTimeSpan"/> objects are equal.
        /// </summary>
        /// <param name="timeSpan1">The first <see cref="MathTimeSpan"/> to compare.</param>
        /// <param name="timeSpan2">The second <see cref="MathTimeSpan"/> to compare.</param>
        /// <returns><c>true</c> if time spans are equal, <c>false</c> otherwise.</returns>
        public static bool operator ==(MathTimeSpan timeSpan1, MathTimeSpan timeSpan2)
        {
            if (ReferenceEquals(timeSpan1, timeSpan2))
                return true;

            if (ReferenceEquals(null, timeSpan1) || ReferenceEquals(null, timeSpan2))
                return false;

            return timeSpan1.TimeSpan1.Equals(timeSpan2.TimeSpan1) &&
                   timeSpan1.TimeSpan2.Equals(timeSpan2.TimeSpan2) &&
                   timeSpan1.Operation == timeSpan2.Operation &&
                   timeSpan1.Mode == timeSpan2.Mode;
        }

        /// <summary>
        /// Determines if two <see cref="MathTimeSpan"/> objects are not equal.
        /// </summary>
        /// <param name="timeSpan1">The first <see cref="MathTimeSpan"/> to compare.</param>
        /// <param name="timeSpan2">The second <see cref="MathTimeSpan"/> to compare.</param>
        /// <returns><c>false</c> if time spans are equal, <c>true</c> otherwise.</returns>
        public static bool operator !=(MathTimeSpan timeSpan1, MathTimeSpan timeSpan2)
        {
            return !(timeSpan1 == timeSpan2);
        }

        #endregion

        #region Overrides

        /// <summary>
        /// Returns a string that represents the current object.
        /// </summary>
        /// <returns>A string that represents the current object.</returns>
        public override string ToString()
        {
            var operationString = Operation == MathOperation.Add
                ? "+"
                : "-";

            var modeStrings = ModeStrings[Mode];

            return $"({TimeSpan1}{modeStrings.Item1} {operationString} {TimeSpan2}{modeStrings.Item2})";
        }

        /// <summary>
        /// Determines whether the specified object is equal to the current object.
        /// </summary>
        /// <param name="obj">The object to compare with the current object.</param>
        /// <returns><c>true</c> if the specified object is equal to the current object; otherwise, <c>false</c>.</returns>
        public override bool Equals(object obj)
        {
            return this == (obj as MathTimeSpan);
        }

        /// <summary>
        /// Returns the hash code for this instance.
        /// </summary>
        /// <returns>A 32-bit signed integer hash code.</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var result = 17;
                result = result * 23 + TimeSpan1.GetHashCode();
                result = result * 23 + TimeSpan2.GetHashCode();
                result = result * 23 + Operation.GetHashCode();
                result = result * 23 + Mode.GetHashCode();
                return result;
            }
        }

        #endregion

        #region ITimeSpan

        /// <summary>
        /// Adds a time span to the current one.
        /// </summary>
        /// <remarks>
        /// If <paramref name="timeSpan"/> and the current time span have the same type,
        /// the result time span will be of this type too; otherwise - of the <see cref="MathTimeSpan"/>.
        /// </remarks>
        /// <param name="timeSpan">Time span to add to the current one.</param>
        /// <param name="mode">Mode of the operation that defines meaning of time spans the
        /// operation will be performed on.</param>
        /// <returns>Time span that is a sum of the <paramref name="timeSpan"/> and the
        /// current time span.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="timeSpan"/> is invalid.</exception>
        /// <exception cref="InvalidEnumArgumentException"><paramref name="mode"/> specified an invalid value.</exception>
        public ITimeSpan Add(ITimeSpan timeSpan, TimeSpanMode mode)
        {
            ThrowIfArgument.IsNull(nameof(timeSpan), timeSpan);
            ThrowIfArgument.IsInvalidEnumValue(nameof(mode), mode);

            return TimeSpanUtilities.Add(this, timeSpan, mode);
        }

        /// <summary>
        /// Subtracts a time span from the current one.
        /// </summary>
        /// <remarks>
        /// If <paramref name="timeSpan"/> and the current time span have the same type,
        /// the result time span will be of this type too; otherwise - of the <see cref="MathTimeSpan"/>.
        /// </remarks>
        /// <param name="timeSpan">Time span to subtract from the current one.</param>
        /// <param name="mode">Mode of the operation that defines meaning of time spans the
        /// operation will be performed on.</param>
        /// <returns>Time span that is a difference between the <paramref name="timeSpan"/> and the
        /// current time span.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="timeSpan"/> is invalid.</exception>
        /// <exception cref="InvalidEnumArgumentException"><paramref name="mode"/> specified an invalid value.</exception>
        public ITimeSpan Subtract(ITimeSpan timeSpan, TimeSpanMode mode)
        {
            ThrowIfArgument.IsNull(nameof(timeSpan), timeSpan);
            ThrowIfArgument.IsInvalidEnumValue(nameof(mode), mode);

            return TimeSpanUtilities.Subtract(this, timeSpan, mode);
        }

        /// <summary>
        /// Stretches the current time span by multiplying its length by the specified multiplier.
        /// </summary>
        /// <param name="multiplier">Multiplier to stretch the time span by.</param>
        /// <returns>Time span that is the current time span stretched by the <paramref name="multiplier"/>.</returns>
        /// <exception cref="ArgumentOutOfRangeException"><paramref name="multiplier"/> is negative.</exception>
        public ITimeSpan Multiply(double multiplier)
        {
            ThrowIfArgument.IsNegative(nameof(multiplier), multiplier, "Multiplier is negative.");

            return new MathTimeSpan(TimeSpan1.Multiply(multiplier),
                                    TimeSpan2.Multiply(multiplier),
                                    Operation,
                                    Mode);
        }

        /// <summary>
        /// Shrinks the current time span by dividing its length by the specified divisor.
        /// </summary>
        /// <param name="divisor">Divisor to shrink the time span by.</param>
        /// <returns>Time span that is the current time span shrinked by the <paramref name="divisor"/>.</returns>
        /// <exception cref="ArgumentOutOfRangeException"><paramref name="divisor"/> is zero or negative.</exception>
        public ITimeSpan Divide(double divisor)
        {
            ThrowIfArgument.IsNegative(nameof(divisor), divisor, "Divisor is negative.");

            return new MathTimeSpan(TimeSpan1.Divide(divisor),
                                    TimeSpan2.Divide(divisor),
                                    Operation,
                                    Mode);
        }

        /// <summary>
        /// Clones the current time span.
        /// </summary>
        /// <returns>Copy of the current time span.</returns>
        public ITimeSpan Clone()
        {
            return new MathTimeSpan(TimeSpan1.Clone(), TimeSpan2.Clone(), Operation, Mode);
        }

        /// <summary>
        /// Compares the current instance with another object of the same type and returns
        /// an integer that indicates whether the current instance precedes, follows, or
        /// occurs in the same position in the sort order as the other object.
        /// </summary>
        /// <param name="other">An object to compare with this instance.</param>
        /// <returns><para>A value that indicates the relative order of the objects being compared. The
        /// return value has these meanings:</para>
        /// <list type="table">
        /// <listheader>
        /// <term>Value</term>
        /// <description>Meaning</description>
        /// </listheader>
        /// <item>
        /// <term>Less than zero</term>
        /// <description>This instance precedes <paramref name="other"/> in the sort order.</description>
        /// </item>
        /// <item>
        /// <term>Zero</term>
        /// <description>This instance occurs in the same position in the sort order as <paramref name="other"/>.</description>
        /// </item>
        /// <item>
        /// <term>Greater than zero</term>
        /// <description>This instance follows <paramref name="other"/> in the sort order.</description>
        /// </item>
        /// </list>
        /// </returns>
        public int CompareTo(object other)
        {
            throw new InvalidOperationException("Cannot compare MathTimeSpan.");
        }

        #endregion
    }
}


text:
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using QueryParameter = System.Collections.Generic.KeyValuePair<string, string>;

namespace DevDefined.OAuth.Framework
{

  public static class UriUtility
  {
    const string AuthorizationHeaderRealmParameter = "realm";
    const string OAuthAuthorizationHeaderStart = "OAuth";
    const string UnreservedChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~";
    static readonly string[] QuoteCharacters = new[] {"\"", "'"};

    /// <summary>
    /// Extracts all the parameters from the supplied encoded parameters.
    /// </summary>
    /// <param name="parameters"></param>
    /// <returns></returns>
    public static List<QueryParameter> GetQueryParameters(string parameters)
    {
      if (parameters.StartsWith("?"))
      {
        parameters = parameters.Remove(0, 1);
      }

      var result = new List<QueryParameter>();

      if (!string.IsNullOrEmpty(parameters))
      {
        string[] p = parameters.Split('&');
        foreach (string s in p)
        {
          if (!string.IsNullOrEmpty(s) && !s.StartsWith(Parameters.OAuthParameterPrefix))
          {
            if (s.IndexOf('=') > -1)
            {
              string[] temp = s.Split('=');
              result.Add(new QueryParameter(temp[0], temp[1]));
            }
            else
            {
              result.Add(new QueryParameter(s, string.Empty));
            }
          }
        }
      }

      return result;
    }

    /// <summary>
    /// Extracts all the parameters from the supplied encoded parameters.
    /// </summary>
    /// <param name="parameters"></param>
    /// <returns></returns>
    public static List<QueryParameter> GetHeaderParameters(string parameters)
    {
      parameters = parameters.Trim();

      var result = new List<QueryParameter>();

      if (!parameters.StartsWith(OAuthAuthorizationHeaderStart, StringComparison.InvariantCultureIgnoreCase))
      {
        return result;
      }

      parameters = parameters.Substring(OAuthAuthorizationHeaderStart.Length).Trim();

      if (!string.IsNullOrEmpty(parameters))
      {
        string[] p = parameters.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries);

        foreach (string s in p)
        {
          if (string.IsNullOrEmpty(s)) continue;
          QueryParameter parameter = ParseAuthorizationHeaderKeyValuePair(s);
          if (parameter.Key != AuthorizationHeaderRealmParameter)
          {
            result.Add(parameter);
          }
        }
      }

      return result;
    }

    static QueryParameter ParseAuthorizationHeaderKeyValuePair(string keyEqualValuePair)
    {
        if (keyEqualValuePair.IndexOf('=') > -1)
        {
            string[] temp = keyEqualValuePair.Split('=');

            string itemValue = temp[1];
            itemValue = StripQuotes(itemValue);
            itemValue = Uri.UnescapeDataString(itemValue); // HttpUtility.UrlDecode(itemValue)

            return new QueryParameter(temp[0].Trim(), itemValue);
        }
        return new QueryParameter(keyEqualValuePair.Trim(), string.Empty);
    }

    static string StripQuotes(string quotedValue)
    {
      foreach (string quoteCharacter in QuoteCharacters)
      {
        if (quotedValue.StartsWith(quoteCharacter) && quotedValue.EndsWith(quoteCharacter) && quotedValue.Length > 1)
        {
          return quotedValue.Substring(1, quotedValue.Length - 2);
        }
      }

      return quotedValue;
    }

    /// <summary>
    /// An OAuth specific implementation of Url Encoding - we need this to produce consistent base
    /// strings to other platforms such as php or ruby, as the <see cref="HttpUtility.UrlEncode" />
    /// doesn't encode in the same way.
    /// </summary>
    /// <remarks>
    /// Taken from: http://oauth.net/core/1.0a/#encoding_parameters
    /// All parameter names and values are escaped using the [RFC3986] percent-encoding (%xx) mechanism.
    /// Characters not in the unreserved character set ([RFC3986] section 2.3) MUST be encoded. Characters
    /// in the unreserved character set MUST NOT be encoded. Hexadecimal characters in encodings MUST
    /// be upper case. Text names and values MUST be encoded as UTF-8 octets before percent-encoding
    /// them per [RFC3629].
    /// </remarks>
    /// <param name="value"></param>
    /// <returns></returns>
    public static string UrlEncode(string value)
    {
      if (value == null) return null;

      var result = new StringBuilder();

      foreach (char symbol in value)
      {
        if (UnreservedChars.IndexOf(symbol) != -1)
        {
          // Characters in the unreserved character set MUST NOT be encoded.
          result.Append(symbol);
        }
        else
        {
          // Text names and values MUST be encoded as UTF-8 octets before percent-encoding them
          byte[] utf8Octets = Encoding.UTF8.GetBytes(new[] { symbol });

          foreach (byte utf8Octet in utf8Octets)
          {
              // Second, the each octet should be %nn encoded
              result.Append('%' + String.Format("{0:X2}", (int) utf8Octet));
          }
        }
      }

      return result.ToString();
    }

    /// <summary>
    /// Formats a set of query parameters, as per query string encoding.
    /// </summary>
    /// <param name="parameters"></param>
    /// <returns></returns>
    public static string FormatQueryString(IEnumerable<KeyValuePair<string, string>> parameters)
    {
      var builder = new StringBuilder();

      if (parameters != null)
      {
        foreach (var pair in parameters)
        {
          if (builder.Length > 0) builder.Append("&");
          builder.Append(pair.Key).Append("=");
          builder.Append(UrlEncode(pair.Value));
        }
      }

      return builder.ToString();
    }

    /// <summary>
    /// Formats a set of query parameters, as per query string encoding.
    /// </summary>
    /// <param name="parameters"></param>
    /// <returns></returns>
    public static string FormatQueryString(NameValueCollection parameters)
    {
      var builder = new StringBuilder();

      if (parameters != null)
      {
        foreach (string key in parameters.Keys)
        {
          if (builder.Length > 0) builder.Append("&");
          builder.Append(key).Append("=");
          builder.Append(UrlEncode(parameters[key]));
        }
      }

      return builder.ToString();
    }

    /// <summary>
    /// Takes an http method, url and a set of parameters and formats them as a signature base as per the OAuth core spec.
    /// </summary>
    /// <param name="httpMethod"></param>
    /// <param name="url"></param>
    /// <param name="parameters"></param>
    /// <returns></returns>
    public static string FormatParameters(string httpMethod, Uri url, List<QueryParameter> parameters)
    {
      string normalizedRequestParameters = NormalizeRequestParameters(parameters);

      var signatureBase = new StringBuilder();
      signatureBase.AppendFormat("{0}&", httpMethod.ToUpper());

      signatureBase.AppendFormat("{0}&", UrlEncode(NormalizeUri(url)));
      signatureBase.AppendFormat("{0}", UrlEncode(normalizedRequestParameters));

      return signatureBase.ToString();
    }

    /// <summary>
    /// Normalizes a sequence of key/value pair parameters as per the OAuth core specification.
    /// </summary>
    /// <param name="parameters"></param>
    /// <returns></returns>
    public static string NormalizeRequestParameters(IEnumerable<QueryParameter> parameters)
    {
      IComparer<string> stringComparer = new LexicographicalByteValueStringComparer();

      IEnumerable<QueryParameter> orderedParameters = parameters
        .OrderBy(x => x.Key, stringComparer)
        .ThenBy(x => x.Value, stringComparer)
        .Select(x => new QueryParameter(x.Key, UrlEncode(x.Value)));

      var builder = new StringBuilder();

      foreach (var parameter in orderedParameters)
      {
        if (builder.Length > 0) builder.Append("&");

        builder.Append(parameter.Key).Append("=").Append(parameter.Value);
      }

      return builder.ToString();
    }

    /// <summary>
    /// Normalizes a Url according to the OAuth specification (this ensures http or https on a default port is not displayed
    /// with the :XXX following the host in the url).
    /// </summary>
    /// <param name="uri"></param>
    /// <returns></returns>
    public static string NormalizeUri(Uri uri)
    {
      string normalizedUrl = string.Format("{0}://{1}", uri.Scheme, uri.Host);

      if (!((uri.Scheme == "http" && uri.Port == 80) ||
            (uri.Scheme == "https" && uri.Port == 443)))
      {
        normalizedUrl += ":" + uri.Port;
      }

      return normalizedUrl + ((uri.AbsolutePath == "/") ? "" : uri.AbsolutePath);
    }

    public static IEnumerable<QueryParameter> ToQueryParameters(this NameValueCollection source)
    {
      foreach (string key in source.AllKeys)
      {
        yield return new QueryParameter(key, source[key]);
      }
    }

    public static IEnumerable<QueryParameter> ToQueryParametersExcludingTokenSecret(this NameValueCollection source)
    {
      foreach (string key in source.AllKeys)
      {
        if (key != Parameters.OAuth_Token_Secret)
        {
          yield return new QueryParameter(key, source[key]);
        }
      }
    }

    public static NameValueCollection ToNameValueCollection(this IEnumerable<QueryParameter> source)
    {
      var collection = new NameValueCollection();

      foreach (var parameter in source)
      {
        collection[parameter.Key] = parameter.Value;
      }

      return collection;
    }

    public static string FormatTokenForResponse(IToken token)
    {
      var builder = new StringBuilder();

      builder.Append(Parameters.OAuth_Token).Append("=").Append(UrlEncode(token.Token))
        .Append("&").Append(Parameters.OAuth_Token_Secret).Append("=").Append(UrlEncode(token.TokenSecret));

      return builder.ToString();
    }

    public static NameValueCollection ParseQueryString(string queryString)
    {
        if (queryString.StartsWith("?"))
            queryString = queryString.Remove(0, 1);

        NameValueCollection collection = new NameValueCollection();

        if (string.IsNullOrEmpty(queryString))
            return collection;

        foreach (string s in queryString.Split('&').Where(s => !string.IsNullOrEmpty(s)))
        {
            if (s.IndexOf('=') > -1)
            {
                string[] temp = s.Split('=');
                collection.Add(Uri.UnescapeDataString(temp[0]), Uri.UnescapeDataString(temp[1]));
            }
            else
            {
                collection.Add(s, string.Empty);
            }
        }

        return collection;
    }

    /// <summary>
    /// Lexicographical byte value string comparer
    /// </summary>
    /// <remarks>
    /// Adapted from http://stackoverflow.com/questions/839429/oauth-lexicographical-byte-value-ordering-in-c
    /// </remarks>
    private class LexicographicalByteValueStringComparer : IComparer<string>
    {
        public int Compare(string x, string y)
        {
            return string.Compare(x, y, StringComparison.Ordinal);
        }
    }

  }
}


text:
package vpc

//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// BgpPeer is a nested struct in vpc response
type BgpPeer struct {
	Name          string `json:"Name" xml:"Name"`
	Description   string `json:"Description" xml:"Description"`
	BgpPeerId     string `json:"BgpPeerId" xml:"BgpPeerId"`
	BgpGroupId    string `json:"BgpGroupId" xml:"BgpGroupId"`
	PeerIpAddress string `json:"PeerIpAddress" xml:"PeerIpAddress"`
	PeerAsn       string `json:"PeerAsn" xml:"PeerAsn"`
	AuthKey       string `json:"AuthKey" xml:"AuthKey"`
	RouterId      string `json:"RouterId" xml:"RouterId"`
	BgpStatus     string `json:"BgpStatus" xml:"BgpStatus"`
	Status        string `json:"Status" xml:"Status"`
	Keepalive     string `json:"Keepalive" xml:"Keepalive"`
	LocalAsn      string `json:"LocalAsn" xml:"LocalAsn"`
	Hold          string `json:"Hold" xml:"Hold"`
	IsFake        string `json:"IsFake" xml:"IsFake"`
	RouteLimit    string `json:"RouteLimit" xml:"RouteLimit"`
	RegionId      string `json:"RegionId" xml:"RegionId"`
	EnableBfd     bool   `json:"EnableBfd" xml:"EnableBfd"`
	IpVersion     string `json:"IpVersion" xml:"IpVersion"`
	BfdMultiHop   int    `json:"BfdMultiHop" xml:"BfdMultiHop"`
}


text:
<?php

namespace FOS\MessageBundle\Security;

use FOS\MessageBundle\Model\ThreadInterface;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use FOS\MessageBundle\Model\ParticipantInterface;
use FOS\MessageBundle\Security\ParticipantProviderInterface;

/**
 * Manages permissions to manipulate threads and messages
 *
 * @author Thibault Duplessis <thibault.duplessis@gmail.com>
 */
class Authorizer implements AuthorizerInterface
{
    /**
     * The participant provider
     *
     * @var ParticipantProviderInterface
     */
    protected $participantProvider;

    public function __construct(ParticipantProviderInterface $participantProvider)
    {
        $this->participantProvider = $participantProvider;
    }

    /**
     * Tells if the current participant is allowed
     * to see this thread
     *
     * @param ThreadInterface $thread
     * @return boolean
     */
    public function canSeeThread(ThreadInterface $thread)
    {
        return $this->getAuthenticatedParticipant() && $thread->isParticipant($this->getAuthenticatedParticipant());
    }

    /**
     * Tells if the current participant is allowed
     * to delete this thread
     *
     * @param ThreadInterface $thread
     * @return boolean
     */
    public function canDeleteThread(ThreadInterface $thread)
    {
        return $this->canSeeThread($thread);
    }

    /**
     * Tells if the current participant is allowed
     * to send a message to this other participant
     *
     * @param ParticipantInterface $participant the one we want to send a message to
     * @return boolean
     */
    public function canMessageParticipant(ParticipantInterface $participant)
    {
        return true;
    }

    /**
     * Gets the current authenticated user
     *
     * @return ParticipantInterface
     */
    protected function getAuthenticatedParticipant()
    {
        return $this->participantProvider->getAuthenticatedParticipant();
    }
}


text:
Night
====
Set the time in a certain world to night.

Usage: /night

Aliases: night, nighttime

Module: [time](../modules/time.md)

Basic permission: uc.time.time.night

Basic role: admin

Permissions:

* **uc.time.time.night** - Recommended role: admin
Allows you to set the time to night.
* **uc.time.time.base** - Recommended role: mod
Allows you to use the /time command.