text:
package frontend

import (
	"bytes"
	"context"
	"fmt"
	"regexp"
	"strings"
	"unicode"

	"github.com/yuin/goldmark/ast"
	"github.com/yuin/goldmark/parser"
	"github.com/yuin/goldmark/renderer"
	"github.com/yuin/goldmark/renderer/html"
	"github.com/yuin/goldmark/text"
	"github.com/yuin/goldmark/util"
	"golang.org/x/pkgsite/internal"
	"golang.org/x/pkgsite/internal/log"
	"golang.org/x/pkgsite/internal/source"
)

// astTransformer is a default transformer of the goldmark tree. We pass in
// readme information to use for the link transformations.
type astTransformer struct {
	info   *source.Info
	readme *internal.Readme
}

// Transform transforms the given AST tree.
func (g *astTransformer) Transform(node *ast.Document, reader text.Reader, pc parser.Context) {
	_ = ast.Walk(node, func(n ast.Node, entering bool) (ast.WalkStatus, error) {
		if !entering {
			return ast.WalkContinue, nil
		}
		switch v := n.(type) {
		case *ast.Image:
			if d := translateLink(string(v.Destination), g.info, true, g.readme); d != "" {
				v.Destination = []byte(d)
			}
		case *ast.Link:
			if d := translateLink(string(v.Destination), g.info, false, g.readme); d != "" {
				v.Destination = []byte(d)
			}
		}
		return ast.WalkContinue, nil
	})
}

// htmlRenderer is a renderer.NodeRenderer implementation that renders
// pkg.go.dev readme features.
type htmlRenderer struct {
	html.Config
	info   *source.Info
	readme *internal.Readme
	// firstHeading and offset are used to calculate the first heading tag's level in a readme.
	firstHeading bool
	offset       int
}

// newHTMLRenderer creates a new HTMLRenderer for a readme.
func newHTMLRenderer(info *source.Info, readme *internal.Readme, opts ...html.Option) renderer.NodeRenderer {
	r := &htmlRenderer{
		info:         info,
		readme:       readme,
		Config:       html.NewConfig(),
		firstHeading: true,
		offset:       0,
	}
	for _, opt := range opts {
		opt.SetHTMLOption(&r.Config)
	}
	return r
}

// RegisterFuncs implements renderer.NodeRenderer.RegisterFuncs.
func (r *htmlRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer) {
	reg.Register(ast.KindHeading, r.renderHeading)
	reg.Register(ast.KindHTMLBlock, r.renderHTMLBlock)
	reg.Register(ast.KindRawHTML, r.renderRawHTML)
}

func (r *htmlRenderer) renderHeading(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error) {
	n := node.(*ast.Heading)
	if r.firstHeading {
		// The offset ensures the first heading is always an <h3>.
		r.offset = 3 - n.Level
		r.firstHeading = false
	}
	newLevel := n.Level + r.offset
	if entering {
		if n.Level > 6 {
			_, _ = w.WriteString(fmt.Sprintf(`<div class="h%d" role="heading" aria-level="%d"`, newLevel, n.Level))
		} else {
			_, _ = w.WriteString(fmt.Sprintf(`<h%d class="h%d"`, newLevel, n.Level))
		}
		if n.Attributes() != nil {
			html.RenderAttributes(w, node, html.HeadingAttributeFilter)
		}
		_ = w.WriteByte('>')
	} else {
		if n.Level > 6 {
			_, _ = w.WriteString("</div>\n")
		} else {
			_, _ = w.WriteString(fmt.Sprintf("</h%d>\n", newLevel))
		}
	}
	return ast.WalkContinue, nil
}

// renderHTMLBlock is copied directly from the goldmark source code and
// modified to call translateHTML in every block
func (r *htmlRenderer) renderHTMLBlock(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error) {
	n := node.(*ast.HTMLBlock)
	if entering {
		if r.Unsafe {
			l := n.Lines().Len()
			for i := 0; i < l; i++ {
				line := n.Lines().At(i)
				d, err := translateHTML(line.Value(source), r.info, r.readme)
				if err != nil {
					return ast.WalkStop, err
				}
				_, _ = w.Write(d)
			}
		} else {
			_, _ = w.WriteString("<!-- raw HTML omitted -->\n")
		}
	} else {
		if n.HasClosure() {
			if r.Unsafe {
				closure := n.ClosureLine
				_, _ = w.Write(closure.Value(source))
			} else {
				_, _ = w.WriteString("<!-- raw HTML omitted -->\n")
			}
		}
	}
	return ast.WalkContinue, nil
}

func (r *htmlRenderer) renderRawHTML(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error) {
	if !entering {
		return ast.WalkSkipChildren, nil
	}
	if r.Unsafe {
		n := node.(*ast.RawHTML)
		for i := 0; i < n.Segments.Len(); i++ {
			segment := n.Segments.At(i)
			d, err := translateHTML(segment.Value(source), r.info, r.readme)
			if err != nil {
				return ast.WalkStop, err
			}
			_, _ = w.Write(d)
		}
		return ast.WalkSkipChildren, nil
	}
	_, _ = w.WriteString("<!-- raw HTML omitted -->")
	return ast.WalkSkipChildren, nil
}

// ids is a collection of element ids in document.
type ids struct {
	values map[string]bool
}

// newIDs creates a collection of element ids in a document.
func newIDs() parser.IDs {
	return &ids{
		values: map[string]bool{},
	}
}

// Generate turns heading content from a markdown document into a heading id.
// First HTML markup and markdown images are stripped then unicode letters
// and numbers are used to generate the final result. Finally, all heading ids
// are prefixed with "readme-" to avoid name collisions with other ids on the
// unit page. Duplicated heading ids are given an incremental suffix. See
// readme_test.go for examples.
func (s *ids) Generate(value []byte, kind ast.NodeKind) []byte {
	// Matches strings like `<tag attr="value">Text</tag>` or `[![Text](file.svg)](link.html)`.
	r := regexp.MustCompile(`(<[^<>]+>|\[\!\[[^\]]+]\([^\)]+\)\]\([^\)]+\))`)
	str := r.ReplaceAllString(string(value), "")
	f := func(c rune) bool {
		return !unicode.IsLetter(c) && !unicode.IsNumber(c)
	}
	str = strings.Join(strings.FieldsFunc(str, f), "-")
	str = strings.ToLower(str)
	if len(str) == 0 {
		if kind == ast.KindHeading {
			str = "heading"
		} else {
			str = "id"
		}
	}
	key := str
	for i := 1; ; i++ {
		if _, ok := s.values[key]; !ok {
			s.values[key] = true
			break
		}
		key = fmt.Sprintf("%s-%d", str, i)
	}
	return []byte("readme-" + key)
}

