text:
package godot

import (
	"github.com/shadowapex/godot-go/gdnative"
)

/*------------------------------------------------------------------------------
//   This code was generated by a tool.
//
//   Changes to this file may cause incorrect behavior and will be lost if
//   the code is regenerated. Any updates should be done in
//   "class.go.tmpl" so they can be included in the generated
//   code.
//----------------------------------------------------------------------------*/

// ObjectConnectFlags is an enum for ConnectFlags values.
type ObjectConnectFlags int

const (
	ObjectConnectDeferred ObjectConnectFlags = 1
	ObjectConnectOneshot  ObjectConnectFlags = 4
	ObjectConnectPersist  ObjectConnectFlags = 2
)

//func NewObjectFromPointer(ptr gdnative.Pointer) Object {
func newObjectFromPointer(ptr gdnative.Pointer) Object {
	owner := gdnative.NewObjectFromPointer(ptr)
	obj := Object{}
	obj.SetBaseObject(owner)

	return obj
}

/*
Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class. Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++). Some derivatives add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together.
*/
type Object struct {
	owner gdnative.Object
}

func (o *Object) BaseClass() string {
	return "Object"
}

// SetBaseObject will internally set the Godot object inside the struct.
// This is used to call parent methods.
func (o *Object) SetBaseObject(object gdnative.Object) {
	o.owner = object
}

func (o *Object) GetBaseObject() gdnative.Object {
	return o.owner
}

