text:
<!doctype html>

    <title>Style Test</title>
    <link href="dist/aqua.css" media="all" rel="stylesheet" type="text/css">

+1

Dropdown

        Choose

          Link 1
          Link 2
          Link 3
          Link 4
          Link 5
          Link 6

Nav

        Link 1
        Link 2
        Link 3
        Link 4
        Link 5
        Link 6
        Login

Messages

Default message

Primary message

Success message

Warn message

Error message

Buttons

          link button
          <button class="c-btn">button element</button>
          <input type="button" class="c-btn" value="button input" />
          primary
          success
          warn
          error

Links

A link

A named anchor #named

Inline

An emphasis sample.<em>

A strong sample.<strong>

A bold sample.<b>

A small sample.<small>

A superscript sample.<sup>

A subscript sample.<sub>

A del sample.<del>

A Cmd + Shift + y sample. <kbd>

A var y = 1; sample. <code>

Heading

Heading 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam interdum nunc sed neque consectetur, et eleifend leo rutrum. Proin vestibulum lacus diam, vitae luctus erat tristique id. Fusce cursus orci sodales nulla rhoncus, nec molestie sapien gravida. Etiam eget ex et sapien ultricies placerat id quis velit. Nunc tempus mauris molestie porta sollicitudin. Suspendisse maximus turpis leo, vel viverra velit rhoncus ut. Integer aliquam felis quis dapibus dignissim. Phasellus in dolor commodo, interdum magna nec, pretium tellus. Donec purus velit, sollicitudin sed mi ut, efficitur lobortis turpis. In placerat turpis ut felis cursus, at dignissim est cursus. Vivamus vehicula risus vel ante eleifend congue. Proin sollicitudin elit diam, a tincidunt erat posuere sed. Aenean laoreet ornare rutrum. Nunc tincidunt, elit ut porttitor lobortis, augue turpis rutrum nisl, et sodales turpis ante non nisl. Nam leo libero, lobortis vel diam vel, porta dignissim nisl.

Heading 2

In id aliquet mauris, non pellentesque elit. Mauris vel rutrum felis, vel ultrices eros. Curabitur vulputate, ligula non lobortis elementum, nibh neque consequat lorem, nec accumsan lectus lorem quis est. Vestibulum porttitor interdum ligula, eget aliquet diam venenatis eu. Integer ullamcorper augue at odio gravida, quis congue est vulputate. Sed in tincidunt erat, eu varius lacus. Donec pulvinar tellus nec varius ullamcorper. Vestibulum sit amet neque quam. Quisque pulvinar velit eleifend, eleifend turpis id, semper nisi. Nulla vel nunc volutpat, facilisis dui eu, ultrices arcu. Praesent eu fringilla libero, eget accumsan lorem.

Heading 3

Duis id turpis venenatis, mattis sapien a, vehicula lorem. Sed vitae volutpat mauris. Fusce ornare feugiat congue. Nam nulla dui, maximus maximus commodo eget, vulputate porta tortor. Pellentesque a dui neque. Praesent et eros eu massa imperdiet imperdiet. Nullam placerat, nisl in accumsan accumsan, nisi magna mattis purus, et lacinia dolor lectus quis nisl. Phasellus eros purus, placerat vitae accumsan sed, finibus ut leo. Nullam elementum justo eu sem tempor, eu euismod dui accumsan. Donec ut condimentum velit, vel lacinia metus. In hac habitasse platea dictumst. Duis eget feugiat arcu. Quisque posuere tempor tellus at porttitor. Suspendisse non hendrerit justo. Sed in posuere sem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

Heading 4

Sed nec massa eget sem feugiat semper. Maecenas vel tincidunt felis. Nam eu velit sagittis, interdum eros in, laoreet mi. Ut mattis ipsum quis tortor molestie lobortis. Praesent fringilla lobortis est, quis congue sapien porttitor et. Mauris dapibus justo sit amet dolor ultrices egestas. Morbi tristique justo eu orci porttitor, id interdum dolor pharetra. Etiam consequat, orci sed pellentesque tempus, tortor sem auctor risus, sodales finibus magna nibh congue eros.

Heading 5

Nunc venenatis egestas malesuada. Suspendisse dignissim ex scelerisque, volutpat mauris sit amet, rutrum nunc. In vestibulum laoreet nisi, at placerat lorem blandit in. Etiam ac dolor vehicula, faucibus dui eget, aliquam est. Proin sed ipsum ac ante tincidunt condimentum. Curabitur eu enim elit. In hac habitasse platea dictumst. Fusce dolor lectus, rhoncus at tortor in, eleifend imperdiet nibh. Donec cursus est vitae velit feugiat congue. Aenean id mauris commodo, rhoncus dui ac, maximus odio. Sed faucibus tortor in auctor mollis. Proin dictum tortor tortor, id placerat ligula laoreet eget. Duis efficitur, metus id lacinia rhoncus, ex libero volutpat nunc, ut dictum velit dui ac magna. Vivamus sed leo augue.

Heading 6

Phasellus aliquet tincidunt lectus, at gravida velit. Donec id nibh non urna pulvinar luctus in at erat. Nulla posuere, lorem molestie interdum luctus, purus tortor ultrices ex, ac porttitor leo nunc pretium libero. Integer quam diam, pharetra vel arcu sed, dignissim congue lectus. Cras in scelerisque quam. Quisque tincidunt urna sit amet enim lobortis ultrices. Mauris eget dolor quis orci euismod varius. Vivamus dapibus mi in augue viverra rhoncus. Nam laoreet malesuada justo sed facilisis. Nunc eleifend velit tellus, mattis interdum urna tristique in.

Pre-formatted Text

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam interdum nunc sed neque consectetur, et eleifend leo rutrum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam interdum nunc sed neque consectetur, et eleifend leo rutrum.

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Magento\ImportExport\Model\Import\Source;

/**
 * CSV import adapter
 */
class Csv extends \Magento\ImportExport\Model\Import\AbstractSource
{
    /**
     * @var \Magento\Framework\Filesystem\File\Write
     */
    protected $_file;

    /**
     * Delimiter.
     *
     * @var string
     */
    protected $_delimiter = ',';

    /**
     * @var string
     */
    protected $_enclosure = '';

    /**
     * Open file and detect column names
     *
     * There must be column names in the first line
     *
     * @param string $file
     * @param \Magento\Framework\Filesystem\Directory\Read $directory
     * @param string $delimiter
     * @param string $enclosure
     * @throws \LogicException
     */
    public function __construct(
        $file,
        \Magento\Framework\Filesystem\Directory\Read $directory,
        $delimiter = ',',
        $enclosure = '"'
    ) {
        register_shutdown_function([$this, 'destruct']);
        try {
            $this->_file = $directory->openFile($directory->getRelativePath($file), 'r');
        } catch (\Magento\Framework\Exception\FileSystemException $e) {
            throw new \LogicException("Unable to open file: '{$file}'");
        }
        if ($delimiter) {
            $this->_delimiter = $delimiter;
        }
        $this->_enclosure = $enclosure;
        parent::__construct($this->_getNextRow());
    }

    /**
     * Close file handle
     *
     * @return void
     */
    public function destruct()
    {
        if (is_object($this->_file)) {
            $this->_file->close();
        }
    }

    /**
     * Read next line from CSV-file
     *
     * @return array|bool
     */
    protected function _getNextRow()
    {
        $parsed = $this->_file->readCsv(0, $this->_delimiter, $this->_enclosure);
        if (is_array($parsed) && count($parsed) != $this->_colQty) {
            foreach ($parsed as $element) {
                if (strpos($element, "'") !== false) {
                    $this->_foundWrongQuoteFlag = true;
                    break;
                }
            }
        } else {
            $this->_foundWrongQuoteFlag = false;
        }
        return $parsed;
    }

    /**
     * Rewind the \Iterator to the first element (\Iterator interface)
     *
     * @return void
     */
    public function rewind()
    {
        $this->_file->seek(0);
        $this->_getNextRow();
        // skip first line with the header
        parent::rewind();
    }
}


text:
package com.conversationkit.impl.edge;

import com.conversationkit.impl.node.DialogTreeNode;
import com.conversationkit.model.IConversationIntent;
import com.conversationkit.model.IConversationState;
import java.util.function.BiFunction;

/**
 * A DialogTreeEdge is an implementation of
 * IConversationEdge that connects one
 * IConversationNode that is a question to the
 * IConversationNode matching the answer.
 *

 * A Dialog Tree is a type of branching conversation often seen in adventure
 * video games. The user is given a choice of what to say and makes subsequent
 * choices until the conversation ends. The responses to the user are scripted
 * based on the choices made. Since the user can only answer questions using one
 * the supplied suggestions from the {@link DialogTreeNode}, this edge type does
 * a string match between the answer stored in the edge and the response
 * provided by the user.
 *
 * @author pdtyreus
 */
public class DialogTreeEdge extends ConversationEdge {

    private final String prompt;

    /**
     * Only an exact match for the answer stored in this node will cause the
     * conversion to advance to the endNode.
     *
     * @param prompt string value to match
     * @param intentId intent id
     * @param endNodeId next node id in the conversation
     */
    public DialogTreeEdge(Integer endNodeId, String intentId, String prompt) {
        super(endNodeId, intentId);
        this.prompt = prompt;
    }

    public DialogTreeEdge(Integer endNodeId, String intentId, String prompt, BiFunction<IConversationIntent, IConversationState, Object>... sideEffects) {
        super(endNodeId, intentId, (intent, state) -> {
            return true;
        }, sideEffects);
        this.prompt = prompt;
    }

