text:
#pragma once

/// \file
/// Declaration of Diligent::CommandQueueD3D12Impl class

#include <mutex>
#include <atomic>

#include "CommandQueueD3D12.h"
#include "ObjectBase.hpp"

namespace Diligent
{

/// Implementation of the Diligent::ICommandQueueD3D12 interface
class CommandQueueD3D12Impl final : public ObjectBase<ICommandQueueD3D12>
{
public:
    using TBase = ObjectBase<ICommandQueueD3D12>;

    CommandQueueD3D12Impl(IReferenceCounters* pRefCounters, ID3D12CommandQueue* pd3d12NativeCmdQueue, ID3D12Fence* pd3d12Fence);
    ~CommandQueueD3D12Impl();

    IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_CommandQueueD3D12, TBase)

    // Implementation of ICommandQueue::GetNextFenceValue().
    virtual Uint64 DILIGENT_CALL_TYPE GetNextFenceValue() const override final { return m_NextFenceValue.load(); }

    // Implementation of ICommandQueue::WaitForIdle().
    virtual Uint64 DILIGENT_CALL_TYPE WaitForIdle() override final;

    // Implementation of ICommandQueue::GetCompletedFenceValue().
    virtual Uint64 DILIGENT_CALL_TYPE GetCompletedFenceValue() override final;

    // Implementation of ICommandQueueD3D12::Submit().
    virtual Uint64 DILIGENT_CALL_TYPE Submit(Uint32                    NumCommandLists,
                                             ID3D12CommandList* const* ppCommandLists) override final;

    // Implementation of ICommandQueueD3D12::GetD3D12CommandQueue().
    virtual ID3D12CommandQueue* DILIGENT_CALL_TYPE GetD3D12CommandQueue() override final { return m_pd3d12CmdQueue; }

    // Implementation of ICommandQueueD3D12::EnqueueSignal().
    virtual void DILIGENT_CALL_TYPE EnqueueSignal(ID3D12Fence* pFence, Uint64 Value) override final;

    // Implementation of ICommandQueueD3D12::WaitFence().
    virtual void DILIGENT_CALL_TYPE WaitFence(ID3D12Fence* pFence, Uint64 Value) override final;

    // Implementation of ICommandQueueD3D12::GetD3D12CommandQueueDesc().
    virtual const D3D12_COMMAND_QUEUE_DESC& DILIGENT_CALL_TYPE GetD3D12CommandQueueDesc(THIS) const override final
    {
        return m_d3d12CmdQueueDesc;
    }

    // Implementation of ICommandQueueD3D12::UpdateTileMappings().
    virtual void DILIGENT_CALL_TYPE UpdateTileMappings(ResourceTileMappingsD3D12* pMappings,
                                                       Uint32                     Count) override final;

private:
    // A value that will be signaled by the command queue next
    std::atomic<Uint64> m_NextFenceValue{1};

    // Last fence value completed by the GPU
    std::atomic<Uint64> m_LastCompletedFenceValue{0};

    std::mutex                  m_QueueMtx;
    CComPtr<ID3D12CommandQueue> m_pd3d12CmdQueue;

    const D3D12_COMMAND_QUEUE_DESC m_d3d12CmdQueueDesc;

    // The fence is signaled right after the command list has been
    // submitted to the command queue for execution.
    // All command lists with fence value less or equal to the signaled value
    // are guaranteed to be finished by the GPU
    CComPtr<ID3D12Fence> m_d3d12Fence;

    HANDLE m_WaitForGPUEventHandle = {};
};

} // namespace Diligent


text:
from urllib import urlencode
from django import template
from django.shortcuts import reverse
from django.contrib.auth.models import Group

register = template.Library()

@register.filter(name='add_css')
def add_css(field, css):
    return field.as_widget(attrs={"class":css})

@register.filter(name='times')
def times(number, start=1):
    return range(start, number + 1)

@register.filter(name='format_criteria')
def format_criteria(criteria):
    params = dict(criteria)
    if params['min_bedrooms'] == '0':
        params['min_bedrooms'] = 'Studio'
    return "Bedrooms: {}, Location: {}, Type: {}, Price: {} - {}, Distance: {}".format(
        params['min_bedrooms'], params['location'], params['property_type'],
        params['min_price'], params['max_price'], params['distance']
    )

@register.filter(name='link_criteria')
def link_criteria(criteria):
    params = dict(criteria)
    url = reverse('sales:search') if params['search_type'] == 'sales' else reverse('lettings:search')
    return "{}?{}".format(url, urlencode(params))

@register.filter(name='delete_link_criteria')
def delete_link_criteria(criteria):
    return "{}?{}".format(reverse('user:subscribe'), urlencode(dict(criteria)))

@register.filter(name='has_group')
def has_group(user, group_name):
    try:
        group = Group.objects.get(name=group_name)
        has_group = group in user.groups.all()
    except:
        has_group = False
    return has_group

redpajama_set_name: RedPajamaGithub