/*
        Returns the given property. Returns [code]null[/code] if the [code]property[/code] does not exist.
	Args: [{ false property String}], Returns: void
*/
func (o *Object) X_Get(property gdnative.String) {
	//log.Println("Calling Object.X_Get()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(property)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "_get")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Returns the object's property list as an [Array] of dictionaries. Dictionaries must contain: name:String, type:int (see TYPE_* enum in [@GlobalScope]) and optionally: hint:int (see PROPERTY_HINT_* in [@GlobalScope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@GlobalScope]).
	Args: [], Returns: Array
*/
func (o *Object) X_GetPropertyList() gdnative.Array {
	//log.Println("Calling Object.X_GetPropertyList()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "_get_property_list")

	// Call the parent method.
	// Array
	retPtr := gdnative.NewEmptyArray()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewArrayFromPointer(retPtr)
	return ret
}

/*
        The virtual method called upon initialization.
	Args: [], Returns: void
*/
func (o *Object) X_Init() {
	//log.Println("Calling Object.X_Init()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "_init")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Notify the object internally using an ID.
	Args: [{ false what int}], Returns: void
*/
func (o *Object) X_Notification(what gdnative.Int) {
	//log.Println("Calling Object.X_Notification()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromInt(what)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "_notification")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Sets a property. Returns [code]true[/code] if the [code]property[/code] exists.
	Args: [{ false property String} { false value Variant}], Returns: bool
*/
func (o *Object) X_Set(property gdnative.String, value gdnative.Variant) gdnative.Bool {
	//log.Println("Calling Object.X_Set()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 2, 2)
	ptrArguments[0] = gdnative.NewPointerFromString(property)
	ptrArguments[1] = gdnative.NewPointerFromVariant(value)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "_set")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Adds a user-defined [code]signal[/code]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing "name" and "type" (from [@GlobalScope] TYPE_*).
	Args: [{ false signal String} {[] true arguments Array}], Returns: void
*/
func (o *Object) AddUserSignal(signal gdnative.String, arguments gdnative.Array) {
	//log.Println("Calling Object.AddUserSignal()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 2, 2)
	ptrArguments[0] = gdnative.NewPointerFromString(signal)
	ptrArguments[1] = gdnative.NewPointerFromArray(arguments)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "add_user_signal")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Calls the [code]method[/code] on the object and returns a result. Pass parameters as a comma separated list.
	Args: [{ false method String}], Returns: Variant
*/
func (o *Object) Call(method gdnative.String) gdnative.Variant {
	//log.Println("Calling Object.Call()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(method)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "call")

	// Call the parent method.
	// Variant
	retPtr := gdnative.NewEmptyVariant()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewVariantFromPointer(retPtr)
	return ret
}

/*
        Calls the [code]method[/code] on the object during idle time and returns a result. Pass parameters as a comma separated list.
	Args: [{ false method String}], Returns: Variant
*/
func (o *Object) CallDeferred(method gdnative.String) gdnative.Variant {
	//log.Println("Calling Object.CallDeferred()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(method)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "call_deferred")

	// Call the parent method.
	// Variant
	retPtr := gdnative.NewEmptyVariant()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewVariantFromPointer(retPtr)
	return ret
}

/*
        Calls the [code]method[/code] on the object and returns a result. Pass parameters as an [Array].
	Args: [{ false method String} { false arg_array Array}], Returns: Variant
*/
func (o *Object) Callv(method gdnative.String, argArray gdnative.Array) gdnative.Variant {
	//log.Println("Calling Object.Callv()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 2, 2)
	ptrArguments[0] = gdnative.NewPointerFromString(method)
	ptrArguments[1] = gdnative.NewPointerFromArray(argArray)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "callv")

	// Call the parent method.
	// Variant
	retPtr := gdnative.NewEmptyVariant()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewVariantFromPointer(retPtr)
	return ret
}

/*
        Returns [code]true[/code] if the object can translate strings.
	Args: [], Returns: bool
*/
func (o *Object) CanTranslateMessages() gdnative.Bool {
	//log.Println("Calling Object.CanTranslateMessages()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "can_translate_messages")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call. Use [code]flags[/code] to set deferred or one shot connections. See [code]CONNECT_*[/code] constants. A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected. To avoid this, first use [method is_connected] to check for existing connections.
	Args: [{ false signal String} { false target Object} { false method String} {[] true binds Array} {0 true flags int}], Returns: enum.Error
*/
func (o *Object) Connect(signal gdnative.String, target ObjectImplementer, method gdnative.String, binds gdnative.Array, flags gdnative.Int) gdnative.Error {
	//log.Println("Calling Object.Connect()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 5, 5)
	ptrArguments[0] = gdnative.NewPointerFromString(signal)
	ptrArguments[1] = gdnative.NewPointerFromObject(target.GetBaseObject())
	ptrArguments[2] = gdnative.NewPointerFromString(method)
	ptrArguments[3] = gdnative.NewPointerFromArray(binds)
	ptrArguments[4] = gdnative.NewPointerFromInt(flags)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "connect")

	// Call the parent method.
	// enum.Error
	retPtr := gdnative.NewEmptyInt()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewIntFromPointer(retPtr)
	return gdnative.Error(ret)
}

/*
        Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code].
	Args: [{ false signal String} { false target Object} { false method String}], Returns: void
*/
func (o *Object) Disconnect(signal gdnative.String, target ObjectImplementer, method gdnative.String) {
	//log.Println("Calling Object.Disconnect()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 3, 3)
	ptrArguments[0] = gdnative.NewPointerFromString(signal)
	ptrArguments[1] = gdnative.NewPointerFromObject(target.GetBaseObject())
	ptrArguments[2] = gdnative.NewPointerFromString(method)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "disconnect")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Emits the given [code]signal[/code].
	Args: [{ false signal String}], Returns: Variant
*/
func (o *Object) EmitSignal(signal gdnative.String) gdnative.Variant {
	//log.Println("Calling Object.EmitSignal()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(signal)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "emit_signal")

	// Call the parent method.
	// Variant
	retPtr := gdnative.NewEmptyVariant()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewVariantFromPointer(retPtr)
	return ret
}

/*
        Deletes the object from memory.
	Args: [], Returns: void
*/
func (o *Object) Free() {
	//log.Println("Calling Object.Free()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "free")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Returns a [Variant] for a [code]property[/code].
	Args: [{ false property String}], Returns: Variant
*/
func (o *Object) Get(property gdnative.String) gdnative.Variant {
	//log.Println("Calling Object.Get()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(property)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get")

	// Call the parent method.
	// Variant
	retPtr := gdnative.NewEmptyVariant()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewVariantFromPointer(retPtr)
	return ret
}

/*
        Returns the object's class as a [String].
	Args: [], Returns: String
*/
func (o *Object) GetClass() gdnative.String {
	//log.Println("Calling Object.GetClass()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_class")

	// Call the parent method.
	// String
	retPtr := gdnative.NewEmptyString()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewStringFromPointer(retPtr)
	return ret
}

/*
        Returns an [Array] of dictionaries with information about signals that are connected to the object. Inside each [Dictionary] there are 3 fields: - "source" is a reference to signal emitter. - "signal_name" is name of connected signal. - "method_name" is a name of method to which signal is connected.
	Args: [], Returns: Array
*/
func (o *Object) GetIncomingConnections() gdnative.Array {
	//log.Println("Calling Object.GetIncomingConnections()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_incoming_connections")

	// Call the parent method.
	// Array
	retPtr := gdnative.NewEmptyArray()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewArrayFromPointer(retPtr)
	return ret
}

/*

	Args: [{ false property NodePath}], Returns: Variant
*/
func (o *Object) GetIndexed(property gdnative.NodePath) gdnative.Variant {
	//log.Println("Calling Object.GetIndexed()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromNodePath(property)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_indexed")

	// Call the parent method.
	// Variant
	retPtr := gdnative.NewEmptyVariant()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewVariantFromPointer(retPtr)
	return ret
}

/*
        Returns the object's unique instance ID.
	Args: [], Returns: int
*/
func (o *Object) GetInstanceId() gdnative.Int {
	//log.Println("Calling Object.GetInstanceId()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_instance_id")

	// Call the parent method.
	// int
	retPtr := gdnative.NewEmptyInt()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewIntFromPointer(retPtr)
	return ret
}

/*
        Returns the object's metadata for the given [code]name[/code].
	Args: [{ false name String}], Returns: Variant
*/
func (o *Object) GetMeta(name gdnative.String) gdnative.Variant {
	//log.Println("Calling Object.GetMeta()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(name)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_meta")

	// Call the parent method.
	// Variant
	retPtr := gdnative.NewEmptyVariant()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewVariantFromPointer(retPtr)
	return ret
}

/*
        Returns the object's metadata as a [PoolStringArray].
	Args: [], Returns: PoolStringArray
*/
func (o *Object) GetMetaList() gdnative.PoolStringArray {
	//log.Println("Calling Object.GetMetaList()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_meta_list")

	// Call the parent method.
	// PoolStringArray
	retPtr := gdnative.NewEmptyPoolStringArray()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewPoolStringArrayFromPointer(retPtr)
	return ret
}

/*
        Returns the object's methods and their signatures as an [Array].
	Args: [], Returns: Array
*/
func (o *Object) GetMethodList() gdnative.Array {
	//log.Println("Calling Object.GetMethodList()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_method_list")

	// Call the parent method.
	// Array
	retPtr := gdnative.NewEmptyArray()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewArrayFromPointer(retPtr)
	return ret
}

/*
        Returns the list of properties as an [Array] of dictionaries. Dictionaries contain: name:String, type:int (see TYPE_* enum in [@GlobalScope]) and optionally: hint:int (see PROPERTY_HINT_* in [@GlobalScope]), hint_string:String, usage:int (see PROPERTY_USAGE_* in [@GlobalScope]).
	Args: [], Returns: Array
*/
func (o *Object) GetPropertyList() gdnative.Array {
	//log.Println("Calling Object.GetPropertyList()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_property_list")

	// Call the parent method.
	// Array
	retPtr := gdnative.NewEmptyArray()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewArrayFromPointer(retPtr)
	return ret
}

/*
        Returns the object's [Script] or [code]null[/code] if one doesn't exist.
	Args: [], Returns: Reference
*/
func (o *Object) GetScript() ReferenceImplementer {
	//log.Println("Calling Object.GetScript()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_script")

	// Call the parent method.
	// Reference
	retPtr := gdnative.NewEmptyObject()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := newReferenceFromPointer(retPtr)

	// Check to see if we already have an instance of this object in our Go instance registry.
	if instance, ok := InstanceRegistry.Get(ret.GetBaseObject().ID()); ok {
		return instance.(ReferenceImplementer)
	}

	// Check to see what kind of class this is and create it. This is generally used with
	// GetNode().
	className := ret.GetClass()
	if className != "Reference" {
		actualRet := getActualClass(className, ret.GetBaseObject())
		return actualRet.(ReferenceImplementer)
	}

	return &ret
}

/*
        Returns an [Array] of connections for the given [code]signal[/code].
	Args: [{ false signal String}], Returns: Array
*/
func (o *Object) GetSignalConnectionList(signal gdnative.String) gdnative.Array {
	//log.Println("Calling Object.GetSignalConnectionList()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(signal)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_signal_connection_list")

	// Call the parent method.
	// Array
	retPtr := gdnative.NewEmptyArray()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewArrayFromPointer(retPtr)
	return ret
}

/*
        Returns the list of signals as an [Array] of dictionaries.
	Args: [], Returns: Array
*/
func (o *Object) GetSignalList() gdnative.Array {
	//log.Println("Calling Object.GetSignalList()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "get_signal_list")

	// Call the parent method.
	// Array
	retPtr := gdnative.NewEmptyArray()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewArrayFromPointer(retPtr)
	return ret
}

/*
        Returns [code]true[/code] if a metadata is found with the given [code]name[/code].
	Args: [{ false name String}], Returns: bool
*/
func (o *Object) HasMeta(name gdnative.String) gdnative.Bool {
	//log.Println("Calling Object.HasMeta()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(name)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "has_meta")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Returns [code]true[/code] if the object contains the given [code]method[/code].
	Args: [{ false method String}], Returns: bool
*/
func (o *Object) HasMethod(method gdnative.String) gdnative.Bool {
	//log.Println("Calling Object.HasMethod()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(method)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "has_method")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Returns [code]true[/code] if the given user-defined [code]signal[/code] exists.
	Args: [{ false signal String}], Returns: bool
*/
func (o *Object) HasUserSignal(signal gdnative.String) gdnative.Bool {
	//log.Println("Calling Object.HasUserSignal()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(signal)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "has_user_signal")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Returns [code]true[/code] if signal emission blocking is enabled.
	Args: [], Returns: bool
*/
func (o *Object) IsBlockingSignals() gdnative.Bool {
	//log.Println("Calling Object.IsBlockingSignals()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "is_blocking_signals")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Returns [code]true[/code] if the object inherits from the given [code]type[/code].
	Args: [{ false type String}], Returns: bool
*/
func (o *Object) IsClass(aType gdnative.String) gdnative.Bool {
	//log.Println("Calling Object.IsClass()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(aType)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "is_class")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code].
	Args: [{ false signal String} { false target Object} { false method String}], Returns: bool
*/
func (o *Object) IsConnected(signal gdnative.String, target ObjectImplementer, method gdnative.String) gdnative.Bool {
	//log.Println("Calling Object.IsConnected()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 3, 3)
	ptrArguments[0] = gdnative.NewPointerFromString(signal)
	ptrArguments[1] = gdnative.NewPointerFromObject(target.GetBaseObject())
	ptrArguments[2] = gdnative.NewPointerFromString(method)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "is_connected")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Returns [code]true[/code] if the [code]queue_free[/code] method was called for the object.
	Args: [], Returns: bool
*/
func (o *Object) IsQueuedForDeletion() gdnative.Bool {
	//log.Println("Calling Object.IsQueuedForDeletion()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "is_queued_for_deletion")

	// Call the parent method.
	// bool
	retPtr := gdnative.NewEmptyBool()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewBoolFromPointer(retPtr)
	return ret
}

/*
        Notify the object of something.
	Args: [{ false what int} {False true reversed bool}], Returns: void
*/
func (o *Object) Notification(what gdnative.Int, reversed gdnative.Bool) {
	//log.Println("Calling Object.Notification()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 2, 2)
	ptrArguments[0] = gdnative.NewPointerFromInt(what)
	ptrArguments[1] = gdnative.NewPointerFromBool(reversed)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "notification")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*

	Args: [], Returns: void
*/
func (o *Object) PropertyListChangedNotify() {
	//log.Println("Calling Object.PropertyListChangedNotify()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 0, 0)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "property_list_changed_notify")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Set property into the object.
	Args: [{ false property String} { false value Variant}], Returns: void
*/
func (o *Object) Set(property gdnative.String, value gdnative.Variant) {
	//log.Println("Calling Object.Set()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 2, 2)
	ptrArguments[0] = gdnative.NewPointerFromString(property)
	ptrArguments[1] = gdnative.NewPointerFromVariant(value)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "set")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        If set to true, signal emission is blocked.
	Args: [{ false enable bool}], Returns: void
*/
func (o *Object) SetBlockSignals(enable gdnative.Bool) {
	//log.Println("Calling Object.SetBlockSignals()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromBool(enable)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "set_block_signals")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*

	Args: [{ false property NodePath} { false value Variant}], Returns: void
*/
func (o *Object) SetIndexed(property gdnative.NodePath, value gdnative.Variant) {
	//log.Println("Calling Object.SetIndexed()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 2, 2)
	ptrArguments[0] = gdnative.NewPointerFromNodePath(property)
	ptrArguments[1] = gdnative.NewPointerFromVariant(value)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "set_indexed")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Define whether the object can translate strings (with calls to [method tr]). Default is true.
	Args: [{ false enable bool}], Returns: void
*/
func (o *Object) SetMessageTranslation(enable gdnative.Bool) {
	//log.Println("Calling Object.SetMessageTranslation()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromBool(enable)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "set_message_translation")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Set a metadata into the object. Metadata is serialized. Metadata can be [i]anything[/i].
	Args: [{ false name String} { false value Variant}], Returns: void
*/
func (o *Object) SetMeta(name gdnative.String, value gdnative.Variant) {
	//log.Println("Calling Object.SetMeta()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 2, 2)
	ptrArguments[0] = gdnative.NewPointerFromString(name)
	ptrArguments[1] = gdnative.NewPointerFromVariant(value)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "set_meta")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Set a script into the object, scripts extend the object functionality.
	Args: [{ false script Reference}], Returns: void
*/
func (o *Object) SetScript(script ReferenceImplementer) {
	//log.Println("Calling Object.SetScript()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromObject(script.GetBaseObject())

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "set_script")

	// Call the parent method.
	// void
	retPtr := gdnative.NewEmptyVoid()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

}

/*
        Translate a message. Only works if message translation is enabled (which it is by default). See [method set_message_translation].
	Args: [{ false message String}], Returns: String
*/
func (o *Object) Tr(message gdnative.String) gdnative.String {
	//log.Println("Calling Object.Tr()")

	// Build out the method's arguments
	ptrArguments := make([]gdnative.Pointer, 1, 1)
	ptrArguments[0] = gdnative.NewPointerFromString(message)

	// Get the method bind
	methodBind := gdnative.NewMethodBind("Object", "tr")

	// Call the parent method.
	// String
	retPtr := gdnative.NewEmptyString()
	gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)

	// If we have a return type, convert it from a pointer into its actual object.
	ret := gdnative.NewStringFromPointer(retPtr)
	return ret
}

// ObjectImplementer is an interface that implements the methods
// of the Object class.
type ObjectImplementer interface {
	Class
	X_Get(property gdnative.String)
	X_GetPropertyList() gdnative.Array
	X_Init()
	X_Notification(what gdnative.Int)
	X_Set(property gdnative.String, value gdnative.Variant) gdnative.Bool
	AddUserSignal(signal gdnative.String, arguments gdnative.Array)
	Call(method gdnative.String) gdnative.Variant
	CallDeferred(method gdnative.String) gdnative.Variant
	Callv(method gdnative.String, argArray gdnative.Array) gdnative.Variant
	CanTranslateMessages() gdnative.Bool
	Disconnect(signal gdnative.String, target ObjectImplementer, method gdnative.String)
	EmitSignal(signal gdnative.String) gdnative.Variant
	Free()
	Get(property gdnative.String) gdnative.Variant
	GetClass() gdnative.String
	GetIncomingConnections() gdnative.Array
	GetIndexed(property gdnative.NodePath) gdnative.Variant
	GetInstanceId() gdnative.Int
	GetMeta(name gdnative.String) gdnative.Variant
	GetMetaList() gdnative.PoolStringArray
	GetMethodList() gdnative.Array
	GetPropertyList() gdnative.Array
	GetScript() ReferenceImplementer
	GetSignalConnectionList(signal gdnative.String) gdnative.Array
	GetSignalList() gdnative.Array
	HasMeta(name gdnative.String) gdnative.Bool
	HasMethod(method gdnative.String) gdnative.Bool
	HasUserSignal(signal gdnative.String) gdnative.Bool
	IsBlockingSignals() gdnative.Bool
	IsClass(aType gdnative.String) gdnative.Bool
	IsConnected(signal gdnative.String, target ObjectImplementer, method gdnative.String) gdnative.Bool
	IsQueuedForDeletion() gdnative.Bool
	Notification(what gdnative.Int, reversed gdnative.Bool)
	PropertyListChangedNotify()
	Set(property gdnative.String, value gdnative.Variant)
	SetBlockSignals(enable gdnative.Bool)
	SetIndexed(property gdnative.NodePath, value gdnative.Variant)
	SetMessageTranslation(enable gdnative.Bool)
	SetMeta(name gdnative.String, value gdnative.Variant)
	SetScript(script ReferenceImplementer)
	Tr(message gdnative.String) gdnative.String
}


text:
set -x

function usage() {
    echo "Create disco build environment and spinup"
    exit 1
}

source "$(dirname $0)/boto_init.sh"

DISCO_VPC="disco_vpc_ui.py"
DISCO_AWS="disco_aws.py"
ENV_NAME=build
ENV_TYPE=build
PIPELINE=build

function error() {
    echo "Encountered an error"
    echo "Destroying vpc $ENV_NAME"
    $DISCO_VPC destroy --name $ENV_NAME
    exit 1
}

trap error ERR
$DISCO_VPC create --type $ENV_TYPE --name $ENV_NAME
$DISCO_AWS --env $ENV_NAME spinup --pipeline pipelines/$PIPELINE/$PIPELINE.csv

redpajama_set_name: RedPajamaGithub


text:
package main

import (
	"fmt"
	"os"
)

func main() {
	if len(os.Args) < 2 {
		fmt.Println("Please enter the name of the torrent file")
		return
	}
	torrent_data := getDataFromFile(os.Args[1])
	var tracker_data chan map[string]interface{} = make(chan map[string]interface{})
	go torrent_data.getTrackerDataFromAnnounceList(tracker_data)
	peer_connections := make(VerifiedPeerConnections)
	startDownloading(peer_connections, tracker_data, torrent_data)
}


text:
package gov.nasa.jpf;

import gov.nasa.jpf.vm.Path;
import gov.nasa.jpf.vm.ThreadList;

/**
 * class used to store property violations (property and path)
 */
public class Error {

  int            id;

  Property       property;
  private String errorMessage;

  private Path   path;
  ThreadList     threadList;

  public Error (int id, Property prop, Path p, ThreadList l) {
    this.id = id;
    property = prop;
    errorMessage = prop.getErrorMessage();
    path = p; // client has to clone in case we go on
    threadList = l;
  }

  public int getId() {
    return id;
  }

  public String getDescription () {
    StringBuilder sb = new StringBuilder();
    sb.append(property.getClass().getName());

    String s = property.getExplanation();
    if (s != null) {
      sb.append(" (\"");
      sb.append(s);
      sb.append("\")");
    }

    return sb.toString();
  }

  public String getDetails() {
    return errorMessage;
  }

  public Path getPath () {
    return path;
  }

  public Property getProperty () {
    return property;
  }
}


text:
export class Style {
    constructor() {
    }

    addWidthClasses(inputHTML) {
        let currentWidthTotal = 0.0;
        let columnNames = ["col-md-1", "col-md-2", "col-md-3", "col-md-4", "col-md-5", "col-md-6", "col-md-7", "col-md-8", "col-md-9" ,"col-md-10", "col-md-11", "col-md-12"]
        let contents = inputHTML.reduce((contentHTML, thisInput) => {
            let {html, settings, input = {}} = thisInput;
            const {type} = input;
            let {width = "1", classes= ''} = settings;
            let numericWidth = getNumericWidth(width);

            if (currentWidthTotal <= 0) {
                contentHTML = `${contentHTML}<div class="row"> `
            }

            currentWidthTotal += numericWidth;

            let bootstrapWidthStyleName = columnNames[Math.round(numericWidth * columnNames.length) - 1];

            html = html.replace('ivxjs-grid-1-1', `form-group ${bootstrapWidthStyleName} ${classes} ivx-input-container ivx-input-container-${type}`);
            contentHTML = `${contentHTML}${html}`;

            if (currentWidthTotal >= 1) {
                contentHTML = `${contentHTML}</div>`;
                currentWidthTotal = 0;
            }

            return contentHTML;
        }, '');

        if(contents.substring(contents.length - 7) !== "</div>"){
            contents = `${contents}</div>`;
        }

        return contents;

        function getNumericWidth(widthString){
            if(widthString === '1') return 1;

            let parsedWidthFormula = widthString.split('/');

            return parseFloat(parsedWidthFormula[0]) / parseFloat(parsedWidthFormula[1]);
        }
    }
}


text:
using System;
using RapidCore.Security;
using Xunit;

namespace UnitTests.Core.Security
{
    public class RandomNumberGeneratorGuidTest
    {
        private readonly RandomNumberGeneratorGuid _guidGenerator;

        public RandomNumberGeneratorGuidTest()
        {
            _guidGenerator = new RandomNumberGeneratorGuid();
        }

        [Fact]
        public void Can_GenerateGuid()
        {
            var guid = _guidGenerator.GenerateGuid();

            Assert.NotNull(guid);
            Assert.IsType(typeof(Guid), guid);
            Assert.NotEqual(Guid.Empty, guid);
        }
    }
}


text:
<?php

namespace Cangyan\AITool;

use Cangyan\AITool\Domain\Entities\Image;

class AIServiceApp
{
    public static function recognitionIdCard($image)
    {
        $eImage = new Image($image);
        $service = AIServiceFactory::getBaiDuAIService();
        $res = $service->getIdCardRes($eImage);
        return $res;
    }

    public static function recognitionBankCard($image)
    {
        $eImage = new Image($image);
        $service = AIServiceFactory::getBaiDuAIService();
        $res = $service->getBankCardRes($eImage);

        return $res;
    }

    public static function recognitionGeneral($image)
    {
        $eImage = new Image($image);
        $service = AIServiceFactory::getBaiDuAIService();
        $res = $service->getGeneral($eImage);

        return $res;
    }
}


text:
<?php
/**
 * File: Checks.php
 * User: zacharydubois
 * Date: 2016-01-04
 * Time: 22:04
 * Project: Digital-Footprint-Profile
 */

/**
 * Check PHP Version.
 *
 * @return bool
 */
function phpVersionCheck() {
    return version_compare(PHP_VERSION, '5.5.0', '>=');
}

/**
 * Checks for Composer
 *
 * @return bool
 */
function composerCheck() {
    return file_exists(COMPOSER);
}

/*
 * Check to see if DFP has been configured.
 */
function configured() {
    return file_exists(CONFIGURATION);
}


text:
Kaminari.configure do |config|
  config.default_per_page = 10
  # config.max_per_page = nil
  config.window = 3
  # config.outer_window = 0
  # config.left = 0
  # config.right = 0
  # config.page_method_name = :page
  # config.param_name = :page
end


text:
using gc_policy = immer::memory_policy<
    immer::heap_policy<immer::gc_heap>,
    immer::no_refcount_policy,
    immer::gc_transience_policy,
    false>;

// alias the vector type so we are not concerned about memory policies
// in the places where we actually use it
template <typename T>
using my_vector = immer::vector<T, gc_policy>;

int main()
{
    auto v = my_vector<const char*>()
        .push_back("hello, ")
        .push_back("world!\n");

    for (auto s : v) std::cout << s;
}
// include:example/end


text:
import { Component, OnInit, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
import { FormControl, NgModel } from '@angular/forms';

import { Book } from '../models/book';

@Component({
  selector: 'tr-book-add-form',
  templateUrl: './book-add-form.component.html',
  styleUrls: ['./book-add-form.component.sass']
})
export class BookAddFormComponent implements OnInit {
  book = new Book('', '', null, []);

  @Output() add = new EventEmitter<Book>();

  constructor() { }

  ngOnInit() {
  }

  updateAuthors(authors: NgModel) {
    this.book.authors = authors.viewModel.split(',');
  }

  addBook() {
    this.add.emit(this.book);
  }
}


text:
<?php

class Core_Form_Newsletter_Subscriber_Element_Subscriber
{
    /**
     * @return object Zend_Dojo_Form_Element_FilteringSelect
     *  The drop down branch select form element account id
     */
    public function getElement()
    {
        $element = new Zend_Dojo_Form_Element_FilteringSelect('subscriber_id');
        $element->setLabel('Subscriber')
                ->setAutoComplete(true)
                ->setStoreId('subscriberStore')
                ->setStoreType('dojo.data.ItemFileReadStore')
                ->setStoreParams(array('url'=>'/newsletter/subscriber/jsonstore'))
                ->setAttrib("searchAttr", "email")
                ->setRequired(false);
       return $element;
    }
}


text:
@interface ChuckCCell : UICollectionViewCell
@property(nonatomic,strong)UILabel * lbText;
@end


text:
from calliope.core.preprocess.model_run import \
    model_run_from_yaml, \
    model_run_from_dict, \
    generate_model_run, \
    apply_overrides

from calliope.core.preprocess.model_data import build_model_data

from calliope.core.preprocess.time import \
    apply_time_clustering, \
    final_timedimension_processing


text:
StackProcessing
===============


text: Rails.application.config.session_store :cookie_store, key: '_elmhurst_backend_session'


text:
/**
 * Created by STYRLabs2 on 6/6/2017.
 */
import * as tabris from 'tabris';

import {BasePage} from './BasePage';
import {ServiceLayer} from "../util/ServiceLayer";
import {ColorScheme} from "../util/ColorScheme";
import {CustomButton} from "../components/CustomButton";
import {Match} from "../../../common/Match";
import {CacheManager} from "../util/CacheManager";

export class LogMatchPage extends BasePage {
    private TEXTINPUT_HEIGHT: number = 60;

    marginBox: tabris.Composite;
    leftPlayerMaxBox: tabris.Composite;
    rightPlayerMaxBox: tabris.Composite;
    centerColumn: tabris.Composite;

    leftPlayerContainer: tabris.Composite;
    rightPlayerContainer: tabris.Composite;

    leftScoreInput: tabris.TextInput;
    rightScoreInput: tabris.TextInput;

    playerCounter: number = 0;

    constructor() {
        super();
        this.page.title = 'Log a Match';

        this.createComponents();
    }

    public createComponents(): void {
        this.page.background = ColorScheme.Background;
        this.marginBox = new tabris.Composite({
            left: 30, right: 30, top: 30, bottom: 0,
            background: ColorScheme.Background
        }).appendTo(this.page);

        this.centerColumn = new tabris.Composite({
            width: 50, centerX: 0, top: 0, height: this.TEXTINPUT_HEIGHT * 6,
            background: ColorScheme.Background
        }).appendTo(this.marginBox);

        this.leftPlayerMaxBox = new tabris.Composite({
            left: 0, right: this.centerColumn, top: 0, height: this.TEXTINPUT_HEIGHT * 6,
            background: ColorScheme.Background
        }).appendTo(this.marginBox);
        this.rightPlayerMaxBox = new tabris.Composite({
            left: this.centerColumn, right: 0, top: 0, height: this.TEXTINPUT_HEIGHT * 6,
            background: ColorScheme.Background
        }).appendTo(this.marginBox);

        this.leftPlayerContainer = new tabris.Composite({
            left: 0, right: 0, centerY: 0, height: this.TEXTINPUT_HEIGHT,
            background: ColorScheme.WigetBackground,
            cornerRadius: 5
        }).appendTo(this.leftPlayerMaxBox);
        this.rightPlayerContainer = new tabris.Composite({
            left: 0, right: 0, centerY: 0, height: this.TEXTINPUT_HEIGHT,
            background: ColorScheme.WigetBackground,
            cornerRadius: 5
        }).appendTo(this.rightPlayerMaxBox);

        new tabris.TextView({
            centerX: 0, centerY: 0,
            text: 'VS',
            font: '20px monospace',
            textColor: ColorScheme.Secondary
        }).appendTo(this.centerColumn);

        // Create Player 1 and Player 2 Input Fields
        this.createAdditionPlayerFields();

        // LeftTeamScoreInput
        let leftScoreBox = new tabris.Composite({
            left: 0, right: this.centerColumn, top: [this.leftPlayerMaxBox, 30], height: this.TEXTINPUT_HEIGHT,
            background: ColorScheme.WigetBackground,
            cornerRadius: 5
        }).appendTo(this.marginBox);
        this.leftScoreInput = new tabris.TextInput({
            left: 0, right: 0, top: 0, bottom: 0,
            message: 'Score',
            background: ColorScheme.WigetBackground
        }).appendTo(leftScoreBox);

        // RightTeamScoreInput
        let rightScoreBox = new tabris.Composite({
            left: this.centerColumn, right: 0, top: [this.leftPlayerMaxBox, 30], height: this.TEXTINPUT_HEIGHT,
            background: ColorScheme.WigetBackground,

            cornerRadius: 5
        }).appendTo(this.marginBox);
        this.rightScoreInput = new tabris.TextInput({
            left: 0, right: 0, top: 0, bottom: 0,
            message: 'Score',
            background: ColorScheme.WigetBackground
        }).appendTo(rightScoreBox);

        // SubmitButton
        new CustomButton({
            width: 300, height: this.TEXTINPUT_HEIGHT, centerX: 0, top: [rightScoreBox, 30],
            background: ColorScheme.Background
        }, 'Submit').on('tap', target => {
            this.submitMatch();
        }).changeBorderColor('#000000').appendTo(this.marginBox);
    }

    private createAdditionPlayerFields(): void {

        let leftPlayers = this.leftPlayerContainer.children();
        let rightPlayers = this.rightPlayerContainer.children();

        if (leftPlayers.length > 0 && rightPlayers.length > 0) {
            leftPlayers[leftPlayers.length - 1].on('input', (target) => {
                this.otherItemListener(target);
            });

            rightPlayers[rightPlayers.length - 1].on('input', (target) => {
                this.otherItemListener(target);
            });
        }

        this.playerCounter++;
        new tabris.TextInput({
            left: 0, right: 0, bottom: 'prev()', height: this.TEXTINPUT_HEIGHT,
            message: 'Player ' + this.playerCounter,
            background: ColorScheme.WigetBackground
        }).on('input', (target) => {
            this.lastItemListener();
        }).appendTo(this.leftPlayerContainer);

        this.playerCounter++;
        new tabris.TextInput({
            left: 0, right: 0, bottom: 'prev()', height: this.TEXTINPUT_HEIGHT,
            message: 'Player ' + this.playerCounter,
            background: ColorScheme.WigetBackground
        }).on('input', (target) => {
            this.lastItemListener();
        }).appendTo(this.rightPlayerContainer);

        this.updatePlayerListHeights();
    }

    private removeRecentPlayerFields(): void {

        //Will not remove the first 2 fields
        if (this.playerCounter > 2) {

            let leftPlayers = this.leftPlayerContainer.children();
            let rightPlayers = this.rightPlayerContainer.children();

            leftPlayers[leftPlayers.length - 2].on('input', (target) => {
                this.lastItemListener();
            });

            rightPlayers[rightPlayers.length - 2].on('input', (target) => {
                this.lastItemListener();
            });

            leftPlayers[leftPlayers.length - 1].dispose();
            rightPlayers[rightPlayers.length - 1].dispose();
            this.playerCounter -= 2;

            this.updatePlayerListHeights();
        }

    }

    private otherItemListener(target) {
        let leftPlayers = this.leftPlayerContainer.children();
        let rightPlayers = this.rightPlayerContainer.children();

        if (leftPlayers[leftPlayers.length - 1].text === '' && rightPlayers[rightPlayers.length - 1].text === '' && !this.isInputFieldsFull()) {
            this.removeSetsOfFields();
        }
    }

    private removeSetsOfFields(): void {
        let leftPlayers = this.leftPlayerContainer.children();
        let rightPlayers = this.rightPlayerContainer.children();
        while (leftPlayers[leftPlayers.length - 1].text === '' && rightPlayers[rightPlayers.length - 1].text === '' && leftPlayers.length > 1) {
            this.removeRecentPlayerFields();
            leftPlayers = this.leftPlayerContainer.children();
            rightPlayers = this.rightPlayerContainer.children();
        }
    }

    private lastItemListener() {
        let leftPlayers = this.leftPlayerContainer.children();
        let rightPlayers = this.rightPlayerContainer.children();

        if (leftPlayers[leftPlayers.length - 1].text === '' && rightPlayers[rightPlayers.length - 1].text === '' && !this.isInputFieldsFull()) {
            this.removeSetsOfFields();
        }

        if (leftPlayers[leftPlayers.length - 1].text !== '' && rightPlayers[rightPlayers.length - 1].text !== '' && this.isInputFieldsFull()) {
            // Creates no more that 12 player fields
            if (this.playerCounter < 11) {
                this.createAdditionPlayerFields();
            }

        }
    }

    private isInputFieldsFull(): boolean {
        let leftPlayers = this.leftPlayerContainer.children();
        let rightPlayers = this.rightPlayerContainer.children();

        let allFieldsFull = true;
        for (let i = 0; i < leftPlayers.length - 1; i++) {
            if (leftPlayers[i].text === '') {
                allFieldsFull = false;
            }

            if (rightPlayers[i].text === '') {
                allFieldsFull = false;
            }
        }
        return allFieldsFull;
    }

    private updatePlayerListHeights(): void {
        this.leftPlayerContainer.height = this.playerCounter / 2 * this.TEXTINPUT_HEIGHT;
        this.rightPlayerContainer.height = this.playerCounter / 2 * this.TEXTINPUT_HEIGHT;
    }

    private submitMatch(): void {
        let leftPlayers = this.leftPlayerContainer.children();
        let rightPlayers = this.rightPlayerContainer.children();

        // Check if players were input
        if (this.playerCounter === 2 && leftPlayers[0].text === '' && rightPlayers[0].text === '') {
            window.plugins.toast.showLongCenter('Please add players to the match');
            return;
        }

        // Check for empty player fields
        for (let i = 0; i < this.playerCounter / 2; i++) {
            // XOR Operator
            if (!(leftPlayers[i].text === '' && rightPlayers[i].text === '') && (leftPlayers[i].text === '' || rightPlayers[i].text === '')) {
                window.plugins.toast.showLongCenter('Please fill in all empty player fields');
                return;
            }
        }

        // Check for half of last fields
        if (leftPlayers[leftPlayers.length - 1].text === '' && rightPlayers[rightPlayers.length - 1].text !== '') {
            window.plugins.toast.showLongCenter('Please finish Player ' + (this.playerCounter - 1));
            return;
        }

        if (leftPlayers[leftPlayers.length - 1].text !== '' && rightPlayers[rightPlayers.length - 1].text === '') {
            window.plugins.toast.showLongCenter('Please finish Player ' + this.playerCounter);
            return;
        }

        // Check for invalid score fields
        if (isNaN(this.leftScoreInput.text)) {
            window.plugins.toast.showLongCenter("Please fill out the left team's score");
            return;
        }

        if (isNaN(this.rightScoreInput.text)) {
            window.plugins.toast.showLongCenter("Please fill out the right team's score");
            return;
        }

        // If we have gotten here our input fields must be valid
        let leftTeam = [];
        let rightTeam = [];

        for (let i = 0; i < this.playerCounter / 2; i++) {
            if (leftPlayers[i].text !== '') {
                leftTeam.push(leftPlayers[i].text);
                rightTeam.push(rightPlayers[i].text);
            }
        }

        let match = new Match(leftTeam, rightTeam, this.leftScoreInput.text, this.rightScoreInput.text);
        ServiceLayer.httpPostAsync('/match/approved', {
            match: match,
            leagueId: CacheManager.getCurrentLeagueId()
        }, response => {
            window.plugins.toast.showLongCenter(response.message);
        });

    }
}


text:
cask 'castbridge' do
  version '1.0.5'
  sha256 '1df0898d856e0743f0c871199c8e71847706185dacf305576cb53b4f136394c3'

  # s3.amazonaws.com/updates.castbridge.io was verified as official when first introduced to the cask
  url "https://s3.amazonaws.com/updates.castbridge.io/Castbridge-#{version}-mac.zip"
  appcast 'https://s3.amazonaws.com/updates.castbridge.io/latest-mac.json',
          checkpoint: '878a480ac7b53f0166d33a2c95da9cf0501ed75c6c6cf7241268945b232f496d'
  name 'Castbridge'
  homepage 'https://castbridge.io/'

  app 'Castbridge.app'

  uninstall login_item: 'Castbridge',
            signal:     ['TERM', 'com.ariporad.Castbridge']

  zap trash: [
               '~/Library/Application Support/Castbridge',
               '~/Library/Preferences/com.ariporad.Castbridge.helper.plist',
               '~/Library/Preferences/com.ariporad.Castbridge.plist',
               '~/Library/Saved Application State/com.ariporad.Castbridge.savedState',
             ]
end


text:
import React from 'react';
import {Container, Row} from 'reactstrap';

export default () => (
  <Container>
    <Row>
      O nás

      On October 26, 1991 Stanislav BeerCheese, Josef Vávra and Rudolf Šmejkal won an auction for the small
      privatization of the bankrupt brewery in Humpolec, established in the 16th century. It did not take long for the
      Family brewery in Humpolec and BeerCheese beer to become a well-known premium brand throughout the entire Czech
      Republic.

    </Row>
  </Container>
);


text:
package io.github.factoryfx.factory.attribute.types;

import java.util.ArrayList;
import java.util.List;

import io.github.factoryfx.factory.FactoryBase;
import io.github.factoryfx.factory.attribute.AttributeChangeListener;
import io.github.factoryfx.factory.jackson.ObjectMapperBuilder;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class StringListAttributeTest {

    @Test
    public void test_json(){
        StringListAttribute attribute = new StringListAttribute();
        String value = "123";
        attribute.add(value);
        StringListAttribute copy = ObjectMapperBuilder.build().copy(attribute);
        Assertions.assertEquals(value,copy.get().get(0));
    }

    public static class ExampleListFactory extends FactoryBase<Void, ExampleListFactory> {
        public StringListAttribute listAttribute =new StringListAttribute();
    }

    @Test
    public void testObservable(){
        ExampleListFactory exampleListFactory = new ExampleListFactory();
        ArrayList<String> calls= new ArrayList<>();
        exampleListFactory.listAttribute.internal_addListener((a,o)-> {
            calls.add("");
        });
        exampleListFactory.listAttribute.add("7787");

        Assertions.assertEquals(1,calls.size());
    }

    @Test
    public void test_json_in_data(){
        ExampleListFactory exampleListFactory = new ExampleListFactory();
        exampleListFactory.listAttribute.add("7787");
        ObjectMapperBuilder.build().copy(exampleListFactory);
    }

    @Test
    public void remove_Listener(){
        ExampleListFactory exampleListFactory = new ExampleListFactory();
        ArrayList<String> calls= new ArrayList<>();
        AttributeChangeListener<List<String>,StringListAttribute> invalidationListener = (a, o) -> {
            calls.add("");
        };
        exampleListFactory.listAttribute.internal_addListener(invalidationListener);
        exampleListFactory.listAttribute.add("7787");

        Assertions.assertEquals(1,calls.size());

        exampleListFactory.listAttribute.internal_removeListener(invalidationListener);
        exampleListFactory.listAttribute.add("7787");
        Assertions.assertEquals(1,calls.size());
    }

    @Test
    public void test_modify(){
        ExampleListFactory exampleListFactory = new ExampleListFactory();
        exampleListFactory.internal().finalise();
        exampleListFactory.listAttribute.add("7787");
        Assertions.assertEquals(1,exampleListFactory.getModified().size());
        Assertions.assertTrue(exampleListFactory.getModified().contains(exampleListFactory));
    }

    @Test
    public void test_resetModification(){
        ExampleListFactory exampleFactory = new ExampleListFactory();
        exampleFactory.listAttribute.add("111");
        exampleFactory.internal().finalise();

        exampleFactory.listAttribute.add("222");
        exampleFactory.internal().resetModificationFlat();
        Assertions.assertEquals(List.of("111"),exampleFactory.listAttribute.get());
    }
}


text:
/*
 * This is a header file for glxqueue.c
 *
 * @name: glxqueue.h
 * @author: extradiable
 * @date: dom dic  6 18:18:32 CST 2015
 * @update: dom dic  6 18:18:32 CST 2015
 *
 */

#ifndef QUEUE_H
#define QUEUE_H 1
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>

/* The following structures are used to represent a basic queue */

struct Item {
  struct Item *next;
  void *data;
};

typedef struct Item Item;

typedef struct {
  Item *first;
  Item *last;
  uint32_t size;
} Queue;

typedef struct {

  /* Convenient function to create a Queue */
  Queue * (* create) (void);

  /* Retrieve the next element from the Queue */
  void * (* dequeue) (Queue *Q);

  /* Enqueue an element */
  void (* enqueue) (Queue *Q, void *data);

  /* returns element without dequeue it */
  void * (* peek) (Queue *Q);

  /* Clear the queue and then free it */
  void (* destroy) (Queue **Q, void (* destroyfn) (void *data));

} queue_lib;

extern queue_lib const queue;

#endif


text:
@implementation SocialVideoHelper

#define DispatchMainThread(block, ...) if(block) dispatch_async(dispatch_get_main_queue(), ^{ block(__VA_ARGS__); })

#define Video_Chunk_Max_size 1024 * 1024 * 5

+(void)uploadError:(NSError*)error withCompletion:(VideoUploadCompletion)completion{
    NSString *errorDes = [error localizedDescription];
    NSLog(@"There was an error:%@", errorDes);
    DispatchMainThread(^(){completion(NO, errorDes);});
}

+(void)uploadSuccessWithCompletion:(VideoUploadCompletion)completion{
    DispatchMainThread(^(){completion(YES, nil);});
}

#pragma mark - For Facebook

+(BOOL)userHasAccessToFacebook
{
    return [SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook];
}

+(void)uploadFacebookVideo:(NSData*)videoData comment:(NSString*)comment account:(ACAccount*)account withCompletion:(VideoUploadCompletion)completion{

    NSURL *facebookPostURL = [[NSURL alloc] initWithString:@"https://graph-video.facebook.com/v2.3/me/videos"];

    NSDictionary *postParams = @{
                                 @"access_token": account.credential.oauthToken,
                                 @"upload_phase" : @"start",
                                 @"file_size" : [NSNumber numberWithInteger: videoData.length].stringValue
                                 };

    SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodPOST URL:facebookPostURL parameters:postParams];
    request.account = account;

    [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
        NSLog(@"Facebook Stage1 HTTP Response: %li, responseData: %@", (long)[urlResponse statusCode], [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]);
        if (error) {
            NSLog(@"Facebook Error stage 1 - %@", error);
            [SocialVideoHelper uploadError:error withCompletion:completion];
        } else {
            NSMutableDictionary *returnedData = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];

            NSLog(@"Facebook Stage1 dic -> %@", returnedData);

            NSString *upload_session_id = returnedData[@"upload_session_id"];
            [SocialVideoHelper facebookVideoStage2:videoData comment:(NSString*)comment upload_session_id:upload_session_id account:account withCompletion:completion];
        }
    }];

}

+(void)facebookVideoStage2:(NSData*)videoData comment:(NSString*)comment upload_session_id:(NSString *)upload_session_id account:(ACAccount*)account withCompletion:(VideoUploadCompletion)completion{

    NSURL *facebookPostURL = [[NSURL alloc] initWithString:@"https://graph-video.facebook.com/v2.3/me/videos"];

    NSDictionary *postParams = @{
                                 @"access_token": account.credential.oauthToken,
                                 @"upload_phase" : @"transfer",
                                 @"start_offset" : @"0",
                                 @"upload_session_id" : upload_session_id
                                 };

    SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodPOST URL:facebookPostURL parameters:postParams];
    request.account = account;

    [request addMultipartData:videoData withName:@"video_file_chunk" type:@"video/mp4" filename:@"video"];

    [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
        NSLog(@"Facebook Stage2 HTTP Response: %li, responseData: %@", (long)[urlResponse statusCode], [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]);
        if (error) {
            NSLog(@"Facebook Error stage 2 - %@", error);
            [SocialVideoHelper uploadError:error withCompletion:completion];
        } else {
            NSMutableDictionary *returnedData = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];

            NSLog(@"Facebook Stage2 dic -> %@", returnedData);

            [SocialVideoHelper facebookVideoStage3:videoData comment:(NSString*)comment upload_session_id:upload_session_id account:account withCompletion:completion];
        }
    }];
}

+(void)facebookVideoStage3:(NSData*)videoData comment:(NSString*)comment upload_session_id:(NSString *)upload_session_id account:(ACAccount*)account withCompletion:(VideoUploadCompletion)completion{

    NSURL *facebookPostURL = [[NSURL alloc] initWithString:@"https://graph-video.facebook.com/v2.3/me/videos"];

    if (comment == nil) {
        comment = [NSString stringWithFormat:@"#SocialVideoHelper# https://github.com/liu044100/SocialVideoHelper"];
    }

    NSDictionary *postParams = @{
                                 @"access_token": account.credential.oauthToken,
                                 @"upload_phase" : @"finish",
                                 @"upload_session_id" : upload_session_id,
                                 @"description": comment
                                 };

    SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodPOST URL:facebookPostURL parameters:postParams];
    request.account = account;

    [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
        NSLog(@"Facebook Stage3 HTTP Response: %li, responseData: %@", (long)[urlResponse statusCode], [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]);
        if (error) {
            NSLog(@"Facebook Error stage 3 - %@", error);
            [SocialVideoHelper uploadError:error withCompletion:completion];
        } else {
            NSMutableDictionary *returnedData = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];
            NSLog(@"Facebook Stage3 dic -> %@", returnedData);

            if ([urlResponse statusCode] == 200){
                NSLog(@"Facebook upload success !");
                [SocialVideoHelper uploadSuccessWithCompletion:completion];
            }
        }
    }];
}

#pragma mark - For Twitter

+(BOOL)userHasAccessToTwitter
{
    return [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter];
}

+(void)uploadTwitterVideo:(NSData*)videoData comment:(NSString*)comment account:(ACAccount*)account withCompletion:(VideoUploadCompletion)completion{

    NSURL *twitterPostURL = [[NSURL alloc] initWithString:@"https://upload.twitter.com/1.1/media/upload.json"];

    NSDictionary *postParams = @{@"command": @"INIT",
                                @"total_bytes" : [NSNumber numberWithInteger: videoData.length].stringValue,
                                @"media_type" : @"video/mov"
                                };

    SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:twitterPostURL parameters:postParams];
    request.account = account;
    [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
        NSLog(@"Twitter Stage1 HTTP Response: %li, responseData: %@", (long)[urlResponse statusCode], [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]);
        if (error) {
            NSLog(@"Twitter Error stage 1 - %@", error);
            [SocialVideoHelper uploadError:error withCompletion:completion];
        } else {
            NSMutableDictionary *returnedData = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];

            NSString *mediaID = [NSString stringWithFormat:@"%@", [returnedData valueForKey:@"media_id_string"]];

            [SocialVideoHelper tweetVideoStage2:videoData mediaID:mediaID comment:comment account:account withCompletion:completion];

            NSLog(@"stage one success, mediaID -> %@", mediaID);
        }
    }];
}

