text:
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview A dimension picker control.  A dimension picker allows the
 * user to visually select a row and column count.
 *
 * @author robbyw@google.com (Robby Walker)
 * @author abefettig@google.com (Abe Fettig)
 * @see ../demos/dimensionpicker.html
 * @see ../demos/dimensionpicker_rtl.html
 */

goog.provide('goog.ui.DimensionPicker');

goog.require('goog.events.EventType');
goog.require('goog.math.Size');
goog.require('goog.ui.Control');
goog.require('goog.ui.DimensionPickerRenderer');
goog.require('goog.ui.registry');

/**
 * A dimension picker allows the user to visually select a row and column
 * count using their mouse and keyboard.
 *
 * The currently selected dimension is controlled by an ACTION event.  Event
 * listeners may retrieve the selected item using the
 * {@link #getValue} method.
 *
 * @param {goog.ui.DimensionPickerRenderer=} opt_renderer Renderer used to
 *     render or decorate the palette; defaults to
 *     {@link goog.ui.DimensionPickerRenderer}.
 * @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for
 *     document interaction.
 * @constructor
 * @extends {goog.ui.Control}
 */
goog.ui.DimensionPicker = function(opt_renderer, opt_domHelper) {
 goog.ui.Control.call(this, null,
      opt_renderer || goog.ui.DimensionPickerRenderer.getInstance(),
      opt_domHelper);

  this.size_ = new goog.math.Size(this.minColumns, this.minRows);
};
goog.inherits(goog.ui.DimensionPicker, goog.ui.Control);

/**
 * Minimum number of columns to show in the grid.
 * @type {number}
 */
goog.ui.DimensionPicker.prototype.minColumns = 5;

/**
 * Minimum number of rows to show in the grid.
 * @type {number}
 */
goog.ui.DimensionPicker.prototype.minRows = 5;

/**
 * Maximum number of columns to show in the grid.
 * @type {number}
 */
goog.ui.DimensionPicker.prototype.maxColumns = 20;

/**
 * Maximum number of rows to show in the grid.
 * @type {number}
 */
goog.ui.DimensionPicker.prototype.maxRows = 20;

/**
 * Palette dimensions (columns x rows).
 * @type {goog.math.Size}
 * @private
 */
goog.ui.DimensionPicker.prototype.size_;

/**
 * Currently highlighted row count.
 * @type {number}
 * @private
 */
goog.ui.DimensionPicker.prototype.highlightedRows_ = 0;

/**
 * Currently highlighted column count.
 * @type {number}
 * @private
 */
goog.ui.DimensionPicker.prototype.highlightedColumns_ = 0;

/** @inheritDoc */
goog.ui.DimensionPicker.prototype.enterDocument = function() {
  goog.ui.DimensionPicker.superClass_.enterDocument.call(this);

  var handler = this.getHandler();
  handler.
      listen(this.getRenderer().getMouseMoveElement(this),
          goog.events.EventType.MOUSEMOVE, this.handleMouseMove).
      listen(this.getDomHelper().getWindow(), goog.events.EventType.RESIZE,
          this.handleWindowResize);

  var parent = this.getParent();
  if (parent) {
    handler.listen(parent, goog.ui.Component.EventType.SHOW, this.handleShow_);
  }
};

/** @inheritDoc */
goog.ui.DimensionPicker.prototype.exitDocument = function() {
  goog.ui.DimensionPicker.superClass_.exitDocument.call(this);

  var handler = this.getHandler();
  handler.
      unlisten(this.getRenderer().getMouseMoveElement(this),
          goog.events.EventType.MOUSEMOVE, this.handleMouseMove).
      unlisten(this.getDomHelper().getWindow(), goog.events.EventType.RESIZE,
          this.handleWindowResize);

  var parent = this.getParent();
  if (parent) {
    handler.unlisten(parent, goog.ui.Component.EventType.SHOW,
        this.handleShow_);
  }
};

/**
 * Resets the highlighted size when the picker is shown.
 * @private
 */
goog.ui.DimensionPicker.prototype.handleShow_ = function() {
  if (this.isVisible()) {
    this.setValue(0, 0);
  }
};

/** @inheritDoc */
goog.ui.DimensionPicker.prototype.disposeInternal = function() {
  goog.ui.DimensionPicker.superClass_.disposeInternal.call(this);
  delete this.size_;
};

// Palette event handling.

/**
 * Handles mousemove events.  Determines which palette size was moused over and
 * highlights it.
 * @param {goog.events.BrowserEvent} e Mouse event to handle.
 * @protected
 */
goog.ui.DimensionPicker.prototype.handleMouseMove = function(e) {
  var highlightedSizeX = this.getRenderer().getGridOffsetX(this,
      this.isRightToLeft() ? e.target.offsetWidth - e.offsetX : e.offsetX);
  var highlightedSizeY = this.getRenderer().getGridOffsetY(this, e.offsetY);

  if (this.highlightedColumns_ != highlightedSizeX ||
      this.highlightedRows_ != highlightedSizeY) {
    this.setValue(highlightedSizeX, highlightedSizeY);
  }
};

/**
 * Handles window resize events.  Ensures no scrollbars are introduced by the
 * renderer's mouse catcher.
 * @param {goog.events.Event} e Resize event to handle.
 * @protected
 */
goog.ui.DimensionPicker.prototype.handleWindowResize = function(e) {
  this.getRenderer().positionMouseCatcher(this);
};

/**
 * Handle key events if supported, so the user can use the keyboard to
 * manipulate the highlighted rows and columns.
 * @param {goog.events.KeyEvent} e The key event object.
 * @return {boolean} Whether the key event was handled.
 */
goog.ui.DimensionPicker.prototype.handleKeyEvent = function(e) {
  var rows = this.highlightedRows_;
  var columns = this.highlightedColumns_;
  switch (e.keyCode) {
    case goog.events.KeyCodes.DOWN:
      rows = Math.min(this.maxRows, rows + 1);
      break;
    case goog.events.KeyCodes.UP:
      rows = Math.max(1, rows - 1);
      break;
    case goog.events.KeyCodes.LEFT:
      if (columns == 1) {
        // Delegate to parent.
        return false;
      } else {
        columns = Math.max(1, columns - 1);
      }
      break;
    case goog.events.KeyCodes.RIGHT:
      columns = Math.min(this.maxColumns, columns + 1);
      break;
    default:
      return goog.ui.DimensionPicker.superClass_.handleKeyEvent.call(this, e);
  }
  this.setValue(columns, rows);
  return true;
};

// Palette management.

/**
 * @return {goog.math.Size} Current table size shown (columns x rows).
 */
goog.ui.DimensionPicker.prototype.getSize = function() {
  return this.size_;
};

/**
 * @return {goog.math.Size} size The currently highlighted dimensions.
 */
goog.ui.DimensionPicker.prototype.getValue = function() {
  return new goog.math.Size(this.highlightedColumns_, this.highlightedRows_);
};

/**
 * Sets the currently highlighted dimensions.
 * @param {number} columns The number of columns to highlight, or a
 *     goog.math.Size object containing both.
 * @param {number=} opt_rows The number of rows to highlight.  Can be
 *     omitted when columns is a good.math.Size object.
 */
goog.ui.DimensionPicker.prototype.setValue = function(columns,
    opt_rows) {
  if (!goog.isDef(opt_rows)) {
    opt_rows = columns.height;
    columns = columns.width;
  }

  if (this.highlightedColumns_ != columns ||
      this.highlightedRows_ != opt_rows) {
    var renderer = this.getRenderer();
    this.size_.width = Math.max(columns, this.minColumns);
    this.size_.height = Math.max(opt_rows, this.minRows);
    renderer.updateSize(this, this.getElement());

    this.highlightedColumns_ = columns;
    this.highlightedRows_ = opt_rows;
    renderer.setHighlightedSize(this, columns, opt_rows);
  }
};

/**
 * Register this control so it can be created from markup
 */
goog.ui.registry.setDecoratorByClassName(
    goog.ui.DimensionPickerRenderer.CSS_CLASS,
    function() {
      return new goog.ui.DimensionPicker();
    });


text:
title: Caching
---

redpajama_set_name: RedPajamaGithub


text:
                    Dokumente {{vm.userCredentials.fname}} - {{vm.transactionId}}
                    <change-partner partner="vm.partner" vorgangid="vm.vorgangid"></change-partner>

                <form class="document-input" id="uploadForm" action="{{trustSrc(vm.uploadDocUrl)}}" name="uploadForm" enctype="multipart/form-data" method="post">
                    <input type="text" name="Id" ng-value="vm.id" style="visibility: hidden; display: none;">
                    <input type="text" name="redirect" ng-value="vm.redirectUrl" style="visibility: hidden; display: none;">

                    <choose-file-button>
                        <button class="add-document-button" >Dokumente hinzufügen</button>
                        <input required ng-model="vm.file" onchange="angular.element(this).scope().vm.changeFile()" id="file-id" type="file" name="Upload" multiple>

                    </choose-file-button>
                </form>
                <button class="add-document-button" ui-sref="app.briefvorlagen">Briefvorlagen</button>

                        {{document.FileName}}

Dokumente gefunden


text:
package internal

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)

const (
	defaultEndpoint  = "https://api.scaleway.com/domain/v2alpha2"
	uriUpdateRecords = "/dns-zones/%s/records"
	operationSet     = "set"
	operationDelete  = "delete"
	operationAdd     = "add"
)

// APIError represents an error response from the API.
type APIError struct {
	Message string `json:"message"`
}

func (a APIError) Error() string {
	return a.Message
}

// Record represents a DNS record
type Record struct {
	Data     string `json:"data,omitempty"`
	Name     string `json:"name,omitempty"`
	Priority uint32 `json:"priority,omitempty"`
	TTL      uint32 `json:"ttl,omitempty"`
	Type     string `json:"type,omitempty"`
	Comment  string `json:"comment,omitempty"`
}

// RecordChangeAdd represents a list of add operations.
type RecordChangeAdd struct {
	Records []*Record `json:"records,omitempty"`
}

// RecordChangeSet represents a list of set operations.
type RecordChangeSet struct {
	Data    string    `json:"data,omitempty"`
	Name    string    `json:"name,omitempty"`
	TTL     uint32    `json:"ttl,omitempty"`
	Type    string    `json:"type,omitempty"`
	Records []*Record `json:"records,omitempty"`
}