// Put implements Put from the goldmark parser IDs interface.
func (s *ids) Put(value []byte) {
	s.values[string(value)] = true
}

type extractLinks struct {
	ctx            context.Context
	inLinksHeading bool
	links          []link
}

// The name of the heading from which we extract links.
const linkHeadingText = "Links"

var linkHeadingBytes = []byte(linkHeadingText) // for faster comparison to node contents

// Transform extracts links from the "Links" section of a README.
func (e *extractLinks) Transform(node *ast.Document, reader text.Reader, pc parser.Context) {
	err := ast.Walk(node, func(n ast.Node, entering bool) (ast.WalkStatus, error) {
		if !entering {
			return ast.WalkContinue, nil
		}
		switch n := n.(type) {

		case *ast.Heading:
			// We are in the links heading from the point we see a heading with
			// linkHeadingText until the point we see the next heading.
			if e.inLinksHeading {
				return ast.WalkStop, nil
			}
			if bytes.Equal(n.Text(reader.Source()), linkHeadingBytes) {
				e.inLinksHeading = true
			}

		case *ast.ListItem:
			// When in the links heading, extract links from list items.
			if !e.inLinksHeading {
				return ast.WalkSkipChildren, nil
			}
			// We expect the pattern: ListItem -> TextBlock -> Link, with no
			// other children.
			if tb, ok := n.FirstChild().(*ast.TextBlock); ok {
				if l, ok := tb.FirstChild().(*ast.Link); ok && l.NextSibling() == nil {
					// Record the link.
					e.links = append(e.links, link{
						Href: string(l.Destination),
						Body: string(l.Text(reader.Source())),
					})
				}
			}
			return ast.WalkSkipChildren, nil
		}

		return ast.WalkContinue, nil
	})
	if err != nil {
		log.Errorf(e.ctx, "extractLinks.Transform: %v", err)
	}
}

type extractTOC struct {
	ctx         context.Context
	Headings    []*Heading
	removeTitle bool // omit title from TOC
}

// Transform collects the headings from a readme into an outline
// of the document. It nests the headings based on the h-level hierarchy.
// See tests for heading levels in TestReadme for behavior.
func (e *extractTOC) Transform(node *ast.Document, reader text.Reader, pc parser.Context) {
	var headings []*Heading
	err := ast.Walk(node, func(n ast.Node, entering bool) (ast.WalkStatus, error) {
		if n.Kind() == ast.KindHeading && entering {
			heading := n.(*ast.Heading)
			section := &Heading{
				Level: heading.Level,
				Text:  string(n.Text(reader.Source())),
			}
			if id, ok := heading.AttributeString("id"); ok {
				section.ID = string(id.([]byte))
			}
			headings = append(headings, section)
			return ast.WalkSkipChildren, nil
		}
		return ast.WalkContinue, nil
	})
	if err != nil {
		log.Errorf(e.ctx, "extractTOC.Transform: %v", err)
	}

	// We nest the headings by walking through the list we extracted and
	// establishing parent child relationships based on heading levels.
	var nested []*Heading
	for i, h := range headings {
		if i == 0 {
			nested = append(nested, h)
			continue
		}
		parent := headings[i-1]
		for parent != nil && parent.Level >= h.Level {
			parent = parent.parent
		}
		if parent == nil {
			nested = append(nested, h)
		} else {
			h.parent = parent
			parent.Children = append(parent.Children, h)
		}
	}
	if e.removeTitle {
		// If there is only one top tevel heading with 1 or more children we
		// assume it is the title of the document and remove it from the TOC.
		if len(nested) == 1 && len(nested[0].Children) > 0 {
			nested = nested[0].Children
		}
	}
	e.Headings = nested
}


text:
.class public Landroid/widget/QromActionBarFrameLayout;
.super Landroid/widget/FrameLayout;
.source "QromActionBarFrameLayout.java"

# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 11
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 12
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attributeSet"    # Landroid/util/AttributeSet;

    .prologue
    .line 15
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 16
    return-void
.end method

# virtual methods
.method protected fitSystemWindows(Landroid/graphics/Rect;)Z
    .locals 2
    .param p1, "insets"    # Landroid/graphics/Rect;

    .prologue
    .line 19
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x12

    if-le v0, v1, :cond_0

    invoke-virtual {p0}, Landroid/widget/QromActionBarFrameLayout;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7a0a0018

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 20
    const/4 v0, 0x0

    iput v0, p1, Landroid/graphics/Rect;->top:I

    .line 22
    :cond_0
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->fitSystemWindows(Landroid/graphics/Rect;)Z

    .line 23
    const/4 v0, 0x1

    return v0
.end method

redpajama_set_name: RedPajamaGithub


text:
import { Widget } from "../../core/widget";

interface SingleOpt {
    container?: any, belowMouse?: boolean
}

export declare class Single extends Widget {
    props: {
        readonly?: boolean,
        title?: string | (() => string) | null,
        warningTitle?: string | (() => string) | null,
        tipType?: "success" | "warning",
        value?: any,

        /**
         * title是否跟随鼠标
         * @default false
         */
        belowMouse?: boolean,
    }

    _showToolTip(e: Event, opt?: SingleOpt): void;

    _hideTooltip(): void;

    _clearTimeOut(): void;

    enableHover(opt?: SingleOpt): void;

    disabledHover(): void;

    setTitle(title: string | Function, opt?: SingleOpt): void;

    setWarningTitle(title: string, opt?: SingleOpt): void;

    setTipType(v: string): void;

    getTipType(): string;

    isReadOnly(): boolean;

    getTitle(): string;

    getWarningTitle(): string;

    populate(..._args: any[]): void;
}


text:
using System;

namespace Adaptive.Arp.Api
{
     /**
        Represents a local or remote service request.

        @author Aryslan
        @since v2.0
        @version 1.0
     */
     public class ServiceRequest : APIBean
     {

