text:
/** @file
    @brief Header

    @date 2016

    @author
    Sensics, Inc.
    <http://sensics.com/osvr>
*/

// Copyright 2016 Razer Inc.
//
// 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.

#ifndef INCLUDED_DriverWrapper_h_GUID_F3D0F445_80E9_4C85_2CE4_E36293ED03F8
#define INCLUDED_DriverWrapper_h_GUID_F3D0F445_80E9_4C85_2CE4_E36293ED03F8

// Internal Includes
#include "ChaperoneData.h"
#include "DeviceHolder.h"
#include "DriverContext.h"
#include "DriverLoader.h"
#include "DriverLog.h"
#include "DriverManager.h"
#include "FindDriver.h"
#include "GetProvider.h"
#include "Properties.h"
#include "Resources.h"
#include "ServerDriverHost.h"
#include "Settings.h"

// Library/third-party includes
// - none

// Standard includes
#include <algorithm>
#include <cstdint>
#include <iterator>
#include <memory>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>

namespace osvr {
namespace vive {
    namespace detail {
        /// Given something like ITrackedDeviceServerDriver_004, returns
        /// ITrackedDeviceServerDriver
        inline std::string
        getInterfaceName(std::string const &interfaceVersionString) {
            auto pos = interfaceVersionString.find('_');
            if (std::string::npos == pos) {
                /// error case:
                /// passed-in string isn't an interface version string as we
                /// expect it.
                /// Return the whole thing.
                return interfaceVersionString;
            }
            return interfaceVersionString.substr(0, pos);
        }

        /// Helper function for dealing with the arrays of string literals used
        /// in the list of interface version strings.
        template <typename F>
        inline void for_each_const_string_array(const char *const *strings,
                                                F &&functor) {
            while (*strings != nullptr) {
                std::forward<F>(functor)(*strings);
                ++strings;
            }
        }

        /// Helper class managing a list of supported interface version strings.
        class InterfaceVersionSupport {
          public:
            InterfaceVersionSupport() : supportedInterfaces_(populate()) {}
            InterfaceVersionSupport &
            operator=(InterfaceVersionSupport const &) = delete;

            /// Given a string (or something convertible to it) that is an
            /// interface version string, checks to see if it is supported.
            template <typename T>
            bool isSupportedInterfaceVersionString(T const &ifaceVerStr) const {
                return std::binary_search(supportedInterfaces_.cbegin(),
                                          supportedInterfaces_.cend(),
                                          ifaceVerStr);
            }

            /// Given a string (or convertible) without the _\d\d\d version
            /// suffix, searches the supported list for it and if found, returns
            /// the full version string corresponding to it. Returns an empty
            /// string if the interface wasn't found.
            template <typename T>
            std::string
            findVersionStringForInterface(T const &interfaceName) const {
                auto it =
                    std::upper_bound(supportedInterfaces_.begin(),
                                     supportedInterfaces_.end(), interfaceName);
                std::string ret;
                if (supportedInterfaces_.end() == it) {
                    // we didn't find it - hit the end
                    return ret;
                }
                auto ifaceName = getInterfaceName(*it);
                if (ifaceName != interfaceName) {
                    // we didn't find it - in the middle
                    return ret;
                }
                // ok, we found it
                ret = *it;
                return ret;
            }

            /// Like findVersionStringForInterface() except that you may also
            /// pass a full interface version string, which will be trimmed to
            /// just the interface name for you automatically.
            std::string findSupportedVersionOfInterface(
                std::string const &ifaceString) const {
                return findVersionStringForInterface(
                    getInterfaceName(ifaceString));
            }

          private:
            using Container = std::vector<std::string>;
            /// Function to create and populate the supported interface
            /// container, so the object's data member may be const.
            static Container populate() {
                Container ret;
                // Populate a vector with all the supported interfaces.
                for_each_const_string_array(
                    vr::k_InterfaceVersions,
                    [&](const char *str) { ret.emplace_back(str); });

                // so we can use binary_search
                std::sort(ret.begin(), ret.end());
                return ret;
            }
            const Container supportedInterfaces_;
        };

