text:
package tasks // import "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import status "google.golang.org/genproto/googleapis/rpc/status"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] data.
//
// When a task is returned in a response, not all
// information is retrieved by default because some data, such as
// payloads, might be desirable to return only when needed because
// of its large size or because of the sensitivity of data that it
// contains.
type Task_View int32

const (
	// Unspecified. Defaults to BASIC.
	Task_VIEW_UNSPECIFIED Task_View = 0
	// The basic view omits fields which can be large or can contain
	// sensitive data.
	//
	// This view does not include the
	// ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and
	// [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are
	// desirable to return only when needed, because they can be large
	// and because of the sensitivity of the data that you choose to
	// store in it.
	Task_BASIC Task_View = 1
	// All information is returned.
	//
	// Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
	// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
	// permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource.
	Task_FULL Task_View = 2
)

var Task_View_name = map[int32]string{
	0: "VIEW_UNSPECIFIED",
	1: "BASIC",
	2: "FULL",
}
var Task_View_value = map[string]int32{
	"VIEW_UNSPECIFIED": 0,
	"BASIC":            1,
	"FULL":             2,
}

func (x Task_View) String() string {
	return proto.EnumName(Task_View_name, int32(x))
}
func (Task_View) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_task_13bf5c8cc3d069c7, []int{0, 0}
}

// A unit of scheduled work.
type Task struct {
	// Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
	//
	// The task name.
	//
	// The task name must have the following format:
	// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
	//
	// * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
	//    hyphens (-), colons (:), or periods (.).
	//    For more information, see
	//    [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
	// * `LOCATION_ID` is the canonical ID for the task's location.
	//    The list of available locations can be obtained by calling
	//    [ListLocations][google.cloud.location.Locations.ListLocations].
	//    For more information, see https://cloud.google.com/about/locations/.
	// * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
	//   hyphens (-). The maximum length is 100 characters.
	// * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
	//   hyphens (-), or underscores (_). The maximum length is 500 characters.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required.
	//
	// The task's payload is used by the task's target to process the task.
	// A payload is valid only if it is compatible with the queue's target.
	//
	// Types that are valid to be assigned to PayloadType:
	//	*Task_AppEngineHttpRequest
	//	*Task_PullMessage
	PayloadType isTask_PayloadType `protobuf_oneof:"payload_type"`
	// The time when the task is scheduled to be attempted.
	//
	// For App Engine queues, this is when the task will be attempted or retried.
	//
	// For pull queues, this is the time when the task is available to
	// be leased; if a task is currently leased, this is the time when
	// the current lease expires, that is, the time that the task was
	// leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
	//
	// `schedule_time` will be truncated to the nearest microsecond.
	ScheduleTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
	// Output only. The time that the task was created.
	//
	// `create_time` will be truncated to the nearest second.
	CreateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. The task status.
	Status *TaskStatus `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
	// Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
	// been returned.
	View                 Task_View `protobuf:"varint,8,opt,name=view,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"view,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (m *Task) Reset()         { *m = Task{} }
func (m *Task) String() string { return proto.CompactTextString(m) }
func (*Task) ProtoMessage()    {}
func (*Task) Descriptor() ([]byte, []int) {
	return fileDescriptor_task_13bf5c8cc3d069c7, []int{0}
}
func (m *Task) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Task.Unmarshal(m, b)
}
func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Task.Marshal(b, m, deterministic)
}
func (dst *Task) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Task.Merge(dst, src)
}
func (m *Task) XXX_Size() int {
	return xxx_messageInfo_Task.Size(m)
}
func (m *Task) XXX_DiscardUnknown() {
	xxx_messageInfo_Task.DiscardUnknown(m)
}

var xxx_messageInfo_Task proto.InternalMessageInfo

type isTask_PayloadType interface {
	isTask_PayloadType()
}

type Task_AppEngineHttpRequest struct {
	AppEngineHttpRequest *AppEngineHttpRequest `protobuf:"bytes,3,opt,name=app_engine_http_request,json=appEngineHttpRequest,proto3,oneof"`
}
type Task_PullMessage struct {
	PullMessage *PullMessage `protobuf:"bytes,4,opt,name=pull_message,json=pullMessage,proto3,oneof"`
}

func (*Task_AppEngineHttpRequest) isTask_PayloadType() {}
func (*Task_PullMessage) isTask_PayloadType()          {}

func (m *Task) GetPayloadType() isTask_PayloadType {
	if m != nil {
		return m.PayloadType
	}
	return nil
}

func (m *Task) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *Task) GetAppEngineHttpRequest() *AppEngineHttpRequest {
	if x, ok := m.GetPayloadType().(*Task_AppEngineHttpRequest); ok {
		return x.AppEngineHttpRequest
	}
	return nil
}

func (m *Task) GetPullMessage() *PullMessage {
	if x, ok := m.GetPayloadType().(*Task_PullMessage); ok {
		return x.PullMessage
	}
	return nil
}

func (m *Task) GetScheduleTime() *timestamp.Timestamp {
	if m != nil {
		return m.ScheduleTime
	}
	return nil
}

func (m *Task) GetCreateTime() *timestamp.Timestamp {
	if m != nil {
		return m.CreateTime
	}
	return nil
}

func (m *Task) GetStatus() *TaskStatus {
	if m != nil {
		return m.Status
	}
	return nil
}

func (m *Task) GetView() Task_View {
	if m != nil {
		return m.View
	}
	return Task_VIEW_UNSPECIFIED
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*Task) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _Task_OneofMarshaler, _Task_OneofUnmarshaler, _Task_OneofSizer, []interface{}{
		(*Task_AppEngineHttpRequest)(nil),
		(*Task_PullMessage)(nil),
	}
}

func _Task_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*Task)
	// payload_type
	switch x := m.PayloadType.(type) {
	case *Task_AppEngineHttpRequest:
		b.EncodeVarint(3<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.AppEngineHttpRequest); err != nil {
			return err
		}
	case *Task_PullMessage:
		b.EncodeVarint(4<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.PullMessage); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("Task.PayloadType has unexpected type %T", x)
	}
	return nil
}

func _Task_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*Task)
	switch tag {
	case 3: // payload_type.app_engine_http_request
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(AppEngineHttpRequest)
		err := b.DecodeMessage(msg)
		m.PayloadType = &Task_AppEngineHttpRequest{msg}
		return true, err
	case 4: // payload_type.pull_message
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(PullMessage)
		err := b.DecodeMessage(msg)
		m.PayloadType = &Task_PullMessage{msg}
		return true, err
	default:
		return false, nil
	}
}

