text:
.class public abstract Lcom/android/gallery3d/data/MediaSet;
.super Lcom/android/gallery3d/data/MediaObject;
.source "MediaSet.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/gallery3d/data/MediaSet$MultiSetSyncFuture;,
        Lcom/android/gallery3d/data/MediaSet$ItemConsumer;,
        Lcom/android/gallery3d/data/MediaSet$SyncListener;
    }
.end annotation

# static fields
.field private static final FUTURE_STUB:Lcom/android/gallery3d/util/Future;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/android/gallery3d/util/Future",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

# instance fields
.field private mListeners:Ljava/util/WeakHashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/WeakHashMap",
            "<",
            "Lcom/android/gallery3d/data/ContentListener;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

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

    .prologue
    .line 277
    new-instance v0, Lcom/android/gallery3d/data/MediaSet$1;

    invoke-direct {v0}, Lcom/android/gallery3d/data/MediaSet$1;-><init>()V

    sput-object v0, Lcom/android/gallery3d/data/MediaSet;->FUTURE_STUB:Lcom/android/gallery3d/util/Future;

    return-void
.end method

.method public constructor <init>(Lcom/android/gallery3d/data/Path;J)V
    .locals 1
    .parameter "path"
    .parameter "version"

    .prologue
    .line 59
    invoke-direct {p0, p1, p2, p3}, Lcom/android/gallery3d/data/MediaObject;-><init>(Lcom/android/gallery3d/data/Path;J)V

    .line 175
    new-instance v0, Ljava/util/WeakHashMap;

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

    iput-object v0, p0, Lcom/android/gallery3d/data/MediaSet;->mListeners:Ljava/util/WeakHashMap;

    .line 60
    return-void
.end method

# virtual methods
.method public addContentListener(Lcom/android/gallery3d/data/ContentListener;)V
    .locals 3
    .parameter "listener"

    .prologue
    .line 182
    iget-object v0, p0, Lcom/android/gallery3d/data/MediaSet;->mListeners:Ljava/util/WeakHashMap;

    invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 183
    const-string v0, "MediaSet"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "addContentListener IllegalArgumentException:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/android/gallery3d/data/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 184
    new-instance v0, Ljava/lang/IllegalArgumentException;

    invoke-direct {v0}, Ljava/lang/IllegalArgumentException;-><init>()V

    throw v0

    .line 186
    :cond_0
    iget-object v0, p0, Lcom/android/gallery3d/data/MediaSet;->mListeners:Ljava/util/WeakHashMap;

    const/4 v1, 0x0

    invoke-virtual {v0, p1, v1}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 187
    return-void
.end method

.method protected enumerateMediaItems(Lcom/android/gallery3d/data/MediaSet$ItemConsumer;I)I
    .locals 9
    .parameter "consumer"
    .parameter "startIndex"

    .prologue
    .line 234
    invoke-virtual {p0}, Lcom/android/gallery3d/data/MediaSet;->getMediaItemCount()I

    move-result v6

    .line 235
    .local v6, total:I
    const/4 v5, 0x0

    .line 236
    .local v5, start:I
    :goto_0
    if-ge v5, v6, :cond_1

    .line 237
    const/16 v7, 0x1f4

    sub-int v8, v6, v5

    invoke-static {v7, v8}, Ljava/lang/Math;->min(II)I

    move-result v0

    .line 238
    .local v0, count:I
    invoke-virtual {p0, v5, v0}, Lcom/android/gallery3d/data/MediaSet;->getMediaItem(II)Ljava/util/ArrayList;

    move-result-object v3

    .line 239
    .local v3, items:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/android/gallery3d/data/MediaItem;>;"
    const/4 v1, 0x0

    .local v1, i:I
    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v4

    .local v4, n:I
    :goto_1
    if-ge v1, v4, :cond_0

    .line 240
    invoke-virtual {v3, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/android/gallery3d/data/MediaItem;

    .line 241
    .local v2, item:Lcom/android/gallery3d/data/MediaItem;
    add-int v7, p2, v5

    add-int/2addr v7, v1

    invoke-interface {p1, v7, v2}, Lcom/android/gallery3d/data/MediaSet$ItemConsumer;->consume(ILcom/android/gallery3d/data/MediaItem;)V

    .line 239
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 243
    .end local v2           #item:Lcom/android/gallery3d/data/MediaItem;
    :cond_0
    add-int/2addr v5, v0

    .line 244
    goto :goto_0

    .line 245
    .end local v0           #count:I
    .end local v1           #i:I
    .end local v3           #items:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/android/gallery3d/data/MediaItem;>;"
    .end local v4           #n:I
    :cond_1
    return v6
.end method

.method public enumerateMediaItems(Lcom/android/gallery3d/data/MediaSet$ItemConsumer;)V
    .locals 1
    .parameter "consumer"

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

    invoke-virtual {p0, p1, v0}, Lcom/android/gallery3d/data/MediaSet;->enumerateMediaItems(Lcom/android/gallery3d/data/MediaSet$ItemConsumer;I)I

    .line 220
    return-void
.end method

.method protected enumerateTotalMediaItems(Lcom/android/gallery3d/data/MediaSet$ItemConsumer;I)I
    .locals 5
    .parameter "consumer"
    .parameter "startIndex"

    .prologue
    .line 252
    const/4 v2, 0x0

    .line 253
    .local v2, start:I
    invoke-virtual {p0, p1, p2}, Lcom/android/gallery3d/data/MediaSet;->enumerateMediaItems(Lcom/android/gallery3d/data/MediaSet$ItemConsumer;I)I

    move-result v3

    add-int/2addr v2, v3

    .line 254
    invoke-virtual {p0}, Lcom/android/gallery3d/data/MediaSet;->getSubMediaSetCount()I

    move-result v1

    .line 255
    .local v1, m:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    if-ge v0, v1, :cond_0

    .line 256
    invoke-virtual {p0, v0}, Lcom/android/gallery3d/data/MediaSet;->getSubMediaSet(I)Lcom/android/gallery3d/data/MediaSet;

    move-result-object v3

    add-int v4, p2, v2

    invoke-virtual {v3, p1, v4}, Lcom/android/gallery3d/data/MediaSet;->enumerateTotalMediaItems(Lcom/android/gallery3d/data/MediaSet$ItemConsumer;I)I

    move-result v3

    add-int/2addr v2, v3

    .line 255
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 259
    :cond_0
    return v2
.end method

.method public enumerateTotalMediaItems(Lcom/android/gallery3d/data/MediaSet$ItemConsumer;)V
    .locals 1
    .parameter "consumer"

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

    invoke-virtual {p0, p1, v0}, Lcom/android/gallery3d/data/MediaSet;->enumerateTotalMediaItems(Lcom/android/gallery3d/data/MediaSet$ItemConsumer;I)I

    .line 224
    return-void
.end method

.method public abstract getAlbums()Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/android/gallery3d/data/MediaSet;",
            ">;"
        }
    .end annotation
.end method

.method public abstract getBucketId()I
.end method