+(void)tweetVideoStage2:(NSData*)videoData mediaID:(NSString *)mediaID comment:(NSString*)comment account:(ACAccount*)account withCompletion:(VideoUploadCompletion)completion{

    NSURL *twitterPostURL = [[NSURL alloc] initWithString:@"https://upload.twitter.com/1.1/media/upload.json"];

    NSArray *chunks = [SocialVideoHelper separateToMultipartData:videoData];
    NSMutableArray *requests = [NSMutableArray array];

    for (int i = 0; i < chunks.count; i++) {
        NSString *seg_index = [NSString stringWithFormat:@"%d",i];
        NSDictionary *postParams = @{@"command": @"APPEND",
                                     @"media_id" : mediaID,
                                     @"segment_index" : seg_index,
                                     };
        SLRequest *postRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:twitterPostURL parameters:postParams];
        postRequest.account = account;
        [postRequest addMultipartData:chunks[i] withName:@"media" type:@"video/mp4" filename:@"video"];
        [requests addObject:postRequest];
    }

    __block NSError *theError = nil;
    dispatch_queue_t chunksRequestQueue = dispatch_queue_create("chunksRequestQueue", DISPATCH_QUEUE_SERIAL);
    dispatch_async(chunksRequestQueue, ^{
        dispatch_group_t requestGroup = dispatch_group_create();
        for (int i = 0; i < (requests.count - 1); i++) {
            dispatch_group_enter(requestGroup);
            SLRequest *postRequest = requests[i];
            [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
                NSLog(@"Twitter Stage2 - %d HTTP Response: %li, %@", (i+1),(long)[urlResponse statusCode], [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]);
                if (error) {
                    NSLog(@"Twitter Error stage 2 - %d, error - %@", (i+1), error);
                    theError = error;
                } else {
                    if (i == requests.count - 1) {
                         [SocialVideoHelper tweetVideoStage3:videoData mediaID:mediaID comment:comment account:account withCompletion:completion];
                    }
                }
                dispatch_group_leave(requestGroup);
            }];
            dispatch_group_wait(requestGroup, DISPATCH_TIME_FOREVER);
        }

        if (theError) {
            [SocialVideoHelper uploadError:theError withCompletion:completion];
        } else {
            SLRequest *postRequest = requests.lastObject;
            [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
                NSLog(@"Twitter Stage2 - final, HTTP Response: %li, %@",(long)[urlResponse statusCode], [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]);
                if (error) {
                    NSLog(@"Twitter Error stage 2 - final, error - %@", error);
                } else {
                    [SocialVideoHelper tweetVideoStage3:videoData mediaID:mediaID comment:comment account:account withCompletion:completion];
                }
            }];
        }
    });
}