// RecordChangeDelete represents a list of delete operations.
type RecordChangeDelete struct {
	Data string `json:"data,omitempty"`
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

// UpdateDNSZoneRecordsRequest represents a request to update DNS records on the API.
type UpdateDNSZoneRecordsRequest struct {
	DNSZone          string        `json:"dns_zone,omitempty"`
	Changes          []interface{} `json:"changes,omitempty"`
	ReturnAllRecords bool          `json:"return_all_records,omitempty"`
}

// ClientOpts represents options to init client.
type ClientOpts struct {
	BaseURL string
	Token   string
}

// Client represents DNS client.
type Client struct {
	baseURL    string
	token      string
	httpClient *http.Client
}

// NewClient returns a client instance.
func NewClient(opts ClientOpts, httpClient *http.Client) *Client {
	baseURL := defaultEndpoint
	if opts.BaseURL != "" {
		baseURL = opts.BaseURL
	}

	if httpClient == nil {
		httpClient = &http.Client{}
	}

	return &Client{
		token:      opts.Token,
		baseURL:    baseURL,
		httpClient: httpClient,
	}
}

// AddRecord adds Record for given zone.
func (c *Client) AddRecord(zone string, record Record) error {
	changes := map[string]RecordChangeAdd{
		operationAdd: {
			Records: []*Record{&record},
		},
	}

	request := UpdateDNSZoneRecordsRequest{
		DNSZone:          zone,
		Changes:          []interface{}{changes},
		ReturnAllRecords: false,
	}

	uri := fmt.Sprintf(uriUpdateRecords, zone)
	req, err := c.newRequest(http.MethodPatch, uri, request)
	if err != nil {
		return err
	}

	return c.do(req)
}

// SetRecord sets a unique Record for given zone.
func (c *Client) SetRecord(zone string, record Record) error {
	changes := map[string]RecordChangeSet{
		operationSet: {
			Name:    record.Name,
			Type:    record.Type,
			Records: []*Record{&record},
		},
	}

	request := UpdateDNSZoneRecordsRequest{
		DNSZone:          zone,
		Changes:          []interface{}{changes},
		ReturnAllRecords: false,
	}

	uri := fmt.Sprintf(uriUpdateRecords, zone)
	req, err := c.newRequest(http.MethodPatch, uri, request)
	if err != nil {
		return err
	}

	return c.do(req)
}

// DeleteRecord deletes a Record for given zone.
func (c *Client) DeleteRecord(zone string, record Record) error {
	delRecord := map[string]RecordChangeDelete{
		operationDelete: {
			Name: record.Name,
			Type: record.Type,
			Data: record.Data,
		},
	}

	request := UpdateDNSZoneRecordsRequest{
		DNSZone:          zone,
		Changes:          []interface{}{delRecord},
		ReturnAllRecords: false,
	}

	uri := fmt.Sprintf(uriUpdateRecords, zone)
	req, err := c.newRequest(http.MethodPatch, uri, request)
	if err != nil {
		return err
	}

	return c.do(req)
}

func (c *Client) newRequest(method, uri string, body interface{}) (*http.Request, error) {
	buf := new(bytes.Buffer)

	if body != nil {
		err := json.NewEncoder(buf).Encode(body)
		if err != nil {
			return nil, fmt.Errorf("failed to encode request body with error: %w", err)
		}
	}

	req, err := http.NewRequest(method, c.baseURL+uri, buf)
	if err != nil {
		return nil, fmt.Errorf("failed to create new http request with error: %w", err)
	}

	req.Header.Add("X-auth-token", c.token)
	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("Accept", "application/json")

	return req, nil
}

func (c *Client) do(req *http.Request) error {
	resp, err := c.httpClient.Do(req)
	if err != nil {
		return fmt.Errorf("request failed with error: %w", err)
	}

	err = checkResponse(resp)
	if err != nil {
		return err
	}

	return checkResponse(resp)
}

func checkResponse(resp *http.Response) error {
	if resp.StatusCode >= http.StatusBadRequest || resp.StatusCode < http.StatusOK {
		if resp.Body == nil {
			return fmt.Errorf("request failed with status code %d and empty body", resp.StatusCode)
		}

		body, err := ioutil.ReadAll(resp.Body)
		if err != nil {
			return err
		}
		defer resp.Body.Close()

		apiError := APIError{}
		err = json.Unmarshal(body, &apiError)
		if err != nil {
			return fmt.Errorf("request failed with status code %d, response body: %s", resp.StatusCode, string(body))
		}

		return fmt.Errorf("request failed with status code %d: %w", resp.StatusCode, apiError)
	}

	return nil
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="10dp" >

    <CheckBox
        android:id="@+id/searchCheckbox"
        style="@style/PinkCheckbox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="CheckBox" />

</RelativeLayout>


text:
import {
  DataSourceConnection,
  DataSourceId,
  DataSourceNode,
  DataSourcePath,
  EvalQueryOptions,
} from "../DataSource";
import { deserializeTableRepStr, QueryExp } from "../QueryExp";
import { TableInfo, TableRep } from "../TableRep";
import { deserializeError } from "./errorUtils";
import { Result } from "./result";
import { TransportClient } from "./Transport";

export const defaultEvalQueryOptions: EvalQueryOptions = {
  showQueries: false,
};

export interface DbConnEvalQueryRequest {
  queryStr: string; // JSON-encoded QueryExp
  offset: number | null;
  limit: number | null;
  options: EvalQueryOptions;
}

export interface DbConnRowCountRequest {
  queryStr: string; // JSON-encoded QueryExp
  options: EvalQueryOptions;
}

export interface DbConnGetTableInfoRequest {
  tableName: string;
}

export interface DbConnGetChildrenRequest {
  path: DataSourcePath;
}

export interface DbConnGetTableNameRequest {
  path: DataSourcePath;
}

export type EngineReq<T> = { engine: DataSourceId; req: T };

// remote invoke a DataSourceConnection member function, using DataSourceId to
// identify the engine:
async function invokeDbFunction<T>(
  tconn: TransportClient,
  engine: DataSourceId,
  methodName: string,
  req: T
): Promise<Result<any>> {
  const ereq: EngineReq<T> = { engine, req };
  const retStr = await tconn.invoke(
    "DataSourceConnection." + methodName,
    JSON.stringify(ereq)
  );
  // We could be more precise and try to only pass results from evalQuery through
  // this, but should be harmless to use this for everything:
  const ret = deserializeTableRepStr(retStr);
  return ret;
}

class RemoteDataSourceConnection implements DataSourceConnection {
  private tconn: TransportClient;
  readonly sourceId: DataSourceId;

  constructor(tconn: TransportClient, sourceId: DataSourceId) {
    this.tconn = tconn;
    this.sourceId = sourceId;
  }

  async getDisplayName(): Promise<string> {
    return "TODO: remote getDisplayName";
  }

  async evalQuery(
    query: QueryExp,
    offset?: number,
    limit?: number,
    options?: EvalQueryOptions
  ): Promise<TableRep> {
    const req: DbConnEvalQueryRequest = {
      queryStr: JSON.stringify(query),
      offset: offset ? offset : null,
      limit: limit ? limit : null,
      options: options ? options : defaultEvalQueryOptions,
    };
    const ret = await invokeDbFunction(
      this.tconn,
      this.sourceId,
      "evalQuery",
      req
    ).then(decodeResult);
    return ret;
  }

  async rowCount(query: QueryExp, options?: EvalQueryOptions): Promise<number> {
    const req: DbConnRowCountRequest = {
      queryStr: JSON.stringify(query),
      options: options ? options : defaultEvalQueryOptions,
    };
    return invokeDbFunction(this.tconn, this.sourceId, "rowCount", req).then(
      decodeResult
    );
  }

  async getTableInfo(tableName: string): Promise<TableInfo> {
    const req: DbConnGetTableInfoRequest = { tableName };
    return invokeDbFunction(
      this.tconn,
      this.sourceId,
      "getTableInfo",
      req
    ).then(decodeResult);
  }

  async getRootNode(): Promise<DataSourceNode> {
    return invokeDbFunction(this.tconn, this.sourceId, "getRootNode", {}).then(
      decodeResult
    );
  }

  async getChildren(path: DataSourcePath): Promise<DataSourceNode[]> {
    const req: DbConnGetChildrenRequest = { path };
    return invokeDbFunction(this.tconn, this.sourceId, "getChildren", req).then(
      decodeResult
    );
  }

  async getTableName(path: DataSourcePath): Promise<string> {
    const req: DbConnGetTableNameRequest = { path };
    return invokeDbFunction(
      this.tconn,
      this.sourceId,
      "getTableName",
      req
    ).then(decodeResult);
  }
}

/**
 * The ReltabConnection interface is the entry point for client-side access to
 * reltab via some client-specific transport mechanism.
 * The interface provides access to a set of data sources and the ability
 * to obtain a (proxy) DataSourceConnection to those data sources.
 */
export interface ReltabConnection {
  connect(sourceId: DataSourceId): Promise<DataSourceConnection>;

  getDataSources(): Promise<DataSourceId[]>;
}

async function jsonInvoke(
  tconn: TransportClient,
  functionName: string,
  req: any
): Promise<any> {
  const reqStr = JSON.stringify(req);
  const retStr = await tconn.invoke(functionName, reqStr);
  const ret = JSON.parse(retStr);
  return ret;
}

async function decodeResult<T>(res: Result<T>): Promise<T> {
  switch (res.status) {
    case "Ok":
      return res.value;
    case "Err":
      console.log("decodeResult: got error result: ", res);
      const errVal = deserializeError(res.errVal);
      throw errVal;
  }
}

/**
 * Implementation of ReltabConnection interface using lower level
 * TransportClient remote invocation
 */
export class RemoteReltabConnection implements ReltabConnection {
  private tconn: TransportClient;

  constructor(tconn: TransportClient) {
    this.tconn = tconn;
  }

  async connect(sourceId: DataSourceId): Promise<DataSourceConnection> {
    const conn = new RemoteDataSourceConnection(this.tconn, sourceId);
    return conn;
  }

  async getDataSources(): Promise<DataSourceId[]> {
    const ret = (await jsonInvoke(this.tconn, "getDataSources", {}).then(
      decodeResult
    )) as any;
    return ret["dataSourceIds"];
  }
}


text:
..  _Changelog:

Changelog
=============

See `github`_.

.. _github: https://github.com/faircloth-lab/protocols/commits/master


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Attribute (Hibernate JavaDocs)
</TITLE>

<META NAME="date" CONTENT="2013-10-23">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.hibernate.metamodel.domain

Interface Attribute

All Known Subinterfaces:
IndexedPluralAttribute, PluralAttribute, SingularAttribute

All Known Implementing Classes:
AbstractAttributeContainer.IndexedPluralAttributeImpl, AbstractAttributeContainer.PluralAttributeImpl, AbstractAttributeContainer.SingularAttributeImpl

public interface Attribute

Describes an attribute.

Method Summary

 AttributeContainer
getAttributeContainer()

          Retrieve the declaring container for this attribute (entity/component).

 String
getName()

          Retrieve the attribute name.

 boolean
isSingular()

          An attribute can be either:
 singular - castable to SingularAttribute
 plural - castable to PluralAttribute

Method Detail

getName

String getName()

Retrieve the attribute name.

Returns:
The attribute name.

getAttributeContainer

AttributeContainer getAttributeContainer()

Retrieve the declaring container for this attribute (entity/component).

Returns:
The attribute container.

isSingular

boolean isSingular()

An attribute can be either:

singular - castable to SingularAttribute

plural - castable to PluralAttribute

Returns:
True if attribute is singular; false if plural.

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2013 Red Hat, Inc.  All Rights Reserved.


text:
/*
 * @file firebase storage helpers
 */

const FIREBASE_SCRIPT_URL = 'https://cdn.firebase.com/js/client/2.2.1/firebase.js';
const FIREBASE_DATA_URL = 'https://deskmark-demo.firebaseio.com/entries/';

export const FirebasePromise = new Promise((resolve, reject) => {
  const script = Object.assign(document.createElement('script'), {
    src: FIREBASE_SCRIPT_URL,
    charset: 'utf-8',
    onload: () => resolve(window.Firebase),
    onerror: (err) => reject(err),
  });
  document.head.appendChild(script);
});

export function getRef(name) {
  return FirebasePromise.then(
    Firebase => new Firebase(`${FIREBASE_DATA_URL}${name}/`)
  );
}

export function fetch(name) {
  return getRef(name).then(
    ref => new Promise(
      (resolve, reject) => ref.once(
        'value',
        snapshot => resolve(snapshot.val()),
        reject
      )
    )
  );
}

export function save(name, data) {
  return getRef(name).then(
    ref => new Promise(
      (resolve, reject) => ref.set(
        data,
        err => (
          err
          ? reject(err)
          : resolve()
        )
      )
    )
  );
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="app_name">TorchWear</string>
    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>
    <string name="toggle_torch">Toggle Torch</string>

</resources>


text:
namespace predictors {

ResolveHostClientImpl::ResolveHostClientImpl(
    const GURL& url,
    const net::NetworkAnonymizationKey& network_isolation_key,
    ResolveHostCallback callback,
    network::mojom::NetworkContext* network_context)
    : callback_(std::move(callback)) {
  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);

  network::mojom::ResolveHostParametersPtr parameters =
      network::mojom::ResolveHostParameters::New();
  parameters->initial_priority = net::RequestPriority::IDLE;
  parameters->is_speculative = true;
  parameters->purpose =
      network::mojom::ResolveHostParameters::Purpose::kPreconnect;
  resolve_host_start_time_ = base::TimeTicks::Now();
  // Intentionally using a SchemeHostPort. Resolving http:// scheme host will
  // fail when a HTTPS resource record exists due to DNS-based scheme upgrade
  // functionality.
  network_context->ResolveHost(
      network::mojom::HostResolverHost::NewSchemeHostPort(
          url::SchemeHostPort(url)),
      network_isolation_key, std::move(parameters),
      receiver_.BindNewPipeAndPassRemote());
  receiver_.set_disconnect_handler(base::BindOnce(
      &ResolveHostClientImpl::OnConnectionError, base::Unretained(this)));
}

ResolveHostClientImpl::~ResolveHostClientImpl() = default;

void ResolveHostClientImpl::OnComplete(
    int result,
    const net::ResolveErrorInfo& resolve_error_info,
    const absl::optional<net::AddressList>& resolved_addresses,
    const absl::optional<net::HostResolverEndpointResults>&
        endpoint_results_with_metadata) {
  UMA_HISTOGRAM_TIMES("Navigation.Preconnect.ResolveHostLatency",
                      base::TimeTicks::Now() - resolve_host_start_time_);

  auto* task = base::TaskAnnotator::CurrentTaskForThread();
  // As this method is executed as a callback from a Mojo call, it should be
  // executed via RunTask() and thus have a non-delayed PendingTask associated
  // with it.
  DCHECK(task);
  DCHECK(task->delayed_run_time.is_null());

  // The task will have a null |queue_time| if run synchronously (this happens
  // in unit tests, for example).
  base::TimeTicks queue_time =
      !task->queue_time.is_null() ? task->queue_time : base::TimeTicks::Now();
  UMA_HISTOGRAM_TIMES("Navigation.Preconnect.ResolveHostCallbackQueueingTime",
                      base::TimeTicks::Now() - queue_time);

  std::move(callback_).Run(result == net::OK);
}

void ResolveHostClientImpl::OnConnectionError() {
  std::move(callback_).Run(false);
}

}  // namespace predictors


text:
<?php

/**
 * Description of EmployeeProfilePageBuilder
 *
 * @author ben.dokter
 */

require_once('modules/model/service/employee/profile/EmployeeProfileService.class.php');
require_once('modules/interface/builder/tab/EmployeesTabInterfaceBuilder.class.php');
require_once('modules/interface/builder/employee/profile//EmployeeProfileInterfaceBuilder.class.php');
require_once('modules/interface/builder/employee/profile//EmployeeProfilePersonalInterfaceBuilder.class.php');
require_once('modules/interface/builder/employee/profile//EmployeeProfileOrganisationInterfaceBuilder.class.php');
require_once('modules/interface/builder/employee/profile//EmployeeProfileInformationInterfaceBuilder.class.php');
require_once('modules/interface/builder/employee/profile//EmployeeProfileUserInterfaceBuilder.class.php');

class EmployeeProfilePageBuilder
{

    // hier de Profiel pagina opbouwen
    static function getPageHtml($displayWidth,
                                $employeeId,
                                EmployeeInfoValueObject $employeeInfoValueObject,
                                EmployeeProfileCollection $employeeProfileCollection)
    {
        // de onderdelen van de pagina opbouwen
        return
                EmployeeProfileInterfaceBuilder::getEmployeeInfoHeaderHtml(     $displayWidth,
                                                                                $employeeId,
                                                                                $employeeInfoValueObject) .
                (PermissionsService::isViewAllowed(PERMISSION_EMPLOYEE_PROFILE_PERSONAL) ?
                    EmployeeProfilePersonalInterfaceBuilder::getViewHtml(       $displayWidth,
                                                                                $employeeId,
                                                                                $employeeProfileCollection->getPersonalValueObject()) :
                    '') .
                (PermissionsService::isViewAllowed(PERMISSION_EMPLOYEE_PROFILE_ORGANISATION) ?
                    EmployeeProfileOrganisationInterfaceBuilder::getViewHtml(   $displayWidth,
                                                                                $employeeId,
                                                                                $employeeProfileCollection->getOrganisationValueObject()) :
                    '') .
                (APPLICATION_SHOW_JOB_PROFILE_IN_PROFILE && PermissionsService::isViewAllowed(PERMISSION_EMPLOYEE_JOB_PROFILE) ?
                    EmployeeJobProfileInterfaceBuilder::getViewHtml($displayWidth, $employeeId, $employeeProfileCollection->getJobProfileValueObject()) :
                    '') .
                (PermissionsService::isViewAllowed(PERMISSION_EMPLOYEE_PROFILE_INFORMATION) ?
                    EmployeeProfileInformationInterfaceBuilder::getViewHtml(    $displayWidth,
                                                                                $employeeId,
                                                                                $employeeProfileCollection->getInformationValueObject()) :
                    '') .
                (PermissionsService::isViewAllowed(PERMISSION_EMPLOYEE_PROFILE_USER) ?
                    EmployeeProfileUserInterfaceBuilder::getViewHtml(               $displayWidth,
                                                                                $employeeId,
                                                                                $employeeProfileCollection->getUserValueObject()) :
                    '');
    }

    static function getEditPersonalPopupHtml($displayWidth, $contentHeight, $employeeId)
    {
        list($safeFormHandler, $contentHtml) = EmployeeProfilePersonalInterfaceBuilder::getEditHtml($displayWidth, $employeeId);

        // popup
        $title = TXT_UCF('EDIT') . ' ' . TXT_LC('PROFILE') . ': ' . TXT_UCF('PERSONAL');
        $formId = 'edit_profile_personal_form_' . $employeeId;
        return ApplicationInterfaceBuilder::getEditPopupHtml($formId, $safeFormHandler, $title, $contentHtml, $displayWidth, $contentHeight);

    }

    static function getRemovePhotoPopupHtml($displayWidth, $contentHeight, $employeeId)
    {
        list($safeFormHandler, $contentHtml) = EmployeeProfilePersonalInterfaceBuilder::getRemoveHtml($displayWidth, $employeeId);

        // popup
        $title = TXT_UCF('REMOVE_PHOTO_THUMBNAIL');
        $formId = 'remove_profile_photo_form_' . $employeeId;
        return ApplicationInterfaceBuilder::getRemovePopupHtml($formId, $safeFormHandler, $title, $contentHtml, $displayWidth, $contentHeight);

    }

    static function getUploadPhotoPopupHtml($displayWidth, $contentHeight, $employeeId)
    {
        list($safeFormHandler, $contentHtml) = EmployeeProfilePersonalInterfaceBuilder::getUploadHtml($displayWidth, $employeeId);

        // popup
        $title = TXT_UCF('UPLOAD_PHOTO_THUMBNAIL');
        $formId = 'upload_profile_photo_form_' . $employeeId;
        return ApplicationInterfaceBuilder::getEditPopupHtml($formId, $safeFormHandler, $title, $contentHtml, $displayWidth, $contentHeight);

    }

    static function getEditOrganisationPopupHtml($displayWidth, $contentHeight, $employeeId)
    {
        list($safeFormHandler, $contentHtml) = EmployeeProfileOrganisationInterfaceBuilder::getEditHtml($displayWidth, $employeeId);

        // popup
        $title = TXT_UCF('EDIT') . ' ' . TXT_LC('PROFILE') . ': ' . TXT_UCF('ORGANISATION');
        $formId = 'edit_profile_organisation_form_' . $employeeId;
        return ApplicationInterfaceBuilder::getEditPopupHtml($formId, $safeFormHandler, $title, $contentHtml, $displayWidth, $contentHeight);

    }

    static function getEditInformationPopupHtml($displayWidth, $contentHeight, $employeeId)
    {
        list($safeFormHandler, $contentHtml) = EmployeeProfileInformationInterfaceBuilder::getEditHtml($displayWidth, $employeeId);

        // popup
        $title = TXT_UCF('EDIT') . ' ' . TXT_LC('PROFILE') . ': ' . TXT_UCF('ADDITIONAL_INFO');
        $formId = 'edit_profile_information_form_' . $employeeId;
        return ApplicationInterfaceBuilder::getEditPopupHtml($formId, $safeFormHandler, $title, $contentHtml, $displayWidth, $contentHeight);

    }

    static function getAddUserPopupHtml($displayWidth, $contentHeight, $employeeId)
    {
        list($safeFormHandler, $contentHtml) = EmployeeProfileUserInterfaceBuilder::getAddHtml($displayWidth, $employeeId);

        // popup
        $title = TXT_UCF('EDIT') . ' ' . TXT_LC('PROFILE') . ': ' . TXT_UCF('ADD') . ' ' . TXT_UCF('RELATED_USER');
        $formId = 'edit_profile_information_form_' . $employeeId;
        return ApplicationInterfaceBuilder::getEditPopupHtml($formId, $safeFormHandler, $title, $contentHtml, $displayWidth, $contentHeight);

    }

}

?>


text:
a death occurrence from <conceptset-reference params="{conceptSetId: CodesetId, conceptSets: $component.expression.ConceptSets, defaultName: 'Any Death'}"></conceptset-reference>

occurrence start is <date-range-viewer params="Range: OccurrenceStartDate"></date-range-viewer>

death type <cycle-toggle-input-viewer params="{value: DeathTypeExclude, options: $component.options.DomainTypeExcludeOptions}"></cycle-toggle-input-viewer> <concept-list-viewer params="ConceptList: ko.utils.unwrapObservable(DeathType)"></concept-list-viewer>

Death Source Concept is <conceptset-reference params="{conceptSetId: ko.utils.unwrapObservable(DeathSourceConcept), conceptSets: $component.expression.ConceptSets, defaultName: 'UNSPECIFIED!'}"></conceptset-reference>

with age <numeric-range-viewer params="Range: Age"></numeric-range-viewer>

gender is any of: <concept-list-viewer params="ConceptList: ko.utils.unwrapObservable(Gender)"></concept-list-viewer>

		<criteria-group-viewer params="{expression: $component.expression, group: CorrelatedCriteria}"></criteria-group-viewer>


text:
package com.example.keith.leaguemaker;

import android.database.Cursor;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.SimpleCursorAdapter;
import android.widget.Spinner;
import android.widget.Toast;

public class AddResultActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener, View.OnClickListener{

    private View enterButton;
    Spinner team1, team2, leagues;
    Cursor allTeams, allLeagues;

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

        DBManager dbm = new DBManager(this);
        dbm.open();
        allLeagues = dbm.getAllLeagues();

        leagues = (Spinner) findViewById(R.id.pickLeague);
        leagues.setOnItemSelectedListener(this);

        String[] col = new String[]{"leagueName"};
        int[] to = new int[]{android.R.id.text1};

        SimpleCursorAdapter spinData = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, allLeagues, col, to);
        spinData.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        leagues.setAdapter(spinData);

        dbm.close();

        enterButton = findViewById(R.id.insertButton);
        enterButton.setOnClickListener(this);
    }

    public void onItemSelected(AdapterView<?> parent, View v, int position, long id)
    {
        if(parent.getId() == leagues.getId()) {
            Cursor leagueRow = (Cursor) leagues.getSelectedItem();
            String league = leagueRow.getString(leagueRow.getColumnIndex("leagueName"));

            DBManager dbm = new DBManager(this);
            dbm.open();
            //get all teams for the selected league
            allTeams = dbm.getLeagueTeams(league);

            team1 = (Spinner) findViewById(R.id.pickTeam1);
            team1.setOnItemSelectedListener(this);

            team2 = (Spinner) findViewById(R.id.pickTeam2);
            team2.setOnItemSelectedListener(this);

            String[] spinCol = new String[]{"teamName"};
            int[] spinTo = new int[]{android.R.id.text1};

            SimpleCursorAdapter spinData1 = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, allTeams, spinCol, spinTo);
            spinData1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
            team1.setAdapter(spinData1);

            SimpleCursorAdapter spinData2 = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, allTeams, spinCol, spinTo);
            spinData2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
            team2.setAdapter(spinData2);

            dbm.close();
        }
    }

    public void onNothingSelected(AdapterView<?> parent)
    {

    }

    public void onClick(View v)
    {
        if(v.getId() == enterButton.getId())
        {
            String team1name, team2name, league;
            int team1score, team2score;

            Spinner leagueSpinner =(Spinner) findViewById(R.id.pickLeague);
            Cursor leagueRow = (Cursor) leagueSpinner.getSelectedItem();
            league = leagueRow.getString(leagueRow.getColumnIndex("leagueName"));

            Spinner team1Spinner =(Spinner) findViewById(R.id.pickTeam1);
            Cursor team1Row = (Cursor) team1Spinner.getSelectedItem();
            team1name = team1Row.getString(team1Row.getColumnIndex("teamName"));

            EditText team1scoreET = (EditText)findViewById(R.id.team1score);
            team1score = Integer.parseInt(team1scoreET.getText().toString());

            EditText team2scoreET = (EditText)findViewById(R.id.team2score);
            team2score = Integer.parseInt(team2scoreET.getText().toString());

            Spinner team2Spinner =(Spinner) findViewById(R.id.pickTeam2);
            Cursor team2Row = (Cursor) team2Spinner.getSelectedItem();
            team2name = team2Row.getString(team2Row.getColumnIndex("teamName"));

            DBManager dbm = new DBManager(this);
            dbm.open();
            dbm.insertResult(league, team1name, team2name, team1score, team2score);
            dbm.close();

            //confirm to user that result was added
            Toast.makeText(this, team1name + " " + team1score + " - " +
                            team2score + " " + team2name + " added to " + league , (Toast.LENGTH_SHORT)).show();

            //reset the add result form
            team1scoreET.setText("");
            team2scoreET.setText("");
            team1Spinner.setSelection(0);
            team2Spinner.setSelection(0);
        }
    }
}


