text:
"""
Provides AJAX based lock/unlock of all pages.
"""

from datetime import timedelta
import json
from jcudc24provisioning.models import DBSession
from jcudc24provisioning.models.website import PageLock
from pyramid.view import view_config, view_defaults
from jcudc24provisioning.models.project import *

__author__ = 'Casey Bajema'

@view_defaults(renderer="../templates/search_template.pt")
class PageLocking(object):
    """
    Locks and unlocks pages over AJAX from the main template.
    """
    def __init__(self, request):
        self.request = request
        self.session = DBSession

    @view_config(route_name="lock_page")
    def lock_page(self, user_id=None, url=None):
        """
        Lock a page using the matchdict user_id and route_name

        :return: None
        """

        if user_id is None:
            assert 'user_id' in self.request.matchdict, "Error: Trying to lock a page without a valid user_id."
            user_id = self.request.matchdict['user_id']

        if url is None:
            assert 'url' in self.request.matchdict, "Error: Trying to lock an unkown page."
            url = '/' + '/'.join(self.request.matchdict['url'])

        current_date = datetime.now()
        expire_period = timedelta(hours=24)
        expire_time = current_date + expire_period
        lock = PageLock(user_id, url, expire_time)
        self.session.add(lock)

        # Clean up expired locks.
        self.session.query(PageLock).filter(PageLock.expire_date < datetime.now()).delete()

        self.session.flush()

        if self.request.matchdict is not None and "user_id" in self.request.matchdict and "url" in self.request.matchdict:
            json_data = json.dumps({'id': lock.id})
            return {'values': json_data}

        return lock.id

    @view_config(route_name="unlock_page")
    def unlock_page(self, lock_id=None):
        """
        Un-lock a page using the matchdict user_id and route_name

        :return: None
        """

        if lock_id is None:
            assert 'lock_id' in self.request.matchdict, "Error: Trying to unlock a page without a valid lock_id."
            lock_id = self.request.matchdict['lock_id']

        self.session.query(PageLock).filter_by(id=lock_id).delete()
        self.session.flush()

        json_data = json.dumps({})
        return {'values': json_data}


text:
#ifndef XIPEXCEPTION_H
#define XIPEXCEPTION_H

#include <xip/common/XipCommon.h>

// forward declaration
struct XipExceptionData;

/**	\class XipException
 *	\brief Exception class that contains information about fatal errors.
 *
 *  Exceptions are used to indicate "broken contract" when calling the XIP framework.
 *  The exception maintains the following information:
 *  - Exception type,
 *  - Source file information (line and filename),
 *  - and an optional debug string.
 *
 *  \warning Do no use the <tt>throw;</tt> statement without any arguments outside of a <tt>catch()</tt>
 *           block. <tt>throw;</tt> may \e only be used to propagate an exception that was catched by
 *           a catch block (see example).
 *
 *	\b Example:
	\code

	// Example for using exceptions.

    try
	{
	    // some i/o error
		throw XipException(__LINE__, __FILE__, XipException::IO_ERROR);

    }
	catch (XipException &e)
	{
		// let's output some information about the error
		wprintf(L"Exception of type %d occured at %hs(%d)\n", e.type, e.file, e.line);

		// propagate exception to upper layers
		throw;
	}

	\endcode
 *
 */
class XIPCOMMON_API XipException
{
public:
	/// Public field for cause of exception.
	enum XipExceptionType
	{
		UNKNOWN_ERROR = 0,			///< Undefined error type, usually indicated uninitialized type
		INTERNAL_SYSTEM_ERROR = 1,	///< An internal error or invalid state caused aborting the normal program flow.
		COMM_ERROR,                 ///< Communication failure.
		IO_ERROR,                   ///< File I/O error.
		MEMORY_HEAP_ERROR,          ///< A memory allocation from the heap memory failed.
		MEMORY_DISK_ERROR,          ///< Allocation of disk space failed.
		MEMORY_MAPPING_ERROR,       ///< Failed to allocate or map a file into virtual address space of a process.
		INVALID_PARAM_ERROR,        ///< Invalid parameters have been passed to a method of function.
		INVALID_STATE_ERROR,        ///< Object is in invalid state to perform requested operation.
		ABORT_EXECUTION,            ///< This exception type indicates that the user cancelled an operation.
		OPERATION_UNSUPPORTED       ///< Specified that requested operation or feature is unsupported by a given module/plugin.
	};

	inline const wchar_t* ToString(XipExceptionType type) const;

	/// Constructor used to generate an exception
	XipException();
//	XipException(unsigned int _line, const char *_file, const char *_function, XipExceptionType _type, const wchar_t *_message = 0);
	XipException(unsigned int _line, const char *_file, const char *_function, XipExceptionType _type, const wchar_t* _message = 0, ...);
	XipException(const XipException& e);

    /// Destructor, cleans up data as needed
    virtual ~XipException();

    /// Returns the line number where the exception is thrown
    unsigned int getLine();

    /// Returns the exception type
    XipExceptionType getType();

    /// Returns the file name pointer
    const char* getFile();

    /// Returns the message string pointer
    const wchar_t* getMessage();

    /// Returns the function string pointer
    const char* getFunction();

protected:

	XipExceptionData* mData;
	XipExceptionType mType;
};

//----------------------------------------------------------------
//convenience macros:
//------------------------------------------------------------------

//check for a NULL pointer, and throw exception
#define XIP_CHK_PTR(ptr) if (!ptr) {throw XipException(__LINE__, __FILE__, XipException::MEMORY_HEAP_ERROR, L#ptr ## L" is NULL");}

#endif // XIPEXCEPTION_H

redpajama_set_name: RedPajamaGithub


text:
namespace content {
struct MainFunctionParams;
}

namespace mac_relauncher {

// Relaunches the application using the helper application associated with the
// currently running instance of Chrome in the parent browser process as the
// executable for the relauncher process. |args| is an argv-style vector of
// command line arguments of the form normally passed to execv. args[0] is
// also the path to the relaunched process. Because the relauncher process
// will ultimately launch the relaunched process via Launch Services, args[0]
// may be either a pathname to an executable file or a pathname to an .app
// bundle directory. The caller should exit soon after RelaunchApp returns
// successfully. Returns true on success, although some failures can occur
// after this function returns true if, for example, they occur within the
// relauncher process. Returns false when the relaunch definitely failed.
bool RelaunchApp(const std::vector<std::string>& args);

// Identical to RelaunchApp, but uses |helper| as the path to the relauncher
// process, and allows additional arguments to be supplied to the relauncher
// process in relauncher_args. Unlike args[0], |helper| must be a pathname to
// an executable file. The helper path given must be from the same version of
// Chrome as the running parent browser process, as there are no guarantees
// that the parent and relauncher processes from different versions will be
// able to communicate with one another. This variant can be useful to
// relaunch the same version of Chrome from another location, using that
// location's helper.
bool RelaunchAppWithHelper(const std::string& helper,
                           const std::vector<std::string>& relauncher_args,
                           const std::vector<std::string>& args);

namespace internal {

// The entry point from ChromeMain into the relauncher process. This is not a
// user API. Don't call it if your name isn't ChromeMain.
int RelauncherMain(content::MainFunctionParams main_parameters);

}  // namespace internal

}  // namespace mac_relauncher

#endif  // CHROME_BROWSER_MAC_RELAUNCHER_H_


text:
package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"
	"encoding/json"
	"strconv"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// VsiOnSanNewIgroups The list of initiator groups to create.
//
// swagger:model vsi_on_san_new_igroups
type VsiOnSanNewIgroups struct {

	// A comment available for use by the administrator.
	Comment string `json:"comment,omitempty"`

	// igroups
	Igroups []*VsiOnSanNewIgroupsIgroupsItems0 `json:"igroups,omitempty"`

	// initiator objects
	InitiatorObjects []*VsiOnSanNewIgroupsInitiatorObjectsItems0 `json:"initiator_objects,omitempty"`

	// initiators
	Initiators []string `json:"initiators,omitempty"`

	// The name of the new initiator group.
	// Required: true
	// Max Length: 96
	// Min Length: 1
	Name *string `json:"name"`

	// The protocol of the new initiator group.
	// Enum: [fcp iscsi mixed]
	Protocol *string `json:"protocol,omitempty"`
}