    @Override
    public String toString() {
        return "DialogTreeEdge {" + getIntentId() + '}';
    }

    public String getPrompt() {
        return prompt;
    }
}


text:
<?php

namespace Symfony\Component\Form\Extension\Core\View;

/**
 * Represents a choice in templates.
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 *
 * @deprecated since version 2.7, to be removed in 3.0.
 *             Use {@link \Symfony\Component\Form\ChoiceList\View\ChoiceView} instead.
 */
class ChoiceView
{
    /**
     * The label displayed to humans.
     *
     * @var string
     */
    public $label;

    /**
     * The view representation of the choice.
     *
     * @var string
     */
    public $value;

    /**
     * The original choice value.
     *
     * @var mixed
     */
    public $data;

    /**
     * Creates a new ChoiceView.
     *
     * @param mixed  $data  The original choice
     * @param string $value The view representation of the choice
     * @param string $label The label displayed to humans
     */
    public function __construct($data, $value, $label)
    {
        $this->data = $data;
        $this->value = $value;
        $this->label = $label;
    }
}

namespace Symfony\Component\Form\ChoiceList\View;

use Symfony\Component\Form\Extension\Core\View\ChoiceView as LegacyChoiceView;

/**
 * Represents a choice in templates.
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 */
class ChoiceView extends LegacyChoiceView
{
    /**
     * Additional attributes for the HTML tag.
     *
     * @var array
     */
    public $attr;

    /**
     * Creates a new choice view.
     *
     * @param mixed  $data  The original choice
     * @param string $value The view representation of the choice
     * @param string $label The label displayed to humans
     * @param array  $attr  Additional attributes for the HTML tag
     */
    public function __construct($data, $value, $label, array $attr = array())
    {
        parent::__construct($data, $value, $label);

        $this->attr = $attr;
    }
}


text:
<?php
/**
 * Box packing (3D bin packing, knapsack problem).
 *
 * @author Doug Wright
 */
declare(strict_types=1);

namespace DVDoug\BoxPacker;

use function usort;

/**
 * Applies load stability to generated result.
 * @internal
 */
class LayerStabiliser
{
    /**
     * @param PackedLayer[] $packedLayers
     *
     * @return PackedLayer[]
     */
    public function stabilise(array $packedLayers): array
    {
        // first re-order according to footprint
        $stabilisedLayers = [];
        usort($packedLayers, [$this, 'compare']);

        // then for each item in the layer, re-calculate each item's z position
        $currentZ = 0;
        foreach ($packedLayers as $oldZLayer) {
            $oldZStart = $oldZLayer->getStartZ();
            $newZLayer = new PackedLayer();
            foreach ($oldZLayer->getItems() as $oldZItem) {
                $newZ = $oldZItem->getZ() - $oldZStart + $currentZ;
                $newZItem = new PackedItem($oldZItem->getItem(), $oldZItem->getX(), $oldZItem->getY(), $newZ, $oldZItem->getWidth(), $oldZItem->getLength(), $oldZItem->getDepth());
                $newZLayer->insert($newZItem);
            }

            $stabilisedLayers[] = $newZLayer;
            $currentZ += $newZLayer->getDepth();
        }

        return $stabilisedLayers;
    }

    private function compare(PackedLayer $layerA, PackedLayer $layerB): int
    {
        return ($layerB->getFootprint() <=> $layerA->getFootprint()) ?: ($layerB->getDepth() <=> $layerA->getDepth());
    }
}


text:
package gov.hhs.fha.nhinc.docmgr.repository.model;

import java.util.Date;
import java.util.Set;

/**
 * Data class for a document.
 *
 * @author Neil Webb
 */
public class Document
{
    private Long documentid;
    private String documentUniqueId;
    private String documentTitle;
    private String authorPerson;
    private String authorInstitution;
    private String authorRole;
    private String authorSpecialty;
    private String availablityStatus;
    private String classCode;
    private String classCodeScheme;
    private String classCodeDisplayName;
    private String confidentialityCode;
    private String confidentialityCodeScheme;
    private String confidentialityCodeDisplayName;
    private Date creationTime;
    private String formatCode;
    private String formatCodeScheme;
    private String formatCodeDisplayName;
    private String patientId;
    private Date serviceStartTime;
    private Date serviceStopTime;
    private String status;
    private String comments;
    private String hash;
    private String facilityCode;
    private String facilityCodeScheme;
    private String facilityCodeDisplayName;
    private String intendedRecipientPerson;
    private String intendedRecipientOrganization;
    private String languageCode;
    private String legalAuthenticator;
    private String mimeType;
    private String parentDocumentId;
    private String parentDocumentRelationship;
    private String practiceSetting;
    private String practiceSettingScheme;
    private String practiceSettingDisplayName;
    private Integer size;
    private String sourcePatientId;
    private String pid3;
    private String pid5;
    private String pid8;
    private String pid7;
    private String pid11;
    private String typeCode;
    private String typeCodeScheme;
    private String typeCodeDisplayName;
    private String documentUri;
    private byte[] rawData;
    private boolean persistent;
    private String repositoryId;
    private Set<EventCode> eventCodes;
    private Set<ExtraSlot> extraSlots;

    public Document()
    {
        persistent = false;
    }

    public String getAuthorInstitution()
    {
        return authorInstitution;
    }

    public void setAuthorInstitution(String authorInstitution)
    {
        this.authorInstitution = authorInstitution;
    }

    public String getAuthorPerson()
    {
        return authorPerson;
    }

    public void setAuthorPerson(String authorPerson)
    {
        this.authorPerson = authorPerson;
    }

    public String getAuthorRole()
    {
        return authorRole;
    }

    public void setAuthorRole(String authorRole)
    {
        this.authorRole = authorRole;
    }

    public String getAuthorSpecialty()
    {
        return authorSpecialty;
    }

    public void setAuthorSpecialty(String authorSpecialty)
    {
        this.authorSpecialty = authorSpecialty;
    }

    public String getAvailablityStatus()
    {
        return availablityStatus;
    }

    public void setAvailablityStatus(String availablityStatus)
    {
        this.availablityStatus = availablityStatus;
    }

    public String getClassCode()
    {
        return classCode;
    }

    public void setClassCode(String classCode)
    {
        this.classCode = classCode;
    }

    public String getClassCodeDisplayName()
    {
        return classCodeDisplayName;
    }

    public void setClassCodeDisplayName(String classCodeDisplayName)
    {
        this.classCodeDisplayName = classCodeDisplayName;
    }

    public String getClassCodeScheme()
    {
        return classCodeScheme;
    }

    public void setClassCodeScheme(String classCodeScheme)
    {
        this.classCodeScheme = classCodeScheme;
    }

    public String getComments()
    {
        return comments;
    }

    public void setComments(String comments)
    {
        this.comments = comments;
    }

    public String getConfidentialityCode()
    {
        return confidentialityCode;
    }

    public void setConfidentialityCode(String confidentialityCode)
    {
        this.confidentialityCode = confidentialityCode;
    }

    public String getConfidentialityCodeDisplayName()
    {
        return confidentialityCodeDisplayName;
    }

    public void setConfidentialityCodeDisplayName(String confidentialityCodeDisplayName)
    {
        this.confidentialityCodeDisplayName = confidentialityCodeDisplayName;
    }

    public String getConfidentialityCodeScheme()
    {
        return confidentialityCodeScheme;
    }

    public void setConfidentialityCodeScheme(String confidentialityCodeScheme)
    {
        this.confidentialityCodeScheme = confidentialityCodeScheme;
    }

    public String getDocumentTitle()
    {
        return documentTitle;
    }

    public void setDocumentTitle(String documentTitle)
    {
        this.documentTitle = documentTitle;
    }

    public String getDocumentUniqueId()
    {
        return documentUniqueId;
    }

    public void setDocumentUniqueId(String documentUniqueId)
    {
        this.documentUniqueId = documentUniqueId;
    }

    public String getDocumentUri()
    {
        return documentUri;
    }

    public void setDocumentUri(String documentUri)
    {
        this.documentUri = documentUri;
    }

    public Long getDocumentid()
    {
        return documentid;
    }

    public void setDocumentid(Long documentid)
    {
        this.documentid = documentid;
    }

    public String getFacilityCode()
    {
        return facilityCode;
    }

    public void setFacilityCode(String facilityCode)
    {
        this.facilityCode = facilityCode;
    }

    public String getFacilityCodeDisplayName()
    {
        return facilityCodeDisplayName;
    }

    public void setFacilityCodeDisplayName(String facilityCodeDisplayName)
    {
        this.facilityCodeDisplayName = facilityCodeDisplayName;
    }

    public String getFacilityCodeScheme()
    {
        return facilityCodeScheme;
    }

    public void setFacilityCodeScheme(String facilityCodeScheme)
    {
        this.facilityCodeScheme = facilityCodeScheme;
    }

    public String getFormatCode()
    {
        return formatCode;
    }

    public void setFormatCode(String formatCode)
    {
        this.formatCode = formatCode;
    }

    public String getFormatCodeDisplayName()
    {
        return formatCodeDisplayName;
    }

    public void setFormatCodeDisplayName(String formatCodeDisplayName)
    {
        this.formatCodeDisplayName = formatCodeDisplayName;
    }

    public String getFormatCodeScheme()
    {
        return formatCodeScheme;
    }

    public void setFormatCodeScheme(String formatCodeScheme)
    {
        this.formatCodeScheme = formatCodeScheme;
    }

    public String getHash()
    {
        return hash;
    }

    public void setHash(String hash)
    {
        this.hash = hash;
    }

    public String getIntendedRecipientOrganization()
    {
        return intendedRecipientOrganization;
    }