text:
package parody;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({ FunctionalTests.class, UnitTests.class })
public class AllTests {

}


text:
package com.commonsware.android.http.impl;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import com.commonsware.android.http.AbstractQuestionsFragment;
import com.commonsware.android.http.QuestionStrategy;
import com.commonsware.android.http.model.SOQuestions;
import com.commonsware.android.http.util.StackOverflowInterface;
import retrofit.Callback;
import retrofit.RestAdapter;
import retrofit.RetrofitError;
import retrofit.client.Response;

public class RetrofitQuestionsFragment extends
  AbstractQuestionsFragment {
  @Override
  protected QuestionStrategy buildStrategy() {
    return(new RetrofitQuestionStrategy());
  }

  @Override
  public void onViewCreated(View view,
                            Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    buildStrategy().load(this);
  }

  public static class RetrofitQuestionStrategy implements QuestionStrategy {
    @Override
    public void load(final QuestionsCallback callback) {
      RestAdapter restAdapter=
        new RestAdapter.Builder().setEndpoint("https://api.stackexchange.com")
          .build();
      StackOverflowInterface so=
        restAdapter.create(StackOverflowInterface.class);

      so.questions(new Callback<SOQuestions>() {
        @Override
        public void success(SOQuestions soQuestions,
                            Response response) {
          callback.onLoaded(soQuestions);
        }

        @Override
        public void failure(RetrofitError error) {
          Log.e(getClass().getSimpleName(),
            "Error trying to load questions", error);
        }
      });
    }
  }
}