.method public getCoverMediaItem()Lcom/android/gallery3d/data/MediaItem;
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 82
    const/4 v4, 0x1

    invoke-virtual {p0, v5, v4}, Lcom/android/gallery3d/data/MediaSet;->getCoverMediaItem(II)Ljava/util/ArrayList;

    move-result-object v2

    .line 83
    .local v2, items:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/android/gallery3d/data/MediaItem;>;"
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-lez v4, :cond_0

    invoke-virtual {v2, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/android/gallery3d/data/MediaItem;

    .line 88
    :goto_0
    return-object v4

    .line 84
    :cond_0
    const/4 v1, 0x0

    .local v1, i:I
    invoke-virtual {p0}, Lcom/android/gallery3d/data/MediaSet;->getSubMediaSetCount()I

    move-result v3

    .local v3, n:I
    :goto_1
    if-ge v1, v3, :cond_2

    .line 85
    invoke-virtual {p0, v1}, Lcom/android/gallery3d/data/MediaSet;->getSubMediaSet(I)Lcom/android/gallery3d/data/MediaSet;

    move-result-object v4

    invoke-virtual {v4}, Lcom/android/gallery3d/data/MediaSet;->getCoverMediaItem()Lcom/android/gallery3d/data/MediaItem;

    move-result-object v0

    .line 86
    .local v0, cover:Lcom/android/gallery3d/data/MediaItem;
    if-eqz v0, :cond_1

    move-object v4, v0

    goto :goto_0

    .line 84
    :cond_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 88
    .end local v0           #cover:Lcom/android/gallery3d/data/MediaItem;
    :cond_2
    const/4 v4, 0x0

    goto :goto_0
.end method

.method public getCoverMediaItem(II)Ljava/util/ArrayList;
    .locals 1
    .parameter "start"
    .parameter "count"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(II)",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/android/gallery3d/data/MediaItem;",
            ">;"
        }
    .end annotation

    .prologue
    .line 78
    new-instance v0, Ljava/util/ArrayList;

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

    return-object v0
.end method

.method public getDetails()Lcom/android/gallery3d/data/MediaDetails;
    .locals 3

    .prologue
    .line 210
    invoke-super {p0}, Lcom/android/gallery3d/data/MediaObject;->getDetails()Lcom/android/gallery3d/data/MediaDetails;

    move-result-object v0

    .line 211
    .local v0, details:Lcom/android/gallery3d/data/MediaDetails;
    const/4 v1, 0x1

    invoke-virtual {p0}, Lcom/android/gallery3d/data/MediaSet;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/android/gallery3d/data/MediaDetails;->addDetail(ILjava/lang/Object;)V

    .line 212
    return-object v0
.end method

.method protected getIndexOf(Lcom/android/gallery3d/data/Path;Ljava/util/ArrayList;)I
    .locals 4
    .parameter "path"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/android/gallery3d/data/Path;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/android/gallery3d/data/MediaItem;",
            ">;)I"
        }
    .end annotation

    .prologue
    .line 157
    .local p2, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/android/gallery3d/data/MediaItem;>;"
    const/4 v0, 0x0

    .local v0, i:I
    invoke-virtual {p2}, Ljava/util/ArrayList;->size()I

    move-result v2

    .local v2, n:I
    :goto_0
    if-ge v0, v2, :cond_1

    .line 159
    invoke-virtual {p2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/android/gallery3d/data/MediaObject;

    .line 160
    .local v1, item:Lcom/android/gallery3d/data/MediaObject;
    if-eqz v1, :cond_0

    iget-object v3, v1, Lcom/android/gallery3d/data/MediaObject;->mPath:Lcom/android/gallery3d/data/Path;

    if-ne v3, p1, :cond_0

    .line 162
    .end local v0           #i:I
    .end local v1           #item:Lcom/android/gallery3d/data/MediaObject;
    :goto_1
    return v0

    .line 157
    .restart local v0       #i:I
    .restart local v1       #item:Lcom/android/gallery3d/data/MediaObject;
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 162
    .end local v1           #item:Lcom/android/gallery3d/data/MediaObject;
    :cond_1
    const/4 v0, -0x1

    goto :goto_1
.end method

.method public getIndexOfItem(Lcom/android/gallery3d/data/Path;I)I
    .locals 7
    .parameter "path"
    .parameter "hint"

    .prologue
    const/4 v4, 0x0

    const/4 v5, -0x1

    const/16 v3, 0x1f4

    .line 137
    add-int/lit16 v6, p2, -0xfa

    invoke-static {v4, v6}, Ljava/lang/Math;->max(II)I

    move-result v2

    .line 139
    .local v2, start:I
    invoke-virtual {p0, v2, v3}, Lcom/android/gallery3d/data/MediaSet;->getMediaItem(II)Ljava/util/ArrayList;

    move-result-object v1

    .line 141
    .local v1, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/android/gallery3d/data/MediaItem;>;"
    invoke-virtual {p0, p1, v1}, Lcom/android/gallery3d/data/MediaSet;->getIndexOf(Lcom/android/gallery3d/data/Path;Ljava/util/ArrayList;)I

    move-result v0

    .line 142
    .local v0, index:I
    if-eq v0, v5, :cond_0

    add-int v3, v2, v0

    .line 150
    :goto_0
    return v3

    .line 145
    :cond_0
    if-nez v2, :cond_1

    move v2, v3

    .line 146
    :goto_1
    invoke-virtual {p0, v2, v3}, Lcom/android/gallery3d/data/MediaSet;->getMediaItem(II)Ljava/util/ArrayList;

    move-result-object v1

    .line 148
    :goto_2
    invoke-virtual {p0, p1, v1}, Lcom/android/gallery3d/data/MediaSet;->getIndexOf(Lcom/android/gallery3d/data/Path;Ljava/util/ArrayList;)I

    move-result v0

    .line 149
    if-eq v0, v5, :cond_2

    add-int v3, v2, v0

    goto :goto_0

    :cond_1
    move v2, v4

    .line 145
    goto :goto_1

    .line 150
    :cond_2
    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-ge v4, v3, :cond_3

    move v3, v5

    goto :goto_0

    .line 151
    :cond_3
    add-int/lit16 v2, v2, 0x1f4

    .line 152
    invoke-virtual {p0, v2, v3}, Lcom/android/gallery3d/data/MediaSet;->getMediaItem(II)Ljava/util/ArrayList;

    move-result-object v1

    goto :goto_2
.end method

.method public getMediaItem(II)Ljava/util/ArrayList;
    .locals 1
    .parameter "start"
    .parameter "count"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(II)",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/android/gallery3d/data/MediaItem;",
            ">;"
        }
    .end annotation

    .prologue
    .line 74
    new-instance v0, Ljava/util/ArrayList;

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

    return-object v0
.end method

.method public getMediaItemCount()I
    .locals 1

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

    return v0
.end method

.method public abstract getName()Ljava/lang/String;
.end method

.method public getNewAlbumCount()I
    .locals 1

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

    return v0
.end method

.method public getSubMediaSet(I)Lcom/android/gallery3d/data/MediaSet;
    .locals 1
    .parameter "index"

    .prologue
    .line 102
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0
.end method

.method public getSubMediaSetCount()I
    .locals 1

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

    return v0
.end method