+(void)tweetVideoStage3:(NSData*)videoData mediaID:(NSString *)mediaID comment:(NSString*)comment account:(ACAccount*)account withCompletion:(VideoUploadCompletion)completion{

    NSURL *twitterPostURL = [[NSURL alloc] initWithString:@"https://upload.twitter.com/1.1/media/upload.json"];

    NSDictionary *postParams = @{@"command": @"FINALIZE",
                               @"media_id" : mediaID };

    SLRequest *postRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:twitterPostURL parameters:postParams];

    // Set the account and begin the request.
    postRequest.account = account;
    [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
        NSLog(@"Twitter Stage3 HTTP Response: %li, %@", (long)[urlResponse statusCode], [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]);
        if (error) {
            NSLog(@"Twitter Error stage 3 - %@", error);
            [SocialVideoHelper uploadError:error withCompletion:completion];
        } else {

            [SocialVideoHelper tweetVideoStage4:videoData mediaID:mediaID comment:comment account:account withCompletion:completion];
        }
    }];
}

+(void)tweetVideoStage4:(NSData*)videoData mediaID:(NSString *)mediaID comment:(NSString*)comment account:(ACAccount*)account withCompletion:(VideoUploadCompletion)completion{
    NSURL *twitterPostURL = [[NSURL alloc] initWithString:@"https://api.twitter.com/1.1/statuses/update.json"];
    if (comment == nil) {
        comment = @"";
    }
    // Set the parameters for the third twitter video request.
    NSDictionary *postParams = @{@"status": comment,
                               @"media_ids" : @[mediaID]};

    SLRequest *postRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:twitterPostURL parameters:postParams];
    postRequest.account = account;
    [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
        NSLog(@"Twitter Stage4 HTTP Response: %li", (long)[urlResponse statusCode]);
        if (error) {
            NSLog(@"Twitter Error stage 4 - %@", error);
            [SocialVideoHelper uploadError:error withCompletion:completion];
        } else {
            if ([urlResponse statusCode] == 200){
                NSLog(@"Twitter upload success !");
                [SocialVideoHelper uploadSuccessWithCompletion:completion];
            }
        }
    }];
}