text:
/// <reference path="clock.ts" />
/// <reference path="renderer.ts" />
/// <reference path="vector_areal.ts" />

/// <reference path="game_object_player.ts" />
/// <reference path="game_object_enemy.ts" />
/// <reference path="game_object_factory.ts" />

/// <reference path="slot_list.ts" />

// Game manages the dynamic objects
//
class Game {
  private renderer: Renderer;
  private clock: Clock;
  private isPaused: boolean;

  private objects: SlotList;

  constructor( renderer: Renderer ) {
    this.renderer = renderer;
    this.clock    = new Clock();
    this.isPaused = false;

    this.objects = new SlotList([
      new GameObjectFactory( renderer, GameObjectApple, 3, 3.0, 0.1 ),
      new GameObjectFactory( renderer, GameObjectEnemy, 3, 10.0, 0.03 ),
      new GameObjectPlayer( renderer, new VectorAreal(0.0, 0.4, 0.06) ),
    ]);
  }

  // Single action frame of the game
  //
  actionFrame = () => {
    var dt = this.clock.tick();

    if( !this.isPaused ) {
      this.render();
      this.animate(dt);
    }
    window.requestAnimationFrame( this.actionFrame );
  }

  // Make a picture
  //
  private render() {
    this.renderer.render();
  }

  // Make things move
  //
  private animate( dt: number ) {
    this.renderer.animate(dt);

    this.objects.each( (obj: GameObject, id:number) => {

      if( !obj.isAlive() )
      {
        obj.remove();
        this.objects.remove(id);
        return;
      }

      obj.animate(dt);

      var pendingObjects: GameObject[] = obj.spawn();
      while( pendingObjects.length ) this.spawn( pendingObjects.pop() );

      if( obj.isPerceptive() ) this.perceive(obj, id);
    });
  }

  // Object perceives the world
  //
  perceive(obj: GameObject, id: number)
  {
    let pos: Vector = obj.getPosition();

    this.objects.each( (objPercept: GameObject, k:number) => {
      if( (id == k) || !objPercept ) return;

      let distance: number =
        Vector.minus( pos, objPercept.getNearestPosition(pos) ).distance();

      if( distance < obj.getPreceiveDistance() ) {
        obj.perceive( objPercept );
      }
    });
  }

  // Spawn a new object
  //
  spawn( obj: GameObject ) {
    this.objects.enlist(obj);
  }
}


text:
package gov.nasa.jpf.jvm.bytecode;

import gov.nasa.jpf.vm.Instruction;
import gov.nasa.jpf.vm.StackFrame;
import gov.nasa.jpf.vm.ThreadInfo;

/**
 * Push int constant
 * ... => ..., <i>
 */
public class ICONST extends Instruction implements JVMInstruction {
  protected int value;

  public ICONST(int value){
    this.value = value;
  }

  @Override
  public Instruction execute (ThreadInfo ti) {
    StackFrame frame = ti.getModifiableTopFrame();

    frame.push(value);

    return getNext(ti);
  }

  public int getValue() {
    return value;
  }

  @Override
  public int getByteCode () {
    assert ((value >= -1) && (value < 6)) : ("illegal iconst value: " + value);

    switch (value) {
    case -1: return 0x2;
    case 0: return 0x3;
    case 1: return 0x4;
    case 2: return 0x5;
    case 3: return 0x6;
    case 4: return 0x7;
    case 5: return 0x8;
    }
    return 0;
  }

  @Override
  public String getMnemonic () {
    String s = "iconst_";

    if (value == -1) {
      return s + "m1";
    } else {
      return s + value;
    }
  }

  @Override
  public void accept(JVMInstructionVisitor insVisitor) {
	  insVisitor.visit(this);
  }
}


text:
bin=`dirname "${BASH_SOURCE-$0}"`
bin=`cd "$bin"; pwd`

DEFAULT_LIBEXEC_DIR="$bin"/../libexec

if [ -n "$HADOOP_HOME" ]; then
  DEFAULT_LIBEXEC_DIR="$HADOOP_HOME"/libexec
fi

HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh

# Start balancer daemon.

"$HADOOP_PREFIX"/sbin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs start balancer $@


text:
<fieldset class="admin__field"
          visible="visible"
          css="_required: required"
          attr="'data-index': index">
    <legend class="admin__field-label" if="showLabel">

    </legend>

        <each args="elems">
            <if args="visible()" if="!$data.additionalForGroup">
                <render args="$parent.fieldTemplate" if="element.input_type != 'checkbox' || element.input_type != 'radio'"/>
                <render args="elementTmpl" if="element.input_type == 'checkbox' || element.input_type == 'radio'"/>
            </if>
        </each>

        <each args="getRegion('insideGroup')" render=""/>

        <each args="elems" if="validateWholeGroup">
            <if args="!$data.additionalForGroup">

            </if>
        </each>

    <each args="getRegion('outsideGroup')" render=""/>
</fieldset>


text:
<?php

namespace Maxim\Module\ForumBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

class Forum {

    protected $id;

    protected $category;

    protected $title;

    protected $description;

    protected $createdBy;

    protected $createdOn;

    protected $updatedBy;

    protected $updatedOn;

    protected $threads;

    protected $lastPost;

    protected $lastPostCreator;

    protected $showOnHome = false;

    protected $sort = 0;

    protected $threadCount = 0;

    protected $postCount = 0;

    public function __construct()
    {
        $this->setCreatedOn(new \DateTime("now"));
    }

    /**
     * @param \Maxim\Module\ForumBundle\Entity\Category $category
     */
    public function setCategory($category)
    {
        $this->category = $category;
    }

    /**
     * @return \Maxim\Module\ForumBundle\Entity\Category
     */
    public function getCategory()
    {
        return $this->category;
    }

    /**
     * @param \Maxim\Module\ForumBundle\Entity\User $createdBy
     */
    public function setCreatedBy($createdBy)
    {
        $this->createdBy = $createdBy;
    }

    /**
     * @return \Maxim\Module\ForumBundle\Entity\User
     */
    public function getCreatedBy()
    {
        return $this->createdBy;
    }

    /**
     * @param \Maxim\Module\ForumBundle\Entity\datetime $createdOn
     */
    public function setCreatedOn($createdOn)
    {
        $this->createdOn = $createdOn;
    }

    /**
     * @return \Maxim\Module\ForumBundle\Entity\datetime
     */
    public function getCreatedOn()
    {
        return $this->createdOn;
    }

    /**
     * @param string $description
     */
    public function setDescription($description)
    {
        $this->description = $description;
    }

    /**
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * @param int $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

    /**
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param string $sort
     */
    public function setSort($sort)
    {
        $this->sort = $sort;
    }

    /**
     * @return string
     */
    public function getSort()
    {
        return $this->sort;
    }

    /**
     * @param string $title
     */
    public function setTitle($title)
    {
        $this->title = $title;
    }

    /**
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * @param \Maxim\Module\ForumBundle\Entity\User $updatedBy
     */
    public function setUpdatedBy($updatedBy)
    {
        $this->updatedBy = $updatedBy;
    }

