text:
import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { Title } from '@angular/platform-browser';

@Component({
  host: {
    'class': 'page'
  },
  selector: 'documentation',
  templateUrl: './documentation.component.html',
  styleUrls: ['./documentation.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class DocumentationComponent implements OnInit {

  constructor(private _title: Title) {
  }

  ngOnInit() {
    this._title.setTitle('Getting Started | ng-gallery');
  }
}


text:
(function( ) {
    'use strict';

    angular.module('app', ['ngAnimate', 'controllers.appctrl','filters.todolist', 'directives.focusonshow', 'directives.filterlinks']);
})();

redpajama_set_name: RedPajamaGithub


text:
package noNamespace.impl;
/**
 * A document containing one note(@) element.
 *
 * This is a complex type.
 */
public class NoteDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements noNamespace.NoteDocument
{
    private static final long serialVersionUID = 1L;

    public NoteDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }

    private static final javax.xml.namespace.QName NOTE$0 =
        new javax.xml.namespace.QName("", "note");

    /**
     * Gets the "note" element
     */
    public noNamespace.NoteDocument.Note getNote()
    {
        synchronized (monitor())
        {
            check_orphaned();
            noNamespace.NoteDocument.Note target = null;
            target = (noNamespace.NoteDocument.Note)get_store().find_element_user(NOTE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "note" element
     */
    public void setNote(noNamespace.NoteDocument.Note note)
    {
        generatedSetterHelperImpl(note, NOTE$0, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
    }

    /**
     * Appends and returns a new empty "note" element
     */
    public noNamespace.NoteDocument.Note addNewNote()
    {
        synchronized (monitor())
        {
            check_orphaned();
            noNamespace.NoteDocument.Note target = null;
            target = (noNamespace.NoteDocument.Note)get_store().add_element_user(NOTE$0);
            return target;
        }
    }
    /**
     * An XML note(@).
     *
     * This is a complex type.
     */
    public static class NoteImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements noNamespace.NoteDocument.Note
    {
        private static final long serialVersionUID = 1L;

        public NoteImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }

        private static final javax.xml.namespace.QName TEXT$0 =
            new javax.xml.namespace.QName("", "text");
        private static final javax.xml.namespace.QName EDITOR$2 =
            new javax.xml.namespace.QName("", "editor");
        private static final javax.xml.namespace.QName EDITED$4 =
            new javax.xml.namespace.QName("", "edited");
        private static final javax.xml.namespace.QName TYPE$6 =
            new javax.xml.namespace.QName("", "type");

        /**
         * Gets the "text" element
         */
        public noNamespace.TextDocument.Text getText()
        {
            synchronized (monitor())
            {
                check_orphaned();
                noNamespace.TextDocument.Text target = null;
                target = (noNamespace.TextDocument.Text)get_store().find_element_user(TEXT$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }

        /**
         * Sets the "text" element
         */
        public void setText(noNamespace.TextDocument.Text text)
        {
            generatedSetterHelperImpl(text, TEXT$0, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);
        }

        /**
         * Appends and returns a new empty "text" element
         */
        public noNamespace.TextDocument.Text addNewText()
        {
            synchronized (monitor())
            {
                check_orphaned();
                noNamespace.TextDocument.Text target = null;
                target = (noNamespace.TextDocument.Text)get_store().add_element_user(TEXT$0);
                return target;
            }
        }

        /**
         * Gets the "editor" element
         */
        public java.lang.String getEditor()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EDITOR$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }

        /**
         * Gets (as xml) the "editor" element
         */
        public org.apache.xmlbeans.XmlString xgetEditor()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(EDITOR$2, 0);
                return target;
            }
        }

        /**
         * True if has "editor" element
         */
        public boolean isSetEditor()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(EDITOR$2) != 0;
            }
        }

        /**
         * Sets the "editor" element
         */
        public void setEditor(java.lang.String editor)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EDITOR$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(EDITOR$2);
                }
                target.setStringValue(editor);
            }
        }

        /**
         * Sets (as xml) the "editor" element
         */
        public void xsetEditor(org.apache.xmlbeans.XmlString editor)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(EDITOR$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(EDITOR$2);
                }
                target.set(editor);
            }
        }

        /**
         * Unsets the "editor" element
         */
        public void unsetEditor()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(EDITOR$2, 0);
            }
        }

        /**
         * Gets the "edited" element
         */
        public java.lang.String getEdited()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EDITED$4, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }

        /**
         * Gets (as xml) the "edited" element
         */
        public org.apache.xmlbeans.XmlString xgetEdited()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(EDITED$4, 0);
                return target;
            }
        }

        /**
         * True if has "edited" element
         */
        public boolean isSetEdited()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(EDITED$4) != 0;
            }
        }

        /**
         * Sets the "edited" element
         */
        public void setEdited(java.lang.String edited)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EDITED$4, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(EDITED$4);
                }
                target.setStringValue(edited);
            }
        }

        /**
         * Sets (as xml) the "edited" element
         */
        public void xsetEdited(org.apache.xmlbeans.XmlString edited)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(EDITED$4, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(EDITED$4);
                }
                target.set(edited);
            }
        }

        /**
         * Unsets the "edited" element
         */
        public void unsetEdited()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(EDITED$4, 0);
            }
        }

        /**
         * Gets the "type" attribute
         */
        public noNamespace.NoteDocument.Note.Type.Enum getType()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TYPE$6);
                if (target == null)
                {
                    return null;
                }
                return (noNamespace.NoteDocument.Note.Type.Enum)target.getEnumValue();
            }
        }

        /**
         * Gets (as xml) the "type" attribute
         */
        public noNamespace.NoteDocument.Note.Type xgetType()
        {
            synchronized (monitor())
            {
                check_orphaned();
                noNamespace.NoteDocument.Note.Type target = null;
                target = (noNamespace.NoteDocument.Note.Type)get_store().find_attribute_user(TYPE$6);
                return target;
            }
        }

        /**
         * Sets the "type" attribute
         */
        public void setType(noNamespace.NoteDocument.Note.Type.Enum type)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TYPE$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TYPE$6);
                }
                target.setEnumValue(type);
            }
        }

        /**
         * Sets (as xml) the "type" attribute
         */
        public void xsetType(noNamespace.NoteDocument.Note.Type type)
        {
            synchronized (monitor())
            {
                check_orphaned();
                noNamespace.NoteDocument.Note.Type target = null;
                target = (noNamespace.NoteDocument.Note.Type)get_store().find_attribute_user(TYPE$6);
                if (target == null)
                {
                    target = (noNamespace.NoteDocument.Note.Type)get_store().add_attribute_user(TYPE$6);
                }
                target.set(type);
            }
        }
        /**
         * An XML type(@).
         *
         * This is an atomic type that is a restriction of noNamespace.NoteDocument$Note$Type.
         */
        public static class TypeImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements noNamespace.NoteDocument.Note.Type
        {
            private static final long serialVersionUID = 1L;

            public TypeImpl(org.apache.xmlbeans.SchemaType sType)
            {
                super(sType, false);
            }

            protected TypeImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
            {
                super(sType, b);
            }
        }
    }
}


text:
Color: Blue
---
Item I


text:
/**
 * @file
 *   This file includes definition for CoAP service.
 */

#ifndef COAP_HPP_
#define COAP_HPP_

#include <stdint.h>
#include <unistd.h>

namespace ot {

namespace BorderRouter {

namespace Coap {

/**
 * @addtogroup border-agent-coap
 *
 * @brief
 *   This module includes definition for CoAP service.
 *
 * @{
 */

/**
 * This interface defines CoAP message functionality.
 *
 */
class Message
{
public:
    /**
     * CoAP Type values.
     *
     */
    typedef enum Type
    {
        kCoapTypeConfirmable    = 0x00, ///< Confirmable
        kCoapTypeNonConfirmable = 0x01, ///< Non-confirmable
        kCoapTypeAcknowledgment = 0x02, ///< Acknowledgment
        kCoapTypeReset          = 0x03, ///< Reset
    } Type;

    /**
     * CoAP Code values.
     *
     */
    typedef enum Code
    {
        kCoapEmpty           = 0x00, ///< Empty message code
        kCoapRequestGet      = 0x01, ///< Get
        kCoapRequestPost     = 0x02, ///< Post
        kCoapRequestPut      = 0x03, ///< Put
        kCoapRequestDelete   = 0x04, ///< Delete
        kCoapResponseCodeMin = 0x40, ///< 2.00
        kCoapResponseCreated = 0x41, ///< Created
        kCoapResponseDeleted = 0x42, ///< Deleted
        kCoapResponseValid   = 0x43, ///< Valid
        kCoapResponseChanged = 0x44, ///< Changed
        kCoapResponseContent = 0x45, ///< Content
    } Code;

public:
    virtual ~Message(void) {};

    /**
     * This method returns the CoAP code of this message.
     *
     * @returns the CoAP code of the message.
     *
     */
    virtual Code GetCode(void) const = 0;
    virtual void SetCode(Code aCode) = 0;

    /**
     * This method returns the CoAP type of this message.
     *
     * @returns The CoAP type of the message.
     *
     */
    virtual Type GetType(void) const = 0;
    virtual void SetType(Type aType) = 0;

    /**
     * This method returns the token of this message.
     *
     * @param[out]    aLength     Number of bytes of the token.
     *
     * @returns A pointer to the token.
     *
     */
    virtual const uint8_t *GetToken(uint8_t &aLength) const = 0;
    virtual void SetToken(const uint8_t *aToken, uint8_t aLength) = 0;

    /**
     * This method sets the CoAP Uri Path of this message.
     *
     * @param[in]   aPath   A pointer to to the null-terminated string of Uri Path.
     *
     */
    virtual void SetPath(const char *aPath) = 0;

    /**
     * This method returns the payload of this message.
     *
     * @param[out]  aLength     Number of bytes of the payload.
     *
     * @returns A pointer to the payload buffer.
     */
    virtual const uint8_t *GetPayload(uint16_t &aLength) const = 0;

    /**
     * This method sets the CoAP payload of this message.
     *
     * @param[in]   aPayload    A pointer to the payload buffer.
     * @param[in]   aLength     Number of bytes in @p aPayload.
     *
     */
    virtual void SetPayload(const uint8_t *aPayload, uint16_t aLength) = 0;
};

typedef struct Resource Resource;

/**
 * This function pointer is called when a CoAP request received.
 *
 * @param[in]   aResource   A reference to the resource requested.
 * @param[in]   aRequest    A reference to the CoAP request message.
 * @param[in]   aResponse   A reference to the CoAP response message.
 * @param[in]   aIp6        A reference to the source Ipv6 address of this request.
 * @param[in]   aPort       Source UDP port of this request.
 * @param[in]   aContext    A pointer to application-specific context.
 *
 */
typedef void (*RequestHandler)(const Resource &aResource, const Message &aRequest, Message &aResponse,
                               const uint8_t *aIp6,
                               uint16_t aPort,
                               void *aContext);

/**
 * This function pointer is called when a CoAP response received.
 *
 * @param[in]   aMessage    A pointer to the response message.
 * @param[in]   aContext    A pointer to application-specific context.
 *
 */
typedef void (*ResponseHandler)(const Message &aMessage, void *aContext);

/**
 * This struct defines a CoAP resource and its handler.
 */
struct Resource
{
    const char    *mPath;    ///< The CoAP Uri Path.
    RequestHandler mHandler; ///< The function to handle request to mPath.
};

/**
 * This interface defines the functionality of CoAP Agent.
 *
 */
class Agent
{
public:
    /**
     * This function poiner is called when the agent needs to send data out.
     *
     * @param[in]   aBuffer     A pointer to decrypted data.
     * @param[in]   aLength     Number of bytes of @p aBuffer.
     * @param[in]   aIp6        A pointer to the source Ipv6 address of this request.
     * @param[in]   aPort       Source UDP port of this request.
     * @param[in]   aContext    A pointer to application-specific context.
     *
     * @returns number of bytes successfully sended, a negative value indicates failure.
     *
     */
    typedef ssize_t (*NetworkSender)(const uint8_t *aBuffer, uint16_t aLength, const uint8_t *aIp6, uint16_t aPort,
                                     void *aContext);