text:
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.Network.Models
{
    public partial class TroubleshootingRecommendedActions
    {
        internal static TroubleshootingRecommendedActions DeserializeTroubleshootingRecommendedActions(JsonElement element)
        {
            string actionId = default;
            string actionText = default;
            string actionUri = default;
            string actionUriText = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("actionId"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    actionId = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("actionText"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    actionText = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("actionUri"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    actionUri = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("actionUriText"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    actionUriText = property.Value.GetString();
                    continue;
                }
            }
            return new TroubleshootingRecommendedActions(actionId, actionText, actionUri, actionUriText);
        }
    }
}


text:
<?php
namespace Migration\Tests\Migration;

use Migration\Components\Migration,
    Migration\Tests\Base\AbstractProject;

class FilenameTest extends AbstractProject
{

    public function testGenerateDefaultSuffix()
    {
        $file = new \Migration\Components\Migration\FileName();
        $stamp = $file->generate();

        $this->assertStringMatchesFormat('migration_%d_%d_%d_%d_%d_%d',$stamp);

    }

    public function testGenerateCustomSuffix()
    {
        $file = new \Migration\Components\Migration\FileName();
        $stamp = $file->generate('Added Float Column To Table x');

        $this->assertStringMatchesFormat('added_float_column_to_table_x_%d_%d_%d_%d_%d_%d',$stamp);
    }

    /**
      *  @expectedException \Migration\Components\Migration\Exception
      */
    public function testGenerateCustomSuffixNumericStart()
    {
        $file = new \Migration\Components\Migration\FileName();
        $stamp = $file->generate('9 Added Float Column To Table x');

        $this->assertStringMatchesFormat('%s_%d_%d_%d_%d_%d_%d',$stamp);
    }

    public function testGenerateRemovesFileExtension()
    {
        $file = new \Migration\Components\Migration\FileName();
        $stamp = $file->generate('Added Float Column To Table x.php');

        $this->assertStringMatchesFormat('%s_%d_%d_%d_%d_%d_%d',$stamp);
        $this->assertFalse(strpos($stamp,'.php'));
    }

    public function testParseDefaultFormat()
    {
        $file = new \Migration\Components\Migration\FileName();
        $stamp = $file->generate();
        $stamp = $file->parse($stamp);
        $this->assertInternalType('integer',$stamp);
        $this->assertGreaterThan(0,$stamp);
    }

    public function testParseCustomFormat()
    {
        $file = new \Migration\Components\Migration\FileName();
        $stamp = $file->generate('Added Float Column To Table x');

        $int_stamp_portion = $file->parse($stamp);

        $this->assertInternalType('integer',$int_stamp_portion);
        $this->assertGreaterThan(0,$int_stamp_portion);
    }

    /**
      *  @expectedException Migration\Components\Migration\Exception
      *  @expectedExceptionMessage File Name is invalid at::a bad stamp
      */
    public function testParseBadCustomFormat()
    {
        $file = new \Migration\Components\Migration\FileName();
        $file_name = $file->parse('a bad stamp');

    }

}
/* End of File */


text:
const withNextra = require("nextra")({
  theme: "nextra-theme-docs",
  themeConfig: "./theme.config.tsx",
});

module.exports = {
  ...withNextra(),
  eslint: {
    ignoreDuringBuilds: true,
  },
  typescript: {
    ignoreBuildErrors: true,
  },
  basePath: "/react-grid-gallery",
  assetPrefix: "/react-grid-gallery/",
};


text:
import { Category, Offering } from '@waldur/marketplace/types';

import * as constants from './constants';

export const categoriesFetchStart = () => ({
  type: constants.CATEGORIES_FETCH_START,
});

export const categoriesFetchSuccess = (categories: Category[]) => ({
  type: constants.CATEGORIES_FETCH_SUCCESS,
  payload: { categories },
});

export const categoriesFetchError = () => ({
  type: constants.CATEGORIES_FETCH_ERROR,
});

export const offeringsFetchStart = () => ({
  type: constants.OFFERINGS_FETCH_START,
});

export const offeringsFetchSuccess = (offerings: Offering[]) => ({
  type: constants.OFFERINGS_FETCH_SUCCESS,
  payload: { offerings },
});

export const offeringsFetchError = () => ({
  type: constants.OFFERINGS_FETCH_ERROR,
});

export const gotoOffering = (offeringId: string) => ({
  type: constants.GOTO_OFFERING,
  payload: {
    offeringId,
  },
});


text:
<html>
  <head>
    <meta charset=utf-8>
    <meta name=viewport content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">

    <script src=../../../webcomponentsjs/webcomponents-lite.js></script>
    <script src=../../../web-component-tester/browser.js></script>
  </head>
  <body>
    <script>
      WCT.loadSuites([
        'hc-nested-list_perf.html',
        'hc-tree-view_perf.html'
      ]);
    </script>
  </body>
</html>


text:
package com.google.cloud.compute.v1;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.ApiMessage;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("by GAPIC")
@BetaApi
/**
 * Represents an Interconnects resource. The Interconnects resource is a dedicated connection
 * between Google's network and your on-premises network. For more information, see the Dedicated
 * overview page. (== resource_for v1.interconnects ==) (== resource_for beta.interconnects ==)
 */
public final class Interconnect implements ApiMessage {
  private final Boolean adminEnabled;
  private final List<InterconnectCircuitInfo> circuitInfos;
  private final String creationTimestamp;
  private final String customerName;
  private final String description;
  private final List<InterconnectOutageNotification> expectedOutages;
  private final String googleIpAddress;
  private final String googleReferenceId;
  private final String id;
  private final List<String> interconnectAttachments;
  private final String interconnectType;
  private final String kind;
  private final String linkType;
  private final String location;
  private final String name;
  private final String nocContactEmail;
  private final String operationalStatus;
  private final String peerIpAddress;
  private final Integer provisionedLinkCount;
  private final Integer requestedLinkCount;
  private final String selfLink;
  private final String state;

  private Interconnect() {
    this.adminEnabled = null;
    this.circuitInfos = null;
    this.creationTimestamp = null;
    this.customerName = null;
    this.description = null;
    this.expectedOutages = null;
    this.googleIpAddress = null;
    this.googleReferenceId = null;
    this.id = null;
    this.interconnectAttachments = null;
    this.interconnectType = null;
    this.kind = null;
    this.linkType = null;
    this.location = null;
    this.name = null;
    this.nocContactEmail = null;
    this.operationalStatus = null;
    this.peerIpAddress = null;
    this.provisionedLinkCount = null;
    this.requestedLinkCount = null;
    this.selfLink = null;
    this.state = null;
  }

  private Interconnect(
      Boolean adminEnabled,
      List<InterconnectCircuitInfo> circuitInfos,
      String creationTimestamp,
      String customerName,
      String description,
      List<InterconnectOutageNotification> expectedOutages,
      String googleIpAddress,
      String googleReferenceId,
      String id,
      List<String> interconnectAttachments,
      String interconnectType,
      String kind,
      String linkType,
      String location,
      String name,
      String nocContactEmail,
      String operationalStatus,
      String peerIpAddress,
      Integer provisionedLinkCount,
      Integer requestedLinkCount,
      String selfLink,
      String state) {
    this.adminEnabled = adminEnabled;
    this.circuitInfos = circuitInfos;
    this.creationTimestamp = creationTimestamp;
    this.customerName = customerName;
    this.description = description;
    this.expectedOutages = expectedOutages;
    this.googleIpAddress = googleIpAddress;
    this.googleReferenceId = googleReferenceId;
    this.id = id;
    this.interconnectAttachments = interconnectAttachments;
    this.interconnectType = interconnectType;
    this.kind = kind;
    this.linkType = linkType;
    this.location = location;
    this.name = name;
    this.nocContactEmail = nocContactEmail;
    this.operationalStatus = operationalStatus;
    this.peerIpAddress = peerIpAddress;
    this.provisionedLinkCount = provisionedLinkCount;
    this.requestedLinkCount = requestedLinkCount;
    this.selfLink = selfLink;
    this.state = state;
  }

  @Override
  public Object getFieldValue(String fieldName) {
    if ("adminEnabled".equals(fieldName)) {
      return adminEnabled;
    }
    if ("circuitInfos".equals(fieldName)) {
      return circuitInfos;
    }
    if ("creationTimestamp".equals(fieldName)) {
      return creationTimestamp;
    }
    if ("customerName".equals(fieldName)) {
      return customerName;
    }
    if ("description".equals(fieldName)) {
      return description;
    }
    if ("expectedOutages".equals(fieldName)) {
      return expectedOutages;
    }
    if ("googleIpAddress".equals(fieldName)) {
      return googleIpAddress;
    }
    if ("googleReferenceId".equals(fieldName)) {
      return googleReferenceId;
    }
    if ("id".equals(fieldName)) {
      return id;
    }
    if ("interconnectAttachments".equals(fieldName)) {
      return interconnectAttachments;
    }
    if ("interconnectType".equals(fieldName)) {
      return interconnectType;
    }
    if ("kind".equals(fieldName)) {
      return kind;
    }
    if ("linkType".equals(fieldName)) {
      return linkType;
    }
    if ("location".equals(fieldName)) {
      return location;
    }
    if ("name".equals(fieldName)) {
      return name;
    }
    if ("nocContactEmail".equals(fieldName)) {
      return nocContactEmail;
    }
    if ("operationalStatus".equals(fieldName)) {
      return operationalStatus;
    }
    if ("peerIpAddress".equals(fieldName)) {
      return peerIpAddress;
    }
    if ("provisionedLinkCount".equals(fieldName)) {
      return provisionedLinkCount;
    }
    if ("requestedLinkCount".equals(fieldName)) {
      return requestedLinkCount;
    }
    if ("selfLink".equals(fieldName)) {
      return selfLink;
    }
    if ("state".equals(fieldName)) {
      return state;
    }
    return null;
  }

  @Nullable
  @Override
  public ApiMessage getApiMessageRequestBody() {
    return null;
  }

  @Nullable
  @Override
  /**
   * The fields that should be serialized (even if they have empty values). If the containing
   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
   * fields in the field mask) will be serialized. If the containing object does not have a
   * fieldmask, then only non-empty fields will be serialized.
   */
  public List<String> getFieldMask() {
    return null;
  }

  /**
   * Administrative status of the interconnect. When this is set to true, the Interconnect is
   * functional and can carry traffic. When set to false, no packets can be carried over the
   * interconnect and no BGP routes are exchanged over it. By default, the status is set to true.
   */
  public Boolean getAdminEnabled() {
    return adminEnabled;
  }

  /**
   * [Output Only] A list of CircuitInfo objects, that describe the individual circuits in this LAG.
   */
  public List<InterconnectCircuitInfo> getCircuitInfosList() {
    return circuitInfos;
  }

  /** [Output Only] Creation timestamp in RFC3339 text format. */
  public String getCreationTimestamp() {
    return creationTimestamp;
  }

  /**
   * Customer name, to put in the Letter of Authorization as the party authorized to request a
   * crossconnect.
   */
  public String getCustomerName() {
    return customerName;
  }

  /**
   * An optional description of this resource. Provide this property when you create the resource.
   */
  public String getDescription() {
    return description;
  }

  /** [Output Only] A list of outages expected for this Interconnect. */
  public List<InterconnectOutageNotification> getExpectedOutagesList() {
    return expectedOutages;
  }

  /**
   * [Output Only] IP address configured on the Google side of the Interconnect link. This can be
   * used only for ping tests.
   */
  public String getGoogleIpAddress() {
    return googleIpAddress;
  }

  /**
   * [Output Only] Google reference ID to be used when raising support tickets with Google or
   * otherwise to debug backend connectivity issues.
   */
  public String getGoogleReferenceId() {
    return googleReferenceId;
  }

  /**
   * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   */
  public String getId() {
    return id;
  }

  /**
   * [Output Only] A list of the URLs of all InterconnectAttachments configured to use this
   * Interconnect.
   */
  public List<String> getInterconnectAttachmentsList() {
    return interconnectAttachments;
  }

  /** Type of interconnect. Note that "IT_PRIVATE" has been deprecated in favor of "DEDICATED" */
  public String getInterconnectType() {
    return interconnectType;
  }

  /** [Output Only] Type of the resource. Always compute#interconnect for interconnects. */
  public String getKind() {
    return kind;
  }

  /**
   * Type of link requested. This field indicates speed of each of the links in the bundle, not the
   * entire bundle.
   */
  public String getLinkType() {
    return linkType;
  }

  /**
   * URL of the InterconnectLocation object that represents where this connection is to be
   * provisioned.
   */
  public String getLocation() {
    return location;
  }

  /**
   * Name of the resource. Provided by the client when the resource is created. The name must be
   * 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
   * long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
   * character must be a lowercase letter, and all following characters must be a dash, lowercase
   * letter, or digit, except the last character, which cannot be a dash.
   */
  public String getName() {
    return name;
  }

  /**
   * Email address to contact the customer NOC for operations and maintenance notifications
   * regarding this Interconnect. If specified, this will be used for notifications in addition to
   * all other forms described, such as Stackdriver logs alerting and Cloud Notifications.
   */
  public String getNocContactEmail() {
    return nocContactEmail;
  }

  /** [Output Only] The current status of whether or not this Interconnect is functional. */
  public String getOperationalStatus() {
    return operationalStatus;
  }

  /**
   * [Output Only] IP address configured on the customer side of the Interconnect link. The customer
   * should configure this IP address during turnup when prompted by Google NOC. This can be used
   * only for ping tests.
   */
  public String getPeerIpAddress() {
    return peerIpAddress;
  }

  /** [Output Only] Number of links actually provisioned in this interconnect. */
  public Integer getProvisionedLinkCount() {
    return provisionedLinkCount;
  }

  /** Target number of physical links in the link bundle, as requested by the customer. */
  public Integer getRequestedLinkCount() {
    return requestedLinkCount;
  }

  /** [Output Only] Server-defined URL for the resource. */
  public String getSelfLink() {
    return selfLink;
  }

  /** [Output Only] The current state of whether or not this Interconnect is functional. */
  public String getState() {
    return state;
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(Interconnect prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  public static Interconnect getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final Interconnect DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new Interconnect();
  }

  public static class Builder {
    private Boolean adminEnabled;
    private List<InterconnectCircuitInfo> circuitInfos;
    private String creationTimestamp;
    private String customerName;
    private String description;
    private List<InterconnectOutageNotification> expectedOutages;
    private String googleIpAddress;
    private String googleReferenceId;
    private String id;
    private List<String> interconnectAttachments;
    private String interconnectType;
    private String kind;
    private String linkType;
    private String location;
    private String name;
    private String nocContactEmail;
    private String operationalStatus;
    private String peerIpAddress;
    private Integer provisionedLinkCount;
    private Integer requestedLinkCount;
    private String selfLink;
    private String state;

    Builder() {}

    public Builder mergeFrom(Interconnect other) {
      if (other == Interconnect.getDefaultInstance()) return this;
      if (other.getAdminEnabled() != null) {
        this.adminEnabled = other.adminEnabled;
      }
      if (other.getCircuitInfosList() != null) {
        this.circuitInfos = other.circuitInfos;
      }
      if (other.getCreationTimestamp() != null) {
        this.creationTimestamp = other.creationTimestamp;
      }
      if (other.getCustomerName() != null) {
        this.customerName = other.customerName;
      }
      if (other.getDescription() != null) {
        this.description = other.description;
      }
      if (other.getExpectedOutagesList() != null) {
        this.expectedOutages = other.expectedOutages;
      }
      if (other.getGoogleIpAddress() != null) {
        this.googleIpAddress = other.googleIpAddress;
      }
      if (other.getGoogleReferenceId() != null) {
        this.googleReferenceId = other.googleReferenceId;
      }
      if (other.getId() != null) {
        this.id = other.id;
      }
      if (other.getInterconnectAttachmentsList() != null) {
        this.interconnectAttachments = other.interconnectAttachments;
      }
      if (other.getInterconnectType() != null) {
        this.interconnectType = other.interconnectType;
      }
      if (other.getKind() != null) {
        this.kind = other.kind;
      }
      if (other.getLinkType() != null) {
        this.linkType = other.linkType;
      }
      if (other.getLocation() != null) {
        this.location = other.location;
      }
      if (other.getName() != null) {
        this.name = other.name;
      }
      if (other.getNocContactEmail() != null) {
        this.nocContactEmail = other.nocContactEmail;
      }
      if (other.getOperationalStatus() != null) {
        this.operationalStatus = other.operationalStatus;
      }
      if (other.getPeerIpAddress() != null) {
        this.peerIpAddress = other.peerIpAddress;
      }
      if (other.getProvisionedLinkCount() != null) {
        this.provisionedLinkCount = other.provisionedLinkCount;
      }
      if (other.getRequestedLinkCount() != null) {
        this.requestedLinkCount = other.requestedLinkCount;
      }
      if (other.getSelfLink() != null) {
        this.selfLink = other.selfLink;
      }
      if (other.getState() != null) {
        this.state = other.state;
      }
      return this;
    }

    Builder(Interconnect source) {
      this.adminEnabled = source.adminEnabled;
      this.circuitInfos = source.circuitInfos;
      this.creationTimestamp = source.creationTimestamp;
      this.customerName = source.customerName;
      this.description = source.description;
      this.expectedOutages = source.expectedOutages;
      this.googleIpAddress = source.googleIpAddress;
      this.googleReferenceId = source.googleReferenceId;
      this.id = source.id;
      this.interconnectAttachments = source.interconnectAttachments;
      this.interconnectType = source.interconnectType;
      this.kind = source.kind;
      this.linkType = source.linkType;
      this.location = source.location;
      this.name = source.name;
      this.nocContactEmail = source.nocContactEmail;
      this.operationalStatus = source.operationalStatus;
      this.peerIpAddress = source.peerIpAddress;
      this.provisionedLinkCount = source.provisionedLinkCount;
      this.requestedLinkCount = source.requestedLinkCount;
      this.selfLink = source.selfLink;
      this.state = source.state;
    }

    /**
     * Administrative status of the interconnect. When this is set to true, the Interconnect is
     * functional and can carry traffic. When set to false, no packets can be carried over the
     * interconnect and no BGP routes are exchanged over it. By default, the status is set to true.
     */
    public Boolean getAdminEnabled() {
      return adminEnabled;
    }

    /**
     * Administrative status of the interconnect. When this is set to true, the Interconnect is
     * functional and can carry traffic. When set to false, no packets can be carried over the
     * interconnect and no BGP routes are exchanged over it. By default, the status is set to true.
     */
    public Builder setAdminEnabled(Boolean adminEnabled) {
      this.adminEnabled = adminEnabled;
      return this;
    }

    /**
     * [Output Only] A list of CircuitInfo objects, that describe the individual circuits in this
     * LAG.
     */
    public List<InterconnectCircuitInfo> getCircuitInfosList() {
      return circuitInfos;
    }

    /**
     * [Output Only] A list of CircuitInfo objects, that describe the individual circuits in this
     * LAG.
     */
    public Builder addAllCircuitInfos(List<InterconnectCircuitInfo> circuitInfos) {
      if (this.circuitInfos == null) {
        this.circuitInfos = new LinkedList<>();
      }
      this.circuitInfos.addAll(circuitInfos);
      return this;
    }

    /**
     * [Output Only] A list of CircuitInfo objects, that describe the individual circuits in this
     * LAG.
     */
    public Builder addCircuitInfos(InterconnectCircuitInfo circuitInfos) {
      if (this.circuitInfos == null) {
        this.circuitInfos = new LinkedList<>();
      }
      this.circuitInfos.add(circuitInfos);
      return this;
    }

    /** [Output Only] Creation timestamp in RFC3339 text format. */
    public String getCreationTimestamp() {
      return creationTimestamp;
    }

    /** [Output Only] Creation timestamp in RFC3339 text format. */
    public Builder setCreationTimestamp(String creationTimestamp) {
      this.creationTimestamp = creationTimestamp;
      return this;
    }

    /**
     * Customer name, to put in the Letter of Authorization as the party authorized to request a
     * crossconnect.
     */
    public String getCustomerName() {
      return customerName;
    }

    /**
     * Customer name, to put in the Letter of Authorization as the party authorized to request a
     * crossconnect.
     */
    public Builder setCustomerName(String customerName) {
      this.customerName = customerName;
      return this;
    }

    /**
     * An optional description of this resource. Provide this property when you create the resource.
     */
    public String getDescription() {
      return description;
    }

    /**
     * An optional description of this resource. Provide this property when you create the resource.
     */
    public Builder setDescription(String description) {
      this.description = description;
      return this;
    }

    /** [Output Only] A list of outages expected for this Interconnect. */
    public List<InterconnectOutageNotification> getExpectedOutagesList() {
      return expectedOutages;
    }

    /** [Output Only] A list of outages expected for this Interconnect. */
    public Builder addAllExpectedOutages(List<InterconnectOutageNotification> expectedOutages) {
      if (this.expectedOutages == null) {
        this.expectedOutages = new LinkedList<>();
      }
      this.expectedOutages.addAll(expectedOutages);
      return this;
    }

    /** [Output Only] A list of outages expected for this Interconnect. */
    public Builder addExpectedOutages(InterconnectOutageNotification expectedOutages) {
      if (this.expectedOutages == null) {
        this.expectedOutages = new LinkedList<>();
      }
      this.expectedOutages.add(expectedOutages);
      return this;
    }

    /**
     * [Output Only] IP address configured on the Google side of the Interconnect link. This can be
     * used only for ping tests.
     */
    public String getGoogleIpAddress() {
      return googleIpAddress;
    }

    /**
     * [Output Only] IP address configured on the Google side of the Interconnect link. This can be
     * used only for ping tests.
     */
    public Builder setGoogleIpAddress(String googleIpAddress) {
      this.googleIpAddress = googleIpAddress;
      return this;
    }

    /**
     * [Output Only] Google reference ID to be used when raising support tickets with Google or
     * otherwise to debug backend connectivity issues.
     */
    public String getGoogleReferenceId() {
      return googleReferenceId;
    }

    /**
     * [Output Only] Google reference ID to be used when raising support tickets with Google or
     * otherwise to debug backend connectivity issues.
     */
    public Builder setGoogleReferenceId(String googleReferenceId) {
      this.googleReferenceId = googleReferenceId;
      return this;
    }

    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the
     * server.
     */
    public String getId() {
      return id;
    }

    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the
     * server.
     */
    public Builder setId(String id) {
      this.id = id;
      return this;
    }

    /**
     * [Output Only] A list of the URLs of all InterconnectAttachments configured to use this
     * Interconnect.
     */
    public List<String> getInterconnectAttachmentsList() {
      return interconnectAttachments;
    }

    /**
     * [Output Only] A list of the URLs of all InterconnectAttachments configured to use this
     * Interconnect.
     */
    public Builder addAllInterconnectAttachments(List<String> interconnectAttachments) {
      if (this.interconnectAttachments == null) {
        this.interconnectAttachments = new LinkedList<>();
      }
      this.interconnectAttachments.addAll(interconnectAttachments);
      return this;
    }

    /**
     * [Output Only] A list of the URLs of all InterconnectAttachments configured to use this
     * Interconnect.
     */
    public Builder addInterconnectAttachments(String interconnectAttachments) {
      if (this.interconnectAttachments == null) {
        this.interconnectAttachments = new LinkedList<>();
      }
      this.interconnectAttachments.add(interconnectAttachments);
      return this;
    }

    /** Type of interconnect. Note that "IT_PRIVATE" has been deprecated in favor of "DEDICATED" */
    public String getInterconnectType() {
      return interconnectType;
    }

    /** Type of interconnect. Note that "IT_PRIVATE" has been deprecated in favor of "DEDICATED" */
    public Builder setInterconnectType(String interconnectType) {
      this.interconnectType = interconnectType;
      return this;
    }

    /** [Output Only] Type of the resource. Always compute#interconnect for interconnects. */
    public String getKind() {
      return kind;
    }

    /** [Output Only] Type of the resource. Always compute#interconnect for interconnects. */
    public Builder setKind(String kind) {
      this.kind = kind;
      return this;
    }

    /**
     * Type of link requested. This field indicates speed of each of the links in the bundle, not
     * the entire bundle.
     */
    public String getLinkType() {
      return linkType;
    }

    /**
     * Type of link requested. This field indicates speed of each of the links in the bundle, not
     * the entire bundle.
     */
    public Builder setLinkType(String linkType) {
      this.linkType = linkType;
      return this;
    }

    /**
     * URL of the InterconnectLocation object that represents where this connection is to be
     * provisioned.
     */
    public String getLocation() {
      return location;
    }

    /**
     * URL of the InterconnectLocation object that represents where this connection is to be
     * provisioned.
     */
    public Builder setLocation(String location) {
      this.location = location;
      return this;
    }

    /**
     * Name of the resource. Provided by the client when the resource is created. The name must be
     * 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
     * long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
     * character must be a lowercase letter, and all following characters must be a dash, lowercase
     * letter, or digit, except the last character, which cannot be a dash.
     */
    public String getName() {
      return name;
    }

    /**
     * Name of the resource. Provided by the client when the resource is created. The name must be
     * 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
     * long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
     * character must be a lowercase letter, and all following characters must be a dash, lowercase
     * letter, or digit, except the last character, which cannot be a dash.
     */
    public Builder setName(String name) {
      this.name = name;
      return this;
    }

    /**
     * Email address to contact the customer NOC for operations and maintenance notifications
     * regarding this Interconnect. If specified, this will be used for notifications in addition to
     * all other forms described, such as Stackdriver logs alerting and Cloud Notifications.
     */
    public String getNocContactEmail() {
      return nocContactEmail;
    }

    /**
     * Email address to contact the customer NOC for operations and maintenance notifications
     * regarding this Interconnect. If specified, this will be used for notifications in addition to
     * all other forms described, such as Stackdriver logs alerting and Cloud Notifications.
     */
    public Builder setNocContactEmail(String nocContactEmail) {
      this.nocContactEmail = nocContactEmail;
      return this;
    }

    /** [Output Only] The current status of whether or not this Interconnect is functional. */
    public String getOperationalStatus() {
      return operationalStatus;
    }

    /** [Output Only] The current status of whether or not this Interconnect is functional. */
    public Builder setOperationalStatus(String operationalStatus) {
      this.operationalStatus = operationalStatus;
      return this;
    }

    /**
     * [Output Only] IP address configured on the customer side of the Interconnect link. The
     * customer should configure this IP address during turnup when prompted by Google NOC. This can
     * be used only for ping tests.
     */
    public String getPeerIpAddress() {
      return peerIpAddress;
    }

    /**
     * [Output Only] IP address configured on the customer side of the Interconnect link. The
     * customer should configure this IP address during turnup when prompted by Google NOC. This can
     * be used only for ping tests.
     */
    public Builder setPeerIpAddress(String peerIpAddress) {
      this.peerIpAddress = peerIpAddress;
      return this;
    }

    /** [Output Only] Number of links actually provisioned in this interconnect. */
    public Integer getProvisionedLinkCount() {
      return provisionedLinkCount;
    }

    /** [Output Only] Number of links actually provisioned in this interconnect. */
    public Builder setProvisionedLinkCount(Integer provisionedLinkCount) {
      this.provisionedLinkCount = provisionedLinkCount;
      return this;
    }

    /** Target number of physical links in the link bundle, as requested by the customer. */
    public Integer getRequestedLinkCount() {
      return requestedLinkCount;
    }

    /** Target number of physical links in the link bundle, as requested by the customer. */
    public Builder setRequestedLinkCount(Integer requestedLinkCount) {
      this.requestedLinkCount = requestedLinkCount;
      return this;
    }

    /** [Output Only] Server-defined URL for the resource. */
    public String getSelfLink() {
      return selfLink;
    }

    /** [Output Only] Server-defined URL for the resource. */
    public Builder setSelfLink(String selfLink) {
      this.selfLink = selfLink;
      return this;
    }

    /** [Output Only] The current state of whether or not this Interconnect is functional. */
    public String getState() {
      return state;
    }

    /** [Output Only] The current state of whether or not this Interconnect is functional. */
    public Builder setState(String state) {
      this.state = state;
      return this;
    }

    public Interconnect build() {

      return new Interconnect(
          adminEnabled,
          circuitInfos,
          creationTimestamp,
          customerName,
          description,
          expectedOutages,
          googleIpAddress,
          googleReferenceId,
          id,
          interconnectAttachments,
          interconnectType,
          kind,
          linkType,
          location,
          name,
          nocContactEmail,
          operationalStatus,
          peerIpAddress,
          provisionedLinkCount,
          requestedLinkCount,
          selfLink,
          state);
    }

    public Builder clone() {
      Builder newBuilder = new Builder();
      newBuilder.setAdminEnabled(this.adminEnabled);
      newBuilder.addAllCircuitInfos(this.circuitInfos);
      newBuilder.setCreationTimestamp(this.creationTimestamp);
      newBuilder.setCustomerName(this.customerName);
      newBuilder.setDescription(this.description);
      newBuilder.addAllExpectedOutages(this.expectedOutages);
      newBuilder.setGoogleIpAddress(this.googleIpAddress);
      newBuilder.setGoogleReferenceId(this.googleReferenceId);
      newBuilder.setId(this.id);
      newBuilder.addAllInterconnectAttachments(this.interconnectAttachments);
      newBuilder.setInterconnectType(this.interconnectType);
      newBuilder.setKind(this.kind);
      newBuilder.setLinkType(this.linkType);
      newBuilder.setLocation(this.location);
      newBuilder.setName(this.name);
      newBuilder.setNocContactEmail(this.nocContactEmail);
      newBuilder.setOperationalStatus(this.operationalStatus);
      newBuilder.setPeerIpAddress(this.peerIpAddress);
      newBuilder.setProvisionedLinkCount(this.provisionedLinkCount);
      newBuilder.setRequestedLinkCount(this.requestedLinkCount);
      newBuilder.setSelfLink(this.selfLink);
      newBuilder.setState(this.state);
      return newBuilder;
    }
  }

  @Override
  public String toString() {
    return "Interconnect{"
        + "adminEnabled="
        + adminEnabled
        + ", "
        + "circuitInfos="
        + circuitInfos
        + ", "
        + "creationTimestamp="
        + creationTimestamp
        + ", "
        + "customerName="
        + customerName
        + ", "
        + "description="
        + description
        + ", "
        + "expectedOutages="
        + expectedOutages
        + ", "
        + "googleIpAddress="
        + googleIpAddress
        + ", "
        + "googleReferenceId="
        + googleReferenceId
        + ", "
        + "id="
        + id
        + ", "
        + "interconnectAttachments="
        + interconnectAttachments
        + ", "
        + "interconnectType="
        + interconnectType
        + ", "
        + "kind="
        + kind
        + ", "
        + "linkType="
        + linkType
        + ", "
        + "location="
        + location
        + ", "
        + "name="
        + name
        + ", "
        + "nocContactEmail="
        + nocContactEmail
        + ", "
        + "operationalStatus="
        + operationalStatus
        + ", "
        + "peerIpAddress="
        + peerIpAddress
        + ", "
        + "provisionedLinkCount="
        + provisionedLinkCount
        + ", "
        + "requestedLinkCount="
        + requestedLinkCount
        + ", "
        + "selfLink="
        + selfLink
        + ", "
        + "state="
        + state
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Interconnect) {
      Interconnect that = (Interconnect) o;
      return Objects.equals(this.adminEnabled, that.getAdminEnabled())
          && Objects.equals(this.circuitInfos, that.getCircuitInfosList())
          && Objects.equals(this.creationTimestamp, that.getCreationTimestamp())
          && Objects.equals(this.customerName, that.getCustomerName())
          && Objects.equals(this.description, that.getDescription())
          && Objects.equals(this.expectedOutages, that.getExpectedOutagesList())
          && Objects.equals(this.googleIpAddress, that.getGoogleIpAddress())
          && Objects.equals(this.googleReferenceId, that.getGoogleReferenceId())
          && Objects.equals(this.id, that.getId())
          && Objects.equals(this.interconnectAttachments, that.getInterconnectAttachmentsList())
          && Objects.equals(this.interconnectType, that.getInterconnectType())
          && Objects.equals(this.kind, that.getKind())
          && Objects.equals(this.linkType, that.getLinkType())
          && Objects.equals(this.location, that.getLocation())
          && Objects.equals(this.name, that.getName())
          && Objects.equals(this.nocContactEmail, that.getNocContactEmail())
          && Objects.equals(this.operationalStatus, that.getOperationalStatus())
          && Objects.equals(this.peerIpAddress, that.getPeerIpAddress())
          && Objects.equals(this.provisionedLinkCount, that.getProvisionedLinkCount())
          && Objects.equals(this.requestedLinkCount, that.getRequestedLinkCount())
          && Objects.equals(this.selfLink, that.getSelfLink())
          && Objects.equals(this.state, that.getState());
    }
    return false;
  }

  @Override
  public int hashCode() {
    return Objects.hash(
        adminEnabled,
        circuitInfos,
        creationTimestamp,
        customerName,
        description,
        expectedOutages,
        googleIpAddress,
        googleReferenceId,
        id,
        interconnectAttachments,
        interconnectType,
        kind,
        linkType,
        location,
        name,
        nocContactEmail,
        operationalStatus,
        peerIpAddress,
        provisionedLinkCount,
        requestedLinkCount,
        selfLink,
        state);
  }
}


text:
package kinesis

import (
	"encoding/json"

	"github.com/apex/go-apex"
)

// Event represents a Kinesis event with one or more records.
type Event struct {
	Records []*Record `json:"Records"`
}

// Record represents a single Kinesis record.
type Record struct {
	EventSource       string `json:"eventSource"`
	EventVersion      string `json:"eventVersion"`
	EventID           string `json:"eventID"`
	EventName         string `json:"eventName"`
	InvokeIdentityARN string `json:"invokeIdentityArn"`
	AWSRegion         string `json:"awsRegion"`
	EventSourceARN    string `json:"eventSourceARN"`
	Kinesis           struct {
		SchemaVersion  string `json:"kinesisSchemaVersion"`
		PartitionKey   string `json:"partitionKey"`
		SequenceNumber string `json:"sequenceNumber"`
		Data           []byte `json:"data"`
	}
}

// Handler handles Kinesis events.
type Handler interface {
	HandleKinesis(*Event, *apex.Context) error
}

// HandlerFunc unmarshals Kinesis events before passing control.
type HandlerFunc func(*Event, *apex.Context) error

func (h HandlerFunc) HandleKinesis(event *Event, ctx *apex.Context) error {
	return h(event, ctx)
}

// Handle implements apex.Handler.
func (h HandlerFunc) Handle(data json.RawMessage, ctx *apex.Context) (interface{}, error) {
	var event Event

	if err := json.Unmarshal(data, &event); err != nil {
		return nil, err
	}

	return nil, h(&event, ctx)
}

// HandleFunc handles Kinesis events with callback function.
func HandleFunc(h HandlerFunc) {
	apex.Handle(h)
}

// Handle Kinesis events with handler.
func Handle(h Handler) {
	HandleFunc(HandlerFunc(h.HandleKinesis))
}


text:
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class First extends Application {

  // Constructor
  public function __construct()
  {
    parent::__construct();
  }

  public function index(){

    $this->load->model('quotes');
    $this->data['pagebody'] = 'justone';

    $this->data = array_merge($this->data, $this->quotes->get(1));

    $this->render();
  }

  public function zzz(){

    $this->load->model('quotes');
    $this->data['pagebody'] = 'justone';

    $this->data = array_merge($this->data, $this->quotes->get(1));

    $this->render();

  }

    public function gimme($id){
        // loads justone
        $this->data['pagebody'] = 'justone';

        // gets quote of id
	$source = $this->quotes->get($id);

        // merge the records to data array
	$this->data = array_merge($this->data, $source);

        $this->render();
    }

}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="twitter:site" content="@kivyframework">

    <title>Scatter — Kivy 1.10.0 ドキュメント</title>
    <link href='//fonts.googleapis.com/css?family=Source+Code+Pro:400,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="_static/fresh.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="top" title="Kivy 1.10.0 ドキュメント" href="index.html" />
    <link rel="up" title="Widgets(翻訳済み)" href="api-kivy.uix.html" />
    <link rel="next" title="Scatter Layout" href="api-kivy.uix.scatterlayout.html" />
    <link rel="prev" title="Sandbox" href="api-kivy.uix.sandbox.html" />

Guides

Garden

API Reference

PDF

Wiki

Quick search

            <form class="search" action="search.html" method="get">

                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
                <input type="text" class="text" name="q" />
            </form>

Getting Started(翻訳済み)

Introduction (翻訳済み)

Installation(翻訳済み)

A first App(翻訳済み)

Properties(翻訳済み)

Kv Design Language(翻訳済み)

Events(翻訳済み)

Non-widget stuff(翻訳済み)

Layouts(翻訳済み)

Drawing(翻訳済み)

Packaging(翻訳済み)

Examples(翻訳済み)

Diving in(翻訳済み)

Gallery of Examples(翻訳済み)

Gallery(翻訳済み)

3D Rotating Monkey Head(翻訳済み)

Widget animation(翻訳済み)

Suite of Application Builders(翻訳済み)

Application example using build() + return(翻訳済み)

Application built from a  .kv fil(翻訳済み)

Application from a .kv in a Template Directory(翻訳済み)

Camera Example(翻訳済み)

Bezier Example(翻訳済み)

Canvas stress(翻訳済み)

Circle Example(翻訳済み)

FBO Canvas(翻訳済み)

Line (SmoothLine) Experiment(翻訳済み)

Lines Extended Demo(翻訳済み)

Mesh test(翻訳済み)

Multitexture Example(翻訳済み)

Repeat Texture on Resize(翻訳済み)

Rotation Example(翻訳済み)

Stencil demo(翻訳済み)

Tesselate Demonstration

Texture Wrapping and Coordinates Example(翻訳済み)

Shuffled Camera Feed Puzzle(翻訳済み)

Kivy Catalog(翻訳済み)

Multistroke Recognition Database Demonstration(翻訳済み)

Basic Picture Viewer(翻訳済み)

Live Shader Editor(翻訳済み)

Showcase of Kivy Features

Touch Tracer Line Drawing Demonstration(翻訳済み)

User's Guide(翻訳済み)

Installation(翻訳済み)

Philosophy(翻訳済み)

Contributing(翻訳済み)

FAQ (翻訳済み)

Contact Us(翻訳済み)

Programming Guide(翻訳済み)

Kivy Basics(翻訳済み)

Controlling the environment(翻訳済み)

Configure Kivy(翻訳済み)

Architectural Overview(翻訳済み)

Events and Properties (翻訳済み)

Input management (翻訳済み)

Widgets(翻訳済み)

Graphics (翻訳済み)

Kv language(翻訳済み)

Integrating with other Frameworks(翻訳済み)

Packaging your application(翻訳済み)

Package licensing (翻訳済み)

Tutorials(翻訳済み)

Pong Game Tutorial(翻訳済み)

A Simple Paint App(翻訳済み)

Crash Course(翻訳済み)

API Reference

Kivy framework(翻訳済み)

Adapters

Adapter

List Item View Argument Converters

DictAdapter

ListAdapter

SelectableDataItem

SimpleListAdapter

Animation(翻訳済み)

Application (翻訳中)

Atlas

Kivy Base

Cache manager

Clock object(翻訳ずみ)

Compatibility module for Python 2.7 and > 3.3

Configuration object

Context

Core Abstraction(翻訳済み)

Audio

Camera

Clipboard(翻訳済み)

OpenGL

Image

Spelling

Text

Text Markup

Text layout

Video

Window

Kivy module for binary dependencies.

Effects

Damped scroll effect

Kinetic effect

Opacity scroll effect

Scroll effect

Event dispatcher

Factory object

Garden

Geometry utilities

Gesture recognition

Graphics(翻訳中)

CGL: standard C interface for OpenGL

Graphics compiler

Context management

Context instructions

Framebuffer

GL instructions

Canvas

OpenGL

OpenGL utilities

Scissor Instructions

Shader

Stencil instructions

SVG

Tesselator

Texture

Transformation

Input management

Motion Event Factory

Motion Event

Input Postprocessing

Calibration

Dejitter

Double Tap

Ignore list

Retain Touch

Triple Tap

Motion Event Provider

Providers

Android Joystick Input Provider

Native support for HID input from the linux kernel

Leap Motion - finger only

Native support of Wacom tablet from linuxwacom driver

Native support of MultitouchSupport framework for MacBook (MaxOSX platform)

Mouse provider implementation

Native support for Multitouch devices on Linux, using libmtdev.

Auto Create Input Provider Config Entry for Available MT Hardware (linux only).

TUIO Input Provider

Common definitions for a Windows provider

Support for WM_PEN messages (Windows platform)

Support for WM_TOUCH messages (Windows platform)

Input recorder

Motion Event Shape

Interactive launcher

Kivy Language(翻訳済み)

Builder

Parser

External libraries

DDS File library

GstPlayer

Python mtdev

OSC

NO DOCUMENTATION (module kivy.uix.recycleview)

simpleOSC 0.2

Asynchronous data loader

Logger object

Metrics

Modules

Console

Inspector

JoyCursor

Keybinding

Monitor module

Recorder module

Screen

Touchring

Web Debugger

Multistroke gesture recognizer

Network support

UrlRequest

Parser utilities

Properties

Resources management

Storage

Dictionary store

JSON store

Redis Store

Support

Tools

Packaging

Pyinstaller hooks

Widgets(翻訳済み)

Abstract View

Accordion

Action Bar

Anchor Layout

Behaviors

Button Behavior

Code Navigation Behavior

Compound Selection Behavior

Cover Behavior

Drag Behavior

Emacs Behavior

Focus Behavior

Kivy Namespaces

ToggleButton Behavior

Box Layout

Bubble

Button

Camera

Carousel

CheckBox

Code Input

Color Picker

Drop-Down List

EffectWidget

FileChooser

Float Layout

Gesture Surface

Grid Layout

Image

Label(翻訳済み)

Layout

List View

ModalView

PageLayout

Popup

Progress Bar

RecycleBoxLayout

RecycleGridLayout

RecycleLayout

RecycleView

RecycleView Data Model

RecycleView Layouts

RecycleView Views

Relative Layout

reStructuredText renderer

Sandbox

Scatter

Scatter Layout

Screen Manager

ScrollView

SelectableView

Settings (翻訳中)

Slider

Spinner

Splitter

Stack Layout

Stencil View

Switch

TabbedPanel

Text Input

Toggle button

Tree View

Video

Video player

VKeyboard

Widget class

Utils

Vector

Weak Method

Weak Proxy

Table Of Contents

Scatter

Usage

Control Interactions

Automatic Bring to Front

Scale Limitation

Behavior

Scatter¶

Scatter is used to build interactive widgets that can be translated,
rotated and scaled with two or more fingers on a multitouch system.

Scatter has its own matrix transformation: the modelview matrix is changed
before the children are drawn and the previous matrix is restored when the
drawing is finished. That makes it possible to perform rotation, scaling and
translation over the entire children tree without changing any widget
properties. That specific behavior makes the scatter unique, but there are some
advantages / constraints that you should consider:

The children are positioned relative to the scatter similarly to a
RelativeLayout. So when dragging the
scatter, the position of the children don’t change, only the position of
the scatter does.

The scatter size has no impact on the size of it’s children.

If you want to resize the scatter, use scale, not size (read #2). Scale
transforms both the scatter and its children, but does not change size.

The scatter is not a layout. You must manage the size of the children
yourself.

For touch events, the scatter converts from the parent matrix to the scatter
matrix automatically in on_touch_down/move/up events. If you are doing things
manually, you will need to use to_parent() and
to_local().

Usage¶

By default, the Scatter does not have a graphical representation: it is a
container only. The idea is to combine the Scatter with another widget, for
example an Image:

scatter = Scatter()
image = Image(source='sun.jpg')
scatter.add_widget(image)

Control Interactions¶

By default, all interactions are enabled. You can selectively disable
them using the do_rotation, do_translation and do_scale properties.

Disable rotation:

scatter = Scatter(do_rotation=False)

Allow only translation:

scatter = Scatter(do_rotation=False, do_scale=False)

Allow only translation on x axis:

scatter = Scatter(do_rotation=False, do_scale=False,
                  do_translation_y=False)

Automatic Bring to Front¶

If the Scatter.auto_bring_to_front property is True, the scatter
widget will be removed and re-added to the parent when it is touched
(brought to front, above all other widgets in the parent). This is useful
when you are manipulating several scatter widgets and don’t want the active
one to be partially hidden.

Scale Limitation¶

We are using a 32-bit matrix in double representation. That means we have
a limit for scaling. You cannot do infinite scaling down/up with our
implementation. Generally, you don’t hit the minimum scale (because you don’t
see it on the screen), but the maximum scale is 9.99506983235e+19 (2^66).

You can also limit the minimum and maximum scale allowed:

scatter = Scatter(scale_min=.5, scale_max=3.)

Behavior¶

バージョン 1.1.0 で変更: If no control interactions are enabled, then the touch handler will never
return True.

class kivy.uix.scatter.Scatter(**kwargs)[ソース]¶

ベースクラス: kivy.uix.widget.Widget

Scatter class. See module documentation for more information.

<col class="field-name" />
<col class="field-body" />

Events:

on_transform_with_touch:

Fired when the scatter has been transformed by user touch
or multitouch, such as panning or zooming.

on_bring_to_front:

Fired when the scatter is brought to the front.

バージョン 1.9.0 で変更: Event on_bring_to_front added.

バージョン 1.8.0 で変更: Event on_transform_with_touch added.

apply_transform(trans, post_multiply=False, anchor=(0, 0))[ソース]¶

Transforms the scatter by applying the “trans” transformation
matrix (on top of its current transformation state). The resultant
matrix can be found in the transform property.

<col class="field-name" />
<col class="field-body" />

Parameters:

trans: Matrix.

Transformation matix to be applied to the scatter widget.

anchor: tuple, defaults to (0, 0).

The point to use as the origin of the transformation
(uses local widget space).

post_multiply: bool, defaults to False.

If True, the transform matrix is post multiplied
(as if applied before the current transform).

Usage example:

from kivy.graphics.transformation import Matrix
mat = Matrix().scale(3, 3, 3)
scatter_instance.apply_transform(mat)

auto_bring_to_front¶

If True, the widget will be automatically pushed on the top of parent
widget list for drawing.

auto_bring_to_front is a BooleanProperty
and defaults to True.

bbox¶

Bounding box of the widget in parent space:

((x, y), (w, h))
# x, y = lower left corner

bbox is an AliasProperty.

do_collide_after_children¶

If True, the collision detection for limiting the touch inside the
scatter will be done after dispaching the touch to the children.
You can put children outside the bounding box of the scatter and still be
able to touch them.

バージョン 1.3.0 で追加.

do_rotation¶

Allow rotation.

do_rotation is a BooleanProperty and
defaults to True.

do_scale¶

Allow scaling.

do_scale is a BooleanProperty and
defaults to True.

do_translation¶

Allow translation on the X or Y axis.

do_translation is an AliasProperty of
(do_translation_x + do_translation_y)

do_translation_x¶

Allow translation on the X axis.

do_translation_x is a BooleanProperty and
defaults to True.

do_translation_y¶

Allow translation on Y axis.

do_translation_y is a BooleanProperty and
defaults to True.

on_bring_to_front(touch)[ソース]¶

Called when a touch event causes the scatter to be brought to the
front of the parent (only if auto_bring_to_front is True)

<col class="field-name" />
<col class="field-body" />

Parameters:

touch:

The touch object which brought the scatter to front.

バージョン 1.9.0 で追加.

on_transform_with_touch(touch)[ソース]¶

Called when a touch event has transformed the scatter widget.
By default this does nothing, but can be overriden by derived
classes that need to react to transformations caused by user
input.

<col class="field-name" />
<col class="field-body" />

Parameters:

touch:

The touch object which triggered the transformation.

バージョン 1.8.0 で追加.

rotation¶

Rotation value of the scatter.

rotation is an AliasProperty and defaults
to 0.0.

scale¶

Scale value of the scatter.

scale is an AliasProperty and defaults to
1.0.

scale_max¶

Maximum scaling factor allowed.

scale_max is a NumericProperty and
defaults to 1e20.

scale_min¶

Minimum scaling factor allowed.

scale_min is a NumericProperty and
defaults to 0.01.

transform¶

Transformation matrix.

transform is an ObjectProperty and
defaults to the identity matrix.

注釈

This matrix reflects the current state of the transformation matrix
but setting it directly will erase previously applied
transformations. To apply a transformation considering context,
please use the apply_transform method.

transform_inv¶

Inverse of the transformation matrix.

transform_inv is an ObjectProperty and
defaults to the identity matrix.

translation_touches¶

Determine whether translation was triggered by a single or multiple
touches. This only has effect when do_translation = True.

translation_touches is a NumericProperty
and defaults to 1.

バージョン 1.7.0 で追加.

class kivy.uix.scatter.ScatterPlane(**kwargs)[ソース]¶

ベースクラス: kivy.uix.scatter.Scatter

This is essentially an unbounded Scatter widget. It’s a convenience
class to make it easier to handle infinite planes.

                  « Sandbox

                  Scatter Layout »


text:
' //css_reference "System.dll";
' //css_reference "System.Windows.Forms.dll";
Imports System
Imports System.Windows.Forms

Module Module1
    Sub Main()
        Console.WriteLine("Hello World! (VB)")
        MessageBox.Show("Hello World! (VB)")
    End Sub
End Module


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Xanthoparmelia adleri T.H. Nash, Elix & J. Johnst.

### Remarks
null


text:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _24hGame.Graphics
{
    class SimpleAnimation
    {
        Animation animation;
        int spriteWidth;
        public SimpleAnimation(Texture2D spriteSheet, int spriteWidth)
        {
            animation = new Animation(spriteSheet);
            this.spriteWidth = spriteWidth;
            CurrentFrame = 0;
        }

        public float CurrentFrame
        {
            get;
            set;
        }

        public int FrameCount
        {
            get
            {
                return animation.Texture.Width / spriteWidth;
            }
        }

        public bool FirstFrame
        {
            get
            {
                return ((int)CurrentFrame) == 0;
            }
        }

        public bool LastFrame
        {
            get
            {
                return ((int)CurrentFrame) == FrameCount;
            }
        }

        public void Draw(Vector2 location)
        {
            animation.Draw(location, spriteWidth, animation.Texture.Height, spriteWidth * ((int)CurrentFrame % (animation.Texture.Width / spriteWidth)), 0);
        }

        public void Draw(Vector2 location, float radians)
        {
            animation.Draw(location, spriteWidth, animation.Texture.Height, spriteWidth * ((int)CurrentFrame % (animation.Texture.Width / spriteWidth)), 0, radians);
        }

    }
}


text:
ActiveRecord::Schema.define(version: 20160529033405) do

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"

  create_table "pull_requests", force: :cascade do |t|
    t.integer  "number"
    t.integer  "queued_by_id"
    t.string   "state"
    t.string   "against"
    t.datetime "created_at",                    null: false
    t.datetime "updated_at",                    null: false
    t.datetime "last_merge_try_at"
    t.integer  "merge_try_count",   default: 0
    t.datetime "last_sync_at"
  end

  add_index "pull_requests", ["number"], name: "index_pull_requests_on_number", using: :btree
  add_index "pull_requests", ["queued_by_id"], name: "index_pull_requests_on_queued_by_id", using: :btree
  add_index "pull_requests", ["state"], name: "index_pull_requests_on_state", using: :btree

  create_table "users", force: :cascade do |t|
    t.string   "email",                  default: "", null: false
    t.string   "encrypted_password",     default: "", null: false
    t.string   "reset_password_token"
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer  "sign_in_count",          default: 0,  null: false
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string   "current_sign_in_ip"
    t.string   "last_sign_in_ip"
    t.datetime "created_at",                          null: false
    t.datetime "updated_at",                          null: false
    t.string   "provider"
    t.string   "uid"
  end

  add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
  add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree

end


text:
package hudson.plugins.perforce;

import java.io.IOException;
import java.io.PipedOutputStream;

import hudson.Proc;
import hudson.remoting.FastPipedOutputStream;

/**
 * Extended class of PipedOutputStream, used specifically for passing into
 * hudson launcher.launch() calls.  The extra closeOnProcess method is
 * required as launcher.launch() does NOT close its output stream, which will
 * cause a deadlock if using read calls (that block) to read data.
 *

 * The Hudson method in question that doesn't close it's output stream is
 * StreamCopyThread.class.
 *

 * User contract: After calling launcher.launch(), pass its process into
 * closeOnProcess().
 *

 * Example:
 * HudsonPipedOutputStream hudsonOut = new HudsonPipedOutputStream();
 * Proc process = hudsonLauncher.launch(cmd,env,hudsonOut,filePath);
 * hudsonOut.closeOnProcess(process);
 *
 * @author Victor Szoltysek
 */
public class HudsonPipedOutputStream extends FastPipedOutputStream {

	// Close stream, when hudson process finishes.
	public void closeOnProcess(final Proc process) {
                final HudsonPipedOutputStream stream = this;
		Runnable runnable = new Runnable() {
			public void run() {
				try {
					process.join();
                                        stream.flush();
				} catch(IOException e) {
					// Do nothing
				} catch(InterruptedException e) {
					// Do nothing
				}
				finally {
					try {
						close();
					} catch(IOException e) {
						// Do nothing
					}
				}
			}
		};

		new Thread(runnable).start();
	}

}


text:
package org.apache.activemq.artemis.jms.tests.tools.container;

import javax.naming.InitialContext;
import java.rmi.Remote;
import java.util.HashMap;
import java.util.List;
import java.util.Set;

import org.apache.activemq.artemis.api.jms.JMSFactoryType;
import org.apache.activemq.artemis.core.security.Role;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.jms.server.JMSServerManager;

/**
 * The remote interface exposed by TestServer.
 */
public interface Server extends Remote {

   int getServerID() throws Exception;

   /**
    * @param attrOverrides - server attribute overrides that will take precedence over values
    *                      read from configuration files.
    */
   void start(HashMap<String, Object> configuration, boolean clearDatabase) throws Exception;

   /**
    * @return true if the server was stopped indeed, or false if the server was stopped already
    * when the method was invoked.
    */
   boolean stop() throws Exception;

   /**
    * For a remote server, it "abruptly" kills the VM running the server. For a local server
    * it just stops the server.
    */
   void kill() throws Exception;

   /**
    * When kill is called you are actually scheduling the server to be killed in few milliseconds.
    * There are certain cases where we need to assure the server was really killed.
    * For that we have this simple ping we can use to verify if the server still alive or not.
    */
   void ping() throws Exception;

   /**
    */
   void startServerPeer() throws Exception;

   void stopServerPeer() throws Exception;

   boolean isStarted() throws Exception;

   /**
    * Only for in-VM use!
    */
   // MessageStore getMessageStore() throws Exception;

   /**
    * Only for in-VM use!
    */
   // DestinationManager getDestinationManager() throws Exception;
   // StorageManager getPersistenceManager() throws Exception;
   //
   // /**
   // * Only for in-VM use
   // */
   ActiveMQServer getServerPeer() throws Exception;

   void createQueue(String name, String jndiName) throws Exception;

   void destroyQueue(String name, String jndiName) throws Exception;

   void createTopic(String name, String jndiName) throws Exception;

   void destroyTopic(String name, String jndiName) throws Exception;

   // /**
   // * Simulates a topic deployment (copying the topic descriptor in the deploy directory).
   // */
   // void deployTopic(String name, String jndiName, boolean manageConfirmations) throws Exception;
   //
   // /**
   // * Simulates a topic deployment (copying the topic descriptor in the deploy directory).
   // */
   // void deployTopic(String name, String jndiName, int fullSize, int pageSize,
   // int downCacheSize, boolean manageConfirmations) throws Exception;
   //
   // /**
   // * Creates a topic programmatically.
   // */
   // void deployTopicProgrammatically(String name, String jndiName) throws Exception;
   //
   // /**
   // * Simulates a queue deployment (copying the queue descriptor in the deploy directory).
   // */
   // void deployQueue(String name, String jndiName, boolean manageConfirmations) throws Exception;
   //
   // /**
   // * Simulates a queue deployment (copying the queue descriptor in the deploy directory).
   // */
   // void deployQueue(String name, String jndiName, int fullSize, int pageSize,
   // int downCacheSize, boolean manageConfirmations) throws Exception;
   //
   // /**
   // * Creates a queue programmatically.
   // */
   // void deployQueueProgrammatically(String name, String jndiName) throws Exception;

   /**
    * Simulates a destination un-deployment (deleting the destination descriptor from the deploy
    * directory).
    */
   // void undeployDestination(boolean isQueue, String name) throws Exception;

   /**
    * Destroys a programmatically created destination.
    */
   // boolean undeployDestinationProgrammatically(boolean isQueue, String name) throws Exception;
   void deployConnectionFactory(String clientId,
                                JMSFactoryType type,
                                String objectName,
                                int prefetchSize,
                                int defaultTempQueueFullSize,
                                int defaultTempQueuePageSize,
                                int defaultTempQueueDownCacheSize,
                                boolean supportsFailover,
                                boolean supportsLoadBalancing,
                                int dupsOkBatchSize,
                                boolean blockOnAcknowledge,
                                String... jndiBindings) throws Exception;

   void deployConnectionFactory(String objectName,
                                int prefetchSize,
                                int defaultTempQueueFullSize,
                                int defaultTempQueuePageSize,
                                int defaultTempQueueDownCacheSize,
                                String... jndiBindings) throws Exception;

   void deployConnectionFactory(String objectName,
                                boolean supportsFailover,
                                boolean supportsLoadBalancing,
                                String... jndiBindings) throws Exception;

   void deployConnectionFactory(String clientID, String objectName, String... jndiBindings) throws Exception;

   void deployConnectionFactory(String objectName, int prefetchSize, String... jndiBindings) throws Exception;

   void deployConnectionFactory(String objectName, String... jndiBindings) throws Exception;

   void deployConnectionFactory(String objectName, JMSFactoryType type, String... jndiBindings) throws Exception;

   void undeployConnectionFactory(String objectName) throws Exception;

   void configureSecurityForDestination(String destName, boolean isQueue, Set<Role> roles) throws Exception;

   ActiveMQServer getActiveMQServer() throws Exception;

   InitialContext getInitialContext() throws Exception;

   void removeAllMessages(String destination) throws Exception;

   Long getMessageCountForQueue(String queueName) throws Exception;

   List<String> listAllSubscribersForTopic(String s) throws Exception;

   Set<Role> getSecurityConfig() throws Exception;

   void setSecurityConfig(Set<Role> defConfig) throws Exception;

   // void setSecurityConfigOnManager(boolean b, String s, Set<Role> lockedConf) throws Exception;

   // void setDefaultRedeliveryDelay(long delay) throws Exception;
   JMSServerManager getJMSServerManager() throws Exception;
}


text:
package com.rs.game.npc.kalph;

import com.rs.game.Animation;
import com.rs.game.Entity;
import com.rs.game.Graphics;
import com.rs.game.WorldTile;
import com.rs.game.npc.NPC;
import com.rs.game.npc.combat.NPCCombatDefinitions;
import com.rs.game.tasks.WorldTask;
import com.rs.game.tasks.WorldTasksManager;

@SuppressWarnings("serial")
public class KalphiteQueen extends NPC {

	public KalphiteQueen(int id, WorldTile tile, int mapAreaNameHash,
			boolean canBeAttackFromOutOfArea, boolean spawned) {
		super(id, tile, mapAreaNameHash, canBeAttackFromOutOfArea, spawned);
		setLureDelay(0);
		setForceAgressive(true);
	}

	@Override
	public void sendDeath(Entity source) {
		final NPCCombatDefinitions defs = getCombatDefinitions();
		resetWalkSteps();
		getCombat().removeTarget();
		setNextAnimation(null);
		WorldTasksManager.schedule(new WorldTask() {
			int loop;

			@Override
			public void run() {
				if (loop == 0) {
					setNextAnimation(new Animation(defs.getDeathEmote()));
				} else if (loop >= defs.getDeathDelay()) {
					if(getId() == 1158) {
						setCantInteract(true);
						transformIntoNPC(1160);
						setNextGraphics(new Graphics(1055));
						setNextAnimation(new Animation(6270));
						WorldTasksManager.schedule(new WorldTask() {

							@Override
							public void run() {
								reset();
								setCantInteract(false);
							}

						}, 5);
					}else{
						drop();
						reset();
						setLocation(getRespawnTile());
						finish();
						if (!isSpawned())
							setRespawnTask();
						transformIntoNPC(1158);
					}
					stop();
				}
				loop++;
			}
		}, 0, 1);
	}

}


text: © 2016 Cisco and/or its affiliates. All Rights Reserved.


text:
Tors-Hammer
===========

Tors Hammer A DDos Tool Made In Python


text:
package storage

import (
	"testing"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/fields"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apiserver/pkg/registry/generic"
	genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing"
	etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing"
	"k8s.io/kubernetes/pkg/api/legacyscheme"
	"k8s.io/kubernetes/pkg/apis/apps"
	api "k8s.io/kubernetes/pkg/apis/core"
	"k8s.io/kubernetes/pkg/registry/registrytest"
)

func TestCreate(t *testing.T) {
	storage, server := newStorage(t)
	defer server.Terminate(t)
	defer storage.Store.DestroyFunc()
	test := genericregistrytest.New(t, storage.Store, legacyscheme.Scheme)
	var (
		valid       = stripObjectMeta(newControllerRevision("validname", metav1.NamespaceDefault, newObject(), 0))
		badRevision = stripObjectMeta(newControllerRevision("validname", "validns", newObject(), -1))
		emptyName   = stripObjectMeta(newControllerRevision("", "validns", newObject(), 0))
		invalidName = stripObjectMeta(newControllerRevision("NoUppercaseOrSpecialCharsLike=Equals", "validns", newObject(), 0))
		emptyNs     = stripObjectMeta(newControllerRevision("validname", "", newObject(), 100))
		invalidNs   = stripObjectMeta(newControllerRevision("validname", "NoUppercaseOrSpecialCharsLike=Equals", newObject(), 100))
		nilData     = stripObjectMeta(newControllerRevision("validname", "validns", nil, 0))
	)
	test.TestCreate(
		valid,
		badRevision,
		emptyName,
		invalidName,
		emptyNs,
		invalidNs,
		nilData)
}

func TestUpdate(t *testing.T) {
	storage, server := newStorage(t)
	defer server.Terminate(t)
	defer storage.Store.DestroyFunc()
	test := genericregistrytest.New(t, storage.Store, legacyscheme.Scheme)

	addLabel := func(obj runtime.Object) runtime.Object {
		rev := obj.(*apps.ControllerRevision)
		update := &apps.ControllerRevision{
			ObjectMeta: rev.ObjectMeta,
			Data:       rev.Data,
			Revision:   rev.Revision,
		}
		update.ObjectMeta.Labels = map[string]string{"foo": "bar"}
		return update
	}

	updateData := func(obj runtime.Object) runtime.Object {
		rev := obj.(*apps.ControllerRevision)
		modified := newObject()
		ss := modified.(*apps.StatefulSet)
		ss.Name = "cde"
		update := &apps.ControllerRevision{
			ObjectMeta: rev.ObjectMeta,
			Data:       ss,
			Revision:   rev.Revision + 1,
		}
		return update
	}

	test.TestUpdate(stripObjectMeta(newControllerRevision("validname", metav1.NamespaceDefault, newObject(), 0)),
		addLabel,
		updateData)
}

func TestGet(t *testing.T) {
	storage, server := newStorage(t)
	defer server.Terminate(t)
	defer storage.Store.DestroyFunc()
	test := genericregistrytest.New(t, storage.Store, legacyscheme.Scheme)
	test.TestGet(newControllerRevision("valid", metav1.NamespaceDefault, newObject(), 0))
}

func TestList(t *testing.T) {
	storage, server := newStorage(t)
	defer server.Terminate(t)
	defer storage.Store.DestroyFunc()
	test := genericregistrytest.New(t, storage.Store, legacyscheme.Scheme)
	test.TestList(newControllerRevision("valid", metav1.NamespaceDefault, newObject(), 0))
}

func TestDelete(t *testing.T) {
	storage, server := newStorage(t)
	defer server.Terminate(t)
	defer storage.Store.DestroyFunc()
	test := genericregistrytest.New(t, storage.Store, legacyscheme.Scheme)
	test.TestDelete(newControllerRevision("valid", metav1.NamespaceDefault, newObject(), 0))
}

func TestWatch(t *testing.T) {
	storage, server := newStorage(t)
	defer server.Terminate(t)
	defer storage.Store.DestroyFunc()
	test := genericregistrytest.New(t, storage.Store, legacyscheme.Scheme)
	test.TestWatch(
		newControllerRevision("valid", metav1.NamespaceDefault, newObject(), 0),
		[]labels.Set{
			{"foo": "bar"},
		},
		[]labels.Set{
			{"hoo": "baz"},
		},
		[]fields.Set{
			{"metadata.name": "valid"},
		},
		[]fields.Set{
			{"metadata.name": "nomatch"},
		},
	)
}

func newControllerRevision(name, namespace string, data runtime.Object, revision int64) *apps.ControllerRevision {
	return &apps.ControllerRevision{
		ObjectMeta: metav1.ObjectMeta{
			Name:      name,
			Namespace: namespace,
			Labels:    map[string]string{"foo": "bar"},
		},
		Data:     data,
		Revision: revision,
	}
}

func stripObjectMeta(revision *apps.ControllerRevision) *apps.ControllerRevision {
	revision.ObjectMeta = metav1.ObjectMeta{}
	return revision
}

func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
	etcdStorage, server := registrytest.NewEtcdStorage(t, apps.GroupName)
	restOptions := generic.RESTOptions{
		StorageConfig:           etcdStorage,
		Decorator:               generic.UndecoratedStorage,
		DeleteCollectionWorkers: 1,
		ResourcePrefix:          "controllerrevisions"}
	storage := NewREST(restOptions)
	return storage, server
}

func newObject() runtime.Object {
	return &apps.StatefulSet{
		ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault},
		Spec: apps.StatefulSetSpec{
			Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}},
			Template: api.PodTemplateSpec{
				Spec: api.PodSpec{
					RestartPolicy: api.RestartPolicyAlways,
					DNSPolicy:     api.DNSClusterFirst,
				},
				ObjectMeta: metav1.ObjectMeta{
					Labels: map[string]string{"foo": "bar"},
				},
			},
		},
	}
}