        /// A list of just the interface names we actually use.
        static const auto interfaceNamesWeCareAbout = {
            "ITrackedDeviceServerDriver", "IVRDisplayComponent",
            "IVRControllerComponent", //< @todo do we actually use/cast to
                                      // this interface?
            "IServerTrackedDeviceProvider", "IVRWatchdogProvider"};

    } // namespace detail

    inline bool isInterfaceNameWeCareAbout(std::string const &interfaceName) {
        return std::find(detail::interfaceNamesWeCareAbout.begin(),
                         detail::interfaceNamesWeCareAbout.end(),
                         interfaceName) !=
               detail::interfaceNamesWeCareAbout.end();
    }

    /// The do-nothing driver logger.
    class NullDriverLog : public vr::IVRDriverLog {
      public:
        void Log(const char *) override {}
    };

    class DriverWrapper {
      public:
        using DriverVector = std::vector<vr::ITrackedDeviceServerDriver *>;

        /// Constructor for when you have your own subclass of ServerDriverHost
        /// to pass in.
        explicit DriverWrapper(vr::ServerDriverHost *serverDriverHost)
            : serverDriverHost_(serverDriverHost),
              locations_(findLocationInfoForDriver()) {
            commonInit_();
        }

        /// Default constructor: we make and own our own ServerDriverHost.
        DriverWrapper()
            : owningServerDriverHost_(new vr::ServerDriverHost),
              serverDriverHost_(owningServerDriverHost_.get()),
              locations_(findLocationInfoForDriver()) {
            commonInit_();
        }

        ~DriverWrapper() { stop(); }

        DriverWrapper(DriverWrapper const &) = delete;
        DriverWrapper &operator=(DriverWrapper const &) = delete;

#if defined(_MSC_VER) && _MSC_VER < 1900
        /// Move constructor
        /// VS2013 doesn't know how to make a default move constructor :(
        DriverWrapper(DriverWrapper &&other)
            : owningServerDriverHost_(std::move(other.owningServerDriverHost_)),
              serverDriverHost_(std::move(other.serverDriverHost_)),
              locations_(std::move(other.locations_)),
              chaperone_(std::move(other.chaperone_)),
              loader_(std::move(other.loader_)),
              serverDeviceProvider_(std::move(other.serverDeviceProvider_)),
              devices_(std::move(other.devices_)) {}
#else
        /// Move constructor
        DriverWrapper(DriverWrapper &&other) = default;
#endif

        explicit operator bool() const {
            /// If you have the driver loaded and the config dirs found, that
            /// implies you found the driver.
            return foundConfigDirs() && haveDriverLoaded() &&
                   haveServerDeviceHost();
        }

        bool foundDriver() const { return locations_.driverFound; }

        std::string const &getDriverFileLocation() const {
            return locations_.driverFile;
        }

        bool foundConfigDirs() const { return locations_.configFound; }

        std::string const &getDriverConfigDir() const {
            return locations_.driverConfigDir;
        }

        std::string const &getRootConfigDir() const {
            return locations_.rootConfigDir;
        }

        bool haveDriverLoaded() const {
            // only one of these pointers will ever be initialized at a time,
            // since we move from loader_ to initialize serverDeviceProvider_

            // loader_ has an explicit operator bool to check its success, hence
            // the longer check.
            return (static_cast<bool>(loader_) &&
                    static_cast<bool>(*loader_)) ||
                   static_cast<bool>(serverDeviceProvider_);
        }

        bool haveServerDeviceHost() const {
            return static_cast<bool>(serverDriverHost_ != nullptr);
        }