.method public getTotalMediaItemCount()I
    .locals 4

    .prologue
    .line 126
    invoke-virtual {p0}, Lcom/android/gallery3d/data/MediaSet;->getMediaItemCount()I

    move-result v2

    .line 127
    .local v2, total:I
    const/4 v0, 0x0

    .local v0, i:I
    invoke-virtual {p0}, Lcom/android/gallery3d/data/MediaSet;->getSubMediaSetCount()I

    move-result v1

    .local v1, n:I
    :goto_0
    if-ge v0, v1, :cond_0

    .line 128
    invoke-virtual {p0, v0}, Lcom/android/gallery3d/data/MediaSet;->getSubMediaSet(I)Lcom/android/gallery3d/data/MediaSet;

    move-result-object v3

    invoke-virtual {v3}, Lcom/android/gallery3d/data/MediaSet;->getTotalMediaItemCount()I

    move-result v3

    add-int/2addr v2, v3

    .line 127
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 130
    :cond_0
    return v2
.end method

.method public isCameraRoll()Z
    .locals 1

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

    return v0
.end method

.method public isLeafAlbum()Z
    .locals 1

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

    return v0
.end method

.method public isLoading()Z
    .locals 1

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

    return v0
.end method

.method public notifyContentChanged()V
    .locals 3

    .prologue
    .line 199
    iget-object v2, p0, Lcom/android/gallery3d/data/MediaSet;->mListeners:Ljava/util/WeakHashMap;

    invoke-virtual {v2}, Ljava/util/WeakHashMap;->keySet()Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/android/gallery3d/data/ContentListener;

    .line 200
    .local v1, listener:Lcom/android/gallery3d/data/ContentListener;
    invoke-interface {v1}, Lcom/android/gallery3d/data/ContentListener;->onContentDirty()V

    goto :goto_0

    .line 202
    .end local v1           #listener:Lcom/android/gallery3d/data/ContentListener;
    :cond_0
    return-void
.end method

.method public abstract orderAlbumSets()V
.end method

.method public abstract reload()J
.end method

.method public removeContentListener(Lcom/android/gallery3d/data/ContentListener;)V
    .locals 3
    .parameter "listener"

    .prologue
    .line 190
    iget-object v0, p0, Lcom/android/gallery3d/data/MediaSet;->mListeners:Ljava/util/WeakHashMap;

    invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 191
    const-string v0, "MediaSet"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "removeContentListener IllegalArgumentException:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/android/gallery3d/data/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 192
    new-instance v0, Ljava/lang/IllegalArgumentException;

    invoke-direct {v0}, Ljava/lang/IllegalArgumentException;-><init>()V

    throw v0

    .line 194
    :cond_0
    iget-object v0, p0, Lcom/android/gallery3d/data/MediaSet;->mListeners:Ljava/util/WeakHashMap;

    invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 195
    return-void
.end method

.method public requestSync(Lcom/android/gallery3d/data/MediaSet$SyncListener;)Lcom/android/gallery3d/util/Future;
    .locals 1
    .parameter "listener"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/android/gallery3d/data/MediaSet$SyncListener;",
            ")",
            "Lcom/android/gallery3d/util/Future",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation

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

    invoke-interface {p1, p0, v0}, Lcom/android/gallery3d/data/MediaSet$SyncListener;->onSyncDone(Lcom/android/gallery3d/data/MediaSet;I)V

    .line 274
    sget-object v0, Lcom/android/gallery3d/data/MediaSet;->FUTURE_STUB:Lcom/android/gallery3d/util/Future;

    return-object v0
.end method