          /**
             Encoding of the content - by default assumed to be UTF8. This may be populated by the application, the platform
populates this field with defaults for the service.
          */
          public IServiceContentEncoding ContentEncoding { get; set; }
          /**
             Body parameters to be included in the body of the request to a service. These may be applied
during GET/POST operations. No body parameters are included if this array is null or length zero.
          */
          public ServiceRequestParameter[] BodyParameters { get; set; }
          /**
             Request data content (plain text). This should be populated by the application. The content should be
in some well-known web format - in specific, binaries submitted should be encoded to base64 and the content
type should be set respectively by the application.
          */
          public string Content { get; set; }
          /**
             The length in bytes of the content. This may be populated by the application, the platform
calculates this length automatically if a specific contentLength is not specified.
          */
          public int ContentLength { get; set; }
          /**
             The request content type (MIME TYPE). This may be populated by the application, the platform
populates this field with defaults for the service.
          */
          public string ContentType { get; set; }
          /**
             Query string parameters to be appended to the service URL when making the request. These may be applied
during GET/POST operations. No query parameters are appended if this array is null or length zero.
          */
          public ServiceRequestParameter[] QueryParameters { get; set; }
          /**
             This host indicates the origin host of the request. This, could be useful in case of redirected requests.
          */
          public string RefererHost { get; set; }
          /**
             The serviceHeaders array (name,value pairs) to be included in the request. This may be populated by the
application, the platform populates this field with defaults for the service and the previous headers.
In specific, the platform maintains request and response state automatically.
          */
          public ServiceHeader[] ServiceHeaders { get; set; }
          /**
             Session attributes and cookies. This may be populated by the application, the platform populates
this field with defaults for the service and the previous state information. In specific, the platform
maintains request and response state automatically.
          */
          public ServiceSession ServiceSession { get; set; }
          /**
             Token used for the creation of the request with the destination service, endpoint, function and method
identifiers. This should not be manipulated by the application directly.
          */
          public ServiceToken ServiceToken { get; set; }
          /**
             This attribute allows for the default user-agent string to be overridden by the application.
          */
          public string UserAgent { get; set; }

          /**
             Default constructor.

             @since V2.0
          */
          public ServiceRequest()  {
          }

          /**
             Convenience constructor.

             @param Content      Content payload.
             @param ServiceToken ServiceToken for the request.
             @since V2.0.6
          */
          public ServiceRequest(string content, ServiceToken serviceToken) : base () {
               this.Content = Content;
               this.ServiceToken = ServiceToken;
          }

          /**
             Returns the content encoding

             @return ContentEncoding
             @since V2.0
          */
          public IServiceContentEncoding GetContentEncoding() {
               return this.ContentEncoding;
          }

          /**
             Set the content encoding

             @param ContentEncoding Encoding of the binary payload - by default assumed to be UTF8.
             @since V2.0
          */
          public void SetContentEncoding(IServiceContentEncoding ContentEncoding) {
               this.ContentEncoding = ContentEncoding;
          }

          /**
             Gets the body parameters of the request.

             @return ServiceRequestParameter array or null if none are specified.
             @since V2.0.6
          */
          public ServiceRequestParameter[] GetBodyParameters() {
               return this.BodyParameters;
          }

          /**
             Sets the body parameters of the request.

             @param BodyParameters ServiceRequestParameter array or null if none are specified.
             @since V2.0.6
          */
          public void SetBodyParameters(ServiceRequestParameter[] BodyParameters) {
               this.BodyParameters = BodyParameters;
          }

          /**
             Returns the content

             @return Content
             @since V2.0
          */
          public string GetContent() {
               return this.Content;
          }

          /**
             Set the content

             @param Content Request/Response data content (plain text)
             @since V2.0
          */
          public void SetContent(string Content) {
               this.Content = Content;
          }

          /**
             Returns the content length

             @return ContentLength
             @since V2.0
          */
          public int GetContentLength() {
               return this.ContentLength;
          }

          /**
             Set the content length

             @param ContentLength The length in bytes for the Content field.
             @since V2.0
          */
          public void SetContentLength(int ContentLength) {
               this.ContentLength = ContentLength;
          }

          /**
             Returns the content type

             @return ContentType
             @since V2.0
          */
          public string GetContentType() {
               return this.ContentType;
          }

          /**
             Set the content type

             @param ContentType The request/response content type (MIME TYPE).
             @since V2.0
          */
          public void SetContentType(string ContentType) {
               this.ContentType = ContentType;
          }

          /**
             Gets the query parameters of the request.

             @return ServiceRequestParameter array or null if none are specified.
             @since V2.0.6
          */
          public ServiceRequestParameter[] GetQueryParameters() {
               return this.QueryParameters;
          }

          /**
             Sets the query parameters of the request.

             @param QueryParameters ServiceRequestParameter array or null if none are specified.
             @since V2.0.6
          */
          public void SetQueryParameters(ServiceRequestParameter[] QueryParameters) {
               this.QueryParameters = QueryParameters;
          }

          /**
             Returns the referer host (origin) of the request.

             @return Referer host of the request
             @since V2.1.4
          */
          public string GetRefererHost() {
               return this.RefererHost;
          }

          /**
             Sets the value for the referer host of the request.

             @param RefererHost Referer host of the request
             @since V2.1.4
          */
          public void SetRefererHost(string RefererHost) {
               this.RefererHost = RefererHost;
          }

          /**
             Returns the array of ServiceHeader

             @return ServiceHeaders
             @since V2.0
          */
          public ServiceHeader[] GetServiceHeaders() {
               return this.ServiceHeaders;
          }

          /**
             Set the array of ServiceHeader

             @param ServiceHeaders The serviceHeaders array (name,value pairs) to be included on the I/O service request.
             @since V2.0
          */
          public void SetServiceHeaders(ServiceHeader[] ServiceHeaders) {
               this.ServiceHeaders = ServiceHeaders;
          }

          /**
             Getter for service session

             @return The element service session
             @since V2.0
          */
          public ServiceSession GetServiceSession() {
               return this.ServiceSession;
          }

          /**
             Setter for service session

             @param ServiceSession The element service session
             @since V2.0
          */
          public void SetServiceSession(ServiceSession ServiceSession) {
               this.ServiceSession = ServiceSession;
          }

          /**
             Gets the ServiceToken of the request.

             @return ServiceToken.
             @since V2.0.6
          */
          public ServiceToken GetServiceToken() {
               return this.ServiceToken;
          }

          /**
             Sets the ServiceToken of the request.

             @param ServiceToken ServiceToken to be used for the invocation.
             @since V2.0.6
          */
          public void SetServiceToken(ServiceToken ServiceToken) {
               this.ServiceToken = ServiceToken;
          }

          /**
             Gets the overridden user-agent string.

             @return User-agent string.
             @since V2.0.6
          */
          public string GetUserAgent() {
               return this.UserAgent;
          }

          /**
             Sets the user-agent to override the default user-agent string.

             @param UserAgent User-agent string.
             @since V2.0.6
          */
          public void SetUserAgent(string UserAgent) {
               this.UserAgent = UserAgent;
          }

     }
}

/**
------------------------------------| Engineered with ♥ in Barcelona, Catalonia |--------------------------------------
*/