    /**
     * This method processes this CoAP message in @p aBuffer, which can be a request or response.
     *
     * @param[in]   aBuffer     A pointer to decrypted data.
     * @param[in]   aLength     Number of bytes of @p aBuffer.
     * @param[in]   aIp6        A pointer to the source Ipv6 address of this request.
     * @param[in]   aPort       Source UDP port of this request.
     *
     */
    virtual void Input(const void *aBuffer, uint16_t aLength, const uint8_t *aIp6, uint16_t aPort) = 0;

    /**
     * This method creates a CoAP message with the given arguments.
     *
     * @param[in]   aType           The CoAP type.
     * @param[in]   aCode           The CoAP code.
     * @param[in]   aToken          The CoAP token.
     * @param[in]   aTokenLength    Number of bytes in @p aToken.
     *
     * @returns The newly CoAP message.
     *
     */
    virtual Message *NewMessage(Message::Type aType, Message::Code aCode, const uint8_t *aToken,
                                uint8_t aTokenLength) = 0;

    /**
     * This method frees a CoAP message.
     *
     * @param[in]   aMessage    A pointer to the message to free.
     *
     */
    virtual void FreeMessage(Message *aMessage) = 0;

    /**
     * This method sends the CoAP message, which can be a request or response.
     *
     * @param[in]   aMessage    A reference to the message to send.
     * @param[in]   aIp6        A pointer to the source Ipv6 address of this request.
     * @param[in]   aPort       Source UDP port of this request.
     * @param[in]   aHandler    A function poiner to be called when response is received if the message is a request.
     *
     */
    virtual void Send(Message &aMessage, const uint8_t *aIp6, uint16_t aPort, ResponseHandler aHandler) = 0;

    /**
     * This method creates a CoAP agent.
     *
     * @param[in]   aNetworkSender      A pointer to the function that actually sends the data.
     * @param[in]   aResources          A pointer to the Resource array. The last resource must be {0, 0}.
     * @param[in]   aContext    A pointer to application-specific context.
     *
     * @returns CoAP agent.
     */
    static Agent *Create(NetworkSender aNetworkSender, const Resource *aResources = NULL, void *aContext = NULL);

    /**
     * This method destroys a CoAP agent.
     *
     * @param[in]   aAgent      A pointer to the agent to be destroyed.
     *
     */
    static void Destroy(Agent *aAgent);

    virtual ~Agent(void) {}
};

/**
 * @}
 */

} // namespace Coap

} // namespace BorderRouter

} // namespace ot

#endif  // COAP_HPP_


text:
package org.carlspring.strongbox.authentication.api;

import org.carlspring.strongbox.data.CacheName;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;

public class CacheManagerAuthenticationCache implements AuthenticationCache
{

    @SuppressWarnings("deprecation")
    private org.springframework.security.crypto.password.StandardPasswordEncoder standardPasswordEncoder = new
            org.springframework.security.crypto.password.StandardPasswordEncoder();

    @Cacheable(cacheNames = CacheName.User.AUTHENTICATIONS, key = "#p0", unless = "true")
    public UsernamePasswordAuthenticationToken getAuthenticationToken(String userName)
    {
        return null;
    }

    @Cacheable(cacheNames = CacheName.User.AUTHENTICATIONS, key = "#p0.principal")
    public UsernamePasswordAuthenticationToken putAuthenticationToken(UsernamePasswordAuthenticationToken authentication)
    {
        return createCachableAuthentication(authentication);
    }

    public UsernamePasswordAuthenticationToken createCachableAuthentication(UsernamePasswordAuthenticationToken authentication)
    {
        String encodedPassword = encode(authentication.getCredentials().toString());

        return new UsernamePasswordAuthenticationToken(authentication.getPrincipal(), encodedPassword);
    }

    public String encode(CharSequence rawPassword)
    {
        return standardPasswordEncoder.encode(rawPassword);
    }

    public boolean matches(CharSequence rawPassword,
                           String encodedPassword)
    {
        return standardPasswordEncoder.matches(rawPassword, encodedPassword);
    }

}


text:
Details on the various actions that can be performed on the
Flow Version resource, including the expected
parameters and the potential responses.

##### Contents