.method protected requestSyncOnMultipleSets([Lcom/android/gallery3d/data/MediaSet;Lcom/android/gallery3d/data/MediaSet$SyncListener;)Lcom/android/gallery3d/util/Future;
    .locals 1
    .parameter "sets"
    .parameter "listener"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "([",
            "Lcom/android/gallery3d/data/MediaSet;",
            "Lcom/android/gallery3d/data/MediaSet$SyncListener;",
            ")",
            "Lcom/android/gallery3d/util/Future",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation

    .prologue
    .line 301
    new-instance v0, Lcom/android/gallery3d/data/MediaSet$MultiSetSyncFuture;

    invoke-direct {v0, p0, p1, p2}, Lcom/android/gallery3d/data/MediaSet$MultiSetSyncFuture;-><init>(Lcom/android/gallery3d/data/MediaSet;[Lcom/android/gallery3d/data/MediaSet;Lcom/android/gallery3d/data/MediaSet$SyncListener;)V

    return-object v0
.end method

.method public abstract updateAlbumSets(Ljava/util/ArrayList;)V
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/android/gallery3d/data/MediaSet;",
            ">;)V"
        }
    .end annotation
.end method


text:
  Awesome Elm

  A community driven list of useful Elm tutorials, libraries and software.

 Inspired by the

  awesome

 list thing. Feel free to

  improve

 this list.

 Table of Contents

   Awesome Elm

     Examples

     Learn

     Articles

     Videos

     Podcasts

     Libraries

     Tools

     Editor plugins

     Package managers

     Boilerplates

     Misc

     Support

     Who to follow

   More awesome

   Contribution Guidelines

 Examples

  Some good apps written in Elm.

   Official list

  - Examples from

   basic

  to

   big-project

  in official website.

   Builtwithelm

  - Web site built with elm with list of projects and apps built with Elm.

   Elm Joust

  — a two-player fighting game written in Elm.

   Tetris

  — A Tetris game for the web browser written in Elm.

   Vessel

  - A "tunnel" game written in Elm!

   &#9733 79, pushed 444 days ago

   Sliding Puzzle

  - Configurable sliding puzzle game written in Elm.

   &#9733 43, pushed 295 days ago

   TodoMVC

  - Proper implementation of the TodoMVC app.

   &#9733 391, pushed 129 days ago

   TodoMVC with JSON API

  - Bare-bones, modular, heavily-documented todo app with JSON API persistence.

   TodoMVC/Firebase

  - Fork of TodoMVC demonstrating start-app,

   The Elm Architecture

  and Firebase as backend.

   &#9733 26, pushed 211 days ago

   \
   <elm-ement\>
    – Minimal example of a custom element.
   </elm-ement\><>

   &#9733 13, pushed 396 days ago

   Elm Playground

  - Tiny Elm projects implemented for the sake of learning by example.

   TodoMVC in Electron

  -  Documented and tested implementation of the Elm TodoMVC app in Electron.

   :arrow_up: back to top

 Learn

  Learn what this awesome thing is.

   Official tutorial

  — General information and in-depth guide with examples.

   Elm's Time Traveling Debugger

  - Debugger that lets you travel backwards and forwards in time.

   Architecture Tutorial

  - How to create modular Elm code that scales nicely with your app.

   &#9733 2313, pushed 148 days ago

   Start app

  - Make an app, start it up.

   &#9733 401, pushed 150 days ago

   Elm: Building Reactive Web Apps

  - Learn how to build reactive web apps using Elm.

   Elm: Signals, Mailboxes & Ports

  - Create more reactive Elm apps by mastering signals.

   Learn you an Elm

  - Elm tutorial with exhaustive examples and descriptions.

   Writing native

  - Learn how to create native JavaScript modules for Elm.

   Elm: Functional frontend development

  - Series of articles about fundamentals and advanced topics.

   Elm Tutorial

  - A tutorial on developing single page web applications with Elm.

   Elm cheat sheet

  - Syntax and features overview.

   &#9733 196, pushed 167 days ago

   Learn Elm in Y Minutes

  - Syntax and features overview. The Elm page on

   learnxinyminutes.com

   A Concise Introduction to Elm

  - High overview of language features.

   Elm Maybe - Dealing with null/Nothing

  - Working with the Maybe type, with nicely commented code examples.

   Elm Topic on DailyDrip

  - Daily continuing education on Elm, videos and text, with new content every day.

   Exercism Elm Track

  - Collection of Elm exercises.

   Elm Seeds

  - Short screencasts to teach you the Elm programming language from Erik Person.

   Elm For Begginers - Video Course

  - Build your first Elm Web App.

   :arrow_up: back to top

 Articles

  Read the essentials. Check the official Elm blog:

   elm-lang.org/blog

   Architecture in Elm

  — Ideas and guidelines for architecting larger applications in Elm to be modular and extensible.

   Blazing Fast HTML

  - Virtual DOM in Elm.

   FP with games in Elm

  - Switching from imperative to functional programming with games in Elm.

   Learning FP the hard way

  - Experiences on the Elm language.

   Introduction to Rx

  - The introduction to Reactive Programming you've been missing.

   Elm for Web Developers

  - A collection of notes for web developers looking into moving to Elm.

   &#9733 43, pushed 224 days ago

   Introducing Elm to JS Web Apps

  - An article explaining how to get started with Elm by integrating it with your exisiting Javascript framework

   How Elm Made Our Work Better

  - How a team built a business-critical web app for a customer using Elm.

   Composing Features and Behaviours in the Elm Architecture

  - An article describing how to organize code that follows the Elm architecture into independent features, how to communicate between features, and how to group some of these features together to assemble larger features.

   Elm & Components

  - A blog post describing a possible approach to reducing TEA boilerplate. Useful for component libraries and anyone interested in seeing the amazing things you can do with function types.

   Getting Started with Elm

  - Series of Elm education tutorials.

   Elm & Guarantees

  - a realistic look at where Elm is and isn't superior to other options.

   :arrow_up: back to top

 Videos

  Watch great talks about Elm

   Evan Czaplicki: Let's be mainstream! User focused design in Elm

  - A talk from the father of Elm about the philosophy behind the language.

   Richard Feldman: Make the Back-End Team Jealous: Elm in Production

  - A talk about Elm and initial steps to use it in production.

   Richard Feldman: Effects as Data

  - A talk about how Elm manages side effects.

   Jamison Dance: Rethinking All Practices - Building Applications in Elm

  - A talk given at React.js Conf 2016 about what Elm has to teach the JavaScript world and why JS devs should consider trying it.

   Richard Feldman: Introduction to Elm

  - A talk that gives a broad, high-level introduction to Elm.

   Egghead.io: Elm videos

  - Egghead's Elm video training, many of which are free.

   jadams's training videos

  - A neato series of bite-sized Elm training videos, many of which are free.

   Elm Basics

  - Walk through all the syntax and basic ideas in Elm as a general programming language.

   :arrow_up: back to top

 Podcasts

  Listen to podcasts about Elm

   Elixir Fountain Evan Czaplicki 2016-07-11

  - Elm with Evan Czaplicki.

   Functional Geekery 33

  - Richard Feldman and Tessa Kelly.

   The Changelog 191

  - Elm and Functional Programming with Richard Feldman.

   Software Engineering Daily

  - Elm with Richard Feldman and Srinivas Rao.

   JavaScript Jabber 175

  - Elm with Evan Czaplicki and Richard Feldman.

   Ruby Rogues 212

  - Elm with Richard Feldman and Evan Czaplicki.

   The Web Platform Podcast 15

  - Functional Programming with Elm, ClojureScript, Om, and React.

   The Web Platform Podcast 76

  - The Elm Programming Language.

   Mostly Erlang Podcast 32

  - Elm with Evan Czaplicki.

   :arrow_up: back to top

 Libraries

  Useful helpers to build apps.

   elm-core

  - Elm Core Libraries.

   &#9733 406, pushed 126 days ago

   elm-html

  - Use HTML in Elm, based on the idea of a "virtual DOM".

   elm-test

  - A unit testing framework for Elm.

   &#9733 133, pushed 182 days ago

   elm-router

  - Easy routing in Elm.

   &#9733 65, pushed 286 days ago

   elm-http

  - Make HTTP requests in Elm.

   &#9733 53, pushed 161 days ago

   elm-http-extra

  - Build and handle JSON requests more naturally than with low-level elm-http.

   &#9733 30, pushed 127 days ago

   elm-console

  - Elm library to read and write to the console in Node.

   &#9733 33, pushed 168 days ago

   Lazy

  - Lazy Evaluation in Elm.

   &#9733 17, pushed 182 days ago

   elm-ui

  - UI Library in Elm.

   &#9733 159, pushed 128 days ago

   elm-mdl

  - Material Design component library in Elm. With

   demo

  .

   &#9733 68, pushed 127 days ago

   elmfire

  - Use Firebase as backend. For higher level API:

   elmfire-extra

  .

   &#9733 75, pushed 127 days ago

   :arrow_up: back to top

 Tools

  Tools around Elm platform.

   elm-compiler

  - Compiler for the Elm programming language.

   &#9733 2677, pushed 129 days ago

   elm-make

  - A build tool for Elm projects.

   &#9733 63, pushed 137 days ago

   elm-reactor

  - Interactive development tool that makes it easy to develop and debug Elm programs.

   &#9733 196, pushed 137 days ago

   elm-live

  - A flexible dev server for Elm. Live reload included!

   elm-repl

  - A REPL for Elm.

   &#9733 93, pushed 140 days ago

   elm-package

  - CLI to share Elm libraries.

   &#9733 91, pushed 127 days ago

   elm-init

  - Interactive setup for new Elm projects.

   &#9733 8, pushed 200 days ago

   elm-new

  - Generate initial project scaffolding based on a template.

   elm-format

  - Automatic Elm code formatter adhering to

   Elm Style Guide

  .

   &#9733 193, pushed 131 days ago

   grunt-elm

  - Grunt plugin that compiles Elm files to JavaScript.

   &#9733 13, pushed 197 days ago

   elm-webpack-loader

  - Webpack loader for the Elm programming language.

   &#9733 126, pushed 129 days ago

   servelm

  - A project enabling server-side use of Elm.

   &#9733 86, pushed 195 days ago

   elm-oracle

  - Query for information about values in elm source files. Used by most editor plugins.

   :arrow_up: back to top

 Editor plugins

  Tools to support Elm in code editors.

   atom-linter-elm-make

  - Elm code linter for the Atom editor.

   atom-elm-snippets

  - Elm snippets for Atom.

   &#9733 6, pushed 159 days ago

   atom-language-elm

  - Syntax highlighting and autocompletion for the Atom editor.

   elmjutsu

  - Autocompletion, go to definition, find usages, rename symbol, etc. for the Atom editor.

   emacs-elm-mode

  - Syntax highlighting, Elm REPL, Elm make and Elm format integration for the Emacs editor.

   &#9733 114, pushed 132 days ago

   elm-light-table

  - Syntax highlighting, REPL, autocompletion, package management and much more for Light Table.

   &#9733 41, pushed 161 days ago

   Elm Language Support

  - Syntax highlighting, REPL, autocompletion, and more for Sublime Text 2 and 3.

   Elm-vim

  - Elm mode for vim.

   &#9733 110, pushed 152 days ago

   elm-plugin

  - Elm plugin for IntelliJ IDEA.

   Elm Visual Studio Code Support

  - Syntax highlighting, Snippets, Function information, REPL, Reactor support (Webserver/Debugger) - Starting/Stopping

   :arrow_up: back to top

 Package managers

  Place to share Elm libraries.

   elm-package

  - Command line tool to share Elm libraries.

   :arrow_up: back to top

 Boilerplates

  Good starting point for a new Elm project.

   elm-webpack-starter

  - A simple Webpack setup for writing Elm apps.

   &#9733 142, pushed 181 days ago

   elm-app-boilerplate

  - A fully-featured base project for Elm apps: Webpack, HMR, ES6, JS and Elm tests, Semantic UI, sample code and more.

   &#9733 13, pushed 131 days ago

   :arrow_up: back to top

 Misc

  Everything that you need to see.

   Try Elm

  - Write and compile elm code online!

   404 Elm Street

  - A fun WebGL game built with Elm.

   Debug Elm

  - Debug elm code online.

   Haskell to Elm

  - Collection of examples on places where Elm is different to Haskell, targetted at Elm beginners coming from Haskell backgrounds.

   &#9733 12, pushed 257 days ago

   elmflux

  - Visualization of Elm Signals.

   :arrow_up: back to top

 Support

  Where to find help.

   Mailing list

  - Google discussion group.

   SHARE-ELM

  - Share your code snippets, authorize with github gist.

   Reddit

  - Elm board on reddit.

   IRC

  - Ask questions on elm freenode.

   Slack

  - Elm slack community.

   :arrow_up: back to top

 Who to follow

  Follow for fresh updates for free. Use

   #elmlang

  or

   #elm

  hashtag.

 |

 |

 |

 --- | --- | --- | ---

  Official Elm

 |

  Evan Czaplicki

 |

  Richard Feldman

 |

  Noah Hall

   :arrow_up: back to top

 More awesome

  Discover other amazingly awesome lists.

 Awesome Elm is just a part of awesome thing, get more here:

   awesome

  by

    @sindresorhus

   &#9733 34522, pushed 127 days ago

   awesome-awesomeness

  by

    @bayandin

   &#9733 16107, pushed 132 days ago

   :arrow_up: back to top

 License

 To the extent possible under law,

  @isRuslan

 has waived all copyright and related or neighboring rights to this work.

redpajama_set_name: RedPajamaGithub


text:
package com.baidu.disconf.client.support;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.baidu.disconf.client.common.annotations.DisconfFileItem;
import com.baidu.disconf.client.config.inner.DisInnerConfigAnnotation;
import com.baidu.disconf.client.support.utils.ClassUtils;
import com.baidu.disconf.client.support.utils.ConfigLoaderUtils;

/**
 * 配置导入工具
 *
 * @author liaoqiqi
 * @version 2014-6-6
 */
public final class DisconfAutowareConfig {

    private DisconfAutowareConfig() {

    }

    protected static final Logger LOGGER = LoggerFactory.getLogger(DisconfAutowareConfig.class);

    /**
     * 先用TOMCAT模式进行导入配置文件,若找不到,则用项目目录模式进行导入
     */
    private static Properties getProperties(final String propertyFilePath) throws Exception {

        // 使用全路径的配置文件载入器
        return ConfigLoaderUtils.loadConfig(propertyFilePath);
    }

    /**
     * 使用 system env 进行数据导入, 能识别   DisInnerConfigAnnotation 的标识
     *
     * @Description: auto ware
     */
    public static void autowareConfigWithSystemEnv(final Object obj) throws Exception {

        try {

            Field[] fields = obj.getClass().getDeclaredFields();

            for (Field field : fields) {

                if (field.isAnnotationPresent(DisInnerConfigAnnotation.class)) {

                    if (Modifier.isStatic(field.getModifiers())) {
                        continue;
                    }

                    String name;
                    String value;

                    // disconf使用的配置

                    DisInnerConfigAnnotation config = field.getAnnotation(DisInnerConfigAnnotation.class);
                    name = config.name();

                    // 优先使用 系统参数或命令行导入
                    value = System.getProperty(name);
                    field.setAccessible(true);

                    if (null != value) {

                        try {

                            ClassUtils.setFieldValeByType(field, obj, value);

                        } catch (Exception e) {

                            LOGGER.error(String.format("invalid config: %s", name), e);
                        }

                    }
                }
            }
        } catch (Exception e) {

            throw new Exception("error while autowareConfigWithSystemEnv autowire config file", e);
        }
    }

    /**
     * 自动导入配置数据,能识别 DisconfFileItem 或 DisInnerConfigAnnotation 的标识
     *
     * @Description: auto ware
     */
    private static void autowareConfig(final Object obj, Properties prop) throws Exception {

        if (null == prop || obj == null) {
            throw new Exception("cannot autowareConfig null");
        }

        try {

            Field[] fields = obj.getClass().getDeclaredFields();

            for (Field field : fields) {

                if (field.isAnnotationPresent(DisconfFileItem.class)
                        || field.isAnnotationPresent(DisInnerConfigAnnotation.class)) {

                    if (Modifier.isStatic(field.getModifiers())) {
                        continue;
                    }

                    String name;
                    String value;

                    if (field.isAnnotationPresent(DisconfFileItem.class)) {

                        name = field.getName();
                        value = prop.getProperty(name, null);

                    } else {

                        // disconf使用的配置

                        DisInnerConfigAnnotation config = field.getAnnotation(DisInnerConfigAnnotation.class);
                        name = config.name();

                        String defaultValue = config.defaultValue();
                        value = prop.getProperty(name, defaultValue);

                        // using disconf as prefix to avoid env confusion
                        if (value.equals(defaultValue) && name != null) {
                            if (name.contains("disconf.")) {
                                String newName = name.substring(name.indexOf('.') + 1);
                                value = prop.getProperty(newName, defaultValue);
                            }
                        }
                    }

                    field.setAccessible(true);

                    if (null != value) {

                        try {

                            ClassUtils.setFieldValeByType(field, obj, value);

                        } catch (Exception e) {

                            LOGGER.error(String.format("invalid config: %s", name), e);
                        }
                    }
                }
            }
        } catch (Exception e) {

            throw new Exception("error while autowire config file", e);
        }
    }

    /**
     * 自动导入某个配置文件
     *
     * @throws Exception
     */
    public static void autowareConfig(final Object obj, final String propertyFilePath) throws Exception {

        // 读配置文件
        Properties prop = getProperties(propertyFilePath);
        if (null == prop || obj == null) {
            throw new Exception("cannot autowareConfig " + propertyFilePath);
        }

        autowareConfig(obj, prop);
    }

    /**
     * 自动导入Static配置数据,能识别 DisconfFileItem 或 DisconfFileItem 的标识
     *
     * @Description: auto ware
     */
    private static void autowareStaticConfig(Class<?> cls, Properties prop) throws Exception {

        if (null == prop) {
            throw new Exception("cannot autowareConfig null");
        }

        try {

            Field[] fields = cls.getDeclaredFields();

            for (Field field : fields) {

                if (field.isAnnotationPresent(DisconfFileItem.class)) {

                    if (!Modifier.isStatic(field.getModifiers())) {
                        continue;
                    }

                    field.setAccessible(true);

                    String name = field.getName();
                    Object value = prop.getProperty(name, null);
                    if (value != null) {
                        ClassUtils.setFieldValeByType(field, null, String.valueOf(value));
                    }
                }
            }
        } catch (Exception e) {

            throw new Exception("error while autowire config file", e);
        }
    }

    /**
     * 自动导入配置文件至 static变量
     *
     * @throws Exception
     */
    public static void autowareStaticConfig(Class<?> cls, final String propertyFilePath) throws Exception {

        // 读配置文件
        Properties prop = getProperties(propertyFilePath);
        if (null == prop) {
            throw new Exception("cannot autowareConfig " + propertyFilePath);
        }

        autowareStaticConfig(cls, prop);
    }

}


text:
using System.Collections.Generic;
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.MachineLearning.Models
{
    public partial class ManagedOnlineDeployment : IUtf8JsonSerializable
    {
        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
        {
            writer.WriteStartObject();
            if (Optional.IsDefined(AppInsightsEnabled))
            {
                writer.WritePropertyName("appInsightsEnabled");
                writer.WriteBooleanValue(AppInsightsEnabled.Value);
            }
            if (Optional.IsDefined(EgressPublicNetworkAccess))
            {
                writer.WritePropertyName("egressPublicNetworkAccess");
                writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString());
            }
            writer.WritePropertyName("endpointComputeType");
            writer.WriteStringValue(EndpointComputeType.ToString());
            if (Optional.IsDefined(InstanceType))
            {
                if (InstanceType != null)
                {
                    writer.WritePropertyName("instanceType");
                    writer.WriteStringValue(InstanceType);
                }
                else
                {
                    writer.WriteNull("instanceType");
                }
            }
            if (Optional.IsDefined(LivenessProbe))
            {
                if (LivenessProbe != null)
                {
                    writer.WritePropertyName("livenessProbe");
                    writer.WriteObjectValue(LivenessProbe);
                }
                else
                {
                    writer.WriteNull("livenessProbe");
                }
            }
            if (Optional.IsDefined(Model))
            {
                if (Model != null)
                {
                    writer.WritePropertyName("model");
                    writer.WriteStringValue(Model);
                }
                else
                {
                    writer.WriteNull("model");
                }
            }
            if (Optional.IsDefined(ModelMountPath))
            {
                if (ModelMountPath != null)
                {
                    writer.WritePropertyName("modelMountPath");
                    writer.WriteStringValue(ModelMountPath);
                }
                else
                {
                    writer.WriteNull("modelMountPath");
                }
            }
            if (Optional.IsDefined(ReadinessProbe))
            {
                if (ReadinessProbe != null)
                {
                    writer.WritePropertyName("readinessProbe");
                    writer.WriteObjectValue(ReadinessProbe);
                }
                else
                {
                    writer.WriteNull("readinessProbe");
                }
            }
            if (Optional.IsDefined(RequestSettings))
            {
                if (RequestSettings != null)
                {
                    writer.WritePropertyName("requestSettings");
                    writer.WriteObjectValue(RequestSettings);
                }
                else
                {
                    writer.WriteNull("requestSettings");
                }
            }
            if (Optional.IsDefined(ScaleSettings))
            {
                if (ScaleSettings != null)
                {
                    writer.WritePropertyName("scaleSettings");
                    writer.WriteObjectValue(ScaleSettings);
                }
                else
                {
                    writer.WriteNull("scaleSettings");
                }
            }
            if (Optional.IsDefined(CodeConfiguration))
            {
                if (CodeConfiguration != null)
                {
                    writer.WritePropertyName("codeConfiguration");
                    writer.WriteObjectValue(CodeConfiguration);
                }
                else
                {
                    writer.WriteNull("codeConfiguration");
                }
            }
            if (Optional.IsDefined(Description))
            {
                if (Description != null)
                {
                    writer.WritePropertyName("description");
                    writer.WriteStringValue(Description);
                }
                else
                {
                    writer.WriteNull("description");
                }
            }
            if (Optional.IsDefined(EnvironmentId))
            {
                if (EnvironmentId != null)
                {
                    writer.WritePropertyName("environmentId");
                    writer.WriteStringValue(EnvironmentId);
                }
                else
                {
                    writer.WriteNull("environmentId");
                }
            }
            if (Optional.IsCollectionDefined(EnvironmentVariables))
            {
                if (EnvironmentVariables != null)
                {
                    writer.WritePropertyName("environmentVariables");
                    writer.WriteStartObject();
                    foreach (var item in EnvironmentVariables)
                    {
                        writer.WritePropertyName(item.Key);
                        writer.WriteStringValue(item.Value);
                    }
                    writer.WriteEndObject();
                }
                else
                {
                    writer.WriteNull("environmentVariables");
                }
            }
            if (Optional.IsCollectionDefined(Properties))
            {
                if (Properties != null)
                {
                    writer.WritePropertyName("properties");
                    writer.WriteStartObject();
                    foreach (var item in Properties)
                    {
                        writer.WritePropertyName(item.Key);
                        writer.WriteStringValue(item.Value);
                    }
                    writer.WriteEndObject();
                }
                else
                {
                    writer.WriteNull("properties");
                }
            }
            writer.WriteEndObject();
        }

        internal static ManagedOnlineDeployment DeserializeManagedOnlineDeployment(JsonElement element)
        {
            Optional<bool> appInsightsEnabled = default;
            Optional<EgressPublicNetworkAccessType> egressPublicNetworkAccess = default;
            EndpointComputeType endpointComputeType = default;
            Optional<string> instanceType = default;
            Optional<ProbeSettings> livenessProbe = default;
            Optional<string> model = default;
            Optional<string> modelMountPath = default;
            Optional<DeploymentProvisioningState> provisioningState = default;
            Optional<ProbeSettings> readinessProbe = default;
            Optional<OnlineRequestSettings> requestSettings = default;
            Optional<OnlineScaleSettings> scaleSettings = default;
            Optional<CodeConfiguration> codeConfiguration = default;
            Optional<string> description = default;
            Optional<string> environmentId = default;
            Optional<IDictionary<string, string>> environmentVariables = default;
            Optional<IDictionary<string, string>> properties = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("appInsightsEnabled"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    appInsightsEnabled = property.Value.GetBoolean();
                    continue;
                }
                if (property.NameEquals("egressPublicNetworkAccess"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    egressPublicNetworkAccess = new EgressPublicNetworkAccessType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("endpointComputeType"))
                {
                    endpointComputeType = new EndpointComputeType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("instanceType"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        instanceType = null;
                        continue;
                    }
                    instanceType = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("livenessProbe"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        livenessProbe = null;
                        continue;
                    }
                    livenessProbe = ProbeSettings.DeserializeProbeSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("model"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        model = null;
                        continue;
                    }
                    model = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("modelMountPath"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        modelMountPath = null;
                        continue;
                    }
                    modelMountPath = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("provisioningState"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    provisioningState = new DeploymentProvisioningState(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("readinessProbe"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        readinessProbe = null;
                        continue;
                    }
                    readinessProbe = ProbeSettings.DeserializeProbeSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("requestSettings"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        requestSettings = null;
                        continue;
                    }
                    requestSettings = OnlineRequestSettings.DeserializeOnlineRequestSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("scaleSettings"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        scaleSettings = null;
                        continue;
                    }
                    scaleSettings = OnlineScaleSettings.DeserializeOnlineScaleSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("codeConfiguration"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        codeConfiguration = null;
                        continue;
                    }
                    codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value);
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        description = null;
                        continue;
                    }
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("environmentId"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        environmentId = null;
                        continue;
                    }
                    environmentId = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("environmentVariables"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        environmentVariables = null;
                        continue;
                    }
                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.Value.ValueKind == JsonValueKind.Null)
                        {
                            dictionary.Add(property0.Name, null);
                        }
                        else
                        {
                            dictionary.Add(property0.Name, property0.Value.GetString());
                        }
                    }
                    environmentVariables = dictionary;
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        properties = null;
                        continue;
                    }
                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.Value.ValueKind == JsonValueKind.Null)
                        {
                            dictionary.Add(property0.Name, null);
                        }
                        else
                        {
                            dictionary.Add(property0.Name, property0.Value.GetString());
                        }
                    }
                    properties = dictionary;
                    continue;
                }
            }
            return new ManagedOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value);
        }
    }
}