    public void setIntendedRecipientOrganization(String intendedRecipientOrganization)
    {
        this.intendedRecipientOrganization = intendedRecipientOrganization;
    }

    public String getIntendedRecipientPerson()
    {
        return intendedRecipientPerson;
    }

    public void setIntendedRecipientPerson(String intendedRecipientPerson)
    {
        this.intendedRecipientPerson = intendedRecipientPerson;
    }

    public String getLanguageCode()
    {
        return languageCode;
    }

    public void setLanguageCode(String languageCode)
    {
        this.languageCode = languageCode;
    }

    public String getLegalAuthenticator()
    {
        return legalAuthenticator;
    }

    public void setLegalAuthenticator(String legalAuthenticator)
    {
        this.legalAuthenticator = legalAuthenticator;
    }

    public String getMimeType()
    {
        return mimeType;
    }

    public void setMimeType(String mimeType)
    {
        this.mimeType = mimeType;
    }

    public String getParentDocumentId()
    {
        return parentDocumentId;
    }

    public void setParentDocumentId(String parentDocumentId)
    {
        this.parentDocumentId = parentDocumentId;
    }

    public String getParentDocumentRelationship()
    {
        return parentDocumentRelationship;
    }

    public void setParentDocumentRelationship(String parentDocumentRelationship)
    {
        this.parentDocumentRelationship = parentDocumentRelationship;
    }

    public String getPatientId()
    {
        return patientId;
    }

    public void setPatientId(String patientId)
    {
        this.patientId = patientId;
    }

    public String getPid11()
    {
        return pid11;
    }

    public void setPid11(String pid11)
    {
        this.pid11 = pid11;
    }

    public String getPid3()
    {
        return pid3;
    }

    public void setPid3(String pid3)
    {
        this.pid3 = pid3;
    }

    public String getPid5()
    {
        return pid5;
    }

    public void setPid5(String pid5)
    {
        this.pid5 = pid5;
    }

    public String getPid7()
    {
        return pid7;
    }

    public void setPid7(String pid7)
    {
        this.pid7 = pid7;
    }

    public String getPid8()
    {
        return pid8;
    }

    public void setPid8(String pid8)
    {
        this.pid8 = pid8;
    }

    public String getPracticeSetting()
    {
        return practiceSetting;
    }

    public void setPracticeSetting(String practiceSetting)
    {
        this.practiceSetting = practiceSetting;
    }

    public String getPracticeSettingDisplayName()
    {
        return practiceSettingDisplayName;
    }

    public void setPracticeSettingDisplayName(String practiceSettingDisplayName)
    {
        this.practiceSettingDisplayName = practiceSettingDisplayName;
    }

    public String getPracticeSettingScheme()
    {
        return practiceSettingScheme;
    }

    public void setPracticeSettingScheme(String practiceSettingScheme)
    {
        this.practiceSettingScheme = practiceSettingScheme;
    }

    public Integer getSize()
    {
        return size;
    }

    public void setSize(Integer size)
    {
        this.size = size;
    }

    public String getSourcePatientId()
    {
        return sourcePatientId;
    }

    public void setSourcePatientId(String sourcePatientId)
    {
        this.sourcePatientId = sourcePatientId;
    }

    public Date getCreationTime()
    {
        return creationTime;
    }

    public void setCreationTime(Date creationTime)
    {
        this.creationTime = creationTime;
    }

    public Date getServiceStartTime()
    {
        return serviceStartTime;
    }

    public void setServiceStartTime(Date serviceStartTime)
    {
        this.serviceStartTime = serviceStartTime;
    }

    public Date getServiceStopTime()
    {
        return serviceStopTime;
    }

    public void setServiceStopTime(Date serviceStopTime)
    {
        this.serviceStopTime = serviceStopTime;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getTypeCode()
    {
        return typeCode;
    }

    public void setTypeCode(String typeCode)
    {
        this.typeCode = typeCode;
    }

    public String getTypeCodeDisplayName()
    {
        return typeCodeDisplayName;
    }

    public void setTypeCodeDisplayName(String typeCodeDisplayName)
    {
        this.typeCodeDisplayName = typeCodeDisplayName;
    }

    public String getTypeCodeScheme()
    {
        return typeCodeScheme;
    }

    public void setTypeCodeScheme(String typeCodeScheme)
    {
        this.typeCodeScheme = typeCodeScheme;
    }

    public byte[] getRawData()
    {
        return rawData;
    }

    public void setRawData(byte[] rawData)
    {
        this.rawData = rawData;
    }

    public boolean isPersistent()
    {
        return persistent;
    }

    public void setPersistent(boolean persistent)
    {
        this.persistent = persistent;
    }

    /**
     * Getter for a code representing the persistent state of the document.
     * This accessor is only to be used with the persistence layer. Use
     * the isPersistent method to access this property.
     *
     * @return Persistence layer code for persistent flag.
     */
    public int getPersistentCode()
    {
        return (persistent ? 1 : 0);
    }

    /**
     * Setter for the document's persistence code that is used by the
     * persistence layer. Use the isPersistent method to look up this
     * property.
     *
     * @param persistentCode Persistence layer code for the persistence flag.
     */
    public void setPersistentCode(int persistentCode)
    {
        persistent = (persistentCode == 1);

    }

    public String getRepositoryId() {
        return repositoryId;
    }

    public void setRepositoryId(String repositoryId) {
        this.repositoryId = repositoryId;
    }

    public Set<EventCode> getEventCodes()
    {
        return eventCodes;
    }

    public void setEventCodes(Set<EventCode> eventCodes)
    {
        this.eventCodes = eventCodes;
    }

    public Set<ExtraSlot> getExtraSlots()
    {
        return extraSlots;
    }

    public void setExtraSlots(Set<ExtraSlot> extraSlots)
    {
        this.extraSlots = extraSlots;
    }
}


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:orientation="vertical"
    tools:context="com.example.anothercontentproviderexample.MainActivity" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world" />

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button" />

</LinearLayout>


text:
<!DOCTYPE HTML>
<html>
<head>
  <title>Background.js Test Suite</title>

  <!-- LIBRARY -->
  <script type="text/javascript" src="../../background.min.js"></script>

  <!-- TESTS -->
  <script type="text/javascript" src="../../vendor/test/jquery-1.9.1.js"></script>
  <link rel="stylesheet" href="../../vendor/test/jasmine-1.3.1/jasmine.css" type="text/css" media="screen" />
  <script type="text/javascript" src="../../vendor/test/jasmine-1.3.1/jasmine.js"></script>
  <script type="text/javascript" src="../../vendor/test/jasmine-1.3.1/jasmine-html.js"></script>
  <script type="text/javascript" src="../../vendor/test/jasmine-1.3.1/jasmine_console_reporter_headless.js"></script>
  <script type="text/javascript" src="../../vendor/test/jasmine-1.3.1/jasmine_test_runner.js"></script>