text:
// Provides an abstraction for list bindings
sap.ui.define(['jquery.sap.global', './Binding', './Filter', './Sorter'],
	function(jQuery, Binding, Filter, Sorter) {
	"use strict";

	/**
	 * Constructor for ListBinding.
	 *
	 * @class
	 * ListBinding is a specific binding for lists in the model, which can be used
	 * to populate Tables or ItemLists.
	 *
	 * @param {sap.ui.model.Model} oModel Model instance that this binding belongs to
	 * @param {string} sPath Binding path for this binding;
	 *   a relative path will be resolved relative to a given context
	 * @param {sap.ui.model.Context} oContext Context to be used to resolve a relative path
	 * @param {array} [aSorters] Initial sort order (can be either a sorter or an array of sorters)
	 * @param {array} [aFilters] Predefined filter/s (can be either a filter or an array of filters)
	 * @param {object} [mParameters] Additional, implementation-specific parameters that should be used
	 *   by the new list binding; this base class doesn't define any parameters, check the API reference
	 *   for the concrete model implementations to learn about their supported parameters (if any)
	 *
	 * @public
	 * @alias sap.ui.model.ListBinding
	 * @extends sap.ui.model.Binding
	 */
	var ListBinding = Binding.extend("sap.ui.model.ListBinding", /** @lends sap.ui.model.ListBinding.prototype */ {

		constructor : function(oModel, sPath, oContext, aSorters, aFilters, mParameters){
			Binding.call(this, oModel, sPath, oContext, mParameters);

			this.aSorters = makeArray(aSorters, Sorter);
			this.aFilters = [];
			this.aApplicationFilters = makeArray(aFilters, Filter);
			this.bUseExtendedChangeDetection = false;
			this.bDetectUpdates = true;
		},

		metadata : {
			"abstract" : true,

			publicMethods : [
				// methods
				"getContexts", "getCurrentContexts", "sort", "attachSort", "detachSort", "filter", "attachFilter", "detachFilter", "getDistinctValues", "isGrouped", "getLength", "isLengthFinal"
			]
		}

	});

	function makeArray(a, FNClass) {
		if ( Array.isArray(a) ) {
			return a;
		}
		return a instanceof FNClass ? [a] : [];
	}

	// the 'abstract methods' to be implemented by child classes
	/**
	 * Returns an array of binding contexts for the bound target list.
	 *
	 * Note:The public usage of this method is deprecated, as calls from outside of controls will lead
	 * to unexpected side effects. For avoidance use {@link sap.ui.model.ListBinding.prototype.getCurrentContexts}
	 * instead.
	 *
	 * @function
	 * @name sap.ui.model.ListBinding.prototype.getContexts
	 * @param {int} [iStartIndex=0] the startIndex where to start the retrieval of contexts
	 * @param {int} [iLength=length of the list] determines how many contexts to retrieve beginning from the start index.
	 * @return {sap.ui.model.Context[]} the array of contexts for each row of the bound list
	 *
	 * @protected
	 */

	/**
	 * Applies a new set of filters to the list represented by this binding.
	 *
	 * Depending on the nature of the model (client or server), the operation might be
	 * executed locally or on a server and it might execute asynchronously.
	 *
	 *
Application and Control Filters

	 * Each list binding maintains two separate lists of filters, one for filters defined by the
	 * control that owns the binding and another list for filters that an application can define
	 * in addition. When executing the filter operation, both sets of filters are combined.
	 *
	 * By using the second parameter sFilterType of method filter,
	 * the caller can control which set of filters is modified. If no type is given, then the
	 * behavior depends on the model implementation and should be documented in the API reference
	 * for that model.
	 *
	 *
Auto-Grouping of Filters

	 * Filters are first grouped according to their binding path.
	 * All filters belonging to the same group are ORed and after that the
	 * results of all groups are ANDed.
	 * Usually this means, all filters applied to a single table column
	 * are ORed, while filters on different table columns are ANDed.
	 *
	 * @param {sap.ui.model.Filter[]} aFilters Array of filter objects
	 * @param {sap.ui.model.FilterType} [sFilterType=undefined] Type of the filter which should
	 *  be adjusted; if no type is given, the behavior depends on the model implementation
	 * @return {sap.ui.model.ListBinding} returns this to facilitate method chaining
	 *
	 * @function
	 * @name sap.ui.model.ListBinding.prototype.filter
	 * @public
	 */

	/**
	 * Sorts the list according to the sorter object
	 *
	 * @function
	 * @name sap.ui.model.ListBinding.prototype.sort
	 * @param {sap.ui.model.Sorter|Array} aSorters the Sorter object or an array of sorters which defines the sort order
	 * @return {sap.ui.model.ListBinding} returns this to facilitate method chaining
	 * @public
	 */

	/**
	 * Returns an array of currently used binding contexts of the bound control
	 *
	 * This method does not trigger any data requests from the backend or delta calculation, but just returns the context
	 * array as last requested by the control. This can be used by the application to get access to the data currently
	 * displayed by a list control.
	 *
	 * @return {sap.ui.model.Context[]} the array of contexts for each row of the bound list
	 * @since 1.28
	 * @public
	 */
	ListBinding.prototype.getCurrentContexts = function() {
		return this.getContexts();
	};

	/**
	 * Returns the number of entries in the list. This might be an estimated or preliminary length, in case
	 * the full length is not known yet, see method isLengthFinal().
	 *
	 * @return {int} returns the number of entries in the list
	 * @since 1.24
	 * @public
	 */
	ListBinding.prototype.getLength = function() {
		return 0;
	};

	/**
	 * Returns whether the length which can be retrieved using getLength() is a known, final length,
	 * or a preliminary or estimated length which may change if further data is requested.
	 *
	 * @return {boolean} returns whether the length is final
	 * @since 1.24
	 * @public
	 */
	ListBinding.prototype.isLengthFinal = function() {
		return true;
	};

	// base methods, may be overridden by child classes
	/**
	 * Returns list of distinct values for the given relative binding path
	 *
	 * @param {string} sPath the relative binding path
	 * @return {Array} the array of distinct values.
	 *
	 * @public
	 */
	ListBinding.prototype.getDistinctValues = function(sPath) {
		return null;
	};

	//Eventing and related
	/**
	 * Attach event-handler fnFunction to the 'sort' event of this sap.ui.model.ListBinding.

	 * @param {function} fnFunction The function to call, when the event occurs.
	 * @param {object} [oListener] object on which to call the given function.
	 * @protected
	 * @deprecated use the change event. It now contains a parameter (reason : "sort") when a sorter event is fired.
	 */
	ListBinding.prototype.attachSort = function(fnFunction, oListener) {
		this.attachEvent("sort", fnFunction, oListener);
	};

	/**
	 * Detach event-handler fnFunction from the 'sort' event of this sap.ui.model.ListBinding.

	 * @param {function} fnFunction The function to call, when the event occurs.
	 * @param {object} [oListener] object on which to call the given function.
	 * @protected
	 * @deprecated use the change event.
	 */
	ListBinding.prototype.detachSort = function(fnFunction, oListener) {
		this.detachEvent("sort", fnFunction, oListener);
	};

	/**
	 * Fire event _sort to attached listeners.
	 * @param {Map} [mArguments] the arguments to pass along with the event.
	 * @private
	 * @deprecated use the change event. It now contains a parameter (reason : "sort") when a sorter event is fired.
	 */
	ListBinding.prototype._fireSort = function(mArguments) {
		this.fireEvent("sort", mArguments);
	};

	/**
	 * Attach event-handler fnFunction to the 'filter' event of this sap.ui.model.ListBinding.

	 * @param {function} fnFunction The function to call, when the event occurs.
	 * @param {object} [oListener] object on which to call the given function.
	 * @protected
	 * @deprecated use the change event. It now contains a parameter (reason : "filter") when a filter event is fired.
	 */
	ListBinding.prototype.attachFilter = function(fnFunction, oListener) {
		this.attachEvent("filter", fnFunction, oListener);
	};

	/**
	 * Detach event-handler fnFunction from the 'filter' event of this sap.ui.model.ListBinding.

	 * @param {function} fnFunction The function to call, when the event occurs.
	 * @param {object} [oListener] object on which to call the given function.
	 * @protected
	 * @deprecated use the change event.
	 */
	ListBinding.prototype.detachFilter = function(fnFunction, oListener) {
		this.detachEvent("filter", fnFunction, oListener);
	};

	/**
	 * Fire event _filter to attached listeners.
	 * @param {Map} [mArguments] the arguments to pass along with the event.
	 * @private
	 * @deprecated use the change event. It now contains a parameter (reason : "filter") when a filter event is fired.
	 */
	ListBinding.prototype._fireFilter = function(mArguments) {
		this.fireEvent("filter", mArguments);
	};

	/**
	 * Indicates whether grouping is enabled for the binding.
	 * Grouping is enabled for a list binding, if at least one sorter exists on the binding and the first sorter
	 * is a grouping sorter.
	 * @public
	 * @returns {boolean} whether grouping is enabled
	 */
	ListBinding.prototype.isGrouped = function() {
		return !!(this.aSorters && this.aSorters[0] && this.aSorters[0].fnGroup);
	};

	/**
	 * Gets the group for the given context.
	 * Must only be called if isGrouped() returns that grouping is enabled for this binding. The grouping will be
	 * performed using the first sorter (in case multiple sorters are defined).
	 * @param {sap.ui.model.Context} oContext the binding context
	 * @public
	 * @returns {object} the group object containing a key property and optional custom properties
	 * @see sap.ui.model.Sorter#getGroup
	 */
	ListBinding.prototype.getGroup = function(oContext) {
		return this.aSorters[0].getGroup(oContext);
	};

	/**
	 * Enable extended change detection
	 *
	 * @param {boolean} bDetectUpdates Whether changes within the same entity should cause a delete and insert command
	 * @param {function|string} vKey The path of the property containing the key or a function getting the context as only parameter to calculate a key to identify an entry
	 * @private
	 */
	ListBinding.prototype.enableExtendedChangeDetection = function(bDetectUpdates, vKey) {
		this.bUseExtendedChangeDetection = true;
		this.bDetectUpdates = bDetectUpdates;
		if (typeof vKey === "string") {
			this.getEntryKey = function(oContext) {
				return oContext.getProperty(vKey);
			};
		} else if (typeof vKey === "function") {
			this.getEntryKey = vKey;
		}
		if (this.update) {
			this.update();
		}
	};

	/**
	 * Return the data used for the extended change detection. Dependent on the configuration this can either be a
	 * serialization of the complete data, or just a unique key identifying the entry. If grouping is enabled, the
	 * grouping key will also be included, to detect grouping changes.
	 *
	 * @param {sap.ui.model.Context} oContext the context object
	 * @returns {string} A string which is used for diff comparison
	 */
	ListBinding.prototype.getContextData = function(oContext) {
		var sContextData;
		if (this.getEntryKey && !this.bDetectUpdates) {
			sContextData = this.getEntryKey(oContext);
			if (this.isGrouped()) {
				sContextData += "-" + this.getGroup(oContext).key;
			}
		} else {
			sContextData = this.getEntryData(oContext);
		}
		return sContextData;
	};

	/**
	 * Return the entry data serialized as a string. The default implementation assumes a JS object and uses
	 * JSON.stringify to serialize it, subclasses may override as needed.
	 *
	 * @param {sap.ui.model.Context} oContext the context object
	 * @returns {string} The serialized object data
	 */
	ListBinding.prototype.getEntryData = function(oContext) {
		return JSON.stringify(oContext.getObject());
	};

	return ListBinding;

});