text:
package org.neo4j.kernel.impl.transaction;

import org.junit.Test;

import org.neo4j.kernel.impl.transaction.log.LogPosition;
import org.neo4j.kernel.impl.transaction.log.TransactionMetadataCache;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;

public class TransactionMetadataCacheTest
{
    @Test
    public void shouldReturnNullWhenMissingATxInTheCache()
    {
        // given
        final TransactionMetadataCache cache = new TransactionMetadataCache( 2, 2 );

        // when
        final TransactionMetadataCache.TransactionMetadata metadata = cache.getTransactionMetadata( 42 );

        // then
        assertNull( metadata );
    }

    @Test
    public void shouldReturnTheTxValueTIfInTheCached()
    {
        // given
        final TransactionMetadataCache cache = new TransactionMetadataCache( 2, 2 );
        final LogPosition position = new LogPosition( 3, 4 );
        final int txId = 42;
        final int masterId = 0;
        final int authorId = 1;
        final int checksum = 2;
        final long timestamp = System.currentTimeMillis();

        // when
        cache.cacheTransactionMetadata( txId, position, masterId, authorId, checksum, timestamp );
        final TransactionMetadataCache.TransactionMetadata metadata = cache.getTransactionMetadata( txId );

        // then
        assertEquals(
                new TransactionMetadataCache.TransactionMetadata( masterId, authorId, position, checksum, timestamp ),
                metadata );
    }

