text:
#ifndef __cxxtest__TeeListener_h__
#define __cxxtest__TeeListener_h__

//
// A TeeListener notifies two "regular" TestListeners
//

#include <cxxtest/TestListener.h>
#include <cxxtest/TestListener.h>

namespace CxxTest
{
class TeeListener : public TestListener
{
public:
    TeeListener()
    {
        setFirst(_dummy);
        setSecond(_dummy);
    }

    virtual ~TeeListener()
    {
    }

    void setFirst(TestListener &first)
    {
        _first = &first;
    }

    void setSecond(TestListener &second)
    {
        _second = &second;
    }

    void enterWorld(const WorldDescription &d)
    {
        _first->enterWorld(d);
        _second->enterWorld(d);
    }

    void enterSuite(const SuiteDescription &d)
    {
        _first->enterSuite(d);
        _second->enterSuite(d);
    }

    void enterTest(const TestDescription &d)
    {
        _first->enterTest(d);
        _second->enterTest(d);
    }

    void trace(const char *file, int line, const char *expression)
    {
        _first->trace(file, line, expression);
        _second->trace(file, line, expression);
    }

    void warning(const char *file, int line, const char *expression)
    {
        _first->warning(file, line, expression);
        _second->warning(file, line, expression);
    }

    void skippedTest(const char *file, int line, const char *expression)
    {
        _first->skippedTest(file, line, expression);
        _second->skippedTest(file, line, expression);
    }

    void failedTest(const char *file, int line, const char *expression)
    {
        _first->failedTest(file, line, expression);
        _second->failedTest(file, line, expression);
    }

    void failedAssert(const char *file, int line, const char *expression)
    {
        _first->failedAssert(file, line, expression);
        _second->failedAssert(file, line, expression);
    }

    void failedAssertEquals(const char *file, int line,
                            const char *xStr, const char *yStr,
                            const char *x, const char *y)
    {
        _first->failedAssertEquals(file, line, xStr, yStr, x, y);
        _second->failedAssertEquals(file, line, xStr, yStr, x, y);
    }

    void failedAssertSameData(const char *file, int line,
                              const char *xStr, const char *yStr,
                              const char *sizeStr, const void *x,
                              const void *y, unsigned size)
    {
        _first->failedAssertSameData(file, line, xStr, yStr, sizeStr, x, y, size);
        _second->failedAssertSameData(file, line, xStr, yStr, sizeStr, x, y, size);
    }

    void failedAssertSameFiles(const char* file, int line, const char* file1, const char* file2, const char* explanation)
    {
        _first->failedAssertSameFiles(file, line, file1, file2, explanation);
        _second->failedAssertSameFiles(file, line, file1, file2, explanation);
    }

    void failedAssertDelta(const char *file, int line,
                           const char *xStr, const char *yStr, const char *dStr,
                           const char *x, const char *y, const char *d)
    {
        _first->failedAssertDelta(file, line, xStr, yStr, dStr, x, y, d);
        _second->failedAssertDelta(file, line, xStr, yStr, dStr, x, y, d);
    }

    void failedAssertDiffers(const char *file, int line,
                             const char *xStr, const char *yStr,
                             const char *value)
    {
        _first->failedAssertDiffers(file, line, xStr, yStr, value);
        _second->failedAssertDiffers(file, line, xStr, yStr, value);
    }

    void failedAssertLessThan(const char *file, int line,
                              const char *xStr, const char *yStr,
                              const char *x, const char *y)
    {
        _first->failedAssertLessThan(file, line, xStr, yStr, x, y);
        _second->failedAssertLessThan(file, line, xStr, yStr, x, y);
    }

    void failedAssertLessThanEquals(const char *file, int line,
                                    const char *xStr, const char *yStr,
                                    const char *x, const char *y)
    {
        _first->failedAssertLessThanEquals(file, line, xStr, yStr, x, y);
        _second->failedAssertLessThanEquals(file, line, xStr, yStr, x, y);
    }

    void failedAssertPredicate(const char *file, int line,
                               const char *predicate, const char *xStr, const char *x)
    {
        _first->failedAssertPredicate(file, line, predicate, xStr, x);
        _second->failedAssertPredicate(file, line, predicate, xStr, x);
    }

    void failedAssertRelation(const char *file, int line,
                              const char *relation, const char *xStr, const char *yStr,
                              const char *x, const char *y)
    {
        _first->failedAssertRelation(file, line, relation, xStr, yStr, x, y);
        _second->failedAssertRelation(file, line, relation, xStr, yStr, x, y);
    }

    void failedAssertThrows(const char *file, int line,
                            const char *expression, const char *type,
                            bool otherThrown)
    {
        _first->failedAssertThrows(file, line, expression, type, otherThrown);
        _second->failedAssertThrows(file, line, expression, type, otherThrown);
    }

    void failedAssertThrowsNot(const char *file, int line,
                               const char *expression)
    {
        _first->failedAssertThrowsNot(file, line, expression);
        _second->failedAssertThrowsNot(file, line, expression);
    }

    void leaveTest(const TestDescription &d)
    {
        _first->leaveTest(d);
        _second->leaveTest(d);
    }

    void leaveSuite(const SuiteDescription &d)
    {
        _first->leaveSuite(d);
        _second->leaveSuite(d);
    }

    void leaveWorld(const WorldDescription &d)
    {
        _first->leaveWorld(d);
        _second->leaveWorld(d);
    }

private:
    TestListener *_first, *_second;
    TestListener _dummy;
};
}

#endif // __cxxtest__TeeListener_h__


text:
.class public Lorg/holoeverywhere/app/AlertDialog$Builder;
.super Ljava/lang/Object;
.source "AlertDialog.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lorg/holoeverywhere/app/AlertDialog;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "Builder"
.end annotation

# static fields
.field private static final CONSTRUCTOR_SIGNATURE:[Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "[",
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field

# instance fields
.field private mDialogClass:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<+",
            "Lorg/holoeverywhere/app/AlertDialog;",
            ">;"
        }
    .end annotation
.end field