  <script type="text/javascript" src="build/background_array_iterator_spec.js"></script>
  <script type="text/javascript" src="build/background_array_iterator_x2_spec.js"></script>
  <script type="text/javascript" src="build/background_array_iterator_x3_spec.js"></script>
  <script type="text/javascript" src="build/background_job_list_spec.js"></script>
  <script type="text/javascript" src="build/background_job_queue_spec.js"></script>
</head>
<body>
</body>
</html>


text:
package workbench.gui.tools;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;

import workbench.resource.ResourceMgr;

import workbench.gui.components.WbStatusLabel;

import workbench.util.BrowserLauncher;
import workbench.util.UpdateVersion;
import workbench.util.VersionNumber;
import workbench.util.WbVersionReader;

/**
 * A Dialog to display available versions from the SQL Workbench/J homepage.
 *
 * @author  Thomas Kellerer
 */
public class VersionCheckDialog
	extends JDialog
	implements ActionListener, MouseListener
{
	private WbVersionReader versionReader;

	public VersionCheckDialog(Frame parent)
	{
		super(parent, true);
		initComponents();
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		this.closeButton.addActionListener(this);
		Font f = this.headingLabel.getFont().deriveFont(Font.BOLD);
		this.headingLabel.setFont(f);
		this.headingLabel.setText(ResourceMgr.getString("LblReadingVersion"));
		this.headingLabel.addMouseListener(this);
		this.headingLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
		this.stableVersion.setText(" " + ResourceMgr.getString("LblNotAvailable"));
		this.devVersion.setText(" " + ResourceMgr.getString("LblNotAvailable"));
    this.statusLabel.setText(" " + ResourceMgr.getString("LblReadingVersion"));
	}

	private void startRetrieveVersions()
	{
		readVersion();
	}

	@Override
	public void setVisible(boolean flag)
	{
		if (flag) startRetrieveVersions();
		super.setVisible(flag);
	}

	protected void readVersion()
	{
		this.versionReader = new WbVersionReader(this);
		this.versionReader.startCheckThread();
	}

	private void checkDisplay()
	{
		UpdateVersion version = this.versionReader.getAvailableUpdate();

		String msg = ResourceMgr.getString("LblVersionUpToDate");
		if (!this.versionReader.success())
		{
			msg = ResourceMgr.getString("LblVersionReadError");
		}
		else if (version == UpdateVersion.stable)
		{
			this.stableVersion.setBackground(Color.YELLOW);
			msg = ResourceMgr.getString("LblVersionNewStableAvailable");
		}
		else if (version == UpdateVersion.devBuild)
		{
			this.devVersion.setBackground(Color.YELLOW);
			msg = ResourceMgr.getString("LblVersionNewDevAvailable");
		}
		this.statusLabel.setText(msg);
	}

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents()
  {
    GridBagConstraints gridBagConstraints;

    yourVersionLabel = new JLabel();
    yourVersion = new JLabel();
    closeButton = new JButton();
    stableVersionLabel = new JLabel();
    stableVersion = new JLabel();
    devVersionLabel = new JLabel();
    devVersion = new JLabel();
    statusLabel = new WbStatusLabel();
    headingLabel = new JLabel();
    jSeparator2 = new JSeparator();

    setTitle(ResourceMgr.getString("TxtWindowTitleVersionCheck"));
    addWindowListener(new WindowAdapter()
    {
      public void windowClosing(WindowEvent evt)
      {
        closeDialog(evt);
      }
    });
    getContentPane().setLayout(new GridBagLayout());

    yourVersionLabel.setText(ResourceMgr.getString("LblYourVersion"));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new Insets(5, 5, 5, 0);
    getContentPane().add(yourVersionLabel, gridBagConstraints);

    yourVersion.setBackground(Color.white);
    yourVersion.setText(" " + ResourceMgr.getBuildInfo());
    yourVersion.setOpaque(true);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.anchor = GridBagConstraints.WEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new Insets(5, 10, 5, 5);
    getContentPane().add(yourVersion, gridBagConstraints);

    closeButton.setText(ResourceMgr.getString("LblClose"));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.anchor = GridBagConstraints.SOUTHEAST;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new Insets(10, 0, 5, 5);
    getContentPane().add(closeButton, gridBagConstraints);

    stableVersionLabel.setText(ResourceMgr.getString("LblStableVersion"));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new Insets(0, 5, 5, 0);
    getContentPane().add(stableVersionLabel, gridBagConstraints);

    stableVersion.setBackground(Color.white);
    stableVersion.setOpaque(true);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.anchor = GridBagConstraints.WEST;
    gridBagConstraints.insets = new Insets(0, 10, 5, 5);
    getContentPane().add(stableVersion, gridBagConstraints);

    devVersionLabel.setText(ResourceMgr.getString("LblDevVersion"));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new Insets(0, 5, 0, 0);
    getContentPane().add(devVersionLabel, gridBagConstraints);

    devVersion.setBackground(Color.white);
    devVersion.setOpaque(true);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.anchor = GridBagConstraints.WEST;
    gridBagConstraints.insets = new Insets(0, 10, 0, 5);
    getContentPane().add(devVersion, gridBagConstraints);

    statusLabel.setHorizontalAlignment(SwingConstants.CENTER);
    statusLabel.setMinimumSize(new Dimension(100, 28));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new Insets(9, 3, 0, 3);
    getContentPane().add(statusLabel, gridBagConstraints);

    headingLabel.setBackground(new Color(255, 255, 255));
    headingLabel.setHorizontalAlignment(SwingConstants.CENTER);
    headingLabel.setText(ResourceMgr.getString("LblVersionsAvailable")); // NOI18N
    headingLabel.setHorizontalTextPosition(SwingConstants.CENTER);
    headingLabel.setMinimumSize(new Dimension(150, 25));
    headingLabel.setOpaque(true);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.insets = new Insets(8, 2, 5, 2);
    getContentPane().add(headingLabel, gridBagConstraints);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.insets = new Insets(0, 0, 4, 0);
    getContentPane().add(jSeparator2, gridBagConstraints);

    setSize(new Dimension(386, 196));
  }// </editor-fold>//GEN-END:initComponents

	/** Closes the dialog */
	private void closeDialog(java.awt.event.WindowEvent evt)//GEN-FIRST:event_closeDialog
	{
		setVisible(false);
		dispose();
	}//GEN-LAST:event_closeDialog

	@Override
	public void actionPerformed(ActionEvent e)
	{
		if (e.getSource() == this.versionReader)
		{
			if (this.versionReader.success())
			{
				this.stableVersion.setText(" " + ResourceMgr.getString("TxtBuild") + " " + this.versionReader.getStableBuildNumber() + " (" + this.versionReader.getStableBuildDate() + ")");
				String date = this.versionReader.getDevBuildDate();
				VersionNumber nr = this.versionReader.getDevBuildNumber();
				if (date != null && nr.isValid())
				{
					this.devVersion.setText(" " + ResourceMgr.getString("TxtBuild") + " " + nr + " (" + date + ")");
				}
			}
			else
			{
				this.stableVersion.setText(" " + ResourceMgr.getString("LblNotAvailable"));
				this.devVersion.setText(" " + ResourceMgr.getString("LblNotAvailable"));
			}
			this.headingLabel.setText(ResourceMgr.getString("LblVersionsAvailable"));
			this.headingLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

			checkDisplay();
		}
		else if (e.getSource() == this.closeButton)
		{
			setVisible(false);
			dispose();
		}
	}

	@Override
	public void mouseClicked(java.awt.event.MouseEvent e)
	{
		if (e.getSource() == this.headingLabel &&
				e.getButton() == MouseEvent.BUTTON1 &&
				e.getClickCount() == 1)
		{
			try
			{
				BrowserLauncher.openURL("http://www.sql-workbench.net");
			}
			catch (Exception ex)
			{
				ex.printStackTrace();
			}
		}
	}

	@Override
	public void mouseEntered(java.awt.event.MouseEvent e)
	{
	}

	@Override
	public void mouseExited(java.awt.event.MouseEvent e)
	{
	}

	@Override
	public void mousePressed(java.awt.event.MouseEvent e)
	{
	}

	@Override
	public void mouseReleased(java.awt.event.MouseEvent e)
	{
	}

  // Variables declaration - do not modify//GEN-BEGIN:variables
  private JButton closeButton;
  private JLabel devVersion;
  private JLabel devVersionLabel;
  private JLabel headingLabel;
  private JSeparator jSeparator2;
  private JLabel stableVersion;
  private JLabel stableVersionLabel;
  private JLabel statusLabel;
  private JLabel yourVersion;
  private JLabel yourVersionLabel;
  // End of variables declaration//GEN-END:variables

}


text:
@protocol GGLInstanceIDDelegate;

typedef NS_ENUM(int8_t, GGLInstanceIDLogLevel) {
  kGGLInstanceIDLogLevelDebug,
  kGGLInstanceIDLogLevelInfo,
  kGGLInstanceIDLogLevelError,
  kGGLInstanceIDLogLevelAssert,
};

/**
 *  The config used to configure different options in GGLInstanceID library.
 */
@interface GGLInstanceIDConfig : NSObject

/**
 *  Set the GGLInstanceIDDelegate to receive callbacks.
 *
 *  @see GGLInstanceIDDelegate
 */
@property(nonatomic, readwrite, weak) id<GGLInstanceIDDelegate> delegate;

// the log level for the GGLInstanceID library.
@property(nonatomic, readwrite, assign) GGLInstanceIDLogLevel logLevel;

/**
 *  Initialize a default config with logLevel set to `kGGLInstanceIDLogLevelError`.
 *
 *  @return A default config for GGLInstanceID.
 */
+ (instancetype)defaultConfig;

@end


text:
export { default } from './CheckPicker';
export * from './CheckPicker';


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <include layout="@layout/include_toolbar"/>

    <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"

        android:id="@+id/main_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <com.yalantis.phoenix.PullToRefreshView
            android:id="@+id/pull_to_refresh"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <android.support.v7.widget.RecyclerView
                android:id="@+id/recyclerview"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

        </com.yalantis.phoenix.PullToRefreshView>
        <android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/fab_margin"
            android:clickable="true"
            android:src="@drawable/write"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:layout_marginBottom="60dp"
            />