+(NSArray*)separateToMultipartData:(NSData*)videoData{
    NSMutableArray *multipartData = [NSMutableArray new];
    CGFloat length = videoData.length;
    CGFloat standard_length = Video_Chunk_Max_size;
    if (length <= standard_length) {
        [multipartData addObject:videoData];
        NSLog(@"need not separate as chunk, data size -> %ld bytes", (long)videoData.length);
    } else {
        NSUInteger count = ceil(length/standard_length);
        for (int i = 0; i < count; i++) {
            NSRange range;
            if (i == count - 1) {
                range = NSMakeRange(i * standard_length, length - i * standard_length);
            } else {
                range = NSMakeRange(i * standard_length, standard_length);
            }
            NSData *part_data = [videoData subdataWithRange:range];
            [multipartData addObject:part_data];
            NSLog(@"chunk index -> %d, data size -> %ld bytes", (i+1), (long)part_data.length);
        }
    }
    return multipartData.copy;
}

@end


text:
package hr.fer.zemris.jcms.beans;

public class AssessmentBean {

	private String id;
	private String name;
	private String shortName;
	private String assesmentTagID;
	private String courseInstanceID;
	private String assesmentFlagID;
	private String programType;
	private String program;
	private String parentID;
	private String chainedParentID;
	private String maxScore;
	private int programVersion;
	private String startsAt;
	private String duration;
	private String visibility;
	private boolean locked;
	private int sortIndex;
	private boolean eventHidden;

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getShortName() {
		return shortName;
	}
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	public String getCourseInstanceID() {
		return courseInstanceID;
	}
	public void setCourseInstanceID(String courseInstanceID) {
		this.courseInstanceID = courseInstanceID;
	}
	public String getProgramType() {
		return programType;
	}
	public void setProgramType(String programType) {
		this.programType = programType;
	}
	public String getProgram() {
		return program;
	}
	public void setProgram(String program) {
		this.program = program;
	}
	public int getProgramVersion() {
		return programVersion;
	}
	public void setProgramVersion(int programVersion) {
		this.programVersion = programVersion;
	}
	public String getAssesmentTagID() {
		return assesmentTagID;
	}
	public void setAssesmentTagID(String assesmentTagID) {
		this.assesmentTagID = assesmentTagID;
	}
	public String getAssesmentFlagID() {
		return assesmentFlagID;
	}
	public void setAssesmentFlagID(String assesmentFlagID) {
		this.assesmentFlagID = assesmentFlagID;
	}
	public String getParentID() {
		return parentID;
	}
	public void setParentID(String parentID) {
		this.parentID = parentID;
	}
	public String getChainedParentID() {
		return chainedParentID;
	}
	public void setChainedParentID(String chainedParentID) {
		this.chainedParentID = chainedParentID;
	}
	public String getMaxScore() {
		return maxScore;
	}
	public void setMaxScore(String maxScore) {
		this.maxScore = maxScore;
	}
	public String getStartsAt() {
		return startsAt;
	}
	public void setStartsAt(String startsAt) {
		this.startsAt = startsAt;
	}
	public String getDuration() {
		return duration;
	}
	public void setDuration(String duration) {
		this.duration = duration;
	}