    /**
     * @return \Maxim\Module\ForumBundle\Entity\User
     */
    public function getUpdatedBy()
    {
        return $this->updatedBy;
    }

    /**
     * @param \Maxim\Module\ForumBundle\Entity\datetime $updatedOn
     */
    public function setUpdatedOn($updatedOn)
    {
        $this->updatedOn = $updatedOn;
    }

    /**
     * @return \Maxim\Module\ForumBundle\Entity\datetime
     */
    public function getUpdatedOn()
    {
        return $this->updatedOn;
    }

    /**
     * @param \Maxim\Module\ForumBundle\Entity\Thread $threads
     */
    public function setThreads($threads)
    {
        $this->threads = $threads;
    }

    /**
     * @return \Maxim\Module\ForumBundle\Entity\Thread
     */
    public function getThreads()
    {
        return $this->threads;
    }

    public function __toString() {
        return $this->category . " > " . $this->title;
    }

    public function getLatestThread() {

        $latest = null;

        foreach($this->threads as $thread)
        {
            if($latest == null) {
                $latest = $thread;
            } else {
                if($latest->getCreatedOn() < $thread->getCreatedOn())
                {
                    $latest = $thread;
                }
            }
        }

        return $latest;
    }

    public function findAmountPosts()
    {
        $amount = 0;
        foreach($this->threads as $thread)
        {
            $amount += count($thread->getPosts());
        }
        return $amount;
    }

    /**
     * @param boolean $showOnHome
     */
    public function setShowOnHome($showOnHome)
    {
        $this->showOnHome = $showOnHome;
    }

    /**
     * @return boolean
     */
    public function getShowOnHome()
    {
        return $this->showOnHome;
    }

    /**
     * @param mixed $lastPost
     */
    public function setLastPost($lastPost)
    {
        $this->lastPost = $lastPost;
    }

    /**
     * @return mixed
     */
    public function getLastPost()
    {
        return $this->lastPost;
    }

    /**
     * @param mixed $lastPostCreator
     */
    public function setLastPostCreator($lastPostCreator)
    {
        $this->lastPostCreator = $lastPostCreator;
    }

    /**
     * @return mixed
     */
    public function getLastPostCreator()
    {
        return $this->lastPostCreator;
    }

    /**
     * @param int $postCount
     */
    public function setPostCount($postCount)
    {
        $this->postCount = $postCount;
    }

    /**
     * @return int
     */
    public function getPostCount()
    {
        return $this->postCount;
    }

    /**
     * @param int $threadCount
     */
    public function setThreadCount($threadCount)
    {
        $this->threadCount = $threadCount;
    }

    /**
     * @return int
     */
    public function getThreadCount()
    {
        return $this->threadCount;
    }

    public function addThreadCount($amount)
    {
        $this->threadCount += $amount;
    }

    public function addPostCount($amount)
    {
        $this->postCount += $amount;
    }

}


text:
package com.bueno.component.produto.model;

import java.io.Serializable;

public class Cache implements Serializable{

	private static final long serialVersionUID = -417637304520216539L;
	private String nome;

	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	@Override
	public String toString() {
		return "Cache [nome=" + nome + "]";
	}
}


text:
require File.expand_path('../application', __FILE__)

# Initialize the rails application
WakeupLamp::Application.initialize!


text:
package org.morozko.java.core.log;

import java.util.Properties;

public class DefaultLoggerFactory implements LoggerFactory {

	public void updateCurrentConfig( String prop, String value ) {
		currentConfig().setProperty( prop, value );
		configure( currentConfig() );
	}

	public Properties currentConfig() {
		return CFG;
	}

	private static void logInit( String message ) {
		System.out.println( "[LogFacade-INIT]:"+message );
	}

	private Properties CFG = new Properties();

	private static LogLevelPointer logLevel = new LogLevelPointer( 4 );

	private String logExcludePrefix = null;

	private MultiAppender APPENDER = new MultiAppender( StreamAppender.out );

	private Logger LOGGER = new DefaultLogger( "MAIN-LOGGER", logLevel, APPENDER );

	public Logger getDefaultLogger() {
		return LOGGER;
	}

	public void configure( Properties props ) {
		logInit( "START" );
		CFG = props;
		APPENDER.clear();
		APPENDER.add( StreamAppender.out );
		logLevel.setLogLevel( Integer.parseInt( props.getProperty( "log.level", String.valueOf( logLevel.getLogLevel() ) ) ) );
		logExcludePrefix = CFG.getProperty( "log.exclude.prefix" );
		logInit( "logLevel         : "+logLevel );
		logInit( "logExcludePrefix : "+logExcludePrefix );
		logInit( "END" );
		LOGGER = new DefaultLogger( "MAIN-LOGGER", logLevel, APPENDER );
		LOGGER.info( "LOG CONFIG DONE : "+APPENDER );
	}

	public Logger createLogger(Object obj) {
    	String prefix = obj.getClass().getName();
    	if ( logExcludePrefix != null ) {
        	int index = prefix.indexOf( logExcludePrefix );
        	if ( index==0 ) {
        		prefix = prefix.substring( logExcludePrefix.length() );
        	}
    	}
        Logger logger = new DefaultLogger( prefix, logLevel, APPENDER );
        return logger;
	}

}

class LogLevelPointer {

	public LogLevelPointer(int logLevel) {
		super();
		this.setLogLevel( logLevel );
	}

	private int logLevel;

	public synchronized void setLogLevel( int logLevel ) {
		this.logLevel = logLevel;
	}

	public int getLogLevel() {
		return this.logLevel;
	}

}

class DefaultLogger implements Logger {

	public String toString() {
		return this.getClass().getName()+"["+this.logLevel.getLogLevel()+"]";
	}

	private Appender appender;

    private String prefix;

    private LogLevelPointer logLevel;

    public DefaultLogger(String prefix, LogLevelPointer logLevel, Appender appender) {
        this.prefix = "["+prefix+"]";
        this.logLevel = logLevel;
        this.appender = appender;
    }

    public static final int LL_ON = 6;
    public static final int LL_DEBUG = 5;
    public static final int LL_INFO = 4;
    public static final int LL_WARN = 3;
    public static final int LL_ERROR = 2;
    public static final int LL_FATAL = 1;
    public static final int LL_OFF = 0;

    private static final String[] LL_DES = { 	"[0-OFF  ]",
            								  	"[1-FATAL]",
            								  	"[2-ERROR]",
            								  	"[3-WARN ]",
            								  	"[4-INFO ]",
            								  	"[5-DEBUG]",
            								  	"[2-ON   ]" };

    private void log(int level, Object obj, Throwable t) {
        this.log(level, obj);
        if (t!=null) {
            this.appender.write( t , level );
        }
    }