text:
package io.picopalette.apps.event_me.Activities;

import android.content.Intent;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import com.firebase.ui.database.FirebaseRecyclerAdapter;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import io.picopalette.apps.event_me.Adapters.PersonalListEditViewHolder;
import io.picopalette.apps.event_me.Models.ListItem;
import io.picopalette.apps.event_me.R;
import io.picopalette.apps.event_me.Utils.Constants;
import io.picopalette.apps.event_me.Utils.Utilities;

public class ListCreationActivity extends AppCompatActivity {

    EditText mListItem;
    FloatingActionButton mAddFAB;
    TextView mTitle;
    RecyclerView mRecyclerView;
    private DatabaseReference mListReference;
    private String title;
    private String type;
    private FirebaseRecyclerAdapter editAdapter;
    public static final String mListTitle = "List Title";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_list_creation);

        mRecyclerView = (RecyclerView) findViewById(R.id.list_creation_RecyclerView);
        mListItem = (EditText) findViewById(R.id.listEditText);
        mAddFAB = (FloatingActionButton) findViewById(R.id.addFAB);
        mTitle = (TextView) findViewById(R.id.titleTextView);

        Intent intent = getIntent();
        title = intent.getStringExtra(mListTitle);
        type = intent.getStringExtra("type");

        if(type.matches("personal")) {
            mListReference = FirebaseDatabase.getInstance().getReference().child(Constants.users).child(Utilities.encodeEmail(FirebaseAuth.getInstance().getCurrentUser().getEmail())).child(Constants.lists).child(title);
            mTitle.setText(title);
        } else {
            mListReference = FirebaseDatabase.getInstance().getReference().child(Constants.events).child(title).child(Constants.lists);
            FirebaseDatabase.getInstance().getReference().child(Constants.events).child(title).child("name").addListenerForSingleValueEvent(new ValueEventListener() {
                @Override
                public void onDataChange(DataSnapshot dataSnapshot) {
                    mTitle.setText(dataSnapshot.getValue().toString());
                }

                @Override
                public void onCancelled(DatabaseError databaseError) {
                    mTitle.setText(title);
                }
            });
        }

        mAddFAB.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if(mListItem.getText().toString().equals(""))
                {
                    Toast.makeText(getApplicationContext(),"No input given to ADD", Toast.LENGTH_LONG).show();
                }
                else
                {
                    String newItemString = mListItem.getText().toString();
                    String itemId = mListReference.push().getKey();
                    ListItem newItem = new ListItem(itemId, newItemString, false);
                    mListReference.child(itemId).setValue(newItem);
                    mListItem.setText("");
                }
            }
        });
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
        editAdapter = new FirebaseRecyclerAdapter<ListItem, PersonalListEditViewHolder>(ListItem.class, R.layout.list_item_edit, PersonalListEditViewHolder.class, mListReference) {

            @Override
            protected void populateViewHolder(PersonalListEditViewHolder viewHolder, final ListItem model, int position) {
                viewHolder.listTextView.setText(model.getItemName());
                viewHolder.listDeleteButton.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        mListReference.child(model.getId()).removeValue();
                    }
                });
            }
        };
        mRecyclerView.setAdapter(editAdapter);

    }
//
//    private void getDataTask() {
//        mListReference.child(title).keepSynced(true);
//        mListReference.child(title).addValueEventListener(
//                new ValueEventListener() {
//            @Override
//            public void onDataChange(DataSnapshot dataSnapshot) {
//                for(DataSnapshot listSnapshot : dataSnapshot.getChildren()) {
//                    ListItem listItem = listSnapshot.getValue(ListItem.class);
//                    if(!editAdapter.list_item_edit.contains(listItem)) {
//                        editAdapter.list_item_edit.add(listItem);
//                        editAdapter.notifyDataSetChanged();
//                    }
//                }
//            }
//
//            @Override
//            public void onCancelled(DatabaseError databaseError) {
//
//            }
//        });
//    }

}