	public String getVisibility() {
		return visibility;
	}
	public void setVisibility(String visibility) {
		this.visibility = visibility;
	}
	public int getSortIndex() {
		return sortIndex;
	}
	public void setSortIndex(int sortIndex) {
		this.sortIndex = sortIndex;
	}
	public boolean isLocked() {
		return locked;
	}
	public void setLocked(boolean locked) {
		this.locked = locked;
	}

	public boolean getEventHidden() {
		return eventHidden;
	}
	public void setEventHidden(boolean eventHidden) {
		this.eventHidden = eventHidden;
	}
}


text:
import { fetchReducer } from 'controllers/fetch';
import { APP_INFO_NAMESPACE } from './constants';

export const appInfoReducer = fetchReducer(APP_INFO_NAMESPACE, { initialState: {} });


text: window.resolveLink = require('./resolve-link');


text:
import { expect } from 'chai';
import items, { defaultState } from './items';
import { RemoveItemAction } from '../actions/items';

describe('reducers/items', () => {
  it('should return same state when no action matches', () => {
    expect(items(defaultState, {} as any)).to.equal(defaultState);
  });

  describe('when items do not exist', () => {
    describe('ADD_ITEM', () => {
      const value = 'Item one';
      const label = 'Item one';
      const id = 1234;
      const choiceId = 5678;
      const groupId = 1;
      const customProperties = {
        property: 'value',
      };
      const placeholder = true;
      const keyCode = 10;

      describe('passing expected values', () => {
        let actualResponse;

        beforeEach(() => {
          actualResponse = items(undefined, {
            type: 'ADD_ITEM',
            value,
            label,
            id,
            choiceId,
            groupId,
            customProperties,
            placeholder,
            keyCode,
          });
        });

        it('adds item', () => {
          const expectedResponse = [
            {
              id,
              choiceId,
              groupId,
              value,
              label,
              active: true,
              highlighted: false,
              customProperties,
              placeholder,
              keyCode: null,
            },
          ];

          expect(actualResponse).to.eql(expectedResponse);
        });

        it('unhighlights all highlighted items', () => {
          actualResponse.forEach((item) => {
            expect(item.highlighted).to.equal(false);
          });
        });
      });

      describe('fallback values', () => {
        describe('passing no placeholder value', () => {
          it('adds item with placeholder set to false', () => {
            const expectedResponse = [
              {
                id,
                choiceId,
                groupId,
                value,
                label,
                active: true,
                highlighted: false,
                customProperties,
                placeholder: false,
                keyCode: null,
              },
            ];

            const actualResponse = items(undefined, {
              type: 'ADD_ITEM',
              value,
              label,
              id,
              choiceId,
              groupId,
              customProperties,
              placeholder: undefined,
              keyCode,
            });

            expect(actualResponse).to.eql(expectedResponse);
          });
        });
      });
    });
  });

  describe('when items exist', () => {
    let state;

    beforeEach(() => {
      state = [
        {
          id: 1,
          choiceId: 1,
          groupId: -1,
          value: 'Item one',
          label: 'Item one',
          active: false,
          highlighted: false,
          customProperties: null,
          placeholder: false,
          keyCode: null,
        },
        {
          id: 2,
          choiceId: 2,
          groupId: -1,
          value: 'Item one',
          label: 'Item one',
          active: true,
          highlighted: false,
          customProperties: null,
          placeholder: false,
          keyCode: null,
        },
      ];
    });

    describe('REMOVE_ITEM', () => {
      it('sets an item to be inactive based on passed ID', () => {
        const clonedState = state.slice(0);
        const id = 2;
        const expectedResponse = [
          {
            ...state[0],
          },
          {
            ...state[1],
            active: false,
          },
        ];

        const actualResponse = items(clonedState, {
          type: 'REMOVE_ITEM',
          id,
        } as RemoveItemAction);

        expect(actualResponse).to.eql(expectedResponse);
      });
    });

    describe('HIGHLIGHT_ITEM', () => {
      it('sets an item to be inactive based on passed ID', () => {
        const clonedState = state.slice(0);
        const id = 2;
        const expectedResponse = [
          {
            ...state[0],
          },
          {
            ...state[1],
            highlighted: true,
          },
        ];

        const actualResponse = items(clonedState, {
          type: 'HIGHLIGHT_ITEM',
          id,
          highlighted: true,
        });

        expect(actualResponse).to.eql(expectedResponse);
      });
    });
  });
});