        /// This must be called before accessing the server device provider.
        ///
        /// @param quiet If true (default), a "null" driver logger will be
        /// passed that discards all log data.
        ///
        /// @return false if it could not be started
        bool startServerDeviceProvider(bool quiet = true) {
            if (!(foundDriver() && foundConfigDirs() && haveDriverLoaded() &&
                  haveServerDeviceHost())) {
                return false;
            }
            if (serverDeviceProvider_) {
                return true;
            }
            vr::IVRDriverLog *logger = nullptr;
            if (quiet) {
                logger = &nullDriverLog_;
            }

            settings_ = new vr::Settings();
            driverLog_ = new vr::DriverLog();
            properties_ = new vr::Properties();
            driverManager_ = new vr::DriverManager();
            resources_ = new vr::Resources();
            context_ =
                new vr::DriverContext(serverDriverHost_, settings_, driverLog_,
                                      properties_, driverManager_, resources_);

            vr::EVRInitError err;
            err = Init();

            serverDeviceProvider_ =
                getProvider<vr::IServerTrackedDeviceProvider>(
                    std::move(loader_), context_);

            return static_cast<bool>(serverDeviceProvider_);
        }

        vr::EVRInitError Init() {
            VR_INIT_SERVER_DRIVER_CONTEXT(context_);
            return vr::VRInitError_None;
        }

        enum class InterfaceVersionStatus {
            /// All mentioned interface version strings are handled/described by
            /// the header we've built against.
            AllInterfacesOK,
            /// Not all mentioned interface version strings are
            /// handled/described by the header we've built against, but the
            /// interfaces that we use match.
            AllUsedInterfacesOK,
            /// At least one of the interfaces that we use doesn't match the
            /// version we built against.
            InterfaceMismatch
        };

        InterfaceVersionStatus checkServerDeviceProviderInterfaces() {
            /// Now, go through the interfaces mentioned by the driver.
            bool allUsedSupported = true;
            unsupportedRequestedInterfaces_.clear();

            detail::for_each_const_string_array(
                serverDevProvider().GetInterfaceVersions(),
                [&](const char *iface) {
                    auto ifaceStr = std::string{iface};
                    auto found =
                        supportedInterfaces_.isSupportedInterfaceVersionString(
                            ifaceStr);
                    if (!found) {
                        // Record all interfaces we didn't find.
                        unsupportedRequestedInterfaces_.emplace_back(ifaceStr);
                        // See if not finding this interface will cause a
                        // problem.
                        bool isUsed = isInterfaceNameWeCareAbout(
                            detail::getInterfaceName(iface));
                        if (isUsed) {
                            allUsedSupported = false;
                        }
                    }
                });
            return allUsedSupported
                       ? (unsupportedRequestedInterfaces_.empty()
                              ? InterfaceVersionStatus::AllInterfacesOK
                              : InterfaceVersionStatus::AllUsedInterfacesOK)
                       : InterfaceVersionStatus::InterfaceMismatch;
        }

        /// If checkServerDeviceProviderInterfaces is not
        /// InterfaceVersionStatus::AllInterfacesOK, this will
        /// return access to a non-empty list of interfaces that the device
        /// driver reports that were not available in the headers we
        /// compiled against.
        std::vector<std::string> const &
        getUnsupportedRequestedInterfaces() const {
            return unsupportedRequestedInterfaces_;
        }

        detail::InterfaceVersionSupport const &
        getSupportedInterfaceVersions() const {
            return supportedInterfaces_;
        }

        vr::IServerTrackedDeviceProvider &serverDevProvider() const {
            if (!haveDriverLoaded() || !serverDeviceProvider_) {
                throw std::logic_error("Attempted to access server device "
                                       "provider when driver loading or device "
                                       "provider initialization failed or was "
                                       "not yet completed!!");
            }
            return *serverDeviceProvider_;
        }

        vr::ServerDriverHost &driverHost() const { return *serverDriverHost_; }

        /// Access to the object that manages the array of device pointers,
        /// corresponding to the indices you assign them.
        DeviceHolder &devices() { return devices_; }