func _Task_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*Task)
	// payload_type
	switch x := m.PayloadType.(type) {
	case *Task_AppEngineHttpRequest:
		s := proto.Size(x.AppEngineHttpRequest)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Task_PullMessage:
		s := proto.Size(x.PullMessage)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

// Status of the task.
type TaskStatus struct {
	// Output only. The number of attempts dispatched.
	//
	// This count includes tasks which have been dispatched but haven't
	// received a response.
	AttemptDispatchCount int32 `protobuf:"varint,1,opt,name=attempt_dispatch_count,json=attemptDispatchCount,proto3" json:"attempt_dispatch_count,omitempty"`
	// Output only. The number of attempts which have received a response.
	//
	// This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].
	AttemptResponseCount int32 `protobuf:"varint,2,opt,name=attempt_response_count,json=attemptResponseCount,proto3" json:"attempt_response_count,omitempty"`
	// Output only. The status of the task's first attempt.
	//
	// Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
	// The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
	//
	// This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].
	FirstAttemptStatus *AttemptStatus `protobuf:"bytes,3,opt,name=first_attempt_status,json=firstAttemptStatus,proto3" json:"first_attempt_status,omitempty"`
	// Output only. The status of the task's last attempt.
	//
	// This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].
	LastAttemptStatus    *AttemptStatus `protobuf:"bytes,4,opt,name=last_attempt_status,json=lastAttemptStatus,proto3" json:"last_attempt_status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (m *TaskStatus) Reset()         { *m = TaskStatus{} }
func (m *TaskStatus) String() string { return proto.CompactTextString(m) }
func (*TaskStatus) ProtoMessage()    {}
func (*TaskStatus) Descriptor() ([]byte, []int) {
	return fileDescriptor_task_13bf5c8cc3d069c7, []int{1}
}
func (m *TaskStatus) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_TaskStatus.Unmarshal(m, b)
}
func (m *TaskStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_TaskStatus.Marshal(b, m, deterministic)
}
func (dst *TaskStatus) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TaskStatus.Merge(dst, src)
}
func (m *TaskStatus) XXX_Size() int {
	return xxx_messageInfo_TaskStatus.Size(m)
}
func (m *TaskStatus) XXX_DiscardUnknown() {
	xxx_messageInfo_TaskStatus.DiscardUnknown(m)
}

var xxx_messageInfo_TaskStatus proto.InternalMessageInfo

func (m *TaskStatus) GetAttemptDispatchCount() int32 {
	if m != nil {
		return m.AttemptDispatchCount
	}
	return 0
}

func (m *TaskStatus) GetAttemptResponseCount() int32 {
	if m != nil {
		return m.AttemptResponseCount
	}
	return 0
}

func (m *TaskStatus) GetFirstAttemptStatus() *AttemptStatus {
	if m != nil {
		return m.FirstAttemptStatus
	}
	return nil
}

func (m *TaskStatus) GetLastAttemptStatus() *AttemptStatus {
	if m != nil {
		return m.LastAttemptStatus
	}
	return nil
}

// The status of a task attempt.
type AttemptStatus struct {
	// Output only. The time that this attempt was scheduled.
	//
	// `schedule_time` will be truncated to the nearest microsecond.
	ScheduleTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
	// Output only. The time that this attempt was dispatched.
	//
	// `dispatch_time` will be truncated to the nearest microsecond.
	DispatchTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=dispatch_time,json=dispatchTime,proto3" json:"dispatch_time,omitempty"`
	// Output only. The time that this attempt response was received.
	//
	// `response_time` will be truncated to the nearest microsecond.
	ResponseTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"`
	// Output only. The response from the target for this attempt.
	//
	// If the task has not been attempted or the task is currently running
	// then the response status is unset.
	ResponseStatus       *status.Status `protobuf:"bytes,4,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (m *AttemptStatus) Reset()         { *m = AttemptStatus{} }
func (m *AttemptStatus) String() string { return proto.CompactTextString(m) }
func (*AttemptStatus) ProtoMessage()    {}
func (*AttemptStatus) Descriptor() ([]byte, []int) {
	return fileDescriptor_task_13bf5c8cc3d069c7, []int{2}
}
func (m *AttemptStatus) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AttemptStatus.Unmarshal(m, b)
}
func (m *AttemptStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AttemptStatus.Marshal(b, m, deterministic)
}
func (dst *AttemptStatus) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AttemptStatus.Merge(dst, src)
}
func (m *AttemptStatus) XXX_Size() int {
	return xxx_messageInfo_AttemptStatus.Size(m)
}
func (m *AttemptStatus) XXX_DiscardUnknown() {
	xxx_messageInfo_AttemptStatus.DiscardUnknown(m)
}

var xxx_messageInfo_AttemptStatus proto.InternalMessageInfo

func (m *AttemptStatus) GetScheduleTime() *timestamp.Timestamp {
	if m != nil {
		return m.ScheduleTime
	}
	return nil
}

func (m *AttemptStatus) GetDispatchTime() *timestamp.Timestamp {
	if m != nil {
		return m.DispatchTime
	}
	return nil
}

func (m *AttemptStatus) GetResponseTime() *timestamp.Timestamp {
	if m != nil {
		return m.ResponseTime
	}
	return nil
}

func (m *AttemptStatus) GetResponseStatus() *status.Status {
	if m != nil {
		return m.ResponseStatus
	}
	return nil
}

func init() {
	proto.RegisterType((*Task)(nil), "google.cloud.tasks.v2beta2.Task")
	proto.RegisterType((*TaskStatus)(nil), "google.cloud.tasks.v2beta2.TaskStatus")
	proto.RegisterType((*AttemptStatus)(nil), "google.cloud.tasks.v2beta2.AttemptStatus")
	proto.RegisterEnum("google.cloud.tasks.v2beta2.Task_View", Task_View_name, Task_View_value)
}

func init() {
	proto.RegisterFile("google/cloud/tasks/v2beta2/task.proto", fileDescriptor_task_13bf5c8cc3d069c7)
}

var fileDescriptor_task_13bf5c8cc3d069c7 = []byte{
	// 601 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x5f, 0x6f, 0xda, 0x3c,
	0x14, 0xc6, 0x1b, 0x9a, 0xf6, 0x2d, 0xe6, 0xcf, 0xcb, 0x3c, 0xb4, 0x46, 0x68, 0xda, 0x10, 0x52,
	0x57, 0x76, 0x93, 0x6c, 0x6c, 0x37, 0x53, 0xa5, 0xa1, 0x42, 0xa9, 0x40, 0x62, 0x13, 0x0a, 0x6d,
	0xa7, 0x6d, 0x17, 0x91, 0x09, 0x6e, 0x88, 0x9a, 0xc4, 0x5e, 0x7c, 0xd2, 0xaa, 0x9f, 0xa2, 0x5f,
	0x65, 0x1f, 0x71, 0x8a, 0xe3, 0xd0, 0xa1, 0x76, 0xa0, 0xde, 0x71, 0xce, 0x79, 0x7e, 0x8f, 0xed,
	0x47, 0x87, 0xa0, 0x03, 0x8f, 0x31, 0x2f, 0xa0, 0x96, 0x1b, 0xb0, 0x64, 0x6e, 0x01, 0x11, 0x57,
	0xc2, 0xba, 0xee, 0xcc, 0x28, 0x90, 0x8e, 0xac, 0x4c, 0x1e, 0x33, 0x60, 0xb8, 0x91, 0xc9, 0x4c,
	0x29, 0x33, 0xa5, 0xcc, 0x54, 0xb2, 0xc6, 0x4b, 0x65, 0x41, 0xb8, 0x6f, 0x91, 0x28, 0x62, 0x40,
	0xc0, 0x67, 0x91, 0xc8, 0xc8, 0xc6, 0xe1, 0xda, 0x03, 0x62, 0x8f, 0x82, 0x12, 0xbe, 0x56, 0x42,
	0x59, 0xcd, 0x92, 0x4b, 0x0b, 0xfc, 0x90, 0x0a, 0x20, 0x21, 0x57, 0x82, 0x7d, 0x25, 0x88, 0xb9,
	0x6b, 0x09, 0x20, 0x90, 0xa8, 0x23, 0x5a, 0x77, 0x3a, 0xd2, 0xcf, 0x88, 0xb8, 0xc2, 0x18, 0xe9,
	0x11, 0x09, 0xa9, 0xa1, 0x35, 0xb5, 0x76, 0xd1, 0x96, 0xbf, 0xb1, 0x8f, 0xf6, 0x09, 0xe7, 0x0e,
	0x8d, 0x3c, 0x3f, 0xa2, 0xce, 0x02, 0x80, 0x3b, 0x31, 0xfd, 0x95, 0x50, 0x01, 0xc6, 0x76, 0x53,
	0x6b, 0x97, 0x3a, 0xef, 0xcc, 0x7f, 0xbf, 0xcd, 0x3c, 0xe6, 0x7c, 0x20, 0xc9, 0x21, 0x00, 0xb7,
	0x33, 0x6e, 0xb8, 0x65, 0xd7, 0xc9, 0x23, 0x7d, 0x3c, 0x46, 0x65, 0x9e, 0x04, 0x81, 0x13, 0x52,
	0x21, 0x88, 0x47, 0x0d, 0x5d, 0xfa, 0x1f, 0xae, 0xf3, 0x9f, 0x24, 0x41, 0xf0, 0x25, 0x93, 0x0f,
	0xb7, 0xec, 0x12, 0xbf, 0x2f, 0x71, 0x17, 0x55, 0x84, 0xbb, 0xa0, 0xf3, 0x24, 0xa0, 0x4e, 0x1a,
	0x85, 0xb1, 0x23, 0xed, 0x1a, 0xb9, 0x5d, 0x9e, 0x93, 0x79, 0x96, 0xe7, 0x64, 0x97, 0x73, 0x20,
	0x6d, 0xe1, 0x23, 0x54, 0x72, 0x63, 0x4a, 0x40, 0xe1, 0xbb, 0x1b, 0x71, 0x94, 0xc9, 0x25, 0xfc,
	0x19, 0xed, 0x66, 0x19, 0x1b, 0xff, 0x49, 0xee, 0xcd, 0xba, 0x57, 0xa4, 0xe1, 0x4f, 0xa5, 0xda,
	0x56, 0x14, 0xfe, 0x84, 0xf4, 0x6b, 0x9f, 0xde, 0x18, 0x7b, 0x4d, 0xad, 0x5d, 0xed, 0x1c, 0x6c,
	0xa2, 0xcd, 0x0b, 0x9f, 0xde, 0xd8, 0x12, 0x69, 0xbd, 0x47, 0x7a, 0x5a, 0xe1, 0x3a, 0xaa, 0x5d,
	0x8c, 0x06, 0xdf, 0x9c, 0xf3, 0xaf, 0xd3, 0xc9, 0xa0, 0x3f, 0x3a, 0x1d, 0x0d, 0x4e, 0x6a, 0x5b,
	0xb8, 0x88, 0x76, 0x7a, 0xc7, 0xd3, 0x51, 0xbf, 0xa6, 0xe1, 0x3d, 0xa4, 0x9f, 0x9e, 0x8f, 0xc7,
	0xb5, 0x42, 0xaf, 0x8a, 0xca, 0x9c, 0xdc, 0x06, 0x8c, 0xcc, 0x1d, 0xb8, 0xe5, 0xb4, 0xf5, 0xbb,
	0x80, 0xd0, 0xfd, 0xa5, 0xf0, 0x47, 0xf4, 0x82, 0x00, 0xd0, 0x90, 0x83, 0x33, 0xf7, 0x05, 0x27,
	0xe0, 0x2e, 0x1c, 0x97, 0x25, 0x11, 0xc8, 0x4d, 0xd9, 0xb1, 0xeb, 0x6a, 0x7a, 0xa2, 0x86, 0xfd,
	0x74, 0xf6, 0x37, 0x15, 0x53, 0xc1, 0x59, 0x24, 0xa8, 0xa2, 0x0a, 0x2b, 0x94, 0xad, 0x86, 0x19,
	0xf5, 0x13, 0xd5, 0x2f, 0xfd, 0x58, 0x80, 0x93, 0xb3, 0x2a, 0xc6, 0x6c, 0xd9, 0xde, 0xae, 0x5d,
	0xb6, 0x8c, 0x50, 0x49, 0x62, 0x69, 0xb3, 0xd2, 0xc3, 0xdf, 0xd1, 0xf3, 0x80, 0x3c, 0xf4, 0xd6,
	0x9f, 0xea, 0xfd, 0x2c, 0x75, 0x59, 0x69, 0xb5, 0xee, 0x0a, 0xa8, 0xb2, 0x7a, 0xd8, 0x83, 0x05,
	0xd4, 0x9e, 0xb8, 0x80, 0x5d, 0x54, 0x59, 0xc6, 0x2d, 0x0d, 0x0a, 0x9b, 0x0d, 0x72, 0x20, 0x37,
	0x58, 0x26, 0x2f, 0x0d, 0xb6, 0x37, 0x1b, 0xe4, 0x80, 0xfa, 0x0b, 0xfc, 0xbf, 0x34, 0x58, 0xc9,
	0x0a, 0xe7, 0x16, 0x31, 0x77, 0x4d, 0x15, 0x4a, 0x35, 0x97, 0x66, 0x75, 0x2f, 0x42, 0xaf, 0x5c,
	0x16, 0xae, 0x09, 0xb5, 0x57, 0x4c, 0x77, 0x6c, 0x92, 0x5e, 0x62, 0xa2, 0xfd, 0xe8, 0x2a, 0xa1,
	0xc7, 0x02, 0x12, 0x79, 0x26, 0x8b, 0x3d, 0xcb, 0xa3, 0x91, 0xbc, 0xa2, 0x95, 0x8d, 0x08, 0xf7,
	0xc5, 0x63, 0xdf, 0xc1, 0x23, 0x59, 0xcd, 0x76, 0xa5, 0xf6, 0xc3, 0x9f, 0x00, 0x00, 0x00, 0xff,
	0xff, 0x67, 0x07, 0xb1, 0x59, 0x93, 0x05, 0x00, 0x00,
}


text:
package org.apereo.cas.web;

import org.apereo.cas.CasProtocolConstants;
import org.apereo.cas.CentralAuthenticationService;
import org.apereo.cas.authentication.AuthenticationContextValidator;
import org.apereo.cas.authentication.AuthenticationSystemSupport;
import org.apereo.cas.authentication.MultifactorTriggerSelectionStrategy;
import org.apereo.cas.services.ServicesManager;
import org.apereo.cas.ticket.proxy.ProxyHandler;
import org.apereo.cas.validation.CasProtocolValidationSpecification;
import org.apereo.cas.validation.ValidationAuthorizer;
import org.apereo.cas.web.support.ArgumentExtractor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.View;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Set;

/**
 * Proxy validation controller.
 *
 * @author Misagh Moayyed
 * @since 4.2
 */
public class ProxyValidateController extends AbstractServiceValidateController {

    public ProxyValidateController(final CasProtocolValidationSpecification validationSpecification,
                                    final AuthenticationSystemSupport authenticationSystemSupport,
                                    final ServicesManager servicesManager,
                                    final CentralAuthenticationService centralAuthenticationService,
                                    final ProxyHandler proxyHandler,
                                    final ArgumentExtractor argumentExtractor,
                                    final MultifactorTriggerSelectionStrategy multifactorTriggerSelectionStrategy,
                                    final AuthenticationContextValidator authenticationContextValidator,
                                    final View jsonView,
                                    final View successView, final View failureView,
                                    final String authnContextAttribute,
                                   final Set<ValidationAuthorizer> validationAuthorizers) {
        super(validationSpecification, authenticationSystemSupport, servicesManager,
                centralAuthenticationService, proxyHandler, argumentExtractor,
                multifactorTriggerSelectionStrategy, authenticationContextValidator,
                jsonView, successView, failureView, authnContextAttribute, validationAuthorizers);
    }
    /**
     * Handle model and view.
     *
     * @param request  the request
     * @param response the response
     * @return the model and view
     * @throws Exception the exception
     */
    @GetMapping(path = CasProtocolConstants.ENDPOINT_PROXY_VALIDATE)
    @Override
    public ModelAndView handleRequestInternal(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
        return super.handleRequestInternal(request, response);
    }
}

redpajama_set_name: RedPajamaGithub


text:
class FakeVolumeReader : public VolumeReader {
 public:
  FakeVolumeReader();
  ~FakeVolumeReader() override;

  int64_t Read(int64_t bytes_to_read, const void** destination_buffer) override;
  int64_t Skip(int64_t bytes_to_skip);
  int64_t Seek(int64_t offset, base::File::Whence whence) override;
  std::unique_ptr<std::string> Passphrase() override;
};

#endif  // CHROME_BROWSER_RESOURCES_CHROMEOS_ZIP_ARCHIVER_UNPACKER_TEST_CPP_FAKE_VOLUME_READER_H_


text:
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"os/exec"
	"strconv"

	"github.com/hashicorp/go-plugin"
	"github.com/hashicorp/go-plugin/examples/bidirectional/shared"
)

type addHelper struct{}

func (*addHelper) Sum(a, b int64) (int64, error) {
	return a + b, nil
}

func main() {
	// We don't want to see the plugin logs.
	log.SetOutput(ioutil.Discard)

	// We're a host. Start by launching the plugin process.
	client := plugin.NewClient(&plugin.ClientConfig{
		HandshakeConfig: shared.Handshake,
		Plugins:         shared.PluginMap,
		Cmd:             exec.Command("sh", "-c", os.Getenv("COUNTER_PLUGIN")),
		AllowedProtocols: []plugin.Protocol{
			plugin.ProtocolNetRPC, plugin.ProtocolGRPC},
	})
	defer client.Kill()

	// Connect via RPC
	rpcClient, err := client.Client()
	if err != nil {
		fmt.Println("Error:", err.Error())
		os.Exit(1)
	}

	// Request the plugin
	raw, err := rpcClient.Dispense("counter")
	if err != nil {
		fmt.Println("Error:", err.Error())
		os.Exit(1)
	}

	// We should have a Counter store now! This feels like a normal interface
	// implementation but is in fact over an RPC connection.
	counter := raw.(shared.Counter)

	os.Args = os.Args[1:]
	switch os.Args[0] {
	case "get":
		result, err := counter.Get(os.Args[1])
		if err != nil {
			fmt.Println("Error:", err.Error())
			os.Exit(1)
		}

		fmt.Println(result)

	case "put":
		i, err := strconv.Atoi(os.Args[2])
		if err != nil {
			fmt.Println("Error:", err.Error())
			os.Exit(1)
		}

		err = counter.Put(os.Args[1], int64(i), &addHelper{})
		if err != nil {
			fmt.Println("Error:", err.Error())
			os.Exit(1)
		}

	default:
		fmt.Println("Please only use 'get' or 'put'")
		os.Exit(1)
	}
}


text:
package com.sjc.cc.highnetwork.service;

import java.util.List;

import com.sjc.cc.entity.TccHignNetwork;

public interface HignNetworkService {

    // 让虚拟机的IP绑定共有IP
    public boolean enableStaticNat_gt(String networkId, String privateIP,
            String vmId);

    // 私有IP和共有IP地址相互映射
    public boolean enableStaticNat(String ipAddressId, String vmId);

    // 列出所有的共有IP地址
    public boolean listPublicIpAddress(String associatedNetworkId);

    // 创建网络规则
    public boolean createNetWokRule(String networkid);

    // 根据内部IP找到相应的外部IP地址
    public String getPublicIp(String privateIp);

    // 同步cloudstack里面的网络 到本地数据库
    public void synchNetworkTask();

    // 查找可用的虚拟网络
    public List<TccHignNetwork> getAvailableNetwork(String state);

    /**
     * 初始化userMaping表里面的信息
     */
    public void initUserMaping();

}


text:
<?php

use common\models\Hole;
use common\models\Course;
use common\models\Tees;
use common\models\Competition;
use yii\data\ActiveDataProvider;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\helpers\Url;
use kartik\detail\DetailView;

/* @var $this yii\web\View */
/* @var $model app\models\Tees */

/** @TODO
	Hole pictures are valid for all holes on same course!

 */

$this->title = $model->position;
$this->params['breadcrumbs'][] = ['label' => Yii::t('golf', 'Facilities'), 'url' => ['facility/index']];
$this->params['breadcrumbs'][] = ['label' => $model->tees->course->facility->name, 'url' => ['facility/view', 'id' => $model->tees->course->facility_id]];
$this->params['breadcrumbs'][] = ['label' => $model->tees->course->name, 'url' => ['course/view', 'id' => $model->tees->course->id]];
$this->params['breadcrumbs'][] = ['label' => $model->tees->name. ' (' . Yii::t('golf', ucfirst($model->tees->color)) . ')', 'url' => ['tees/view', 'id' => $model->tees->id]];
$this->params['breadcrumbs'][] = $this->title ;
?>

    <?= DetailView::widget([
        'model' => $model,
		'panel'=>[
	        'heading' => '
'.Yii::t('golf', 'Hole').' '.$model->position.'
',
	    ],
		'labelColOptions' => ['style' => 'width: 30%'],
		'buttons1' => '{update}',
        'attributes' => [
			'par',
			'si',
			'length',
        ],
    ]) ?>

	<?=	$this->render('../media/_add', [
		'model' => $model,
	])?>


text:
namespace content {
class BrowserContext;
}

// Implements crosapi::mojom::TtsClient, which is called by ash to handle
// TTS requests to Lacros such as retrieving voice data, etc. It also manages
// To send TTS requests ash. TtsClientLacros is created per BrowserContext.
class TtsClientLacros
    : public extensions::BrowserContextKeyedAPI,
      public crosapi::mojom::TtsClient,
      public net::NetworkChangeNotifier::NetworkChangeObserver,
      public extensions::EventRouter::Observer {
 public:
  explicit TtsClientLacros(content::BrowserContext* context);
  TtsClientLacros(const TtsClientLacros&) = delete;
  TtsClientLacros& operator=(const TtsClientLacros&) = delete;
  ~TtsClientLacros() override;

  // crosapi::mojom::TtsClient:
  void VoicesChanged(
      std::vector<crosapi::mojom::TtsVoicePtr> mojo_all_voices) override;
  void SpeakWithLacrosVoice(
      crosapi::mojom::TtsUtterancePtr utterance,
      crosapi::mojom::TtsVoicePtr voice,
      mojo::PendingRemote<crosapi::mojom::TtsUtteranceClient>
          ash_utterance_client) override;
  void Stop(const std::string& engine_id) override;

  const base::UnguessableToken& browser_context_id() const {
    return browser_context_id_;
  }

  // Returns the cached voices in |out_voices|, which are the voices available
  // for Lacros including the ones provided by both Ash and Lacros.
  void GetAllVoices(std::vector<content::VoiceData>* out_voices);

  // Forwards the given utterance to Ash to be processed by Ash TtsController.
  void SpeakOrEnqueue(std::unique_ptr<content::TtsUtterance> utterance);

  // Handle events received from the Lacros speech engine.
  void OnLacrosSpeechEngineTtsEvent(int utterance_id,
                                    content::TtsEventType event_type,
                                    int char_index,
                                    int length,
                                    const std::string& error_message);

  void DeletePendingUtteranceClient(int utterance_id);

  content::BrowserContext* browser_context() { return browser_context_; }

  static TtsClientLacros* GetForBrowserContext(
      content::BrowserContext* context);

 private:
  class TtsUtteraneClient;
  friend class extensions::BrowserContextKeyedAPIFactory<TtsClientLacros>;

  // net::NetworkChangeNotifier::NetworkChangeObserver:
  void OnNetworkChanged(
      net::NetworkChangeNotifier::ConnectionType type) override;

  // extensions::EventRouter::Observer:
  void OnListenerAdded(const extensions::EventListenerInfo& details) override;
  void OnListenerRemoved(const extensions::EventListenerInfo& details) override;

  bool IsLoadedTtsEngine(const std::string& extension_id) const;
  // Notifies Ash about Lacros voices change.
  void NotifyLacrosVoicesChanged();

  void OnGetAllVoices(std::vector<crosapi::mojom::TtsVoicePtr> mojo_voices);

  // KeyedServivce:
  void Shutdown() override;

  raw_ptr<content::BrowserContext> browser_context_;  // not owned.
  base::UnguessableToken browser_context_id_;
  mojo::Receiver<crosapi::mojom::TtsClient> receiver_{this};

  // Cached voices for |browser_context_|, including both ash and lacros voices.
  std::vector<content::VoiceData> all_voices_;

  bool is_offline_;

  // Pending Lacros Tts Utterance clients by by utterance id.
  std::map<int, std::unique_ptr<TtsUtteraneClient>> pending_utterance_clients_;

  base::WeakPtrFactory<TtsClientLacros> weak_ptr_factory_{this};
};

#endif  // CHROME_BROWSER_SPEECH_TTS_CLIENT_LACROS_H_


text:
package me.nereo.baiduimageview.util;

import android.os.Build;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * Created by Administrator on 2014-07-08.
 */
public class UrlBuilder {

    private String url;
    private StringBuilder sb = new StringBuilder("?");

    public UrlBuilder(String url){
        this.url = url;
    }

    public UrlBuilder add(String key, String val){
        if(sb.length()>1){
            sb.append('&');
        }
        try {
            sb.append(URLEncoder.encode(key, "utf-8"))
                    .append('=')
                    .append(URLEncoder.encode(val, "utf-8"));
        }catch (UnsupportedEncodingException e){
            e.printStackTrace();
        }
        return this;
    }

    public String build(){
        if(sb.length() == 1){
            throw new IllegalStateException("Form encoded body must have at least one part.");
        }
        return this.url+sb.toString();
    }
}


text:
package jadx.core.dex.visitors;

import jadx.core.dex.nodes.*;
import jadx.core.utils.exceptions.*;

/**
 * Visitor interface for traverse dex tree
 */
public interface IDexTreeVisitor {

	/**
	 * Called after loading dex tree, but before visitor traversal.
	 */
	void init(RootNode root) throws JadxException;

	/**
	 * Visit class
	 *
	 * @return false for disable child methods and inner classes traversal
	 * @throws JadxException
	 */
	boolean visit(ClassNode cls) throws JadxException;

	/**
	 * Visit method
	 *
	 * @throws JadxException
	 */
	void visit(MethodNode mth) throws JadxException;
}


text:
import json, os
import tensorflow as tf
from gym.spaces import Discrete, Box

from utils import phis

class BasicAgent(object):
    def __init__(self, config, env):
        if not 'best' in config:
            config['best'] = False
        if not 'debug' in config:
            config['debug'] = False
        if not 'max_iter' in config:
            config['max_iter'] = 1
        if config['best']:
            config.update(self.get_best_config(config['env_name']))

        self.config = config

        if config['debug']:
            print('config', config)

        self.random_seed = config['random_seed']
        self.result_dir = config['result_dir']
        self.max_iter = config['max_iter']

        self.env = env
        if 'nb_state' in config:
            self.nb_state = config['nb_state']
            self.phi = config['phi']
        else:
            if not isinstance(env.observation_space, Box):
                raise Exception('Observation space {} incompatible with {}. (Only supports Box observation spaces.)'.format(action_space, self))
            self.observation_space = env.observation_space
        if not isinstance(env.action_space, Discrete):
            raise Exception('Action space {} incompatible with {}. (Only supports Discrete action spaces.)'.format(action_space, self))
        self.action_space = env.action_space

        # Set custom properties of the agent
        self.set_agent_props()

        # Play part
        self.play_counter = 0

        # Graph part
        self.graph = self.build_graph(tf.Graph())

        # Misc
        with self.graph.as_default():
            self.saver = tf.train.Saver(
                max_to_keep=50,
            )
            self.init_op = tf.global_variables_initializer()

        gpu_options = tf.GPUOptions(allow_growth=True)
        sessConfig = tf.ConfigProto(gpu_options=gpu_options)
        self.sess = tf.Session(config=sessConfig, graph=self.graph)
        self.sw = tf.summary.FileWriter(self.result_dir, self.sess.graph)
        self.init()

    def set_agent_props(self):
        pass

    def get_best_config(self, env_name=""):
        return {}

    @staticmethod
    def get_random_config(fixed_params={}):
        raise Exception('The get_random_config function must be overrided by the agent')

    def build_graph(self, graph):
        raise Exception('The build_graph function must be overrided by the agent')

    def act(self, obs, eps=None):
        raise Exception('The act function must be overrided by the agent')

    def learn_from_episode(self, env):
        raise Exception('The learn_from_episode function must be overrided by the agent')

    def train(self, render=False, save_every=49):
        for episode_id in range(0, self.max_iter):
            self.learn_from_episode(self.env, render)

            if save_every > 0 and episode_id % save_every == 0:
                self.save()

    def save(self):
        global_step_t = tf.train.get_global_step(self.graph)
        global_step, episode_id = self.sess.run([global_step_t, self.episode_id])
        if self.config['debug']:
            print('Saving to %s with global_step %d' % (self.result_dir, global_step))
        self.saver.save(self.sess, self.result_dir + '/agent-ep_' + str(episode_id), global_step)

        if not os.path.isfile(self.result_dir + '/config.json'):
            config = self.config
            if 'phi' in config:
                del config['phi']
            with open(self.result_dir + '/config.json', 'w') as f:
                json.dump(self.config, f)

    def init(self):
        checkpoint = tf.train.get_checkpoint_state(self.result_dir)
        if checkpoint is None:
            self.sess.run(self.init_op)
        else:
            if self.config['debug']:
                print('Loading the model from folder: %s' % self.result_dir)
            self.saver.restore(self.sess, checkpoint.model_checkpoint_path)

    def play(self, env, render=True):
        obs = env.reset()
        score = 0
        done = False
        while True:
            if render:
                env.render()

            act, state = self.act(obs)
            next_obs, reward, done, info = env.step(act)

            score += reward
            obs = next_obs
            if done:
                break

        self.play_counter += 1
        pscore_sum = self.sess.run(self.pscore_sum_t, feed_dict={
            self.pscore_plh: score,
        })
        self.sw.add_summary(pscore_sum, self.play_counter)

        return score

class TabularBasicAgent(BasicAgent):
    """
    Agent implementing tabular Q-learning.
    """
    def __init__(self, config, env):
        if 'debug' in config:
            config.update(phis.getPhiConfig(config['env_name'], config['debug']))
        else:
            config.update(phis.getPhiConfig(config['env_name']))
        super(TabularBasicAgent, self).__init__(config, env)


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 http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>New Test</title>

New Test

	open
	/run/com.vaadin.tests.components.popupview.ReopenPopupView?restartApplication

	mouseClick
	vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VPopupView[0]
	42,5

	click
	//span/span

	assertText
	vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]
	1. Button clicked

	click
	//span/span

	assertText
	vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]
	2. Button clicked

	mouseClick
	vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::
	304,229

	pause

	1000

	mouseClick
	vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VPopupView[0]
	33,6

	click
	//span/span

	assertText
	vaadin=runcomvaadintestscomponentspopupviewReopenPopupView::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]
	3. Button clicked


text:
namespace nodec {

template<typename T>
struct SharedPtr
{
    typedef boost::shared_ptr<T> Type;
};

}

#endif // _NODEC_SHARED_PTR_H_


text:
{% load issues_tags %}
{% load tagging_tags %}
{% load dashboard_tags %}

    {% post_meta_summary issue %}

            {{ issue.title }}

            {{ issue.description|truncatewords_html:70|safe }}

            continue reading ›

            Posted under
            {% if issue.disciplines.all %}
                {% for discipline in issue.disciplines.all %}
                    {% filter_link request "discipline" discipline.slug discipline.name %}{% if not forloop.last %}, {% endif %}
                {% endfor %}
            {% else %}
                no disciplines
            {% endif %}

        {% tags_for_object issue as tags %}
        {% if tags %}

                {% for tag in tags %}

                        {% filter_link request "tag" tag.id tag.name %}

                {% endfor %}

        {% else %}
            no tags
        {% endif %}

        {% if extras %}

                {% if issue.private %}

{% filter_link request "private" 1 "private" %}

                {% endif %}
                {% if issue.sandbox %}

{% filter_link request "sandbox" 1 "sandbox" %}

                {% endif %}
                {% if issue.model_project %}

{% filter_link request "model_project" 1 "model project" %}

                {% endif %}

        {% endif %}


text:
using IniParser;
using IniParser.Model;
using NUnit.Framework;

namespace IniFileParser.Tests.Unit.Parser
{
    [TestFixture]
    public class StringIniDataParserTests
    {
        [Test, Description("Test for Issue 2: http://code.google.com/p/ini-parser/issues/detail?id=2")]
        public void not_reproduced_error_tests()
        {
            string test = "[ExampleSection]\nkey = value;value\n";

            StringIniParser strParser = new StringIniParser();

            IniData data = strParser.ParseString(test);

            Assert.That(data.Sections.Count, Is.EqualTo(1));
            Assert.That(data.Sections["ExampleSection"], Is.Not.Null);
            Assert.That(data.Sections["ExampleSection"].Count, Is.EqualTo(1));
            Assert.That(data.Sections["ExampleSection"]["key"], Is.EqualTo("value;value"));
        }

        /// <summary>
        ///     Thanks to h.eriksson@artamir.org for the issue.
        /// </summary>
        [Test, Description("Test for Issue 6: http://code.google.com/p/ini-parser/issues/detail?id=6")]
        public void check_that_comment_char_is_not_stored_as_the_key()
        {
            string data = "[data]" + System.Environment.NewLine + "key = value;";

            IniData inidata = new StringIniParser().ParseString(data);

            Assert.That(inidata["data"]["key"], Is.EqualTo("value;"));
        }

    }
}


text:
package org.apache.felix.http.base.internal.context;

import org.junit.Before;
import org.junit.Test;
import org.junit.Assert;
import org.mockito.Mockito;
import org.osgi.framework.Bundle;
import org.osgi.service.http.HttpContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
import java.io.InputStream;
import java.net.URL;
import java.util.*;

public class ServletContextImplTest
{
    private Bundle bundle;
    private HttpContext httpContext;
    private AttributeListener listener;
    private ServletContextImpl context;

    @Before
    public void setUp()
    {
        this.bundle = Mockito.mock(Bundle.class);
        ServletContext globalContext = Mockito.mock(ServletContext.class);
        this.httpContext = Mockito.mock(HttpContext.class);
        this.listener = new AttributeListener();
        this.context = new ServletContextImpl(this.bundle, globalContext, this.httpContext, this.listener, false);
    }

    @Test
    public void testGetResource()
        throws Exception
    {
        URL url = getClass().getResource("resource.txt");
        Assert.assertNotNull(url);

        Mockito.when(this.httpContext.getResource("resource.txt")).thenReturn(url);
        Assert.assertNull(this.context.getResource("/notfound.txt"));
        Assert.assertEquals(url, this.context.getResource("/resource.txt"));
    }

    @Test
    public void testGetResourceAsStream()
        throws Exception
    {
        URL url = getClass().getResource("resource.txt");
        Assert.assertNotNull(url);

        Mockito.when(this.httpContext.getResource("resource.txt")).thenReturn(url);
        Assert.assertNull(this.context.getResourceAsStream("/notfound.txt"));
        Assert.assertNotNull(this.context.getResourceAsStream("/resource.txt"));
    }

    @Test
    public void testGetResourcePaths()
    {
        HashSet<String> paths = new HashSet<String>(Arrays.asList("/some/path/1", "/some/path/2"));
        Mockito.when(this.bundle.getEntryPaths("some/path")).thenReturn(Collections.enumeration(paths));

        Set set = this.context.getResourcePaths("/some/path");
        Assert.assertNotNull(set);
        Assert.assertEquals(2, set.size());
        Assert.assertTrue(set.contains("/some/path/1"));
        Assert.assertTrue(set.contains("/some/path/2"));
    }

    @Test
    public void testGetRealPath()
    {
        Assert.assertNull(this.context.getRealPath("path"));
    }

    @Test
    public void testGetInitParameter()
    {
        Assert.assertNull(this.context.getInitParameter("key1"));
    }

    @Test
    public void testGetInitParameterNames()
    {
        Enumeration e = this.context.getInitParameterNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
    }

    @Test
    public void testGetAttribute()
    {
        Assert.assertNull(this.context.getAttribute("key1"));

        this.context.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        Assert.assertEquals("value1", this.context.getAttribute("key1"));

        this.context.removeAttribute("key1");
        this.listener.checkRemoved("key1", "value1");
        Assert.assertNull(this.context.getAttribute("key1"));

        this.context.setAttribute("key1", null);
        this.listener.checkNull();
        Assert.assertNull(this.context.getAttribute("key1"));

        this.context.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        Assert.assertEquals("value1", this.context.getAttribute("key1"));

        this.context.setAttribute("key1", "newValue");
        this.listener.checkReplaced("key1", "value1");
        Assert.assertEquals("newValue", this.context.getAttribute("key1"));
    }

    @Test
    public void testGetAttributeNames()
    {
        Enumeration e = this.context.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());

        this.context.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        e = this.context.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertTrue(e.hasMoreElements());
        Assert.assertEquals("key1", e.nextElement());
        Assert.assertFalse(e.hasMoreElements());
    }

    @Test
    public void testGetSharedAttribute()
    {
        ServletContext globalContext = new MockServletContext();
        ServletContext ctx1 = new ServletContextImpl(bundle, globalContext, httpContext, listener, true);
        ServletContext ctx2 = new ServletContextImpl(bundle, globalContext, httpContext, listener, true);

        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertNull(ctx2.getAttribute("key1"));
        Assert.assertNull(globalContext.getAttribute("key1"));

        // Operations on ctx1 and check results

        ctx1.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        Assert.assertEquals("value1", ctx1.getAttribute("key1"));
        Assert.assertEquals("value1", ctx2.getAttribute("key1"));
        Assert.assertEquals("value1", globalContext.getAttribute("key1"));

        ctx1.removeAttribute("key1");
        this.listener.checkRemoved("key1", "value1");
        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertNull(ctx2.getAttribute("key1"));
        Assert.assertNull(globalContext.getAttribute("key1"));

        ctx1.setAttribute("key1", null);
        this.listener.checkNull();
        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertNull(ctx2.getAttribute("key1"));
        Assert.assertNull(globalContext.getAttribute("key1"));

        ctx1.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        Assert.assertEquals("value1", ctx1.getAttribute("key1"));
        Assert.assertEquals("value1", ctx2.getAttribute("key1"));
        Assert.assertEquals("value1", globalContext.getAttribute("key1"));

        ctx1.setAttribute("key1", "newValue");
        this.listener.checkReplaced("key1", "value1");
        Assert.assertEquals("newValue", ctx1.getAttribute("key1"));
        Assert.assertEquals("newValue", ctx2.getAttribute("key1"));
        Assert.assertEquals("newValue", globalContext.getAttribute("key1"));

        ctx1.removeAttribute("key1");

        // Operations on ctx2 and check results

        ctx2.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        Assert.assertEquals("value1", ctx1.getAttribute("key1"));
        Assert.assertEquals("value1", ctx2.getAttribute("key1"));
        Assert.assertEquals("value1", globalContext.getAttribute("key1"));

        ctx2.removeAttribute("key1");
        this.listener.checkRemoved("key1", "value1");
        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertNull(ctx2.getAttribute("key1"));
        Assert.assertNull(globalContext.getAttribute("key1"));

        ctx2.setAttribute("key1", null);
        this.listener.checkNull();
        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertNull(ctx2.getAttribute("key1"));
        Assert.assertNull(globalContext.getAttribute("key1"));

        ctx2.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        Assert.assertEquals("value1", ctx1.getAttribute("key1"));
        Assert.assertEquals("value1", ctx2.getAttribute("key1"));
        Assert.assertEquals("value1", globalContext.getAttribute("key1"));

        ctx2.setAttribute("key1", "newValue");
        this.listener.checkReplaced("key1", "value1");
        Assert.assertEquals("newValue", ctx1.getAttribute("key1"));
        Assert.assertEquals("newValue", ctx2.getAttribute("key1"));
        Assert.assertEquals("newValue", globalContext.getAttribute("key1"));

        ctx2.removeAttribute("key1");

        // Operations on globalContext and check results

        globalContext.setAttribute("key1", "value1");
        Assert.assertEquals("value1", ctx1.getAttribute("key1"));
        Assert.assertEquals("value1", ctx2.getAttribute("key1"));
        Assert.assertEquals("value1", globalContext.getAttribute("key1"));

        globalContext.removeAttribute("key1");
        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertNull(ctx2.getAttribute("key1"));
        Assert.assertNull(globalContext.getAttribute("key1"));

        globalContext.setAttribute("key1", null);
        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertNull(ctx2.getAttribute("key1"));
        Assert.assertNull(globalContext.getAttribute("key1"));

        globalContext.setAttribute("key1", "value1");
        Assert.assertEquals("value1", ctx1.getAttribute("key1"));
        Assert.assertEquals("value1", ctx2.getAttribute("key1"));
        Assert.assertEquals("value1", globalContext.getAttribute("key1"));

        globalContext.setAttribute("key1", "newValue");
        Assert.assertEquals("newValue", ctx1.getAttribute("key1"));
        Assert.assertEquals("newValue", ctx2.getAttribute("key1"));
        Assert.assertEquals("newValue", globalContext.getAttribute("key1"));

        globalContext.removeAttribute("key1");
    }

    @Test
    public void testGetSharedAttributeNames()
    {
        ServletContext globalContext = new MockServletContext();
        ServletContext ctx1 = new ServletContextImpl(bundle, globalContext, httpContext, listener, true);
        ServletContext ctx2 = new ServletContextImpl(bundle, globalContext, httpContext, listener, true);

        Enumeration e = ctx1.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
        e = ctx2.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
        e = globalContext.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());

        ctx1.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        e = ctx1.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertTrue(e.hasMoreElements());
        Assert.assertEquals("key1", e.nextElement());
        Assert.assertFalse(e.hasMoreElements());
        e = ctx2.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertTrue(e.hasMoreElements());
        Assert.assertEquals("key1", e.nextElement());
        Assert.assertFalse(e.hasMoreElements());
        e = globalContext.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertTrue(e.hasMoreElements());
        Assert.assertEquals("key1", e.nextElement());
        Assert.assertFalse(e.hasMoreElements());
    }

    @Test
    public void testGetUnsharedAttribute()
    {
        ServletContext globalContext = new MockServletContext();
        ServletContext ctx1 = new ServletContextImpl(bundle, globalContext, httpContext, listener, false);
        ServletContext ctx2 = new ServletContextImpl(bundle, globalContext, httpContext, listener, false);

        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertNull(ctx2.getAttribute("key1"));
        Assert.assertNull(globalContext.getAttribute("key1"));

        // Operations on ctx1 and check results

        ctx2.setAttribute("key1", "ctx2_private_value");
        globalContext.setAttribute("key1", "globalContext_private_value");
        ctx1.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        Assert.assertEquals("value1", ctx1.getAttribute("key1"));
        Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
        Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));

        ctx1.removeAttribute("key1");
        this.listener.checkRemoved("key1", "value1");
        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
        Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));

        ctx1.setAttribute("key1", null);
        this.listener.checkNull();
        Assert.assertNull(ctx1.getAttribute("key1"));
        Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
        Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));

        ctx1.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        Assert.assertEquals("value1", ctx1.getAttribute("key1"));
        Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
        Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));

        ctx1.setAttribute("key1", "newValue");
        this.listener.checkReplaced("key1", "value1");
        Assert.assertEquals("newValue", ctx1.getAttribute("key1"));
        Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
        Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));
    }

    @Test
    public void testGetUnsharedAttributeNames()
    {
        ServletContext globalContext = new MockServletContext();
        ServletContext ctx1 = new ServletContextImpl(bundle, globalContext, httpContext, listener, false);
        ServletContext ctx2 = new ServletContextImpl(bundle, globalContext, httpContext, listener, false);

        Enumeration e = ctx1.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
        e = ctx2.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
        e = globalContext.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());

        ctx1.setAttribute("key1", "value1");
        this.listener.checkAdded("key1", "value1");
        e = ctx1.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertTrue(e.hasMoreElements());
        Assert.assertEquals("key1", e.nextElement());
        Assert.assertFalse(e.hasMoreElements());
        e = ctx2.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
        e = globalContext.getAttributeNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
    }

    @Test
    public void testGetServlet()
        throws Exception
    {
        Assert.assertNull(this.context.getServlet("test"));
    }

    @Test
    public void testGetServletNames()
    {
        Enumeration e = this.context.getServletNames();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
    }

    @Test
    public void testGetServlets()
    {
        Enumeration e = this.context.getServlets();
        Assert.assertNotNull(e);
        Assert.assertFalse(e.hasMoreElements());
    }

    @Test
    public void testGetMimeType()
    {
        Mockito.when(this.httpContext.getMimeType("file.xml")).thenReturn("some-other-format");
        Assert.assertEquals("some-other-format", this.context.getMimeType("file.xml"));
        Assert.assertEquals("text/plain", this.context.getMimeType("file.txt"));
    }

    @Test
    public void testHandleSecurity()
        throws Exception
    {
        HttpServletRequest req = Mockito.mock(HttpServletRequest.class);
        HttpServletResponse res = Mockito.mock(HttpServletResponse.class);

        Mockito.when(this.httpContext.handleSecurity(req, res)).thenReturn(true);
        Assert.assertTrue(this.context.handleSecurity(req, res));

        Mockito.when(this.httpContext.handleSecurity(req, res)).thenReturn(false);
        Assert.assertFalse(this.context.handleSecurity(req, res));
    }

    private static class AttributeListener implements ServletContextAttributeListener
    {

        private int type;

        private String name;

        private Object value;

        public void attributeAdded(ServletContextAttributeEvent scab)
        {
            setData(1, scab);
        }

        public void attributeRemoved(ServletContextAttributeEvent scab)
        {
            setData(2, scab);
        }

        public void attributeReplaced(ServletContextAttributeEvent scab)
        {
            setData(3, scab);
        }

        private void setData(int type, ServletContextAttributeEvent scab)
        {
            this.type = type;
            this.name = scab.getName();
            this.value = scab.getValue();
        }

        void checkAdded(String name, Object value)
        {
            check(1, name, value);
        }

        void checkRemoved(String name, Object value)
        {
            check(2, name, value);
        }

        void checkReplaced(String name, Object value)
        {
            check(3, name, value);
        }

        void checkNull()
        {
            check(0, null, null);
        }

        private void check(int type, String name, Object value)
        {
            try
            {
                Assert.assertEquals(type, this.type);
                Assert.assertEquals(name, this.name);
                Assert.assertEquals(value, this.value);
            }
            finally
            {
                this.type = 0;
                this.name = null;
                this.value = null;
            }
        }
    }

    private class MockServletContext implements ServletContext {

        private Dictionary attributes = new Hashtable();

        public Object getAttribute(String name)
        {
            return attributes.get(name);
        }

        public Enumeration getAttributeNames()
        {
            return attributes.keys();
        }

        public void setAttribute(String name, Object object)
        {
            if (object != null)
            {
                attributes.put(name, object);
            }
            else
            {
                removeAttribute(name);
            }
        }

        public void removeAttribute(String name)
        {
            attributes.remove(name);
        }

        public String getContextPath()
        {
            return null;
        }

        public ServletContext getContext(String uripath)
        {
            return null;
        }

        public int getMajorVersion()
        {
            return 0;
        }

        public int getMinorVersion()
        {
            return 0;
        }

        public String getMimeType(String file)
        {
            return null;
        }

        public Set getResourcePaths(String path)
        {
            return null;
        }

        public URL getResource(String path)
        {
            return null;
        }

        public InputStream getResourceAsStream(String path)
        {
            return null;
        }

        public RequestDispatcher getRequestDispatcher(String path)
        {
            return null;
        }

        public RequestDispatcher getNamedDispatcher(String name)
        {
            return null;
        }

        public Servlet getServlet(String name)
        {
            return null;
        }

        public Enumeration getServlets()
        {
            return null;
        }

        public Enumeration getServletNames()
        {
            return null;
        }

        public void log(String msg)
        {
        }

        public void log(Exception exception, String msg)
        {
        }

        public void log(String message, Throwable throwable)
        {
        }

        public String getRealPath(String path)
        {
            return null;
        }

        public String getServerInfo()
        {
            return null;
        }

        public String getInitParameter(String name)
        {
            return null;
        }

        public Enumeration getInitParameterNames()
        {
            return null;
        }

        public String getServletContextName()
        {
            return null;
        }
    }
}


text:
package com.incors.plaf.kunststoff;

/*
 * This code was developed by INCORS GmbH (www.incors.com).
 * It is published under the terms of the GNU Lesser General Public License.
 */

import java.awt.*;
import javax.swing.plaf.metal.*;

public class KunststoffCheckBoxIcon extends MetalCheckBoxIcon {

  public void paintIcon(Component c, Graphics g, int x, int y) {
    super.paintIcon(c, g, x, y);

    int controlSize = getControlSize();

    // paint upper gradient
    Color colorReflection = KunststoffLookAndFeel.getComponentGradientColorReflection();
    if (colorReflection != null) {
      Color colorReflectionFaded = KunststoffUtilities.getTranslucentColor(colorReflection, 0);
      Rectangle rect = new Rectangle(x, y, controlSize, controlSize/2);
      KunststoffUtilities.drawGradient(g, colorReflection, colorReflectionFaded, rect, true);
    }
    // paint lower gradient
    Color colorShadow = KunststoffLookAndFeel.getComponentGradientColorShadow();
    if (colorShadow != null) {
      Color colorShadowFaded = KunststoffUtilities.getTranslucentColor(colorShadow, 0);
      Rectangle rect = new Rectangle(x, x+controlSize/2, controlSize, controlSize/2);
      KunststoffUtilities.drawGradient(g, colorShadowFaded, colorShadow, rect, true);
    }

  }
}


text:
layout: page
title: NOW CLOSED HipSci Rare Disease – Expressions of Interest
redirect_from:
    - /hipsci-rare-disease-expressions-interest/
---

**This call is now closed**

We are looking to hear from clinicians (or scientist with access to relevant
patient cases) working with patients with inherited genetic diseases, where a
collection of disease causing mutations has already been identified, and the
group would be interested in having iPS lines generated from some of your
patients that you would use in further studies.

Please note that at this stage this is only an Expression of Interest and not a
final call for proposals. The results will allow us to plan the use our
remaining resources most efficiently.

Please contact us if you have a group of (between 10 and 50) patients with
related phenotypes where you would be able to provide us with patient material
(either fibroblasts or a skin biopsy).


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace Serialize.Linq.Tests.Internals
{
    internal static class SerializerTestData
    {
        private static readonly int[] _arrayOfIds = { 6, 7, 8, 9, 10 };
        private static readonly List<int> _listOfIds = new List<int> { 6, 7, 8, 9, 10 };
        public static readonly List<Expression> TestExpressions = new List<Expression>
        {
            null,
            (Expression<Func<bool, bool>>)(b => b),
            (Expression<Func<Bar, bool>>)(p => p.LastName == "Miller" && p.FirstName.StartsWith("M")),
            (Expression<Func<Bar, bool>>)(p => (new [] { 1, 2, 3, 4, 5 }).Contains(p.Id)),
            (Expression<Func<bool>>)(() => true),
            (Expression<Func<bool>>)(() => false),
            (Expression<Func<bool>>)(() => 5 != 4),
            (Expression<Func<int>>)(() => 42),
            (Expression<Func<Guid>>)(() => Guid.NewGuid()),
            (Expression<Func<Guid>>)(() => new Guid("00000000-0000-0000-0000-00000000000")),
            (Expression<Func<Guid>>)(() => Guid.Empty),
            (Expression<Func<DayOfWeek, bool>>)(p => p == DayOfWeek.Monday),
            (Expression<Func<Struct>>)(() => new Struct()),
            (Expression<Func<Struct, string>>)(s => s.Name),
            (Expression<Func<EmptyStruct>>)(() => new EmptyStruct()),
            (Expression<Func<Bar>>)(() => new Bar()),
            (Expression<Func<IEnumerable<int>, IEnumerable<int>>>)(c => from x in c let a = 100 where (x == a) select x)

        };
        public static readonly Expression[] TestNodesOnlyExpressions =
        {
            (Expression<Func<Bar, bool>>)(p => _arrayOfIds.Contains(p.Id)),
            (Expression<Func<Bar, bool>>)(p => _listOfIds.Contains(p.Id))
        };

        static SerializerTestData()
        {
            AddLetExpressions();
        }

        private static void AddLetExpressions()
        {
            Expression<Func<IEnumerable<int>, IEnumerable<int>>> intExpr = c =>
                from x in c
                let test = 8
                where x == test
                select x;
            TestExpressions.Add(intExpr);

            Expression<Func<IEnumerable<string>, IEnumerable<string>>> strExpr = c =>
                from x in c
                let test = "bar"
                where x == test
                select x;
            TestExpressions.Add(strExpr);
        }
    }
}


text:
package sorcer.service;

import sorcer.service.modeling.Model;

/**
 * Implicit Maps such that a path indicates internal structure of composition
 * with the last inner component indicated by the path. Contexts, Exertions,
 * Vars are examples of mappables.
 *
 * @author Mike Sobolewski
 */
public interface Mappable<T> extends Identifiable {

	/**
	 * Returns a value at the path.
	 *
	 * @param path
	 *            the attribute-based path
	 * @return this mappable value
	 * @throws ContextException
	 */
	public T getValue(String path, Arg... args)
			throws ContextException;

	/**
	 * Returns a value at the path as is with no reevaluation.
	 *
	 * @param path
	 *            the attribute-based path
	 * @return this mappable value with no reevaluation
	 * @throws ContextException
	 */
	public T asis(String path) throws ContextException;

	/**
	 * Maps the specified path to the specified value
	 * in this mappable. Neither the path nor the value can be
	 * null.

	 *
	 * The value can be retrieved by calling the getValue method with a
	 * path that is equal to the original path.
	 *
	 * @param path the attribute-based path
	 *
	 * @param value the new value
	 *
	 * @return the previous value of the specified path in this mappable, or
	 * null if it did not have one
	 *
	 * @throws ContextException
	 */
	public T putValue(String path, Object value) throws ContextException;

}


text:
(function () {
	var result = document.getElementById('result');
	var tplEditor = ace.edit("template");
	tplEditor.setTheme("ace/theme/github");
	tplEditor.getSession().setMode("ace/mode/ejs");
	tplEditor.setHighlightActiveLine(false);
	tplEditor.on('change', render);
	var dataEditor = ace.edit("data");
	dataEditor.setTheme("ace/theme/github");
	dataEditor.getSession().setMode("ace/mode/json");
	dataEditor.setHighlightActiveLine(false);
	dataEditor.on('change', render);

	window.dataLayer = window.dataLayer || [];

	gotpl.config({
		debug: true
	});

	function render() {
		var tpl = tplEditor.getValue();
		var json = dataEditor.getValue();
		try {
			var data = JSON.parse(json);
			result.innerHTML = gotpl.render(tpl, data);
		} catch (e) {
			console.error(e);
			result.innerHTML = '<pre>' + htmlEncode(e.message) + '</pre>';
		}
	}

	function htmlEncode(str) {
		var ele = document.createElement('div');
		ele.appendChild(document.createTextNode(str));
		return ele.innerHTML;
	}

	function gtag() {
		dataLayer.push(arguments);
	}

	render();

	gtag('js', new Date());
	gtag('config', 'UA-57981079-1');
	gtag('event', 'pv', {event_category: 'gotpl'});
})();


text:
<title>OGRE: Ogre::ShadowTextureManager Class Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="doxygen.css">
<link type="text/css" rel="stylesheet" href="tabs.css">

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Directories

Class List

Class Index

Class Hierarchy

Class Members

Ogre

Ogre::ShadowTextureManager

Public Member Functions |
Static Public Member Functions |
Protected Attributes |
Static Protected Attributes

Ogre::ShadowTextureManager Class Reference

[Scene]

Class to manage the available shadow textures which may be shared between many SceneManager instances if formats agree.
More...

#include <OgreShadowTextureManager.h>

Inheritance diagram for Ogre::ShadowTextureManager:

<map name="Ogre_1_1ShadowTextureManager_inherit__map" id="Ogre_1_1ShadowTextureManager_inherit__map">
<area shape="rect" id="node2" href="classOgre_1_1Singleton.html" title="Ogre::Singleton\< ShadowTextureManager \>" alt="" coords="5,5,307,35"/><area shape="rect" id="node4" href="classOgre_1_1AllocatedObject.html" title="Superclass for all objects that wish to use custom memory allocators when their new / delete operator..." alt="" coords="331,5,464,35"/></map>
[legend]

List of all members.

Public Member Functions

 	ShadowTextureManager ()

virtual 	~ShadowTextureManager ()

virtual void 	getShadowTextures (const ShadowTextureConfigList &config, ShadowTextureList &listToPopulate)

 	Populate an incoming list with shadow texture references as requested in the configuration list.

virtual TexturePtr 	getNullShadowTexture (PixelFormat format)

 	Get an appropriately defined 'null' texture, i.e.

virtual void 	clearUnused ()

 	Remove any shadow textures that are no longer being referenced.

virtual void 	clear ()

 	Dereference all the shadow textures kept in this class and remove them from TextureManager; note that it is up to the SceneManagers to clear their local references.

void * 	operator new (size_t sz, const char *file, int line, const char *func)

 	operator new, with debug line info

void * 	operator new (size_t sz)

void * 	operator new (size_t sz, void *ptr)

 	placement operator new

void * 	operator new[] (size_t sz, const char *file, int line, const char *func)

 	array operator new, with debug line info

void * 	operator new[] (size_t sz)

void 	operator delete (void *ptr)

void 	operator delete (void *ptr, void *)

void 	operator delete (void *ptr, const char *, int, const char *)

void 	operator delete[] (void *ptr)

void 	operator delete[] (void *ptr, const char *, int, const char *)

Static Public Member Functions

static ShadowTextureManager & 	getSingleton (void)

 	Override standard Singleton retrieval.

static ShadowTextureManager * 	getSingletonPtr (void)

 	Override standard Singleton retrieval.

static ShadowTextureManager & 	getSingleton (void)

static ShadowTextureManager * 	getSingletonPtr (void)

Protected Attributes

ShadowTextureList 	mTextureList

ShadowTextureList 	mNullTextureList

size_t 	mCount

Static Protected Attributes

static ShadowTextureManager * 	ms_Singleton

Detailed Description

Class to manage the available shadow textures which may be shared between many SceneManager instances if formats agree.

Remarks:

The management of the list of shadow textures has been separated out into a dedicated class to enable the clean management of shadow textures across many scene manager instances. Where multiple scene managers are used with shadow textures, the configuration of those shadows may or may not be consistent - if it is, it is good to centrally manage the textures so that creation and destruction responsibility is clear.

Definition at line 79 of file OgreShadowTextureManager.h.

Constructor & Destructor Documentation

          Ogre::ShadowTextureManager::ShadowTextureManager
          (

           )

          virtual Ogre::ShadowTextureManager::~ShadowTextureManager
          (

           )
           [virtual]

Member Function Documentation

          virtual void Ogre::ShadowTextureManager::clear
          (

           )
           [virtual]

Dereference all the shadow textures kept in this class and remove them from TextureManager; note that it is up to the SceneManagers to clear their local references.

          virtual void Ogre::ShadowTextureManager::clearUnused
          (

           )
           [virtual]

Remove any shadow textures that are no longer being referenced.

Remarks:

This should be called fairly regularly since references may take a little while to disappear in some cases (if referenced by materials)

          virtual TexturePtr Ogre::ShadowTextureManager::getNullShadowTexture
          (
          PixelFormat
           format
           )
           [virtual]

Get an appropriately defined 'null' texture, i.e.

one which will always result in no shadows.

          virtual void Ogre::ShadowTextureManager::getShadowTextures
          (
          const ShadowTextureConfigList &
           config,

          ShadowTextureList &
           listToPopulate

          )
          		 [virtual]

Populate an incoming list with shadow texture references as requested in the configuration list.

          static ShadowTextureManager& Ogre::ShadowTextureManager::getSingleton
          (
          void

           )
           [static]

Override standard Singleton retrieval.

Remarks:

Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

          static ShadowTextureManager & Ogre::Singleton< ShadowTextureManager  >::getSingleton
          (
          void

           )
           [static, inherited]

Definition at line 90 of file OgreSingleton.h.

          static ShadowTextureManager * Ogre::Singleton< ShadowTextureManager  >::getSingletonPtr
          (
          void

           )
           [static, inherited]

Definition at line 92 of file OgreSingleton.h.

          static ShadowTextureManager* Ogre::ShadowTextureManager::getSingletonPtr
          (
          void

           )
           [static]

Override standard Singleton retrieval.

Remarks:

Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete
          (
          void *
           ptr,

          void *

          )
          		 [inherited]

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete
          (
          void *
           ptr,

          const char *
          ,

          int
          ,

          const char *

          )
          		 [inherited]

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete
          (
          void *
           ptr
           )
           [inherited]

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete[]
          (
          void *
           ptr,

          const char *
          ,

          int
          ,

          const char *

          )
          		 [inherited]

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void Ogre::AllocatedObject< Alloc >::operator delete[]
          (
          void *
           ptr
           )
           [inherited]

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new
          (
          size_t
           sz
           )
           [inherited]

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new
          (
          size_t
           sz,

          const char *
           file,

          int
           line,

          const char *
           func

          )
          		 [inherited]

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new
          (
          size_t
           sz,

          void *
           ptr

          )
          		 [inherited]

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new[]
          (
          size_t
           sz
           )
           [inherited]

Definition at line 90 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

          void* Ogre::AllocatedObject< Alloc >::operator new[]
          (
          size_t
           sz,

          const char *
           file,

          int
           line,

          const char *
           func

          )
          		 [inherited]

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

Member Data Documentation

          size_t Ogre::ShadowTextureManager::mCount [protected]

Definition at line 84 of file OgreShadowTextureManager.h.

          ShadowTextureList Ogre::ShadowTextureManager::mNullTextureList [protected]

Definition at line 83 of file OgreShadowTextureManager.h.

          ShadowTextureManager * Ogre::Singleton< ShadowTextureManager  >::ms_Singleton [static, protected, inherited]

Definition at line 75 of file OgreSingleton.h.

          ShadowTextureList Ogre::ShadowTextureManager::mTextureList [protected]

Definition at line 82 of file OgreShadowTextureManager.h.

The documentation for this class was generated from the following file:

OgreShadowTextureManager.h

Copyright © 2008 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Last modified Wed Nov 3 2010 19:25:01


text:
source `dirname $0`/../common.sh

docker run -v $OUTPUT_DIR:/tmp/output -v $CACHE_DIR:/tmp/cache -e VERSION=2.5.5  -e STACK=cedar-14 hone/ruby-builder:cedar-14


text:
package com.scientificsoft.iremote.android.iremote.tools.activitymanager;

import com.scientificsoft.iremote.android.iremote.tools.ContextHolder;

import android.app.Activity;
import android.os.Bundle;

abstract public class ManagedActivity extends Activity {

	abstract public int getActivityGroupId();

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		ContextHolder.instance().activityManager().onCreate(getActivityGroupId(), this);
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		ContextHolder.instance().activityManager().onDestroy(getActivityGroupId(), this);
	}

    @Override
    public void onPause() {
        super.onPause();
        ContextHolder.instance().activityManager().onPause(getActivityGroupId(), this);
    }

    @Override
    public void onResume() {
        super.onResume();
        ContextHolder.instance().activityManager().onResume(getActivityGroupId(), this);
    }
}


text:
package com.android.rahul.myselfieapp.Storage;

import android.net.Uri;

import net.simonvt.schematic.annotation.ContentProvider;
import net.simonvt.schematic.annotation.ContentUri;
import net.simonvt.schematic.annotation.InexactContentUri;
import net.simonvt.schematic.annotation.TableEndpoint;

/**
 * Created by rkrde on 07-11-2016.
 */
@ContentProvider(authority = MediaProvider.AUTHORITY,
        database = MediaDatabase.class)
public  class MediaProvider {
    public static final String AUTHORITY = "com.android.rahul.myselfieapp.storage.MediaProvider";

    @TableEndpoint(table = MediaDatabase.MEDIA_TABLE)
    public static class MediaLists {

        @ContentUri(
                path = "media",
                type = "vnd.android.cursor.dir/media_item"
//                defaultSort = MediaColumns._PATH + " ASC"
        )
        public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/media");

        @InexactContentUri(
                path = "media/*",
                name = "MEDIA_ID",
                type = "vnd.android.cursor.item/media_item",
                whereColumn = MediaColumns._ID,
                pathSegment = 1)
        public static Uri withId(long id) {
            return Uri.parse("content://" + AUTHORITY + "/media/" + id);
        }
    }
}


text:
<link href="keyboards_layout.css" rel="stylesheet" />

        <button data-key="ESCAPE">Esc</button>

        <button data-key="F1">F1</button>
        <button data-key="F2">F2</button>
        <button data-key="F3">F3</button>
        <button data-key="F4">F4</button>

        <button data-key="F5">F5</button>
        <button data-key="F6">F6</button>
        <button data-key="F7">F7</button>
        <button data-key="F8">F8</button>

        <button data-key="F9">F9</button>
        <button data-key="F10">F10</button>
        <button data-key="F11">F11</button>
        <button data-key="F12">F12</button>

        <button data-key="PRINT_SCREEN">Print Screen</button>
        <button data-key="SCROLL_LOCK">Scroll Lock</button>
        <button data-key="PAUSE_BREAK">Pause Break</button>

        <button data-key="ACCENT_GRAVE">`</button>
        <button data-key="ONE">1</button>
        <button data-key="TWO">2</button>
        <button data-key="THREE">3</button>
        <button data-key="FOUR">4</button>
        <button data-key="FIVE">5</button>
        <button data-key="SIX">6</button>
        <button data-key="SEVEN">7</button>
        <button data-key="EIGHT">8</button>
        <button data-key="NINE">9</button>
        <button data-key="ZERO">0</button>
        <button data-key="LEFT_BRACKET">[</button>
        <button data-key="RIGHT_BRACKET">]</button>
        <button data-key="BACKSPACE" style="width: 102px">←</button>

        <button data-key="INSERT">Insert</button>
        <button data-key="HOME">Home</button>
        <button data-key="PAGE_UP">Page Up</button>

        <button data-key="NUMLOCK">Num Lock</button>
        <button data-key="NUMPAD_SLASH">/</button>
        <button data-key="NUMPAD_ASTERISK">*</button>
        <button data-key="NUMPAD_MINUS">-</button>

                <button data-key="TAB" style="width: 72px">⇥</button>
                <button data-key="SINGLE_QUOTE">'</button>
                <button data-key="COMMA">,</button>
                <button data-key="PERIOD">.</button>
                <button data-key="P">P</button>
                <button data-key="Y">Y</button>
                <button data-key="F">F</button>
                <button data-key="G">G</button>
                <button data-key="C">C</button>
                <button data-key="R">R</button>
                <button data-key="L">L</button>
                <button data-key="SLASH">/</button>
                <button data-key="EQUAL">=</button>
                <button data-key="BACKSLASH" style="width: 82px">\</button>

                <button data-key="DELETE">Delete</button>
                <button data-key="END">End</button>
                <button data-key="PAGE_DOWN">Page Down</button>

                <button data-key="NUMPAD_SEVEN">7</button>
                <button data-key="NUMPAD_EIGHT">8</button>
                <button data-key="NUMPAD_NINE">9</button>

                <button data-key="CAPSLOCK" style="width: 88px">⇪</button>
                <button data-key="A">A</button>
                <button data-key="O">O</button>
                <button data-key="E">E</button>
                <button data-key="U">U</button>
                <button data-key="I">I</button>
                <button data-key="D">D</button>
                <button data-key="H">H</button>
                <button data-key="T">T</button>
                <button data-key="N">N</button>
                <button data-key="S">S</button>
                <button data-key="MINUS">-</button>
                <button data-key="ENTER" style="width: 121px">↵</button>

                <button data-key="NUMPAD_FOUR">4</button>
                <button data-key="NUMPAD_FIVE">5</button>
                <button data-key="NUMPAD_SIX">6</button>

            <button data-key="NUMPAD_PLUS" class="high">+</button>

                <button data-key="SHIFT" style="width: 126px">⇧</button>
                <button data-key="SEMICOLON">;</button>
                <button data-key="Q">Q</button>
                <button data-key="J">J</button>
                <button data-key="K">K</button>
                <button data-key="X">X</button>
                <button data-key="B">B</button>
                <button data-key="M">M</button>
                <button data-key="W">W</button>
                <button data-key="V">V</button>
                <button data-key="Z">Z</button>
                <button data-key="SHIFT" style="width: 138px">⇧</button>

                <button data-key="UP_ARROW">↑</button>

                <button data-key="NUMPAD_ONE">1</button>
                <button data-key="NUMPAD_TWO">2</button>
                <button data-key="NUMPAD_THREE">3</button>

                <button data-key="CONTROL" style="width: 82px">Ctrl</button>
                <button data-key="OSKEY" style="width: 68px">OS</button>
                <button data-key="ALT" style="width: 68px">Alt</button>
                <button data-key="SPACE" style="width: 306px">Space</button>
                <button data-key="ALT" style="width: 68px">Alt Gr</button>
                <button data-key="OSKEY" style="width: 68px">OS</button>
                <button></button>
                <button data-key="CONTROL" style="width: 84px">Ctrl</button>

                <button data-key="LEFT_ARROW">←</button>
                <button data-key="DOWN_ARROW">↓</button>
                <button data-key="RIGHT_ARROW">→</button>

                <button data-key="NUMPAD_ZERO" class="wide">0</button>
                <button data-key="NUMPAD_PERIOD">.</button>

            <button data-key="NUMPAD_ENTER" class="high">↵</button>


text:
'''Config object for the lsc project'''

import ConfigParser
import os.path

CONFIG_FILENAME = 'lsc.ini'
CONFIG_SEARCH_PATH = ['.']

# Try and read in the configuration file and set the necessary
# variables

_config = ConfigParser.SafeConfigParser()

_config.read([os.path.join(dirname, CONFIG_FILENAME)
              for dirname in CONFIG_SEARCH_PATH])

# These are the values we expect to find
email       = _config.get('Lab Config Sheet', 'email')
password    = _config.get('Lab Config Sheet', 'password')
spreadsheet = _config.get('Lab Config Sheet', 'spreadsheet')
worksheet   = _config.get('Lab Config Sheet', 'worksheet')

instance_data_dir  = _config.get('Instances', 'instance_data_dir')
docker_control_url = _config.get('Instances', 'docker_control_url')
sourcecode_repo    = _config.get('Instances', 'sourcecode_repo')
docker_image       = _config.get('Instances', 'docker_image')


text:
titel: Variantenbildung
kuerzel: w-vb
verantwortlich: lk
typ: workshop
pflicht: false
termine: 2017-05-12 13:30|0.504|http://bit.ly/2oMEMa4, 2017-05-12 16:00|0.504|http://bit.ly/2qf86Xh
empfohlene-voraussetzungen: t-sb oder t-fb, t-ld, t-sm
published: true
dauer: 120
info: Gutes Design entsteht zumeist durch die Auswahl der richtigen Varianten für ein Teilproblem. Doch wie erzeuge ich systematisch Varianten?
---

## Der Workshop:
Die Form ist ein zentrales Element in der Gestaltung und somit die Formfindung ein elementarer Prozess für Gestaltende.
Wir schauen und den Nutzen der Bildung von Varianten in der Praxis an und starten dann mit Übungen zu z.B. Kombinatorik, Flächenaufteilung und GUI-Varianten.

Download der Workshop Slides als PDF

## Was brauchen Sie?
- Einen eigenen Computer bzw. mindestens einen Rechner pro Team

## Material

Download des benötigten Materials als ZIP Archiv


text:
Clearance.configure do |config|
  config.mailer_sender = "reply@example.com"
end


text:
module.exports = function(RED) {
    "use strict";

    function StatusNode(n) {
        RED.nodes.createNode(this,n);
        var node = this;
        this.scope = n.scope;
        this.on("input", function(msg, send, done) {
            send(msg);
            done();
        });
    }

    RED.nodes.registerType("status",StatusNode);
}