text:
//
//  ENAPIRequest.h
//  libechonest
//
//  Copyright (c) 2013, Echo Nest Corporation
//  All rights reserved.
//
//  Redistribution and use in source and binary forms, with or without
//  modification, are permitted provided that the following conditions are met:
//
//   * Redistributions of source code must retain the above copyright
//     notice, this list of conditions and the following disclaimer.
//   * Redistributions in binary form must reproduce the above copyright
//     notice, this list of conditions and the following disclaimer in the
//     documentation and/or other materials provided with the distribution.
//   * Neither the name of the tapsquare, llc nor the names of its contributors
//     may be used to endorse or promote products derived from this software
//     without specific prior written permission.
//
//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//  DISCLAIMED. IN NO EVENT SHALL TAPSQUARE, LLC. BE LIABLE FOR ANY
//  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
//  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
//  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#import <Foundation/Foundation.h>

@class ENAPIRequest;

/**
 * type definition of the ENAPIRequest completion block
 */
typedef void (^ENAPIRequestCompletionBlock)(ENAPIRequest *);

/*
#define CHECK_API_KEY if (nil == [ENAPIRequest apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; }

#define CHECK_OAUTH_KEYS if (nil == [ENAPIRequest consumerKey] && nil == [ENAPIRequest sharedSecret]) { @throw [NSException exceptionWithName:@"OAuthKeysNotSetException" reason:@"Set the consumer key & shared secret before calling this method" userInfo:nil]; }
 */

static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/";

/**
 * ENAPIRequest is designed to provide a simple, easy to use interface to the [Echo Nest web service API](http://developer.echonest.com/docs/v4).
 * Before making an Echo Nest web service request, set the apiKey using the "setApiKey" class method.  Alternately if you intend to access secured endpoints, use the "setApiKey:andConsumerKey:andSharedSecret:" class method.
 * To make an Echo Nest HTTP GET or POST request use the "GETWithEndpoint:andParameters:andCompletionBlock" or "POSTWithEndpoint:andParameters:andCompletionBlock" class methods respectively.  Put the request parameters into a dictionary and pass them to the request.  Create and pass a completion block with an ENAPIRequest parameter to be executed when the request completes.  In the completion block, check that the request completed successfully and then access the result from the response Dictionary.
 * Example usage...

    [ENAPIRequest GETWithEndpoint:@"artist/news"
        andParameters:[NSDictionary dictionaryWithObjectsAndKeys:@"Radiohead", @"name",[NSNumber numberWithInt:15], @"results",nil]
        andCompletionBlock:^(ENAPIRequest *request) {
            if (request.completedSuccessfully) {
                NSLog(@"response: %@", request.response);
            } else {
                NSLog(@"errorMessage: %@", request.errorMessage);
            }];

 */
@interface ENAPIRequest : NSObject <NSURLConnectionDelegate, NSURLConnectionDataDelegate> {

}

/**
 * sets the Echo Nest api key for all subsequent requests.
 @param apiKey the  api key
 */
+ (void)setApiKey:(NSString *)apiKey;

/**
 * Sets the api key, consumer key and shared secret for all subsequent requests.
 * Consumer key and shared secret are required only if calling OAuth secured endpoints.  Example: "sandbox/access"
 @param apiKey The Echo Nest api key.
 @param consumerKey The Echo Nest consumer key.
 @param secret The Echo Nest shared secret.
 */
+ (void)setApiKey:(NSString *)apiKey andConsumerKey:(NSString *)consumerKey andSharedSecret:(NSString *)secret;

// these methods are only used internally
+ (NSString *)apiKey;
+ (NSString *)consumerKey;
+ (NSString *)sharedSecret;
+ (NSArray *)securedEndpoints;
+ (BOOL)isSecuredEndpoint:(NSString *)endpoint;

/**
 * Execute a Echo Nest Web Service GET request and represent the JSON response as a dictionary object.
 @param endpoint The Echo Nest webservice endpoint.
 @param parameters The parameters for this endpoint as key/value pairs.
 @param completionBlock The block of code to be executed on completion of the request, the request instance is returned as a parameter to allow access to the response and/or error information.
 @return Returns the request instance, intended to be used for debugging or canceling an individual request.
 */
+ (ENAPIRequest *)GETWithEndpoint:(NSString *)endpoint
                    andParameters:(NSDictionary *)parameters
               andCompletionBlock:(ENAPIRequestCompletionBlock)completionBlock;