    </android.support.design.widget.CoordinatorLayout>

</LinearLayout>


text:
layout: post
title: "Toronto District School Board candidates posted"
date: 2014-09-23 11:30:00 # This is used in place of the filename
---

Just a quick note to mention that we've posted the inital data for the [127 Toronto District School Board trustee candidates](/candidates/#toronto-school-board) that are running in Toronto's [22 school wards](/wards/#toronto-school-wards).

Don't get your hopes up just yet: the data provided by trustee candidates to the city is quite thin and we have yet to begin our research process on these candidates.

It's a start. If you'd like to help out with the research, please get in touch.


text:
import {isValue, isDefined, isObjectType, isNumber} from "../../module/util";

type AxisOption = {
	x?: number | false;
	y?: number | false;
	y2?: number | false;
} | number | false;

type RangeAxisOption = {
	min? : AxisOption;
	max?: AxisOption;
};

/**
 * Set the min/max value
 * @param {Chart} $$ Chart instance
 * @param {string} type Set type 'min' or 'max'
 * @param {object} value Value to be set
 * @private
 */
function setMinMax($$, type: "min" | "max", value: AxisOption): void {
	const {config} = $$;
	const helper = (key, value) => {
		const v = isNumber(value) ? value : (
			value === false ? undefined : null
		);

		if (v !== null) {
			config[`axis_${key}_${type}`] = v;
		}
	};

	if (isDefined(value)) {
		if (isObjectType(value)) {
			Object.keys(value).forEach(key => {
				helper(key, value[key]);
			});
		} else if (isNumber(value) || value === false) {
			// shorthand values affects only y and y2.
			["y", "y2"].forEach(key => {
				helper(key, value);
			});
		}

		$$.redraw({
			withUpdateOrgXDomain: true,
			withUpdateXDomain: true
		});
	}
}

/**
 * Get the min/max value
 * @param {Chart} $$ Chart instance
 * @param {string} type Set type 'min' or 'max'
 * @returns {{x, y, y2}}
 * @private
 */
function getMinMax($$, type: "min" | "max"): {x: number, y: number, y2: number} {
	const {config} = $$;

	return {
		x: config[`axis_x_${type}`],
		y: config[`axis_y_${type}`],
		y2: config[`axis_y2_${type}`]
	};
}

/**
 * Define axis
 * @ignore
 */
const axis = {
	/**
	 * Get and set axis labels.
	 * @function axis․labels
	 * @instance
	 * @memberof Chart
	 * @param {object} labels specified axis' label to be updated.
	 * @param {string} [labels.x] x Axis string
	 * @param {string} [labels.y] y Axis string
	 * @param {string} [labels.y2] y2 Axis string
	 * @returns {object|undefined} axis labels text object
	 * @example
	 * // Update axis' label
	 * chart.axis.labels({
	 *   x: "New X Axis Label",
	 *   y: "New Y Axis Label",
	 *   y2: "New Y2 Axis Label"
	 * });
	 *
	 * chart.axis.labels();
	 * // --> {
	 * //  x: "New X Axis Label",
	 * //  y: "New Y Axis Label",
	 * //  y2: "New Y2 Axis Label"
	 * // }
	 */
	labels: function<T>(labels?: {x?: string, y?: string, y2?: string}): T | undefined {
		const $$ = this.internal;
		let labelText;

		if (labels) {
			Object.keys(labels).forEach(axisId => {
				$$.axis.setLabelText(axisId, labels[axisId]);
			});

			$$.axis.updateLabels();
		}

		["x", "y", "y2"].forEach(v => {
			const text = $$.axis.getLabelText(v);

			if (text) {
				!labelText && (labelText = {});
				labelText[v] = text;
			}
		});

		return <T>labelText;
	},

	/**
	 * Get and set axis min value.
	 * @function axis․min
	 * @instance
	 * @memberof Chart
	 * @param {object} min If min is given, specified axis' min value will be updated.

	 *   If no argument is given, the min values set on generating option for each axis will be returned.
	 *   If not set any min values on generation, it will return `undefined`.

	 *   To unset specific axis max, set `false` to each of them.
	 * @returns {object|undefined}
	 * @example
	 * // Update axis' min
	 * chart.axis.min({
	 *   x: -10,
	 *   y: 1000,
	 *   y2: 100
	 * });
	 *
	 * // To unset specific axis min, set false to each of them.
	 * chart.axis.min({
	 *   x: false,
	 *   y: false,
	 *   y2: false
	 * });
	 *
	 * // shorthand (only affects y and y2 axis)
	 * chart.axis.min(-50);
	 * chart.axis.min(false);
	 */
	min: function(min?: AxisOption): object|void {
		const $$ = this.internal;

		return isValue(min) || min === false ?
			setMinMax($$, "min", min as AxisOption) :
			getMinMax($$, "min");
	},

	/**
	 * Get and set axis max value.
	 * @function axis․max
	 * @instance
	 * @memberof Chart
	 * @param {object} max If max is given, specified axis' max value will be updated.

	 *   If no argument is given, the max values set on generating option for each axis will be returned.
	 *   If not set any max values on generation, it will return `undefined`.

	 *   To unset specific axis max, set `false` to each of them.
	 * @returns {object|undefined}
	 * @example
	 * // Update axis' label
	 * chart.axis.max({
	 *    x: 100,
	 *    y: 1000,
	 *    y2: 10000
	 * });
	 *
	 * // To unset specific axis max, set false to each of them.
	 * chart.axis.max({
	 *   x: false,
	 *   y: false,
	 *   y2: false
	 * });
	 *
	 * // shorthand (only affects y and y2 axis)
	 * chart.axis.max(10);
	 * chart.axis.max(false);
	 */
	max: function(max?: AxisOption): object|void {
		const $$ = this.internal;

		return isValue(max) || max === false ?
			setMinMax($$, "max", max as AxisOption) :
			getMinMax($$, "max");
	},

	/**
	 * Get and set axis min and max value.
	 * @function axis․range
	 * @instance
	 * @memberof Chart
	 * @param {object} range If range is given, specified axis' min and max value will be updated.
	 *   If no argument is given, the current min and max values for each axis will be returned.

	 *   To unset specific axis max, set `false` to each of them.
	 * @returns {object|undefined}
	 * @example
	 * // Update axis' label
	 * chart.axis.range({
	 *   min: {
	 *     x: -10,
	 *     y: -1000,
	 *     y2: -10000
	 *   },
	 *   max: {
	 *     x: 100,
	 *     y: 1000,
	 *     y2: 10000
	 *   },
	 * });
	 *
	 * // To unset specific axis max, set false to each of them.
	 * chart.axis.range({
	 *   min: {
	 *     x: false,
	 *     y: false,
	 *     y2: false
	 *   },
	 *   max: {
	 *     x: false,
	 *     y: false,
	 *     y2: false
	 *   },
	 * });
	 *
	 * // shorthand (only affects y and y2 axis)
	 * chart.axis.range({ min: -50, max: 1000 });
	 * chart.axis.range({ min: false, max: false });
	 */
	range: function(range: RangeAxisOption): object|void {
		const {axis} = this;

		if (arguments.length) {
			const {min, max} = range;

			isDefined(max) && axis.max(max);
			isDefined(min) && axis.min(min);
		} else {
			return {
				max: axis.max(),
				min: axis.min()
			};
		}

		return undefined;
	}
};

export default {axis};


text:
'use strict';

var Bro = require('./lib/bro');

function framework(injector, bro) {
  return injector.invoke(bro.framework);
}

function testFilePreprocessor(injector, bro) {
  return injector.invoke(bro.testFilePreprocessor);
}

function bundlePreprocessor(injector, bro) {
  return injector.invoke(bro.bundlePreprocessor);
}

module.exports = {
  'bro': [ 'type', Bro ],
  'framework:browserify': [ 'factory', framework ],
  'preprocessor:browserify': [ 'factory', testFilePreprocessor ],
  'preprocessor:browserify-bundle': [ 'factory', bundlePreprocessor ]
};

// override the default preprocess factory to add our
// preprocessor for *.browserify files

try {
  module.exports.preprocess = [ 'factory', require('./lib/preprocessor').createPreprocessor ];
} catch (e) {
  console.warn('failed to add custom browserify preprocessor');
  console.warn(e);
}


text:
/**
 * Module dependencies.
 */
var passport = require('passport-strategy')
  , util = require('util');

/**
 * `ClientPasswordStrategy` constructor.
 *
 * @api protected
 */
function Strategy(options, verify) {
  if (typeof options == 'function') {
    verify = options;
    options = {};
  }
  if (!verify) throw new Error('OAuth 2.0 client password strategy requires a verify function');

  passport.Strategy.call(this);
  this.name = 'oauth2-client-password';
  this._verify = verify;
  this._passReqToCallback = options.passReqToCallback;
}

/**
 * Inherit from `passport.Strategy`.
 */
util.inherits(Strategy, passport.Strategy);

/**
 * Authenticate request based on client credentials in the request body.
 *
 * @param {Object} req
 * @api protected
 */
Strategy.prototype.authenticate = function(req) {
  if (!req.body || (!req.body['client_id'] || !req.body['client_secret'])) {
    return this.fail();
  }

  var clientId = req.body['client_id'];
  var clientSecret = req.body['client_secret'];

  var self = this;

  function verified(err, client, info) {
    if (err) { return self.error(err); }
    if (!client) { return self.fail(); }
    self.success(client, info);
  }

  if (self._passReqToCallback) {
    this._verify(req, clientId, clientSecret, verified);
  } else {
    this._verify(clientId, clientSecret, verified);
  }
}

/**
 * Expose `Strategy`.
 */
module.exports = Strategy;


text:
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using UnityEngine;

namespace WernherChecker
{
    // http://forum.kerbalspaceprogram.com/index.php?/topic/147576-modders-notes-for-ksp-12/#comment-2754813
    // search for "Mod integration into Stock Settings

    public class WernersSettings : GameParameters.CustomParameterNode
    {
        public override string Title { get { return "General Settings"; } }
        public override GameParameters.GameMode GameMode { get { return GameParameters.GameMode.ANY; } }
        public override string Section { get { return "Wernher's Checker"; } }
        public override string DisplaySection { get { return "Wernher's Checker"; } }
        public override int SectionOrder { get { return 1; } }
        public override bool HasPresets { get { return false; } }

        [GameParameters.CustomParameterUI("Always open when entering editor")]
        public bool alwaysOpeninEditor = true;

        [GameParameters.CustomParameterUI("Always open when entering flight")]
        public bool alwaysOpenInFlight = false;

        [GameParameters.CustomParameterUI("Check Crew Assignment")]
        public bool checkCrewAssignment = true;

        [GameParameters.CustomParameterUI("Remember last checklist")]
        public bool rememberLastChecklist = true;

        public override bool Enabled(MemberInfo member, GameParameters parameters)
        {
            //if (member.Name == "enabled")
            //    return true;

            return true; //otherwise return true
        }

        public override bool Interactible(MemberInfo member, GameParameters parameters)
        {

            return true;
            //            return true; //otherwise return true
        }

        public override IList ValidValues(MemberInfo member)
        {
            return null;
        }

    }
}


text:
using UnityEngine;
using System;
using System.Collections.Generic;

namespace Procedural
{
	public class LevelGenerator : MonoBehaviour
	{
		[Tooltip("Put here Wall Prefab ! ")]
		public Transform wall;
		public int minimumDistance = 6;
		public int maximumDistance = 10;
		public Vector2 startingPosition = new Vector2 (0, 0);
		public Vector2 endPosition = new Vector2 (6, 6);
		public int levelWidth = 10;
		public int levelHeight = 10;
		public LevelGenerationStrategy levelGenerationStrategy;

		private Transform environment; 				// Stores the roo object for the environment
		private int roomIndice = 0;
		// Use this for initialization
		void Start ()
		{
			int nbIter = 0;
			float elapsedTime = Time.realtimeSinceStartup;

			GameObject obj = new GameObject ("Environment");
			environment = obj.GetComponent<Transform> ();

			levelGenerationStrategy = new RecursiveGeneration (levelWidth, levelHeight, startingPosition, endPosition, minimumDistance, maximumDistance);
			Level level = levelGenerationStrategy.generateLevel ();

			foreach (Vector2 v in level.Layout) {
				generateRoom (level.Rooms[(int)v.x, (int)v.y]);
			}
		}

		public void instanciateWall (Vector2 position)
		{
			Transform wallInstance = (Transform)Instantiate (wall, new Vector3 (position.x, position.y, 0), Quaternion.identity);
			wallInstance.localScale = new Vector2 (0.5f, 0.5f);
			wallInstance.SetParent (environment);
		}

		/**
		 * Generate a bordered square (not filled) beginning at position
		 */
		private void generateSquare (int width, int height, Vector2 position)
		{

			for (int i = 0; i <= width; i++) {
				for (int j = 0; j <= height; j++) {
					if (i == 0 || i == width || j == 0 || j == height) {

						Transform wallInstance = (Transform)Instantiate (wall, new Vector3 (i + position.x, j + position.y, 0), Quaternion.identity);
						wallInstance.SetParent (environment);
					}
				}
			}
		}

		private void generateRoom (Room room)
		{
			int width = room.Width;
			int height = room.Height;
			Vector2 position = room.getPosition ();

			GameObject roomTransformObject = new GameObject ("Room" + roomIndice);
			Transform roomTransform = roomTransformObject.GetComponent<Transform> ();
			roomTransform.SetParent (environment);

			foreach (Facing facing in room.getFacings()) {
				int i, j;
				i = j = 0;

				switch (facing) {
				case Facing.EAST:
					i = width;
					goto case Facing.WEST;

				case Facing.WEST:
					for (j = 0; j < height; j++) {
						Transform wallInstance = (Transform)Instantiate (wall, new Vector3 (i + position.x, j + position.y, 0), Quaternion.identity);
						wallInstance.SetParent (roomTransform);
					}
					break;

				case Facing.NORTH:
					j = height;
					goto case Facing.SOUTH;

				case Facing.SOUTH:
					for (i = 0; i < width; i++) {
						Transform wallInstance = (Transform)Instantiate (wall, new Vector3 (i + position.x, j + position.y, 0), Quaternion.identity);
						wallInstance.SetParent (roomTransform);
					}
					break;

				}
			}

			roomIndice++;
		}

		/**
		 * Generate Horizontal platform beginning at position
		 */
		private void generatePlatform (int width, Vector2 position)
		{

			for (int i = 0; i <= width; i++) {
				Transform wallInstance = (Transform)Instantiate (wall, new Vector3 (i + position.x, position.y, 0), Quaternion.identity);
				wallInstance.SetParent (environment);
			}
		}
	}
}


text:
/*
AudioJS Default Styles (http://videojs.com)
Version 2.0.2

REQUIRED STYLES (be careful overriding)
================================================================================ */
/* Box containing audio, controls, and download links.
   Will be set to the width of the audio element through JS
   If you want to add some kind of frame or special positioning, use another containing element, not audio-js-box. */
.audio-js-box { text-align: left; position: relative; line-height: 0 !important; margin: 0; padding: 0 !important; border: none !important;  }

/* Audio Element */
.audio-js-box audio {	width: 0; height: 0; display: block;}
.audio-js-box.ajs-ios audio{ width: 100%; height: 3em;}

/* Subtiles Style */
.audio-js-box .ajs-subtitles { color: #fff; font-size: 20px; text-align: center; position: absolute; bottom: 40px; left: 0; right: 0; }

/* Styles Loaded Check */
.ajs-styles-check { height: 5px; position: absolute; }

/* DEFAULT SKIN (override in another file)
================================================================================
Using all CSS to draw the controls. Images could be used if desired.
Instead of editing this file, I recommend creating your own skin CSS file to be included after this file,
so you can upgrade to newer versions easier. */

/* Controls Layout
  Using absolute positioning to position controls */
.audio-js-box .ajs-controls {
  position: relative; margin: 0; opacity: 0.85; color: #fff;
  display: none; /* Start hidden */
  left: 0; right: 0; /* 100% width of audio-js-box */
  width: 100%;
  bottom: 0px; /* Distance from the bottom of the box/audio. Keep 0. Use height to add more bottom margin. */
  height: 35px; /* Including any margin you want above or below control items */
  padding: 0; /* Controls are absolutely position, so no padding necessary */
  -webkit-transition: opacity 0.5s linear;
  -moz-transition: opacity 0.5s linear;
  -o-transition: opacity 0.5s linear;
  -ms-transition: opacity 0.5s linear;
  transition: opacity 0.5s linear;
}

.ajs-hide {
  -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; /* IE8 */
  opacity: 0 !important;
}

.ajs-show {
  -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; /* IE8 */
  opacity: 1 !important;
}

.audio-js-box .ajs-controls > div { /* Direct div children of control bar */
  position: absolute; /* Use top, bottom, left, and right to specifically position the control. */
  text-align: center; margin: 0; padding: 0;
  height: 25px; /* Default height of individual controls */
  top: 5px; /* Top margin to put space between audio and controls when controls are below */

  /* CSS Background Gradients, Using to give the aqua-ish look. */
  background-color: #0B151A;
  /* CSS Curved Corners */

 }

/* Placement of Control Items
   - Left side of pogress bar, use left & width
   - Rigth side of progress bar, use right & width
   - Expand with the audio (like progress bar) use left & right */
.ajs-controls > div.ajs-play-control       { left: 5px;   width: 25px;  }
.ajs-controls > div.ajs-progress-control   { left: 35px;  right: 125px; } /* Using left & right so it expands with the width of the audio */
.ajs-controls > div.ajs-time-control       { width: 75px; right: 50px;  } /* Time control and progress bar are combined to look like one */
.ajs-controls > div.ajs-volume-control     { width: 50px; right: 5px;  }

/* Removing curved corners on progress control and time control to join them. */
.ajs-controls > div.ajs-progress-control {
  -webkit-border-top-right-radius: 0; border-top-right-radius: 0;
  -webkit-border-bottom-right-radius: 0; border-bottom-right-radius: 0;
}
.ajs-controls > div.ajs-time-control {
  -webkit-border-top-left-radius: 0; border-top-left-radius: 0;
  -webkit-border-bottom-left-radius: 0; border-bottom-left-radius: 0;
}

/* Play/Pause
-------------------------------------------------------------------------------- */
.ajs-play-control { cursor: pointer !important; }
/* Play Icon */
.ajs-play-control span { display: block; font-size: 0; line-height: 0; }
.ajs-paused .ajs-play-control span {
  width: 0; height: 0; margin: 8px 0 0 8px;
  /* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
  border-left: 10px solid #fff; /* Width & Color of play icon */
  /* Height of play icon is total top & bottom border widths. Color is transparent. */
  border-top: 5px solid rgba(0,0,0,0); border-bottom: 5px solid rgba(0,0,0,0);
}
.ajs-playing .ajs-play-control span {
  width: 8px; height: 10px; margin: 8px auto 0;
  /* Drawing the pause bars with borders */
  border-top: 0px; border-left: 3px solid #fff; border-bottom: 0px; border-right: 3px solid #fff;
}

/* Progress
-------------------------------------------------------------------------------- */
.ajs-progress-holder { /* Box containing play and load progresses */
  position: relative; padding: 0; overflow:hidden; cursor: pointer !important;
  height: 9px; border: 1px solid #777;
  margin: 7px 1px 0 5px; /* Placement within the progress control item */
  -webkit-border-radius: 5px; border-radius: 5px;
}
.ajs-progress-holder div { /* Progress Bars */
  position: absolute; display: block; width: 0; height: 9px; margin: 0; padding: 0;
  -webkit-border-radius: 5px; border-radius: 5px;
}
.ajs-play-progress {
  /* CSS Gradient */
  background: #fff;
  background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#777));
  background: -moz-linear-gradient(top,  #fff,  #777);
}
.ajs-load-progress {
  opacity: 0.8;
  /* CSS Gradient */
  background-color: #555;
  background: -webkit-gradient(linear, left top, left bottom, from(#555), to(#aaa));
  background: -moz-linear-gradient(top,  #555,  #aaa);
}

/* Time Display
-------------------------------------------------------------------------------- */
.ajs-controls .ajs-time-control { font-size: 10px; line-height: 1; font-weight: normal; font-family: Helvetica, Arial, sans-serif; }
.ajs-controls .ajs-time-control span { line-height: 25px; /* Centering vertically */ }

/* Volume
-------------------------------------------------------------------------------- */
.ajs-volume-control { cursor: pointer !important; }
.ajs-volume-control div { display: block; margin: 0 5px 0 5px; padding: 4px 0 0 0; }
/* Drawing the volume icon using 6 span elements */
.ajs-volume-control div span { /* Individual volume bars */
  float: left; padding: 0;
  margin: 0 2px 0 0; /* Space between */
  width: 5px; height: 0px; /* Total height is height + bottom border */
  border-bottom: 18px solid #555; /* Default (off) color and height of visible portion */
}
.ajs-volume-control div span.ajs-volume-level-on { border-color: #fff; /* Volume on bar color */ }
/* Creating differnt bar heights through height (transparent) and bottom border (visible). */
.ajs-volume-control div span:nth-child(1) { border-bottom-width: 2px; height: 16px; }
.ajs-volume-control div span:nth-child(2) { border-bottom-width: 4px; height: 14px; }
.ajs-volume-control div span:nth-child(3) { border-bottom-width: 7px; height: 11px; }
.ajs-volume-control div span:nth-child(4) { border-bottom-width: 10px; height: 8px; }
.ajs-volume-control div span:nth-child(5) { border-bottom-width: 14px; height: 4px; }
.ajs-volume-control div span:nth-child(6) { margin-right: 0; }

/* Download Links - Used for browsers that don't support any audio.
---------------------------------------------------------*/
.ajs-no-audio { font-size: small; line-height: 1.5; }

/* Big Play Button (at start)
---------------------------------------------------------*/
div.ajs-big-play-button {
  display: none; /* Start hidden */ z-index: 2;
  position: absolute; top: 50%; left: 50%; width: 80px; height: 80px; margin: -43px 0 0 -43px; text-align: center; vertical-align: center; cursor: pointer !important;
  border: 3px solid #fff; opacity: 0.9;
  -webkit-border-radius: 20px; border-radius: 20px;

  /* CSS Background Gradients */
  background-color: #0B151A;
  background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 40px;
  background: #1F3744 -moz-linear-gradient(top,  #0B151A,  #1F3744) left 40px;

  /* CSS Shadows */
  -webkit-box-shadow: 4px 4px 8px #000;
          box-shadow: 4px 4px 8px #000;
}
div.ajs-big-play-button:hover {
  -webkit-box-shadow: 0px 0px 80px #fff;
          box-shadow: 0px 0px 80px #fff;
}

div.ajs-big-play-button span {
  display: block; font-size: 0; line-height: 0;
  width: 0; height: 0; margin: 20px 0 0 23px;
  /* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
  border-left: 40px solid #fff; /* Width & Color of play icon */
  /* Height of play icon is total top & bottom border widths. Color is transparent. */
  border-top: 20px solid rgba(0,0,0,0); border-bottom: 20px solid rgba(0,0,0,0);
}

/* Spinner Styles
---------------------------------------------------------*/
/* CSS Spinners by Kilian Valkhof - http://kilianvalkhof.com/2010/css-xhtml/css3-loading-spinners-without-images/ */
.ajs-spinner { display: none; position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; z-index: 1; margin: -50px 0 0 -50px;
  /* Scaling makes the circles look smoother. */
  -webkit-transform:scale(0.5); -moz-transform:scale(0.5); transform: scale(0.5);
}
/* Spinner circles */
.ajs-spinner div { position:absolute; left: 40px; top: 40px; width: 20px; height: 20px; background: #fff;
  -webkit-border-radius: 20px; border-radius: 20px;
  border: 1px solid #ccc; /* Added border so can be visible on white backgrounds */
}
/* Each circle */
.ajs-spinner div:nth-child(1) { opacity: 0.12; -webkit-transform: rotate(000deg) translate(0, -40px) scale(0.1); -moz-transform: rotate(000deg) translate(0, -40px) scale(0.1); transform: rotate(000deg) translate(0, -40px) scale(0.1); }
.ajs-spinner div:nth-child(2) { opacity: 0.25; -webkit-transform: rotate(045deg) translate(0, -40px) scale(0.2); -moz-transform: rotate(045deg) translate(0, -40px) scale(0.2); transform: rotate(045deg) translate(0, -40px) scale(0.2); }
.ajs-spinner div:nth-child(3) { opacity: 0.37; -webkit-transform: rotate(090deg) translate(0, -40px) scale(0.4); -moz-transform: rotate(090deg) translate(0, -40px) scale(0.4); transform: rotate(090deg) translate(0, -40px) scale(0.4); }
.ajs-spinner div:nth-child(4) { opacity: 0.50; -webkit-transform: rotate(135deg) translate(0, -40px) scale(0.6); -moz-transform: rotate(135deg) translate(0, -40px) scale(0.6); transform: rotate(135deg) translate(0, -40px) scale(0.6); }
.ajs-spinner div:nth-child(5) { opacity: 0.62; -webkit-transform: rotate(180deg) translate(0, -40px) scale(0.8); -moz-transform: rotate(180deg) translate(0, -40px) scale(0.8); transform: rotate(180deg) translate(0, -40px) scale(0.8); }
.ajs-spinner div:nth-child(6) { opacity: 0.75; -webkit-transform: rotate(225deg) translate(0, -40px) scale(1.0); -moz-transform: rotate(225deg) translate(0, -40px) scale(1.0); transform: rotate(225deg) translate(0, -40px) scale(1.0); }
.ajs-spinner div:nth-child(7) { opacity: 0.87; -webkit-transform: rotate(270deg) translate(0, -40px) scale(1.1); -moz-transform: rotate(270deg) translate(0, -40px) scale(1.1); transform: rotate(270deg) translate(0, -40px) scale(1.1); }
.ajs-spinner div:nth-child(8) { opacity: 1.00; -webkit-transform: rotate(315deg) translate(0, -40px) scale(1.3); -moz-transform: rotate(315deg) translate(0, -40px) scale(1.3); transform: rotate(315deg) translate(0, -40px) scale(1.3); }


text:
import { NavigationInstruction } from './navigation-instruction';

/**
 * A pipeline step for instructing a piepline to commit changes on a navigation instruction
 */
export class CommitChangesStep {
  run(navigationInstruction: NavigationInstruction, next: Function): Promise<any> {
    return navigationInstruction
      ._commitChanges(/*wait to swap?*/ true)
      .then(() => {
        navigationInstruction._updateTitle();
        return next();
      });
  }
}


text:
<!DOCTYPE html>

		<title>Sign Up - Git + Scratch</title>

	  	<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
	    <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.light_blue-blue.min.css" />
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
		<link rel='stylesheet' href='./public/css/main.css'>
		<link rel="stylesheet" href="./public/css/signup.css">

	          Git+Scratch

	            Log In

	        Git+Scratch

	          Log In
	            Sign Up
	            New Repo / Import Repo
	            Team

Sign up

				<form action="#" class='margin-horizontal-10'>

						<input class='mdl-textfield__input' type='text' id='username'>
						Username

						<input class='mdl-textfield__input' type='text' id='email'>
						Email

						<input class='mdl-textfield__input' type='text' id='password'>
						Password

				</form>

					Sign Up

  						<input type="checkbox" id="termstoggle" class="mdl-checkbox__input">
						Accept terms and conditions

Already have an account? Login in


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms").   Any redistribution of this code must retain the above
// copyright and this notice and otherwise comply with the Use Terms.

/*---
es5id: 12.6.4-2
description: >
    The for-in Statement - the values of [[Enumerable]] attributes are
    not considered when determining if a property of a prototype
    object is shadowed by a previous object on the prototype chain
includes: [runTestCase.js]
---*/

function testcase() {
        var proto = {
            prop: "enumerableValue"
        };

        var ConstructFun = function () { };
        ConstructFun.prototype = proto;

        var child = new ConstructFun();

        Object.defineProperty(child, "prop", {
            value: "nonEnumerableValue",
            enumerable: false
        });

        var accessedProp = false;

        for (var p in child) {
            if (p === "prop") {
                accessedProp = true;
            }
        }
        return !accessedProp;
    }
runTestCase(testcase);


text:
var Preprocess = require('./preprocess'),
DiffDetectLib = require('../diffdetect');

var SailsDuraarkDiffDetect = module.exports = function(storagePath) {
  this.storagePath = storagePath;
  this._preprocess = new Preprocess(storagePath);
};

SailsDuraarkDiffDetect.prototype.preprocessFiles = function(config) {
  console.log('[sails-duraark-diffdetect] preprocessing files: %s', JSON.stringify(config, null, 4));
  return this._preprocess.run(config);
};

SailsDuraarkDiffDetect.prototype.compareNoPreprocessing = function(files) {
  var diffDetectLib = new DiffDetectLib(this.storagePath);
  return diffDetectLib.compareNoPreprocessing(files);
};


text:
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using static LiteDB.Constants;

namespace LiteDB.Engine
{
    public partial class LiteEngine
    {
        /// <summary>
        /// Insert all documents in collection. If document has no _id, use AutoId generation.
        /// </summary>
        public int Insert(string collection, IEnumerable<BsonDocument> docs, BsonAutoId autoId)
        {
            if (collection.IsNullOrWhiteSpace()) throw new ArgumentNullException(nameof(collection));
            if (docs == null) throw new ArgumentNullException(nameof(docs));

            return this.AutoTransaction(transaction =>
            {
                var snapshot = transaction.CreateSnapshot(LockMode.Write, collection, true);
                var count = 0;
                var indexer = new IndexService(snapshot, _header.Pragmas.Collation);
                var data = new DataService(snapshot);

                LOG($"insert `{collection}`", "COMMAND");

                foreach (var doc in docs)
                {
                    transaction.Safepoint();

                    this.InsertDocument(snapshot, doc, autoId, indexer, data);

                    count++;
                }

                return count;
            });
        }

        /// <summary>
        /// Internal implementation of insert a document
        /// </summary>
        private void InsertDocument(Snapshot snapshot, BsonDocument doc, BsonAutoId autoId, IndexService indexer, DataService data)
        {
            // if no _id, use AutoId
            if (!doc.TryGetValue("_id", out var id))
            {
                doc["_id"] = id =
                    autoId == BsonAutoId.ObjectId ? new BsonValue(ObjectId.NewObjectId()) :
                    autoId == BsonAutoId.Guid ? new BsonValue(Guid.NewGuid()) :
                    this.GetSequence(snapshot, autoId);
            }
            else if(id.IsNumber)
            {
                // update memory sequence of numeric _id
                this.SetSequence(snapshot, id);
            }

            // test if _id is a valid type
            if (id.IsNull || id.IsMinValue || id.IsMaxValue)
            {
                throw LiteException.InvalidDataType("_id", id);
            }

            // storage in data pages - returns dataBlock address
            var dataBlock = data.Insert(doc);

            IndexNode last = null;

            // for each index, insert new IndexNode
            foreach (var index in snapshot.CollectionPage.GetCollectionIndexes())
            {
                // for each index, get all keys (supports multi-key) - gets distinct values only
                // if index are unique, get single key only
                var keys = index.BsonExpr.GetIndexKeys(doc, _header.Pragmas.Collation);

                // do a loop with all keys (multi-key supported)
                foreach(var key in keys)
                {
                    // insert node
                    var node = indexer.AddNode(index, key, dataBlock, last);

                    last = node;
                }
            }
        }
    }
}


text:
Software for the BlackLED controller

## Introduction
Code for the Teensy 3.1/3.2 running the BlackLED controller. Compatible with Arduino IDE.

## Licence
The code in this repository is available under the MIT License.

## Installation
1. Install [Arduino (1.8.1)](https://www.arduino.cc/)
- Install [Teensyduino (1.35)](https://www.pjrc.com/teensy/td_download.html)
- Install [ArtNode lib](https://github.com/vertigo-dk/ArtNode)
- Install modified [OctoWS2811 lib](https://github.com/alex-Arc/OctoWS2811)
- Install modified [Ethernet lib](https://github.com/alex-Arc/Ethernet/tree/1-socket)

- Open Arduino IDE
 - In ```Tools -> Board```  ```Teensy 3.1/3.2```
 - in ```Tools -> CPU speed``` select
	and 120 MHz optimized speed (overclock)

## Network setup
The host computer has to be on the 2.x.x.x network (for example 2.0.0.1), and the subnet must be 255.0.0.0.

The nodes get an calculated IP address from the MAC address accordingly to ArtNet 3 specifications in the 2.x.x.x space.

## Dependencies
- [ArtNode lib](https://github.com/vertigo-dk/ArtNode)
- [Ethernet lib](https://github.com/alex-Arc/Ethernet/tree/1-socket)
- modified [OctoWS2811 lib](https://github.com/alex-Arc/OctoWS2811)

## Compatibility
- teensy 3.1/3.2 with WIZ820io

## Known issues
at over 18 DMX universes it will begin to drop packages

---

## Version history

#### v0.8.7-Beta.1
- remove FastLED option
- test with new Ethernet lib
- test with Arduino 1.8.1 IDE

#### v0.8.6-Beta.1
##### New features
- No OpPoll for 20 sec. will result in blackout

---

#### v0.8.5-Beta
##### New features
- LED chip selection through defines
 - currently supports ws28 types and LPD8806
- Set number of leds through defines and auto fit to DMX size
- Set number of outputs through defines

##### Changes
- Octows2811 now external lib

---

#### no history back this far


text:
from google.cloud import websecurityscanner_v1beta

def sample_list_scan_configs():
    # Create a client
    client = websecurityscanner_v1beta.WebSecurityScannerClient()

    # Initialize request argument(s)
    request = websecurityscanner_v1beta.ListScanConfigsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_scan_configs(request=request)

    # Handle the response
    for response in page_result:
        print(response)

# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync]


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Gyalolechia schistidii Anzi

### Remarks
null


text:
#ifndef PSI_TYPES_RETURN_STMT_H
#define PSI_TYPES_RETURN_STMT_H

#include "Zend/zend_types.h"

struct psi_data;
struct psi_token;
struct psi_call_frame;
struct psi_impl;
struct psi_set_exp;

struct psi_return_stmt {
	struct psi_token *token;
	struct psi_return_exp *exp;
};

struct psi_return_stmt *psi_return_stmt_init(struct psi_return_exp *exp);
void psi_return_stmt_free(struct psi_return_stmt **ret_ptr);
void psi_return_stmt_dump(struct psi_dump *dump, struct psi_return_stmt *ret);
void psi_return_stmt_exec(struct psi_return_stmt *ret, zval *return_value, struct psi_call_frame *frame);
bool psi_return_stmt_validate(struct psi_data *data, struct psi_validate_scope *impl);

#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <parent>
    <groupId>io.norberg</groupId>
    <artifactId>rut-parent</artifactId>
    <version>1.0.2-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>rut</artifactId>

  <dependencies>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.0</version>
      <scope>provided</scope>
    </dependency>

    <!--test deps-->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.10.19</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>18.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.siom79.japicmp</groupId>
        <artifactId>japicmp-maven-plugin</artifactId>
        <version>0.13.0</version>
        <configuration>
          <oldVersion>
            <dependency>
              <groupId>io.norberg</groupId>
              <artifactId>rut</artifactId>
              <version>1.0</version>
            </dependency>
          </oldVersion>
          <newVersion>
            <file>
              <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
            </file>
          </newVersion>
          <parameter>
            <onlyModified>true</onlyModified>
            <accessModifier>public</accessModifier>
            <breakBuildOnModifications>false</breakBuildOnModifications>
            <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
            <onlyBinaryIncompatible>false</onlyBinaryIncompatible>
            <includeSynthetic>false</includeSynthetic>
          </parameter>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>cmp</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>


text:
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR.Messaging;
using Microsoft.AspNet.SignalR.Tracing;
using Microsoft.ServiceBus.Messaging;

namespace Microsoft.AspNet.SignalR.ServiceBus
{
    /// <summary>
    /// Uses Windows Azure Service Bus topics to scale-out SignalR applications in web farms.
    /// </summary>
    public class ServiceBusMessageBus : ScaleoutMessageBus
    {
        private const string SignalRTopicPrefix = "SIGNALR_TOPIC";

        private ServiceBusConnectionContext _connectionContext;

        private TraceSource _trace;

        private readonly ServiceBusConnection _connection;
        private readonly string[] _topics;

        public ServiceBusMessageBus(IDependencyResolver resolver, ServiceBusScaleoutConfiguration configuration)
            : base(resolver, configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            // Retrieve the trace manager
            var traceManager = resolver.Resolve<ITraceManager>();
            _trace = traceManager["SignalR." + typeof(ServiceBusMessageBus).Name];

            _connection = new ServiceBusConnection(configuration, _trace);

            _topics = Enumerable.Range(0, configuration.TopicCount)
                                .Select(topicIndex => SignalRTopicPrefix + "_" + configuration.TopicPrefix + "_" + topicIndex)
                                .ToArray();

            _connectionContext = new ServiceBusConnectionContext(configuration, _topics, _trace, OnMessage, OnError, Open);

            ThreadPool.QueueUserWorkItem(Subscribe);
        }

        protected override int StreamCount
        {
            get
            {
                return _topics.Length;
            }
        }

        protected override Task Send(int streamIndex, IList<Message> messages)
        {
            var stream = ServiceBusMessage.ToStream(messages);

            TraceMessages(messages, "Sending");

            return _connectionContext.Publish(streamIndex, stream);
        }

        private void OnMessage(int topicIndex, IEnumerable<BrokeredMessage> messages)
        {
            if (!messages.Any())
            {
                // Force the topic to re-open if it was ever closed even if we didn't get any messages
                Open(topicIndex);
            }

            foreach (var message in messages)
            {
                using (message)
                {
                    ScaleoutMessage scaleoutMessage = ServiceBusMessage.FromBrokeredMessage(message);

                    TraceMessages(scaleoutMessage.Messages, "Receiving");

                    OnReceived(topicIndex, (ulong)message.EnqueuedSequenceNumber, scaleoutMessage);
                }
            }
        }

        private void Subscribe(object state)
        {
            _connection.Subscribe(_connectionContext);
        }

        private void TraceMessages(IList<Message> messages, string messageType)
        {
            if (!_trace.Switch.ShouldTrace(TraceEventType.Verbose))
            {
                return;
            }

            foreach (Message message in messages)
            {
                _trace.TraceVerbose("{0} {1} bytes over Service Bus: {2}", messageType, message.Value.Array.Length, message.GetString());
            }
        }

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                if (_connectionContext != null)
                {
                    _connectionContext.Dispose();
                }

                if (_connection != null)
                {
                    _connection.Dispose();
                }
            }
        }
    }
}


text:
package io.v.vdl.psi.impl;

import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static io.v.vdl.psi.VdlTypes.*;
import io.v.vdl.psi.*;

public class VdlBuiltinCallExprImpl extends VdlExpressionImpl implements VdlBuiltinCallExpr {

  public VdlBuiltinCallExprImpl(ASTNode node) {
    super(node);
  }

  public void accept(@NotNull VdlVisitor visitor) {
    visitor.visitBuiltinCallExpr(this);
  }

  public void accept(@NotNull PsiElementVisitor visitor) {
    if (visitor instanceof VdlVisitor) accept((VdlVisitor)visitor);
    else super.accept(visitor);
  }

  @Override
  @Nullable
  public VdlBuiltinArgs getBuiltinArgs() {
    return findChildByClass(VdlBuiltinArgs.class);
  }

  @Override
  @NotNull
  public VdlReferenceExpression getReferenceExpression() {
    return findNotNullChildByClass(VdlReferenceExpression.class);
  }

  @Override
  @Nullable
  public PsiElement getComma() {
    return findChildByType(COMMA);
  }

  @Override
  @NotNull
  public PsiElement getLparen() {
    return findNotNullChildByType(LPAREN);
  }

  @Override
  @Nullable
  public PsiElement getRparen() {
    return findChildByType(RPAREN);
  }

}