        /// @overload
        /// Const access
        DeviceHolder const &devices() const { return devices_; }

        bool haveChaperoneData() const { return static_cast<bool>(chaperone_); }
        ChaperoneData &chaperone() { return *chaperone_; }

        /// Set whether all devices should be deactivated on shutdown - defaults
        /// to true, so you might just want to set to false if, for instance,
        /// you deactivate and power off the devices on shutdown yourself.
        void disableDeactivateDevicesOnShutdown() {
            devices_.disableDeactivateOnShutdown();
        }

        /// Indicate to the system that you're preparing to stop the system.
        ///
        /// Sets the exiting flag on the server driver host, and if still
        /// enabled, deactivates all devices.
        void stop() {
            if (haveServerDeviceHost()) {
                serverDriverHost_->setExiting();
            }
            if (devices_.shouldDeactivateOnShutdown()) {
                devices_.deactivateAll();
            }
        }

      private:
        void commonInit_() {

            if (!foundDriver()) {
                return;
            }
            if (!foundConfigDirs()) {
                return;
            }
            chaperone_.reset(new ChaperoneData(getRootConfigDir()));

            loader_ = DriverLoader::make(locations_.driverRoot,
                                         locations_.driverFile);
            if (!haveDriverLoaded()) {
                return;
            }
        }

        /// This pointer manages lifetime if we created our own host but isn't
        /// accessed beyond that.
        std::unique_ptr<vr::ServerDriverHost> owningServerDriverHost_;
        /// This pointer is the one used, whether we create our own or get one
        /// passed in.
        vr::ServerDriverHost *serverDriverHost_;

        LocationInfo locations_;
        std::unique_ptr<ChaperoneData> chaperone_;

        std::unique_ptr<DriverLoader> loader_;
        ProviderPtr<vr::IServerTrackedDeviceProvider> serverDeviceProvider_;

        detail::InterfaceVersionSupport supportedInterfaces_;
        std::vector<std::string> unsupportedRequestedInterfaces_;

        DeviceHolder devices_;
        NullDriverLog nullDriverLog_;

        /// This context pointer is used in calling the
        /// IServerTrackedDeviceProvider.Init
        /// the next three object ptrs are used for context
        vr::DriverContext *context_;
        vr::Settings *settings_;
        vr::DriverLog *driverLog_;
        vr::Properties *properties_;
        vr::DriverManager *driverManager_;
        vr::Resources *resources_;
    };
} // namespace vive
} // namespace osvr

#endif // INCLUDED_DriverWrapper_h_GUID_F3D0F445_80E9_4C85_2CE4_E36293ED03F8


text:
import { Component } from '@angular/core';

@Component({
    selector: 'dropdown-demo',
    templateUrl: './dropdown.html'
})
export class DropdownDemo {

}

redpajama_set_name: RedPajamaGithub


text:
package main

type SmoothStreamingMedia struct {
	MinorVersion		int	`xml:"MinorVersion,attr"`
	Duration		int	`xml:"Duration,attr"`
	MajorVersion		int	`xml:"MajorVersion,attr"`
	ProtectionHeader	ProtectionHeader	`xml:"Protection>ProtectionHeader"`
	StreamIndex		[]StreamIndex	`xml:"StreamIndex"`
}