    @Test
    public void shouldThrowWhenCachingATxWithNegativeOffsetPosition()
    {
        // given
        final TransactionMetadataCache cache = new TransactionMetadataCache( 2, 2 );
        final LogPosition position = new LogPosition( 3, -1 );
        final int txId = 42;
        final int masterId = 0;
        final int authorId = 1;
        final int checksum = 2;
        final long timestamp = System.currentTimeMillis();

        // when
        try
        {
            cache.cacheTransactionMetadata( txId, position, masterId, authorId, checksum, timestamp );
            fail();
        } catch (RuntimeException ex) {
            assertEquals( "StartEntry.position is " + position, ex.getMessage() );
        }
    }

    @Test
    public void shouldReturnNegativeNumberWhenThereIsNoHeaderInTheCache()
    {
        // given
        final TransactionMetadataCache cache = new TransactionMetadataCache( 2, 2 );

        // when
        final long logHeader = cache.getLogHeader( 5 );

        // then
        assertEquals( -1, logHeader );
    }

    @Test
    public void shouldReturnTheHeaderIfInTheCache()
    {
        // given
        final TransactionMetadataCache cache = new TransactionMetadataCache( 2, 2 );

        // when
        cache.putHeader( 5, 3 );
        final long logHeader = cache.getLogHeader( 5 );

        // then
        assertEquals( 3, logHeader );
    }

