text:
package gdkpixbuf

/*
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gdk-pixdata.h>
#include <stdlib.h>
*/
import "C"
import "unsafe"
import "reflect"
import "errors"
import "github.com/reusee/ggir/gobject"

func init() {
	_ = unsafe.Pointer(nil)
	_ = reflect.ValueOf(nil)
	_ = errors.New("")
}

var _ = gobject.UnusedFix_

type TraitPixbuf struct{ CPointer *C.GdkPixbuf }
type IsPixbuf interface {
	GetPixbufPointer() *C.GdkPixbuf
}

func (self *TraitPixbuf) GetPixbufPointer() *C.GdkPixbuf {
	return self.CPointer
}
func NewTraitPixbuf(p unsafe.Pointer) *TraitPixbuf {
	return &TraitPixbuf{(*C.GdkPixbuf)(p)}
}

/*
Takes an existing pixbuf and adds an alpha channel to it.
If the existing pixbuf already had an alpha channel, the channel
values are copied from the original; otherwise, the alpha channel
is initialized to 255 (full opacity).

If @substitute_color is %TRUE, then the color specified by (@r, @g, @b) will be
assigned zero opacity. That is, if you pass (255, 255, 255) for the
substitute color, all white pixels will become fully transparent.
*/
func (self *TraitPixbuf) AddAlpha(substitute_color bool, r uint8, g uint8, b uint8) (return__ *Pixbuf) {
	__cgo__substitute_color := C.gboolean(0)
	if substitute_color {
		__cgo__substitute_color = C.gboolean(1)
	}
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_add_alpha(self.CPointer, __cgo__substitute_color, C.guchar(r), C.guchar(g), C.guchar(b))
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Takes an existing pixbuf and checks for the presence of an
associated "orientation" option, which may be provided by the
jpeg loader (which reads the exif orientation tag) or the
tiff loader (which reads the tiff orientation tag, and
compensates it for the partial transforms performed by
libtiff). If an orientation option/tag is present, the
appropriate transform will be performed so that the pixbuf
is oriented correctly.
*/
func (self *TraitPixbuf) ApplyEmbeddedOrientation() (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_apply_embedded_orientation(self.CPointer)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Creates a transformation of the source image @src by scaling by
@scale_x and @scale_y then translating by @offset_x and @offset_y.
This gives an image in the coordinates of the destination pixbuf.
The rectangle (@dest_x, @dest_y, @dest_width, @dest_height)
is then composited onto the corresponding rectangle of the
original destination image.

When the destination rectangle contains parts not in the source
image, the data at the edges of the source image is replicated
to infinity.

![](composite.png)
*/
func (self *TraitPixbuf) Composite(dest IsPixbuf, dest_x int, dest_y int, dest_width int, dest_height int, offset_x float64, offset_y float64, scale_x float64, scale_y float64, interp_type C.GdkInterpType, overall_alpha int) {
	C.gdk_pixbuf_composite(self.CPointer, dest.GetPixbufPointer(), C.int(dest_x), C.int(dest_y), C.int(dest_width), C.int(dest_height), C.double(offset_x), C.double(offset_y), C.double(scale_x), C.double(scale_y), interp_type, C.int(overall_alpha))
	return
}

/*
Creates a transformation of the source image @src by scaling by
@scale_x and @scale_y then translating by @offset_x and @offset_y,
then composites the rectangle (@dest_x ,@dest_y, @dest_width,
@dest_height) of the resulting image with a checkboard of the
colors @color1 and @color2 and renders it onto the destination
image.

See gdk_pixbuf_composite_color_simple() for a simpler variant of this
function suitable for many tasks.
*/
func (self *TraitPixbuf) CompositeColor(dest IsPixbuf, dest_x int, dest_y int, dest_width int, dest_height int, offset_x float64, offset_y float64, scale_x float64, scale_y float64, interp_type C.GdkInterpType, overall_alpha int, check_x int, check_y int, check_size int, color1 uint32, color2 uint32) {
	C.gdk_pixbuf_composite_color(self.CPointer, dest.GetPixbufPointer(), C.int(dest_x), C.int(dest_y), C.int(dest_width), C.int(dest_height), C.double(offset_x), C.double(offset_y), C.double(scale_x), C.double(scale_y), interp_type, C.int(overall_alpha), C.int(check_x), C.int(check_y), C.int(check_size), C.guint32(color1), C.guint32(color2))
	return
}

/*
Creates a new #GdkPixbuf by scaling @src to @dest_width x
@dest_height and compositing the result with a checkboard of colors
@color1 and @color2.
*/
func (self *TraitPixbuf) CompositeColorSimple(dest_width int, dest_height int, interp_type C.GdkInterpType, overall_alpha int, check_size int, color1 uint32, color2 uint32) (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_composite_color_simple(self.CPointer, C.int(dest_width), C.int(dest_height), interp_type, C.int(overall_alpha), C.int(check_size), C.guint32(color1), C.guint32(color2))
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Creates a new #GdkPixbuf with a copy of the information in the specified
@pixbuf.
*/
func (self *TraitPixbuf) Copy() (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_copy(self.CPointer)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Copies a rectangular area from @src_pixbuf to @dest_pixbuf.  Conversion of
pixbuf formats is done automatically.

If the source rectangle overlaps the destination rectangle on the
same pixbuf, it will be overwritten during the copy operation.
Therefore, you can not use this function to scroll a pixbuf.
*/
func (self *TraitPixbuf) CopyArea(src_x int, src_y int, width int, height int, dest_pixbuf IsPixbuf, dest_x int, dest_y int) {
	C.gdk_pixbuf_copy_area(self.CPointer, C.int(src_x), C.int(src_y), C.int(width), C.int(height), dest_pixbuf.GetPixbufPointer(), C.int(dest_x), C.int(dest_y))
	return
}

/*
Clears a pixbuf to the given RGBA value, converting the RGBA value into
the pixbuf's pixel format. The alpha will be ignored if the pixbuf
doesn't have an alpha channel.
*/
func (self *TraitPixbuf) Fill(pixel uint32) {
	C.gdk_pixbuf_fill(self.CPointer, C.guint32(pixel))
	return
}

/*
Flips a pixbuf horizontally or vertically and returns the
result in a new pixbuf.
*/
func (self *TraitPixbuf) Flip(horizontal bool) (return__ *Pixbuf) {
	__cgo__horizontal := C.gboolean(0)
	if horizontal {
		__cgo__horizontal = C.gboolean(1)
	}
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_flip(self.CPointer, __cgo__horizontal)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Queries the number of bits per color sample in a pixbuf.
*/
func (self *TraitPixbuf) GetBitsPerSample() (return__ int) {
	var __cgo__return__ C.int
	__cgo__return__ = C.gdk_pixbuf_get_bits_per_sample(self.CPointer)
	return__ = int(__cgo__return__)
	return
}

/*
Returns the length of the pixel data, in bytes.
*/
func (self *TraitPixbuf) GetByteLength() (return__ int64) {
	var __cgo__return__ C.gsize
	__cgo__return__ = C.gdk_pixbuf_get_byte_length(self.CPointer)
	return__ = int64(__cgo__return__)
	return
}

/*
Queries the color space of a pixbuf.
*/
func (self *TraitPixbuf) GetColorspace() (return__ C.GdkColorspace) {
	return__ = C.gdk_pixbuf_get_colorspace(self.CPointer)
	return
}

/*
Queries whether a pixbuf has an alpha channel (opacity information).
*/
func (self *TraitPixbuf) GetHasAlpha() (return__ bool) {
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_get_has_alpha(self.CPointer)
	return__ = __cgo__return__ == C.gboolean(1)
	return
}

/*
Queries the height of a pixbuf.
*/
func (self *TraitPixbuf) GetHeight() (return__ int) {
	var __cgo__return__ C.int
	__cgo__return__ = C.gdk_pixbuf_get_height(self.CPointer)
	return__ = int(__cgo__return__)
	return
}

/*
Queries the number of channels of a pixbuf.
*/
func (self *TraitPixbuf) GetNChannels() (return__ int) {
	var __cgo__return__ C.int
	__cgo__return__ = C.gdk_pixbuf_get_n_channels(self.CPointer)
	return__ = int(__cgo__return__)
	return
}

/*
Looks up @key in the list of options that may have been attached to the
@pixbuf when it was loaded, or that may have been attached by another
function using gdk_pixbuf_set_option().

For instance, the ANI loader provides "Title" and "Artist" options.
The ICO, XBM, and XPM loaders provide "x_hot" and "y_hot" hot-spot
options for cursor definitions. The PNG loader provides the tEXt ancillary
chunk key/value pairs as options. Since 2.12, the TIFF and JPEG loaders
return an "orientation" option string that corresponds to the embedded
TIFF/Exif orientation tag (if present).
*/
func (self *TraitPixbuf) GetOption(key string) (return__ string) {
	__cgo__key := (*C.gchar)(unsafe.Pointer(C.CString(key)))
	var __cgo__return__ *C.gchar
	__cgo__return__ = C.gdk_pixbuf_get_option(self.CPointer, __cgo__key)
	C.free(unsafe.Pointer(__cgo__key))
	return__ = C.GoString((*C.char)(unsafe.Pointer(__cgo__return__)))
	return
}

/*
Queries a pointer to the pixel data of a pixbuf.
*/
func (self *TraitPixbuf) GetPixels() (return__ *C.guchar) {
	return__ = C.gdk_pixbuf_get_pixels(self.CPointer)
	return
}

/*
Queries a pointer to the pixel data of a pixbuf.
*/
func (self *TraitPixbuf) GetPixelsWithLength() (length uint, return__ []byte) {
	var __cgo__length C.guint
	var __cgo__return__ *C.guchar
	__cgo__return__ = C.gdk_pixbuf_get_pixels_with_length(self.CPointer, &__cgo__length)
	length = uint(__cgo__length)
	defer func() { return__ = C.GoBytes(unsafe.Pointer(__cgo__return__), C.int(length)) }()
	return
}

/*
Queries the rowstride of a pixbuf, which is the number of bytes between
the start of a row and the start of the next row.
*/
func (self *TraitPixbuf) GetRowstride() (return__ int) {
	var __cgo__return__ C.int
	__cgo__return__ = C.gdk_pixbuf_get_rowstride(self.CPointer)
	return__ = int(__cgo__return__)
	return
}

/*
Queries the width of a pixbuf.
*/
func (self *TraitPixbuf) GetWidth() (return__ int) {
	var __cgo__return__ C.int
	__cgo__return__ = C.gdk_pixbuf_get_width(self.CPointer)
	return__ = int(__cgo__return__)
	return
}

/*
Creates a new pixbuf which represents a sub-region of @src_pixbuf.
The new pixbuf shares its pixels with the original pixbuf, so
writing to one affects both.  The new pixbuf holds a reference to
@src_pixbuf, so @src_pixbuf will not be finalized until the new
pixbuf is finalized.

Note that if @src_pixbuf is read-only, this function will force it
to be mutable.
*/
func (self *TraitPixbuf) NewSubpixbuf(src_x int, src_y int, width int, height int) (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_new_subpixbuf(self.CPointer, C.int(src_x), C.int(src_y), C.int(width), C.int(height))
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

func (self *TraitPixbuf) ReadPixelBytes() (return__ *C.GBytes) {
	return__ = C.gdk_pixbuf_read_pixel_bytes(self.CPointer)
	return
}

/*
Returns a read-only pointer to the raw pixel data; must not be
modified.  This function allows skipping the implicit copy that
must be made if gdk_pixbuf_get_pixels() is called on a read-only
pixbuf.
*/
func (self *TraitPixbuf) ReadPixels() (return__ *C.guint8) {
	return__ = C.gdk_pixbuf_read_pixels(self.CPointer)
	return
}

// gdk_pixbuf_ref is not generated due to deprecation attr

/*
Rotates a pixbuf by a multiple of 90 degrees, and returns the
result in a new pixbuf.
*/
func (self *TraitPixbuf) RotateSimple(angle C.GdkPixbufRotation) (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_rotate_simple(self.CPointer, angle)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Modifies saturation and optionally pixelates @src, placing the result in
@dest. @src and @dest may be the same pixbuf with no ill effects.  If
@saturation is 1.0 then saturation is not changed. If it's less than 1.0,
saturation is reduced (the image turns toward grayscale); if greater than
1.0, saturation is increased (the image gets more vivid colors). If @pixelate
is %TRUE, then pixels are faded in a checkerboard pattern to create a
pixelated image. @src and @dest must have the same image format, size, and
rowstride.
*/
func (self *TraitPixbuf) SaturateAndPixelate(dest IsPixbuf, saturation float32, pixelate bool) {
	__cgo__pixelate := C.gboolean(0)
	if pixelate {
		__cgo__pixelate = C.gboolean(1)
	}
	C.gdk_pixbuf_saturate_and_pixelate(self.CPointer, dest.GetPixbufPointer(), C.gfloat(saturation), __cgo__pixelate)
	return
}

// gdk_pixbuf_save is not generated due to varargs

// gdk_pixbuf_save_to_buffer is not generated due to varargs

/*
Saves pixbuf to a new buffer in format @type, which is currently "jpeg",
"tiff", "png", "ico" or "bmp".  See gdk_pixbuf_save_to_buffer()
for more details.
*/
func (self *TraitPixbuf) SaveToBufferv(type_ string, option_keys []string, option_values []string) (buffer []byte, buffer_size int64, return__ bool, __err__ error) {
	var __cgo__buffer *C.gchar
	var __cgo__buffer_size C.gsize
	__cgo__type_ := C.CString(type_)
	__header__option_keys := (*reflect.SliceHeader)(unsafe.Pointer(&option_keys))
	__header__option_values := (*reflect.SliceHeader)(unsafe.Pointer(&option_values))
	var __cgo_error__ *C.GError
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_save_to_bufferv(self.CPointer, &__cgo__buffer, &__cgo__buffer_size, __cgo__type_, (**C.char)(unsafe.Pointer(__header__option_keys.Data)), (**C.char)(unsafe.Pointer(__header__option_values.Data)), &__cgo_error__)
	defer func() { buffer = C.GoBytes(unsafe.Pointer(__cgo__buffer), C.int(buffer_size)) }()
	buffer_size = int64(__cgo__buffer_size)
	C.free(unsafe.Pointer(__cgo__type_))
	return__ = __cgo__return__ == C.gboolean(1)
	if __cgo_error__ != nil {
		__err__ = errors.New(C.GoString((*C.char)(unsafe.Pointer(__cgo_error__.message))))
	}
	return
}

// gdk_pixbuf_save_to_callback is not generated due to varargs

/*
Saves pixbuf to a callback in format @type, which is currently "jpeg",
"png", "tiff", "ico" or "bmp".  If @error is set, %FALSE will be returned. See
gdk_pixbuf_save_to_callback () for more details.
*/
func (self *TraitPixbuf) SaveToCallbackv(save_func C.GdkPixbufSaveFunc, user_data unsafe.Pointer, type_ string, option_keys []string, option_values []string) (return__ bool, __err__ error) {
	__cgo__type_ := C.CString(type_)
	__header__option_keys := (*reflect.SliceHeader)(unsafe.Pointer(&option_keys))
	__header__option_values := (*reflect.SliceHeader)(unsafe.Pointer(&option_values))
	var __cgo_error__ *C.GError
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_save_to_callbackv(self.CPointer, save_func, (C.gpointer)(user_data), __cgo__type_, (**C.char)(unsafe.Pointer(__header__option_keys.Data)), (**C.char)(unsafe.Pointer(__header__option_values.Data)), &__cgo_error__)
	C.free(unsafe.Pointer(__cgo__type_))
	return__ = __cgo__return__ == C.gboolean(1)
	if __cgo_error__ != nil {
		__err__ = errors.New(C.GoString((*C.char)(unsafe.Pointer(__cgo_error__.message))))
	}
	return
}

// gdk_pixbuf_save_to_stream is not generated due to varargs

// gdk_pixbuf_save_to_stream_async is not generated due to varargs

/*
Saves pixbuf to a file in @type, which is currently "jpeg", "png", "tiff", "ico" or "bmp".
If @error is set, %FALSE will be returned.
See gdk_pixbuf_save () for more details.
*/
func (self *TraitPixbuf) Savev(filename string, type_ string, option_keys []string, option_values []string) (return__ bool, __err__ error) {
	__cgo__filename := C.CString(filename)
	__cgo__type_ := C.CString(type_)
	__header__option_keys := (*reflect.SliceHeader)(unsafe.Pointer(&option_keys))
	__header__option_values := (*reflect.SliceHeader)(unsafe.Pointer(&option_values))
	var __cgo_error__ *C.GError
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_savev(self.CPointer, __cgo__filename, __cgo__type_, (**C.char)(unsafe.Pointer(__header__option_keys.Data)), (**C.char)(unsafe.Pointer(__header__option_values.Data)), &__cgo_error__)
	C.free(unsafe.Pointer(__cgo__filename))
	C.free(unsafe.Pointer(__cgo__type_))
	return__ = __cgo__return__ == C.gboolean(1)
	if __cgo_error__ != nil {
		__err__ = errors.New(C.GoString((*C.char)(unsafe.Pointer(__cgo_error__.message))))
	}
	return
}

/*
Creates a transformation of the source image @src by scaling by
@scale_x and @scale_y then translating by @offset_x and @offset_y,
then renders the rectangle (@dest_x, @dest_y, @dest_width,
@dest_height) of the resulting image onto the destination image
replacing the previous contents.

Try to use gdk_pixbuf_scale_simple() first, this function is
the industrial-strength power tool you can fall back to if
gdk_pixbuf_scale_simple() isn't powerful enough.

If the source rectangle overlaps the destination rectangle on the
same pixbuf, it will be overwritten during the scaling which
results in rendering artifacts.
*/
func (self *TraitPixbuf) Scale(dest IsPixbuf, dest_x int, dest_y int, dest_width int, dest_height int, offset_x float64, offset_y float64, scale_x float64, scale_y float64, interp_type C.GdkInterpType) {
	C.gdk_pixbuf_scale(self.CPointer, dest.GetPixbufPointer(), C.int(dest_x), C.int(dest_y), C.int(dest_width), C.int(dest_height), C.double(offset_x), C.double(offset_y), C.double(scale_x), C.double(scale_y), interp_type)
	return
}

/*
Create a new #GdkPixbuf containing a copy of @src scaled to
@dest_width x @dest_height. Leaves @src unaffected.  @interp_type
should be #GDK_INTERP_NEAREST if you want maximum speed (but when
scaling down #GDK_INTERP_NEAREST is usually unusably ugly).  The
default @interp_type should be #GDK_INTERP_BILINEAR which offers
reasonable quality and speed.

You can scale a sub-portion of @src by creating a sub-pixbuf
pointing into @src; see gdk_pixbuf_new_subpixbuf().

For more complicated scaling/compositing see gdk_pixbuf_scale()
and gdk_pixbuf_composite().
*/
func (self *TraitPixbuf) ScaleSimple(dest_width int, dest_height int, interp_type C.GdkInterpType) (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_scale_simple(self.CPointer, C.int(dest_width), C.int(dest_height), interp_type)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

// gdk_pixbuf_unref is not generated due to deprecation attr

type TraitPixbufAnimation struct{ CPointer *C.GdkPixbufAnimation }
type IsPixbufAnimation interface {
	GetPixbufAnimationPointer() *C.GdkPixbufAnimation
}

func (self *TraitPixbufAnimation) GetPixbufAnimationPointer() *C.GdkPixbufAnimation {
	return self.CPointer
}
func NewTraitPixbufAnimation(p unsafe.Pointer) *TraitPixbufAnimation {
	return &TraitPixbufAnimation{(*C.GdkPixbufAnimation)(p)}
}

/*
Queries the height of the bounding box of a pixbuf animation.
*/
func (self *TraitPixbufAnimation) GetHeight() (return__ int) {
	var __cgo__return__ C.int
	__cgo__return__ = C.gdk_pixbuf_animation_get_height(self.CPointer)
	return__ = int(__cgo__return__)
	return
}

/*
Get an iterator for displaying an animation. The iterator provides
the frames that should be displayed at a given time.
It should be freed after use with g_object_unref().

@start_time would normally come from g_get_current_time(), and
marks the beginning of animation playback. After creating an
iterator, you should immediately display the pixbuf returned by
gdk_pixbuf_animation_iter_get_pixbuf(). Then, you should install a
timeout (with g_timeout_add()) or by some other mechanism ensure
that you'll update the image after
gdk_pixbuf_animation_iter_get_delay_time() milliseconds. Each time
the image is updated, you should reinstall the timeout with the new,
possibly-changed delay time.

As a shortcut, if @start_time is %NULL, the result of
g_get_current_time() will be used automatically.

To update the image (i.e. possibly change the result of
gdk_pixbuf_animation_iter_get_pixbuf() to a new frame of the animation),
call gdk_pixbuf_animation_iter_advance().

If you're using #GdkPixbufLoader, in addition to updating the image
after the delay time, you should also update it whenever you
receive the area_updated signal and
gdk_pixbuf_animation_iter_on_currently_loading_frame() returns
%TRUE. In this case, the frame currently being fed into the loader
has received new data, so needs to be refreshed. The delay time for
a frame may also be modified after an area_updated signal, for
example if the delay time for a frame is encoded in the data after
the frame itself. So your timeout should be reinstalled after any
area_updated signal.

A delay time of -1 is possible, indicating "infinite."
*/
func (self *TraitPixbufAnimation) GetIter(start_time *C.GTimeVal) (return__ *PixbufAnimationIter) {
	var __cgo__return__ *C.GdkPixbufAnimationIter
	__cgo__return__ = C.gdk_pixbuf_animation_get_iter(self.CPointer, start_time)
	if __cgo__return__ != nil {
		return__ = NewPixbufAnimationIterFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
If an animation is really just a plain image (has only one frame),
this function returns that image. If the animation is an animation,
this function returns a reasonable thing to display as a static
unanimated image, which might be the first frame, or something more
sophisticated. If an animation hasn't loaded any frames yet, this
function will return %NULL.
*/
func (self *TraitPixbufAnimation) GetStaticImage() (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_animation_get_static_image(self.CPointer)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Queries the width of the bounding box of a pixbuf animation.
*/
func (self *TraitPixbufAnimation) GetWidth() (return__ int) {
	var __cgo__return__ C.int
	__cgo__return__ = C.gdk_pixbuf_animation_get_width(self.CPointer)
	return__ = int(__cgo__return__)
	return
}

/*
If you load a file with gdk_pixbuf_animation_new_from_file() and it turns
out to be a plain, unanimated image, then this function will return
%TRUE. Use gdk_pixbuf_animation_get_static_image() to retrieve
the image.
*/
func (self *TraitPixbufAnimation) IsStaticImage() (return__ bool) {
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_animation_is_static_image(self.CPointer)
	return__ = __cgo__return__ == C.gboolean(1)
	return
}

// gdk_pixbuf_animation_ref is not generated due to deprecation attr

// gdk_pixbuf_animation_unref is not generated due to deprecation attr

type TraitPixbufAnimationIter struct{ CPointer *C.GdkPixbufAnimationIter }
type IsPixbufAnimationIter interface {
	GetPixbufAnimationIterPointer() *C.GdkPixbufAnimationIter
}

func (self *TraitPixbufAnimationIter) GetPixbufAnimationIterPointer() *C.GdkPixbufAnimationIter {
	return self.CPointer
}
func NewTraitPixbufAnimationIter(p unsafe.Pointer) *TraitPixbufAnimationIter {
	return &TraitPixbufAnimationIter{(*C.GdkPixbufAnimationIter)(p)}
}

/*
Possibly advances an animation to a new frame. Chooses the frame based
on the start time passed to gdk_pixbuf_animation_get_iter().

@current_time would normally come from g_get_current_time(), and
must be greater than or equal to the time passed to
gdk_pixbuf_animation_get_iter(), and must increase or remain
unchanged each time gdk_pixbuf_animation_iter_get_pixbuf() is
called. That is, you can't go backward in time; animations only
play forward.

As a shortcut, pass %NULL for the current time and g_get_current_time()
will be invoked on your behalf. So you only need to explicitly pass
@current_time if you're doing something odd like playing the animation
at double speed.

If this function returns %FALSE, there's no need to update the animation
display, assuming the display had been rendered prior to advancing;
if %TRUE, you need to call gdk_pixbuf_animation_iter_get_pixbuf()
and update the display with the new pixbuf.
*/
func (self *TraitPixbufAnimationIter) Advance(current_time *C.GTimeVal) (return__ bool) {
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_animation_iter_advance(self.CPointer, current_time)
	return__ = __cgo__return__ == C.gboolean(1)
	return
}

/*
Gets the number of milliseconds the current pixbuf should be displayed,
or -1 if the current pixbuf should be displayed forever. g_timeout_add()
conveniently takes a timeout in milliseconds, so you can use a timeout
to schedule the next update.
*/
func (self *TraitPixbufAnimationIter) GetDelayTime() (return__ int) {
	var __cgo__return__ C.int
	__cgo__return__ = C.gdk_pixbuf_animation_iter_get_delay_time(self.CPointer)
	return__ = int(__cgo__return__)
	return
}

/*
Gets the current pixbuf which should be displayed; the pixbuf might not
be the same size as the animation itself
(gdk_pixbuf_animation_get_width(), gdk_pixbuf_animation_get_height()).
This pixbuf should be displayed for
gdk_pixbuf_animation_iter_get_delay_time() milliseconds.  The caller
of this function does not own a reference to the returned pixbuf;
the returned pixbuf will become invalid when the iterator advances
to the next frame, which may happen anytime you call
gdk_pixbuf_animation_iter_advance(). Copy the pixbuf to keep it
(don't just add a reference), as it may get recycled as you advance
the iterator.
*/
func (self *TraitPixbufAnimationIter) GetPixbuf() (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_animation_iter_get_pixbuf(self.CPointer)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Used to determine how to respond to the area_updated signal on
#GdkPixbufLoader when loading an animation. area_updated is emitted
for an area of the frame currently streaming in to the loader. So if
you're on the currently loading frame, you need to redraw the screen for
the updated area.
*/
func (self *TraitPixbufAnimationIter) OnCurrentlyLoadingFrame() (return__ bool) {
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_animation_iter_on_currently_loading_frame(self.CPointer)
	return__ = __cgo__return__ == C.gboolean(1)
	return
}

type TraitPixbufLoader struct{ CPointer *C.GdkPixbufLoader }
type IsPixbufLoader interface {
	GetPixbufLoaderPointer() *C.GdkPixbufLoader
}

func (self *TraitPixbufLoader) GetPixbufLoaderPointer() *C.GdkPixbufLoader {
	return self.CPointer
}
func NewTraitPixbufLoader(p unsafe.Pointer) *TraitPixbufLoader {
	return &TraitPixbufLoader{(*C.GdkPixbufLoader)(p)}
}

/*
Informs a pixbuf loader that no further writes with
gdk_pixbuf_loader_write() will occur, so that it can free its
internal loading structures. Also, tries to parse any data that
hasn't yet been parsed; if the remaining data is partial or
corrupt, an error will be returned.  If %FALSE is returned, @error
will be set to an error from the #GDK_PIXBUF_ERROR or #G_FILE_ERROR
domains. If you're just cancelling a load rather than expecting it
to be finished, passing %NULL for @error to ignore it is
reasonable.

Remember that this does not unref the loader, so if you plan not to
use it anymore, please g_object_unref() it.
*/
func (self *TraitPixbufLoader) Close() (return__ bool, __err__ error) {
	var __cgo_error__ *C.GError
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_loader_close(self.CPointer, &__cgo_error__)
	return__ = __cgo__return__ == C.gboolean(1)
	if __cgo_error__ != nil {
		__err__ = errors.New(C.GoString((*C.char)(unsafe.Pointer(__cgo_error__.message))))
	}
	return
}

/*
Queries the #GdkPixbufAnimation that a pixbuf loader is currently creating.
In general it only makes sense to call this function after the "area-prepared"
signal has been emitted by the loader. If the loader doesn't have enough
bytes yet (hasn't emitted the "area-prepared" signal) this function will
return %NULL.
*/
func (self *TraitPixbufLoader) GetAnimation() (return__ *PixbufAnimation) {
	var __cgo__return__ *C.GdkPixbufAnimation
	__cgo__return__ = C.gdk_pixbuf_loader_get_animation(self.CPointer)
	if __cgo__return__ != nil {
		return__ = NewPixbufAnimationFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Obtains the available information about the format of the
currently loading image file.
*/
func (self *TraitPixbufLoader) GetFormat() (return__ *C.GdkPixbufFormat) {
	return__ = C.gdk_pixbuf_loader_get_format(self.CPointer)
	return
}

/*
Queries the #GdkPixbuf that a pixbuf loader is currently creating.
In general it only makes sense to call this function after the
"area-prepared" signal has been emitted by the loader; this means
that enough data has been read to know the size of the image that
will be allocated.  If the loader has not received enough data via
gdk_pixbuf_loader_write(), then this function returns %NULL.  The
returned pixbuf will be the same in all future calls to the loader,
so simply calling g_object_ref() should be sufficient to continue
using it.  Additionally, if the loader is an animation, it will
return the "static image" of the animation
(see gdk_pixbuf_animation_get_static_image()).
*/
func (self *TraitPixbufLoader) GetPixbuf() (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_loader_get_pixbuf(self.CPointer)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}

/*
Causes the image to be scaled while it is loaded. The desired
image size can be determined relative to the original size of
the image by calling gdk_pixbuf_loader_set_size() from a
signal handler for the ::size-prepared signal.

Attempts to set the desired image size  are ignored after the
emission of the ::size-prepared signal.
*/
func (self *TraitPixbufLoader) SetSize(width int, height int) {
	C.gdk_pixbuf_loader_set_size(self.CPointer, C.int(width), C.int(height))
	return
}

/*
This will cause a pixbuf loader to parse the next @count bytes of
an image.  It will return %TRUE if the data was loaded successfully,
and %FALSE if an error occurred.  In the latter case, the loader
will be closed, and will not accept further writes. If %FALSE is
returned, @error will be set to an error from the #GDK_PIXBUF_ERROR
or #G_FILE_ERROR domains.
*/
func (self *TraitPixbufLoader) Write(buf []byte, count int64) (return__ bool, __err__ error) {
	__header__buf := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
	var __cgo_error__ *C.GError
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_loader_write(self.CPointer, (*C.guchar)(unsafe.Pointer(__header__buf.Data)), C.gsize(count), &__cgo_error__)
	return__ = __cgo__return__ == C.gboolean(1)
	if __cgo_error__ != nil {
		__err__ = errors.New(C.GoString((*C.char)(unsafe.Pointer(__cgo_error__.message))))
	}
	return
}

/*
This will cause a pixbuf loader to parse a buffer inside a #GBytes
for an image.  It will return %TRUE if the data was loaded successfully,
and %FALSE if an error occurred.  In the latter case, the loader
will be closed, and will not accept further writes. If %FALSE is
returned, @error will be set to an error from the #GDK_PIXBUF_ERROR
or #G_FILE_ERROR domains.

See also: gdk_pixbuf_loader_write()
*/
func (self *TraitPixbufLoader) WriteBytes(buffer *C.GBytes) (return__ bool, __err__ error) {
	var __cgo_error__ *C.GError
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_loader_write_bytes(self.CPointer, buffer, &__cgo_error__)
	return__ = __cgo__return__ == C.gboolean(1)
	if __cgo_error__ != nil {
		__err__ = errors.New(C.GoString((*C.char)(unsafe.Pointer(__cgo_error__.message))))
	}
	return
}

type TraitPixbufSimpleAnim struct{ CPointer *C.GdkPixbufSimpleAnim }
type IsPixbufSimpleAnim interface {
	GetPixbufSimpleAnimPointer() *C.GdkPixbufSimpleAnim
}

func (self *TraitPixbufSimpleAnim) GetPixbufSimpleAnimPointer() *C.GdkPixbufSimpleAnim {
	return self.CPointer
}
func NewTraitPixbufSimpleAnim(p unsafe.Pointer) *TraitPixbufSimpleAnim {
	return &TraitPixbufSimpleAnim{(*C.GdkPixbufSimpleAnim)(p)}
}

/*
Adds a new frame to @animation. The @pixbuf must
have the dimensions specified when the animation
was constructed.
*/
func (self *TraitPixbufSimpleAnim) AddFrame(pixbuf IsPixbuf) {
	C.gdk_pixbuf_simple_anim_add_frame(self.CPointer, pixbuf.GetPixbufPointer())
	return
}

/*
Gets whether @animation should loop indefinitely when it reaches the end.
*/
func (self *TraitPixbufSimpleAnim) GetLoop() (return__ bool) {
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_simple_anim_get_loop(self.CPointer)
	return__ = __cgo__return__ == C.gboolean(1)
	return
}

/*
Sets whether @animation should loop indefinitely when it reaches the end.
*/
func (self *TraitPixbufSimpleAnim) SetLoop(loop bool) {
	__cgo__loop := C.gboolean(0)
	if loop {
		__cgo__loop = C.gboolean(1)
	}
	C.gdk_pixbuf_simple_anim_set_loop(self.CPointer, __cgo__loop)
	return
}


text:
import tweepy
import datetime
import exampleb as bot

class TwitterAPI:

    def __init__(self):
        '''connect to twitter account'''

        consumer_key = "XXXXXXXXXX"
        consumer_secret = "XXXXXXXXXX"
        auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
        access_token = "XXXXXXXXXX"
        access_token_secret = "XXXXXXXXXX"
        auth.set_access_token(access_token, access_token_secret)
        self.api = tweepy.API(auth)

    def tweet(self, message):
        '''post tweet'''

        self.api.update_status(status=message)

def go_tweet():
    '''generate, record, send tweet'''

    twitter = TwitterAPI()
    to_tweet=bot.get_string()
    print(str(datetime.datetime.now()) + " " + to_tweet)
    twitter.tweet(to_tweet)

if __name__ == '__main__':

    go_tweet()

redpajama_set_name: RedPajamaGithub


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

    <ImageView
        android:id="@+id/icon"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true" />

    <TextView
        android:id="@+id/label"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignTop="@id/icon"
        android:layout_toRightOf="@id/icon"
        tools:text="Action Bar Sherlock" />

    <TextView
        android:id="@+id/package_name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/label"
        android:layout_toRightOf="@id/icon"
        tools:text="com.jakewharton.actionbarsherlock"/>
</RelativeLayout>


text:
#include <memory>
#include <utility>

#include "modules/video_coding/frame_object.h"
#include "modules/video_coding/packet_buffer.h"
#include "system_wrappers/include/clock.h"
#include "test/fuzzers/fuzz_data_helper.h"

namespace webrtc {

void IgnoreResult(video_coding::PacketBuffer::InsertResult result) {}

void FuzzOneInput(const uint8_t* data, size_t size) {
  if (size > 200000) {
    return;
  }
  SimulatedClock clock(0);
  video_coding::PacketBuffer packet_buffer(&clock, 8, 1024);
  test::FuzzDataHelper helper(rtc::ArrayView<const uint8_t>(data, size));

  while (helper.BytesLeft()) {
    auto packet = std::make_unique<video_coding::PacketBuffer::Packet>();
    // Fuzz POD members of the packet.
    helper.CopyTo(&packet->marker_bit);
    helper.CopyTo(&packet->payload_type);
    helper.CopyTo(&packet->seq_num);
    helper.CopyTo(&packet->timestamp);
    helper.CopyTo(&packet->ntp_time_ms);
    helper.CopyTo(&packet->times_nacked);

    // Fuzz non-POD member of the packet.
    packet->video_payload.SetSize(helper.ReadOrDefaultValue<uint8_t>(0));
    // TODO(danilchap): Fuzz other non-POD members of the |packet|.

    IgnoreResult(packet_buffer.InsertPacket(std::move(packet)));
  }
}

}  // namespace webrtc


text:
package cmd

import (
	"github.com/pkg/errors"
)

var errViolations = errors.New("Found violations")


text:
import re

class TempliteSyntaxError(ValueError):
    pass

class CodeBuilder(object):
    INDENT_STEP = 4

    def __init__(self, indent=0):
        self.code = []
        self.indent_level = indent

    def add_line(self, line):
        self.code.extend([" " * self.indent_level, line, "\n"])

    def indent(self):
        self.indent_level += self.INDENT_STEP

    def dedent(self):
        self.indent_level -= self.INDENT_STEP

    def add_section(self):
        section = CodeBuilder(self.indent_level)
        self.code.append(section)
        return section

    def __str__(self):
        return "".join(str(c) for c in self.code)

    def get_globals(self):
        assert self.indent_level == 0
        python_source = str(self)
        global_namespace = {}
        exec(python_source, global_namespace)
        return global_namespace

class Templite(object):

    def __init__(self, text, *contexts):
        self.context = {}
        for context in contexts:
            self.context.update(context)

        self.all_vars = set()
        self.loop_vars = set()

        code = CodeBuilder()
        code.add_line("def render_function(context, do_dots):")
        code.indent()
        vars_code = code.add_section()
        code.add_line("result = []")
        code.add_line("append_result = result.append")
        code.add_line("extend_result = result.extend")
        code.add_line("to_str = str")

        buffered = []
        def flush_output():
            if len(buffered) == 1:
                code.add_line("append_result(%s)" % buffered[0])
            elif len(buffered) > 1:
                code.add_line("extend_result([%s])" % ", ".join(buffered))
            del buffered[:]

        ops_stack = []
        tokens = re.split(r"(?s)({{.*?}}|{%.*?%}|{#.*?#})", text)
        for token in tokens:
            if token.startswith('{#'):
                continue
            elif token.startswith('{{'):
                expr = self._expr_code(token[2:-2].strip())
                buffered.append("to_str(%s)" % expr)
            elif token.startswith('{%'):
                flush_output()
                words = token[2:-2].split()
                if words[0] == 'if':
                    if len(words) != 2:
                        self._syntax_error("Don't understand if", words[1])
                    ops_stack.append('if')
                    code.add_line("if %s:" % self._expr_code(words[1]))
                    code.indent()
                elif words[0] == 'for':
                    if len(words) != 4 or words[2] != 'in':
                        self._syntax_error("Don't understand for", token)
                    ops_stack.append('for')
                    self._variable(words[1], self.loop_vars)
                    code.add_line(
                        "for c_%s in %s:" % (words[1], self._expr_code(words[3]))
                    )
                    code.indent()
                elif words[0].startswith('end'):
                    if len(words) != 1:
                        self._syntax_error("Don't understant end", token)
                    end_what = words[0][3:]
                    if not ops_stack:
                        self._syntax_error('Too many ends', token)
                    start_what = ops_stack.pop()
                    if end_what != start_what:
                        self._syntax_error('Wrong close', token)
                    code.dedent()
                else:
                    self._syntax_error("Don't understand tag", token)
            else:
                if token:
                    buffered.append(repr(token))
        if ops_stack:
            self._syntax_error("Unmatched action tag", ops_stack[-1])
        flush_output()

        for var_name in self.all_vars - self.loop_vars:
            vars_code.add_line("c_%s = context[%r]" % (var_name, var_name))
        code.add_line("return ''.join(result)")
        code.dedent()

        self._render_function = code.get_globals()['render_function']

    def _expr_code(self, expr):
        if '|' in expr:
            pipes = expr.split('|')
            code = self._expr_code(pipes[0])
            for func in pipes[1:]:
                self._variable(func, self.all_vars)
                code = "c_%s(%s)" % (func, code)
        elif '.' in expr:
            dots = expr.split('.')
            code = self._expr_code(dots[0])
            code = "do_dots(%s, %s)" % (code, ", ".join(repr(d) for d in dots[1:]))
        else:
            self._variable(expr, self.all_vars)
            code = "c_%s" % expr
        return code

    def _syntax_error(self, msg, thing):
        raise TempliteSyntaxError("%s: %r" %(msg, thing))

    def _variable(self, name, vars_set):
        if not re.match(r"[_a-zA-Z][_a-zA-Z0-9]*$", name):
            self._syntax_error("Not valid name", name)
        vars_set.add(name)

    def _do_dots(self, value, *dots):
        for dot in dots:
            try:
                value = getattr(value, dot)
            except AttributeError:
                value = value[dot]
            if callable(value):
                value = value()
        return value

    def render(self, context=None):
        render_context = dict(self.context)
        if context:
            render_context.update(context)
        return self._render_function(render_context, self._do_dots)


text:
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;

namespace Microsoft.Azure.WebJobs.Hosting
{
    /// <summary>
    /// Interface defining a startup configuration action that should be performed
    /// as part of host startup.
    /// </summary>
    public interface IWebJobsStartup
    {
        /// <summary>
        /// Performs the startup configuration action. The host will call this
        /// method at the right time during host initialization.
        /// </summary>
        /// <param name="builder">The <see cref="IWebJobsBuilder"/> that can be used to
        /// configure the host.</param>
        void Configure(IWebJobsBuilder builder);
    }
}


text:
package com.teemo.testimageloader.image;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

/**
 * Created by Asus on 2017/3/13.
 */

public class ImageLoadUtils {

    public static void loadImage(Context context, String url, ImageView imageView) {
        Glide.with(context)
                .load(url)
//                .override(768, 1280)
//                .diskCacheStrategy(DiskCacheStrategy.NONE)
//                .skipMemoryCache(true)
//                .centerCrop()
//                .animate(R.anim.pic_anim)
//                .thumbnail(Glide.with(app)
//                        .load("http://wx4.sinaimg.cn/large/63885668ly1fcxt31gn9gj21rw16lhdu.jpg"))
//                .thumbnail((float) 0.1)
                .diskCacheStrategy(DiskCacheStrategy.ALL)
//                .transform(new GlideCircleTransform(app))
                .dontAnimate()
                .into(imageView);

    }

    /**
     * 从指定URL获取图片
     *
     * @param url
     * @return
     */
    public static Bitmap getImageBitmap(String url) {
        URL imgUrl = null;
        Bitmap bitmap = null;
        try {
            imgUrl = new URL(url);
            HttpURLConnection conn = (HttpURLConnection) imgUrl.openConnection();
            conn.setDoInput(true);
            conn.connect();
            InputStream is = conn.getInputStream();
            bitmap = BitmapFactory.decodeStream(is);
            is.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return bitmap;
    }
}


text:
package pathfinding;

public abstract class Heuristic {
	public abstract double getEstimatedDistanceToGoal(PathNode start, PathNode finish);
}


text:
"use strict";

var emptyFunction = require('emptyFunction');
var joinClasses = require('joinClasses');
var merge = require('merge');

/**
 * Creates a transfer strategy that will merge prop values using the supplied
 * `mergeStrategy`. If a prop was previously unset, this just sets it.
 *
 * @param {function} mergeStrategy
 * @return {function}
 */
function createTransferStrategy(mergeStrategy) {
  return function(props, key, value) {
    if (!props.hasOwnProperty(key)) {
      props[key] = value;
    } else {
      props[key] = mergeStrategy(props[key], value);
    }
  };
}

/**
 * Transfer strategies dictate how props are transferred by `transferPropsTo`.
 */
var TransferStrategies = {
  /**
   * Never transfer the `ref` prop.
   */
  ref: emptyFunction,
  /**
   * Transfer the `className` prop by merging them.
   */
  className: createTransferStrategy(joinClasses),
  /**
   * Transfer the `style` prop (which is an object) by merging them.
   */
  style: createTransferStrategy(merge)
};

/**
 * ReactPropTransferer are capable of transferring props to another component
 * using a `transferPropsTo` method.
 *
 * @class ReactPropTransferer
 */
var ReactPropTransferer = {

  TransferStrategies: TransferStrategies,

  /**
   * @lends {ReactPropTransferer.prototype}
   */
  Mixin: {

    /**
     * Transfer props from this component to a target component.
     *
     * Props that do not have an explicit transfer strategy will be transferred
     * only if the target component does not already have the prop set.
     *
     * This is usually used to pass down props to a returned root component.
     *
     * @param {ReactComponent} component Component receiving the properties.
     * @return {ReactComponent} The supplied `component`.
     * @final
     * @protected
     */
    transferPropsTo: function(component) {
      var props = {};
      for (var thatKey in component.props) {
        if (component.props.hasOwnProperty(thatKey)) {
          props[thatKey] = component.props[thatKey];
        }
      }
      for (var thisKey in this.props) {
        if (!this.props.hasOwnProperty(thisKey)) {
          continue;
        }
        var transferStrategy = TransferStrategies[thisKey];
        if (transferStrategy) {
          transferStrategy(props, thisKey, this.props[thisKey]);
        } else if (!props.hasOwnProperty(thisKey)) {
          props[thisKey] = this.props[thisKey];
        }
      }
      component.props = props;
      return component;
    }

  }

};

module.exports = ReactPropTransferer;


text:
<?php
class GangliaAuth {
  private static $auth;

  private $user;
  private $group;
  private $tokenIsValid;//    valid:有效的

  public static function getInstance() {
    if(is_null(self::$auth)) {
      self::$auth = new GangliaAuth();
    }
    return self::$auth;
  }

  public static function destroyInstance() {
    self::$auth = null;
  }

  public function __construct() {
    // separated for testability. need to disable constructor in some tests & run init later.
//      可分离的测试能力,需要在一些测试上禁用构造函数,并且在更高的版本里运行init()
    $this->init();
  }
  public function init() {
    if(!$this->environmentIsValid()) {
      return false;
    }

    $this->user = null;
    $this->group = null;
    $this->tokenIsValid = false;

    if(isSet($_COOKIE['ganglia_auth'])) {
      $cookie = $_COOKIE['ganglia_auth'];
      // magic quotes will break unserialization
//        巧妙的引用可以打破 反序列化
      if($this->getMagicQuotesGpc()) {
        $cookie = stripslashes($cookie);
//          删除有addslashes()添加的斜杠
      }
      $data = json_decode($cookie, TRUE);
//        对json格式的字符串进行编码
      if(array_keys($data) != array('user','group','token')) {
        return false;
      }

      if($this->getAuthToken($data['user']) === $data['token']) {
        $this->tokenIsValid = true;
        $this->user = $data['user'];
        $this->group = $data['group'];
      }
    }
  }

  public function getUser() {
    return $this->user;
  }

  public function getGroup() {
    return $this->group;
  }

  public function isAuthenticated() {
    return $this->tokenIsValid;
  }

  public function getEnvironmentErrors() {
    $errors = array();
    if(!isSet($_SERVER['ganglia_secret'])) {
      $errors[] = "No ganglia_secret set in the server environment.  If you are using Apache, try adding 'SetEnv ganglia_secret ".sha1(mt_rand().microtime())."' to your configuration.";
    }
    return $errors;
  }

  public function environmentIsValid() {
    return count($this->getEnvironmentErrors())==0;
  }

  public function getAuthToken($user) {
    $secret = $_SERVER['ganglia_secret'];
    return sha1( $user.$secret );
  }

  // this is how a user 'logs in'.
//    这是 用户如何注册
  public function setAuthCookie($user, $group=null) {
    setcookie('ganglia_auth', json_encode( array('user'=>$user, 'group'=>$group, 'token'=>$this->getAuthToken($user)) ) );
    $this->user = $user;
    $this->group = $group;
    $this->tokenIsValid = true;
  }

  public function destroyAuthCookie() {
    setcookie('ganglia_auth', '', time());
    self::$auth = null;
  }

  protected function getMagicQuotesGpc() {
    return get_magic_quotes_gpc();
  }
}
?>


text:
""" """

# Standard library modules.
import unittest
import logging

# Third party modules.

# Local modules.
from pyhmsa_gui.util.testcase import TestCaseQApp, QTest
from pyhmsa_gui.spec.condition.elementalid import \
    ElementalIDWidget, ElementalIDXrayWidget

# Globals and constants variables.

class TestElementalIDWidget(TestCaseQApp):

    def setUp(self):
        TestCaseQApp.setUp(self)

        self.wdg = ElementalIDWidget()

    def tearDown(self):
        TestCaseQApp.tearDown(self)

    def test_initui(self):
        pass

class TestElementalIDXrayWidget(TestCaseQApp):

    def setUp(self):
        TestCaseQApp.setUp(self)

        self.wdg = ElementalIDXrayWidget()

    def tearDown(self):
        TestCaseQApp.tearDown(self)

    def test_initui(self):
        pass

if __name__ == '__main__': #pragma: no cover
    logging.getLogger().setLevel(logging.DEBUG)
    unittest.main()


text:
$.namespace('azkaban');

function expireTrigger(triggerId) {
  var triggerURL = contextURL + "/triggers"
  var redirectURL = contextURL + "/triggers"
  var requestData = {"ajax": "expireTrigger", "triggerId": triggerId};
  var successHandler = function(data) {
    if (data.error) {
      //alert(data.error)
      $('#errorMsg').text(data.error);
    }
    else {
      //alert("Schedule "+schedId+" removed!")
      window.location = redirectURL;
    }
  };
  $.post(triggerURL, requestData, successHandler, "json");
}

function removeTrigger(triggerId) {
  var scheduleURL = contextURL + "/triggers";
  var redirectURL = contextURL + "/triggers";
  var requestData = { "action": "removeTrigger", "triggerId": triggerId };
  var successHandler = function (data) {
    if (data.error) {
      $('#errorMsg').text(data.error);
    }
    else {
      window.location = redirectURL;
    }
  };
  $.post(scheduleURL, requestData, successHandler, "json");
}

function removeSched(scheduleId) {
  var scheduleURL = contextURL + "/schedule"
  var redirectURL = contextURL + "/schedule"
  var requestData = {"action": "removeSched", "scheduleId": scheduleId};
  var successHandler = function(data) {
    if (data.error) {
      //alert(data.error)
      $('#errorMsg').text(data.error);
    }
    else {
      //alert("Schedule "+schedId+" removed!")
      window.location = redirectURL;
    }
  };
  $.post(scheduleURL, requestData, successHandler, "json");
}

function removeSla(scheduleId) {
  var scheduleURL = contextURL + "/schedule"
  var redirectURL = contextURL + "/schedule"
  var requestData = {"action": "removeSla", "scheduleId": scheduleId};
  var successHandler = function(data) {
    if (data.error) {
      //alert(data.error)
      $('#errorMsg').text(data.error)
    }
    else {
      //alert("Schedule "+schedId+" removed!")
      window.location = redirectURL
    }
  };
  $.post(scheduleURL, requestData, successHandler, "json");
}

azkaban.ChangeSlaView = Backbone.View.extend({
  events: {
    "click" : "closeEditingTarget",
    "click #set-sla-btn": "handleSetSla",
    "click #remove-sla-btn": "handleRemoveSla",
    "click #sla-cancel-btn": "handleSlaCancel",
    "click .modal-close": "handleSlaCancel",
    "click #addRow": "handleAddRow"
  },

  initialize: function(setting) {
  },

  handleSlaCancel: function(evt) {
    console.log("Clicked cancel button");
    var scheduleURL = contextURL + "/schedule";

    $('#slaModalBackground').hide();
    $('#sla-options').hide();

    var tFlowRules = document.getElementById("flowRulesTbl").tBodies[0];
    var rows = tFlowRules.rows;
    var rowLength = rows.length
    for (var i = 0; i < rowLength-1; i++) {
      tFlowRules.deleteRow(0);
    }
  },

  initFromSched: function(scheduleId, flowName) {
    this.scheduleId = scheduleId;

    var scheduleURL = contextURL + "/schedule"
    this.scheduleURL = scheduleURL;
    var indexToName = {};
    var nameToIndex = {};
    var indexToText = {};
    this.indexToName = indexToName;
    this.nameToIndex = nameToIndex;
    this.indexToText = indexToText;
    var ruleBoxOptions = ["SUCCESS", "FINISH"];
    this.ruleBoxOptions = ruleBoxOptions;

    var fetchScheduleData = {"scheduleId": this.scheduleId, "ajax": "slaInfo"};
    var successHandler = function(data) {
      if (data.error) {
        alert(data.error);
        return;
      }
      if (data.slaEmails) {
        $('#slaEmails').val(data.slaEmails.join());
      }

      var allJobNames = data.allJobNames;

      indexToName[0] = "";
      nameToIndex[flowName] = 0;
      indexToText[0] = "flow " + flowName;
      for (var i = 1; i <= allJobNames.length; i++) {
        indexToName[i] = allJobNames[i-1];
        nameToIndex[allJobNames[i-1]] = i;
        indexToText[i] = "job " + allJobNames[i-1];
      }

      // populate with existing settings
      if (data.settings) {
        $('.durationpick').timepicker({hourMax: 99});
        return;
      }

      var tFlowRules = document.getElementById("flowRulesTbl").tBodies[0];
      for (var setting in data.settings) {
        var rFlowRule = tFlowRules.insertRow(0);

        var cId = rFlowRule.insertCell(-1);
        var idSelect = document.createElement("select");
        for (var i in indexToName) {
          idSelect.options[i] = new Option(indexToText[i], indexToName[i]);
          if (data.settings[setting].id == indexToName[i]) {
            idSelect.options[i].selected = true;
          }
        }
        cId.appendChild(idSelect);

        var cRule = rFlowRule.insertCell(-1);
        var ruleSelect = document.createElement("select");
        for (var i in ruleBoxOptions) {
          ruleSelect.options[i] = new Option(ruleBoxOptions[i], ruleBoxOptions[i]);
          if (data.settings[setting].rule == ruleBoxOptions[i]) {
            ruleSelect.options[i].selected = true;
          }
        }
        cRule.appendChild(ruleSelect);

        var cDuration = rFlowRule.insertCell(-1);
        var duration = document.createElement("input");
        duration.type = "text";
        duration.setAttribute("class", "durationpick");
        var rawMinutes = data.settings[setting].duration;
        var intMinutes = rawMinutes.substring(0, rawMinutes.length-1);
        var minutes = parseInt(intMinutes);
        var hours = Math.floor(minutes / 60);
        minutes = minutes % 60;
        duration.value = hours + ":" + minutes;
        cDuration.appendChild(duration);

        var cEmail = rFlowRule.insertCell(-1);
        var emailCheck = document.createElement("input");
        emailCheck.type = "checkbox";
        for (var act in data.settings[setting].actions) {
          if (data.settings[setting].actions[act] == "EMAIL") {
            emailCheck.checked = true;
          }
        }
        cEmail.appendChild(emailCheck);

        var cKill = rFlowRule.insertCell(-1);
        var killCheck = document.createElement("input");
        killCheck.type = "checkbox";
        for (var act in data.settings[setting].actions) {
          if (data.settings[setting].actions[act] == "KILL") {
            killCheck.checked = true;
          }
        }
        cKill.appendChild(killCheck);
        $('.durationpick').timepicker({hourMax: 99});
      }
      $('.durationpick').timepicker({hourMax: 99});
    };

    $.get(this.scheduleURL, fetchScheduleData, successHandler, "json");
    $('#slaModalBackground').show();
    $('#sla-options').show();

    //this.schedFlowOptions = sched.flowOptions
    console.log("Loaded schedule info. Ready to set SLA.");
  },

  handleRemoveSla: function(evt) {
    console.log("Clicked remove sla button");
    var scheduleURL = this.scheduleURL;
    var redirectURL = this.scheduleURL;
    var requestData = {"action": "removeSla", "scheduleId": this.scheduleId};
    var successHandler = function(data) {
      if (data.error) {
        $('#errorMsg').text(data.error)
      }
      else {
        window.location = redirectURL
      }
    };
    $.post(scheduleURL, requestData, successHandler, "json");
  },

  handleSetSla: function(evt) {
    var slaEmails = $('#slaEmails').val();
    var settings = {};

    var tFlowRules = document.getElementById("flowRulesTbl").tBodies[0];
    for (var row = 0; row < tFlowRules.rows.length - 1; row++) {
      var rFlowRule = tFlowRules.rows[row];
      var id = rFlowRule.cells[0].firstChild.value;
      var rule = rFlowRule.cells[1].firstChild.value;
      var duration = rFlowRule.cells[2].firstChild.value;
      var email = rFlowRule.cells[3].firstChild.checked;
      var kill = rFlowRule.cells[4].firstChild.checked;
      settings[row] = id + "," + rule + "," + duration + "," + email + "," + kill;
    }

    var slaData = {
      scheduleId: this.scheduleId,
      ajax: "setSla",
      slaEmails: slaEmails,
      settings: settings
    };

    var scheduleURL = this.scheduleURL;
    var successHandler = function(data) {
      if (data.error) {
        alert(data.error);
      }
      else {
        tFlowRules.length = 0;
        window.location = scheduleURL;
      }
    };

    $.post(scheduleURL, slaData, successHandler, "json");
  },

  handleAddRow: function(evt) {
    var indexToName = this.indexToName;
    var nameToIndex = this.nameToIndex;
    var indexToText = this.indexToText;
    var ruleBoxOptions = this.ruleBoxOptions;

    var tFlowRules = document.getElementById("flowRulesTbl").tBodies[0];
    var rFlowRule = tFlowRules.insertRow(tFlowRules.rows.length-1);

    var cId = rFlowRule.insertCell(-1);
    var idSelect = document.createElement("select");
    for (var i in indexToName) {
      idSelect.options[i] = new Option(indexToText[i], indexToName[i]);
    }

    cId.appendChild(idSelect);

    var cRule = rFlowRule.insertCell(-1);
    var ruleSelect = document.createElement("select");
    for (var i in ruleBoxOptions) {
      ruleSelect.options[i] = new Option(ruleBoxOptions[i], ruleBoxOptions[i]);
    }
    cRule.appendChild(ruleSelect);

    var cDuration = rFlowRule.insertCell(-1);
    var duration = document.createElement("input");
    duration.type = "text";
    duration.setAttribute("class", "durationpick");
    cDuration.appendChild(duration);

    var cEmail = rFlowRule.insertCell(-1);
    var emailCheck = document.createElement("input");
    emailCheck.type = "checkbox";
    cEmail.appendChild(emailCheck);

    var cKill = rFlowRule.insertCell(-1);
    var killCheck = document.createElement("input");
    killCheck.type = "checkbox";
    cKill.appendChild(killCheck);

    $('.durationpick').timepicker({hourMax: 99});
    return rFlowRule;
  },

  handleEditColumn: function(evt) {
    var curTarget = evt.currentTarget;

    if (this.editingTarget != curTarget) {
      this.closeEditingTarget();

      var text = $(curTarget).children(".spanValue").text();
      $(curTarget).empty();

      var input = document.createElement("input");
      $(input).attr("type", "text");
      $(input).css("width", "100%");
      $(input).val(text);
      $(curTarget).addClass("editing");
      $(curTarget).append(input);
      $(input).focus();
      this.editingTarget = curTarget;
    }
  },

  handleRemoveColumn: function(evt) {
    var curTarget = evt.currentTarget;
    // Should be the table
    var row = curTarget.parentElement.parentElement;
    $(row).remove();
  },

  closeEditingTarget: function(evt) {
  }
});

var slaView;
var tableSorterView;
$(function() {
  var selected;

  slaView = new azkaban.ChangeSlaView({el:$('#sla-options')});
  tableSorterView = new azkaban.TableSorter({el:$('#scheduledFlowsTbl')});
  /*
  var requestURL = contextURL + "/manager";

  // Set up the Flow options view. Create a new one every time :p
  $('#addSlaBtn').click( function() {
    slaView.show();
  });
  */
});


text:
namespace LinearchExt{

    class Renderer : public Component{
        public:
        static std::list<Renderer> renderers;
        void Init(GameObject*);
        Renderer();
        ~Renderer();
        Renderer(GameObject*);
        virtual void Draw();
    };

}

#endif // RENDERER_HPP


text:
ember-easy-datatable.js
=======================

[![Build Status](https://travis-ci.org/Smartesting/ember-easy-datatable.js.svg?branch=master)](https://travis-ci.org/Smartesting/ember-easy-datatable.js)
[![Code Climate](https://codeclimate.com/github/Smartesting/ember-easy-datatable.js.png)](https://codeclimate.com/github/Smartesting/ember-easy-datatable.js)
[![Code Climate - Coverage](https://codeclimate.com/github/Smartesting/ember-easy-datatable.js/coverage.png)](https://codeclimate.com/github/Smartesting/ember-easy-datatable.js)

Simple Javascript/Ember.js library to navigate/edit/order a table.
[Demo](http://jsfiddle.net/52VtD/7211/embedded/result/)


text:
#pragma once
#include <aws/clouddirectory/CloudDirectory_EXPORTS.h>
#include <aws/clouddirectory/model/ObjectReference.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudDirectory
{
namespace Model
{

  /**
   *
Attaches a policy object to a regular object inside a BatchRead
   * operation. For more information, see AttachPolicy and
   * BatchReadRequest$Operations.

See Also:
   AWS
   * API Reference

   */
  class AWS_CLOUDDIRECTORY_API BatchAttachPolicy
  {
  public:
    BatchAttachPolicy();
    BatchAttachPolicy(Aws::Utils::Json::JsonView jsonValue);
    BatchAttachPolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The reference that is associated with the policy object.

     */
    inline const ObjectReference& GetPolicyReference() const{ return m_policyReference; }

    /**
     *
The reference that is associated with the policy object.

     */
    inline bool PolicyReferenceHasBeenSet() const { return m_policyReferenceHasBeenSet; }

    /**
     *
The reference that is associated with the policy object.

     */
    inline void SetPolicyReference(const ObjectReference& value) { m_policyReferenceHasBeenSet = true; m_policyReference = value; }

    /**
     *
The reference that is associated with the policy object.

     */
    inline void SetPolicyReference(ObjectReference&& value) { m_policyReferenceHasBeenSet = true; m_policyReference = std::move(value); }

    /**
     *
The reference that is associated with the policy object.

     */
    inline BatchAttachPolicy& WithPolicyReference(const ObjectReference& value) { SetPolicyReference(value); return *this;}

    /**
     *
The reference that is associated with the policy object.

     */
    inline BatchAttachPolicy& WithPolicyReference(ObjectReference&& value) { SetPolicyReference(std::move(value)); return *this;}

    /**
     *
The reference that identifies the object to which the policy will be
     * attached.

     */
    inline const ObjectReference& GetObjectReference() const{ return m_objectReference; }

    /**
     *
The reference that identifies the object to which the policy will be
     * attached.

     */
    inline bool ObjectReferenceHasBeenSet() const { return m_objectReferenceHasBeenSet; }

    /**
     *
The reference that identifies the object to which the policy will be
     * attached.

     */
    inline void SetObjectReference(const ObjectReference& value) { m_objectReferenceHasBeenSet = true; m_objectReference = value; }

    /**
     *
The reference that identifies the object to which the policy will be
     * attached.

     */
    inline void SetObjectReference(ObjectReference&& value) { m_objectReferenceHasBeenSet = true; m_objectReference = std::move(value); }

    /**
     *
The reference that identifies the object to which the policy will be
     * attached.

     */
    inline BatchAttachPolicy& WithObjectReference(const ObjectReference& value) { SetObjectReference(value); return *this;}

    /**
     *
The reference that identifies the object to which the policy will be
     * attached.

     */
    inline BatchAttachPolicy& WithObjectReference(ObjectReference&& value) { SetObjectReference(std::move(value)); return *this;}

  private:

    ObjectReference m_policyReference;
    bool m_policyReferenceHasBeenSet;

    ObjectReference m_objectReference;
    bool m_objectReferenceHasBeenSet;
  };

} // namespace Model
} // namespace CloudDirectory
} // namespace Aws


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>net.sf.barcode4j</groupId>
        <artifactId>barcode4j-parent</artifactId>
        <version>3.0-SNAPSHOT</version>
    </parent>
    <artifactId>barcode4j-servlet</artifactId>
    <packaging>jar</packaging>

    <name>barcode4j-servlet</name>
    <description>barcode4j servlet</description>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>barcode4j</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>avalon-framework</groupId>
            <artifactId>avalon-framework-api</artifactId>
        </dependency>
        <dependency>
            <groupId>avalon-framework</groupId>
            <artifactId>avalon-framework-impl</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>barcode4j</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>


text:
The bootloader is the exact same as the Adafruit M0 feather.
You will need to install the SAMD board toolchain from Adafruit in your Arduino IDE to compile and upload.
Instructions can be found [here](https://learn.adafruit.com/adafruit-feather-m0-basic-proto/using-with-arduino-ide).

You will need the following libraries:
- TheThingsNetwork 2.0.0 (2.1+ breaks non-AVR compatibility)
- Adafruit Unified Sensor 1.0.2
- DHT sensor library 1.3.0+
- Adafruit BMP085 Unified 1.0.0+


text:
default['anyenv']['user'] = ["ubuntu"]

# install ruby with rbev
default['ruby']['version'] = "2.3.1"
default['ruby']['user'] = ["ubuntu"]


text:
/**
 * Constructor for an analogue of the TimeRanges class
 * returned by various HTMLMediaElement properties
 *
 * Pass an array of two-element arrays, each containing a start and end time.
 */
function CortadoTimeRanges(ranges) {
	this.length = ranges.length;
	this.start = function(i) {
		return ranges[i][0];
	};
	this.end = function(i) {
		return ranges[i][1];
	};
	return this;
}

function CortadoPlayer() {
	// Return a magical custom element!
	var self = document.createElement('cortado');
	self.style.display = 'inline-block';
	self.style.position = 'relative';

	function param(name, value) {
		var el = document.createElement('param');
		el.name = name;
		el.value = value;
		return el;
	}

	var applet;
	function createApplet(playImmediately) {
		applet = document.createElement('applet');

		if (src !== '') {
			applet.appendChild(param('url', src));
		}
		if (durationHint > 0) {
			applet.appendChild(param('duration', Math.round(durationHint)));
		}

		if (playImmediately) {
			applet.appendChild(param('autoPlay', 'true'));
		} else {
			applet.appendChild(param('autoPlay', 'false'));
		}

		applet.width = width || videoWidthHint;
		applet.height =  height || videoHeightHint;
		applet.archive = 'lib/cortado.jar?v2';
		applet.code = 'com.fluendo.player.Cortado.class';

		self.appendChild(applet);
	}

	/**
	 * HTMLMediaElement load method
	 */
	self.load = function() {
		if (applet) {
			applet.reset();
		} else {
			applet = createApplet(false);
		}
	};

	/**
	 * HTMLMediaElement canPlayType method
	 */
	self.canPlayType = function(type) {
		// @todo: implement better parsing
		if (type === 'audio/ogg; codecs="vorbis"') {
			return 'probably';
		} else if (type.match(/^audio\/ogg\b/)) {
			return 'maybe';
		} else if (type === 'video/ogg; codecs="theora"') {
			return 'probably';
		} else if (type === 'video/ogg; codecs="theora,vorbis"') {
			return 'probably';
		} else if (type.match(/^video\/ogg\b/)) {
			return 'maybe';
		} else {
			return '';
		}
	};

	/**
	 * HTMLMediaElement play method
	 */
	self.play = function() {
		paused = false;
		if (applet) {
			applet.doPlay();
		} else {
			createApplet(true);
		}
	};

	/**
	 * HTMLMediaElement pause method
	 */
	self.pause = function() {
		paused = true;
		if (applet) {
			applet.doPause();
		}
	};

	/**
	 * HTMLMediaElement src property
	 */
	var src = "";
	Object.defineProperty(self, "src", {
		get: function getSrc() {
			return src;
		},
		set: function setSrc(val) {
			src = val;
			if (applet) {
				// fixme update the parameter
				applet.reset();
			}
		}
	});

	/**
	 */
	Object.defineProperty(self, "buffered", {
		get: function getBuffered() {
			// not implemented
			return new CortadoTimeRanges([]);
		}
	});

	/**
	 * HTMLMediaElement currentTime property
	 */
	Object.defineProperty(self, "currentTime", {
		get: function getCurrentTime() {
			if (applet && applet.getPlaybackPosition) {
				return applet.getPlaybackPosition();
			} else {
				return 0;
			}
		}
	});

	/**
	 * custom durationHint property
	 */
	var durationHint = null;
	Object.defineProperty(self, "durationHint", {
		get: function getDurationHint() {
			return durationHint;
		},
		set: function setDurationHint(val) {
			durationHint = val;
		}
	});

	/**
	 * HTMLMediaElement duration property
	 */
	Object.defineProperty(self, "duration", {
		get: function getDuration() {
			return durationHint;
		}
	});

	/**
	 * HTMLMediaElement paused property
	 */
	var paused = true;
	Object.defineProperty(self, "paused", {
		get: function getPaused() {
			return paused;
		}
	});

	/**
	 * HTMLMediaElement ended property
	 */
	Object.defineProperty(self, "ended", {
		get: function getEnded() {
			// not implemented
			return false;
		}
	});

	/**
	 * HTMLMediaElement muted property
	 */
	var muted;
	Object.defineProperty(self, "muted", {
		get: function getMuted() {
			return muted;
		},
		set: function setMuted(val) {
			muted = val;
			// todo: is this possible?
		}
	});

	/**
	 * HTMLVideoElement poster property
	 */
	var poster;
	Object.defineProperty(self, "poster", {
		get: function getPoster() {
			return poster;
		},
		set: function setPoster(val) {
			poster = val;
			// todo: implement
		}
	});

	// Video metadata properties...
	var videoWidthHint = 0;
	Object.defineProperty(self, "videoWidth", {
		get: function getVideoWidth() {
			return videoWidthHint;
		}
	});
	var videoHeightHint = 0;
	Object.defineProperty(self, "videoHeight", {
		get: function getVideoHeight() {
			return videoHeightHint;
		}
	});

	// Display size...
	var width = 0, height = 0;
	Object.defineProperty(self, "width", {
		get: function getWidth() {
			return width;
		},
		set: function setWidth(val) {
			width = parseInt(val, 10);
			if (applet) {
				applet.width = width;
			}
		}
	});

	Object.defineProperty(self, "height", {
		get: function getHeight() {
			return height;
		},
		set: function setHeight(val) {
			height = parseInt(val, 10);
			if (applet) {
				applet.height = height;
			}
		}
	});

	// Events!
	// not implemented at this time

	/**
	 * Called when all metadata is available.
	 * Note in theory we must know 'duration' at this point.
	 */
	self.onloadedmetadata = null;

	/**
	 * Called when we start playback
	 */
	self.onplay = null;

	/**
	 * Called when we get paused
	 */
	self.onpause = null;

	/**
	 * Called when playback ends
	 */
	self.onended = null;

	return self;
}


text:
package org.apache.doris.catalog;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class SinglePartitionInfo extends PartitionInfo {
    public SinglePartitionInfo() {
        super(PartitionType.UNPARTITIONED);
    }

    public static PartitionInfo read(DataInput in) throws IOException {
        PartitionInfo partitionInfo = new SinglePartitionInfo();
        partitionInfo.readFields(in);
        return partitionInfo;
    }

    @Override
    public void write(DataOutput out) throws IOException {
        super.write(out);
    }

    @Override
    public void readFields(DataInput in) throws IOException {
        super.readFields(in);
    }
}


text:
node f.js
pause


text:
<?php

require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'YUICompressor.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'CssUriRewriter.php';

/**
 *
 * @author Gustavo
 *
 */
class CompressorClientScript extends CClientScript
{

    /**
     * wheter to minify & compress files
     *
     * @var boolean
     */
    public $compress = true;

    /**
     * options for YUICompressor class
     *
     * @var array
     * @see YUICompressor
     */
    public $compressorOptions = array();
    private $_jsFiles;
    private $_jsCode;
    private $_cssFiles;
    private $_tmpPath;

    /**
     * (non-PHPdoc)
     *
     * @see CClientScript::render()
     */
    public function render(&$output)
    {

        if (!$this->hasScripts) {
            return;
        }

        $this->renderCoreScripts();

        if (!empty($this->scriptMap)) {
            $this->remapScripts();
        }

        $this->unifyScripts();

        if ($this->compress) {
            if ($this->enableJavaScript && (count($this->scriptFiles) || count($this->scripts))) {
                $key = $this->_getScriptFilesCompressKey();
                if (($path = Yii::app()->getGlobalState($key)) === null || !file_exists($path)) {
                    $path = $this->compressScriptFiles("{$key}.js");
                    //$this->
                    Yii::app()->setGlobalState($key, $path);
                }
                $url               = Yii::app()->assetManager->publish($path);
                $this->scriptFiles = array(
                    $this->coreScriptPosition => array(
                        $url => $url
                    )
                );
            }
            if (count($this->cssFiles)) {
                $medias = array_keys($this->_getCssFiles());
                $files  = array();
                foreach ($medias as $media) {
                    $key = $this->_getCssFilesCompressKey($media);
                    if (($path = Yii::app()->getGlobalState($key)) === null || !file_exists($path)) {
                        $path = $this->compressCssFiles($media, "{$key}.css");
                        //$this->
                        Yii::app()->setGlobalState($key, $path);
                    }
                    $url         = Yii::app()->assetManager->publish($path);
                    $files[$url] = $media;
                }
                $this->cssFiles = $files;
            }
        }

        $this->renderHead($output);
        if ($this->enableJavaScript) {
            $this->renderBodyBegin($output);
            $this->renderBodyEnd($output);
        }
    }

    /**
     * compress and minify all css files by media
     *
     * @return array|boolean array(media=>contents)
     * false if no files
     */
    protected function compressCssFiles($media, $filename)
    {

        $cssFiles = $this->_getCssFiles($media);

        $string = '';

        foreach ($cssFiles as $cssFile) {
            $urlRewriter = new CssUriRewriter($cssFile);
            $string .= $urlRewriter->rewrite();
        }
        //compress
        $compressor       = new YUICompressor($this->compressorOptions);
        $compressor->type = 'css';
        $compressor->addString($string);
        $content = $compressor->compress();

        $filePath = $this->getCompressorTempPath() . DIRECTORY_SEPARATOR . $filename;
        if (!file_exists(dirname($filePath))) {
            mkdir(dirname($filePath));
        }
        if (file_put_contents($filePath, $content) === false) {
            throw new Exception('Failed to save compressed file');
        }
        return $filePath;
    }

    /**
     * compress and minify all js files
     *
     * @return string|boolean contents of js file
     * false if no files
     */
    protected function compressScriptFiles($filename)
    {

        $jsFiles = $this->_getJsFiles();

        $compressor       = new YUICompressor($this->compressorOptions);
        $compressor->type = 'js';
        $compressor->setFiles($jsFiles);
        $content = $compressor->compress();

        $filePath = $this->getCompressorTempPath() . DIRECTORY_SEPARATOR . $filename;
        if (file_put_contents($filePath, $content) === false) {
            throw new Exception('Failed to save compressed file');
        }
        return $filePath;
    }

    /**
     *
     * @return string
     */
    private function _getScriptFilesCompressKey()
    {

        $files = $this->_getJsFiles();
        return md5(implode('', $files));
    }

    /**
     *
     * @param string $media
     *
     * @return string
     */
    private function _getCssFilesCompressKey($media)
    {

        $files = $this->_getCssFiles($media);
        return md5($media . implode('', $files));
    }

    private function _getJsCode()
    {

        if ($this->_jsCode === null) {
            $jsCode = array();
            if (isset($this->scripts[self::POS_HEAD])) {
                foreach ($this->scripts[self::POS_HEAD] as $file => $value) {

                    $jsCode[] = $value;
                }
            }
            if (isset($this->scriptFiles[self::POS_BEGIN])) {
                foreach ($this->scriptFiles[self::POS_BEGIN] as $file => $value) {

                    $jsFiles[] = $value;
                }
            }
            if (isset($this->scriptFiles[self::POS_END])) {
                foreach ($this->scriptFiles[self::POS_END] as $file => $value) {

                    $jsFiles[] = $value;
                }
            }
            $this->_jsCode = $jsCode;
        }
        return $this->_jsCode;
    }

    /**
     * @return array
     */
    private function _getJsFiles()
    {

        if ($this->_jsFiles === null) {
            $jsFiles = array();
            if (isset($this->scriptFiles[self::POS_HEAD])) {
                foreach ($this->scriptFiles[self::POS_HEAD] as $file => $value) {
                    if (substr($file, 0, 1) === '/') //it's a relative internal url, prefix with root path
                    {
                        $file = $_SERVER['DOCUMENT_ROOT'] . $file;
                    }
                    $jsFiles[] = $file;
                }
            }
            if (isset($this->scriptFiles[self::POS_BEGIN])) {
                foreach ($this->scriptFiles[self::POS_BEGIN] as $file => $value) {
                    if (substr($file, 0, 1) === '/') //it's a relative internal url, prefix with root path
                    {
                        $file = $_SERVER['DOCUMENT_ROOT'] . $file;
                    }
                    $jsFiles[] = $file;
                }
            }
            if (isset($this->scriptFiles[self::POS_END])) {
                foreach ($this->scriptFiles[self::POS_END] as $file => $value) {
                    if (substr($file, 0, 1) === '/') //it's a relative internal url, prefix with root path
                    {
                        $file = $_SERVER['DOCUMENT_ROOT'] . $file;
                    }
                    $jsFiles[] = $file;
                }
            }
            $this->_jsFiles = $jsFiles;
        }
        return $this->_jsFiles;
    }

    /**
     * list of css files
     *
     * @return array
     */
    private function _getCssFiles($media = null)
    {

        if ($this->_cssFiles === null) {
            $cssFiles = array();
            foreach ($this->cssFiles as $file => $fileMedia) {
                if ($fileMedia === '') {
                    $fileMedia = 'screen';
                }
                if (!isset($cssFiles[$fileMedia])) {
                    $cssFiles[$fileMedia] = array();
                }
                if (substr($file, 0, 1) === '/') //it's a relative internal url, prefix with root path
                {
                    $file = $_SERVER['DOCUMENT_ROOT'] . $file;
                }
                $cssFiles[$fileMedia][] = $file;
            }
            $this->_cssFiles = $cssFiles;
        }
        if ($media !== null) {
            return $this->_cssFiles[$media];
        }
        return $this->_cssFiles;
    }

    /**
     *
     * @return string
     */
    protected function getCompressorTempPath()
    {

        if ($this->_tmpPath === null) {
            $this->_tmpPath = Yii::app()->getRuntimePath() . DIRECTORY_SEPARATOR . 'compressor';
            if (!file_exists($this->_tmpPath)) {
                mkdir($this->_tmpPath);
            }
        }
        return $this->_tmpPath;
    }

}


text:
#region Licence

#endregion

using System.Threading;
using System.Threading.Tasks;
using Paramore.Brighter.Inbox.Attributes;

namespace Paramore.Brighter.Core.Tests.CommandProcessors.TestDoubles
{
    internal class MyCommandInboxedHandlerAsync : RequestHandlerAsync<MyCommand>
    {
        private static MyCommand s_command;

        public MyCommandInboxedHandlerAsync()
        {
            s_command = null;
        }

        [UseInboxAsync(step:0, contextKey: typeof(MyCommandInboxedHandlerAsync), onceOnly: false)]
        public override Task<MyCommand> HandleAsync(MyCommand command, CancellationToken cancellationToken = default(CancellationToken))
        {
            LogCommand(command);
            return base.HandleAsync(command, cancellationToken);
        }

        public static bool ShouldReceive(MyCommand expectedCommand)
        {
            return (s_command != null) && (expectedCommand.Id == s_command.Id);
        }

        private void LogCommand(MyCommand request)
        {
            s_command = request;
        }
    }
}


text:
@interface RecursiveBacktrackerAlgorithm : NSObject
@end


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dataproc/v1beta2/workflow_templates.proto

package com.google.cloud.dataproc.v1beta2;

public interface OrderedJobOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.OrderedJob)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. The step id. The id must be unique among all jobs
   * within the template.
   * The step id is used as prefix for job id, as job
   * `goog-dataproc-workflow-step-id` label, and in
   * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids]
   * field from other steps.
   * The id must contain only letters (a-z, A-Z), numbers (0-9),
   * underscores (_), and hyphens (-). Cannot begin or end with underscore
   * or hyphen. Must consist of between 3 and 50 characters.
   *

   *
   * string step_id = 1;
   */
  java.lang.String getStepId();
  /**
   *
   *
   *

   * Required. The step id. The id must be unique among all jobs
   * within the template.
   * The step id is used as prefix for job id, as job
   * `goog-dataproc-workflow-step-id` label, and in
   * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids]
   * field from other steps.
   * The id must contain only letters (a-z, A-Z), numbers (0-9),
   * underscores (_), and hyphens (-). Cannot begin or end with underscore
   * or hyphen. Must consist of between 3 and 50 characters.
   *

   *
   * string step_id = 1;
   */
  com.google.protobuf.ByteString getStepIdBytes();

  /**
   *
   *
   *

   * Job is a Hadoop job.
   *

   *
   * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2;
   */
  boolean hasHadoopJob();
  /**
   *
   *
   *

   * Job is a Hadoop job.
   *

   *
   * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2;
   */
  com.google.cloud.dataproc.v1beta2.HadoopJob getHadoopJob();
  /**
   *
   *
   *

   * Job is a Hadoop job.
   *

   *
   * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2;
   */
  com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder getHadoopJobOrBuilder();

  /**
   *
   *
   *

   * Job is a Spark job.
   *

   *
   * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3;
   */
  boolean hasSparkJob();
  /**
   *
   *
   *

   * Job is a Spark job.
   *

   *
   * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3;
   */
  com.google.cloud.dataproc.v1beta2.SparkJob getSparkJob();
  /**
   *
   *
   *

   * Job is a Spark job.
   *

   *
   * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3;
   */
  com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder getSparkJobOrBuilder();

  /**
   *
   *
   *

   * Job is a Pyspark job.
   *

   *
   * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4;
   */
  boolean hasPysparkJob();
  /**
   *
   *
   *

   * Job is a Pyspark job.
   *

   *
   * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4;
   */
  com.google.cloud.dataproc.v1beta2.PySparkJob getPysparkJob();
  /**
   *
   *
   *

   * Job is a Pyspark job.
   *

   *
   * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4;
   */
  com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder getPysparkJobOrBuilder();

  /**
   *
   *
   *

   * Job is a Hive job.
   *

   *
   * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5;
   */
  boolean hasHiveJob();
  /**
   *
   *
   *

   * Job is a Hive job.
   *

   *
   * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5;
   */
  com.google.cloud.dataproc.v1beta2.HiveJob getHiveJob();
  /**
   *
   *
   *

   * Job is a Hive job.
   *

   *
   * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5;
   */
  com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder getHiveJobOrBuilder();

  /**
   *
   *
   *

   * Job is a Pig job.
   *

   *
   * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6;
   */
  boolean hasPigJob();
  /**
   *
   *
   *

   * Job is a Pig job.
   *

   *
   * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6;
   */
  com.google.cloud.dataproc.v1beta2.PigJob getPigJob();
  /**
   *
   *
   *

   * Job is a Pig job.
   *

   *
   * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6;
   */
  com.google.cloud.dataproc.v1beta2.PigJobOrBuilder getPigJobOrBuilder();

  /**
   *
   *
   *

   * Job is a SparkSql job.
   *

   *
   * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7;
   */
  boolean hasSparkSqlJob();
  /**
   *
   *
   *

   * Job is a SparkSql job.
   *

   *
   * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7;
   */
  com.google.cloud.dataproc.v1beta2.SparkSqlJob getSparkSqlJob();
  /**
   *
   *
   *

   * Job is a SparkSql job.
   *

   *
   * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7;
   */
  com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder();

  /**
   *
   *
   *

   * Optional. The labels to associate with this job.
   * Label keys must be between 1 and 63 characters long, and must conform to
   * the following regular expression:
   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
   * Label values must be between 1 and 63 characters long, and must conform to
   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
   * No more than 32 labels can be associated with a given job.
   *

   *
   * map<string, string> labels = 8;
   */
  int getLabelsCount();
  /**
   *
   *
   *

   * Optional. The labels to associate with this job.
   * Label keys must be between 1 and 63 characters long, and must conform to
   * the following regular expression:
   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
   * Label values must be between 1 and 63 characters long, and must conform to
   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
   * No more than 32 labels can be associated with a given job.
   *

   *
   * map<string, string> labels = 8;
   */
  boolean containsLabels(java.lang.String key);
  /** Use {@link #getLabelsMap()} instead. */
  @java.lang.Deprecated
  java.util.Map<java.lang.String, java.lang.String> getLabels();
  /**
   *
   *
   *

   * Optional. The labels to associate with this job.
   * Label keys must be between 1 and 63 characters long, and must conform to
   * the following regular expression:
   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
   * Label values must be between 1 and 63 characters long, and must conform to
   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
   * No more than 32 labels can be associated with a given job.
   *

   *
   * map<string, string> labels = 8;
   */
  java.util.Map<java.lang.String, java.lang.String> getLabelsMap();
  /**
   *
   *
   *

   * Optional. The labels to associate with this job.
   * Label keys must be between 1 and 63 characters long, and must conform to
   * the following regular expression:
   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
   * Label values must be between 1 and 63 characters long, and must conform to
   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
   * No more than 32 labels can be associated with a given job.
   *

   *
   * map<string, string> labels = 8;
   */
  java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue);
  /**
   *
   *
   *

   * Optional. The labels to associate with this job.
   * Label keys must be between 1 and 63 characters long, and must conform to
   * the following regular expression:
   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
   * Label values must be between 1 and 63 characters long, and must conform to
   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
   * No more than 32 labels can be associated with a given job.
   *

   *
   * map<string, string> labels = 8;
   */
  java.lang.String getLabelsOrThrow(java.lang.String key);

  /**
   *
   *
   *

   * Optional. Job scheduling configuration.
   *

   *
   * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9;
   */
  boolean hasScheduling();
  /**
   *
   *
   *

   * Optional. Job scheduling configuration.
   *

   *
   * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9;
   */
  com.google.cloud.dataproc.v1beta2.JobScheduling getScheduling();
  /**
   *
   *
   *

   * Optional. Job scheduling configuration.
   *

   *
   * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9;
   */
  com.google.cloud.dataproc.v1beta2.JobSchedulingOrBuilder getSchedulingOrBuilder();

  /**
   *
   *
   *

   * Optional. The optional list of prerequisite job step_ids.
   * If not specified, the job will start at the beginning of workflow.
   *

   *
   * repeated string prerequisite_step_ids = 10;
   */
  java.util.List<java.lang.String> getPrerequisiteStepIdsList();
  /**
   *
   *
   *

   * Optional. The optional list of prerequisite job step_ids.
   * If not specified, the job will start at the beginning of workflow.
   *

   *
   * repeated string prerequisite_step_ids = 10;
   */
  int getPrerequisiteStepIdsCount();
  /**
   *
   *
   *

   * Optional. The optional list of prerequisite job step_ids.
   * If not specified, the job will start at the beginning of workflow.
   *

   *
   * repeated string prerequisite_step_ids = 10;
   */
  java.lang.String getPrerequisiteStepIds(int index);
  /**
   *
   *
   *

   * Optional. The optional list of prerequisite job step_ids.
   * If not specified, the job will start at the beginning of workflow.
   *

   *
   * repeated string prerequisite_step_ids = 10;
   */
  com.google.protobuf.ByteString getPrerequisiteStepIdsBytes(int index);

  public com.google.cloud.dataproc.v1beta2.OrderedJob.JobTypeCase getJobTypeCase();
}


text:
#if USE(PLUGIN_HOST_PROCESS)

#ifndef HostedNetscapePluginStream_h
#define HostedNetscapePluginStream_h

#include <WebCore/NetscapePlugInStreamLoader.h>
#include <WebKit/npapi.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
#include <wtf/RetainPtr.h>

namespace WebCore {
    class FrameLoader;
    class NetscapePlugInStreamLoader;
}

namespace WebKit {

class NetscapePluginInstanceProxy;

class HostedNetscapePluginStream : public RefCounted<HostedNetscapePluginStream>
                                 , private WebCore::NetscapePlugInStreamLoaderClient {
public:
    static PassRefPtr<HostedNetscapePluginStream> create(NetscapePluginInstanceProxy* instance, uint32_t streamID, NSURLRequest *request)
    {
        return adoptRef(new HostedNetscapePluginStream(instance, streamID, request));
    }
    static PassRefPtr<HostedNetscapePluginStream> create(NetscapePluginInstanceProxy* instance, WebCore::FrameLoader* frameLoader)
    {
        return adoptRef(new HostedNetscapePluginStream(instance, frameLoader));
    }

    ~HostedNetscapePluginStream();

    uint32_t streamID() const { return m_streamID; }

    void startStreamWithResponse(NSURLResponse *response);
    void didReceiveData(WebCore::NetscapePlugInStreamLoader*, const char* bytes, int length);
    void didFinishLoading(WebCore::NetscapePlugInStreamLoader*);
    void didFail(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceError&);

    void start();
    void stop();

    void cancelLoad(NPReason reason);

    static NPReason reasonForError(NSError* error);

private:
    NSError *errorForReason(NPReason) const;
    void cancelLoad(NSError *);

    HostedNetscapePluginStream(NetscapePluginInstanceProxy*, uint32_t streamID, NSURLRequest *);
    HostedNetscapePluginStream(NetscapePluginInstanceProxy*, WebCore::FrameLoader*);

    void startStream(NSURL *, long long expectedContentLength, NSDate *lastModifiedDate, NSString *mimeType, NSData *headers);

    NSError *pluginCancelledConnectionError() const;

    // NetscapePlugInStreamLoaderClient methods.
    void didReceiveResponse(WebCore::NetscapePlugInStreamLoader*, const WebCore::ResourceResponse&);
    bool wantsAllStreams() const;

    RefPtr<NetscapePluginInstanceProxy> m_instance;
    uint32_t m_streamID;
    bool m_isTerminated;
    RetainPtr<NSMutableURLRequest> m_request;

    RetainPtr<NSURL> m_requestURL;
    RetainPtr<NSURL> m_responseURL;
    RetainPtr<NSString> m_mimeType;

    WebCore::FrameLoader* m_frameLoader;
    RefPtr<WebCore::NetscapePlugInStreamLoader> m_loader;
};

}

#endif // HostedNetscapePluginStream_h
#endif // USE(PLUGIN_HOST_PROCESS)


text:
@interface ALUserBlocked : NSObject

@property (nonatomic, strong) NSString * id;
@property (nonatomic, strong) NSString * blockedTo;
@property (nonatomic, strong) NSString * blockedBy;
@property (nonatomic, strong) NSString * applicationKey;
@property (nonatomic, strong) NSNumber * createdAtTime;
@property (nonatomic, strong) NSNumber * updatedAtTime;
@property (nonatomic) BOOL userBlocked;
@property (nonatomic) BOOL userblockedBy;

@end


text:
import { Attribute, Class } from '../../decorators';
import { Operation } from './Operation';
import { Property } from './Property';
import { Type } from './Type';

@Class('http://www.omg.org/spec/UML/20131001:Classifier', Type)
export class Classifier extends Type {
  private _ownedAttributes: Set<Property> = new Set();
  private _ownedOperations: Set<Operation> = new Set();
  private _stereotype: string | null = null;

  @Attribute({ type: Property, lower: 0, upper: Infinity })
  get ownedAttributes(): Set<Property> {
    return this._ownedAttributes;
  }

  set ownedAttributes(value: Set<Property>) {
    this._ownedAttributes = value;
  }

  @Attribute({ type: Operation, lower: 0, upper: Infinity })
  get ownedOperations(): Set<Operation> {
    return this._ownedOperations;
  }

  set ownedOperations(value: Set<Operation>) {
    this._ownedOperations = value;
  }

  @Attribute({ type: String, lower: 0 })
  get stereotype(): string | null {
    return this._stereotype;
  }

  set stereotype(value: string | null) {
    this._stereotype = value;
  }

  /**
   * Gets an attribute with a specific name or null, if it does not exist.
   */
  getAttribute(name: string): Property | null {
    for (const property of this._ownedAttributes) {
      if (property.name === name) return property;
    }

    return null;
  }
}


text: <title>Hello React</title>