type ProtectionHeader struct {
	SystemID		string	`xml:"SystemID,attr"`
	Text			string	`xml:",chardata"`
}
type StreamIndex struct {
	Language		string	`xml:"Language,attr"`
	Chunks			int	`xml:"Chunks,attr"`
	Url			string	`xml:"Url,attr"`
	QualityLevels		int	`xml:"QualityLevels,attr"`
	Type			string	`xml:"Type,attr"`
	Name			string	`xml:"Name,attr"`
	Subtype			string	`xml:"Subtype,attr"`
	QualityLevel		[]QualityLevel	`xml:"QualityLevel"`
	Fragment		[]Fragment	`xml:"c"`
}
type QualityLevel struct {
	Bitrate			int	`xml:"Bitrate,attr"`
	MaxWidth		int	`xml:"MaxWidth,attr"`
	FourCC			string	`xml:"FourCC,attr"`
	CodecPrivateData	string	`xml:"CodecPrivateData,attr"`
	MaxHeight		int	`xml:"MaxHeight,attr"`
	Index			int	`xml:"Index,attr"`
	PacketSize		int	`xml:"PacketSize,attr"`
	Channels		int	`xml:"Channels,attr"`
	AudioTag		string	`xml:"AudioTag,attr"`
	BitsPerSample		int	`xml:"BitsPerSample,attr"`
	SamplingRate		int	`xml:"SamplingRate,attr"`
}
type Fragment struct {
	Duration		int	`xml:"d,attr"`
	Timestamp		int	`xml:"t,attr"`
}


text:
using System.Net.Sockets;
using System.Net.Tests;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;

using Xunit;

namespace System.Net.Security.Tests
{
    public class CertificateValidationRemoteServer
    {
        [ActiveIssue(5555, PlatformID.OSX)]
        [Fact]
        public async Task CertificateValidationRemoteServer_EndToEnd_Ok()
        {
            using (var client = new TcpClient(AddressFamily.InterNetwork))
            {
                await client.ConnectAsync(HttpTestServers.Host, 443);

                using (SslStream sslStream = new SslStream(client.GetStream(), false, RemoteHttpsCertValidation, null))
                {
                    await sslStream.AuthenticateAsClientAsync(HttpTestServers.Host);
                }
            }
        }

        private bool RemoteHttpsCertValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
        {
            Assert.Equal(SslPolicyErrors.None, sslPolicyErrors);

            return true;
        }
    }
}


text:
<?php

final class ReleephBranchNamePreviewController
  extends ReleephController {

  public function processRequest() {
    $request = $this->getRequest();

    $is_symbolic = $request->getBool('isSymbolic');
    $template = $request->getStr('template');

    if (!$is_symbolic && !$template) {
      $template = ReleephBranchTemplate::getDefaultTemplate();
    }

    $arc_project_id = $request->getInt('arcProjectID');
    $fake_commit_handle =
      ReleephBranchTemplate::getFakeCommitHandleFor($arc_project_id);

    list($name, $errors) = id(new ReleephBranchTemplate())
      ->setCommitHandle($fake_commit_handle)
      ->setReleephProjectName($request->getStr('projectName'))
      ->setSymbolic($is_symbolic)
      ->interpolate($template);

    $markup = '';

    if ($name) {
      $markup = phutil_tag(
        'div',
        array('class' => 'name'),
        $name);
    }

    if ($errors) {
      $markup .= phutil_tag(
        'div',
        array('class' => 'error'),
        head($errors));
    }

    return id(new AphrontAjaxResponse())
      ->setContent(array('markup' => $markup));
  }

}


text:
"""Multilingual language corpora and software available for download or loading locally.
All remote corpora hosted by github on the cltk organization account, eg:
'http://github.com/cltk' + name
"""

MULTILINGUAL_CORPORA = [
    {'encoding': 'utf-8',
     'markup': ['conll', 'xml'],
     'location': 'remote',
     'type': 'treebank',
     'origin': 'https://github.com/cltk/multilingual_treebank_proiel.git',
     'name': 'multilingual_treebank_proiel'},
    {'encoding': 'utf-8',
     'markup': ['conll', 'xml'],
     'location': 'remote',
     'type': 'treebank',
     'origin': 'https://github.com/cltk/iswoc-treebank.git',
     'name': 'multilingual_treebank_iswoc'},
    {'encoding': 'utf-8',
     'markup': ['conll', 'xml'],
     'location': 'remote',
     'type': 'treebank',
     'origin': 'https://github.com/cltk/treebank-releases.git',
     'name': 'multilingual_treebank_torot'},
]