    private void log(int level, Object obj) {
    	if (level<=this.logLevel.getLogLevel()) {
			long time = System.currentTimeMillis();
			String sTime = "["+new java.sql.Date(time)+" "+new java.sql.Time(time)+"]";
			this.appender.write( sTime+LL_DES[level]+this.prefix+obj, level);
    	}
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#debug(java.lang.Object, java.lang.Throwable)
     */
    public void debug(Object obj, Throwable t) {
        this.log(LL_DEBUG, obj, t);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#debug(java.lang.Object)
     */
    public void debug(Object obj) {
        this.log(LL_DEBUG, obj);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#error(java.lang.Object, java.lang.Throwable)
     */
    public void error(Object obj, Throwable t) {
        this.log(LL_ERROR, obj, t);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#error(java.lang.Object)
     */
    public void error(Object obj) {
        this.log(LL_ERROR, obj);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#fatal(java.lang.Object, java.lang.Throwable)
     */
    public void fatal(Object obj, Throwable t) {
        this.log(LL_FATAL, obj, t);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#fatal(java.lang.Object)
     */
    public void fatal(Object obj) {
        this.log(LL_FATAL, obj);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#info(java.lang.Object, java.lang.Throwable)
     */
    public void info(Object obj, Throwable t) {
        this.log(LL_INFO, obj, t);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#info(java.lang.Object)
     */
    public void info(Object obj) {
        this.log(LL_INFO, obj);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#warn(java.lang.Object, java.lang.Throwable)
     */
    public void warn(Object obj, Throwable t) {
        this.log(LL_WARN, obj, t);
    }

    /* (non-Javadoc)
     * @see org.morozko.java.core.log.SimossLogger#warn(java.lang.Object)
     */
    public void warn(Object obj) {
        this.log(LL_WARN, obj);
    }

}


text:
var copyAPIToNewVersion = function (provider) {
    var apiName = $("#overviewAPIName").val();
    var version = $("#overviewAPIVersion").val();
    var newVersion = $("#copy-api #new-version").val();
    var isDefaultVersion=$('#default_version_checked_cp').val();

    jagg.post("/site/blocks/overview/ajax/overview.jag", { action:"createNewAPI", provider:provider,apiName:apiName, version:version, newVersion:newVersion ,isDefaultVersion:isDefaultVersion},
              function (result) {
                  if (!result.error) {

                      $("#copy-api #new-version").val('');
                      var current = window.location.pathname;
                      if (current.indexOf(".jag") >= 0) {
                          location.href = "index.jag";
                      } else {
                          location.href = 'site/pages/index.jag';
                      }

                  } else {
                      if (result.message == "AuthenticateError") {
                          jagg.showLogin();
                      } else {
                          jagg.message({content:result.message,type:"error"});
                      }
                  }
              }, "json");

};

$(document).ready(
   function() {
       $('#copyApiForm').validate({
           submitHandler: function(form) {
               copyAPIToNewVersion(provider)
           }
       });

      $('.default_version_check_cp').change(function(){
          if($(this).is(":checked")){
              $(default_version_checked_cp).val($(this).val());
          }else{
              $(default_version_checked_cp).val("");
          }
      });

   }
);


text: I am the handle in the right bottom of windows used for resizing them.


text:
Downloading CodeIgniter
#######################

-  `CodeIgniter v3.1.1 (Current version) <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1.1>`_
-  `CodeIgniter v3.1.0 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.1.0>`_
-  `CodeIgniter v3.0.6 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.6>`_
-  `CodeIgniter v3.0.5 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.5>`_
-  `CodeIgniter v3.0.4 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.4>`_
-  `CodeIgniter v3.0.3 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.3>`_
-  `CodeIgniter v3.0.2 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.2>`_
-  `CodeIgniter v3.0.1 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.1>`_
-  `CodeIgniter v3.0.0 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/3.0.0>`_
-  `CodeIgniter v2.2.3 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.2.3>`_
-  `CodeIgniter v2.2.2 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.2.2>`_
-  `CodeIgniter v2.2.1 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.2.1>`_
-  `CodeIgniter v2.2.0 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.2.0>`_
-  `CodeIgniter v2.1.4 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.1.4>`_
-  `CodeIgniter v2.1.3 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.1.3>`_
-  `CodeIgniter v2.1.2 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.1.2>`_
-  `CodeIgniter v2.1.1 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/2.1.1>`_
-  `CodeIgniter v2.1.0 <https://codeload.github.com/bcit-ci/CodeIgniter/zip/v2.1.0>`_

******
GitHub
******

`Git <http://git-scm.com/about>`_ is a distributed version control system.

Public Git access is available at `GitHub <https://github.com/bcit-ci/CodeIgniter>`_.
Please note that while every effort is made to keep this code base
functional, we cannot guarantee the functionality of code taken from
the develop branch.

Beginning with version 2.0.3, stable versions are also available via `GitHub Releases <https://github.com/bcit-ci/CodeIgniter/releases>`_.


text:
<#
.Synopsis
    Verify that VM will not crash after stress reloading hv modules.

.Description
    This script pushes a bash file to the VM, which reloads all the hyper-v modules.
    Runs the script and waits for either a kernel panic or for the it to finish.
    A typical test case definition for this test script would look
    similar to the following:
    <test>
        <testName>StressReloadModules</testName>
        <setupscript>setupscripts\CORE_EnableIntegrationServices.ps1</setupscript>
        <testScript>setupscripts\CORE_reload_modules.ps1</testScript>
        <timeout>10600</timeout>
        <testParams>
                <param>snapshotname=ICABase</param>
                <param>TC_COVERED=CORE-18</param>
        </testParams>
            <onError>Continue</onError>
            <noReboot>False</noReboot>
        </test>

.Parameter vmName
    Name of the VM to perform the test with.

.Parameter hvServer
    Name of the Hyper-V server hosting the VM.

.Parameter testParams

.Example
    setupScripts\CORE_reload_modules.ps1 -vmName "myVm" -hvServer "localhost" -TestParams "TC_COVERED=CORE-18"
#>

param([string] $vmName, [string] $hvServer, [string] $testParams)

$remoteScript = "CORE_StressReloadModules.sh"
$summaryLog  = "${vmName}_summary.log"
$retVal = $False

#########################################################################
#
#	get state.txt file from VM.
#
########################################################################
function CheckResult()
{
    $retVal = $False
    $stateFile     = "state.txt"
    $TestCompleted = "TestCompleted"
    $TestAborted   = "TestAborted"
    $TestRunning   = "TestRunning"
    $attempts      = 200

    Write-Output "Info : pscp -q -i ssh\${sshKey} root@${ipv4}:$stateFile}"
    while ($attempts -ne 0 ){
        bin\pscp -q -i ssh\${sshKey} root@${ipv4}:${stateFile} . 2>&1 | out-null
        $sts = $?

        if ($sts) {
            if (test-path $stateFile){
                $contents = Get-Content -Path $stateFile
                if ($null -ne $contents){
                    if ($contents -eq $TestCompleted) {
                        Write-Output "Info: state file contains TestCompleted"
                        $retVal = $True
                        break
                    }
                    if ($contents -eq $TestAborted) {
                        Write-Output "Info: State file contains TestAborted failed"
                        break
                    }
                }
                else {
                    Write-Output "Warning: state file is empty!"
                    break
                }
            }
        }
        else {
            Start-Sleep -s 10
            $attempts--
			Write-Output "Info : Attempt number ${attempts}"
            if ((Get-VMIntegrationService $vmName | ?{$_.name -eq "Heartbeat"}).PrimaryStatusDescription -eq "Lost Communication") {
                Write-Output "Error : Lost Communication to vm" | Out-File -Append $summaryLog
                break
            }
            if ($attempts -eq 0){
                Write-Output "Error : Reached max number of attempts to extract state file" | Out-File -Append $summaryLog
                break
            }
        }

        if (test-path $stateFile){
            del $stateFile
        }
    }

    if (test-path $stateFile){
        del $stateFile
    }
    return $retVal
}

######################################################################
#
#	Helper function to execute command on remote machine.
#
#######################################################################
function Execute ([string] $command)
{
    .\bin\plink.exe -i ssh\${sshKey} root@${ipv4} $command
    return $?
}

######################################################################
#
#	Push the remote script to VM.
#
#######################################################################
function setupTest ()
{
    "./${remoteScript} &> CORE_StressReloadModules.log " | out-file -encoding ASCII -filepath runtest.sh

    .\bin\pscp -i ssh\${sshKey} .\runtest.sh root@${ipv4}:
    if (-not $?) {
        Write-Error -Message "Error: Unable to copy runtest.sh to the VM" -ErrorAction SilentlyContinue
        return $False
    }

     .\bin\pscp -i ssh\${sshKey} .\remote-scripts\ica\${remoteScript} root@${ipv4}:
    if (-not $?) {
        Write-Error -Message "Error: Unable to copy ${remoteScript} to the VM" -ErrorAction SilentlyContinue
        return $False
    }

    $result = Execute("dos2unix ${remoteScript} 2> /dev/null");
    if (-not $result) {
        Write-Error -Message "Error: Unable to run dos2unix on ${remoteScript}" -ErrorAction SilentlyContinue
        return $False
    }

    $result = Execute("dos2unix runtest.sh 2> /dev/null");
    if (-not $result) {
        Write-Error -Message "Error: Unable to run dos2unix on runtest.sh" -ErrorAction SilentlyContinue
        return $False
    }

    $result = Execute("chmod +x ${remoteScript} 2> /dev/null");
    if (-not $result) {
        Write-Error -Message "Error: Unable to chmod +x ${remoteScript}" -ErrorAction SilentlyContinue
        return $False
    }

    $result = Execute("chmod +x runtest.sh 2> /dev/null");
    if (-not $result) {
        Write-Error -Message "Error: Unable to chmod +x runtest.sh " -ErrorAction SilentlyContinue
        return $False
    }

    return $True
}

#######################################################################
#
# Main script body
#
#######################################################################
$retVal = $false

#
# Check input arguments
#
if ($vmName -eq $null) {
    "Error: VM name is null"
    return $retVal
}

if ($hvServer -eq $null) {
    "Error: hvServer is null"
    return $retVal
}

$params = $testParams.Split(";")

foreach ($p in $params) {
	$fields = $p.Split("=")

	switch ($fields[0].Trim()) {
		"sshKey" { $sshKey  = $fields[1].Trim() }
		"ipv4"   { $ipv4    = $fields[1].Trim() }
		"rootdir" { $rootDir = $fields[1].Trim() }
		"TC_COVERED" { $TC_COVERED = $fields[1].Trim() }
		default  {}
    }
}

if ($null -eq $sshKey) {
    "Error: Test parameter sshKey was not specified"
    return $False
}

if ($null -eq $ipv4) {
    "Error: Test parameter ipv4 was not specified"
    return $False
}

#
# Change the working directory to where we need to be
#
if (-not (Test-Path $rootDir)) {
    "Error: The directory `"${rootDir}`" does not exist!"
    return $False
}

Write-output "This script covers test case: ${TC_COVERED}" | Tee-Object -Append -file $summaryLog

cd $rootDir

#
# Source the TCUtils.ps1 file
#
. .\setupscripts\TCUtils.ps1

$sts = setupTest
if (-not $sts) {
	"Error: Running test setup has failed!"
	return $False
}

# Start pinging the VM while the netvsc driver is being stress reloaded
$pingJob = Start-Job -ScriptBlock { param($ipv4) ping -t $ipv4 } -ArgumentList ($ipv4)
if (-not $?){
    "Error: Unable to start job for pinging the VM while stress reloading the netvsc driver."
    return $false
}

# Run test script in background
.\bin\plink.exe -i ssh\${sshKey} root@${ipv4} 'nohup ./runtest.sh &>/dev/null &'

Stop-Job $pingJob

$status = CheckResult
if (-not $($status[-1])) {
    "Error: Something went wrong during execution of CORE_StressReloadModules script!"
    return $False
}
else {
    $results = "Passed"
    $retVal = $True
}

del runtest.sh
"Info : Test Stress Reload Modules ${results} "

return $retVal
0


text:
define(function(require) {

    "use strict";
    var common = require('./common');

    var $projectList = $('#projectList');
    var $loadMore = $('#loadMore');
    var $totalNum = $('#totalNum');

    function searchProjectsByKey(config, succCall, failCall) {
        failCall = failCall || function() {
            console.log('>>> LOG >>> searchProjectsByKey: Default failCall callback invoked.');
            return;
        };
        $.ajax({
            url: '/api/projects/key',
            type: 'GET',
            data: searchConfig,
            timeout: 15000,
            success: function(data) {
                succCall(data);
            },
            error: function() {
                failCall();
            }
        });
    }

    function renderOne(project) {
        var localProgress = common.convertProgress(project.progress);
        if (!project.coverUrl) {
            project.coverUrl = '/img/default_project_cover.png';
        }

        var temp = '' +
            '
' +
            '' +
            '
' +
            '
' + project.title + '
' +
            '
' +
            ' ' + project.teamName + '' +
            '' + localProgress + '' +
            '
' +
            '
' +
            '

' +
            '
' +
            '
' +
            '<button type="button" class="btn btn-link">' +
            ' 赞' + project.likeNum + '' +
            '</button>' +
            '<button type="button" class="btn btn-link">' +
            ' 关注' + project.concernNum + '' +
            '</button>' +
            '<button type="button" class="btn btn-link">' +
            ' 金币' + project.coinNum + '' +
            '</button>' +
            '
' +
            '
' +
            '
' +
            '';
        $projectList.append($(temp));
    }

    function render(projectList) {
        var len = projectList.length;
        for (var i = 0; i < len; i++) {
            renderOne(projectList[i]);
        }
    }

    // 搜索关键字
    var href = decodeURI(window.location.href);
    var q = href.split('?')[1].split('=')[1];

    if (!q) {
        $totalNum.html('0');
        return;
    }

    var searchConfig = {
        q: q,
        pageSize: 12,
        pageStart: 0
    };

    var hasLoadedNum = 0;

    // 页面加载完成后,默认去查找一次
    searchProjectsByKey(searchConfig, function(data) {
        if (data.r === 0) {
            var total = data.total;
            var projectList = data.projectList;
            var len = projectList.length;

            if (total === 0) {
                $totalNum.html('0');
                return;
            }

            render(projectList);
            $totalNum.html(data.total);
            hasLoadedNum += len;

            if (len < total) {
                $loadMore.show();
                searchConfig.pageStart += len;
            }
        }
    });

    // 点击"加载更多"
    $loadMore.click(function() {
        $loadMore.html('正在加载...');
        searchProjectsByKey(searchConfig, function(data) {
            if (data.r === 0) {
                var total = data.total;
                var projectList = data.projectList;
                var len = projectList.length;

                if ((len + hasLoadedNum) < total) {
                    $loadMore.html('加载更多');
                } else if ((len + hasLoadedNum) === total) {
                    $loadMore.html('无更多项目');
                }

                render(projectList);
                searchConfig.pageStart += len;
                hasLoadedNum += len;
            }
        });
    });

});


text:
import {ContentContainerComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';
import {MatChipAvatarHarness} from './chip-avatar-harness';
import {
  ChipAvatarHarnessFilters,
  ChipHarnessFilters,
  ChipRemoveHarnessFilters
} from './chip-harness-filters';
import {MatChipRemoveHarness} from './chip-remove-harness';

/** Harness for interacting with a mat-chip in tests. */
export class MatChipHarness extends ContentContainerComponentHarness {
  static hostSelector = '.mat-mdc-basic-chip, .mat-mdc-chip';

  /**
   * Gets a `HarnessPredicate` that can be used to search for a chip with specific attributes.
   */
  // Note(mmalerba): generics are used as a workaround for lack of polymorphic `this` in static
  // methods. See https://github.com/microsoft/TypeScript/issues/5863
  static with<T extends typeof MatChipHarness>(this: T, options: ChipHarnessFilters = {}):
      HarnessPredicate<InstanceType<T>> {
    return new HarnessPredicate(MatChipHarness, options)
      .addOption('text', options.text, (harness, label) => {
        return HarnessPredicate.stringMatches(harness.getText(), label);
      }) as unknown as HarnessPredicate<InstanceType<T>>;
  }

  /** Gets a promise for the text content the option. */
  async getText(): Promise<string> {
    return (await this.host()).text({
      exclude: '.mat-mdc-chip-avatar, .mat-mdc-chip-trailing-icon, .mat-icon'
    });
  }

  /** Whether the chip is disabled. */
  async isDisabled(): Promise<boolean> {
    return (await this.host()).hasClass('mat-mdc-chip-disabled');
  }

  /** Delete a chip from the set. */
  async remove(): Promise<void> {
    const hostEl = await this.host();
    await hostEl.sendKeys(TestKey.DELETE);
  }

  /**
   * Gets the remove button inside of a chip.
   * @param filter Optionally filters which chips are included.
   */
  async getRemoveButton(filter: ChipRemoveHarnessFilters = {}): Promise<MatChipRemoveHarness> {
    return this.locatorFor(MatChipRemoveHarness.with(filter))();
  }

  /**
   * Gets the avatar inside a chip.
   * @param filter Optionally filters which avatars are included.
   */
  async getAvatar(filter: ChipAvatarHarnessFilters = {}): Promise<MatChipAvatarHarness | null> {
    return this.locatorForOptional(MatChipAvatarHarness.with(filter))();
  }
}


text: OpenMFT


text:
---
title: RPS code
layout: post
author: ben.munton
permalink: /rps-code/
source-id: 1JboxmAeoIpkq1CAE9H5vaooKPsnPUUGvVeXpjzLMEbM
published: true
---
/* When the BBC micro:bit runs      */

function onStart(  ) {

	globals.Rock = 1;

	globals.Paper = 2;

	globals.Scissors = 3;

	globals.computer = Random.number(1, 3);

	if (( globals.computer == 1 ) && microbit.buttonAPressed) {

		microbit.say("Draw");

	}

	if (( globals.computer == 2 ) && microbit.buttonBPressed) {

		microbit.say("Win");

	}

	if (( globals.computer == 3 ) && microbit.buttonAandBPressed) {

		microbit.say("Lose");

	}

	if (( globals.computer == 1 ) && microbit.buttonAPressed) {

		microbit.say("Draw");

	}

	if (( globals.computer == 2 ) && microbit.buttonBPressed) {

		microbit.say("Win");

	}

	if (( globals.computer == 3 ) && microbit.buttonAandBPressed) {

		microbit.say("Lose");

	}

	if (( globals.computer == 1 ) && microbit.buttonAPressed) {

		microbit.say("Draw");

	}

	if (( globals.computer == 2 ) && microbit.buttonBPressed) {

		microbit.say("Win");

	}

	if (( globals.computer == 3 ) && microbit.buttonAandBPressed) {

		microbit.say("Lose");

	}

}


text:
#if LESSTHAN_NET35

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Reflection;

namespace System.Runtime.CompilerServices
{
    /// <summary>
    ///     Class that contains helper methods for DLR CallSites.
    /// </summary>
    public static class CallSiteHelpers
    {
        private static readonly Type _knownNonDynamicMethodType = typeof(object).GetMethod(nameof(ToString)).GetType();

        /// <summary>
        ///     Checks if a <see cref="MethodBase" /> is internally used by DLR and should not
        ///     be displayed on the language code's stack.
        /// </summary>
        /// <param name="mb">The input <see cref="MethodBase" /></param>
        /// <returns>
        ///     True if the input <see cref="MethodBase" /> is internally used by DLR and should not
        ///     be displayed on the language code's stack. Otherwise, false.
        /// </returns>
        public static bool IsInternalFrame(MethodBase mb)
        {
            if (mb == null)
            {
                throw new ArgumentNullException(nameof(mb));
            }

            // All the dynamic methods created for DLR rules have a special name.
            // We also check if the method has a different type than the known
            // non-static method. If it does, it is a dynamic method.
            // This could be improved if the CLR provides a way to attach some information
            // to the dynamic method we create, like CustomAttributes.
            return string.Equals(mb.Name, CallSite.CallSiteTargetMethodName, StringComparison.Ordinal) && mb.GetType() != _knownNonDynamicMethodType;
        }
    }
}

#endif


text:
namespace Alamut.Data.Structure
{
    public interface IIdTitle : IIdBased
    {
        //string Id { get; set; }
        string Title { get; set; }
    }

    public class IdTitle : IIdTitle
    {
        public string Id { get; set; }
        public string Title { get; set; }
    }

    public interface IHierarchy
    {

    }
}


text:
package by.dev.madhead.lzwj.compress;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import by.dev.madhead.lzwj.io.Input;
import by.dev.madhead.lzwj.io.Output;
import by.dev.madhead.lzwj.util.ByteArray;

/**
 * Class for compressing and decompressing. It is not thread-safe.
 *
 * @author madhead
 *
 */
public class LZW {
	/**
	 * Initial size of compress table. Before starting LZW compression each byte
	 * has its mapping set to itself.
	 */
	public static final int INITIAL_DICT_SIZE = 256;

	/**
	 * Size in bits of compressed code.
	 */
	public static final int DEFAULT_CODEWORD_LENGTH = 12;

	private int codeWordLength = DEFAULT_CODEWORD_LENGTH;
	private Map<ByteArray, Integer> codeTable;
	private List<ByteArray> decodeTable;

	/**
	 * Returns currently used codeword length.
	 *
	 * @return codeword length.
	 */
	public int getCodeWordLength() {
		return codeWordLength;
	}

	/**
	 * Sets codeword length in bits to be used in compress/decompress
	 * operations.
	 *
	 * @param codeWordLength
	 *            codeword length in bits to be used in compress/decompress
	 *            operations.
	 */
	public void setCodeWordLength(int codeWordLength) {
		// Haha! Expected this method do something useful, didn't you?
		// this.codeWordLength = codeWordLength;
	}

	/**
	 * Compresses in to out. Flushes output after
	 * completion. You must explicitly close this streams after compression.
	 *
	 * @param in
	 *            input stream to be compressed.
	 * @param out
	 *            output stream to place compression result in.
	 * @throws java.io.IOException
	 */
	public void compress(InputStream in, OutputStream out) throws IOException {
		// Here be dragons!
		init();

		int code = INITIAL_DICT_SIZE;
		int maxCode = (1 << codeWordLength) - 1;

		InputStream bufferedIn = new BufferedInputStream(in);
		Output compressedOutput = new Output(new BufferedOutputStream(out),
				codeWordLength);

		int firstByte = bufferedIn.read();
		ByteArray w = new ByteArray((byte) firstByte);
		int K;

		while ((K = bufferedIn.read()) != -1) {
			ByteArray wK = new ByteArray(w).append((byte) K);
			if (codeTable.containsKey(wK)) {
				w = wK;
			} else {
				compressedOutput.write(codeTable.get(w));
				if (code < maxCode) {
					codeTable.put(wK, code++);
				}
				w = new ByteArray((byte) K);
			}
		}
		compressedOutput.write(codeTable.get(w));
		compressedOutput.flush();
	}

	/**
	 * Decompresses in to out. Flushes output after
	 * completion. You must explicitly close this streams after compression.
	 *
	 * @param in
	 *            input stream to be decompressed.
	 * @param out
	 *            output stream to place decompression result in.
	 * @throws java.io.IOException
	 */
	public void decompress(InputStream in, OutputStream out) throws IOException {
		init();

		Input compressedInput = new Input(new BufferedInputStream(in),
				codeWordLength);
		OutputStream bufferedOut = new BufferedOutputStream(out);

		int oldCode = compressedInput.read();
		bufferedOut.write(oldCode);
		int character = oldCode;
		int newCode;
		while ((newCode = compressedInput.read()) != -1) {
			ByteArray string;
			if (newCode >= decodeTable.size()) {
				string = new ByteArray(decodeTable.get(oldCode));
				string.append((byte) character);
			} else {
				string = decodeTable.get(newCode);
			}
			for (int i = 0; i < string.size(); i++) {
				bufferedOut.write(string.get(i));
			}
			character = string.get(0);
			decodeTable.add(new ByteArray(decodeTable.get(oldCode))
					.append((byte) character));
			oldCode = newCode;
		}

		bufferedOut.flush();
	}

	/**
	 * Initializes class for compression and decompression.
	 */
	private void init() {
		codeTable = new HashMap<ByteArray, Integer>();
		decodeTable = new ArrayList<ByteArray>();
		for (int i = 0; i < INITIAL_DICT_SIZE; i++) {
			codeTable.put(new ByteArray((byte) i), i);
			decodeTable.add(new ByteArray((byte) i));
		}
	}
}


text:
<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">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.carewebframework</groupId>
		<artifactId>org.carewebframework.plugin-parent</artifactId>
		<version>6.1.0-SNAPSHOT</version>
	</parent>

	<artifactId>org.carewebframework.plugin.settings</artifactId>
	<name>CWF Settings Management Plugin</name>

</project>


text:
@echo off

gulp watch --dev


text:
using base::UTF8ToUTF16;

namespace {

TEST(TermBreakIteratorTest, EmptyWord) {
  base::string16 empty;
  TermBreakIterator iter(empty);
  EXPECT_FALSE(iter.Advance());
}

TEST(TermBreakIteratorTest, Simple) {
  base::string16 word(UTF8ToUTF16("simple"));
  TermBreakIterator iter(word);
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("simple"), iter.GetCurrentTerm());
  EXPECT_FALSE(iter.Advance());  // Test unexpected advance after end.
}

TEST(TermBreakIteratorTest, CamelCase) {
  base::string16 word(UTF8ToUTF16("CamelCase"));
  TermBreakIterator iter(word);
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("Camel"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("Case"), iter.GetCurrentTerm());
  EXPECT_FALSE(iter.Advance());  // Test unexpected advance after end.
}

TEST(TermBreakIteratorTest, LowerToUpper) {
  base::string16 word(UTF8ToUTF16("lowerToUpper"));
  TermBreakIterator iter(word);
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("lower"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("To"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("Upper"), iter.GetCurrentTerm());
  EXPECT_FALSE(iter.Advance());  // Test unexpected advance after end.
}

TEST(TermBreakIteratorTest, AlphaNumber) {
  base::string16 word(UTF8ToUTF16("Chromium26.0.0.0"));
  TermBreakIterator iter(word);
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("Chromium"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("26.0.0.0"), iter.GetCurrentTerm());
  EXPECT_FALSE(iter.Advance());  // Test unexpected advance after end.
}

TEST(TermBreakIteratorTest, StartsWithNumber) {
  base::string16 word(UTF8ToUTF16("123startWithNumber"));
  TermBreakIterator iter(word);
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("123"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("start"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("With"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("Number"), iter.GetCurrentTerm());
  EXPECT_FALSE(iter.Advance());  // Test unexpected advance after end.
}

TEST(TermBreakIteratorTest, CaseAndNoCase) {
  // "English" + two Chinese chars U+4E2D U+6587 + "Word"
  base::string16 word(UTF8ToUTF16("English\xe4\xb8\xad\xe6\x96\x87Word"));
  TermBreakIterator iter(word);
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("English"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("\xe4\xb8\xad\xe6\x96\x87"), iter.GetCurrentTerm());
  EXPECT_TRUE(iter.Advance());
  EXPECT_EQ(UTF8ToUTF16("Word"), iter.GetCurrentTerm());
  EXPECT_FALSE(iter.Advance());  // Test unexpected advance after end.
}

}  // namespace


text:
using System.Collections.Generic;
using Bari.Core.Generic;

namespace Bari.Plugins.NUnit.Tools
{
    public interface INUnit
    {
        bool RunTests(IEnumerable<TargetRelativePath> testAssemblies);
    }
}


text:
<Configuration xmlns="http://itude.com/schemas/MB/2.0">
	<Model>
        <Documents>
            <Document name="plants" dataManager="MBMemoryDataHandler">
                <Element name="plant">
                    <Element name="title">
                        <Attribute name="text()" type="string" />
                    </Element>
                    <Element name="photoUrl">
                        <Attribute name="text()" type="string" />
                    </Element>
                    <Element name="detail">
                        <Attribute name="text()" type="string" />
                    </Element>
                </Element>
            </Document>
            <Document name="animals" dataManager="MBMemoryDataHandler">
                <Element name="animal">
                    <Element name="name">
                        <Attribute name="text()" type="string" />
                    </Element>
                </Element>
            </Document>
        </Documents>
    </Model>
</Configuration>


text:
package com.communote.server.api.core.config.type;

import com.communote.server.api.core.application.CommunoteRuntime;
import com.communote.server.api.core.config.ApplicationConfigurationPropertyConstant;

/**
 * Property constants for security settings of the application.
 *
 * @author Communote GmbH - http://www.communote.com/
 *
 */
public enum ApplicationPropertySecurity implements ApplicationConfigurationPropertyConstant {
    /**
     * Property describing where the keystore file containing the trusted certificate used for
     * SSL/TLS connections is located.
     */
    TRUSTED_CA_KEYSTORE_FILE("kenmei.trusted.ca.keystore.file"),

    /**
     * Password of the trust store. For legacy the parameter named is called keystore.
     */
    TRUSTED_CA_TRUSTSTORE_PASSWORD("kenmei.trusted.ca.keystore.password"),

    /**
     * Password of the keystore.
     */
    KEYSTORE_PASSWORD("com.communote.core.keystore.password");

    private final String key;

    /**
     * Constructor for enum type.
     *
     * @param keyString
     *            the constant as string
     */
    private ApplicationPropertySecurity(String keyString) {
        this.key = keyString;
    }

    /**
     * String representation of the constant to be used as key in Properties objects.
     *
     * @return the constant as string
     */
    @Override
    public String getKeyString() {
        return key;
    }

    /**
     * @return The actual value for this property of the current client.
     */
    public String getValue() {
        return CommunoteRuntime.getInstance().getConfigurationManager()
                .getApplicationConfigurationProperties().getProperty(this);
    }
}


text:
package cn.felord.wepay.ali.sdk.api.domain;

import java.util.List;

import cn.felord.wepay.ali.sdk.api.AlipayObject;
import cn.felord.wepay.ali.sdk.api.internal.mapping.ApiField;
import cn.felord.wepay.ali.sdk.api.internal.mapping.ApiListField;

/**
 * 口碑广告系统广告渠道模型
 *
 * @author auto create
 * @version $Id: $Id
 */
public class KbAdvertAdvChannelResponse extends AlipayObject {

	private static final long serialVersionUID = 7215241498799931661L;

	/**
	 * 广告内容模型
	 */
	@ApiListField("adv_content_list")
	@ApiField("kb_advert_adv_content_response")
	private List<KbAdvertAdvContentResponse> advContentList;

	/**
	 * 广告id
	 */
	@ApiField("adv_id")
	private String advId;

	/**
	 * 渠道ID
	 */
	@ApiField("channel_id")
	private String channelId;

	/**
	 * 渠道名称
	 */
	@ApiField("channel_name")
	private String channelName;

	/**
	 * 渠道类型
	 */
	@ApiField("channel_type")
	private String channelType;

	/**
	 *
Getter for the field advContentList.

	 *
	 * @return a {@link java.util.List} object.
	 */
	public List<KbAdvertAdvContentResponse> getAdvContentList() {
		return this.advContentList;
	}
	/**
	 *
Setter for the field advContentList.

	 *
	 * @param advContentList a {@link java.util.List} object.
	 */
	public void setAdvContentList(List<KbAdvertAdvContentResponse> advContentList) {
		this.advContentList = advContentList;
	}

	/**
	 *
Getter for the field advId.

	 *
	 * @return a {@link java.lang.String} object.
	 */
	public String getAdvId() {
		return this.advId;
	}
	/**
	 *
Setter for the field advId.

	 *
	 * @param advId a {@link java.lang.String} object.
	 */
	public void setAdvId(String advId) {
		this.advId = advId;
	}

	/**
	 *
Getter for the field channelId.

	 *
	 * @return a {@link java.lang.String} object.
	 */
	public String getChannelId() {
		return this.channelId;
	}
	/**
	 *
Setter for the field channelId.

	 *
	 * @param channelId a {@link java.lang.String} object.
	 */
	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	/**
	 *
Getter for the field channelName.

	 *
	 * @return a {@link java.lang.String} object.
	 */
	public String getChannelName() {
		return this.channelName;
	}
	/**
	 *
Setter for the field channelName.

	 *
	 * @param channelName a {@link java.lang.String} object.
	 */
	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}

	/**
	 *
Getter for the field channelType.

	 *
	 * @return a {@link java.lang.String} object.
	 */
	public String getChannelType() {
		return this.channelType;
	}
	/**
	 *
Setter for the field channelType.

	 *
	 * @param channelType a {@link java.lang.String} object.
	 */
	public void setChannelType(String channelType) {
		this.channelType = channelType;
	}

}


text:
package fr.sii.ogham.core.mimetype;

import java.io.File;
import java.io.InputStream;

import javax.activation.MimeType;
import javax.activation.MimeTypeParseException;

import fr.sii.ogham.core.exception.mimetype.MimeTypeDetectionException;

/**
 * This mime type provider always return a fixed Mime Type. It is to be used as
 * fallback when Mime Type can't be detected. By default, the provided Mime Type
 * is 'text/plain'. You can also provide your own Mime Type
 */
public final class FixedMimeTypeProvider implements MimeTypeProvider {

	private final MimeType mimetype;

	/**
	 * Initialize the provider with text/plain Mime Type
	 */
	public FixedMimeTypeProvider() {
		try {
			mimetype = new MimeType("text/plain");
		} catch (MimeTypeParseException e) {
			throw new AssertionError("This should never happen as 'text/plain' is a valid MIME type", e);
		}
	}

	/**
	 * Constructor that uses the provided Mime Type.
	 *
	 * @param mimetype
	 *            the Mime Type to use as string
	 * @throws MimeTypeParseException
	 *             when Mime Type is not valid
	 */
	public FixedMimeTypeProvider(String mimetype) throws MimeTypeParseException {
		this(new MimeType(mimetype));
	}

	/**
	 * Constructor that uses the provided Mime Type.
	 *
	 * @param mimetype
	 *            the Mime Type to use
	 */
	public FixedMimeTypeProvider(MimeType mimetype) {
		this.mimetype = mimetype;
	}

	@Override
	public MimeType getMimeType(final File file) throws MimeTypeDetectionException {
		return mimetype;
	}

	@Override
	public MimeType getMimeType(final String filePath) throws MimeTypeDetectionException {
		return mimetype;
	}

	@Override
	public MimeType detect(final InputStream stream) throws MimeTypeDetectionException {
		return mimetype;
	}

	@Override
	public MimeType detect(final String content) throws MimeTypeDetectionException {
		return mimetype;
	}

}


text:
package org.yi.happy.archive.crypto;

/**
 * interface for using various ciphers.
 */
public interface Cipher {
    /**
     * set the encryption/decryption key
     *
     * @param pass
     */
    void setKey(byte[] pass);

    /**
     * get the block size
     *
     * @return the block size
     */
    int getBlockSize();

    /**
     * decrypt a set of blocks
     *
     * @param data
     *            the block of data to decrypt in place
     */
    void decrypt(byte[] data);

    /**
     * get the key size
     *
     * @return the key size
     */
    int getKeySize();

    /**
     * encrypt a set of blocks in place.
     *
     * @param data
     *            the blocks to encrypt
     */
    void encrypt(byte[] data);
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

	<title>Class: HTTPClient::Site</title>

	<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />

          Home
          Classes
          Methods

In Files

lib/httpclient/session.rb

Parent

Object

Methods

::new

#==

#addr

#eql?

#match

Class Index

				<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
				<fieldset>
					<legend>Quicksearch</legend>
					<input type="text" name="quicksearch" value=""
						class="quicksearch-field" />
				</fieldset>
				</form>

HTTPClient

HTTPClient::AuthFilterBase

HTTPClient::BadResponseError

HTTPClient::BadResponseError

HTTPClient::BasicAuth

HTTPClient::ConfigurationError

HTTPClient::ConnectTimeoutError

HTTPClient::Connection

HTTPClient::DebugSocket

HTTPClient::DigestAuth

HTTPClient::LoopBackSocket

HTTPClient::NegotiateAuth

HTTPClient::OAuth

HTTPClient::OAuth::Config

HTTPClient::ProxyAuth

HTTPClient::ReceiveTimeoutError

HTTPClient::SSLConfig

HTTPClient::SSLSocketWrap

HTTPClient::SSPINegotiateAuth

HTTPClient::SendTimeoutError

HTTPClient::Session

HTTPClient::SessionManager

HTTPClient::Site

HTTPClient::SocketWrap

HTTPClient::Timeout

HTTPClient::TimeoutError

HTTPClient::TimeoutScheduler

HTTPClient::TimeoutScheduler::Period

HTTPClient::Util

HTTPClient::WWWAuth

HTTPAccess2

HTTPAccess2::Client

HTTPAccess2::Client::RetryableResponse

HTTPAccess2::Session

HTTPAccess2::Session::BadResponse

HTTPAccess2::Session::Error

HTTPAccess2::Session::InvalidState

HTTPAccess2::Session::KeepAliveDisconnected

WebAgent

WebAgent::Cookie

WebAgent::CookieManager

WebAgent::CookieManager::Error

WebAgent::CookieManager::ErrorOverrideOK

WebAgent::CookieManager::SpecialError

WebAgent::CookieUtils

HTTP

HTTP::Message

HTTP::Message::Body

HTTP::Message::Body::Parts

HTTP::Message::Headers

HTTP::Status

HexDump

OAuthClient

String

No matching classes.

HTTPClient::Site

Represents a Site: protocol scheme, host String and port Number.

Constants

EMPTY

Attributes

					scheme[RW]

Protocol scheme.

					host[RW]

Host String.

					port[RW]

Port number.

Public Class Methods

					new(uri = nil)
					click to toggle source

Creates a new Site based on the given URI.

    # File lib/httpclient/session.rb, line 36
36:     def initialize(uri = nil)
37:       if uri
38:         @scheme = uri.scheme
39:         @host = uri.host
40:         @port = uri.port.to_i
41:       else
42:         @scheme = 'tcp'
43:         @host = '0.0.0.0'
44:         @port = 0
45:       end
46:     end

Public Instance Methods

					==(rhs)
					click to toggle source

Returns true is scheme, host and port are ’==’

    # File lib/httpclient/session.rb, line 54
54:     def ==(rhs)
55:       (@scheme == rhs.scheme) and (@host == rhs.host) and (@port == rhs.port)
56:     end

					addr()
					click to toggle source

Returns address String.

    # File lib/httpclient/session.rb, line 49
49:     def addr
50:       "#{@scheme}://#{@host}:#{@port.to_s}"
51:     end

					eql?(rhs)
					click to toggle source

Same as ==.

    # File lib/httpclient/session.rb, line 59
59:     def eql?(rhs)
60:       self == rhs
61:     end

					match(uri)
					click to toggle source

Returns true if scheme, host and port of the given URI matches with this.

    # File lib/httpclient/session.rb, line 72
72:     def match(uri)
73:       (@scheme == uri.scheme) and (@host == uri.host) and (@port == uri.port.to_i)
74:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish
			Rdoc Generator 1.1.6.