text:
namespace Aphysoft.Share
{
    public static class BaseResources
    {
        private static bool inited = false;

        public static void Init()
        {
            if (!inited)
            {
                inited = true;

#if !DEBUG
                Resource.Register("css_share", ResourceTypes.CSS, Resources.Resources.Css.ResourceManager, "share");
                Resource.Group(Resource.CommonResourceCSS, "css_share", 1);
#endif

                //
                // scripts
                //
                Resource.Register("script_jquery", "jquery", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "jquery").NoMinify();
                Resource.Group(Resource.CommonResourceScript, "script_jquery", 1);

                Resource.Register("script_modernizr", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "modernizr").NoMinify();
                Resource.Group(Resource.CommonResourceScript, "script_modernizr", 2);

                Resource.Register("script_libs", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "libs");
                Resource.Group(Resource.CommonResourceScript, "script_libs", 3);

                //if (Settings.THREE)
                //{
                Resource.Register("script_three", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "three").NoMinify();
                Resource.Group(Resource.CommonResourceScript, "script_three", 4);
                //}

                //if (Settings.Raphael)
                //{
                Resource.Register("script_raphael", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "raphael").NoMinify();
                Resource.Group(Resource.CommonResourceScript, "script_raphael", 5);
                //}

                //if (Settings.Fabric)
                //{
                Resource.Register("script_fabric", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "fabric").NoMinify();
                Resource.Group(Resource.CommonResourceScript, "script_fabric", 6);
                //}

                Resource.Register("script_webfont", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "webfont").NoMinify();
                Resource.Group(Resource.CommonResourceScript, "script_webfont", 7);

#if !DEBUG
                Resource.Register("script_share", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "share");
                Resource.Group(Resource.CommonResourceScript, "script_share", 10);
#endif

                // Images
                Resource.Register("image_shortcuticon", ResourceTypes.PNG, Resources.Resources.Images.ResourceManager, "shortcuticon");

                //WebFont.Register("roboto", "https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i");
            }
        }

#if DEBUG
        public static void Debug()
        {
            Resource.Common(Resource.Register("script_debug", ResourceTypes.JavaScript, Resources.Resources.Scripts.ResourceManager, "debug"));
        }
#endif
    }
}