*   [Delete](#delete)
*   [Errors](#errors)
*   [Get](#get)
*   [Get Log Entries](#get-log-entries)
*   [Patch](#patch)
*   [Stats](#stats)

## Delete

Deletes a flow version

```javascript
var params = {
  applicationId: myApplicationId,
  flowId: myFlowId,
  flowVersionId: myFlowVersionId
};

// with callbacks
client.flowVersion.delete(params, function (err, result) {
  if (err) { return console.error(err); }
  console.log(result);
});

// with promises
client.flowVersion.delete(params)
  .then(console.log)
  .catch(console.error);
```

#### Authentication
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.Application, all.Organization, all.User, flowVersion.*, or flowVersion.delete.

#### Available Parameters

| Name | Type | Required | Description | Default | Example |
| ---- | ---- | -------- | ----------- | ------- | ------- |
| applicationId | string | Y | ID associated with the application |  | 575ec8687ae143cd83dc4a97 |
| flowId | string | Y | ID associated with the flow |  | 575ed18f7ae143cd83dc4aa6 |
| flowVersionId | string | Y | Version ID or version name associated with the flow version |  | 675ed18f7ae143cd83dc4bb7 |
| losantdomain | string | N | Domain scope of request (rarely needed) |  | example.com |

#### Successful Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 200 | [Success](../lib/schemas/success.json) | If flow version was successfully deleted |

#### Error Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 400 | [Error](../lib/schemas/error.json) | Error if malformed request |
| 404 | [Error](../lib/schemas/error.json) | Error if flow version was not found |

## Errors

Get information about errors that occurred during runs of this workflow version

```javascript
var params = {
  applicationId: myApplicationId,
  flowId: myFlowId,
  flowVersionId: myFlowVersionId
};

// with callbacks
client.flowVersion.errors(params, function (err, result) {
  if (err) { return console.error(err); }
  console.log(result);
});

// with promises
client.flowVersion.errors(params)
  .then(console.log)
  .catch(console.error);
```

#### Authentication
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flowVersion.*, or flowVersion.errors.

#### Available Parameters

| Name | Type | Required | Description | Default | Example |
| ---- | ---- | -------- | ----------- | ------- | ------- |
| applicationId | string | Y | ID associated with the application |  | 575ec8687ae143cd83dc4a97 |
| flowId | string | Y | ID associated with the flow |  | 575ed18f7ae143cd83dc4aa6 |
| flowVersionId | string | Y | Version ID or version name associated with the flow version |  | 675ed18f7ae143cd83dc4bb7 |
| duration | string | N | Duration of time range in milliseconds | 86400000 | 86400000 |
| end | string | N | End of time range in milliseconds since epoch | 0 | 0 |
| limit | string | N | Maximum number of errors to return | 25 | 25 |
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | desc | desc |
| deviceId | string | N | For edge workflows, the Device ID to return workflow errors for. When not included, will be errors for all device IDs. |  | 575ed18f7ae143cd83dc4bb6 |
| losantdomain | string | N | Domain scope of request (rarely needed) |  | example.com |

#### Successful Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 200 | [Workflow Errors](../lib/schemas/flowErrors.json) | Workflow error information |

#### Error Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 400 | [Error](../lib/schemas/error.json) | Error if malformed request |
| 404 | [Error](../lib/schemas/error.json) | Error if flow version was not found |

## Get

Retrieves information on a flow version

```javascript
var params = {
  applicationId: myApplicationId,
  flowId: myFlowId,
  flowVersionId: myFlowVersionId
};

// with callbacks
client.flowVersion.get(params, function (err, result) {
  if (err) { return console.error(err); }
  console.log(result);
});

// with promises
client.flowVersion.get(params)
  .then(console.log)
  .catch(console.error);
```

#### Authentication
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flowVersion.*, or flowVersion.get.

#### Available Parameters

| Name | Type | Required | Description | Default | Example |
| ---- | ---- | -------- | ----------- | ------- | ------- |
| applicationId | string | Y | ID associated with the application |  | 575ec8687ae143cd83dc4a97 |
| flowId | string | Y | ID associated with the flow |  | 575ed18f7ae143cd83dc4aa6 |
| flowVersionId | string | Y | Version ID or version name associated with the flow version |  | 675ed18f7ae143cd83dc4bb7 |
| includeCustomNodes | string | N | If the result of the request should also include the details of any custom nodes referenced by the returned workflows | false | true |
| losantdomain | string | N | Domain scope of request (rarely needed) |  | example.com |

#### Successful Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 200 | [Workflow Version](../lib/schemas/flowVersion.json) | Flow version information |

#### Error Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 400 | [Error](../lib/schemas/error.json) | Error if malformed request |
| 404 | [Error](../lib/schemas/error.json) | Error if flow version was not found |

## Get Log Entries

Retrieve the recent log entries about runs of this workflow version

```javascript
var params = {
  applicationId: myApplicationId,
  flowId: myFlowId,
  flowVersionId: myFlowVersionId
};

// with callbacks
client.flowVersion.getLogEntries(params, function (err, result) {
  if (err) { return console.error(err); }
  console.log(result);
});

// with promises
client.flowVersion.getLogEntries(params)
  .then(console.log)
  .catch(console.error);
```

#### Authentication
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flowVersion.*, or flowVersion.log.

#### Available Parameters

| Name | Type | Required | Description | Default | Example |
| ---- | ---- | -------- | ----------- | ------- | ------- |
| applicationId | string | Y | ID associated with the application |  | 575ec8687ae143cd83dc4a97 |
| flowId | string | Y | ID associated with the flow |  | 575ed18f7ae143cd83dc4aa6 |
| flowVersionId | string | Y | Version ID or version name associated with the flow version |  | 675ed18f7ae143cd83dc4bb7 |
| limit | string | N | Max log entries to return (ordered by time descending) | 1 | 10 |
| since | string | N | Look for log entries since this time (ms since epoch) |  | 1465790400000 |
| losantdomain | string | N | Domain scope of request (rarely needed) |  | example.com |

#### Successful Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 200 | [Workflow Log](../lib/schemas/flowLog.json) | Recent log entries |

#### Error Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 400 | [Error](../lib/schemas/error.json) | Error if malformed request |
| 404 | [Error](../lib/schemas/error.json) | Error if flow version was not found |

## Patch

Updates information about a flow version

```javascript
var params = {
  applicationId: myApplicationId,
  flowId: myFlowId,
  flowVersionId: myFlowVersionId,
  flowVersion: myFlowVersion
};

// with callbacks
client.flowVersion.patch(params, function (err, result) {
  if (err) { return console.error(err); }
  console.log(result);
});

// with promises
client.flowVersion.patch(params)
  .then(console.log)
  .catch(console.error);
```

#### Authentication
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.Application, all.Organization, all.User, flowVersion.*, or flowVersion.patch.

#### Available Parameters

| Name | Type | Required | Description | Default | Example |
| ---- | ---- | -------- | ----------- | ------- | ------- |
| applicationId | string | Y | ID associated with the application |  | 575ec8687ae143cd83dc4a97 |
| flowId | string | Y | ID associated with the flow |  | 575ed18f7ae143cd83dc4aa6 |
| flowVersionId | string | Y | Version ID or version name associated with the flow version |  | 675ed18f7ae143cd83dc4bb7 |
| includeCustomNodes | string | N | If the result of the request should also include the details of any custom nodes referenced by the returned workflows | false | true |
| flowVersion | [Workflow Version Patch](../lib/schemas/flowVersionPatch.json) | Y | Object containing new properties of the flow version |  | [Workflow Version Patch Example](_schemas.md#workflow-version-patch-example) |
| losantdomain | string | N | Domain scope of request (rarely needed) |  | example.com |

#### Successful Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 200 | [Workflow Version](../lib/schemas/flowVersion.json) | Updated flow version information |

#### Error Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 400 | [Error](../lib/schemas/error.json) | Error if malformed request |
| 404 | [Error](../lib/schemas/error.json) | Error if flow version was not found |

## Stats

Get statistics about workflow runs for this workflow version

```javascript
var params = {
  applicationId: myApplicationId,
  flowId: myFlowId,
  flowVersionId: myFlowVersionId
};

// with callbacks
client.flowVersion.stats(params, function (err, result) {
  if (err) { return console.error(err); }
  console.log(result);
});

// with promises
client.flowVersion.stats(params)
  .then(console.log)
  .catch(console.error);
```

#### Authentication
The client must be configured with a valid api access token to call this
action. The token must include at least one of the following scopes:
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flowVersion.*, or flowVersion.stats.

#### Available Parameters

| Name | Type | Required | Description | Default | Example |
| ---- | ---- | -------- | ----------- | ------- | ------- |
| applicationId | string | Y | ID associated with the application |  | 575ec8687ae143cd83dc4a97 |
| flowId | string | Y | ID associated with the flow |  | 575ed18f7ae143cd83dc4aa6 |
| flowVersionId | string | Y | Version ID or version name associated with the flow version |  | 675ed18f7ae143cd83dc4bb7 |
| duration | string | N | Duration of time range in milliseconds | 86400000 | 86400000 |
| end | string | N | End of time range in milliseconds since epoch | 0 | 0 |
| resolution | string | N | Resolution in milliseconds | 3600000 | 3600000 |
| deviceId | string | N | For edge workflows, the device ID to return workflow stats for. When not included, will be aggregate for all device IDs. |  | 575ed18f7ae143cd83dc4bb6 |
| losantdomain | string | N | Domain scope of request (rarely needed) |  | example.com |

#### Successful Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 200 | [Workflow Statistics](../lib/schemas/flowStats.json) | Statistics for workflow runs |

#### Error Responses

| Code | Type | Description |
| ---- | ---- | ----------- |
| 400 | [Error](../lib/schemas/error.json) | Error if malformed request |
| 404 | [Error](../lib/schemas/error.json) | Error if flow version was not found |


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _Router = require('./Router');

var _Router2 = _interopRequireDefault(_Router);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = _Router2.default;


text:
if ! type -f bpkg-run &>/dev/null; then
  echo "error: bpkg-run not found, aborting"
  exit 1
else
  # shellcheck source=lib/run/run.sh
  source "$(which bpkg-run)"
fi

bpkg_source () {
  # shellcheck disable=SC2068
  bpkg_run --emit-source --target "$1" ${@:2}
  return $?
}

## Use as lib or perform install
if [[ ${BASH_SOURCE[0]} != "$0" ]]; then
  export -f bpkg_source
else
  bpkg_source "$@"
  exit $?
fi


text:
package codeine.jsons.mails;

import codeine.api.NodeInfo;
import codeine.utils.StringUtils;

public class CollectorNotificationJson {

	private String collector_name;
	private String project_name;
	//TODO remove after peers in version > 1062
	private NodeInfo node;
	private String node_name;
	private String node_alias;
	private String output;
	private long time;
	private String time_formatted;
	private String version;
	private String peer;
	private Integer exit_status;
	private String duration;
	private String notification_id;
	private int notifications_in_24h;
	public CollectorNotificationJson(){

	}

	public CollectorNotificationJson(String collector_name, String project_name, String output, String node_name, String node_alias, String version, String peer, int exit_status, String duration, boolean is_for_collector, int notifications_in_24h) {
		this.collector_name = collector_name;
		this.project_name = project_name;
		this.output = output;
		this.node_name = node_name;
		this.node_alias = node_alias;
		this.version = version;
		this.exit_status = exit_status;
		this.duration = duration;
		this.time = System.currentTimeMillis();
		this.time_formatted = StringUtils.formatDate(this.time);
		this.peer = peer;
		notification_id = project_name + "_" + node_name + "_" + collector_name;
		this.notifications_in_24h = notifications_in_24h;
	}

	public String collector_name() {
		return collector_name;
	}

	public String project_name() {
		return project_name;
	}

	public String output() {
		return output;
	}

	public long time() {
		return time;
	}

	public String node_name(){
		if (null != node) {
			return node.name();
		}
		return node_name;
	}
	public String node_alias(){
		if (null != node) {
			return node.alias();
		}
		return node_alias;
	}

	public String version() {
		return version;
	}

	public String peer() {
		return peer;
	}
	public Integer exit_status() {
		return exit_status;
	}
	public String time_formatted() {
		return time_formatted;
	}
	public String duration() {
		return duration;
	}

	@Override
	public String toString() {
		return "CollectorNotificationJson [collector_name=" + collector_name + ", project_name=" + project_name
				+ ", node=" + node + ", output=" + output + ", time=" + time + ", time_formatted=" + time_formatted
				+ ", version=" + version + ", peer=" + peer + ", exit_status="
				+ exit_status + ", duration=" + duration + "]";
	}

	public String toStringNoOutput() {
		return "CollectorNotificationJson [collector_name=" + collector_name + ", project_name=" + project_name
				+ ", node_name=" + node_name + ", time=" + time + ", version=" + version
				+ ", exit_status=" + exit_status
				+ ", duration=" + duration
				+ ", peer="
				+ peer + "]";
	}

	public String notification_id() {
		return notification_id;
	}
	public int notifications_in_24h() {
		return notifications_in_24h;
	}

}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- source: http://www.madore.org/~david/misc/unitest -->
<!-- remark:
Problem: DroidSans does not support "polytonic Greek"
Solution: https://github.com/android/platform_frameworks_base/blob/master/data/fonts/DroidSerif-Regular.ttf
Reference: https://code.google.com/p/android/issues/detail?id=26037#c150
-->
<text script="Grek" font="fonts/DroidSerif-Regular.ttf">
    Ἰοὺ ἰού· τὰ πάντ' ἂν ἐξήκοι σαφῆ.
</text>


text:
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using DentApp.Domain.Entities;
using DentApp.Domain.Interfaces.Repository;
using DentApp.Infra.Data.Repository;
using DentApp.Infra.Data.Context;
using System.Threading.Tasks;

namespace DentApp.Infra.Data.Repository
{
    public class LoginRepository : BaseRepository<Employee>, ILoginRepository
    {
        public LoginRepository(MongoDBContext context)
            : base(context)
        {
          SetCollection("users");
        }

        public async Task<Employee> doLogin(Login login)
        {
            return await FindSingle(user => ((user.Login.UserName == login.UserName) && (user.Login.Password == login.Password) && (user.isActive)));
        }
    }
}


text:
namespace Network
{
namespace Packet
{
namespace Event
{
class cEveBreakBlocks : public cPacketBase<cEveBreakBlocks, PacketId::EVE_BREAK_BLOCKS>
{
public:
    void packetImport( cNetworkHandle networkHandle, ubyte2 transferredBytes, char const* const data ) override;
    ubyte2 packetExport( char* const data ) override;
    std::vector<BlockFormat> mBreakFormats;
};
}
}
}


text:
@echo off

if "%~1" equ "" goto :invalid_args

goto :eof

:invalid_args
echo Invalid arguments.
goto :eof


text:
package org.simplity.examples.model;

import org.simplity.service.ServiceData;

public class CacheValueObject {

	private ServiceData inData;
	private ServiceData outData;
	private String servicename;

	public CacheValueObject(){

	}

	public CacheValueObject(ServiceData inData, ServiceData outData, String servicename) {
		super();
		this.inData = inData;
		this.outData = outData;
		this.servicename = servicename;
	}
	public ServiceData getInData() {
		return inData;
	}
	public void setInData(ServiceData inData) {
		this.inData = inData;
	}
	public ServiceData getOutData() {
		return outData;
	}
	public void setOutData(ServiceData outData) {
		this.outData = outData;
	}
	public String getServicename() {
		return servicename;
	}
	public void setServicename(String servicename) {
		this.servicename = servicename;
	}

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="JSHintConfiguration" version="2.8.0" use-config-file="false">
    <option asi="false" />
    <option bitwise="true" />
    <option boss="false" />
    <option browser="true" />
    <option browserify="false" />
    <option camelcase="false" />
    <option couch="false" />
    <option curly="true" />
    <option debug="false" />
    <option devel="false" />
    <option dojo="false" />
    <option elision="false" />
    <option enforceall="false" />
    <option eqeqeq="true" />
    <option eqnull="false" />
    <option es3="false" />
    <option es5="true" />
    <option esnext="false" />
    <option evil="false" />
    <option expr="false" />
    <option forin="true" />
    <option freeze="false" />
    <option funcscope="false" />
    <option futurehostile="true" />
    <option gcl="false" />
    <option globalstrict="true" />
    <option immed="false" />
    <option iterator="false" />
    <option jasmine="false" />
    <option jquery="false" />
    <option lastsemic="false" />
    <option latedef="false" />
    <option laxbreak="false" />
    <option laxcomma="false" />
    <option loopfunc="true" />
    <option maxerr="50" />
    <option mocha="false" />
    <option mootools="false" />
    <option moz="false" />
    <option multistr="false" />
    <option newcap="false" />
    <option noarg="true" />
    <option nocomma="true" />
    <option node="false" />
    <option noempty="false" />
    <option nomen="false" />
    <option nonbsp="false" />
    <option nonew="true" />
    <option nonstandard="false" />
    <option notypeof="false" />
    <option noyield="false" />
    <option onevar="false" />
    <option passfail="false" />
    <option phantom="false" />
    <option plusplus="false" />
    <option proto="true" />
    <option prototypejs="false" />
    <option qunit="false" />
    <option quotmark="false" />
    <option rhino="false" />
    <option scripturl="false" />
    <option shadow="false" />
    <option shelljs="false" />
    <option singleGroups="true" />
    <option smarttabs="false" />
    <option strict="false" />
    <option sub="false" />
    <option supernew="false" />
    <option trailing="false" />
    <option typed="false" />
    <option undef="true" />
    <option unused="strict" />
    <option validthis="false" />
    <option white="false" />
    <option withstmt="false" />
    <option worker="false" />
    <option wsh="false" />
    <option yui="false" />
  </component>
</project>


text:
require 'virtus'

module Duststorm
  module Forecast
    class Base
      include Virtus.model

      attribute :latitude, Duststorm::Attribute::Coordinate
      attribute :longitude, Duststorm::Attribute::Coordinate
      attribute :currently, Duststorm::Weather::Current
      attribute :daily, [Duststorm::Weather::Daily]
      attribute :hourly, [Duststorm::Weather::Hourly]
    end
  end
end


text:
package reactor.core.publisher;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Queue;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import java.util.function.BiFunction;
import java.util.function.BiPredicate;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Stream;

import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;

import reactor.core.CoreSubscriber;
import reactor.core.Disposable;
import reactor.core.Disposables;
import reactor.core.Exceptions;
import reactor.core.Scannable;
import reactor.util.annotation.Nullable;
import reactor.util.concurrent.Queues;
import reactor.util.context.Context;

/**
 * A Publisher that correlates two Publishers when they overlap in time and groups the
 * results.
 *

 * There are no guarantees in what order the items get combined when multiple items from
 * one or both source Publishers overlap.
 *
 * @param <TLeft> the left Publisher to correlate items from the source Publisher with
 * @param <TRight> the other Publisher to correlate items from the source Publisher with
 * @param <TLeftEnd> type that a function returns via a Publisher whose emissions indicate
 * the duration of the values of the source Publisher
 * @param <TRightEnd> type that a function that returns via a Publisher whose emissions
 * indicate the duration of the values of the {@code right} Publisher
 * @param <R> type that a function that takes an item emitted by each Publisher and
 * returns the value to be emitted by the resulting Publisher
 * @see https://github.com/reactor/reactive-streams-commons
 * @since 3.0
 */
final class FluxGroupJoin<TLeft, TRight, TLeftEnd, TRightEnd, R>
		extends InternalFluxOperator<TLeft, R> {

	final Publisher<? extends TRight> other;

	final Function<? super TLeft, ? extends Publisher<TLeftEnd>> leftEnd;

	final Function<? super TRight, ? extends Publisher<TRightEnd>> rightEnd;

	final BiFunction<? super TLeft, ? super Flux<TRight>, ? extends R> resultSelector;

	final Supplier<? extends Queue<TRight>> processorQueueSupplier;

	FluxGroupJoin(Flux<TLeft> source,
			Publisher<? extends TRight> other,
			Function<? super TLeft, ? extends Publisher<TLeftEnd>> leftEnd,
			Function<? super TRight, ? extends Publisher<TRightEnd>> rightEnd,
			BiFunction<? super TLeft, ? super Flux<TRight>, ? extends R> resultSelector,
			Supplier<? extends Queue<Object>> queueSupplier,
			Supplier<? extends Queue<TRight>> processorQueueSupplier) {
		super(source);
		this.other = Objects.requireNonNull(other, "other");
		this.leftEnd = Objects.requireNonNull(leftEnd, "leftEnd");
		this.rightEnd = Objects.requireNonNull(rightEnd, "rightEnd");
		this.processorQueueSupplier = Objects.requireNonNull(processorQueueSupplier, "processorQueueSupplier");
		this.resultSelector = Objects.requireNonNull(resultSelector, "resultSelector");
	}

	@Override
	public CoreSubscriber<? super TLeft> subscribeOrReturn(CoreSubscriber<? super R> actual) {
		GroupJoinSubscription<TLeft, TRight, TLeftEnd, TRightEnd, R> parent =
				new GroupJoinSubscription<>(actual,
						leftEnd,
						rightEnd,
						resultSelector,
						processorQueueSupplier);

		actual.onSubscribe(parent);

		LeftRightSubscriber left = new LeftRightSubscriber(parent, true);
		parent.cancellations.add(left);
		LeftRightSubscriber right = new LeftRightSubscriber(parent, false);
		parent.cancellations.add(right);

		source.subscribe(left);
		other.subscribe(right);
		return null;
	}

	@Override
	public Object scanUnsafe(Attr key) {
		if (key == Attr.RUN_STYLE) return Attr.RunStyle.SYNC;
		return super.scanUnsafe(key);
	}

	interface JoinSupport<T> extends InnerProducer<T> {

		void innerError(Throwable ex);

		void innerComplete(LeftRightSubscriber sender);

		void innerValue(boolean isLeft, Object o);

		void innerClose(boolean isLeft, LeftRightEndSubscriber index);

		void innerCloseError(Throwable ex);
	}

	static final class GroupJoinSubscription<TLeft, TRight, TLeftEnd, TRightEnd, R>
			implements JoinSupport<R> {

		final Queue<Object>               queue;
		final BiPredicate<Object, Object> queueBiOffer;

		final Disposable.Composite cancellations;

		final Map<Integer, Sinks.Many<TRight>> lefts;

		final Map<Integer, TRight> rights;

		final Function<? super TLeft, ? extends Publisher<TLeftEnd>> leftEnd;

		final Function<? super TRight, ? extends Publisher<TRightEnd>> rightEnd;

		final BiFunction<? super TLeft, ? super Flux<TRight>, ? extends R> resultSelector;

		final Supplier<? extends Queue<TRight>> processorQueueSupplier;

		final CoreSubscriber<? super R>             actual;

		int leftIndex;

		int rightIndex;

		volatile int wip;

		static final AtomicIntegerFieldUpdater<GroupJoinSubscription> WIP =
				AtomicIntegerFieldUpdater.newUpdater(GroupJoinSubscription.class, "wip");

		volatile int active;

		static final AtomicIntegerFieldUpdater<GroupJoinSubscription> ACTIVE =
				AtomicIntegerFieldUpdater.newUpdater(GroupJoinSubscription.class,
						"active");

		volatile long requested;

		static final AtomicLongFieldUpdater<GroupJoinSubscription> REQUESTED =
				AtomicLongFieldUpdater.newUpdater(GroupJoinSubscription.class,
						"requested");

		volatile Throwable error;

		static final AtomicReferenceFieldUpdater<GroupJoinSubscription, Throwable> ERROR =
				AtomicReferenceFieldUpdater.newUpdater(GroupJoinSubscription.class,
						Throwable.class,
						"error");

		static final Integer LEFT_VALUE = 1;

		static final Integer RIGHT_VALUE = 2;

		static final Integer LEFT_CLOSE = 3;

		static final Integer RIGHT_CLOSE = 4;

		@SuppressWarnings("unchecked")
		GroupJoinSubscription(CoreSubscriber<? super R> actual,
				Function<? super TLeft, ? extends Publisher<TLeftEnd>> leftEnd,
				Function<? super TRight, ? extends Publisher<TRightEnd>> rightEnd,
				BiFunction<? super TLeft, ? super Flux<TRight>, ? extends R> resultSelector,
				Supplier<? extends Queue<TRight>> processorQueueSupplier) {
			this.actual = actual;
			this.cancellations = Disposables.composite();
			this.processorQueueSupplier = processorQueueSupplier;
			this.queue = Queues.unboundedMultiproducer().get();
			this.queueBiOffer = (BiPredicate) queue;
			this.lefts = new LinkedHashMap<>();
			this.rights = new LinkedHashMap<>();
			this.leftEnd = leftEnd;
			this.rightEnd = rightEnd;
			this.resultSelector = resultSelector;
			ACTIVE.lazySet(this, 2);
		}

		@Override
		public final CoreSubscriber<? super R> actual() {
			return actual;
		}

		@Override
		public Stream<? extends Scannable> inners() {
			return Stream.concat(
					lefts.values().stream().map(Scannable::from),
					Scannable.from(cancellations).inners()
			);
		}

		@Override
		@Nullable
		public Object scanUnsafe(Attr key) {
			if (key == Attr.REQUESTED_FROM_DOWNSTREAM) return requested;
			if (key == Attr.CANCELLED) return cancellations.isDisposed();
			if (key == Attr.BUFFERED) return queue.size() / 2;
			if (key == Attr.TERMINATED) return active == 0;
			if (key == Attr.ERROR) return error;

			return JoinSupport.super.scanUnsafe(key);
		}

		@Override
		public void request(long n) {
			if (Operators.validate(n)) {
				Operators.addCap(REQUESTED, this, n);
			}
		}

		@Override
		public void cancel() {
			if (cancellations.isDisposed()) {
				return;
			}
			cancellations.dispose();
			if (WIP.getAndIncrement(this) == 0) {
				queue.clear();
			}
		}

		void errorAll(Subscriber<?> a) {
			Throwable ex = Exceptions.terminate(ERROR, this);

			for (Sinks.Many<TRight> up : lefts.values()) {
				up.emitError(ex, Sinks.EmitFailureHandler.FAIL_FAST);
			}

			lefts.clear();
			rights.clear();

			a.onError(ex);
		}

		void drain() {
			if (WIP.getAndIncrement(this) != 0) {
				return;
			}

			int missed = 1;
			Queue<Object> q = queue;
			Subscriber<? super R> a = actual;

			for (; ; ) {
				for (; ; ) {
					if (cancellations.isDisposed()) {
						q.clear();
						return;
					}

					Throwable ex = error;
					if (ex != null) {
						q.clear();
						cancellations.dispose();
						errorAll(a);
						return;
					}

					boolean d = active == 0;

					Integer mode = (Integer) q.poll();

					boolean empty = mode == null;

					if (d && empty) {
						for (Sinks.Many<?> up : lefts.values()) {
							up.emitComplete(Sinks.EmitFailureHandler.FAIL_FAST);
						}

						lefts.clear();
						rights.clear();
						cancellations.dispose();

						a.onComplete();
						return;
					}

					if (empty) {
						break;
					}

					Object val = q.poll();

					if (mode == LEFT_VALUE) {
						@SuppressWarnings("unchecked") TLeft left = (TLeft) val;

						Sinks.Many<TRight> up = Sinks.unsafe().many().unicast().onBackpressureBuffer(processorQueueSupplier.get());
						int idx = leftIndex++;
						lefts.put(idx, up);

						Publisher<TLeftEnd> p;

						try {
							p = Objects.requireNonNull(leftEnd.apply(left),
									"The leftEnd returned a null Publisher");
						}
						catch (Throwable exc) {
							Exceptions.addThrowable(ERROR,
									this,
									Operators.onOperatorError(this, exc, left,
											actual.currentContext()));
							errorAll(a);
							return;
						}

						LeftRightEndSubscriber end =
								new LeftRightEndSubscriber(this, true, idx);
						cancellations.add(end);

						p.subscribe(end);

						ex = error;
						if (ex != null) {
							cancellations.dispose();
							q.clear();
							errorAll(a);
							return;
						}

						R w;

						try {
							w = Objects.requireNonNull(resultSelector.apply(left, up.asFlux()),
									"The resultSelector returned a null value");
						}
						catch (Throwable exc) {
							Exceptions.addThrowable(ERROR,
									this, Operators.onOperatorError(this, exc, up,
											actual.currentContext()));
							errorAll(a);
							return;
						}

						// TODO since only left emission calls the actual, it is possible to link downstream backpressure with left's source and not error out
						long r = requested;
						if (r != 0L) {
							a.onNext(w);
							Operators.produced(REQUESTED, this, 1);
						}
						else {
							Exceptions.addThrowable(ERROR,
									this,
									Exceptions.failWithOverflow());
							errorAll(a);
							return;
						}

						for (TRight right : rights.values()) {
							up.emitNext(right, Sinks.EmitFailureHandler.FAIL_FAST);
						}
					}
					else if (mode == RIGHT_VALUE) {
						@SuppressWarnings("unchecked") TRight right = (TRight) val;

						int idx = rightIndex++;

						rights.put(idx, right);

						Publisher<TRightEnd> p;

						try {
							p = Objects.requireNonNull(rightEnd.apply(right),
									"The rightEnd returned a null Publisher");
						}
						catch (Throwable exc) {
							Exceptions.addThrowable(ERROR,
									this,
									Operators.onOperatorError(this, exc, right,
											actual.currentContext()));
							errorAll(a);
							return;
						}

						LeftRightEndSubscriber end =
								new LeftRightEndSubscriber(this, false, idx);
						cancellations.add(end);

						p.subscribe(end);

						ex = error;
						if (ex != null) {
							q.clear();
							cancellations.dispose();
							errorAll(a);
							return;
						}

						for (Sinks.Many<TRight> up : lefts.values()) {
							up.emitNext(right, Sinks.EmitFailureHandler.FAIL_FAST);
						}
					}
					else if (mode == LEFT_CLOSE) {
						LeftRightEndSubscriber end = (LeftRightEndSubscriber) val;

						Sinks.Many<TRight> up = lefts.remove(end.index);
						cancellations.remove(end);
						if (up != null) {
							up.emitComplete(Sinks.EmitFailureHandler.FAIL_FAST);
						}
					}
					else if (mode == RIGHT_CLOSE) {
						LeftRightEndSubscriber end = (LeftRightEndSubscriber) val;

						rights.remove(end.index);
						cancellations.remove(end);
					}
				}

				missed = WIP.addAndGet(this, -missed);
				if (missed == 0) {
					break;
				}
			}
		}

		@Override
		public void innerError(Throwable ex) {
			if (Exceptions.addThrowable(ERROR, this, ex)) {
				ACTIVE.decrementAndGet(this);
				drain();
			}
			else {
				Operators.onErrorDropped(ex, actual.currentContext());
			}
		}

		@Override
		public void innerComplete(LeftRightSubscriber sender) {
			cancellations.remove(sender);
			ACTIVE.decrementAndGet(this);
			drain();
		}

		@Override
		public void innerValue(boolean isLeft, Object o) {
			queueBiOffer.test(isLeft ? LEFT_VALUE : RIGHT_VALUE, o);
			drain();
		}

		@Override
		public void innerClose(boolean isLeft, LeftRightEndSubscriber index) {
			queueBiOffer.test(isLeft ? LEFT_CLOSE : RIGHT_CLOSE, index);
			drain();
		}

		@Override
		public void innerCloseError(Throwable ex) {
			if (Exceptions.addThrowable(ERROR, this, ex)) {
				drain();
			}
			else {
				Operators.onErrorDropped(ex, actual.currentContext());
			}
		}
	}

	static final class LeftRightSubscriber
			implements InnerConsumer<Object>, Disposable {

		final JoinSupport<?> parent;

		final boolean isLeft;

		volatile Subscription subscription;

		final static AtomicReferenceFieldUpdater<LeftRightSubscriber, Subscription>
				SUBSCRIPTION =
				AtomicReferenceFieldUpdater.newUpdater(LeftRightSubscriber.class,
						Subscription.class,
						"subscription");

		LeftRightSubscriber(JoinSupport<?> parent, boolean isLeft) {
			this.parent = parent;
			this.isLeft = isLeft;
		}

		@Override
		public void dispose() {
			Operators.terminate(SUBSCRIPTION, this);
		}

		@Override
		public Context currentContext() {
			return parent.actual().currentContext();
		}

		@Override
		@Nullable
		public Object scanUnsafe(Attr key) {
			if (key == Attr.PARENT) return subscription;
			if (key == Attr.ACTUAL ) return parent;
			if (key == Attr.CANCELLED) return isDisposed();
			if (key == Attr.RUN_STYLE) return Attr.RunStyle.SYNC;

			return null;
		}

		@Override
		public boolean isDisposed() {
			return Operators.cancelledSubscription() == subscription;
		}

		@Override
		public void onSubscribe(Subscription s) {
			if (Operators.setOnce(SUBSCRIPTION, this, s)) {
				s.request(Long.MAX_VALUE);
			}
		}

		@Override
		public void onNext(Object t) {
			parent.innerValue(isLeft, t);
		}

		@Override
		public void onError(Throwable t) {
			parent.innerError(t);
		}

		@Override
		public void onComplete() {
			parent.innerComplete(this);
		}

	}

	static final class LeftRightEndSubscriber
			implements InnerConsumer<Object>, Disposable {

		final JoinSupport<?> parent;

		final boolean isLeft;

		final int index;

		volatile Subscription subscription;

		final static AtomicReferenceFieldUpdater<LeftRightEndSubscriber, Subscription>
				SUBSCRIPTION = AtomicReferenceFieldUpdater.newUpdater(
				LeftRightEndSubscriber.class,
				Subscription.class,
				"subscription");

		LeftRightEndSubscriber(JoinSupport<?> parent, boolean isLeft, int index) {
			this.parent = parent;
			this.isLeft = isLeft;
			this.index = index;
		}

		@Override
		public void dispose() {
			Operators.terminate(SUBSCRIPTION, this);
		}

		@Override
		@Nullable
		public Object scanUnsafe(Attr key) {
			if (key == Attr.PARENT) return subscription;
			if (key == Attr.CANCELLED) return isDisposed();
			if (key == Attr.RUN_STYLE) return Attr.RunStyle.SYNC;

			return null;
		}

		@Override
		public boolean isDisposed() {
			return Operators.cancelledSubscription() == subscription;
		}

		@Override
		public void onSubscribe(Subscription s) {
			if (Operators.setOnce(SUBSCRIPTION, this, s)) {
				s.request(Long.MAX_VALUE);
			}
		}

		@Override
		public void onNext(Object t) {
			if (Operators.terminate(SUBSCRIPTION, this)) {
				parent.innerClose(isLeft, this);
			}
		}

		@Override
		public void onError(Throwable t) {
			parent.innerError(t);
		}

		@Override
		public void onComplete() {
			parent.innerClose(isLeft, this);
		}

		@Override
		public Context currentContext() {
			return parent.actual().currentContext();
		}

	}
}


text:
package example.repo;

import example.model.Customer1722;

import java.util.List;

import org.springframework.data.repository.CrudRepository;

public interface Customer1722Repository extends CrudRepository<Customer1722, Long> {

	List<Customer1722> findByLastName(String lastName);
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: DeDu
 * Date: 08.03.14
 * Time: 18:32
 */

class SFTPStore implements StoreInterface {
    private $config;
    private $path;
    private $logger;

    function __construct($path, $config, $logger)
    {
        $this->path = $path;
        $this->config = $config;
        $this->logger = $logger;

        // defaults:
        $defaultConfig = ['dir_prefix' => 'Backup_'];
        $this->config = array_merge($defaultConfig, $this->config);
    }

    public function store()
    {
        $this->logger->logInfo("Starting Upload per SFTP.");

        if (!isset($this->config['user'])) {
            $this->logger->logError("Need username for SFTP.");
            return;
        }
        if (!isset($this->config['password'])) {
            $this->logger->logError("Need password for SFTP.");
            return;
        }
        if (!isset($this->config['host']) OR empty($this->config["host"])) {
            $this->logger->logError("Need host for SFTP.");
            return;
        }

        // Foldername:
        $datestring = date("YmdHi");
        $foldername = $this->config['dir_prefix'] . $datestring;

        $stream = "ssh2.sftp://";
        if (!empty($this->config["user"])) {
            $stream .= $this->config["user"] . ":" . $this->config["password"] . "@";
        }
        $stream .= $this->config["host"] . "/";
        if (!empty($this->config["path"])) {
            $stream .= $this->config["path"] ."/";
        }
        $stream .= $foldername . "/";

        mkdir($stream, 0777, true);

        foreach (glob($this->path . "/*") as $file) {
            if (is_file($file)) {
                $thisStream = $stream . basename($file);
                $ret = file_put_contents($thisStream, file_get_contents($file));
                if ($ret === false){
                    $this->logger->logWarn("Failed to transfer file over SFTP: " . $file);
                }
            }
        }

        $this->logger->logInfo("Done Uploading per SFTP.");
    }
}


text:
'use strict'

let gulp = require('gulp')
let gutil = require('gulp-util')
let browserify = require('browserify')
let watchify = require('watchify')
let source = require('vinyl-source-stream')
let plugins = require('gulp-load-plugins')()
let browserSync = require('browser-sync').create()
let rimraf = require('rimraf')
let runSequence = require('run-sequence')
let babelify = require('babelify')

let reload = browserSync.reload

let paths = {
    vendor: {
        bootstrap: 'public/vendor/bootstrap'
    }
}

/**
 * Asset pipeline
 */
let bundleOptions = {
    entries: ['app/assets/javascripts/app.js'],
    debug: true
}

function bundleFile(file) {

    let bundler = watchify(browserify({
        entries: [`app/assets/javascripts/${file}.js`],
        debug: true
    }))

    bundler.transform(babelify)

    bundler.on('update', () => {
        gutil.log(`Bundling ${file}.js..`)
        bundle()
    })

    return bundler.bundle()
        .on('error', gutil.log.bind(gutil, 'Browserify error'))
        .pipe(source(`${file}.js`))
        .pipe(gulp.dest('public/js'))
}

function bundle() {

    let files = ['app']

    files.forEach(bundleFile)
}

gulp.task('bundle', bundle)

/**
 * Sass
 */

gulp.task('sass', () =>
    gulp.src('app/assets/stylesheets/*.scss')
        .pipe(plugins.sass().on('error', plugins.sass.logError))
        .pipe(gulp.dest('public/css'))
        .pipe(browserSync.stream())
)

gulp.task('sass:watch', () =>
    gulp.watch('app/assets/stylesheets/*.scss', ['sass']))

/**
 * BrowserSync
 */
gulp.task('browser-sync', () => {
    browserSync.init({
        proxy: 'localhost:3000',
        port: 3001,
        open: false,
        ui: {
            port: 3002
        }
    })

    gulp.watch('public/js/*.js', reload)
    gulp.watch('public/theme/**/*.js', reload)

    gulp.watch('app/views/**/*.html.erb').on('change', reload)
})

/**
 * Standard build task
 * - copies bootstrap assets
 */
gulp.task('copy', () => {

    gulp.src('node_modules/bootstrap/dist/**/*.*')
        .pipe(gulp.dest(paths.vendor.bootstrap))

})

gulp.task('clean', (done) => {

    gutil.log('Removing bootstrap')
    rimraf(paths.vendor.bootstrap, {}, done)

})

gulp.task('build', ['copy'])

gulp.task('rebuild', done => runSequence('clean', 'build', done))

/**
 * Server task
 */
gulp.task('server', ['build', 'bundle', 'sass:watch', 'browser-sync'], plugins.shell.task([
    'rails server'
]))


text:
namespace Microsoft.Zelig.CodeGeneration.IR.CompilationSteps.Phases
{
    using System;
    using System.Collections.Generic;

    using Microsoft.Zelig.Runtime.TypeSystem;

    [PhaseDisabled()]
    [PhaseOrdering( ExecuteAfter=typeof(CollectRegisterAllocationConstraints), IsPipelineBlock=true )]
    [PhaseLimit( Operator.OperatorLevel.StackLocations )]
    public sealed class AllocateRegisters : PhaseDriver
    {
        //
        // Constructor Methods
        //

        public AllocateRegisters( Controller context ) : base ( context )
        {
        }

        //
        // Helper Methods
        //

        public override PhaseDriver Run()
        {
////        GrowOnlySet< Type > set = SetFactory.New< Type >();

            ParallelTransformationsHandler.EnumerateFlowGraphs( this.TypeSystem, delegate( ControlFlowGraphStateForCodeTransformation cfg )
            {
                Transformations.GlobalRegisterAllocation.Execute( cfg );

                cfg.DropDeadVariables();

////            lock(set)
////            {
////                foreach(IR.Operator op in cfg.SpanningTreeOperators)
////                {
////                    set.Insert( op.GetType() );
////                }
////            }
            } );

////        foreach(Type t in set)
////        {
////            Console.WriteLine( "{0}", t.FullName );
////        }

            return this.NextPhase;
        }
    }
}


text:
import Wrld from "../../../../types";

import IndoorMapFloor from "../../../public/indoors/indoor_map_floor";

describe("IndoorMapFloor class", () => {
  let floor: Wrld.indoors.IndoorMapFloor;
  const floorZOrder = 1;
  const floorIndex = 0;
  const floorName = "Ground Floor";
  const floorShortName = "G";

  beforeEach(() => {
    floor = new IndoorMapFloor(floorZOrder, floorIndex, floorName, floorShortName);
  });

  /* deprecated IndoorMapEntrance.getFloorId */

  describe("IndoorMapEntrance.getFloorId", () => {
    it("is a function", () => {
      expect(typeof floor.getFloorId).toBe("function");
    });

    it("returns the floor short name", () => {
      const value = floor.getFloorId();
      expect(value).toBe(floorShortName);
    });
  });

  /* deprecated internal IndoorMapEntrance._getFloorId */

  describe("IndoorMapEntrance._getFloorId", () => {
    it("is a function", () => {
      expect(typeof (floor as any)._getFloorId).toBe("function");
    });

    it("returns the floor z order", () => {
      const value = (floor as any)._getFloorId();
      expect(value).toBe(floorZOrder);
    });
  });

  /* IndoorMapEntrance.getFloorZOrder */

  describe("IndoorMapEntrance.getFloorZOrder", () => {
    it("is a function", () => {
      expect(typeof floor.getFloorZOrder).toBe("function");
    });

    it("returns the floor z order", () => {
      const value = floor.getFloorZOrder();
      expect(value).toBe(floorZOrder);
    });
  });

  /* IndoorMapEntrance.getFloorIndex */

  describe("IndoorMapEntrance.getFloorIndex", () => {
    it("is a function", () => {
      expect(typeof floor.getFloorIndex).toBe("function");
    });

    it("returns the floor index", () => {
      const value = floor.getFloorIndex();
      expect(value).toBe(floorIndex);
    });
  });

  /* IndoorMapEntrance.getFloorName */

  describe("IndoorMapEntrance.getFloorName", () => {
    it("is a function", () => {
      expect(typeof floor.getFloorName).toBe("function");
    });

    it("returns the floor name", () => {
      const value = floor.getFloorName();
      expect(value).toBe(floorName);
    });
  });

  /* IndoorMapEntrance.getFloorShortName */

  describe("IndoorMapEntrance.getFloorShortName", () => {
    it("is a function", () => {
      expect(typeof floor.getFloorShortName).toBe("function");
    });

    it("returns the floor short name", () => {
      const value = floor.getFloorShortName();
      expect(value).toBe(floorShortName);
    });
  });
});


text:
BEGIN_PCO_CORE_NAMESPACE

template<class Mapper>
inline LFO<Mapper>::LFO()
{
}

template<class Mapper>
inline LFO<Mapper>::~LFO()
{
}

// -----------------------------------------------------------------------------

template<class Mapper>
inline void LFO<Mapper>::init()
{
    setFrequency(8000);
}

template<class Mapper>
inline void LFO<Mapper>::process(ModSample& outSample)
{
    updatePhase();
    switch (mWaveform)
    {
        case Sine:      generateSine(outSample);        break;
        case Square:    generateSquare(outSample);      break;
        case Saw:       generateSaw(outSample);         break;
        case Ramp:      generateRamp(outSample);        break;
        case Triangle:  generateTriangle(outSample);    break;
        default:
            break;
    }
}

template<class Mapper>
inline void LFO<Mapper>::reset()
{
    resetTickCounter();
    mPhase = 0;
}

// -----------------------------------------------------------------------------

template<class Mapper>
inline void LFO<Mapper>::setWaveform(byte inWaveform)
{
    mWaveform = inWaveform % numWaveforms;
}

template<class Mapper>
inline void LFO<Mapper>::setFrequency(Frequency inFrequency)
{
    static const Phase phaseMax = 0xffff;
    static const FixedPointFreq tickFreq = sTickFrequency * 1000;

    const FixedPointFreq freq = Mapper::map(inFrequency);
    const uint16 numTicksPerPeriod = tickFreq / freq;
    mPhaseIncrement = phaseMax / numTicksPerPeriod;
}

// -----------------------------------------------------------------------------

template<class Mapper>
inline void LFO<Mapper>::generateSine(ModSample& outSample)
{
    // 256 points for half wave -> 512 points for full wave
    // use overflow for index
    // Phase    0                     7fff 8000                  ffff
    // Sign     [ ++++++++++++++++++++++ ] [ ---------------------- ]
    // Index    0                      255 0                      255
    // Factor   1                        1 -1                      -1

    const uint8 index = mPhase >> 7;
    const uint7 alpha = mPhase & 0x7f;
    const int16 sampleA = LookupTables::getHalfSine(index);
    const int16 sampleB = LookupTables::getHalfSine(index + 1);
    const int16 sign = (mPhase & 0x8000) ? -1 : 1;
    outSample = sign * interpol_s(sampleA, sampleB, alpha);
}

template<class Mapper>
inline void LFO<Mapper>::generateSquare(ModSample& outSample)
{
    outSample = (mPhase & 0x8000) ? sModSampleMax : sModSampleMin;
}

template<class Mapper>
inline void LFO<Mapper>::generateSaw(ModSample& outSample)
{
    outSample = sModSampleMax - mPhase;
}

template<class Mapper>
inline void LFO<Mapper>::generateRamp(ModSample& outSample)
{
    outSample = sModSampleMin + mPhase;
}

template<class Mapper>
inline void LFO<Mapper>::generateTriangle(ModSample& outSample)
{
    outSample = (mPhase & 0x8000) ? sModSampleMax - (2 * (mPhase & 0x7fff))
                                  : sModSampleMin + 2 * mPhase;
}

// -----------------------------------------------------------------------------

template<class Mapper>
inline void LFO<Mapper>::updatePhase()
{
    TickCount ticks = 0;
    fetchTickCounter(ticks);
    mPhase += ticks * mPhaseIncrement;
}

END_PCO_CORE_NAMESPACE


text:
package gost

import (
	"bufio"
	"bytes"
	"crypto/tls"
	"encoding/base64"
	"errors"
	"github.com/ginuerzh/gosocks5"
	"github.com/golang/glog"
	"github.com/shadowsocks/shadowsocks-go/shadowsocks"
	"net"
	"net/http"
	"net/http/httputil"
	"net/url"
	"strconv"
	"sync"
	"time"
)

type ProxyConn struct {
	conn           net.Conn
	Node           ProxyNode
	handshaked     bool
	handshakeMutex sync.Mutex
	handshakeErr   error
}

func NewProxyConn(conn net.Conn, node ProxyNode) *ProxyConn {
	return &ProxyConn{
		conn: conn,
		Node: node,
	}
}

// Handshake handshake with this proxy node based on the proxy node info: transport, protocol, authentication, etc.
//
// NOTE: any HTTP2 scheme will be treated as http (for protocol) or tls (for transport).
func (c *ProxyConn) Handshake() error {
	c.handshakeMutex.Lock()
	defer c.handshakeMutex.Unlock()

	if err := c.handshakeErr; err != nil {
		return err
	}
	if c.handshaked {
		return nil
	}
	c.handshakeErr = c.handshake()
	return c.handshakeErr
}

func (c *ProxyConn) handshake() error {
	var tlsUsed bool

	switch c.Node.Transport {
	case "ws": // websocket connection
		u := url.URL{Scheme: "ws", Host: c.Node.Addr, Path: "/ws"}
		conn, err := WebsocketClientConn(u.String(), c.conn, nil)
		if err != nil {
			return err
		}
		c.conn = conn
	case "wss": // websocket security
		tlsUsed = true
		u := url.URL{Scheme: "wss", Host: c.Node.Addr, Path: "/ws"}
		config := &tls.Config{
			InsecureSkipVerify: c.Node.insecureSkipVerify(),
			ServerName:         c.Node.serverName,
		}
		conn, err := WebsocketClientConn(u.String(), c.conn, config)
		if err != nil {
			return err
		}
		c.conn = conn
	case "tls", "http2": // tls connection
		tlsUsed = true
		cfg := &tls.Config{
			InsecureSkipVerify: c.Node.insecureSkipVerify(),
			ServerName:         c.Node.serverName,
		}
		c.conn = tls.Client(c.conn, cfg)
	case "h2": // same as http2, but just set a flag for later using.
		tlsUsed = true
	default:
	}

	switch c.Node.Protocol {
	case "socks", "socks5": // socks5 handshake with auth and tls supported
		selector := &clientSelector{
			methods: []uint8{
				gosocks5.MethodNoAuth,
				gosocks5.MethodUserPass,
				//MethodTLS,
			},
			user: c.Node.User,
		}

		if !tlsUsed { // if transport is not security, enable security socks5
			selector.methods = append(selector.methods, MethodTLS)
			selector.tlsConfig = &tls.Config{
				InsecureSkipVerify: c.Node.insecureSkipVerify(),
				ServerName:         c.Node.serverName,
			}
		}

		conn := gosocks5.ClientConn(c.conn, selector)
		if err := conn.Handleshake(); err != nil {
			return err
		}
		c.conn = conn
	case "ss": // shadowsocks
		if c.Node.User != nil {
			method := c.Node.User.Username()
			password, _ := c.Node.User.Password()
			cipher, err := shadowsocks.NewCipher(method, password)
			if err != nil {
				return err
			}
			c.conn = &shadowConn{conn: shadowsocks.NewConn(c.conn, cipher)}
		}
	case "http", "http2":
		fallthrough
	default:
	}

	c.handshaked = true

	return nil
}

// Connect connect to addr through this proxy node
func (c *ProxyConn) Connect(addr string) error {
	switch c.Node.Protocol {
	case "ss": // shadowsocks
		host, port, err := net.SplitHostPort(addr)
		if err != nil {
			return err
		}
		p, _ := strconv.Atoi(port)
		req := gosocks5.NewRequest(gosocks5.CmdConnect, &gosocks5.Addr{
			Type: gosocks5.AddrDomain,
			Host: host,
			Port: uint16(p),
		})
		buf := bytes.Buffer{}
		if err := req.Write(&buf); err != nil {
			return err
		}
		b := buf.Bytes()
		if _, err := c.Write(b[3:]); err != nil {
			return err
		}

		glog.V(LDEBUG).Infoln("[ss]", req)
	case "socks", "socks5":
		host, port, err := net.SplitHostPort(addr)
		if err != nil {
			return err
		}
		p, _ := strconv.Atoi(port)
		req := gosocks5.NewRequest(gosocks5.CmdConnect, &gosocks5.Addr{
			Type: gosocks5.AddrDomain,
			Host: host,
			Port: uint16(p),
		})
		if err := req.Write(c); err != nil {
			return err
		}
		glog.V(LDEBUG).Infoln("[socks5]", req)

		reply, err := gosocks5.ReadReply(c)
		if err != nil {
			return err
		}
		glog.V(LDEBUG).Infoln("[socks5]", reply)
		if reply.Rep != gosocks5.Succeeded {
			return errors.New("Service unavailable")
		}
	case "http":
		fallthrough
	default:
		req := &http.Request{
			Method:     http.MethodConnect,
			URL:        &url.URL{Host: addr},
			Host:       addr,
			ProtoMajor: 1,
			ProtoMinor: 1,
			Header:     make(http.Header),
		}
		req.Header.Set("Proxy-Connection", "keep-alive")
		if c.Node.User != nil {
			req.Header.Set("Proxy-Authorization",
				"Basic "+base64.StdEncoding.EncodeToString([]byte(c.Node.User.String())))
		}
		if err := req.Write(c); err != nil {
			return err
		}
		if glog.V(LDEBUG) {
			dump, _ := httputil.DumpRequest(req, false)
			glog.Infoln(string(dump))
		}

		resp, err := http.ReadResponse(bufio.NewReader(c), req)
		if err != nil {
			return err
		}
		if glog.V(LDEBUG) {
			dump, _ := httputil.DumpResponse(resp, false)
			glog.Infoln(string(dump))
		}
		if resp.StatusCode != http.StatusOK {
			return errors.New(resp.Status)
		}
	}

	return nil
}

func (c *ProxyConn) Read(b []byte) (n int, err error) {
	return c.conn.Read(b)
}

func (c *ProxyConn) Write(b []byte) (n int, err error) {
	return c.conn.Write(b)
}

func (c *ProxyConn) Close() error {
	return c.conn.Close()
}

func (c *ProxyConn) LocalAddr() net.Addr {
	return c.conn.LocalAddr()
}

func (c *ProxyConn) RemoteAddr() net.Addr {
	return c.conn.RemoteAddr()
}

func (c *ProxyConn) SetDeadline(t time.Time) error {
	return c.conn.SetDeadline(t)
}

func (c *ProxyConn) SetReadDeadline(t time.Time) error {
	return c.conn.SetReadDeadline(t)
}

func (c *ProxyConn) SetWriteDeadline(t time.Time) error {
	return c.conn.SetWriteDeadline(t)
}


text:
FOUNDATION_EXPORT double CodeCoverageIfBugVersionNumber;
FOUNDATION_EXPORT const unsigned char CodeCoverageIfBugVersionString[];


text:
package multiverse.msgsys;

import java.util.*;

// Message instance --> list of callbacks
// Message instance --> list of RemoteAgent
/** Message matching optimized around message type.  Supports any
{@link Filter} sub-class.
<p>
Used internally by {@link MessageAgent} when a {@link Filter Filter's}
filter table is 'null'.
*/
public class DefaultFilterTable extends FilterTable
{
    public synchronized void addFilter(Subscription sub, Object object)
    {
        Collection<MessageType> types = sub.filter.getMessageTypes();
        if (types == null) {
            //allTypesFilters.put(subId,filter);
            return;
        }

        for (MessageType tt : types)  {
            Map<Object,List<Subscription>> objectMap = messageTypes.get(tt);
            if (objectMap == null) {
                objectMap = new HashMap<Object,List<Subscription>>();
                messageTypes.put(tt,objectMap);
            }
            LinkedList<Subscription> subList =
                (LinkedList<Subscription>) objectMap.get(object);
            if (subList == null) {
                subList = new LinkedList<Subscription>();
                objectMap.put(object,subList);
            }
            if (sub.getTrigger() != null)
                subList.addFirst(sub);
            else
                subList.addLast(sub);
        }
    }

    public synchronized void removeFilter(Subscription sub, Object object)
    {
        Collection<MessageType> types = sub.filter.getMessageTypes();
        if (types == null) {
            //allTypesFilters.remove(subId);
            return;
        }

        for (MessageType tt : types)  {
            Map<Object,List<Subscription>> objectMap = messageTypes.get(tt);
            if (objectMap == null) {
                continue;
            }
            List<Subscription> subList = objectMap.get(object);
            if (subList == null) {
                continue;
            }
            //## this is bummer; linear search for sub-id
            ListIterator<Subscription> iterator = subList.listIterator();
            while (iterator.hasNext()) {
                Subscription ss = iterator.next();
                if (ss.subId == sub.subId) {
                    iterator.remove();
                    break;
                }
            }
            if (subList.size() == 0) {
                objectMap.remove(object);
            }
        }
    }

    public synchronized int match(Message message, Set<Object> matches,
        List<Subscription> triggers)
    {
        MessageType type = message.getMsgType();
        Map<Object,List<Subscription>> objectMap = messageTypes.get(type);
        if (objectMap == null)
            return 0;
        int count = 0;
        for (Map.Entry<Object,List<Subscription>> entry : objectMap.entrySet()) {
            List<Subscription> subs = entry.getValue();
            boolean matched = false;
            for (Subscription sub : subs) {
                if (sub.filter.matchRemaining(message))  {
                    if (!matched && matches.add(entry.getKey())) {
                        count++;
                        matched = true;
                    }
                    if (triggers != null && sub.getTrigger() != null &&
                                sub.getTrigger().match(message))
                        triggers.add(sub);
                    else
                        break;
                }
            }
        }
        return count;
    }

    Map<MessageType,Map<Object,List<Subscription>>> messageTypes =
                new HashMap<MessageType,Map<Object,List<Subscription>>>();

}


text:
handle

Content for default expander


text:
from unittest import TestCase

from boundary import AlarmGet
from boundary import AlarmCreate
from boundary import AlarmDelete
from boundary import API
from cli_test import CLITest
from cli_runner import CLIRunner
import json

class AlarmGetTest(TestCase):
    def setUp(self):
        self.cli = AlarmGet()
        self.api = API()

    def test_cli_description(self):
        CLITest.check_description(self, self.cli)

    def test_cli_help(self):
        CLITest.check_cli_help(self, self.cli)

    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        alarm_id = 1024

        curl = runner.get_output(['-i', str(alarm_id),
                                  '-z'])
        CLITest.check_curl(self, self.cli, curl)

    def test_api_call(self):
        self.api = API()
        name = 'ALARM_GET_TEST'
        metric = 'CPU'
        trigger_interval = 60000
        aggregate = 'sum'
        operation = 'gt'
        threshold = '0.80'
        alarm_create = self.api.alarm_create(name=name,
                                             metric=metric,
                                             trigger_interval=trigger_interval,
                                             aggregate=aggregate,
                                             operation=operation,
                                             threshold=threshold)

        alarm_get = self.api.alarm_get(id=alarm_create.id)

        self.assertEqual(alarm_create.id, alarm_get.id)
        self.assertEqual(alarm_create.name, alarm_get.name)
        self.assertEqual(alarm_create.metric, alarm_get.metric)
        self.assertEqual(alarm_create.trigger_interval, alarm_get.trigger_interval)
        self.assertEqual(alarm_create.aggregate, alarm_get.aggregate)
        self.assertEqual(alarm_create.operation, alarm_get.operation)
        self.assertEqual(alarm_create.threshold, alarm_get.threshold)

        self.api.alarm_delete(id=alarm_get.id)

    def test_get_alarm(self):
        runner_create = CLIRunner(AlarmCreate())

        name = 'my-alarm'
        metric = 'CPU'
        aggregate = 'max'
        operation = 'gt'
        threshold = 0.50
        trigger_interval = 300000

        create = runner_create.get_output(['-n', name,
                                           '-m', metric,
                                           '-g', aggregate,
                                           '-o', operation,
                                           '-v', str(threshold),
                                           '-r', str(trigger_interval)])
        alarm_create = json.loads(create)

        runner_get = CLIRunner(AlarmGet())
        get = runner_get.get_output(['-i', str(alarm_create['id'])])
        alarm_get = json.loads(get)['result']

        self.assertEqual(int(alarm_create['triggerInterval']), alarm_get['triggerInterval'])
        self.assertEqual(alarm_create['actions'], alarm_get['actions'])
        self.assertEqual(int(alarm_create['familyId']), int(alarm_get['familyId']))
        self.assertFalse(alarm_create['isDisabled'], alarm_get['isDisabled'])
        self.assertEqual(alarm_create['metric'], alarm_get['metric'])
        self.assertEqual(alarm_create['name'], alarm_get['name'])
        self.assertTrue(alarm_get['perHostNotify'])
        self.assertEqual(alarm_create['triggerPredicate']['agg'], alarm_get['triggerPredicate']['agg'])
        self.assertEqual(alarm_create['triggerPredicate']['op'], alarm_get['triggerPredicate']['op'])
        self.assertEqual(alarm_create['triggerPredicate']['val'], alarm_get['triggerPredicate']['val'])
        self.assertEqual(int(alarm_create['typeId']), int(alarm_get['typeId']))

        runner_delete = CLIRunner(AlarmDelete())
        delete = runner_delete.get_output(['-i', str(alarm_get['id'])])


text:
package govmomi

import (
	"github.com/vmware/govmomi/vim25/mo"
	"github.com/vmware/govmomi/vim25/types"
)

type ComputeResource struct {
	types.ManagedObjectReference

	c *Client
}

func NewComputeResource(c *Client, ref types.ManagedObjectReference) *ComputeResource {
	return &ComputeResource{
		ManagedObjectReference: ref,
		c: c,
	}
}

func (c ComputeResource) Reference() types.ManagedObjectReference {
	return c.ManagedObjectReference
}

func (c ComputeResource) Hosts() ([]types.ManagedObjectReference, error) {
	var cr mo.ComputeResource
	ps := []string{"host"}

	err := c.c.Properties(c.Reference(), ps, &cr)
	if err != nil {
		return nil, err
	}
	return cr.Host, nil
}


text:
using System;
using System.Collections.Specialized;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
using osu.Game.Tournament.Models;
using osuTK.Graphics;

namespace osu.Game.Tournament.Components
{
    public class TournamentBeatmapPanel : CompositeDrawable
    {
        public readonly BeatmapInfo Beatmap;
        private readonly string mods;

        private const float horizontal_padding = 10;
        private const float vertical_padding = 10;

        public const float HEIGHT = 50;

        private readonly Bindable<TournamentMatch> currentMatch = new Bindable<TournamentMatch>();
        private Box flash;

        public TournamentBeatmapPanel(BeatmapInfo beatmap, string mods = null)
        {
            if (beatmap == null) throw new ArgumentNullException(nameof(beatmap));

            Beatmap = beatmap;
            this.mods = mods;
            Width = 400;
            Height = HEIGHT;
        }

        [BackgroundDependencyLoader]
        private void load(LadderInfo ladder, TextureStore textures)
        {
            currentMatch.BindValueChanged(matchChanged);
            currentMatch.BindTo(ladder.CurrentMatch);

            Masking = true;

            AddRangeInternal(new Drawable[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour = Color4.Black,
                },
                new UpdateableBeatmapSetCover
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour = OsuColour.Gray(0.5f),
                    BeatmapSet = Beatmap.BeatmapSet,
                },
                new FillFlowContainer
                {
                    AutoSizeAxes = Axes.Both,
                    Anchor = Anchor.CentreLeft,
                    Origin = Anchor.CentreLeft,
                    Padding = new MarginPadding(15),
                    Direction = FillDirection.Vertical,
                    Children = new Drawable[]
                    {
                        new TournamentSpriteText
                        {
                            Text = new LocalisedString((
                                $"{Beatmap.Metadata.ArtistUnicode ?? Beatmap.Metadata.Artist} - {Beatmap.Metadata.TitleUnicode ?? Beatmap.Metadata.Title}",
                                $"{Beatmap.Metadata.Artist} - {Beatmap.Metadata.Title}")),
                            Font = OsuFont.Torus.With(weight: FontWeight.Bold),
                        },
                        new FillFlowContainer
                        {
                            AutoSizeAxes = Axes.Both,
                            Direction = FillDirection.Horizontal,
                            Children = new Drawable[]
                            {
                                new TournamentSpriteText
                                {
                                    Text = "mapper",
                                    Padding = new MarginPadding { Right = 5 },
                                    Font = OsuFont.Torus.With(weight: FontWeight.Regular, size: 14)
                                },
                                new TournamentSpriteText
                                {
                                    Text = Beatmap.Metadata.AuthorString,
                                    Padding = new MarginPadding { Right = 20 },
                                    Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 14)
                                },
                                new TournamentSpriteText
                                {
                                    Text = "difficulty",
                                    Padding = new MarginPadding { Right = 5 },
                                    Font = OsuFont.Torus.With(weight: FontWeight.Regular, size: 14)
                                },
                                new TournamentSpriteText
                                {
                                    Text = Beatmap.Version,
                                    Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 14)
                                },
                            }
                        }
                    },
                },
                flash = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour = Color4.Gray,
                    Blending = BlendingParameters.Additive,
                    Alpha = 0,
                },
            });

            if (!string.IsNullOrEmpty(mods))
            {
                AddInternal(new Container
                {
                    RelativeSizeAxes = Axes.Y,
                    Width = 60,
                    Anchor = Anchor.CentreRight,
                    Origin = Anchor.CentreRight,
                    Margin = new MarginPadding(10),
                    Child = new Sprite
                    {
                        FillMode = FillMode.Fit,
                        RelativeSizeAxes = Axes.Both,
                        Anchor = Anchor.CentreRight,
                        Origin = Anchor.CentreRight,
                        Texture = textures.Get($"mods/{mods}"),
                    }
                });
            }
        }

        private void matchChanged(ValueChangedEvent<TournamentMatch> match)
        {
            if (match.OldValue != null)
                match.OldValue.PicksBans.CollectionChanged -= picksBansOnCollectionChanged;
            match.NewValue.PicksBans.CollectionChanged += picksBansOnCollectionChanged;
            updateState();
        }

        private void picksBansOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
            => updateState();

        private BeatmapChoice choice;

        private void updateState()
        {
            var found = currentMatch.Value.PicksBans.FirstOrDefault(p => p.BeatmapID == Beatmap.OnlineBeatmapID);

            bool doFlash = found != choice;
            choice = found;

            if (found != null)
            {
                if (doFlash)
                    flash?.FadeOutFromOne(500).Loop(0, 10);

                BorderThickness = 6;

                BorderColour = TournamentGame.GetTeamColour(found.Team);

                switch (found.Type)
                {
                    case ChoiceType.Pick:
                        Colour = Color4.White;
                        Alpha = 1;
                        break;

                    case ChoiceType.Ban:
                        Colour = Color4.Gray;
                        Alpha = 0.5f;
                        break;
                }
            }
            else
            {
                Colour = Color4.White;
                BorderThickness = 0;
                Alpha = 1;
            }
        }
    }
}


text:
trait MarkerConst {
    const N: usize;
    //~^ ERROR marker traits cannot have associated items
}

#[marker]
trait MarkerType {
    type Output;
    //~^ ERROR marker traits cannot have associated items
}

#[marker]
trait MarkerFn {
    fn foo();
    //~^ ERROR marker traits cannot have associated items
}

#[marker]
trait MarkerConstWithDefault {
    const N: usize = 43;
    //~^ ERROR marker traits cannot have associated items
}

#[marker]
trait MarkerTypeWithDefault {
    type Output = ();
    //~^ ERROR marker traits cannot have associated items
}

#[marker]
trait MarkerFnWithDefault {
    fn foo() {}
    //~^ ERROR marker traits cannot have associated items
}

fn main() {}


text:
var functions = require('firebase-functions');
const admin = require('firebase-admin');
try {admin.initializeApp();} catch(e) {} // You do that because the admin SDK can only be initialized once.
var moment = require('moment');
var plaid = require('plaid');

exports = module.exports =   functions.database.ref('/location_private/bank/public_token')
.onWrite((change, context)=> {

var public_token = change.after.val()
return admin.database().ref('/location_private/plaid').once('value').then(function(snap){

   var client = new plaid.Client(
        snap.val().client_id,
        snap.val().secret,
        snap.val().public_key,
       plaid.environments['development']
        );

          client.exchangePublicToken(public_token, function(error, tokenResponse) {
            if (error != null) {
            var msg = 'Could not exchange public_token!';
            console.log(msg + '\n' + error);
            return
           }
           var data = {access_token: tokenResponse.access_token,
                       item_id: tokenResponse.item_id}

            admin.database().ref('/location_private/bank').update(data)

        });

    })

})


text:
cask 'firebase-admin' do
  version '1.0.1'
  sha256 'b1e568815d182cd2d38801ef8d1b48e1ba44c4f3f3d3dc3084827ea19f60b64c'

  url "https://firebaseadmin.com/downloads/#{version}/firebase-admin-mac-#{version}.dmg"
  appcast 'https://firebaseadmin.com/changelog',
          checkpoint: '825a1631b56a6600fd2d495d61bef2e44dd762452f5ae5b04ce502c2de81a454'
  name 'Firebase Admin'
  homepage 'https://firebaseadmin.com/'

  app 'firebase-admin.app'

  zap trash: [
               '~/Library/Application Support/firebase-admin',
               '~/Library/Preferences/com.firebaseadmin.firebase-admin.helper.plist',
               '~/Library/Preferences/com.firebaseadmin.firebase-admin.plist',
             ]
end


text:
Banner Change

        <form action="<?php echo site_url('admin/banner_update'); ?>" method="post" enctype="multipart/form-data">

            Select banner
            <input type="file" style="width: 45%;" class="form-controls" name="userfile" >

            <input  type="submit" style="width: 20%;" class="form-controls" name="submit" value="Upload Image" >

</form>

Home Section 1

<form action="<?php echo site_url('admin/home_sec1_update'); ?>" method="post">

                    Home Title 1
                    <input type="text" style="width: 45%;" class="form-control" name="title1" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['title1']; ?>" placeholder="Home Title 1">

                    Home heading 1
                    <input type="text" style="width: 45%;" class="form-control" name="home_heading1" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_heading1']; ?>" placeholder="Home heading 1">

                    Home heading 2
                    <input type="text" style="width: 45%;" class="form-control" name="home_heading2" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_heading2']; ?>" placeholder="Home heading 2">

                    Home Content Title 1
                    <input type="text" style="width: 45%;" class="form-control" name="home_con_title1" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_con_title1']; ?>" placeholder="Home Content Title 1">

                    Home Content Discription 1
                    <input type="text" style="width: 45%;" class="form-control" name="home_con_dsc1" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_con_dsc1']; ?>" placeholder="Home Content Discription 1">

                    Home Content Title 2
                    <input type="text" style="width: 45%;" class="form-control" name="home_con_title2" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_con_title2']; ?>" placeholder="Home Content Title 2">

                    Home Content Discription 2
                    <input type="text" style="width: 45%;" class="form-control" name="home_con_dsc2" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_con_dsc2']; ?>" placeholder="Home Content Discription 2">

                    Home Content Title 3
                    <input type="text" style="width: 45%;" class="form-control" name="home_con_title3" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_con_title3']; ?>" placeholder="Home Content Title 3">

                    Home Content Discription 3
                    <input type="text" style="width: 45%;" class="form-control" name="home_con_dsc3" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_con_dsc3']; ?>" placeholder="Home Content Discription 3">

                    Home Content Title 4
                    <input type="text" style="width: 45%;" class="form-control" name="home_con_title4" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_con_title4']; ?>" placeholder="Home Content Title 4">

                    Home Content Discription 4
                    <input type="text" style="width: 45%;" class="form-control" name="home_con_dsc4" id="" aria-describedby="websiteTitle" value="<?php echo $hcon['home_con_dsc4']; ?>" placeholder="Home Content Discription 4">

               <button type="submit"  class="btn btn-info">Submit</button>

        </form>


text:
package com.example.moleurlshortener.tools;

import java.util.Random;

public class Utils {

	public static String generateRandomNumber(int charLength) {
		return String.valueOf(charLength < 1 ? 0 : new Random()
				.nextInt((9 * (int) Math.pow(10, charLength - 1)) - 1)
				+ (int) Math.pow(10, charLength - 1));
	}
}


text:
require 'pragmatic_segmenter/punctuation_replacer'

module PragmaticSegmenter
  # This class searches for exclamation points that
  # are part of words and not ending punctuation and replaces them.
  module ExclamationWords
    WORDS_WITH_EXCLAMATIONS = ['!Xũ', '!Kung', 'ǃ'OǃKung', '!Xuun', '!Kung-Ekoka', 'ǃHu', 'ǃKhung', 'ǃKu', 'ǃung', 'ǃXo', 'ǃXû', 'ǃXung', 'ǃXũ', '!Xun', 'Yahoo!', 'Y!J', 'Yum!']

    def self.apply_rules(text)
      WORDS_WITH_EXCLAMATIONS.each do |exclamation|
        PragmaticSegmenter::PunctuationReplacer.new(
          matches_array: text.scan(/#{Regexp.escape(exclamation)}/),
          text: text
        ).replace
      end
    end
  end
end