// Validate validates this vsi on san new igroups
func (m *VsiOnSanNewIgroups) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateIgroups(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateInitiatorObjects(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateName(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateProtocol(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VsiOnSanNewIgroups) validateIgroups(formats strfmt.Registry) error {
	if swag.IsZero(m.Igroups) { // not required
		return nil
	}

	for i := 0; i < len(m.Igroups); i++ {
		if swag.IsZero(m.Igroups[i]) { // not required
			continue
		}

		if m.Igroups[i] != nil {
			if err := m.Igroups[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("igroups" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (m *VsiOnSanNewIgroups) validateInitiatorObjects(formats strfmt.Registry) error {
	if swag.IsZero(m.InitiatorObjects) { // not required
		return nil
	}

	for i := 0; i < len(m.InitiatorObjects); i++ {
		if swag.IsZero(m.InitiatorObjects[i]) { // not required
			continue
		}

		if m.InitiatorObjects[i] != nil {
			if err := m.InitiatorObjects[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("initiator_objects" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (m *VsiOnSanNewIgroups) validateName(formats strfmt.Registry) error {

	if err := validate.Required("name", "body", m.Name); err != nil {
		return err
	}

	if err := validate.MinLength("name", "body", *m.Name, 1); err != nil {
		return err
	}

	if err := validate.MaxLength("name", "body", *m.Name, 96); err != nil {
		return err
	}

	return nil
}

var vsiOnSanNewIgroupsTypeProtocolPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["fcp","iscsi","mixed"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		vsiOnSanNewIgroupsTypeProtocolPropEnum = append(vsiOnSanNewIgroupsTypeProtocolPropEnum, v)
	}
}

const (

	// BEGIN DEBUGGING
	// vsi_on_san_new_igroups
	// VsiOnSanNewIgroups
	// protocol
	// Protocol
	// fcp
	// END DEBUGGING
	// VsiOnSanNewIgroupsProtocolFcp captures enum value "fcp"
	VsiOnSanNewIgroupsProtocolFcp string = "fcp"

	// BEGIN DEBUGGING
	// vsi_on_san_new_igroups
	// VsiOnSanNewIgroups
	// protocol
	// Protocol
	// iscsi
	// END DEBUGGING
	// VsiOnSanNewIgroupsProtocolIscsi captures enum value "iscsi"
	VsiOnSanNewIgroupsProtocolIscsi string = "iscsi"

	// BEGIN DEBUGGING
	// vsi_on_san_new_igroups
	// VsiOnSanNewIgroups
	// protocol
	// Protocol
	// mixed
	// END DEBUGGING
	// VsiOnSanNewIgroupsProtocolMixed captures enum value "mixed"
	VsiOnSanNewIgroupsProtocolMixed string = "mixed"
)

// prop value enum
func (m *VsiOnSanNewIgroups) validateProtocolEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, vsiOnSanNewIgroupsTypeProtocolPropEnum, true); err != nil {
		return err
	}
	return nil
}

func (m *VsiOnSanNewIgroups) validateProtocol(formats strfmt.Registry) error {
	if swag.IsZero(m.Protocol) { // not required
		return nil
	}

	// value enum
	if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil {
		return err
	}

	return nil
}

// ContextValidate validate this vsi on san new igroups based on the context it is used
func (m *VsiOnSanNewIgroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := m.contextValidateIgroups(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := m.contextValidateInitiatorObjects(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *VsiOnSanNewIgroups) contextValidateIgroups(ctx context.Context, formats strfmt.Registry) error {

	for i := 0; i < len(m.Igroups); i++ {

		if m.Igroups[i] != nil {
			if err := m.Igroups[i].ContextValidate(ctx, formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("igroups" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (m *VsiOnSanNewIgroups) contextValidateInitiatorObjects(ctx context.Context, formats strfmt.Registry) error {

	for i := 0; i < len(m.InitiatorObjects); i++ {

		if m.InitiatorObjects[i] != nil {
			if err := m.InitiatorObjects[i].ContextValidate(ctx, formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("initiator_objects" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// MarshalBinary interface implementation
func (m *VsiOnSanNewIgroups) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VsiOnSanNewIgroups) UnmarshalBinary(b []byte) error {
	var res VsiOnSanNewIgroups
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VsiOnSanNewIgroupsIgroupsItems0 vsi on san new igroups igroups items0
//
// swagger:model VsiOnSanNewIgroupsIgroupsItems0
type VsiOnSanNewIgroupsIgroupsItems0 struct {

	// The name of an igroup to nest within a parent igroup. Mutually exclusive with initiators and initiator_objects.
	Name string `json:"name,omitempty"`

	// The UUID of an igroup to nest within a parent igroup Usage: <UUID>
	UUID string `json:"uuid,omitempty"`
}

// Validate validates this vsi on san new igroups igroups items0
func (m *VsiOnSanNewIgroupsIgroupsItems0) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this vsi on san new igroups igroups items0 based on context it is used
func (m *VsiOnSanNewIgroupsIgroupsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *VsiOnSanNewIgroupsIgroupsItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VsiOnSanNewIgroupsIgroupsItems0) UnmarshalBinary(b []byte) error {
	var res VsiOnSanNewIgroupsIgroupsItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}

// VsiOnSanNewIgroupsInitiatorObjectsItems0 vsi on san new igroups initiator objects items0
//
// swagger:model VsiOnSanNewIgroupsInitiatorObjectsItems0
type VsiOnSanNewIgroupsInitiatorObjectsItems0 struct {

	// A comment available for use by the administrator.
	Comment string `json:"comment,omitempty"`

	// The WWPN, IQN, or Alias of the initiator. Mutually exclusive with nested igroups and the initiators array.
	Name string `json:"name,omitempty"`
}

// Validate validates this vsi on san new igroups initiator objects items0
func (m *VsiOnSanNewIgroupsInitiatorObjectsItems0) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this vsi on san new igroups initiator objects items0 based on context it is used
func (m *VsiOnSanNewIgroupsInitiatorObjectsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *VsiOnSanNewIgroupsInitiatorObjectsItems0) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *VsiOnSanNewIgroupsInitiatorObjectsItems0) UnmarshalBinary(b []byte) error {
	var res VsiOnSanNewIgroupsInitiatorObjectsItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}


text:
/**
	Represents a simple static sprite.
	Code by Rob Kleffner, 2011
*/

Enjine.Sprite = function() {
	this.X = 0;
	this.Y = 0;
	this.Image = null;
};

Enjine.Sprite.prototype = new Enjine.Drawable();

Enjine.Sprite.prototype.Draw = function(context, camera) {
	context.drawImage(this.Image, this.X - camera.X, this.Y - camera.Y);
};


text:
@interface STRVRequestOperation (Internal)
@property (nonatomic, strong) NSError *error;
@property (nonatomic, strong) id result;
@end


text:
#include "tensorflow/lite/delegates/hexagon/builders/split_builder.h"

#include <stdint.h>

#include <limits>

#include "tensorflow/lite/c/builtin_op_data.h"
#include "tensorflow/lite/delegates/hexagon/hexagon_nn/hexagon_nn.h"
#include "tensorflow/lite/kernels/kernel_util.h"

namespace tflite {
namespace delegates {
namespace hexagon {
TfLiteStatus SplitOpBuilder::PopulateSubGraph(const TfLiteIntArray* inputs,
                                              const TfLiteIntArray* outputs,
                                              TfLiteContext* context) {
  const int input_tensor_id = inputs->data[1];
  const auto& input_tensor = context->tensors[input_tensor_id];

  // Axis tensor.
  const int axis_tensor_id = inputs->data[0];
  const auto& axis = context->tensors[axis_tensor_id];
  if (axis.allocation_type != kTfLiteMmapRo) {
    context->ReportError(context,
                         "Axis tensor doesn't have correct allocation type: %s",
                         axis.name);
    return kTfLiteError;
  }
  // We pad Hexagon tensor dimensions with 1 if dims.size < 4.
  // (4 - input_tensor.dims->size) helps maps the input axis value in such
  // cases.
  int axis_value = axis.data.i32[0] + (4 - input_tensor.dims->size);
  if (axis_value < 0) {
    axis_value += input_tensor.dims->size;
  }
  auto* input_axis_const = graph_builder_->AddConstNodeWithData(
      kScalarShape, reinterpret_cast<char*>(&axis_value), sizeof(int));
  AddInput(TensorID(input_axis_const->GetID(), 0));

  // Input data tensor & min/max.
  AddInput(graph_builder_->GetHexagonTensorId(input_tensor_id));
  TF_LITE_ENSURE_STATUS(ComputeAndAddMinAndMax(context, input_tensor));

  // Output data tensors.
  for (int i = 0; i < outputs->size; ++i) {
    int output_batch_size, output_height_size, output_width_size,
        output_depth_size;
    GetDims(&output_batch_size, &output_height_size, &output_width_size,
            &output_depth_size, context->tensors[outputs->data[i]].dims);
    TensorID output = AddOutput(sizeof(uint8_t), 4,
                                {output_batch_size, output_height_size,
                                 output_width_size, output_depth_size});
    node_outputs_.push_back(output);
  }
  // For Hexagon output min/max.
  AddOutput(sizeof(float), 4, kScalarShape);
  AddOutput(sizeof(float), 4, kScalarShape);

  return kTfLiteOk;
}

TfLiteStatus SplitOpBuilder::RegisterOutputs(const TfLiteIntArray* outputs,
                                             TfLiteContext* context) {
  for (int i = 0; i < node_outputs_.size(); ++i) {
    graph_builder_->AddTensorWithID(outputs->data[i], node_outputs_[i].first,
                                    node_outputs_[i].second);
  }
  return kTfLiteOk;
}

SplitOpBuilder::~SplitOpBuilder() {}

OpBuilder* CreateSplitBuilder(GraphBuilder* graph_builder, int op_type) {
  return new SplitOpBuilder(graph_builder, op_type);
}

}  // namespace hexagon
}  // namespace delegates
}  // namespace tflite


text:
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/startWith';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/let';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/mapTo';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/operator/pluck';
import 'rxjs/add/operator/sample';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/take';
import 'rxjs/add/operator/throttle';
import 'rxjs/add/operator/takeUntil';
import 'rxjs/add/operator/toArray';

import 'rxjs/add/observable/combineLatest';
import 'rxjs/add/observable/throw';
import 'rxjs/add/observable/from';
import 'rxjs/add/observable/fromEvent';
import 'rxjs/add/observable/interval';
import 'rxjs/add/observable/of';

import 'rxjs/ReplaySubject';
import 'rxjs/Observable';
import 'rxjs/Subject';
import 'rxjs/Subscription';

import '@ngrx/core/add/operator/select';


text:
import argparse
import json
import os
from pprint import pprint
import sys

# input
parser = argparse.ArgumentParser()
parser.add_argument('-in', dest="INPUT_FILE", default="data/still_i_rise.json", help="Path to input aligned transcript json file")
parser.add_argument('-min', dest="MIN_DURATION", type=float, default=0.08, help="Minimum duration of a clip")

# init input
args = parser.parse_args()
minDuration = args.MIN_DURATION

data = {}
with open(args.INPUT_FILE) as f:
    data = json.load(f)

words = data["words"]
wordsValid = []
syllablesValid = []
wordsInvalid = []
syllablesInvalid = []

for word in words:
    duration = word["end"] - word["start"]
    if duration >= minDuration:
        wordsValid.append((word["word"], duration))
    else:
        wordsInvalid.append((word["word"], duration))
    for syllable in word["syllables"]:
        duration = syllable["end"] - syllable["start"]
        if duration >= minDuration:
            syllablesValid.append((syllable["text"], duration))
        else:
            syllablesInvalid.append((syllable["text"], duration))

print "Min duration: %s" % minDuration
print "Words: %s" % len(words)
print "--Valid: %s" % len(wordsValid)
print "--Invalid: %s" % len(wordsInvalid)
pprint(wordsInvalid)
print "-----"
print "Syllables: %s" % (len(syllablesValid) + len(syllablesInvalid))
print "--Valid: %s" % len(syllablesValid)
print "--Invalid: %s" % len(syllablesInvalid)
pprint(syllablesInvalid)
print "Non-words: %s" % len(data["nonwords"])
print "Pauses: %s" % len(data["pauses"])
print "Total clips: %s" % (len(words) + len(syllablesValid) + len(syllablesInvalid) + len(data["nonwords"]) + len(data["pauses"]))


text:
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/transparent"
    android:layout_marginTop="20dp"
    android:id="@+id/rootLayout">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="10dp">
        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_marginBottom="20dp"
            android:layout_gravity="center_horizontal"
            android:layout_height="wrap_content">
            <ImageView
                android:layout_width="175dp"
                android:layout_height="175dp"
                android:contentDescription="@string/store_logo"
                android:id="@+id/logoView"/>
            <ProgressBar
                android:id="@+id/progress"
                style="?android:attr/progressBarStyleLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:visibility="visible"/>
        </RelativeLayout>
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scaleType="fitXY"
            android:id="@+id/barcodeImage"
            android:contentDescription="@string/barcode"
            android:layout_marginBottom="5dp"
            android:layout_gravity="center_horizontal" />
    </LinearLayout>
</LinearLayout>


text:
using System;
using System.Linq;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {

            // Problem:
            // Compare two char arrays lexicographically (letter by letter).
            // Print the them in alphabetical order, each on separate line.

            char[] firstLine = Console.ReadLine().Split(' ').Select(char.Parse).ToArray();
            char[] secondLine = Console.ReadLine().Split(' ').Select(char.Parse).ToArray();

            if (firstLine.Length >= secondLine.Length)
            {
                for (int i = 0; i < secondLine.Length; i++)
                {
                    if (firstLine[i] < secondLine[i])
                    {
                        Console.WriteLine(string.Join("", firstLine));
                        Console.WriteLine(string.Join("", secondLine));
                        return;

                    }
                    else if (secondLine[i] < firstLine[i])
                    {
                        Console.WriteLine(string.Join("", secondLine));
                        Console.WriteLine(string.Join("", firstLine));
                        return;
                    }
                    else if (i == secondLine.Length - 1)
                    {
                        Console.WriteLine(string.Join("", secondLine));
                        Console.WriteLine(string.Join("", firstLine));
                        return;
                    }
                }
            }
            else
            {
                for (int i = 0; i < firstLine.Length; i++)
                {
                    if (firstLine[i] < secondLine[i])
                    {
                        Console.WriteLine(string.Join("", firstLine));
                        Console.WriteLine(string.Join("", secondLine));
                        return;

                    }
                    else if (secondLine[i] < firstLine[i])
                    {
                        Console.WriteLine(string.Join("", secondLine));
                        Console.WriteLine(string.Join("", firstLine));
                        return;
                    }
                    else if (i == firstLine.Length - 1)
                    {
                        Console.WriteLine(string.Join("", firstLine));
                        Console.WriteLine(string.Join("", secondLine));
                        return;
                    }
                }
            }
        }
    }
}


text:
var ghostBookshelf = require('./base'),
    globalUtils = require('../utils'),
    crypto = require('crypto'),
    _ = require('lodash'),
    Invite,
    Invites;

Invite = ghostBookshelf.Model.extend({
    tableName: 'invites',

    toJSON: function (options) {
        options = options || {};

        var attrs = ghostBookshelf.Model.prototype.toJSON.call(this, options);
        delete attrs.token;
        return attrs;
    }
}, {
    orderDefaultOptions: function orderDefaultOptions() {
        return {};
    },

    processOptions: function processOptions(options) {
        return options;
    },

    /**
     * @TODO: can't use base class, because:
     * options.withRelated = _.union(options.withRelated, options.include); is missing
     * there are some weird self implementations in each model
     * so adding this line, will destroy other models, because they rely on something else
     * FIX ME!!!!!
     */
    findOne: function findOne(data, options) {
        options = options || {};

        options = this.filterOptions(options, 'findOne');
        data = this.filterData(data, 'findOne');
        options.withRelated = _.union(options.withRelated, options.include);

        var invite = this.forge(data, {include: options.include});
        return invite.fetch(options);
    },

    add: function add(data, options) {
        var hash = crypto.createHash('sha256'),
            text = '';

        options = this.filterOptions(options, 'add');
        options.withRelated = _.union(options.withRelated, options.include);

        data.expires = Date.now() + globalUtils.ONE_WEEK_MS;
        data.status = 'pending';

        // @TODO: call a util fn?
        hash.update(String(data.expires));
        hash.update(data.email.toLocaleLowerCase());
        text += [data.expires, data.email, hash.digest('base64')].join('|');
        data.token = new Buffer(text).toString('base64');
        return ghostBookshelf.Model.add.call(this, data, options);
    }
});

Invites = ghostBookshelf.Collection.extend({
    model: Invite
});

module.exports = {
    Invite: ghostBookshelf.model('Invite', Invite),
    Invites: ghostBookshelf.collection('Invites', Invites)
};


text:
$(function(){
    $.fn.extend({
        tabs: function(options) {
            var opts = $.extend({
                trigEvent: 'touchstart ',
                tabSelector: '',
                tabPanel: '',
                current: 'current',
                loadContent: '',
                callback: null,
                panelCancel: false,
                animate: 'show'
            }, options);
            var tabs = $(this),
                loadContent = opts.loadContent,
                panels = $(opts.tabPanel, tabs);

            tabs.on(opts.trigEvent, opts.tabSelector, function(e) {
                e.preventDefault();
                var self = $(this),
                    index = tabs.find(opts.tabSelector).index(this),
                    panel = panels.eq(index);

                if($.isFunction(loadContent)){
                    loadContent.call(self, index, panel);
                }

                self.addClass(opts.current).siblings().removeClass(opts.current);

                if(!opts.panelCancel){
                    panel.siblings(opts.tabPanel).hide();
                    panel[opts.animate]();
                }

                if(opts.callback){
                   opts.callback.call(self, index, panel);
                }
            });
        }
    });
});


text:
package net.minecraft.item.crafting;

import com.google.common.collect.Lists;
import java.util.List;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class RecipeRepairItem implements IRecipe
{
    /**
     * Used to check if a recipe matches current crafting inventory
     */
    public boolean matches(InventoryCrafting inv, World worldIn)
    {
        List<ItemStack> list = Lists.<ItemStack>newArrayList();

        for (int i = 0; i < inv.getSizeInventory(); ++i)
        {
            ItemStack itemstack = inv.getStackInSlot(i);

            if (itemstack != null)
            {
                list.add(itemstack);

                if (list.size() > 1)
                {
                    ItemStack itemstack1 = (ItemStack)list.get(0);

                    if (itemstack.getItem() != itemstack1.getItem() || itemstack1.stackSize != 1 || itemstack.stackSize != 1 || !itemstack1.getItem().isDamageable())
                    {
                        return false;
                    }
                }
            }
        }

        return list.size() == 2;
    }

    /**
     * Returns an Item that is the result of this recipe
     */
    public ItemStack getCraftingResult(InventoryCrafting inv)
    {
        List<ItemStack> list = Lists.<ItemStack>newArrayList();

        for (int i = 0; i < inv.getSizeInventory(); ++i)
        {
            ItemStack itemstack = inv.getStackInSlot(i);

            if (itemstack != null)
            {
                list.add(itemstack);

                if (list.size() > 1)
                {
                    ItemStack itemstack1 = (ItemStack)list.get(0);

                    if (itemstack.getItem() != itemstack1.getItem() || itemstack1.stackSize != 1 || itemstack.stackSize != 1 || !itemstack1.getItem().isDamageable())
                    {
                        return null;
                    }
                }
            }
        }

        if (list.size() == 2)
        {
            ItemStack itemstack2 = (ItemStack)list.get(0);
            ItemStack itemstack3 = (ItemStack)list.get(1);

            if (itemstack2.getItem() == itemstack3.getItem() && itemstack2.stackSize == 1 && itemstack3.stackSize == 1 && itemstack2.getItem().isDamageable())
            {
                Item item = itemstack2.getItem();
                int j = item.getMaxDamage() - itemstack2.getItemDamage();
                int k = item.getMaxDamage() - itemstack3.getItemDamage();
                int l = j + k + item.getMaxDamage() * 5 / 100;
                int i1 = item.getMaxDamage() - l;

                if (i1 < 0)
                {
                    i1 = 0;
                }

                return new ItemStack(itemstack2.getItem(), 1, i1);
            }
        }

        return null;
    }

    /**
     * Returns the size of the recipe area
     */
    public int getRecipeSize()
    {
        return 4;
    }

    public ItemStack getRecipeOutput()
    {
        return null;
    }

    public ItemStack[] getRemainingItems(InventoryCrafting inv)
    {
        ItemStack[] aitemstack = new ItemStack[inv.getSizeInventory()];

        for (int i = 0; i < aitemstack.length; ++i)
        {
            ItemStack itemstack = inv.getStackInSlot(i);

            if (itemstack != null && itemstack.getItem().hasContainerItem())
            {
                aitemstack[i] = new ItemStack(itemstack.getItem().getContainerItem());
            }
        }

        return aitemstack;
    }
}


text:
package v1beta1

import (
	"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
)

func init() {
	api.Scheme.AddKnownTypes("v1beta1",
		&Template{},
	)
}

func (*Template) IsAnAPIObject() {}


text:
package me.lachlanap.oldtoby.server

import me.lachlanap.oldtoby.server.helpers.Up

class CoreTest extends UnitSpec {

  "server status" should "be online" in {
    val status = server.status

    status shouldBe a[Up]
  }
}


text:
BOARD_SIZE = 8

class BailOut(Exception):
    pass

def validate(queens):
    left = right = col = queens[-1]
    for r in reversed(queens[:-1]):
        left, right = left-1, right+1
        if r in (left, col, right):
            raise BailOut

def add_queen(queens):
    for i in range(BOARD_SIZE):
        test_queens = queens + [i]
        try:
            validate(test_queens)
            if len(test_queens) == BOARD_SIZE:
                return test_queens
            else:
                return add_queen(test_queens)
        except BailOut:
            pass
    raise BailOut

queens = add_queen([])
print queens
print "\n".join(". "*q + "Q " + ". "*(BOARD_SIZE-q-1) for q in queens)


text:
#ifndef RVIZ_SCREENSHOT_DIALOG_H
#define RVIZ_SCREENSHOT_DIALOG_H

#include <QWidget>

class QPixmap;
class QAbstractButton;
class QDialogButtonBox;
class QTimer;
class QCheckBox;

namespace rviz
{

class ScaledImageWidget;
class VisualizationManager;

/**
 * \brief A dialog for grabbing a screen shot.
 *
 * Takes the screenshot while in the constructor, then shows a
 * half-size view of the screenshot in the dialog with buttons for
 * save/try-again/cancel.
 */
class ScreenshotDialog: public QWidget
{
Q_OBJECT
public:
  ScreenshotDialog( QWidget* main_window, QWidget* render_window,
      VisualizationManager *vis_manager,
      const QString& default_save_dir = QString() );
  virtual ~ScreenshotDialog() {}

Q_SIGNALS:
  /** @brief Emitted when the user saves a file. */
  void savedInDirectory( const QString& directory );

protected Q_SLOTS:
  void takeScreenshot();
  void onTimeout();
  void takeScreenshotNow();
  void save();
  void onButtonClicked( QAbstractButton* clicked );
  void setSaveFullWindow( bool save_full_window );

protected:
  virtual void showEvent( QShowEvent* event );

private:
  ScaledImageWidget* image_widget_;
  QWidget* main_window_;
  QWidget* render_window_;
  QPixmap screenshot_;
  QDialogButtonBox* button_box_;
  bool save_full_window_;
  QTimer* delay_timer_;
  QSize saved_size_;
  bool first_time_;
  QString default_save_dir_;
  VisualizationManager* vis_manager_;
};

} // namespace rviz

#endif // RVIZ_SCREENSHOT_DIALOG_H


text:
<?php

/**
 * Basic exceptions which will be thrown when something goes wrong
 * within the {@link Kernel}'s logic.
 *
 * @package pinjector
 * @author Tobias Sarnowski
 * @since 1.0
 */
class KernelException extends Exception {

}


text:
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.hadoop.hive.metastore.api;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class GetTablesRequest implements org.apache.thrift.TBase<GetTablesRequest, GetTablesRequest._Fields>, java.io.Serializable, Cloneable, Comparable<GetTablesRequest> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTablesRequest");

  private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField TBL_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("tblNames", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("capabilities", org.apache.thrift.protocol.TType.STRUCT, (short)3);
  private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField PROCESSOR_CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("processorCapabilities", org.apache.thrift.protocol.TType.LIST, (short)5);
  private static final org.apache.thrift.protocol.TField PROCESSOR_IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("processorIdentifier", org.apache.thrift.protocol.TType.STRING, (short)6);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new GetTablesRequestStandardSchemeFactory());
    schemes.put(TupleScheme.class, new GetTablesRequestTupleSchemeFactory());
  }

  private String dbName; // required
  private List<String> tblNames; // optional
  private ClientCapabilities capabilities; // optional
  private String catName; // optional
  private List<String> processorCapabilities; // optional
  private String processorIdentifier; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    DB_NAME((short)1, "dbName"),
    TBL_NAMES((short)2, "tblNames"),
    CAPABILITIES((short)3, "capabilities"),
    CAT_NAME((short)4, "catName"),
    PROCESSOR_CAPABILITIES((short)5, "processorCapabilities"),
    PROCESSOR_IDENTIFIER((short)6, "processorIdentifier");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // DB_NAME
          return DB_NAME;
        case 2: // TBL_NAMES
          return TBL_NAMES;
        case 3: // CAPABILITIES
          return CAPABILITIES;
        case 4: // CAT_NAME
          return CAT_NAME;
        case 5: // PROCESSOR_CAPABILITIES
          return PROCESSOR_CAPABILITIES;
        case 6: // PROCESSOR_IDENTIFIER
          return PROCESSOR_IDENTIFIER;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final _Fields optionals[] = {_Fields.TBL_NAMES,_Fields.CAPABILITIES,_Fields.CAT_NAME,_Fields.PROCESSOR_CAPABILITIES,_Fields.PROCESSOR_IDENTIFIER};
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TBL_NAMES, new org.apache.thrift.meta_data.FieldMetaData("tblNames", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.CAPABILITIES, new org.apache.thrift.meta_data.FieldMetaData("capabilities", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientCapabilities.class)));
    tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PROCESSOR_CAPABILITIES, new org.apache.thrift.meta_data.FieldMetaData("processorCapabilities", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.PROCESSOR_IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("processorIdentifier", org.apache.thrift.TFieldRequirementType.OPTIONAL,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTablesRequest.class, metaDataMap);
  }

  public GetTablesRequest() {
  }

  public GetTablesRequest(
    String dbName)
  {
    this();
    this.dbName = dbName;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public GetTablesRequest(GetTablesRequest other) {
    if (other.isSetDbName()) {
      this.dbName = other.dbName;
    }
    if (other.isSetTblNames()) {
      List<String> __this__tblNames = new ArrayList<String>(other.tblNames);
      this.tblNames = __this__tblNames;
    }
    if (other.isSetCapabilities()) {
      this.capabilities = new ClientCapabilities(other.capabilities);
    }
    if (other.isSetCatName()) {
      this.catName = other.catName;
    }
    if (other.isSetProcessorCapabilities()) {
      List<String> __this__processorCapabilities = new ArrayList<String>(other.processorCapabilities);
      this.processorCapabilities = __this__processorCapabilities;
    }
    if (other.isSetProcessorIdentifier()) {
      this.processorIdentifier = other.processorIdentifier;
    }
  }

  public GetTablesRequest deepCopy() {
    return new GetTablesRequest(this);
  }

  @Override
  public void clear() {
    this.dbName = null;
    this.tblNames = null;
    this.capabilities = null;
    this.catName = null;
    this.processorCapabilities = null;
    this.processorIdentifier = null;
  }

  public String getDbName() {
    return this.dbName;
  }

  public void setDbName(String dbName) {
    this.dbName = dbName;
  }

  public void unsetDbName() {
    this.dbName = null;
  }

  /** Returns true if field dbName is set (has been assigned a value) and false otherwise */
  public boolean isSetDbName() {
    return this.dbName != null;
  }

  public void setDbNameIsSet(boolean value) {
    if (!value) {
      this.dbName = null;
    }
  }

  public int getTblNamesSize() {
    return (this.tblNames == null) ? 0 : this.tblNames.size();
  }

  public java.util.Iterator<String> getTblNamesIterator() {
    return (this.tblNames == null) ? null : this.tblNames.iterator();
  }

  public void addToTblNames(String elem) {
    if (this.tblNames == null) {
      this.tblNames = new ArrayList<String>();
    }
    this.tblNames.add(elem);
  }

  public List<String> getTblNames() {
    return this.tblNames;
  }

  public void setTblNames(List<String> tblNames) {
    this.tblNames = tblNames;
  }

  public void unsetTblNames() {
    this.tblNames = null;
  }

  /** Returns true if field tblNames is set (has been assigned a value) and false otherwise */
  public boolean isSetTblNames() {
    return this.tblNames != null;
  }

  public void setTblNamesIsSet(boolean value) {
    if (!value) {
      this.tblNames = null;
    }
  }

  public ClientCapabilities getCapabilities() {
    return this.capabilities;
  }

  public void setCapabilities(ClientCapabilities capabilities) {
    this.capabilities = capabilities;
  }

  public void unsetCapabilities() {
    this.capabilities = null;
  }

  /** Returns true if field capabilities is set (has been assigned a value) and false otherwise */
  public boolean isSetCapabilities() {
    return this.capabilities != null;
  }

  public void setCapabilitiesIsSet(boolean value) {
    if (!value) {
      this.capabilities = null;
    }
  }

  public String getCatName() {
    return this.catName;
  }

  public void setCatName(String catName) {
    this.catName = catName;
  }

  public void unsetCatName() {
    this.catName = null;
  }

  /** Returns true if field catName is set (has been assigned a value) and false otherwise */
  public boolean isSetCatName() {
    return this.catName != null;
  }

  public void setCatNameIsSet(boolean value) {
    if (!value) {
      this.catName = null;
    }
  }

  public int getProcessorCapabilitiesSize() {
    return (this.processorCapabilities == null) ? 0 : this.processorCapabilities.size();
  }

  public java.util.Iterator<String> getProcessorCapabilitiesIterator() {
    return (this.processorCapabilities == null) ? null : this.processorCapabilities.iterator();
  }

  public void addToProcessorCapabilities(String elem) {
    if (this.processorCapabilities == null) {
      this.processorCapabilities = new ArrayList<String>();
    }
    this.processorCapabilities.add(elem);
  }

  public List<String> getProcessorCapabilities() {
    return this.processorCapabilities;
  }

  public void setProcessorCapabilities(List<String> processorCapabilities) {
    this.processorCapabilities = processorCapabilities;
  }

  public void unsetProcessorCapabilities() {
    this.processorCapabilities = null;
  }

  /** Returns true if field processorCapabilities is set (has been assigned a value) and false otherwise */
  public boolean isSetProcessorCapabilities() {
    return this.processorCapabilities != null;
  }

  public void setProcessorCapabilitiesIsSet(boolean value) {
    if (!value) {
      this.processorCapabilities = null;
    }
  }

  public String getProcessorIdentifier() {
    return this.processorIdentifier;
  }

  public void setProcessorIdentifier(String processorIdentifier) {
    this.processorIdentifier = processorIdentifier;
  }

  public void unsetProcessorIdentifier() {
    this.processorIdentifier = null;
  }

  /** Returns true if field processorIdentifier is set (has been assigned a value) and false otherwise */
  public boolean isSetProcessorIdentifier() {
    return this.processorIdentifier != null;
  }

  public void setProcessorIdentifierIsSet(boolean value) {
    if (!value) {
      this.processorIdentifier = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case DB_NAME:
      if (value == null) {
        unsetDbName();
      } else {
        setDbName((String)value);
      }
      break;

    case TBL_NAMES:
      if (value == null) {
        unsetTblNames();
      } else {
        setTblNames((List<String>)value);
      }
      break;

    case CAPABILITIES:
      if (value == null) {
        unsetCapabilities();
      } else {
        setCapabilities((ClientCapabilities)value);
      }
      break;

    case CAT_NAME:
      if (value == null) {
        unsetCatName();
      } else {
        setCatName((String)value);
      }
      break;

    case PROCESSOR_CAPABILITIES:
      if (value == null) {
        unsetProcessorCapabilities();
      } else {
        setProcessorCapabilities((List<String>)value);
      }
      break;

    case PROCESSOR_IDENTIFIER:
      if (value == null) {
        unsetProcessorIdentifier();
      } else {
        setProcessorIdentifier((String)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case DB_NAME:
      return getDbName();

    case TBL_NAMES:
      return getTblNames();

    case CAPABILITIES:
      return getCapabilities();

    case CAT_NAME:
      return getCatName();

    case PROCESSOR_CAPABILITIES:
      return getProcessorCapabilities();

    case PROCESSOR_IDENTIFIER:
      return getProcessorIdentifier();

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case DB_NAME:
      return isSetDbName();
    case TBL_NAMES:
      return isSetTblNames();
    case CAPABILITIES:
      return isSetCapabilities();
    case CAT_NAME:
      return isSetCatName();
    case PROCESSOR_CAPABILITIES:
      return isSetProcessorCapabilities();
    case PROCESSOR_IDENTIFIER:
      return isSetProcessorIdentifier();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof GetTablesRequest)
      return this.equals((GetTablesRequest)that);
    return false;
  }

  public boolean equals(GetTablesRequest that) {
    if (that == null)
      return false;

    boolean this_present_dbName = true && this.isSetDbName();
    boolean that_present_dbName = true && that.isSetDbName();
    if (this_present_dbName || that_present_dbName) {
      if (!(this_present_dbName && that_present_dbName))
        return false;
      if (!this.dbName.equals(that.dbName))
        return false;
    }

    boolean this_present_tblNames = true && this.isSetTblNames();
    boolean that_present_tblNames = true && that.isSetTblNames();
    if (this_present_tblNames || that_present_tblNames) {
      if (!(this_present_tblNames && that_present_tblNames))
        return false;
      if (!this.tblNames.equals(that.tblNames))
        return false;
    }

    boolean this_present_capabilities = true && this.isSetCapabilities();
    boolean that_present_capabilities = true && that.isSetCapabilities();
    if (this_present_capabilities || that_present_capabilities) {
      if (!(this_present_capabilities && that_present_capabilities))
        return false;
      if (!this.capabilities.equals(that.capabilities))
        return false;
    }

    boolean this_present_catName = true && this.isSetCatName();
    boolean that_present_catName = true && that.isSetCatName();
    if (this_present_catName || that_present_catName) {
      if (!(this_present_catName && that_present_catName))
        return false;
      if (!this.catName.equals(that.catName))
        return false;
    }

    boolean this_present_processorCapabilities = true && this.isSetProcessorCapabilities();
    boolean that_present_processorCapabilities = true && that.isSetProcessorCapabilities();
    if (this_present_processorCapabilities || that_present_processorCapabilities) {
      if (!(this_present_processorCapabilities && that_present_processorCapabilities))
        return false;
      if (!this.processorCapabilities.equals(that.processorCapabilities))
        return false;
    }

    boolean this_present_processorIdentifier = true && this.isSetProcessorIdentifier();
    boolean that_present_processorIdentifier = true && that.isSetProcessorIdentifier();
    if (this_present_processorIdentifier || that_present_processorIdentifier) {
      if (!(this_present_processorIdentifier && that_present_processorIdentifier))
        return false;
      if (!this.processorIdentifier.equals(that.processorIdentifier))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List<Object> list = new ArrayList<Object>();

    boolean present_dbName = true && (isSetDbName());
    list.add(present_dbName);
    if (present_dbName)
      list.add(dbName);

    boolean present_tblNames = true && (isSetTblNames());
    list.add(present_tblNames);
    if (present_tblNames)
      list.add(tblNames);

    boolean present_capabilities = true && (isSetCapabilities());
    list.add(present_capabilities);
    if (present_capabilities)
      list.add(capabilities);

    boolean present_catName = true && (isSetCatName());
    list.add(present_catName);
    if (present_catName)
      list.add(catName);

    boolean present_processorCapabilities = true && (isSetProcessorCapabilities());
    list.add(present_processorCapabilities);
    if (present_processorCapabilities)
      list.add(processorCapabilities);

    boolean present_processorIdentifier = true && (isSetProcessorIdentifier());
    list.add(present_processorIdentifier);
    if (present_processorIdentifier)
      list.add(processorIdentifier);

    return list.hashCode();
  }

  @Override
  public int compareTo(GetTablesRequest other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDbName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTblNames()).compareTo(other.isSetTblNames());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTblNames()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblNames, other.tblNames);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCapabilities()).compareTo(other.isSetCapabilities());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCapabilities()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.capabilities, other.capabilities);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCatName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetProcessorCapabilities()).compareTo(other.isSetProcessorCapabilities());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProcessorCapabilities()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processorCapabilities, other.processorCapabilities);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetProcessorIdentifier()).compareTo(other.isSetProcessorIdentifier());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProcessorIdentifier()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processorIdentifier, other.processorIdentifier);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("GetTablesRequest(");
    boolean first = true;

    sb.append("dbName:");
    if (this.dbName == null) {
      sb.append("null");
    } else {
      sb.append(this.dbName);
    }
    first = false;
    if (isSetTblNames()) {
      if (!first) sb.append(", ");
      sb.append("tblNames:");
      if (this.tblNames == null) {
        sb.append("null");
      } else {
        sb.append(this.tblNames);
      }
      first = false;
    }
    if (isSetCapabilities()) {
      if (!first) sb.append(", ");
      sb.append("capabilities:");
      if (this.capabilities == null) {
        sb.append("null");
      } else {
        sb.append(this.capabilities);
      }
      first = false;
    }
    if (isSetCatName()) {
      if (!first) sb.append(", ");
      sb.append("catName:");
      if (this.catName == null) {
        sb.append("null");
      } else {
        sb.append(this.catName);
      }
      first = false;
    }
    if (isSetProcessorCapabilities()) {
      if (!first) sb.append(", ");
      sb.append("processorCapabilities:");
      if (this.processorCapabilities == null) {
        sb.append("null");
      } else {
        sb.append(this.processorCapabilities);
      }
      first = false;
    }
    if (isSetProcessorIdentifier()) {
      if (!first) sb.append(", ");
      sb.append("processorIdentifier:");
      if (this.processorIdentifier == null) {
        sb.append("null");
      } else {
        sb.append(this.processorIdentifier);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (!isSetDbName()) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString());
    }

    // check for sub-struct validity
    if (capabilities != null) {
      capabilities.validate();
    }
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class GetTablesRequestStandardSchemeFactory implements SchemeFactory {
    public GetTablesRequestStandardScheme getScheme() {
      return new GetTablesRequestStandardScheme();
    }
  }

  private static class GetTablesRequestStandardScheme extends StandardScheme<GetTablesRequest> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, GetTablesRequest struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // DB_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.dbName = iprot.readString();
              struct.setDbNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TBL_NAMES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list904 = iprot.readListBegin();
                struct.tblNames = new ArrayList<String>(_list904.size);
                String _elem905;
                for (int _i906 = 0; _i906 < _list904.size; ++_i906)
                {
                  _elem905 = iprot.readString();
                  struct.tblNames.add(_elem905);
                }
                iprot.readListEnd();
              }
              struct.setTblNamesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // CAPABILITIES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.capabilities = new ClientCapabilities();
              struct.capabilities.read(iprot);
              struct.setCapabilitiesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // CAT_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.catName = iprot.readString();
              struct.setCatNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // PROCESSOR_CAPABILITIES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list907 = iprot.readListBegin();
                struct.processorCapabilities = new ArrayList<String>(_list907.size);
                String _elem908;
                for (int _i909 = 0; _i909 < _list907.size; ++_i909)
                {
                  _elem908 = iprot.readString();
                  struct.processorCapabilities.add(_elem908);
                }
                iprot.readListEnd();
              }
              struct.setProcessorCapabilitiesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // PROCESSOR_IDENTIFIER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.processorIdentifier = iprot.readString();
              struct.setProcessorIdentifierIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, GetTablesRequest struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.dbName != null) {
        oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
        oprot.writeString(struct.dbName);
        oprot.writeFieldEnd();
      }
      if (struct.tblNames != null) {
        if (struct.isSetTblNames()) {
          oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tblNames.size()));
            for (String _iter910 : struct.tblNames)
            {
              oprot.writeString(_iter910);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.capabilities != null) {
        if (struct.isSetCapabilities()) {
          oprot.writeFieldBegin(CAPABILITIES_FIELD_DESC);
          struct.capabilities.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.catName != null) {
        if (struct.isSetCatName()) {
          oprot.writeFieldBegin(CAT_NAME_FIELD_DESC);
          oprot.writeString(struct.catName);
          oprot.writeFieldEnd();
        }
      }
      if (struct.processorCapabilities != null) {
        if (struct.isSetProcessorCapabilities()) {
          oprot.writeFieldBegin(PROCESSOR_CAPABILITIES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.processorCapabilities.size()));
            for (String _iter911 : struct.processorCapabilities)
            {
              oprot.writeString(_iter911);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.processorIdentifier != null) {
        if (struct.isSetProcessorIdentifier()) {
          oprot.writeFieldBegin(PROCESSOR_IDENTIFIER_FIELD_DESC);
          oprot.writeString(struct.processorIdentifier);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class GetTablesRequestTupleSchemeFactory implements SchemeFactory {
    public GetTablesRequestTupleScheme getScheme() {
      return new GetTablesRequestTupleScheme();
    }
  }

  private static class GetTablesRequestTupleScheme extends TupleScheme<GetTablesRequest> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, GetTablesRequest struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeString(struct.dbName);
      BitSet optionals = new BitSet();
      if (struct.isSetTblNames()) {
        optionals.set(0);
      }
      if (struct.isSetCapabilities()) {
        optionals.set(1);
      }
      if (struct.isSetCatName()) {
        optionals.set(2);
      }
      if (struct.isSetProcessorCapabilities()) {
        optionals.set(3);
      }
      if (struct.isSetProcessorIdentifier()) {
        optionals.set(4);
      }
      oprot.writeBitSet(optionals, 5);
      if (struct.isSetTblNames()) {
        {
          oprot.writeI32(struct.tblNames.size());
          for (String _iter912 : struct.tblNames)
          {
            oprot.writeString(_iter912);
          }
        }
      }
      if (struct.isSetCapabilities()) {
        struct.capabilities.write(oprot);
      }
      if (struct.isSetCatName()) {
        oprot.writeString(struct.catName);
      }
      if (struct.isSetProcessorCapabilities()) {
        {
          oprot.writeI32(struct.processorCapabilities.size());
          for (String _iter913 : struct.processorCapabilities)
          {
            oprot.writeString(_iter913);
          }
        }
      }
      if (struct.isSetProcessorIdentifier()) {
        oprot.writeString(struct.processorIdentifier);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, GetTablesRequest struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.dbName = iprot.readString();
      struct.setDbNameIsSet(true);
      BitSet incoming = iprot.readBitSet(5);
      if (incoming.get(0)) {
        {
          org.apache.thrift.protocol.TList _list914 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.tblNames = new ArrayList<String>(_list914.size);
          String _elem915;
          for (int _i916 = 0; _i916 < _list914.size; ++_i916)
          {
            _elem915 = iprot.readString();
            struct.tblNames.add(_elem915);
          }
        }
        struct.setTblNamesIsSet(true);
      }
      if (incoming.get(1)) {
        struct.capabilities = new ClientCapabilities();
        struct.capabilities.read(iprot);
        struct.setCapabilitiesIsSet(true);
      }
      if (incoming.get(2)) {
        struct.catName = iprot.readString();
        struct.setCatNameIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.thrift.protocol.TList _list917 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.processorCapabilities = new ArrayList<String>(_list917.size);
          String _elem918;
          for (int _i919 = 0; _i919 < _list917.size; ++_i919)
          {
            _elem918 = iprot.readString();
            struct.processorCapabilities.add(_elem918);
          }
        }
        struct.setProcessorCapabilitiesIsSet(true);
      }
      if (incoming.get(4)) {
        struct.processorIdentifier = iprot.readString();
        struct.setProcessorIdentifierIsSet(true);
      }
    }
  }

}


text:
package dima.kmeansseq;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Writable;
import org.apache.mahout.common.Pair;
import org.apache.mahout.common.iterator.sequencefile.SequenceFileIterable;
import org.apache.mahout.math.VectorWritable;

public class ReadSeqFiles {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int counter = 0;
        Configuration conf = new Configuration();
        // Path path = new
        // Path("/home/mhuelfen/Documents/stratos_workspace/vectortest/input/part-r-00000");
         Path path = new
         Path("hdfs://localhost:9000/user/mhuelfen/input/vectors");
//        Path path = new Path(
//                "hdfs://localhost:9000/user/mhuelfen/input/small__vectors");
        for (Pair<Writable, VectorWritable> record

        : new SequenceFileIterable<Writable, VectorWritable>(path, true, conf)) {
            // System.out.println("F" + record.getFirst());
            // System.out.println("S" + record.getSecond().get());

            counter++;
//            System.out.println(counter + " " + record.getSecond().get());
        }
        System.out.println("Found vectors: " + counter);

    }

}


text:
require_relative '../../interactors/interactor'

module Users
  class FindUserByAuthCredentials
    include Interactor

    attr_reader :email, :password

    def initialize(email:, password:)
      @email = email
      @password = password
    end

    def call
      found_user if found? && right_password?
    end

    private

    def found_user
      @found_user ||= repository.find_by_email(email)
    end

    def found?
      !found_user.nil?
    end

    def right_password?
      BCrypt::Password.new(found_user.password) == password
    end

    def repository
      UserRepository.new
    end
  end
end


text:
@interface PodsDummy_Pods_SQL_FMDBUITests : NSObject
@end
@implementation PodsDummy_Pods_SQL_FMDBUITests
@end


text:
package com.github.liosha2007.android.recipes.craft.view;

import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.github.liosha2007.android.R;
import com.github.liosha2007.android.library.activity.view.BaseActivityView;
import com.github.liosha2007.android.library.common.Utils;
import com.github.liosha2007.android.recipes.craft.controller.RecipeController;
import com.github.liosha2007.android.recipes.craft.database.domain.Icon;
import com.github.liosha2007.android.recipes.craft.database.domain.Item;

/**
 * Created by liosha on 22.04.2014.
 */
public class RecipeView extends BaseActivityView<RecipeController> {

    public RecipeView() {
        super(R.layout.layout_recipe);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        // Tabs functional
        controller.onViewPagerCreated(this.<ViewPager>view(R.id.recipe_viewpager));
        view(R.id.recipe_tab_recipe).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                controller.onRecipeTabClicked(RecipeView.this.<ViewPager>view(R.id.recipe_viewpager));
            }
        });
        view(R.id.recipe_tab_description).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                controller.onDescriptionTabClicked(RecipeView.this.<ViewPager>view(R.id.recipe_viewpager));
            }
        });
        view(R.id.recipe_tab_materials).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                controller.onMaterialsTabClicked(RecipeView.this.<ViewPager>view(R.id.recipe_viewpager));
            }
        });
        view(R.id.recipe_tab_notes).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                controller.onNotesTabClicked(RecipeView.this.<ViewPager>view(R.id.recipe_viewpager));
            }
        });
    }

    public void onRecipeShow(boolean showed) {
        TextView textView = this.view(R.id.recipe_tab_recipe);
        if (textView != null) {
            int textColor = controller.getResources().getColor(R.color.TextLight);
            Drawable backgroundDrawable = controller.getResources().getDrawable(R.drawable.tabselected_background);
            textView.setTextColor(showed ? textColor : Color.BLACK);
            textView.setBackground(showed ? backgroundDrawable : null);
        }
    }

    public void onDescriptionShow(boolean showed) {
        TextView textView = this.view(R.id.recipe_tab_description);
        if (textView != null) {
            int textColor = controller.getResources().getColor(R.color.TextLight);
            Drawable backgroundDrawable = controller.getResources().getDrawable(R.drawable.tabselected_background);
            textView.setTextColor(showed ? textColor : Color.BLACK);
            textView.setBackground(showed ? backgroundDrawable : null);
        }
    }

    public void onMaterialsShow(boolean showed) {
        TextView textView = this.view(R.id.recipe_tab_materials);
        if (textView != null) {
            int textColor = controller.getResources().getColor(R.color.TextLight);
            Drawable backgroundDrawable = controller.getResources().getDrawable(R.drawable.tabselected_background);
            textView.setTextColor(showed ? textColor : Color.BLACK);
            textView.setBackground(showed ? backgroundDrawable : null);
        }
    }

    public void onNotesShow(boolean showed) {
        TextView textView = this.view(R.id.recipe_tab_notes);
        if (textView != null) {
            int textColor = controller.getResources().getColor(R.color.TextLight);
            Drawable backgroundDrawable = controller.getResources().getDrawable(R.drawable.tabselected_background);
            textView.setTextColor(showed ? textColor : Color.BLACK);
            textView.setBackground(showed ? backgroundDrawable : null);
        }
    }

    public void showItemInfo(Item item) {
        if (item != null) {
            this.<TextView>view(R.id.recipe_result_title).setText(item.getName());
            Icon icon = item.getIcon();
            this.<ImageView>view(R.id.recipe_result_icon).setImageBitmap(icon == null ? null : Utils.bytes2bitmap(icon.getIcon())
            );
        }
    }
}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.18010
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace EventStreams.Persistence.Riak.Resources {
    using System;

    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class ExceptionStrings {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal ExceptionStrings() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EventStreams.Persistence.Riak.Resources.ExceptionStrings", typeof(ExceptionStrings).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Failed to commit {0:N0} object(s). Review the inner exception(s) for further information..
        /// </summary>
        internal static string Commit_objects_unexpectantly_failed {
            get {
                return ResourceManager.GetString("Commit_objects_unexpectantly_failed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Pointer object ({0}) exists but it does not contain the expected link ({1}). The bucket is either invalid, corrupted or has been tampered with by a foreign system..
        /// </summary>
        internal static string Corrupt_pointer {
            get {
                return ResourceManager.GetString("Corrupt_pointer", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Head pointer could not be updated..
        /// </summary>
        internal static string Head_pointer_update_failed {
            get {
                return ResourceManager.GetString("Head_pointer_update_failed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Failed to store {0:N0} object(s) (of {1:N0}) as a self-linked but dereferenced unit..
        /// </summary>
        internal static string Object_creation_pre_commitment_failed {
            get {
                return ResourceManager.GetString("Object_creation_pre_commitment_failed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Failed to wire-up the links of {0:N0} object(s); they are self-linked but will remain dereferenced..
        /// </summary>
        internal static string Object_wireup_failed {
            get {
                return ResourceManager.GetString("Object_wireup_failed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Tail pointer could not be updated..
        /// </summary>
        internal static string Tail_pointer_update_failed {
            get {
                return ResourceManager.GetString("Tail_pointer_update_failed", resourceCulture);
            }
        }
    }
}


text:
import qs from 'query-string';

import { MailComposerOptions, MailComposerResult, MailComposerStatus } from './MailComposer.types';

function removeNullishValues(obj) {
  for (const propName in obj) {
    if (obj[propName] == null) {
      delete obj[propName];
    }
  }
  return obj;
}

function checkValue(value?: string[] | string): string | null {
  if (!value) {
    return null;
  }

  const arr = Array.isArray(value) ? value : [value];
  return arr.join(',');
}

export default {
  get name(): string {
    return 'ExpoMailComposer';
  },
  async composeAsync(options: MailComposerOptions): Promise<MailComposerResult> {
    const email = removeNullishValues({
      cc: checkValue(options.ccRecipients),
      bcc: checkValue(options.bccRecipients),
      subject: options.subject,
      body: options.body,
    });

    const query = qs.stringify(email);
    const queryComponent = query ? '?' + query : '';
    const to = checkValue(options.recipients) || '';
    const mailto = `mailto:${to}${queryComponent}`;

    window.open(mailto);

    return { status: MailComposerStatus.UNDETERMINED };
  },
  async isAvailableAsync(): Promise<boolean> {
    return true;
  },
};


text:
package api

import (
	"socialapi/workers/common/handler"
	"socialapi/workers/common/mux"
	"socialapi/workers/helper"
)

// AddHandlers adds handlers of collaboration
func AddHandlers(m *mux.Mux) {
	httpRateLimiter := helper.NewDefaultRateLimiter()

	m.AddHandler(
		handler.Request{
			Handler:   Ping,
			Name:      "collaboration-ping",
			Type:      handler.PostRequest,
			Endpoint:  "/collaboration/ping",
			Ratelimit: httpRateLimiter,
		},
	)

	m.AddHandler(
		handler.Request{
			Handler:  End,
			Name:     "collaboration-end",
			Type:     handler.PostRequest,
			Endpoint: "/collaboration/end",
		},
	)
}


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

namespace Indulged.API.Storage.Models
{
    public class FlickrReply : FlickrModelBase
    {
        public string Message { get; set; }
        public DateTime CreationDate { get; set; }

        public FlickrUser Author { get; set; }
        public bool IsAdmin { get; set; }
        public bool CanDelete { get; set; }
    }
}


text:
Этот проект описан в посте http://dev-blogs.com/simple-spring-app/

Для того чтобы собрать и запустить проект запустите из коммандной строки билд скрипт: ./build.sh


text:
package utils.auth

import com.mohiva.play.silhouette.api.actions.UnsecuredErrorHandler
import play.api.libs.json.Json
import play.api.mvc.{ RequestHeader, Result }
import play.api.mvc.Results._

import scala.concurrent.Future

/**
 * Custom unsecured error handler.
 */
class CustomUnsecuredErrorHandler extends UnsecuredErrorHandler {

  /**
   * Called when a user is authenticated but not authorized.
   *
   * As defined by RFC 2616, the status code of the response should be 403 Forbidden.
   *
   * @param request The request header.
   * @return The result to send to the client.
   */
  override def onNotAuthorized(implicit request: RequestHeader): Future[Result] = {
    Future.successful(Forbidden(Json.obj("error" -> "You are already signed in")))
  }
}


text: Page number two is here!</p>


text:
var Hogan = require('hogan.js'),
    hoganCopy = function (that, ifname, ofname) {
        var template = that.read(ifname)
            data = Hogan.compile(template).render(that.opts)

        that.write(ofname, data)
    }

module.exports.setupBaseDirs = function (that) {
    require('./setup-base-dirs.js')(that.mkdir)
}

module.exports.setupBaseStaticFiles = function (that) {
    that.copy('static/404.jade', 'static/source/jade/404.jade')
    that.copy('static/favicon.ico', 'static/build/img/favicon.ico')
    that.copy('static/robots.txt', 'static/source/robots.txt')
    that.copy('static/script.js', 'static/source/js/main/script.js')
}

module.exports.doCustomizations = function (that) {
    hoganCopy(that, 'package.json', 'package.json')
    hoganCopy(that, 'Gruntfile.js', 'Gruntfile.js')
    hoganCopy(that, 'README.md', 'README.md')
    hoganCopy(that, 'LICENSE', 'LICENSE')
}

module.exports.setupDotFiles = function (that) {
    that.copy('editorconfig', '.editorconfig')
    that.copy('gitattributes', '.gitattributes')
    that.copy('gitignore', '.gitignore')
    that.copy('jshintrc', '.jshintrc')
    if (that.opts.travis === true) {
        that.copy('travis.yml', '.travis.yml')
    }
}

module.exports.setupBootstrap = function (that) {
    hoganCopy(that, 'static-b/layout.jade', 'static/source/jade/layout.jade')
    hoganCopy(that, 'static-b/index.jade', 'static/source/jade/index.jade')
    that.mkdir('static/source/bootstrap')
    that.copy('static-b/init.styl', 'static/source/stylus/main/init.styl')
    that.copy('static-b/css/bootstrap.min.css', 'static/source/bootstrap/bootstrap.min.css')
    that.copy('static-b/js/bootstrap.min.js', 'static/source/bootstrap/bootstrap.min.js')
    that.copy('static-b/img/glyphicons-halflings.png', 'static/build/img/glyphicons-halflings.png')
    that.copy('static-b/img/glyphicons-halflings.png', 'static/build/img/glyphicons-halflings-white.png')
}

module.exports.setupSkeleton = function (that) {
    hoganCopy(that, 'static-s/layout.jade', 'static/source/jade/layout.jade')
    hoganCopy(that, 'static-s/index.jade', 'static/source/jade/index.jade')
    require('./skeleton.js')(that)
}