.field private final mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 27
    const/4 v0, 0x2

    new-array v0, v0, [Ljava/lang/Class;

    const/4 v1, 0x0

    const-class v2, Landroid/content/Context;

    aput-object v2, v0, v1

    const/4 v1, 0x1

    sget-object v2, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    aput-object v2, v0, v1

    sput-object v0, Lorg/holoeverywhere/app/AlertDialog$Builder;->CONSTRUCTOR_SIGNATURE:[Ljava/lang/Class;

    return-void
.end method

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

    .prologue
    .line 34
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lorg/holoeverywhere/app/AlertDialog$Builder;-><init>(Landroid/content/Context;I)V

    .line 35
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;I)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "theme"    # I

    .prologue
    .line 37
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 38
    new-instance v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;

    invoke-direct {v0, p1, p2}, Lorg/holoeverywhere/internal/AlertController$AlertParams;-><init>(Landroid/content/Context;I)V

    iput-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    .line 39
    return-void
.end method

# virtual methods
.method public addButtonBehavior(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "buttonBehavior"    # I

    .prologue
    .line 42
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mButtonBehavior:I

    or-int/2addr v1, p1

    iput v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mButtonBehavior:I

    .line 43
    return-object p0
.end method

.method public create()Lorg/holoeverywhere/app/AlertDialog;
    .locals 8

    .prologue
    const/4 v7, 0x1

    .line 47
    const/4 v1, 0x0

    .line 48
    .local v1, "dialog":Lorg/holoeverywhere/app/AlertDialog;
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mDialogClass:Ljava/lang/Class;

    if-eqz v3, :cond_0

    .line 50
    :try_start_0
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mDialogClass:Ljava/lang/Class;

    sget-object v4, Lorg/holoeverywhere/app/AlertDialog$Builder;->CONSTRUCTOR_SIGNATURE:[Ljava/lang/Class;

    invoke-virtual {v3, v4}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;

    move-result-object v3

    const/4 v4, 0x2

    new-array v4, v4, [Ljava/lang/Object;

    const/4 v5, 0x0

    iget-object v6, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v6, v6, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    aput-object v6, v4, v5

    const/4 v5, 0x1

    iget-object v6, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget v6, v6, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mTheme:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    aput-object v6, v4, v5

    invoke-virtual {v3, v4}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    move-object v0, v3

    check-cast v0, Lorg/holoeverywhere/app/AlertDialog;

    move-object v1, v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 56
    :cond_0
    :goto_0
    if-nez v1, :cond_1

    .line 57
    new-instance v1, Lorg/holoeverywhere/app/AlertDialog;

    .end local v1    # "dialog":Lorg/holoeverywhere/app/AlertDialog;
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    iget-object v4, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget v4, v4, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mTheme:I

    invoke-direct {v1, v3, v4}, Lorg/holoeverywhere/app/AlertDialog;-><init>(Landroid/content/Context;I)V

    .line 59
    .restart local v1    # "dialog":Lorg/holoeverywhere/app/AlertDialog;
    :cond_1
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    # getter for: Lorg/holoeverywhere/app/AlertDialog;->mAlert:Lorg/holoeverywhere/internal/AlertController;
    invoke-static {v1}, Lorg/holoeverywhere/app/AlertDialog;->access$000(Lorg/holoeverywhere/app/AlertDialog;)Lorg/holoeverywhere/internal/AlertController;

    move-result-object v4

    invoke-virtual {v3, v4}, Lorg/holoeverywhere/internal/AlertController$AlertParams;->apply(Lorg/holoeverywhere/internal/AlertController;)V

    .line 60
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-boolean v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCancelable:Z

    invoke-virtual {v1, v3}, Lorg/holoeverywhere/app/AlertDialog;->setCancelable(Z)V

    .line 61
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-boolean v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCancelable:Z

    if-eqz v3, :cond_2

    .line 62
    invoke-virtual {v1, v7}, Lorg/holoeverywhere/app/AlertDialog;->setCanceledOnTouchOutside(Z)V

    .line 64
    :cond_2
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnCancelListener:Landroid/content/DialogInterface$OnCancelListener;

    if-eqz v3, :cond_3

    .line 65
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnCancelListener:Landroid/content/DialogInterface$OnCancelListener;

    invoke-virtual {v1, v3}, Lorg/holoeverywhere/app/AlertDialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

    .line 67
    :cond_3
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;

    if-eqz v3, :cond_4

    .line 68
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;

    invoke-virtual {v1, v3}, Lorg/holoeverywhere/app/AlertDialog;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V

    .line 70
    :cond_4
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;

    if-eqz v3, :cond_5

    .line 71
    iget-object v3, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v3, v3, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;

    invoke-virtual {v1, v3}, Lorg/holoeverywhere/app/AlertDialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 73
    :cond_5
    return-object v1

    .line 52
    :catch_0
    move-exception v2

    .line 53
    .local v2, "e":Ljava/lang/Exception;
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public getContext()Landroid/content/Context;
    .locals 1

    .prologue
    .line 77
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v0, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method public removeButtonBehavior(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "buttonBehavior"    # I

    .prologue
    .line 81
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mButtonBehavior:I

    or-int/2addr v1, p1

    iput v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mButtonBehavior:I

    .line 82
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mButtonBehavior:I

    xor-int/2addr v1, p1

    iput v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mButtonBehavior:I

    .line 83
    return-object p0
.end method

.method public setAdapter(Landroid/widget/ListAdapter;Landroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "adapter"    # Landroid/widget/ListAdapter;
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 88
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mAdapter:Landroid/widget/ListAdapter;

    .line 89
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;

    .line 90
    return-object p0
.end method

.method public setAlertDialogClass(Ljava/lang/Class;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class",
            "<+",
            "Lorg/holoeverywhere/app/AlertDialog;",
            ">;)",
            "Lorg/holoeverywhere/app/AlertDialog$Builder;"
        }
    .end annotation

    .prologue
    .line 94
    .local p1, "clazz":Ljava/lang/Class;, "Ljava/lang/Class<+Lorg/holoeverywhere/app/AlertDialog;>;"
    iput-object p1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mDialogClass:Ljava/lang/Class;

    .line 95
    return-object p0
.end method

.method public setBlockDismiss(Z)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "blockDismiss"    # Z

    .prologue
    .line 99
    if-eqz p1, :cond_0

    const/4 v0, 0x0

    :goto_0
    invoke-virtual {p0, v0}, Lorg/holoeverywhere/app/AlertDialog$Builder;->setButtonBehavior(I)Lorg/holoeverywhere/app/AlertDialog$Builder;

    move-result-object v0

    return-object v0

    :cond_0
    const/4 v0, 0x7

    goto :goto_0
.end method

.method public setButtonBehavior(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "buttonBehavior"    # I

    .prologue
    .line 103
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mButtonBehavior:I

    .line 104
    return-object p0
.end method

.method public setCancelable(Z)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "cancelable"    # Z

    .prologue
    .line 108
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-boolean p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCancelable:Z

    .line 109
    return-object p0
.end method

.method public setCheckedItem(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "checkedItem"    # I

    .prologue
    .line 113
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCheckedItem:I

    .line 114
    return-object p0
.end method

.method public setCursor(Landroid/database/Cursor;Landroid/content/DialogInterface$OnClickListener;Ljava/lang/String;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "cursor"    # Landroid/database/Cursor;
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;
    .param p3, "labelColumn"    # Ljava/lang/String;

    .prologue
    .line 119
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;

    .line 120
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mLabelColumn:Ljava/lang/String;

    .line 121
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;

    .line 122
    return-object p0
.end method

.method public setCustomTitle(Landroid/view/View;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "customTitleView"    # Landroid/view/View;

    .prologue
    .line 126
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCustomTitleView:Landroid/view/View;

    .line 127
    return-object p0
.end method

.method public setIcon(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "iconId"    # I

    .prologue
    .line 136
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIconId:I

    .line 137
    return-object p0
.end method

.method public setIcon(Landroid/graphics/drawable/Drawable;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "icon"    # Landroid/graphics/drawable/Drawable;

    .prologue
    .line 131
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIcon:Landroid/graphics/drawable/Drawable;

    .line 132
    return-object p0
.end method

.method public setIconAttribute(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 3
    .param p1, "attrId"    # I

    .prologue
    .line 141
    new-instance v0, Landroid/util/TypedValue;

    invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V

    .line 142
    .local v0, "out":Landroid/util/TypedValue;
    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v1, p1, v0, v2}, Landroid/content/res/Resources$Theme;->resolveAttribute(ILandroid/util/TypedValue;Z)Z

    .line 143
    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget v2, v0, Landroid/util/TypedValue;->resourceId:I

    iput v2, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIconId:I

    .line 144
    return-object p0
.end method

.method public setInverseBackgroundForced(Z)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "useInverseBackground"    # Z

    .prologue
    .line 148
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-boolean p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mForceInverseBackground:Z

    .line 149
    return-object p0
.end method

.method public setItems(ILandroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "itemsId"    # I
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 160
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1, p1}, Landroid/content/res/Resources;->getTextArray(I)[Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;

    .line 161
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;

    .line 162
    return-object p0
.end method

.method public setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "items"    # [Ljava/lang/CharSequence;
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 154
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;

    .line 155
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;

    .line 156
    return-object p0
.end method

.method public setMessage(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "messageId"    # I

    .prologue
    .line 171
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1, p1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mMessage:Ljava/lang/CharSequence;

    .line 172
    return-object p0
.end method

.method public setMessage(Ljava/lang/CharSequence;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "message"    # Ljava/lang/CharSequence;

    .prologue
    .line 166
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mMessage:Ljava/lang/CharSequence;

    .line 167
    return-object p0
.end method

.method public setMultiChoiceItems(I[ZLandroid/content/DialogInterface$OnMultiChoiceClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "itemsId"    # I
    .param p2, "checkedItems"    # [Z
    .param p3, "listener"    # Landroid/content/DialogInterface$OnMultiChoiceClickListener;

    .prologue
    .line 198
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1, p1}, Landroid/content/res/Resources;->getTextArray(I)[Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;

    .line 199
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnCheckboxClickListener:Landroid/content/DialogInterface$OnMultiChoiceClickListener;

    .line 200
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCheckedItems:[Z

    .line 201
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIsMultiChoice:Z

    .line 202
    return-object p0
.end method

.method public setMultiChoiceItems(Landroid/database/Cursor;Ljava/lang/String;Ljava/lang/String;Landroid/content/DialogInterface$OnMultiChoiceClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "cursor"    # Landroid/database/Cursor;
    .param p2, "isCheckedColumn"    # Ljava/lang/String;
    .param p3, "labelColumn"    # Ljava/lang/String;
    .param p4, "listener"    # Landroid/content/DialogInterface$OnMultiChoiceClickListener;

    .prologue
    .line 188
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;

    .line 189
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p4, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnCheckboxClickListener:Landroid/content/DialogInterface$OnMultiChoiceClickListener;

    .line 190
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIsCheckedColumn:Ljava/lang/String;

    .line 191
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mLabelColumn:Ljava/lang/String;

    .line 192
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIsMultiChoice:Z

    .line 193
    return-object p0
.end method

.method public setMultiChoiceItems([Ljava/lang/CharSequence;[ZLandroid/content/DialogInterface$OnMultiChoiceClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "items"    # [Ljava/lang/CharSequence;
    .param p2, "checkedItems"    # [Z
    .param p3, "listener"    # Landroid/content/DialogInterface$OnMultiChoiceClickListener;

    .prologue
    .line 178
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;

    .line 179
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnCheckboxClickListener:Landroid/content/DialogInterface$OnMultiChoiceClickListener;

    .line 180
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCheckedItems:[Z

    .line 181
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIsMultiChoice:Z

    .line 182
    return-object p0
.end method

.method public setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "textId"    # I
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 214
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1, p1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mNegativeButtonText:Ljava/lang/CharSequence;

    .line 215
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mNegativeButtonListener:Landroid/content/DialogInterface$OnClickListener;

    .line 216
    return-object p0
.end method

.method public setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "text"    # Ljava/lang/CharSequence;
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 207
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mNegativeButtonText:Ljava/lang/CharSequence;

    .line 208
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mNegativeButtonListener:Landroid/content/DialogInterface$OnClickListener;

    .line 209
    return-object p0
.end method

.method public setNeutralButton(ILandroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "textId"    # I
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 228
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1, p1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mNeutralButtonText:Ljava/lang/CharSequence;

    .line 229
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mNeutralButtonListener:Landroid/content/DialogInterface$OnClickListener;

    .line 230
    return-object p0
.end method

.method public setNeutralButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "text"    # Ljava/lang/CharSequence;
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 221
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mNeutralButtonText:Ljava/lang/CharSequence;

    .line 222
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mNeutralButtonListener:Landroid/content/DialogInterface$OnClickListener;

    .line 223
    return-object p0
.end method

.method public setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "onCancelListener"    # Landroid/content/DialogInterface$OnCancelListener;

    .prologue
    .line 234
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnCancelListener:Landroid/content/DialogInterface$OnCancelListener;

    .line 235
    return-object p0
.end method

.method public setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "onDismissListener"    # Landroid/content/DialogInterface$OnDismissListener;

    .prologue
    .line 239
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;

    .line 240
    return-object p0
.end method

.method public setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "listener"    # Landroid/widget/AdapterView$OnItemSelectedListener;

    .prologue
    .line 245
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnItemSelectedListener:Landroid/widget/AdapterView$OnItemSelectedListener;

    .line 246
    return-object p0
.end method

.method public setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "onKeyListener"    # Landroid/content/DialogInterface$OnKeyListener;

    .prologue
    .line 250
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnKeyListener:Landroid/content/DialogInterface$OnKeyListener;

    .line 251
    return-object p0
.end method

.method public setOnPrepareListViewListener(Lorg/holoeverywhere/internal/AlertController$AlertParams$OnPrepareListViewListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "listener"    # Lorg/holoeverywhere/internal/AlertController$AlertParams$OnPrepareListViewListener;

    .prologue
    .line 256
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnPrepareListViewListener:Lorg/holoeverywhere/internal/AlertController$AlertParams$OnPrepareListViewListener;

    .line 257
    return-object p0
.end method

.method public setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "textId"    # I
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 269
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1, p1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mPositiveButtonText:Ljava/lang/CharSequence;

    .line 270
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mPositiveButtonListener:Landroid/content/DialogInterface$OnClickListener;

    .line 271
    return-object p0
.end method

.method public setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "text"    # Ljava/lang/CharSequence;
    .param p2, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 262
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mPositiveButtonText:Ljava/lang/CharSequence;

    .line 263
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mPositiveButtonListener:Landroid/content/DialogInterface$OnClickListener;

    .line 264
    return-object p0
.end method

.method public setSingleChoiceItems(IILandroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "itemsId"    # I
    .param p2, "checkedItem"    # I
    .param p3, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 295
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1, p1}, Landroid/content/res/Resources;->getTextArray(I)[Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;

    .line 296
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;

    .line 297
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCheckedItem:I

    .line 298
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIsSingleChoice:Z

    .line 299
    return-object p0
.end method

.method public setSingleChoiceItems(Landroid/database/Cursor;ILjava/lang/String;Landroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "cursor"    # Landroid/database/Cursor;
    .param p2, "checkedItem"    # I
    .param p3, "labelColumn"    # Ljava/lang/String;
    .param p4, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 285
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCursor:Landroid/database/Cursor;

    .line 286
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p4, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;

    .line 287
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCheckedItem:I

    .line 288
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mLabelColumn:Ljava/lang/String;

    .line 289
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIsSingleChoice:Z

    .line 290
    return-object p0
.end method

.method public setSingleChoiceItems(Landroid/widget/ListAdapter;ILandroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "adapter"    # Landroid/widget/ListAdapter;
    .param p2, "checkedItem"    # I
    .param p3, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 304
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mAdapter:Landroid/widget/ListAdapter;

    .line 305
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;

    .line 306
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCheckedItem:I

    .line 307
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIsSingleChoice:Z

    .line 308
    return-object p0
.end method

.method public setSingleChoiceItems([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "items"    # [Ljava/lang/CharSequence;
    .param p2, "checkedItem"    # I
    .param p3, "listener"    # Landroid/content/DialogInterface$OnClickListener;

    .prologue
    .line 276
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mItems:[Ljava/lang/CharSequence;

    .line 277
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mOnClickListener:Landroid/content/DialogInterface$OnClickListener;

    .line 278
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mCheckedItem:I

    .line 279
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mIsSingleChoice:Z

    .line 280
    return-object p0
.end method

.method public setTheme(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "theme"    # I

    .prologue
    .line 312
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mTheme:I

    .line 313
    return-object p0
.end method

.method public setTitle(I)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "titleId"    # I

    .prologue
    .line 322
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iget-object v1, v1, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mContext:Landroid/content/Context;

    invoke-virtual {v1, p1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mTitle:Ljava/lang/CharSequence;

    .line 323
    return-object p0
.end method

.method public setTitle(Ljava/lang/CharSequence;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 1
    .param p1, "title"    # Ljava/lang/CharSequence;

    .prologue
    .line 317
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mTitle:Ljava/lang/CharSequence;

    .line 318
    return-object p0
.end method

.method public setView(Landroid/view/View;)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "view"    # Landroid/view/View;

    .prologue
    .line 327
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mView:Landroid/view/View;

    .line 328
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x0

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mViewSpacingSpecified:Z

    .line 329
    return-object p0
.end method

.method public setView(Landroid/view/View;IIII)Lorg/holoeverywhere/app/AlertDialog$Builder;
    .locals 2
    .param p1, "view"    # Landroid/view/View;
    .param p2, "viewSpacingLeft"    # I
    .param p3, "viewSpacingTop"    # I
    .param p4, "viewSpacingRight"    # I
    .param p5, "viewSpacingBottom"    # I

    .prologue
    .line 334
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput-object p1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mView:Landroid/view/View;

    .line 335
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mViewSpacingSpecified:Z

    .line 336
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p2, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mViewSpacingLeft:I

    .line 337
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p3, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mViewSpacingTop:I

    .line 338
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p4, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mViewSpacingRight:I

    .line 339
    iget-object v0, p0, Lorg/holoeverywhere/app/AlertDialog$Builder;->mParams:Lorg/holoeverywhere/internal/AlertController$AlertParams;

    iput p5, v0, Lorg/holoeverywhere/internal/AlertController$AlertParams;->mViewSpacingBottom:I

    .line 340
    return-object p0
.end method

.method public show()Lorg/holoeverywhere/app/AlertDialog;
    .locals 1

    .prologue
    .line 344
    invoke-virtual {p0}, Lorg/holoeverywhere/app/AlertDialog$Builder;->create()Lorg/holoeverywhere/app/AlertDialog;

    move-result-object v0

    .line 345
    .local v0, "dialog":Lorg/holoeverywhere/app/AlertDialog;
    invoke-virtual {v0}, Lorg/holoeverywhere/app/AlertDialog;->show()V

    .line 346
    return-object v0
.end method

redpajama_set_name: RedPajamaGithub


text:
# this file expects local_settings.py to be in the same dir, with statsd host and port information:
#
# statsd_host = 'localhost'
# statsd_port = 8125

# Sends statistics to the stats daemon over UDP
class Statsd(object):

    @staticmethod
    def timing(stat, time, sample_rate=1):
        """
        Log timing information
        >>> from python_example import Statsd
        >>> Statsd.timing('some.time', 500)
        """
        stats = {}
        stats[stat] = "%d|ms" % time
        Statsd.send(stats, sample_rate)

    @staticmethod
    def increment(stats, sample_rate=1):
        """
        Increments one or more stats counters
        >>> Statsd.increment('some.int')
        >>> Statsd.increment('some.int',0.5)
        """
        Statsd.update_stats(stats, 1, sample_rate)

    @staticmethod
    def decrement(stats, sample_rate=1):
        """
        Decrements one or more stats counters
        >>> Statsd.decrement('some.int')
        """
        Statsd.update_stats(stats, -1, sample_rate)

    @staticmethod
    def update_stats(stats, delta=1, sampleRate=1):
        """
        Updates one or more stats counters by arbitrary amounts
        >>> Statsd.update_stats('some.int',10)
        """
        if (type(stats) is not list):
            stats = [stats]
        data = {}
        for stat in stats:
            data[stat] = "%s|c" % delta

        Statsd.send(data, sampleRate)

    @staticmethod
    def send(data, sample_rate=1):
        """
        Squirt the metrics over UDP
        """
        try:
            import local_settings as settings
            host = settings.statsd_host
            port = settings.statsd_port
            addr=(host, port)
        except Error:
            exit(1)

        sampled_data = {}

        if(sample_rate < 1):
            import random
            if random.random() <= sample_rate:
                for stat in data.keys():
                    value = data[stat]
                    sampled_data[stat] = "%s|@%s" %(value, sample_rate)
        else:
            sampled_data=data

        from socket import *
        udp_sock = socket(AF_INET, SOCK_DGRAM)
        try:
            for stat in sampled_data.keys():
                value = data[stat]
                send_data = "%s:%s" % (stat, value)
                udp_sock.sendto(send_data, addr)
        except:
            import sys
            from pprint import pprint
            print "Unexpected error:", pprint(sys.exc_info())
            pass # we don't care


text:
js = $(shell find packages -type f -path 'packages/*/src/*.js')

targets = $(subst /src/,/,$(js))
targets-json := $(targets:.js=.json)
targets-css  := $(targets:.js=.css)
targets-less := $(targets:.js=.less)
targets-scss := $(targets:.js=.scss)
targets-scss := $(targets-scss:index.scss=_index.scss)
targets-styl := $(targets:.js=.styl)

targets += $(targets-json)
targets += $(targets-css)
targets += $(targets-less)
targets += $(targets-scss)
targets += $(targets-styl)
targets := $(targets) $(targets:packages/%=packages/webcolors/%)
targets += packages/webcolors/index.js
targets += packages/webcolors/README.md

target-docs += $(wildcard docs/src/images/*.svg)
target-docs += $(wildcard docs/src/*.css)
target-docs += $(wildcard docs/src/*.pug)
target-docs := $(target-docs:docs/src/%=docs/%)
target-docs := $(target-docs:.pug=.html)

deps-docs  = $(wildcard .*rc.js)
deps-docs += $(js)

define mustache=
	npx --no-install mustache $^ > $@
endef

define copy=
	@mkdir -p $(@D)
	cp $< $@
endef

define node=
	@mkdir -p $(@D)
	node $^ > $@
endef

define json-recipe=
$(1): tasks/json.js $(dir $(1))src/$(notdir $(1:.json=.js))
	$$(node)
endef

all: $(targets)

clean:
	rm -rf .cache
	rm -rf $(targets)

docs: $(target-docs)

docs/%.html: docs/src/%.pug $(deps-docs)
	@mkdir -p $(@D)
	doc_dir=$(@D) \
	doc_source=$< \
	doc_output=$@ \
		npx posthtml $< -o $@

docs/%.svg: docs/src/%.svg
	@mkdir -p $(@D)
	npx svgo $< -o $@

docs/styles.css: docs/src/styles.css $(deps-docs)
	@mkdir -p $(@D)
	npx postcss $< -o $@

packages/webcolors/README.md: README.md
	cp $< $@

packages/webcolors/index.js: tasks/index.js templates/index.js.mustache
	$(mustache)

packages/webcolors/%.json: packages/%.json
	$(copy)

packages/webcolors/%.js: packages/%.js
	$(copy)

packages/webcolors/%.css: packages/%.css
	$(copy)

packages/webcolors/%.less: packages/%.less
	$(copy)

packages/webcolors/%.scss: packages/%.scss
	$(copy)

packages/webcolors/%.styl: packages/%.styl
	$(copy)

$(foreach f,$(targets-json),$(eval $(call json-recipe,$(f))))

packages/%.js: .cache/%.json templates/js.mustache
	$(mustache)

packages/%.css: .cache/%.json templates/css.mustache
	$(mustache)

packages/%.less: .cache/%.json templates/less.mustache
	$(mustache)

packages/%/_index.scss: .cache/%/index.json templates/scss.mustache
	$(mustache)

packages/%.scss: .cache/%.json templates/scss.mustache
	$(mustache)

packages/%.styl: .cache/%.json templates/styl.mustache
	$(mustache)

.cache/%.json: tasks/view.js packages/%.json
	$(node)

print-%:
	@echo $($*)

env-%:
	@echo $${$*}

.PHONY: all docs clean


text:
from social.apps.django_app.middleware import SocialAuthExceptionMiddleware
SocialAuthExceptionMiddleware  # placate pyflakes


text:
using UnityEngine;
using System.Collections;

public class FollowPathUnit : MonoBehaviour {

    public bool pathLoop = false;

    public bool reversePath = false;

    public LinePath path;

    private SteeringBasics steeringBasics;
    private FollowPath followPath;

    // Use this for initialization
    void Start () {
        path.calcDistances();

        steeringBasics = GetComponent<SteeringBasics>();
        followPath = GetComponent<FollowPath>();
    }

	// Update is called once per frame
	void Update () {
        path.draw();

        if (reversePath && isAtEndOfPath())
        {
            path.reversePath();
        }

        Vector3 accel = followPath.getSteering(path, pathLoop);

        steeringBasics.steer(accel);
        steeringBasics.lookWhereYoureGoing();
    }

    public bool isAtEndOfPath()
    {
        return Vector3.Distance(path.endNode, transform.position) < followPath.stopRadius;
    }
}


text:
module RuboCop
  # RuboCop Performance project namespace
  module Performance
    PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
    CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
    CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze

    private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)

    ::RuboCop::ConfigObsoletion.files << PROJECT_ROOT.join('config', 'obsoletion.yml')
  end
end


text:
require 'open-uri'
require 'fileutils'

module TwitterCldr
  module Resources
    module Requirements

      class UcaRequirement < UnicodeRequirement
        UNICODE_UCA_URL = "https://unicode.org/Public/UCA/%{version}".freeze

        def url
          UNICODE_UCA_URL
        end
      end

    end
  end
end


text:
#windownbg {
	display: none;
	position: absolute;
	width: 100%;
	height: 100%;
	background: #000;/*body-bg*/
	top: 0;
	left: 0;
	overflow:hidden
}
#windown-box {
	position: fixed;
	_position: absolute;/*For IE 6.0*/
	width:512px;
	background: #FFF;
	text-align: left;

}
#windown-title {
	position: relative;
	height: 30px;
	border: 1px solid #A6C9E1;
	overflow: hidden;
	background: url(./images/bg.png) 0 -150px repeat-x;
}
#windown-title h2 {
	position: relative;
	left: 10px;
	top: 5px;
	font-size: 14px;
	font-weight:bold;
	background: none;
	color: #000000;
}
#windown-close {
	position: absolute;
	right: 10px;
	top: 8px;
	width: 10px;
	height: 16px;
	text-indent: -10em;
	overflow: hidden;
	background: url(./images/icon.png) -820px -720px no-repeat;
	cursor: pointer;
}
#windown-content-border {
	position: relative;
	top: -1px;
	border: 1px solid #A6C9E1;
	padding: 5px 0 5px 5px;
	background: url(./images/bg.png) 0 -380px repeat-x;
}
#windown-content {
	position: relative;
	overflow: auto;
	text-align: center;
}
#windown-content img,#windown-content iframe{
	display: block;
}
#windown-content .loading {
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -8px;
	margin-top: -8px;
}
.tip_box { text-align:left; line-height:23px; overflow:hidden; height:auto;}
.tip_box .title { font-weight:bold; font-size:14px; border-bottom:1px dashed #CCCCCC}
.operate_button{background-color: #F5FBFE;text-align: center;padding: 5px;}
.ajax_login { line-height:25px;height:30px; margin-top:5px; margin-bottom:10px;}


text:
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">

<Configure id="OtherServer" class="org.eclipse.jetty.server.Server">
    <Set name="handler">
        <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
            <Set name="handlers">
                <Array type="org.eclipse.jetty.server.Handler">
                    <Item>
                        <New id="OtherContexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
                    </Item>
                    <Item>
                        <New class="org.eclipse.jetty.server.handler.DefaultHandler"/>
                    </Item>
                </Array>
            </Set>
        </New>
    </Set>

    <Call name="addConnector">
        <Arg>
            <New class="org.eclipse.jetty.server.ServerConnector">
                <Arg name="server"><Ref refid="OtherServer" /></Arg>
                <Set name="port">9876</Set>
            </New>
        </Arg>
    </Call>

</Configure>


text:
<?php

final class PhabricatorWorkerTriggerQuery
  extends PhabricatorPolicyAwareQuery {

  // NOTE: This is a PolicyAware query so it can work with other infrastructure
  // like handles; triggers themselves are low-level and do not have
  // meaningful policies.

  const ORDER_ID = 'id';
  const ORDER_EXECUTION = 'execution';
  const ORDER_VERSION = 'version';

  private $ids;
  private $phids;
  private $versionMin;
  private $versionMax;
  private $nextEpochMin;
  private $nextEpochMax;

  private $needEvents;
  private $order = self::ORDER_ID;

  public function getQueryApplicationClass() {
    return null;
  }

  public function withIDs(array $ids) {
    $this->ids = $ids;
    return $this;
  }

  public function withPHIDs(array $phids) {
    $this->phids = $phids;
    return $this;
  }

  public function withVersionBetween($min, $max) {
    $this->versionMin = $min;
    $this->versionMax = $max;
    return $this;
  }

  public function withNextEventBetween($min, $max) {
    $this->nextEpochMin = $min;
    $this->nextEpochMax = $max;
    return $this;
  }

  public function needEvents($need_events) {
    $this->needEvents = $need_events;
    return $this;
  }

  /**
   * Set the result order.
   *
   * Note that using `ORDER_EXECUTION` will also filter results to include only
   * triggers which have been scheduled to execute. You should not use this
   * ordering when querying for specific triggers, e.g. by ID or PHID.
   *
   * @param const Result order.
   * @return this
   */
  public function setOrder($order) {
    $this->order = $order;
    return $this;
  }

  protected function nextPage(array $page) {
    // NOTE: We don't implement paging because we don't currently ever need
    // it and paging ORDER_EXECUTION is a hassle.
    throw new PhutilMethodNotImplementedException();
  }

  protected function loadPage() {
    $task_table = new PhabricatorWorkerTrigger();

    $conn_r = $task_table->establishConnection('r');

    $rows = queryfx_all(
      $conn_r,
      'SELECT t.* FROM %T t %Q %Q %Q %Q',
      $task_table->getTableName(),
      $this->buildJoinClause($conn_r),
      $this->buildWhereClause($conn_r),
      $this->buildOrderClause($conn_r),
      $this->buildLimitClause($conn_r));

    $triggers = $task_table->loadAllFromArray($rows);

    if ($triggers) {
      if ($this->needEvents) {
        $ids = mpull($triggers, 'getID');

        $events = id(new PhabricatorWorkerTriggerEvent())->loadAllWhere(
          'triggerID IN (%Ld)',
          $ids);
        $events = mpull($events, null, 'getTriggerID');

        foreach ($triggers as $key => $trigger) {
          $event = idx($events, $trigger->getID());
          $trigger->attachEvent($event);
        }
      }

      foreach ($triggers as $key => $trigger) {
        $clock_class = $trigger->getClockClass();
        if (!is_subclass_of($clock_class, 'PhabricatorTriggerClock')) {
          unset($triggers[$key]);
          continue;
        }

        try {
          $argv = array($trigger->getClockProperties());
          $clock = newv($clock_class, $argv);
        } catch (Exception $ex) {
          unset($triggers[$key]);
          continue;
        }

        $trigger->attachClock($clock);
      }

      foreach ($triggers as $key => $trigger) {
        $action_class = $trigger->getActionClass();
        if (!is_subclass_of($action_class, 'PhabricatorTriggerAction')) {
          unset($triggers[$key]);
          continue;
        }

        try {
          $argv = array($trigger->getActionProperties());
          $action = newv($action_class, $argv);
        } catch (Exception $ex) {
          unset($triggers[$key]);
          continue;
        }

        $trigger->attachAction($action);
      }
    }

    return $triggers;
  }

  protected function buildJoinClause(AphrontDatabaseConnection $conn_r) {
    $joins = array();

    if (($this->nextEpochMin !== null) ||
        ($this->nextEpochMax !== null) ||
        ($this->order == self::ORDER_EXECUTION)) {
      $joins[] = qsprintf(
        $conn_r,
        'JOIN %T e ON e.triggerID = t.id',
        id(new PhabricatorWorkerTriggerEvent())->getTableName());
    }

    return implode(' ', $joins);
  }

  protected function buildWhereClause(AphrontDatabaseConnection $conn_r) {
    $where = array();

    if ($this->ids !== null) {
      $where[] = qsprintf(
        $conn_r,
        't.id IN (%Ld)',
        $this->ids);
    }

    if ($this->phids !== null) {
      $where[] = qsprintf(
        $conn_r,
        't.phid IN (%Ls)',
        $this->phids);
    }

    if ($this->versionMin !== null) {
      $where[] = qsprintf(
        $conn_r,
        't.triggerVersion >= %d',
        $this->versionMin);
    }

    if ($this->versionMax !== null) {
      $where[] = qsprintf(
        $conn_r,
        't.triggerVersion <= %d',
        $this->versionMax);
    }

    if ($this->nextEpochMin !== null) {
      $where[] = qsprintf(
        $conn_r,
        'e.nextEventEpoch >= %d',
        $this->nextEpochMin);
    }

    if ($this->nextEpochMax !== null) {
      $where[] = qsprintf(
        $conn_r,
        'e.nextEventEpoch <= %d',
        $this->nextEpochMax);
    }

    return $this->formatWhereClause($where);
  }

  private function buildOrderClause(AphrontDatabaseConnection $conn_r) {
    switch ($this->order) {
      case self::ORDER_ID:
        return qsprintf(
          $conn_r,
          'ORDER BY id DESC');
      case self::ORDER_EXECUTION:
        return qsprintf(
          $conn_r,
          'ORDER BY e.nextEventEpoch ASC, e.id ASC');
      case self::ORDER_VERSION:
        return qsprintf(
          $conn_r,
          'ORDER BY t.triggerVersion ASC');
      default:
        throw new Exception(
          pht(
            'Unsupported order "%s".',
            $this->order));
    }
  }

}


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<meta http-equiv="x-ua-compatible" content="ie=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<title>skinview3d</title>

	<canvas id="skin_container"></canvas>

		<button id="reset_all" type="button" class="control">Reset All</button>

Viewport

				Width: <input id="canvas_width" type="number" value="300" size="4">
				Height: <input id="canvas_height" type="number" value="300" size="4">

				FOV: <input id="fov" type="number" value="70" step="1" min="1" max="179" size="2">
				Zoom: <input id="zoom" type="number" value="0.90" step="0.01" min="0.01" max="2.00" size="4">

Light

			Global: <input id="global_light" type="number" value="0.40" step="0.01" min="0.00" max="2.00" size="4">
			Camera: <input id="camera_light" type="number" value="0.60" step="0.01" min="0.00" max="2.00" size="4">

Animation

			Global Speed: <input id="global_animation_speed" type="number" value="1" step="0.1" size="3">
			<button id="animation_pause_resume" type="button" class="control">Pause / Resume</button>

Rotate

				<input id="rotate_animation" type="checkbox"> Enable
				Speed: <input id="rotate_animation_speed" type="number" value="1" step="0.1" size="3">

Walk / Run / Fly

					<input type="radio" id="primary_animation_none" name="primary_animation" value="" checked> None
					<input type="radio" id="primary_animation_idle" name="primary_animation" value="idle"> Idle
					<input type="radio" id="primary_animation_walk" name="primary_animation" value="walk"> Walk
					<input type="radio" id="primary_animation_run" name="primary_animation" value="run"> Run
					<input type="radio" id="primary_animation_fly" name="primary_animation" value="fly"> Fly

				Speed: <input id="primary_animation_speed" type="number" value="1" step="0.1" size="3">

Mouse Control

				<input type="checkbox" id="control_rotate" checked> Enable Rotate
				<input type="checkbox" id="control_zoom" checked> Enable Zoom
				<input type="checkbox" id="control_pan"> Enable Pan

Skin Layers

						head
						body
						right arm
						left arm
						right leg
						left leg

						inner
						<input type="checkbox" data-layer="innerLayer" data-part="head" checked>
						<input type="checkbox" data-layer="innerLayer" data-part="body" checked>
						<input type="checkbox" data-layer="innerLayer" data-part="rightArm" checked>
						<input type="checkbox" data-layer="innerLayer" data-part="leftArm" checked>
						<input type="checkbox" data-layer="innerLayer" data-part="rightLeg" checked>
						<input type="checkbox" data-layer="innerLayer" data-part="leftLeg" checked>

						outer
						<input type="checkbox" data-layer="outerLayer" data-part="head" checked>
						<input type="checkbox" data-layer="outerLayer" data-part="body" checked>
						<input type="checkbox" data-layer="outerLayer" data-part="rightArm" checked>
						<input type="checkbox" data-layer="outerLayer" data-part="leftArm" checked>
						<input type="checkbox" data-layer="outerLayer" data-part="rightLeg" checked>
						<input type="checkbox" data-layer="outerLayer" data-part="leftLeg" checked>

Back Equipment

					<input type="radio" id="back_equipment_cape" name="back_equipment" value="cape" checked> Cape
					<input type="radio" id="back_equipment_elytra" name="back_equipment" value="elytra"> Elytra

Skin

					URL: <input id="skin_url" type="text" value="img/hatsune_miku.png" placeholder="none" list="default_skins" size="20">
					<datalist id="default_skins">
						<option value="img/1_8_texturemap_redux.png">
						<option value="img/hacksore.png">
						<option value="img/haka.png">
						<option value="img/hatsune_miku.png">
						<option value="img/ironman_hd.png">
						<option value="img/sethbling.png">
						<option value="img/deadmau5.png">
					</datalist>
					<input id="skin_url_upload" type="file" class="hidden" accept="image/*">
					<button id="skin_url_unset" type="button" class="control hidden">Unset</button>
					<button type="button" class="control"
						onclick="document.getElementById('skin_url_upload').click();">Browse...</button>

				Model:
					<select id="skin_model">
						<option value="auto-detect" selected>Auto detect</option>
						<option value="default">Default</option>
						<option value="slim">Slim</option>
					</select>

Cape

				URL: <input id="cape_url" type="text" value="img/mojang_cape.png" placeholder="none" list="default_capes" size="20">
				<datalist id="default_capes">
					<option value="">
					<option value="img/mojang_cape.png">
					<option value="img/legacy_cape.png">
					<option value="img/hd_cape.png">
				</datalist>
				<input id="cape_url_upload" type="file" class="hidden" accept="image/*">
				<button id="cape_url_unset" type="button" class="control hidden">Unset</button>
				<button type="button" class="control"
					onclick="document.getElementById('cape_url_upload').click();">Browse...</button>

Ears

				Source:
					<select id="ears_source">
						<option value="none">None</option>
						<option value="current_skin">Current skin</option>
						<option value="skin">Skin texture</option>
						<option value="standalone">Standalone texture</option>
					</select>

				URL: <input id="ears_url" type="text" value="" placeholder="none" list="default_ears" size="20">
				<datalist id="default_ears">
					<option value="">
					<option value="img/ears.png" data-texture-type="standalone">
					<option value="img/deadmau5.png" data-texture-type="skin">
				</datalist>
				<input id="ears_url_upload" type="file" class="hidden" accept="image/*">
				<button id="ears_url_unset" type="button" class="control hidden">Unset</button>
				<button type="button" class="control"
					onclick="document.getElementById('ears_url_upload').click();">Browse...</button>

Panorama

				URL: <input id="panorama_url" type="text" value="img/panorama.png" placeholder="none" list="default_panorama" size="20">
				<datalist id="default_panorama">
					<option value="">
					<option value="img/panorama.png">
				</datalist>
				<input id="panorama_url_upload" type="file" class="hidden" accept="image/*">
				<button id="panorama_url_unset" type="button" class="control hidden">Unset</button>
				<button type="button" class="control"
					onclick="document.getElementById('panorama_url_upload').click();">Browse...</button>

Other examples

offscreen-render

			GitHub: bs-community/skinview3d


text:
A football manager website https://curtello.github.io/fantasy17

## Authors
[Kenneth Gitere](https://github.com/curtello), [Al Aganya](https://github.com/aganyaal),[Steve Kiarie](https://github.com/stvkre)

### Technologies Used
* HTML5
* CSS3
* JavaScript and jQuery

## Contributing

We welcome pull requests

```
$ git pull remote branch https://github.com/curtello/fantasy17
```


text:
package org.softeg.browser.pageviewcontrol;

import android.content.Context;
import android.os.Bundle;

/*
 * Created by slinkin on 02.10.2014.
 */
public interface IWebViewClientListener {
    void setProgressBarIndeterminateVisibility(boolean b);

    void loadData(String url, int pageNum);

    void postData(String postUrl, Bundle postArgs, String topicPageUrl);

    Context getContext();

    AppWebView getWebView();
}


text:
require 'chef/resource/directory'

class Chef::Resource::Directory
  alias :user :owner
end


text:
#pragma once

#include <vxLib/Allocator/Allocator.h>
#include <vxEngineLib/managed_ptr.h>

class ArrayAllocator : public vx::Allocator
{
	static const u32 s_maxEntrieCount = 128;

	friend class managed_ptr_base;

	struct Entry
	{
		u8* ptr;
		managed_ptr_base* managedPtr;
		u32 size;
		u16 alignment;
		u16 nextFreeEntry;

		Entry() :ptr(nullptr), managedPtr(nullptr), size(0), alignment(0), nextFreeEntry(0){}
	};

	struct DebugCheck
	{
		static const u8 s_magicCleared = 0x31;
		static const u64 s_magicSet = 0x1337b0b;

		u64 magic;
	};

	u8* m_memory;
	u8* m_head;
	u32 m_totalSize;
	u16 m_freeEntries;
	u16 m_firstFreeEntry;
	u32 m_memoryUsed;
	u32 m_update;
	Entry m_entries[s_maxEntrieCount];

	void updateEntries();

	void updateEntry(u32 index, managed_ptr_base* p);

	u32 getEntrySize(u32 index) const;

	void fixHead(u8* p, u32 size);

	u8* allocate(u64 size) override;
	u8* allocate(u64 size, u8 alignment) override;
	void deallocate(u8 *ptr) override;

	managed_ptr_base allocate(u32 size, u8 alignment);

public:
	ArrayAllocator();

	~ArrayAllocator();

	void create(u8* memory, u32 totalSize);

	u8* release();

	template<typename T>
	managed_ptr<T> allocate(u32 size, u8 alignment)
	{
		return managed_ptr<T>(allocate(size, alignment));
	}

	void deallocate(managed_ptr_base* p);

	bool update();

	void update(u32 maxIterations);

	u32 getMemoryUsed() const { return m_memoryUsed; }

	u32 getTotalSize() const override;
	const u8* getMemory() const override;
};


text:
<?php
class CompleteProfileBadge extends Badge{

	protected $title = 'Open Book';
	protected $description = '100% Profile completion';
	protected $ico = 'openbook';

}


text:
<?php

namespace TheSeer\phpDox {

    use TheSeer\fDOM\fDOMDocument;

    /**
     * Class GlobalConfigTest
     *
     * @covers TheSeer\phpDox\GlobalConfig
     * @uses TheSeer\fDom\fDOMDocument
     * @uses TheSeer\phpDox\FileInfo
     * @uses TheSeer\phpDox\Version
     */
    class GlobalConfigTest extends \PHPUnit_Framework_TestCase {

        private $baseDir;

        /**
         * @var FileInfo
         */
        private $fileInfo;

        /**
         * @var fDOMDocument
         */
        private $cfgDom;

        /**
         * @var GlobalConfig
         */
        private $config;

        /**
         * @var Version
         */
        private $version;

        public function __construct($name = NULL, array $data = array(), $dataName = '') {
            parent::__construct($name, $data, $dataName);
            $this->baseDir = realpath(__DIR__ . '/../../data/config') . '/';
        }

        private function init($cfgName) {
            $this->version = new Version('0.0');
            $this->fileInfo = new FileInfo($this->baseDir . $cfgName . '.xml');
            $this->cfgDom = new fDOMDocument();
            $this->cfgDom->load($this->fileInfo->getPathname());
            $this->cfgDom->registerNamespace('cfg', 'http://xml.phpdox.net/config');
            $this->config = new GlobalConfig($this->version, new FileInfo('/tmp'), $this->cfgDom, $this->fileInfo);
        }

        /**
         * @expectedException \TheSeer\phpDox\ConfigException
         * @expectedExceptionCode \TheSeer\phpDox\ConfigException::InvalidDataStructure
         */
        public function testTryingToLoadInvalidConfigThrowsException() {
            $this->init('broken');
        }

        public function testConfigFileCanBeRetrieved() {
            $this->init('empty');
            $this->assertSame(
                $this->fileInfo,
                $this->config->getConfigFile()
            );
        }

        public function testSilentModeDefaultsToFalse() {
            $this->init('empty');
            $this->assertFalse($this->config->isSilentMode());
        }

        public function testSilentModeCanBeEnabled() {
            $this->init('empty');
            $this->cfgDom->documentElement->setAttribute('silent', 'true');
            $this->assertTrue($this->config->isSilentMode());
        }

        public function testSilentModeCanBeDisabled() {
            $this->init('empty');
            $this->cfgDom->documentElement->setAttribute('silent', 'false');
            $this->assertFalse($this->config->isSilentMode());
        }

        /**
         * @uses TheSeer\phpDox\FileInfoCollection
         */
        public function testGetCustomBootstrapFilesReturnsEmptyCollectionByDefault() {
            $this->init('empty');
            $result = $this->config->getCustomBootstrapFiles();
            $this->assertInstanceOf('TheSeer\\phpDox\\FileInfoCollection', $result);
            $this->assertEmpty($result);
        }

        /**
         * @uses TheSeer\phpDox\FileInfoCollection
         */
        public function testCustomBootstrapFilesCanBeRetrieved() {
            $this->init('bootstrap');
            $result = $this->config->getCustomBootstrapFiles();
            $this->assertCount(2, $result);
            $expected = array('/path/to/fileA.php', '/path/to/fileB.php');
            foreach($result as $pos => $entry) {
                $this->assertEquals($expected[$pos], $entry->getPathname());
            }
        }

        /**
         * @uses TheSeer\phpDox\ProjectConfig
         * @uses TheSeer\phpDox\Version
         */
        public function testNamedProjectlistCanBeRetrieved() {
            $this->init('named-projects');
            $results = $this->config->getProjects();
            $this->assertCount(2, $results);
            $this->assertInstanceOf('TheSeer\\phpDox\\ProjectConfig', $results['a']);
            $this->assertInstanceOf('TheSeer\\phpDox\\ProjectConfig', $results['b']);
        }

        /**
         * @uses TheSeer\phpDox\ProjectConfig
         * @uses TheSeer\phpDox\Version
         */
        public function testIndexedProjectListCanBeRetrieved() {
            $this->init('indexed-projects');
            $results = $this->config->getProjects();
            $this->assertCount(2, $results);
            $this->assertInstanceOf('TheSeer\\phpDox\\ProjectConfig', $results[0]);
            $this->assertInstanceOf('TheSeer\\phpDox\\ProjectConfig', $results[1]);
        }

        /**
         * @uses TheSeer\phpDox\ProjectConfig
         * @uses TheSeer\phpDox\Version
         */
            public function testProjectListDoesNotIncludeDisabledProjects() {
            $this->init('disabled-projects');
            $results = $this->config->getProjects();
            $this->assertCount(1, $results);
            $this->assertInstanceOf('TheSeer\\phpDox\\ProjectConfig', $results['a']);
        }

        /**
         * @dataProvider resolverSrcProvider
         * @uses TheSeer\phpDox\ProjectConfig
         * @uses TheSeer\phpDox\Version
         */
        public function testSourceVariableGetsResolvedCorrectly($expected, $file) {
            $this->init('resolver/' .  $file);
            /** @var ProjectConfig[] $projects */
            $projects = $this->config->getProjects();
            $this->assertEquals($expected, current($projects)->getWorkDirectory()->getPathname());
        }

        public function resolverSrcProvider() {
            return array(
                'phpDox.project.source' => array('source','src'),
                'phpDox.project.source[undefined]' => array('src','src-undefined'),
            );
        }

        /**
         * @dataProvider resolverProvider
         * @uses TheSeer\phpDox\ProjectConfig
         * @uses TheSeer\phpDox\Version
         */
        public function testVariablesGetResolvedCorrectly($expected, $file) {
            $this->init('resolver/' .  $file);
            /** @var ProjectConfig[] $projects */
            $projects = $this->config->getProjects();
            $this->assertEquals($expected, current($projects)->getSourceDirectory()->getPathname());
        }

        public function resolverProvider() {
            $version = new Version('0.0');
            return array(
                'basedir' => array( $this->baseDir . 'resolver', 'basedir'),

                'phpDox.home' => array( '/tmp', 'home'),
                'phpDox.file' => array( $this->baseDir . 'resolver/file.xml', 'file'),
                'phpDox.version' => array($version->getVersion(), 'phpdox-version'),

                'multi' => array( '/tmp ' . $version->getVersion(), 'multi'),

                'phpDox.project.name' => array('projectname', 'named'),
                'phpDox.project.name[undefined]' => array('unnamed', 'named-undefined'),

                'phpDox.project.workdir' => array('output','workdir'),
                'phpDox.project.workdir[undefined]' => array('xml','workdir-undefined'),

                'phpDox.php.version' => array(PHP_VERSION, 'php-version'),

                'property-global' => array('propvalue', 'property-global'),
                'property-project' => array('propvalue', 'property-project'),

                'property-recursive' => array($version->getVersion(), 'property-recursive'),
                'property-recursive-recursive' => array( $this->baseDir . 'resolver/xml', 'property-recursive-recursive')
            );
        }

        /**
         * @dataProvider exceptionProvider
         * @uses TheSeer\phpDox\Version
         */
        public function testInvalidPropertyRequestThrowsException($file, $code) {
            $this->init('resolver/' .  $file);
            $this->setExpectedException('TheSeer\\phpDox\\ConfigException', $code);
            $this->config->getProjects();
        }

        public function exceptionProvider() {
            return array(
                'property-internal' => array('property-internal', ConfigException::OverrideNotAllowed),
                'property-overwrite' => array('property-overwrite', ConfigException::OverrideNotAllowed),
                'property-undefined' => array('property-undefined', ConfigException::PropertyNotFound)
            );
        }

    }
}


text:
spark-template
==============

A easy-to-use starter template for Spark using Scala.

To get started, run ```./sbt gen-idea``` for Intellij IDEA or ```./sbt "eclipse with-source=true"```. This will
generate project files for your favorite editor.


text:
'use strict';

module.exports = {
  description: 'Setup necessary files for ember-indexeddb',
  normalizeEntityName() {
    // leave empty for main blueprint run by `ember install ember-indexeddb`
  },
};


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
N. Amer. Fl. (New York) 9(1): 48 (1907)

#### Original name
Favolus striatulus Ellis & Everh., 1897

### Remarks
null


text:
package org.n52.javaps.algorithm.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 *
 * @author tkunicki
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD })
@Inherited
@Documented
public @interface Execute {
}


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

    <net.irext.ircontrol.ui.widget.PullToRefreshListView
            android:id="@+id/lv_operator_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

</LinearLayout>


text:
@CHARSET "UTF-8";

.search_sequence_label {
	font-size: 1.5em;
}

.search_sequence_input {
	width: 50em;
	height: 3.5em;
}

.search_sequence_area {
	margin-bottom: 10px;
}

.search_all_ref_seqs_area {
	margin-top: 5px;
	margin-bottom: 5px;
}

.search_all_ref_seqs_checkbox {
	margin-right: 3px;
}

.search_all_ref_seqs_label {
	font-size: 1em;
}

.search_sequence_matches_row:hover {
	background-color: #000099;
	color: white;
}

.search_sequence_matches_generic_field {
	width: 6.3em;
	margin-right: 0.2em;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 1.6em;
	background-color: inherit;
	display: table-cell;
}

.search_sequence_matches_header {
	margin-bottom: 10px;
}

.search_sequence_matches_field {
	margin-top: 0px;
	margin-bottom: 0px;
	float: left;
	overflow: hidden;
	width: 6em;
}

.search_sequence_tools {
	margin-bottom: 10px;
}

.search_sequence_matches {
	max-height: 25em;
	overflow: auto;
}

.search_sequence_matches_row {
}

.search_sequence_matches_row-firefox {
	display: table-row;
}

.search_sequence_message {
	font-size: 1.6em;
}

.search_sequence {
	font-size: 9px;
}


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace DDay.iCal
{
    /// <summary>
    /// The base class for all iCalendar objects and components.
    /// </summary>
#if !SILVERLIGHT
    [Serializable]
#endif
    public class CalendarObject :
        CalendarObjectBase,
        ICalendarObject
    {
        #region Private Fields

        private ICalendarObject _Parent = null;
        private List<ICalendarObject> _Children;
        private ServiceProvider _ServiceProvider;
        private string _Name;

        private int _Line;
        private int _Column;

        #endregion

        #region Constructors

        internal CalendarObject()
        {
            Initialize();
        }

        public CalendarObject(string name) : this()
        {
            Name = name;
        }

        public CalendarObject(int line, int col) : this()
        {
            Line = line;
            Column = col;
        }

        private void Initialize()
        {
            _Children = new List<ICalendarObject>();
            _ServiceProvider = new ServiceProvider();
        }

        #endregion

        #region Internal Methods

        [OnDeserializing]
        internal void DeserializingInternal(StreamingContext context)
        {
            OnDeserializing(context);
        }

        [OnDeserialized]
        internal void DeserializedInternal(StreamingContext context)
        {
            OnDeserialized(context);
        }

        #endregion

        #region Protected Methods

        virtual protected void OnDeserializing(StreamingContext context)
        {
            Initialize();
        }

        virtual protected void OnDeserialized(StreamingContext context)
        {
        }

        #endregion

        #region Overrides

        public override bool Equals(object obj)
        {
            ICalendarObject o = obj as ICalendarObject;
            if (o != null)
                return object.Equals(o.Name, Name);
            return base.Equals(obj);
        }

        public override int GetHashCode()
        {
            if (Name != null)
                return Name.GetHashCode();
            else return base.GetHashCode();
        }

        public override void CopyFrom(ICopyable c)
        {
            ICalendarObject obj = c as ICalendarObject;
            if (obj != null)
            {
                // Copy the name and basic information
                this.Name = obj.Name;
                this.Parent = obj.Parent;
                this.Line = obj.Line;
                this.Column = obj.Column;

                // Add each child
                foreach (ICalendarObject child in obj.Children)
                    AddChild(child.Copy<ICalendarObject>());
            }
        }

        #endregion

        #region ICalendarObject Members

        public event EventHandler<ObjectEventArgs<ICalendarObject>> ChildAdded;
        public event EventHandler<ObjectEventArgs<ICalendarObject>> ChildRemoved;

        protected void OnChildAdded(ICalendarObject child)
        {
            if (ChildAdded != null)
                ChildAdded(this, new ObjectEventArgs<ICalendarObject>(child));
        }

        protected void OnChildRemoved(ICalendarObject child)
        {
            if (ChildRemoved != null)
                ChildRemoved(this, new ObjectEventArgs<ICalendarObject>(child));
        }

        /// <summary>
        /// Returns the parent <see cref="iCalObject"/> that owns this one.
        /// </summary>
        virtual public ICalendarObject Parent
        {
            get { return _Parent; }
            set { _Parent = value; }
        }

        /// <summary>
        /// A read-only collection of <see cref="iCalObject"/>s that are children
        /// of the current object.
        /// </summary>
        virtual public IList<ICalendarObject> Children
        {
            get { return _Children.AsReadOnly(); }
        }

        /// <summary>
        /// Gets or sets the name of the <see cref="iCalObject"/>.  For iCalendar components,
        /// this is the RFC 5545 name of the component.
        /// <example>
        ///     <list type="bullet">
        ///         <item>Event - "VEVENT"</item>
        ///         <item>Todo - "VTODO"</item>
        ///         <item>TimeZone - "VTIMEZONE"</item>
        ///         <item>etc.</item>
        ///     </list>
        /// </example>
        /// </summary>
        virtual public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        /// <summary>
        /// Returns the <see cref="DDay.iCal.iCalendar"/> that this <see cref="iCalObject"/>
        /// belongs to.
        /// </summary>
        virtual public IICalendar Calendar
        {
            get
            {
                ICalendarObject obj = this;
                while (!(obj is IICalendar) && obj.Parent != null)
                    obj = obj.Parent;

                if (obj is IICalendar)
                    return (IICalendar)obj;
                return null;
            }
            protected set
            {
                _Parent = value;
            }
        }

        virtual public IICalendar iCalendar
        {
            get { return Calendar; }
            protected set { Calendar = value; }
        }

        virtual public int Line
        {
            get { return _Line; }
            set { _Line = value; }
        }

        virtual public int Column
        {
            get { return _Column; }
            set { _Column = value; }
        }

        /// <summary>
        /// Adds an <see cref="iCalObject"/>-based object as a child
        /// of the current object.
        /// </summary>
        /// <param name="child">The <see cref="iCalObject"/>-based object to add.</param>
        virtual public void AddChild(ICalendarObject child)
        {
            child.Parent = this;
            _Children.Add(child);
            OnChildAdded(child);
        }

        /// <summary>
        /// Removed an <see cref="iCalObject"/>-based object from the <see cref="Children"/>
        /// collection.
        /// </summary>
        /// <param name="child"></param>
        virtual public void RemoveChild(ICalendarObject child)
        {
            if (_Children.Contains(child))
            {
                _Children.Remove(child);
                child.Parent = null;
                OnChildRemoved(child);
            }
        }

        /// <summary>
        /// Inserts a child at the given index in the children list.
        /// </summary>
        virtual public void InsertChild(int index, ICalendarObject child)
        {
            _Children.Insert(index, child);
            OnChildAdded(child);
        }

        /// <summary>
        /// Removes a child at the given index in the children list.
        /// </summary>
        /// <param name="index"></param>
        virtual public void RemoveChildAt(int index)
        {
            if (index >= 0 && index < _Children.Count)
            {
                ICalendarObject child = _Children[index];
                _Children.RemoveAt(index);
                OnChildRemoved(child);
            }
        }

        /// <summary>
        /// Clears all children from the object.
        /// </summary>
        virtual public void ClearChildren()
        {
            while (_Children.Count > 0)
                RemoveChildAt(0);
        }

        #endregion

        #region IServiceProvider Members

        virtual public object GetService(Type serviceType)
        {
            return _ServiceProvider.GetService(serviceType);
        }

        virtual public object GetService(string name)
        {
            return _ServiceProvider.GetService(name);
        }

        virtual public T GetService<T>()
        {
            return _ServiceProvider.GetService<T>();
        }

        virtual public T GetService<T>(string name)
        {
            return _ServiceProvider.GetService<T>(name);
        }

        virtual public void SetService(string name, object obj)
        {
            _ServiceProvider.SetService(name, obj);
        }

        virtual public void SetService(object obj)
        {
            _ServiceProvider.SetService(obj);
        }

        virtual public void RemoveService(Type type)
        {
            _ServiceProvider.RemoveService(type);
        }

        virtual public void RemoveService(string name)
        {
            _ServiceProvider.RemoveService(name);
        }

        #endregion

        #region IKeyedObject<string> Members

        public string Key
        {
            get { return Name; }
        }

        #endregion
    }
}