text: CREATE INDEX ne_50m_ocean_wayarea_index ON ne_50m_ocean(way_area);


text:
/* Malaysian initialisation for the jQuery UI date picker plugin. */
/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */
( function( factory ) {
	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [ "../widgets/datepicker" ], factory );
	} else {

		// Browser globals
		factory( jQuery.datepicker );
	}
}( function( datepicker ) {

datepicker.regional.ms = {
	closeText: "Tutup",
	prevText: "<Sebelum",
	nextText: "Selepas>",
	currentText: "hari ini",
	monthNames: [ "Januari","Februari","Mac","April","Mei","Jun",
	"Julai","Ogos","September","Oktober","November","Disember" ],
	monthNamesShort: [ "Jan","Feb","Mac","Apr","Mei","Jun",
	"Jul","Ogo","Sep","Okt","Nov","Dis" ],
	dayNames: [ "Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu" ],
	dayNamesShort: [ "Aha","Isn","Sel","Rab","kha","Jum","Sab" ],
	dayNamesMin: [ "Ah","Is","Se","Ra","Kh","Ju","Sa" ],
	weekHeader: "Mg",
	dateFormat: "dd/mm/yy",
	firstDay: 0,
	isRTL: false,
	showMonthAfterYear: false,
	yearSuffix: "" };
datepicker.setDefaults( datepicker.regional.ms );

return datepicker.regional.ms;

} ) );


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

namespace DXTools.CRM.Solutions.CustomEmails.Common.Messages
{
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://schemas.microsoft.com/xrm/2011/dxtools/")]
    [Microsoft.Xrm.Sdk.Client.RequestProxyAttribute("dxtools_SendCustomEmail")]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "6.0.0001.0061")]
    public partial class dxtools_SendCustomEmailRequest : Microsoft.Xrm.Sdk.OrganizationRequest
    {

        public string EmailTemplateName
        {
            get
            {
                if (this.Parameters.Contains("EmailTemplateName"))
                {
                    return ((string)(this.Parameters["EmailTemplateName"]));
                }
                else
                {
                    return default(string);
                }
            }
            set
            {
                this.Parameters["EmailTemplateName"] = value;
            }
        }

        public Microsoft.Xrm.Sdk.EntityReference FromSender
        {
            get
            {
                if (this.Parameters.Contains("FromSender"))
                {
                    return ((Microsoft.Xrm.Sdk.EntityReference)(this.Parameters["FromSender"]));
                }
                else
                {
                    return default(Microsoft.Xrm.Sdk.EntityReference);
                }
            }
            set
            {
                this.Parameters["FromSender"] = value;
            }
        }

        public Microsoft.Xrm.Sdk.EntityCollection ToRecipient
        {
            get
            {
                if (this.Parameters.Contains("ToRecipient"))
                {
                    return ((Microsoft.Xrm.Sdk.EntityCollection)(this.Parameters["ToRecipient"]));
                }
                else
                {
                    return default(Microsoft.Xrm.Sdk.EntityCollection);
                }
            }
            set
            {
                this.Parameters["ToRecipient"] = value;
            }
        }

        public Microsoft.Xrm.Sdk.EntityReference Regarding
        {
            get
            {
                if (this.Parameters.Contains("Regarding"))
                {
                    return ((Microsoft.Xrm.Sdk.EntityReference)(this.Parameters["Regarding"]));
                }
                else
                {
                    return default(Microsoft.Xrm.Sdk.EntityReference);
                }
            }
            set
            {
                this.Parameters["Regarding"] = value;
            }
        }

        public Microsoft.Xrm.Sdk.EntityReference RecordContext
        {
            get
            {
                if (this.Parameters.Contains("RecordContext"))
                {
                    return ((Microsoft.Xrm.Sdk.EntityReference)(this.Parameters["RecordContext"]));
                }
                else
                {
                    return default(Microsoft.Xrm.Sdk.EntityReference);
                }
            }
            set
            {
                this.Parameters["RecordContext"] = value;
            }
        }

        public string Attachments
        {
            get
            {
                if (this.Parameters.Contains("Attachments"))
                {
                    return ((string)(this.Parameters["Attachments"]));
                }
                else
                {
                    return default(string);
                }
            }
            set
            {
                this.Parameters["Attachments"] = value;
            }
        }

        public Boolean AllowDuplicateAttachments
        {
            get
            {
                if (this.Parameters.Contains("AllowDuplicateAttachments"))
                {
                    return ((Boolean)(this.Parameters["AllowDuplicateAttachments"]));
                }
                else
                {
                    return default(Boolean);
                }
            }
            set
            {
                this.Parameters["AllowDuplicateAttachments"] = value;
            }
        }

        public Boolean OnlyUseAttachmentsInTemplate
        {
            get
            {
                if (this.Parameters.Contains("OnlyUseAttachmentsInTemplate"))
                {
                    return ((Boolean)(this.Parameters["OnlyUseAttachmentsInTemplate"]));
                }
                else
                {
                    return default(Boolean);
                }
            }
            set
            {
                this.Parameters["OnlyUseAttachmentsInTemplate"] = value;
            }
        }

        public string StaticParameters
        {
            get
            {
                if (this.Parameters.Contains("StaticParameters"))
                {
                    return ((string)(this.Parameters["StaticParameters"]));
                }
                else
                {
                    return default(string);
                }
            }
            set
            {
                this.Parameters["StaticParameters"] = value;
            }
        }

        public dxtools_SendCustomEmailRequest()
        {
            this.RequestName = "dxtools_SendCustomEmail";
            this.EmailTemplateName = default(string);
            this.FromSender = default(Microsoft.Xrm.Sdk.EntityReference);
            this.ToRecipient = default(Microsoft.Xrm.Sdk.EntityCollection);
        }
    }
}