text:
package com.mhuang.wechat.common.template;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Template implements Serializable{

    private static final long serialVersionUID = 1L;

    private String touser;//发送的openid

    private String template_id = "";//模板id

    private String url;//跳转的url

    private Map<String,Map<String,String>> data = new HashMap<>();

    private final static String DEFAULT_COLOR = "#173177";
    private final static String FIRST = "first";
    private final static String KEYWORD = "keyword";
    private final static String VALUE = "value";
    private final static String COLOR = "color";
    private final static String REMARK = "remark";

    public void addKeyword(Integer index,String value){
        addKeyword(index,value,DEFAULT_COLOR);
    }

    public void addKeyword(Integer index,String value,String color){
        addDataMap(KEYWORD + index, value, color);
    }

    public void addRemark(String value){
        addRemark(value,DEFAULT_COLOR);
    }

    public void addRemark(String value,String color){
        addDataMap(REMARK, value, color);
    }

    public void addFirst(String value){
        addFirst(value,DEFAULT_COLOR);
    }
    public void addFirst(String value,String color){
        addDataMap(FIRST, value, color);
    }

    private void addDataMap(String type,String value,String color){
        Map<String, String> map = new HashMap<>();
        map.put(VALUE, value);
        map.put(COLOR, color);
        data.put(type, map);
    }

    public String getTouser() {
        return touser;
    }

    public void setTouser(String touser) {
        this.touser = touser;
    }

    public String getTemplate_id() {
        return template_id;
    }

    public void setTemplate_id(String template_id) {
        this.template_id = template_id;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Map<String, Map<String,String>> getData() {
        return data;
    }

    public void setData(Map<String, Map<String,String>> data) {
        this.data = data;
    }
}


text:
package net.iponweb.disthene.reader.graphite.functions;

import net.iponweb.disthene.reader.beans.TimeSeries;
import net.iponweb.disthene.reader.exceptions.EvaluationException;
import net.iponweb.disthene.reader.exceptions.InvalidArgumentException;
import net.iponweb.disthene.reader.graphite.Target;
import net.iponweb.disthene.reader.graphite.evaluation.TargetEvaluator;
import net.iponweb.disthene.reader.graphite.utils.HoltWinters;

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

/**
 * @author Andrei Ivanov
 */
public class HoltWintersConfidenceBandsFunction extends DistheneFunction {

    public HoltWintersConfidenceBandsFunction(String text) {
        super(text, "holtWintersConfidenceBands");
    }

    @Override
    public List<TimeSeries> evaluate(TargetEvaluator evaluator) throws EvaluationException {
        double delta = arguments.size() > 1 ? (Double) arguments.get(1) : 3;

        HoltWinters holtWinters = HoltWinters.analyze((Target) arguments.get(0), evaluator);
        List<TimeSeries> forecasts = holtWinters.getForecasts();
        List<Double> deviations = holtWinters.getDeviations();

        if (forecasts.size() == 0) return Collections.emptyList();

        long from = forecasts.get(0).getFrom();
        long to = forecasts.get(0).getTo();
        int step = forecasts.get(0).getStep();
        int length = forecasts.get(0).getValues().length;

        List<TimeSeries> result = new ArrayList<>();

        for (int i = 0; i < forecasts.size(); i++) {
            TimeSeries upper = new TimeSeries(forecasts.get(i).getName(), from, to, step);
            TimeSeries lower = new TimeSeries(forecasts.get(i).getName(), from, to, step);
            Double[] upperValues = new Double[length];
            Double[] lowerValues = new Double[length];

            Double[] forecastValues = forecasts.get(i).getValues();
            double deviation = deviations.get(i);

            for (int j = 0; j < length; j++) {
                if (forecastValues[j] != null) {
                    upperValues[j] = forecastValues[j] + delta * deviation;
                    lowerValues[j] = forecastValues[j] - delta * deviation;
                } else {
                    upperValues[j] = null;
                    lowerValues[j] = null;
                }
            }

            upper.setValues(upperValues);
            upper.setName("holtWintersConfidenceUpper(" + forecasts.get(i).getName() + ")");

            lower.setValues(lowerValues);
            lower.setName("holtWintersConfidenceLower(" + forecasts.get(i).getName() + ")");

            result.add(lower);
            result.add(upper);
        }

        return result;
    }

    @Override
    public void checkArguments() throws InvalidArgumentException {
        if (arguments.size() > 2 || arguments.size() < 1) throw new InvalidArgumentException("holtWintersConfidenceBands: number of arguments is " + arguments.size() + ". Must be one or two.");
        if (!(arguments.get(0) instanceof Target)) throw new InvalidArgumentException("holtWintersConfidenceBands: argument is " + arguments.get(0).getClass().getName() + ". Must be series");
        if (arguments.size() > 1 && !(arguments.get(1) instanceof Double)) throw new InvalidArgumentException("holtWintersConfidenceBands: argument is " + arguments.get(1).getClass().getName() + ". Must be a number");
    }
}


text:
<?php
/**
* 	Before inclusion of this file:
*
* 	APPLICATION_ENV needs to be defined.
*
* 	optional:
* 	bool READ_FROM_CACHE, default true
* 	string MEMCACHE_HOST, default '127.0.0.1'
*
*/
if (!defined('BASE_PATH')) {
	define('BASE_PATH', realpath(dirname(__FILE__) . '/../..'));
}
define('APPLICATION_PATH', BASE_PATH . '/application');
define('GARP_APPLICATION_PATH', BASE_PATH . '/garp/application');

$appSpecificInit = APPLICATION_PATH . '/configs/init.php';
if (file_exists($appSpecificInit)) {
	include_once($appSpecificInit);
}

defined('READ_FROM_CACHE') || define('READ_FROM_CACHE', true);
defined('MEMCACHE_HOST') || define('MEMCACHE_HOST', '127.0.0.1');
defined('MEMCACHE_PORT') || define('MEMCACHE_PORT', '11211');

$isCli = false;
if (
	array_key_exists('HTTP_HOST', $_SERVER) &&
	$_SERVER['HTTP_HOST']
) {
	//	h t t p   c o n t e x t
	define('HTTP_HOST', $_SERVER['HTTP_HOST']);

	set_include_path(
		realpath(APPLICATION_PATH.'/../library')
		. PATH_SEPARATOR . realpath(GARP_APPLICATION_PATH.'/../library')
		. PATH_SEPARATOR . '.'
	);

} else {
	//	c l i   c o n t e x t
	define('HTTP_HOST', gethostname());

	set_include_path(
		'.'
		. PATH_SEPARATOR . BASE_PATH . '/library'
		. PATH_SEPARATOR . realpath(GARP_APPLICATION_PATH.'/../library')
		. PATH_SEPARATOR . get_include_path()
	);

	$isCli = true;
}

if (!class_exists('Garp_Loader')) {
	require GARP_APPLICATION_PATH . '/../library/Garp/Loader.php';
}

/**
 * Set up class loading.
 */
$classLoader = Garp_Loader::getInstance()->addIncludePaths(array(
	array(
		'namespace' => '*',
		'path' => realpath(APPLICATION_PATH.'/../library')
	),
	array(
		'namespace' => 'Garp',
		'path' => realpath(GARP_APPLICATION_PATH.'/../library')
	),
	array(
		'namespace' => 'Model',
		'path' => APPLICATION_PATH.'/modules/default/models/',
		'ignore' => 'Model_'
	),
	array(
		'namespace' => 'G_Model',
		'path' => GARP_APPLICATION_PATH.'/modules/g/models/',
		'ignore' => 'G_Model_'
	),
	array(
		'namespace' => 'Mocks_Model',
		'path' => GARP_APPLICATION_PATH.'/modules/mocks/models/',
		'ignore' => 'Mocks_Model_'
	)
));
$classLoader->register();

if (!$isCli && Garp_Application::isUnderConstruction()) {
	header('HTTP/1.1 503 Service Temporarily Unavailable');
	header('Retry-After: ' . date(DateTime::RFC2822, strtotime('+5 minutes')));
	require(GARP_APPLICATION_PATH . '/modules/g/views/scripts/under-construction.phtml');
	exit;
}

/**
 * Save wether we are in a cli context
 */
Zend_Registry::set('CLI', $isCli);

/**
 * Set up caching
*/
$rootFolder = strtolower(dirname(APPLICATION_PATH.'/'));
$rootFolder = str_replace(DIRECTORY_SEPARATOR, '_', $rootFolder);
$filePrefix = $rootFolder.'_'.APPLICATION_ENV;
$filePrefix = preg_replace('/[^a-zA-A0-9_]/', '_', $filePrefix).'_';

$frontendName = 'Core';

$memcacheAvailable = extension_loaded('memcache');
if ($memcacheAvailable) {
	$memcache = new Memcache;
	$memcacheAvailable = @$memcache->connect(MEMCACHE_HOST, MEMCACHE_PORT);
}
if (!$memcacheAvailable) {
	$backendName       = 'BlackHole';
	$cacheStoreEnabled = false;
	$useWriteControl   = false;
} else {
	$backendName       = 'Memcached';
	$cacheStoreEnabled = true;
	$useWriteControl   = true;
}

$frontendOptions = array(
	// for debug purposes; quickly turn off caching here
	'caching' => $cacheStoreEnabled,
	'lifetime' => 7200,
	'cache_id_prefix' => $filePrefix,
	// slightly slower, but necessary when caching arrays or objects (like query results)
	'automatic_serialization' => true,
	'write_control' => $useWriteControl,
);
$backendOptions = array(
	'cache_dir' => APPLICATION_PATH.'/data/cache',
	// include the hostname and app environment in the filename for security
	'file_name_prefix' => $filePrefix,
	'servers' => array(
		array(
			'host' => MEMCACHE_HOST,
			'port' => MEMCACHE_PORT
		)
	),
);

$cache = Zend_Cache::factory(
	$frontendName,
	$backendName,
	$frontendOptions,
	$backendOptions
);

// Add default caching of metadata to models.
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
/**
 * Use this control for toggling cache on and off. Do not use
 * the 'caching' option in the Zend_Cache configuration, because
 * that also disables cleaning the cache. In the case of the
 * admin pages this is unwanted behavior.
 */
Zend_Registry::set('readFromCache', READ_FROM_CACHE);
// Store the cache frontend in the registry for easy access
Zend_Registry::set('CacheFrontend', $cache);

/**
 * Developer convenience methods.
 * NOTE: this area should be used for adding easy shortcut methods a developer
 * may use. Real implementation code is probably best fitted in its own class,
 * such as controllers, models, behaviors, or helpers.
 */

/**
 * Shortcut to logging messages.
 * @param String $file Basename of a log file. Extension may be omitted.
 * 					   File will end up in /application/data/logs
 * @param String $message Your log message. Arrays will be print_r'd.
 * @param Int $priority A Zend_Log priority (e.g. INFO, NOTICE, WARN etc.)
 * @return Void
 */
function dump($file, $message, $priority = Zend_Log::INFO) {
	if (strpos($file, '.') === false) {
		$file .= '.log';
	}

	$logger = Garp_Log::factory($file);
	$message = is_array($message) ? print_r($message, true) : $message;
	$logger->log($message, $priority);
}

/**
 * Translate text
 * @param String $str
 * @return String
 */
function __($str) {
	if (Zend_Registry::isRegistered('Zend_Translate')) {
		$translate = Zend_Registry::get('Zend_Translate');
		return call_user_func_array(array($translate, '_'), func_get_args());
	}
	return $str;
}

/**
 * Make the PHP language a little more expressive.
 * PHP 5.4 allows chaining of new instances like so;
 * (new Instance())->doSomething();
 * This method sort of brings this to earlier versions of PHP:
 * instance(new Instance())->doSomething();
 * @param Object $obj
 * @return Object
 */
function instance($obj) {
	if (is_string($obj)) {
		$obj = new $obj;
	}
	return $obj;
}

/**
 * Transform array of objects into a new array with just the given key of said objects
 */
function array_pluck($array, $column) {
	return array_map(function($obj) use ($column) {
		return $obj[$column];
	}, $array);
}

/**
 * Flatten an array of arrays.
 * The cornerstone of functional programming.
 */
function concatAll($array) {
	$results = array();
	foreach ($array as $item) {
		// Merge arrays...
		if (is_array($item)) {
			$results = array_merge($results, $item);
			continue;
		}
		// ...push anything else.
		$results[] = $item;
	}
	return $results;
}

if (!function_exists('gzdecode')) {
	/**
 	 * @see http://nl1.php.net/gzdecode#82930
 	 */
	function gzdecode($data,&$filename='',&$error='',$maxlength=null) {
    	$len = strlen($data);
    	if ($len < 18 || strcmp(substr($data,0,2),"\x1f\x8b")) {
        	$error = "Not in GZIP format.";
        	return null;  // Not GZIP format (See RFC 1952)
    	}
    	$method = ord(substr($data,2,1));  // Compression method
    	$flags  = ord(substr($data,3,1));  // Flags
    	if ($flags & 31 != $flags) {
        	$error = "Reserved bits not allowed.";
        	return null;
    	}
    	// NOTE: $mtime may be negative (PHP integer limitations)
    	$mtime = unpack("V", substr($data,4,4));
    	$mtime = $mtime[1];
    	$xfl   = substr($data,8,1);
    	$os    = substr($data,8,1);
    	$headerlen = 10;
    	$extralen  = 0;
    	$extra     = "";
    	if ($flags & 4) {
        	// 2-byte length prefixed EXTRA data in header
        	if ($len - $headerlen - 2 < 8) {
            	return false;  // invalid
        	}
        	$extralen = unpack("v",substr($data,8,2));
        	$extralen = $extralen[1];
        	if ($len - $headerlen - 2 - $extralen < 8) {
            	return false;  // invalid
        	}
        	$extra = substr($data,10,$extralen);
        	$headerlen += 2 + $extralen;
    	}
    	$filenamelen = 0;
    	$filename = "";
    	if ($flags & 8) {
        	// C-style string
        	if ($len - $headerlen - 1 < 8) {
            	return false; // invalid
        	}
        	$filenamelen = strpos(substr($data,$headerlen),chr(0));
        	if ($filenamelen === false || $len - $headerlen - $filenamelen - 1 < 8) {
            	return false; // invalid
        	}
        	$filename = substr($data,$headerlen,$filenamelen);
        	$headerlen += $filenamelen + 1;
    	}
    	$commentlen = 0;
    	$comment = "";
    	if ($flags & 16) {
        	// C-style string COMMENT data in header
        	if ($len - $headerlen - 1 < 8) {
            	return false;    // invalid
        	}
        	$commentlen = strpos(substr($data,$headerlen),chr(0));
        	if ($commentlen === false || $len - $headerlen - $commentlen - 1 < 8) {
            	return false;    // Invalid header format
        	}
        	$comment = substr($data,$headerlen,$commentlen);
        	$headerlen += $commentlen + 1;
    	}
    	$headercrc = "";
    	if ($flags & 2) {
        	// 2-bytes (lowest order) of CRC32 on header present
        	if ($len - $headerlen - 2 < 8) {
            	return false;    // invalid
        	}
        	$calccrc = crc32(substr($data,0,$headerlen)) & 0xffff;
        	$headercrc = unpack("v", substr($data,$headerlen,2));
        	$headercrc = $headercrc[1];
        	if ($headercrc != $calccrc) {
            	$error = "Header checksum failed.";
            	return false;    // Bad header CRC
        	}
        	$headerlen += 2;
    	}
    	// GZIP FOOTER
    	$datacrc = unpack("V",substr($data,-8,4));
    	$datacrc = sprintf('%u',$datacrc[1] & 0xFFFFFFFF);
    	$isize = unpack("V",substr($data,-4));
    	$isize = $isize[1];
    	// decompression:
    	$bodylen = $len-$headerlen-8;
    	if ($bodylen < 1) {
        	// IMPLEMENTATION BUG!
        	return null;
    	}
    	$body = substr($data,$headerlen,$bodylen);
    	$data = "";
    	if ($bodylen > 0) {
        	switch ($method) {
        	case 8:
            	// Currently the only supported compression method:
            	$data = gzinflate($body,$maxlength);
            	break;
        	default:
            	$error = "Unknown compression method.";
            	return false;
        	}
    	}  // zero-byte body content is allowed
    	// Verifiy CRC32
    	$crc   = sprintf("%u",crc32($data));
    	$crcOK = $crc == $datacrc;
    	$lenOK = $isize == strlen($data);
    	if (!$lenOK || !$crcOK) {
        	$error = ( $lenOK ? '' : 'Length check FAILED. ') . ( $crcOK ? '' : 'Checksum FAILED.');
        	return false;
    	}
    	return $data;
	}
}

/**
 * This file is part of the array_column library
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright Copyright (c) Ben Ramsey (http://benramsey.com)
 * @license http://opensource.org/licenses/MIT MIT
 */

if (!function_exists('array_column')) {
    /**
     * Returns the values from a single column of the input array, identified by
     * the $columnKey.
     *
     * Optionally, you may provide an $indexKey to index the values in the returned
     * array by the values from the $indexKey column in the input array.
     *
     * @param array $input A multi-dimensional array (record set) from which to pull
     *                     a column of values.
     * @param mixed $columnKey The column of values to return. This value may be the
     *                         integer key of the column you wish to retrieve, or it
     *                         may be the string key name for an associative array.
     * @param mixed $indexKey (Optional.) The column to use as the index/keys for
     *                        the returned array. This value may be the integer key
     *                        of the column, or it may be the string key name.
     * @return array
     */
    function array_column($input = null, $columnKey = null, $indexKey = null)
    {
        // Using func_get_args() in order to check for proper number of
        // parameters and trigger errors exactly as the built-in array_column()
        // does in PHP 5.5.
        $argc = func_num_args();
        $params = func_get_args();

        if ($argc < 2) {
            trigger_error("array_column() expects at least 2 parameters, {$argc} given", E_USER_WARNING);
            return null;
        }

        if (!is_array($params[0])) {
            trigger_error(
                'array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given',
                E_USER_WARNING
            );
            return null;
        }

        if (!is_int($params[1])
            && !is_float($params[1])
            && !is_string($params[1])
            && $params[1] !== null
            && !(is_object($params[1]) && method_exists($params[1], '__toString'))
        ) {
            trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);
            return false;
        }

        if (isset($params[2])
            && !is_int($params[2])
            && !is_float($params[2])
            && !is_string($params[2])
            && !(is_object($params[2]) && method_exists($params[2], '__toString'))
        ) {
            trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);
            return false;
        }

        $paramsInput = $params[0];
        $paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;

        $paramsIndexKey = null;
        if (isset($params[2])) {
            if (is_float($params[2]) || is_int($params[2])) {
                $paramsIndexKey = (int) $params[2];
            } else {
                $paramsIndexKey = (string) $params[2];
            }
        }

        $resultArray = array();

        foreach ($paramsInput as $row) {
            $key = $value = null;
            $keySet = $valueSet = false;

            if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {
                $keySet = true;
                $key = (string) $row[$paramsIndexKey];
            }

            if ($paramsColumnKey === null) {
                $valueSet = true;
                $value = $row;
            } elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {
                $valueSet = true;
                $value = $row[$paramsColumnKey];
            }

            if ($valueSet) {
                if ($keySet) {
                    $resultArray[$key] = $value;
                } else {
                    $resultArray[] = $value;
                }
            }

        }

        return $resultArray;
    }

}


text:
@implementation BrickIndexPath

+ (id)indexPathWithIndex:(NSUInteger)index column:(NSInteger)column frame:(CGRect)frame {
    return [[self alloc]initWithIndex:index column:column frame:frame];
}

- (id)initWithIndex:(NSUInteger)index column:(NSInteger)column frame:(CGRect)frame {
    self = [super init];
    if (self) {
        _index  = index;
        _column = column;
        _frame  = frame;
    }
    return self;
}

- (NSString *)description {
    return [NSString stringWithFormat:@"<BrickIndexPath index:%ld, column:%ld %@>",
            (unsigned long)self.index,
            (unsigned long)self.column,
            NSStringFromCGRect(self.frame)];
}

@end