    @Test
    public void shouldClearTheCaches()
    {
        // given
        final TransactionMetadataCache cache = new TransactionMetadataCache( 2, 2 );
        final LogPosition position = new LogPosition( 3, 4 );
        final int txId = 42;
        final int masterId = 0;
        final int authorId = 1;
        final int checksum = 2;
        final long timestamp = System.currentTimeMillis();

        // when
        cache.cacheTransactionMetadata( txId, position, masterId, authorId, checksum, timestamp );
        cache.putHeader( 5, 3 );
        cache.clear();
        final long logHeader = cache.getLogHeader( 5 );
        final TransactionMetadataCache.TransactionMetadata metadata = cache.getTransactionMetadata( txId );

        // then
        assertEquals( -1, logHeader );
        assertNull( metadata );
    }
}


text:
{{'sign_up' | tr}}

      <form class="form" name="form" ng-submit="vm.register(form)" novalidate>

          {{'email' | tr}}

          <input type="email" name="email" class="form-control" ng-model="vm.user.email"
                 required
                 mongoose-error/>

            {{'email_valid' | tr}}

            {{'email_required' | tr}}

            {{ vm.errors.email }}

          {{'password' | tr}}

          <input type="password" name="password" class="form-control" ng-model="vm.user.password"
                 ng-minlength="3"
                 required
                 mongoose-error/>

            {{'pw_min_3_char' | tr}}

            {{ vm.errors.password }}

          {{'sign_up_confirm_pw' | tr}}
          <input type="password" name="confirmPassword" class="form-control" ng-model="vm.user.confirmPassword"
                 match="vm.user.password"
                 ng-minlength="3" required/>

            {{'pw_must_match' | tr}}

          {{'first_name' | tr}}

          <input type="text" name="firstName" class="form-control" ng-model="vm.user.membership.firstName"
                 required/>

            {{'first_name_required' | tr}}

          {{'last_name' | tr}}

          <input type="text" name="lastName" class="form-control" ng-model="vm.user.membership.lastName"
                 required/>

            {{'last_name_required' | tr}}

          {{'address1' | tr}}

          <input type="text" name="address1" class="form-control" ng-model="vm.user.membership.address1"
                 required/>

            {{'address1_required' | tr}}

          {{'zip' | tr}}

          <input type="text" name="zip" class="form-control" ng-model="vm.user.membership.zip"
                 required/>

            {{'zip_required' | tr}}

          {{'city' | tr}}

          <input type="text" name="city" class="form-control" ng-model="vm.user.membership.city"
                 required/>

            {{'city_required' | tr}}

          {{'country' | tr}}

          <input type="text" name="country" class="form-control" ng-model="vm.user.membership.country"
                 required/>

            {{'country_required' | tr}}

           {{'pickup_option' | tr}}

             <input type="hidden" name="defaultPickupOption" ng-model="vm.user.membership.defaultPickupOption" required/>

               <pickup-option-map option="vm.user.membership.defaultPickupOption._id" hoverable="true"></pickup-option-map>

               <button type="button" class="btn btn-primary" uib-dropdown-toggle>{{vm.user.membership.defaultPickupOption.name || ('select_pickup_option' | tr)}}</button>
               <button type="button" class="btn btn-primary" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">

                 Toggle Dropdown
               </button>

{{pickupOption.name}}

                {{'pickup_option_required' | tr}}

          <button class="btn btn-inverse btn-lg btn-register" type="submit">
            {{'sign_up' | tr}}
          </button>

            {{'login' | tr}}

      </form>


text:
<!DOCTYPE html>

    <title>CSS Test: Image shape on a right float</title>
    <link rel="author" title="Zoltan Horvath" href="zoltan@adobe.com"/>
    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-image"/>
    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
    <link rel="match" href="reference/shape-image-002-ref.html"/>
    <meta name="flags" content="ahem image"/>
    <meta name="assert" content="This test verifies that a shape specified as a data uri svg with 70% alpha creates a proper shape, shape-image-threshold is defined to 0.71."/>

        The test passes if you see a solid green square. There should be no red.

        X
        X