text:
@interface RWSData : NSObject

+ (instancetype)sharedData;

@end


text:
package io.airlift.drift.server;

import io.airlift.drift.transport.server.ServerTransport;
import io.airlift.drift.transport.server.ServerTransportFactory;

import static com.google.common.base.Preconditions.checkState;

public class TestingServerTransportFactory
        implements ServerTransportFactory
{
    private TestingServerTransport serverTransport;

    public synchronized TestingServerTransport getServerTransport()
    {
        return serverTransport;
    }

    @Override
    public synchronized ServerTransport createServerTransport(io.airlift.drift.transport.server.ServerMethodInvoker serverMethodInvoker)
    {
        checkState(this.serverTransport == null);
        this.serverTransport = new TestingServerTransport(serverMethodInvoker);
        return serverTransport;
    }
}


text:
define(function(){

	var templates = {};

        templates.entityMap = {
                "&": "&",
                "<": "<",
                ">": ">",
                '"': '"',
                "'": ''',
                "/": '/'
          };

          templates.escapeHtml = function(string) {
                return String(string).replace(/[&<>"'\/]/g, function (s) {
                  return templates.entityMap[s];
                });
          };

	templates.recordTpl = '
'+
        '{{ record.name }}	'+
        '
{{ record.description }}
	'+
        '{{ record.url }}	'+
        '{{ record.username }}	'+
        '********	'+
        '<button class="edit">Edit</button><input type="submit" class="save" value="Save">	'+
        '<button class="delete">Delete</button><button class="cancel">Cancel</button>	'+
	'
';

	templates.render = function(template, locals){
		var tpl = template;
		for(var objName in locals){
			for(var attrName in locals[objName]){
				tpl = tpl.replace("{{ " + objName + "." + attrName  + " }}", templates.escapeHtml( locals[objName][attrName] ) );
			}
		}
		return tpl;
	};

	templates.renderRecord = function(record){
		return templates.render(templates.recordTpl,{ record: record });
	};

	return templates;
});


text:
PYTHONIC_NS_BEGIN

namespace operator_
{
  USING_FUNCTOR(__add__, add);
}
PYTHONIC_NS_END

#endif


text:
package org.apache.rocketmq.common.admin;

public class RollbackStats {
    private String brokerName;
    private long queueId;
    private long brokerOffset;
    private long consumerOffset;
    private long timestampOffset;
    private long rollbackOffset;

    public String getBrokerName() {
        return brokerName;
    }

    public void setBrokerName(String brokerName) {
        this.brokerName = brokerName;
    }

    public long getQueueId() {
        return queueId;
    }

    public void setQueueId(long queueId) {
        this.queueId = queueId;
    }

    public long getBrokerOffset() {
        return brokerOffset;
    }

    public void setBrokerOffset(long brokerOffset) {
        this.brokerOffset = brokerOffset;
    }

    public long getConsumerOffset() {
        return consumerOffset;
    }

    public void setConsumerOffset(long consumerOffset) {
        this.consumerOffset = consumerOffset;
    }

    public long getTimestampOffset() {
        return timestampOffset;
    }

    public void setTimestampOffset(long timestampOffset) {
        this.timestampOffset = timestampOffset;
    }

    public long getRollbackOffset() {
        return rollbackOffset;
    }

    public void setRollbackOffset(long rollbackOffset) {
        this.rollbackOffset = rollbackOffset;
    }
}


text:
package com.b2international.snowowl.datastore.server.history;

import static com.b2international.commons.StringUtils.isEmpty;
import static com.b2international.commons.platform.Extensions.getExtensions;
import static com.b2international.snowowl.datastore.server.history.HistoryInfoQueryExecutor.NOOP;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.cache.CacheBuilder.newBuilder;
import static com.google.common.collect.Iterables.find;

import java.util.Collection;

import com.b2international.snowowl.core.CoreTerminologyBroker;
import com.google.common.base.Predicate;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;

/**
 * Singleton service for providing {@link HistoryInfoQueryExecutor} instances.
 *
 */
public enum HistoryInfoQueryExecutorProvider {

	/**Shared stateful service.*/
	INSTANCE;

	private static final String EXTENSION_POINT_ID = "com.b2international.snowowl.datastore.server.historyInfo";
	private static final String CLASS_ATTRIBUTE_NAME = "executorClass";

	private final LoadingCache<String, HistoryInfoQueryExecutor> cache = //
			newBuilder().build(new CacheLoader<String, HistoryInfoQueryExecutor>() {
				public HistoryInfoQueryExecutor load(final String terminologyComponentId) throws Exception {
					checkNotNull(terminologyComponentId, "terminologyComponentId");

					return find(getExecutors(), new Predicate<HistoryInfoQueryExecutor>() {
						public boolean apply(final HistoryInfoQueryExecutor executor) {
							return terminologyComponentId.equals(getTerminologyComponentId(executor));
						}
					}, NOOP);

				}
			});

	/**
	 * Returns with the {@link HistoryInfoQueryExecutor query executor} for a given
	 * component type.<br>This method never returns with {@code null}.
	 * @param terminologyComponentId the application specific terminology component ID.
	 * @return the query executor instance for the component.
	 */
	public HistoryInfoQueryExecutor getExecutor(final String terminologyComponentId) {
		return isEmpty(terminologyComponentId) ? NOOP : cache.getUnchecked(terminologyComponentId);
	}

	private String getTerminologyComponentId(final HistoryInfoQueryExecutor executor) {
		final CoreTerminologyBroker terminologyBroker = CoreTerminologyBroker.getInstance();
		return terminologyBroker.getTerminologyComponentId(executor.getTerminologyComponentId());
	}

	private Collection<HistoryInfoQueryExecutor> getExecutors() {
		return getExtensions(EXTENSION_POINT_ID, CLASS_ATTRIBUTE_NAME, HistoryInfoQueryExecutor.class);
	}

}