/**
 * Execute a Echo Nest Web Service POST request and represent the JSON response as a dictionary object.
 @param endpoint The Echo Nest webservice endpoint.
 @param parameters The parameters for this endpoint as key/value pairs.
 @param completionBlock The block of code to be executed on completion of the request, the request instance is returned as a parameter to allow access to the response data and/or error information.
 @return returns The request instance, intended to be used for debugging or canceling an individual request.
 */
+ (ENAPIRequest *)POSTWithEndpoint:(NSString *)endpoint
                     andParameters:(NSDictionary *)parameters
                andCompletionBlock:(ENAPIRequestCompletionBlock)completionBlock;

/**
 * Cancels all active requests.
 */
+ (void)cancelAllRequests;

/**
 * Cancels an individual request.
 */
- (void)cancelRequest;

/**
 * The Echo Nest web service response decoded to an NSDictionary object.
 */
@property (readonly) NSDictionary *response;

/**
 * The http response code, 200 is a successful response.
 */
@property (readonly) NSInteger httpResponseCode;

/**
 * The Echo Nest status code, 0 is a successful status.  [Echo Nest response code list.](http://developer.echonest.com/docs/v4/index.html#response-codes)
 */
@property (readonly) NSInteger echonestStatusCode;

/**
 * The Echo Nest status message.
 */
@property (readonly) NSString *echonestStatusMessage;

/**
 * A boolean indicating that the request completed successfully, that is, if the response status code is 200 and the Echo Nest status code is 0.
 */
@property (readonly) BOOL completedSuccessfully;

/**
 * An error message if the request did not complete successfully.
 */
@property (readonly) NSString *errorMessage;

/**
 * The Echo Nest endpoint.
 */
@property (readonly) NSString *endpoint;

/**
 * The Echo Nest parameters used for this request.
 */
@property (readonly) NSMutableDictionary *parameters;

/**
 * The full URL used for this request, useful for debugging.
 */
@property (nonatomic, strong, readonly) NSURL *url;

/**
 * The NSError generated by the NSURLRequest, useful for debugging.
 */
@property (nonatomic, strong, readonly) NSError *error;

/**
 * The raw data returned by the service, useful for debugging.
 */
@property (nonatomic, strong, readonly) NSData *data;

@end


text:
var engine = require('engine.io').listen('9000');
var fs = require('fs');
var http = require("http");
var url = require("url");
var path = require("path");
var httpPort = process.argv[2] || 8888;

var camera = require('./camera');
var alert = require('./alert');

var exec = require('child_process').exec;
var child = exec('node ./takePics.js');
child.stdout.on('data', function(data) {
    console.log('stdout: ' + data);
});
child.stderr.on('data', function(data) {
    console.log('stdout: ' + data);
});
child.on('close', function(code) {
    console.log('closing code: ' + code);
});

engine.on('connection',function(socket){
	socket.on('message', function(data){
		if (data == 'image'){
			camera.getFile(err,function(file){
				if (!err){
					socket.send(file);
				}
			});
		}
	});
	socket.on('close',function(){
		console.log('Socket Closed.');
	});
});

var httpServer = http.createServer(function(request, response){
	var uri = url.parse(request.url).pathname;
	var filename = path.join(process.cwd(), uri);
	if (uri == '/alert'){
		alert.dingDong();
		response.writeHead(200);
    	response.write('Sound Played!');
    	response.end();
	}
	fs.exists(filename,function(exists){
		if(!exists){
			response.writeHead(404,{"Content-Type":"text/plain"});
			response.write("File not found.\n");
			response.end();
			return;
		}
		if (fs.statSync(filename).isDirectory()){
			filename += '/index.html';
		}
		fs.readFile(filename,"binary",function(err,file){
			if(err){
				response.writeHead(500,{"Content-Type": "text/plain"})
				response.write(err + "\n");
				response.end();
				return;
			}
			response.writeHead(200);
			response.write(file,"binary");
			response.end();
		});
	});
});

httpServer.listen(httpPort);


text:
        <button data-field="okButton" type="button" class="btn btn-primary" data-i18n-key="Ok"></button>
        <button data-field="cancelButton" type="button" class="btn btn-default" data-i18n-key="Cancel"></button>


text:
import os

# Key import of our module
import stracesummary

datadir = os.path.join(os.path.dirname(__file__), "data")

# On with the Tests
# --------------------------------------------------

def test_timing():
    "Can properly identify the timing gap in strace data"
    tracefile = os.path.join(datadir, "sssd_be.strace")
    threshold = 20
    ss = stracesummary.Timing(tracefile)
    gaps = list(ss.find_gaps(threshold=threshold))
    assert len(gaps) == 1, "Should have only found one gap in %s over %0.2fs long" % (
        tracefile,
        threshold,
    )


text:
export namespace NetworkNack {
    enum Reason {
        NONE       = 0,
        CONGESTION = 50,
        DUPLICATE  = 100,
        NO_ROUTE   = 150,
        OTHER_CODE = 0x7fff,
    }
}

export class NetworkNack {
    getOtherReasonCode(): number;
    getReason(): NetworkNack.Reason;
}


text:
package org.springframework.boot.gradle.docs;

import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;

import org.springframework.boot.gradle.junit.GradleMultiDslExtension;
import org.springframework.boot.gradle.testkit.Dsl;
import org.springframework.boot.gradle.testkit.GradleBuild;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assumptions.assumingThat;

/**
 * Tests for the managing dependencies documentation.
 *
 * @author Andy Wilkinson
 * @author Jean-Baptiste Nizet
 */
@ExtendWith(GradleMultiDslExtension.class)
public class ManagingDependenciesDocumentationTests {

	GradleBuild gradleBuild;

	@TestTemplate
	public void dependenciesExampleEvaluatesSuccessfully() {
		this.gradleBuild.script("src/main/gradle/managing-dependencies/dependencies").build();
	}

	@TestTemplate
	public void customManagedVersions() {
		assertThat(this.gradleBuild.script("src/main/gradle/managing-dependencies/custom-version").build("slf4jVersion")
				.getOutput()).contains("1.7.20");
	}

	@TestTemplate
	public void dependencyManagementInIsolation() {
		assertThat(this.gradleBuild.script("src/main/gradle/managing-dependencies/configure-bom")
				.build("dependencyManagement").getOutput()).contains("org.springframework.boot:spring-boot-starter ");
	}

	@TestTemplate
	public void dependencyManagementInIsolationWithPluginsBlock() {
		assumingThat(this.gradleBuild.getDsl() == Dsl.KOTLIN,
				() -> assertThat(
						this.gradleBuild.script("src/main/gradle/managing-dependencies/configure-bom-with-plugins")
								.build("dependencyManagement").getOutput())
										.contains("org.springframework.boot:spring-boot-starter TEST-SNAPSHOT"));
	}

}


text:
namespace EventSourced.Net
{
  public interface IDomainEvent : IEvent { }
}


text: Framework for the recognition of card games using opencv


text:
<?php

namespace Phpforce\SoapClient\Result;

class DescribeTab
{
    public $custom;

    public $iconUrl;

    public $label;

    public $miniIconUrl;

    public $sobjectName;

    public $url;

    public function getCustom()
    {
        return $this->custom;
    }

    public function getIconUrl()
    {
        return $this->iconUrl;
    }

    public function getLabel()
    {
        return $this->label;
    }

    public function getMiniIconUrl()
    {
        return $this->miniIconUrl;
    }

    public function getSobjectName()
    {
        return $this->sobjectName;
    }

    public function getUrl()
    {
        return $this->url;
    }
}


text: UniversalFlashMessages::FlashTypes.valid = [:info, :success, :warning, :error]


text:
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.3.6')
  require 'rubygems/command_manager'
  Gem::CommandManager.instance.register_command(:home)
end


text:
namespace MassTransit.Testing
{
    using System;

    public class PublishedMessage<T> :
        IPublishedMessage<T>
        where T : class
    {
        readonly PublishContext<T> _context;

        public PublishedMessage(PublishContext<T> context, Exception exception = null)
        {
            _context = context;
            Exception = exception;

            StartTime = context.SentTime ?? DateTime.UtcNow;
            ElapsedTime = DateTime.UtcNow - StartTime;
        }

        Guid? IAsyncListElement.ElementId => _context.MessageId;
        SendContext IPublishedMessage.Context => _context;
        public DateTime StartTime { get; }
        public TimeSpan ElapsedTime { get; }
        public Exception Exception { get; }
        public Type MessageType => typeof(T);
        public string ShortTypeName => TypeCache<T>.ShortName;
        object IPublishedMessage.MessageObject => _context.Message;
        PublishContext<T> IPublishedMessage<T>.Context => _context;
    }
}


text:
using SnappetChallenge.Models;

namespace SnappetChallenge.Data.Contracts
{
    public interface ISubmittedAnswersRepository : IMongoRepository<SubmittedAnswer>
    { }
}


text:
package com.zhaohai.coolweather.gson;

import com.google.gson.annotations.SerializedName;

import java.util.List;

public class Weather {
    public String status;
    public Basic basic;
    public AQI aqi;
    public Now now;
    public Suggestion suggestion;

    @SerializedName("daily_forecast")
    public List<Forecast> forecastList;
}


text:
package com.graphbuilder.math.func;

/**
The hyperbolic arc cosine function.
*/
public class AcoshFunction implements Function {

	public AcoshFunction() {}

	/**
	Returns the value of 2 * ln(sqrt((x+1)/2) + sqrt((x-1)/2)), where x is the
	value at index location 0.
	*/
	public double of(double[] d, int numParam) {
		double a = Math.sqrt((d[0] + 1) / 2);
		double b = Math.sqrt((d[0] - 1) / 2);
		return 2 * Math.log(a + b);
	}

	/**
	Returns true only for 1 parameter, false otherwise.
	*/
	public boolean acceptNumParam(int numParam) {
		return numParam == 1;
	}

	public String toString() {
		return "acosh(x)";
	}
}