text:
import dotenv from 'dotenv';
import koa from 'koa';
import configure from './config';

dotenv.load();

const app = koa();
configure(app);

// run server

const port = process.env.PORT || 5000;
console.log("Running on port", port);
app.listen(port);


text:
namespace AuguryCalendar.Entity
{
    using System;
    using System.Collections.Generic;

    public partial class Account
    {
        public int Id { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public Nullable<int> UserId { get; set; }

        public virtual User User { get; set; }
    }
}


text:
package org.optaplanner.examples.cloudbalancing.app;

import org.optaplanner.core.api.solver.Solver;
import org.optaplanner.core.api.solver.SolverFactory;
import org.optaplanner.examples.cloudbalancing.domain.CloudBalance;
import org.optaplanner.examples.cloudbalancing.persistence.CloudBalancingDao;
import org.optaplanner.examples.cloudbalancing.swingui.CloudBalancingPanel;
import org.optaplanner.examples.common.app.CommonApp;
import org.optaplanner.examples.common.persistence.SolutionDao;
import org.optaplanner.examples.common.swingui.SolutionPanel;

/**
 * For an easy example, look at {@link CloudBalancingHelloWorld} instead.
 */
public class CloudBalancingApp extends CommonApp<CloudBalance> {

    public static final String SOLVER_CONFIG
            = "org/optaplanner/examples/cloudbalancing/solver/cloudBalancingSolverConfig.xml";

    public static void main(String[] args) {
        prepareSwingEnvironment();
        new CloudBalancingApp().init();
    }

    public CloudBalancingApp() {
        super("Cloud balancing",
                "Assign processes to computers.\n\n" +
                "Each computer must have enough hardware to run all of its processes.\n" +
                "Each used computer inflicts a maintenance cost.",
                SOLVER_CONFIG,
                CloudBalancingPanel.LOGO_PATH);
    }

    @Override
    protected Solver<CloudBalance> createSolver() {
        SolverFactory<CloudBalance> solverFactory = SolverFactory.createFromXmlResource(SOLVER_CONFIG);
        return solverFactory.buildSolver();
    }

    @Override
    protected CloudBalancingPanel createSolutionPanel() {
        return new CloudBalancingPanel();
    }

    @Override
    protected SolutionDao createSolutionDao() {
        return new CloudBalancingDao();
    }

}


text:
using System;
using System.Linq;

[Serializable]
public class CardDataList
{
    public CardData[] Cards;
}


text:
class Domain < ActiveRecord::Base
  has_many :domain_admin_roles
  has_many :admins, :through => :domain_admin_roles, :source => :user
  has_many :users
  has_many :classrooms
  has_many :projects, :through => :classrooms
  has_many :org_units

  def imported?
    imported_at.present?
  end

  def to_param
    domain
  end
end


text:
package org.apache.hadoop.hdfs.server.namenode.ha;

import java.io.IOException;
import java.net.URISyntaxException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.hdfs.DFSConfigKeys;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.MiniDFSNNTopology;
import org.apache.hadoop.hdfs.server.blockmanagement.BlockManagerTestUtil;
import org.apache.hadoop.hdfs.server.datanode.DataNode;
import org.apache.hadoop.hdfs.server.datanode.DataNodeTestUtils;
import org.apache.hadoop.hdfs.server.namenode.NameNode;
import org.apache.hadoop.test.MultithreadedTestUtil.RepeatingTestThread;
import org.apache.hadoop.test.MultithreadedTestUtil.TestContext;

/**
 * Utility class to start an HA cluster, and then start threads
 * to periodically fail back and forth, accelerate block deletion
 * processing, etc.
 */
public class HAStressTestHarness {
  Configuration conf;
  private MiniDFSCluster cluster;
  static final int BLOCK_SIZE = 1024;
  TestContext testCtx = new TestContext();

  public HAStressTestHarness() {
    conf = new Configuration();
    conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCK_SIZE);
    conf.setInt(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1);
    conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1);
    // Increase max streams so that we re-replicate quickly.
    conf.setInt(DFSConfigKeys.DFS_NAMENODE_REPLICATION_MAX_STREAMS_KEY, 1000);
  }

  /**
   * Start and return the MiniDFSCluster.
   */
  public MiniDFSCluster startCluster() throws IOException {
    cluster = new MiniDFSCluster.Builder(conf)
      .nnTopology(MiniDFSNNTopology.simpleHATopology())
      .numDataNodes(3)
      .build();
    return cluster;
  }

  /**
   * Return a filesystem with client-failover configured for the
   * cluster.
   */
  public FileSystem getFailoverFs() throws IOException, URISyntaxException {
    return HATestUtil.configureFailoverFs(cluster, conf);
  }

  /**
   * Add a thread which periodically triggers deletion reports,
   * heartbeats, and NN-side block work.
   * @param interval millisecond period on which to run
   */
  public void addReplicationTriggerThread(final int interval) {

    testCtx.addThread(new RepeatingTestThread(testCtx) {

      @Override
      public void doAnAction() throws Exception {
        for (DataNode dn : cluster.getDataNodes()) {
          DataNodeTestUtils.triggerDeletionReport(dn);
          DataNodeTestUtils.triggerHeartbeat(dn);
        }
        for (int i = 0; i < 2; i++) {
          NameNode nn = cluster.getNameNode(i);
          BlockManagerTestUtil.computeAllPendingWork(
              nn.getNamesystem().getBlockManager());
        }
        Thread.sleep(interval);
      }
    });
  }

  /**
   * Add a thread which periodically triggers failover back and forth between
   * the two namenodes.
   */
  public void addFailoverThread(final int msBetweenFailovers) {
    testCtx.addThread(new RepeatingTestThread(testCtx) {

      @Override
      public void doAnAction() throws Exception {
        System.err.println("==============================\n" +
            "Failing over from 0->1\n" +
            "==================================");
        cluster.transitionToStandby(0);
        cluster.transitionToActive(1);

        Thread.sleep(msBetweenFailovers);
        System.err.println("==============================\n" +
            "Failing over from 1->0\n" +
            "==================================");

        cluster.transitionToStandby(1);
        cluster.transitionToActive(0);
        Thread.sleep(msBetweenFailovers);
      }
    });
  }

  /**
   * Start all of the threads which have been added.
   */
  public void startThreads() {
    this.testCtx.startThreads();
  }

  /**
   * Stop threads, propagating any exceptions that might have been thrown.
   */
  public void stopThreads() throws Exception {
    this.testCtx.stop();
  }

  /**
   * Shutdown the minicluster, as well as any of the running threads.
   */
  public void shutdown() throws Exception {
    this.testCtx.stop();
    if (cluster != null) {
      this.cluster.shutdown();
      cluster = null;
    }
  }
}


text:
Public Class GameState

  ' We will store our current game state here
  Private fGameState(8) As Boolean?

  ' We will store our current player here, so we know who's turn it is
  Public Property CurrentPlayer As String

  ' We will use gameActive to pause the game in case of an end scenario
  Public Property IsActive As Boolean

  Public Property GameState(index As Integer) As Boolean?
    Get
      Return fGameState(index)
    End Get
    Set (Value As Boolean?)
      fGameState(index) = Value
    End Set
  End Property

End Class