text:
.class Landroid/wipower/IWipower$Stub$Proxy;
.super Ljava/lang/Object;
.source "IWipower.java"

# interfaces
.implements Landroid/wipower/IWipower;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/wipower/IWipower$Stub;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "Proxy"
.end annotation

# instance fields
.field private mRemote:Landroid/os/IBinder;

# direct methods
.method constructor <init>(Landroid/os/IBinder;)V
    .locals 0
    .param p1, "remote"    # Landroid/os/IBinder;

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

    .line 152
    iput-object p1, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    .line 153
    return-void
.end method

# virtual methods
.method public asBinder()Landroid/os/IBinder;
    .locals 1

    .prologue
    .line 156
    iget-object v0, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    return-object v0
.end method

.method public enableAlert(Z)Z
    .locals 7
    .param p1, "enable"    # Z
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x1

    const/4 v3, 0x0

    .line 250
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 251
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 254
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v4, "android.wipower.IWipower"

    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 255
    if-eqz p1, :cond_0

    move v4, v2

    :goto_0
    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInt(I)V

    .line 256
    iget-object v4, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v5, 0x6

    const/4 v6, 0x0

    invoke-interface {v4, v5, v0, v1, v6}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 257
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 258
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v4

    if-eqz v4, :cond_1

    .line 261
    .local v2, "_result":Z
    :goto_1
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 262
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 264
    return v2

    .end local v2    # "_result":Z
    :cond_0
    move v4, v3

    .line 255
    goto :goto_0

    :cond_1
    move v2, v3

    .line 258
    goto :goto_1

    .line 261
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 262
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method

.method public enableData(Z)Z
    .locals 7
    .param p1, "enable"    # Z
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x1

    const/4 v3, 0x0

    .line 268
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 269
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 272
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v4, "android.wipower.IWipower"

    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 273
    if-eqz p1, :cond_0

    move v4, v2

    :goto_0
    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInt(I)V

    .line 274
    iget-object v4, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v5, 0x7

    const/4 v6, 0x0

    invoke-interface {v4, v5, v0, v1, v6}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 275
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 276
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v4

    if-eqz v4, :cond_1

    .line 279
    .local v2, "_result":Z
    :goto_1
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 280
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 282
    return v2

    .end local v2    # "_result":Z
    :cond_0
    move v4, v3

    .line 273
    goto :goto_0

    :cond_1
    move v2, v3

    .line 276
    goto :goto_1

    .line 279
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 280
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method

.method public enablePowerApply(ZZZ)Z
    .locals 7
    .param p1, "enable"    # Z
    .param p2, "on"    # Z
    .param p3, "time_flag"    # Z
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x1

    const/4 v3, 0x0

    .line 286
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 287
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 290
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v4, "android.wipower.IWipower"

    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 291
    if-eqz p1, :cond_0

    move v4, v2

    :goto_0
    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInt(I)V

    .line 292
    if-eqz p2, :cond_1

    move v4, v2

    :goto_1
    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInt(I)V

    .line 293
    if-eqz p3, :cond_2

    move v4, v2

    :goto_2
    invoke-virtual {v0, v4}, Landroid/os/Parcel;->writeInt(I)V

    .line 294
    iget-object v4, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/16 v5, 0x8

    const/4 v6, 0x0

    invoke-interface {v4, v5, v0, v1, v6}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 295
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 296
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v4

    if-eqz v4, :cond_3

    .line 299
    .local v2, "_result":Z
    :goto_3
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 300
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 302
    return v2

    .end local v2    # "_result":Z
    :cond_0
    move v4, v3

    .line 291
    goto :goto_0

    :cond_1
    move v4, v3

    .line 292
    goto :goto_1

    :cond_2
    move v4, v3

    .line 293
    goto :goto_2

    :cond_3
    move v2, v3

    .line 296
    goto :goto_3

    .line 299
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 300
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method

.method public getCurrentLimit()B
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 233
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 234
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 237
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v3, "android.wipower.IWipower"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 238
    iget-object v3, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x5

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 239
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 240
    invoke-virtual {v1}, Landroid/os/Parcel;->readByte()B
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v2

    .line 243
    .local v2, "_result":B
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 244
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 246
    return v2

    .line 243
    .end local v2    # "_result":B
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 244
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method

.method public getInterfaceDescriptor()Ljava/lang/String;
    .locals 1

    .prologue
    .line 160
    const-string v0, "android.wipower.IWipower"

    return-object v0
.end method

.method public getState()I
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 164
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 165
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 168
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v3, "android.wipower.IWipower"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 169
    iget-object v3, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x1

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 170
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 171
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v2

    .line 174
    .local v2, "_result":I
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 175
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 177
    return v2

    .line 174
    .end local v2    # "_result":I
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 175
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method

.method public registerCallback(Landroid/wipower/IWipowerManagerCallback;)V
    .locals 5
    .param p1, "callback"    # Landroid/wipower/IWipowerManagerCallback;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 306
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 307
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 309
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v2, "android.wipower.IWipower"

    invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 310
    if-eqz p1, :cond_0

    invoke-interface {p1}, Landroid/wipower/IWipowerManagerCallback;->asBinder()Landroid/os/IBinder;

    move-result-object v2

    :goto_0
    invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeStrongBinder(Landroid/os/IBinder;)V

    .line 311
    iget-object v2, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/16 v3, 0x9

    const/4 v4, 0x0

    invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 312
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 315
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 316
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 318
    return-void

    .line 310
    :cond_0
    const/4 v2, 0x0

    goto :goto_0

    .line 315
    :catchall_0
    move-exception v2

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 316
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v2
.end method

.method public setCurrentLimit(B)Z
    .locals 6
    .param p1, "value"    # B
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x0

    .line 215
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 216
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 219
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v3, "android.wipower.IWipower"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 220
    invoke-virtual {v0, p1}, Landroid/os/Parcel;->writeByte(B)V

    .line 221
    iget-object v3, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x4

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 222
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 223
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 226
    .local v2, "_result":Z
    :cond_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 227
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 229
    return v2

    .line 226
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 227
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method

.method public startCharging()Z
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x0

    .line 181
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 182
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 185
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v3, "android.wipower.IWipower"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 186
    iget-object v3, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x2

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 187
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 188
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 191
    .local v2, "_result":Z
    :cond_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 192
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 194
    return v2

    .line 191
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 192
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method

.method public stopCharging()Z
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x0

    .line 198
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 199
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 202
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v3, "android.wipower.IWipower"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 203
    iget-object v3, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x3

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 204
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 205
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 208
    .local v2, "_result":Z
    :cond_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 209
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 211
    return v2

    .line 208
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 209
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v3
.end method

.method public unregisterCallback(Landroid/wipower/IWipowerManagerCallback;)V
    .locals 5
    .param p1, "callback"    # Landroid/wipower/IWipowerManagerCallback;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 321
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 322
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 324
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string v2, "android.wipower.IWipower"

    invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 325
    if-eqz p1, :cond_0

    invoke-interface {p1}, Landroid/wipower/IWipowerManagerCallback;->asBinder()Landroid/os/IBinder;

    move-result-object v2

    :goto_0
    invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeStrongBinder(Landroid/os/IBinder;)V

    .line 326
    iget-object v2, p0, Landroid/wipower/IWipower$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/16 v3, 0xa

    const/4 v4, 0x0

    invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 327
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 330
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 331
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 333
    return-void

    .line 325
    :cond_0
    const/4 v2, 0x0

    goto :goto_0

    .line 330
    :catchall_0
    move-exception v2

    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 331
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    throw v2
.end method


text:
using UnityEditor;
using UnityEngine;
using System.Collections.Generic;
using MORPH3D.COSTUMING;
using MORPH3D;

namespace MORPH3D.EDITORS
{
	[CustomEditor (typeof(M3DCharacterManager))]
	public class M3DCharacterManagerEditor : Editor
	{
		protected M3DCharacterManager data = null;

		protected M3DBlendshapeNames names = null;
		protected string[] namesList = null;

		protected bool showAllBlendShapes = false;
		protected string selectedBlendShape = "";
		protected bool showAllBlendshapesGroups = false;
		protected bool[] showBlendshapeGroups = null;
		protected string[] selectedBlendshapeNames = null;

		protected bool showContentPacks = false;

		protected bool showAllClothing = false;
		protected bool showAllClothingGroups = false;
		protected bool[] showClothingGroups = null;
		protected int selectedClothingName = 0;

		protected bool showAttachmentPoints = false;
		protected bool[] showAttachmentPointsGroups = null;
		protected string[] selectedPropsNames = null;

		protected string selectedNewAttachmentPointName = "";

		protected bool showHair = false;

		public override void OnInspectorGUI()
		{
			#region just_stuff
			serializedObject.Update ();
			if(data == null)
				data = (M3DCharacterManager)target;
			if (names == null){
//				Debug.Log("NAMES SCIRPTZABLE OBJECT NULL IN EDITOR");
				names = (M3DBlendshapeNames)Resources.Load ("M3D_BlendshapesNames");
			}
			#endregion just_stuff

			#region LOD
			float lod;
			lod = EditorGUILayout.Slider("LOD", data.currentLODLevel, 0, 1);
			if(lod != data.currentLODLevel)
			{
				Undo.RecordObject(data, "Change LOD");
				data.setCharacterLODLevel(lod);
				EditorUtility.SetDirty(data);
			}
			EditorGUILayout.Space();
			#endregion LOD

			#region blendshapes
			List<MORPH3D.FOUNDATIONS.CoreBlendshape> shapes = data.GetAllBlendshapes();
			if(shapes.Count  == 0){//this check houldnt be needed. it's now included in the bendshape model itself
				Debug.Log("NO BLEnDSHAPES VIA EDITOR");
				data.InitBlendshapeModel();
				shapes = data.GetAllBlendshapes();
			}

			showAllBlendShapes = EditorGUILayout.Foldout (showAllBlendShapes, "All Blendshapes");
			if(showAllBlendShapes)
			{
				EditorGUI.indentLevel++;

				GUILayout.BeginHorizontal();
				selectedBlendShape = GUILayout.TextField(selectedBlendShape, GUI.skin.FindStyle("ToolbarSeachTextField"));
				if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSeachCancelButton")))
				{
					selectedBlendShape = "";
					GUI.FocusControl(null);
				}
				GUILayout.EndHorizontal();
				EditorGUILayout.Space();
				if (GUILayout.Button("Reset All"))
				{
					Undo.RecordObject(data, "Change Blendshape");
					foreach(MORPH3D.FOUNDATIONS.CoreBlendshape shape in shapes)
						data.SetBlendshapeValue(shape.displayName, 0);
					EditorUtility.SetDirty(data);
				}

				foreach(MORPH3D.FOUNDATIONS.CoreBlendshape shape in shapes)
				{
					if(selectedBlendShape != "" && names.GetLabelFromDisplayName(shape.displayName).IndexOf(selectedBlendShape, System.StringComparison.OrdinalIgnoreCase) < 0)
						continue;

					bool tempLock;
					float temp = DisplayBlendShape(shape, out tempLock);

					if(tempLock != shape.isLocked)
					{
						Undo.RecordObject(data, "Lock Blendshape");
						if(tempLock)
							data.LockBlendshape(shape.displayName);
						else
							data.UnlockBlendshape(shape.displayName);
						EditorUtility.SetDirty(data);
					}
					if(temp != shape.currentValue)
					{
						Undo.RecordObject(data, "Change Blendshape");
						data.SetBlendshapeValue(shape.displayName, temp);
						EditorUtility.SetDirty(data);
					}
				}
				if (GUILayout.Button("Reset All"))
				{
					Undo.RecordObject(data, "Change Blendshape");
					foreach(MORPH3D.FOUNDATIONS.CoreBlendshape shape in shapes)
						data.SetBlendshapeValue(shape.displayName, 0);
					EditorUtility.SetDirty(data);
				}
				EditorGUI.indentLevel--;
			}

			showAllBlendshapesGroups = EditorGUILayout.Foldout (showAllBlendshapesGroups, "Blendshape Groups");
			if(showAllBlendshapesGroups)
			{
				namesList = names.GetAllNames();
				List<MORPH3D.FOUNDATIONS.CoreBlendshapeGroup> groups = data.GetAllBlendshapeGroups();
				if(showBlendshapeGroups == null || showBlendshapeGroups.Length != groups.Count)
					showBlendshapeGroups = new bool[groups.Count];
				if(selectedBlendshapeNames == null || selectedBlendshapeNames.Length != groups.Count)
					selectedBlendshapeNames = new string[groups.Count];

				EditorGUI.indentLevel++;

				int remove = -1;
				for(int i = 0; i < groups.Count; i++)
				{
					showBlendshapeGroups[i] = EditorGUILayout.Foldout (showBlendshapeGroups[i], groups[i].groupName);
					if(showBlendshapeGroups[i])
					{
						string tempName;
						EditorGUI.indentLevel++;
						if(!groups[i].isLocked)
						{
							tempName = EditorGUILayout.TextField("Name", groups[i].groupName);
							if(groups[i].groupName != tempName)
							{
								groups[i].groupName = tempName;
								EditorUtility.SetDirty(data);
							}
						}

						if(groups[i].bsCount > 0)
						{
							float groupVal = EditorGUILayout.Slider("Group Weight", groups[i].groupValue, 0, 100);
							if(groups[i].groupValue != groupVal)
							{
								Undo.RecordObject(data, "Change Group Value");
								data.SetGroupValue(groups[i].groupName, groupVal);
								EditorUtility.SetDirty(data);
							}
							EditorGUILayout.Space();
						}

						List<MORPH3D.FOUNDATIONS.CoreBlendshape> groupShapes = groups[i].GetAllBlendshapes();

						EditorGUILayout.BeginHorizontal();
						GUILayout.FlexibleSpace();
						if (GUILayout.Button("Reset Group", GUILayout.Width(250)))
						{
							Undo.RecordObject(data, "Change Blendshape");
							for(int x = 0; x < groupShapes.Count; x++)
								data.SetBlendshapeValue(groupShapes[x].displayName, 0);
							EditorUtility.SetDirty(data);
						}
						GUILayout.FlexibleSpace();
						EditorGUILayout.EndHorizontal();

						int deleteFromGroup = -1;
						for(int x = 0; x < groupShapes.Count; x++)
						{
							bool tempLock;
							bool delete=false;
							float temp = (groups[i].isLocked) ? DisplayBlendShape(groupShapes[x], out tempLock) : DisplayBlendShape(groupShapes[x], out tempLock, out delete);

							if(delete)
								deleteFromGroup = x;

							if(tempLock != groupShapes[x].isLocked)
							{
								Undo.RecordObject(data, "Lock Blendshape");
								if(tempLock)
									data.LockBlendshape(groupShapes[x].displayName);
								else
									data.UnlockBlendshape(groupShapes[x].displayName);
								EditorUtility.SetDirty(data);
							}
							if(temp != groupShapes[x].currentValue)
							{
								Undo.RecordObject(data, "Change Blendshape");
								data.SetBlendshapeValue(groupShapes[x].displayName, temp);
								EditorUtility.SetDirty(data);
							}
						}
						if(deleteFromGroup >= 0)
						{
							Undo.RecordObject(data, "Delete Blendshape from Group");
							groupShapes.RemoveAt(deleteFromGroup);
							EditorUtility.SetDirty(data);
						}

						if(!groups[i].isLocked)
						{
							if(namesList.Length > 0)
							{
								EditorGUILayout.Space();
								EditorGUILayout.BeginHorizontal();
								EditorGUILayout.LabelField("Add Blendshape:", GUILayout.Width(150));
								EditorGUILayout.LabelField(selectedBlendshapeNames[i], GUILayout.Width(150));
								MORPH3D.FOUNDATIONS.CoreBlendshape tempBlendshape = data.GetBlendshapeByName(names.GetDisplayName(selectedBlendshapeNames[i]));
								if(selectedBlendshapeNames[i] != "" && selectedBlendshapeNames[i] != null && tempBlendshape == null)
									selectedBlendshapeNames[i] = "";
								if(GUILayout.Button("Search"))
								{
									int num = i;
									SearchableWindow.Init(delegate(string newName) { selectedBlendshapeNames[num] = newName; }, namesList);
								}
								if(selectedBlendshapeNames[i] != "" && selectedBlendshapeNames[i] != null && tempBlendshape != null && GUILayout.Button("Add"))
								{
									Undo.RecordObject(data, "Add Blendshape to Group");
									groups[i].AddBlendshapeToGroup(tempBlendshape);
									EditorUtility.SetDirty(data);
									selectedBlendshapeNames[i] = "";
								}
								GUILayout.FlexibleSpace();
								EditorGUILayout.EndHorizontal();
							}

							/*
							EditorGUILayout.Space();
							EditorGUILayout.BeginHorizontal();
							GUILayout.FlexibleSpace();
							selectedBlendshapeName = EditorGUILayout.Popup(selectedBlendshapeName, namesList);
							if(GUILayout.Button("Add Shape", GUILayout.Width(100)))
							{
								MORPH3D.FOUNDATIONS.CoreBlendshape shape = data.GetBlendshapeByName(names.GetDisplayName(namesList[selectedBlendshapeName]));
								if(shape != null && !groups[i].ContainsBlendshape(shape))
								{
									Undo.RecordObject(data, "Add Blendshape to Group");
									groups[i].AddBlendshapeToGroup(shape);
									EditorUtility.SetDirty(data);
									selectedBlendshapeName = 0;
								}
							}
							GUILayout.FlexibleSpace();
							EditorGUILayout.EndHorizontal();
							*/

							EditorGUILayout.Space();
							EditorGUILayout.BeginHorizontal();
							GUILayout.FlexibleSpace();
							if(GUILayout.Button("Delete Group", GUILayout.Width(100)))
								remove = i;
							GUILayout.FlexibleSpace();
							EditorGUILayout.EndHorizontal();
						}
						EditorGUI.indentLevel--;
					}
				}
				if(remove >= 0)
				{
					Undo.RecordObject(data, "Remove Blendshape Group");
					groups.RemoveAt(remove);
					EditorUtility.SetDirty(data);
				}
				EditorGUILayout.Space();
				EditorGUILayout.BeginHorizontal();
				GUILayout.FlexibleSpace();
				if(GUILayout.Button("Add Group", GUILayout.Width(100)))
				{
					Undo.RecordObject(data, "Create Blendshape Group");
					data.AddBlendShapeGroup("New Group");
					EditorUtility.SetDirty(data);
				}
				if(GUILayout.Button("Save to Group", GUILayout.Width(150)))
				{
					List<MORPH3D.FOUNDATIONS.CoreBlendshape> lst = new List<MORPH3D.FOUNDATIONS.CoreBlendshape>();
					foreach(MORPH3D.FOUNDATIONS.CoreBlendshape shape in shapes)
					{
						if(shape.currentValue <= 0)
							continue;
						lst.Add(shape);
					}
					if(lst.Count > 0)
					{
						Undo.RecordObject(data, "Save to Blendshape Group");
						data.AddBlendShapeGroup("New Group", lst);
						EditorUtility.SetDirty(data);
					}
				}
				GUILayout.FlexibleSpace();
				EditorGUILayout.EndHorizontal();
				EditorGUI.indentLevel--;
			}
			EditorGUILayout.Space();
			#endregion blendshapes

			#region contentPacks
			showContentPacks = EditorGUILayout.Foldout (showContentPacks, "Content Packs");
			if(showContentPacks)
			{
				EditorGUI.indentLevel++;
				ContentPack[] allPacks = data.GetAllContentPacks();
				for(int i = 0; i < allPacks.Length; i++)
				{
					EditorGUILayout.BeginHorizontal();
					EditorGUILayout.LabelField(allPacks[i].name);
					if(GUILayout.Button("X"))
					{
						Undo.RecordObject(data, "Remove Bundle");
						data.UnloadContentPackFromFigure(allPacks[i]);
						data.RemoveContentPackFromModel(allPacks[i].RootGameObject, true);
						EditorUtility.SetDirty(data);
					}
					EditorGUILayout.EndHorizontal();
				}
				GameObject tempPack;
				tempPack = (GameObject)EditorGUILayout.ObjectField("New", null, typeof(GameObject), false);
				if(tempPack != null)
				{
					ContentPack packScript = new ContentPack(tempPack);
					Undo.RecordObject(data, "Add Bundle");
					data.AddContentPack(packScript);
					EditorUtility.SetDirty(data);
				}
				EditorGUI.indentLevel--;
			}
			EditorGUILayout.Space();
			#endregion contentPacks

			#region hair
			showHair = EditorGUILayout.Foldout (showHair, "Hair");
			if(showHair)
			{
				EditorGUI.indentLevel++;
				List<MORPH3D.COSTUMING.CIhair> allHair = data.GetAllHairItems();
				foreach(MORPH3D.COSTUMING.CIhair mesh in allHair)
				{
					if(DisplayHair(mesh))
					{
						Undo.RecordObject(data, "Toggle Hair");
						data.SetVisibilityOnHairItem(mesh.displayName, !mesh.isVisible);
						EditorUtility.SetDirty(data);
					}
				}
				EditorGUI.indentLevel--;
			}
			EditorGUILayout.Space();
			#endregion hair

			#region clothing
			showAllClothing = EditorGUILayout.Foldout (showAllClothing, "Clothing");
			if(showAllClothing)
			{
				EditorGUI.indentLevel++;

				List<CIclothing> allClothing = null;
				allClothing = data.GetAllLoadedClothingItems();
				foreach(CIclothing mesh in allClothing)
				{
					bool tempLock;
					bool temp = DisplayClothingMesh(mesh, out tempLock);

					if(tempLock != mesh.isLocked)
					{
						Undo.RecordObject(data, "Lock Clothing");
						if(tempLock)
							data.LockClothingItem(mesh.displayName);
						else
							data.UnlockClothingItem(mesh.displayName);
						EditorUtility.SetDirty(data);
					}

					if(temp)
					{
						Undo.RecordObject(data, "Toggle Clothing");
						data.SetClothingVisibility(mesh.displayName, !mesh.isVisible);
						EditorUtility.SetDirty(data);
					}
				}
				EditorGUI.indentLevel--;
			}
			EditorGUILayout.Space();
			#endregion clothing

			#region props
			CIattachmentPoint[] attachmentPoints = data.GetAllAttachmentPoints();
//			Debug.Log("AP LENGTH:"+attachmentPoints.Length);
			if(showAttachmentPointsGroups == null || showAttachmentPointsGroups.Length != attachmentPoints.Length)
				showAttachmentPointsGroups = new bool[attachmentPoints.Length];
			/*
			if(selectedProps == null || selectedProps.Length != attachmentPoints.Length)
				selectedProps = new int[attachmentPoints.Length];
			*/
			if(selectedPropsNames == null || selectedPropsNames.Length != attachmentPoints.Length)
				selectedPropsNames = new string[attachmentPoints.Length];
			List<CIprop> props = data.GetAllLoadedProps();
			string[] propsNames = new string[]{};
			if(props != null){
				propsNames = new string[props.Count];
			}
			for(int i = 0; i < propsNames.Length; i++)
				propsNames[i] = props[i].displayName;

			showAttachmentPoints = EditorGUILayout.Foldout (showAttachmentPoints, "Attachment Points");
			if(showAttachmentPoints)
			{
				int deleteAttachment = -1;
				EditorGUI.indentLevel++;
				for(int i = 0; i < attachmentPoints.Length; i++)
				{
					EditorGUILayout.BeginHorizontal();
					showAttachmentPointsGroups[i] = EditorGUILayout.Foldout (showAttachmentPointsGroups[i], attachmentPoints[i].attachmentPointName);
					GUILayout.FlexibleSpace();
					if(GUILayout.Button("X", GUILayout.Width(45)))
						deleteAttachment = i;
					GUILayout.FlexibleSpace();
					EditorGUILayout.EndHorizontal();
					if(showAttachmentPointsGroups[i])
					{
						EditorGUI.indentLevel++;
						CIprop[] activeProps = attachmentPoints[i].getAttachmentArray();
						int destroyProp = -1;
						for(int x = 0; x < activeProps.Length; x++)
						{
							if(DisplayProp(activeProps[x]))
								destroyProp = x;
						}
						if(destroyProp >= 0)
						{
							Undo.RecordObject(data, "Destroy Prop");
							data.DetachPropFromAttachmentPoint(activeProps[destroyProp].displayName, attachmentPoints[i].attachmentPointName);
							EditorUtility.SetDirty(data);
						}
//						Debug.Log("GF");
						if(propsNames.Length > 0)
						{
//							Debug.Log("FDFG");
							EditorGUILayout.Space();
							EditorGUILayout.BeginHorizontal();
							EditorGUILayout.LabelField("Add Prop:", GUILayout.Width(150));
							EditorGUILayout.LabelField(selectedPropsNames[i], GUILayout.Width(150));
							if(selectedPropsNames[i] != "" && selectedPropsNames[i] != null && data.GetLoadedPropByName(selectedPropsNames[i]) == null)
								selectedPropsNames[i] = "";
							if(GUILayout.Button("Search"))
							{
								int num = i;
								SearchableWindow.Init(delegate(string newName) { selectedPropsNames[num] = newName; }, propsNames);
							}
							if(selectedPropsNames[i] != "" && selectedPropsNames[i] != null && GUILayout.Button("Add"))
							{
								Undo.RecordObject(data, "Attach Prop");
								data.AttachPropToAttachmentPoint(selectedPropsNames[i], attachmentPoints[i].attachmentPointName);
								EditorUtility.SetDirty(data);
								selectedPropsNames[i] = "";
							}
							GUILayout.FlexibleSpace();
							EditorGUILayout.EndHorizontal();
							/*
							EditorGUILayout.Space();
							EditorGUILayout.BeginHorizontal();
							selectedProps[i] = EditorGUILayout.Popup (selectedProps[i], propsNames, GUILayout.Width(150));
							if(GUILayout.Button("Add"))
							{
								Undo.RecordObject(data, "Attach Prop");
								data.AttachPropToAttachmentPoint(propsNames[selectedProps[i]], attachmentPoints[i].attachmentPointName);
								EditorUtility.SetDirty(data);
								selectedProps[i] = 0;
							}
							GUILayout.FlexibleSpace();
							EditorGUILayout.EndHorizontal();
							*/
						}
						EditorGUILayout.Space();
						EditorGUI.indentLevel--;
					}
				}

				if(deleteAttachment >= 0)
				{
					Undo.RecordObject(attachmentPoints[deleteAttachment], "Delete Attachment Point");
					data.DeleteAttachmentPoint(attachmentPoints[deleteAttachment].attachmentPointName);
				}

				EditorGUILayout.Space();
				EditorGUILayout.BeginHorizontal();
				EditorGUILayout.LabelField("New Point:", GUILayout.Width(150));
				EditorGUILayout.LabelField(selectedNewAttachmentPointName, GUILayout.Width(150));
				Transform tempBone = data.GetBoneByName (selectedNewAttachmentPointName);
				if(selectedNewAttachmentPointName != "" && selectedNewAttachmentPointName != null && tempBone == null)
					selectedNewAttachmentPointName = "";
				if(GUILayout.Button("Search"))
				{
					SearchableWindow.Init(delegate(string newName) { selectedNewAttachmentPointName = newName; }, data.GetAllBonesNames());
				}
				if(selectedNewAttachmentPointName != "" && selectedNewAttachmentPointName != null && tempBone != null && GUILayout.Button("Add"))
				{
					Undo.RecordObject(tempBone.gameObject, "New Attachment Point");
					data.CreateAttachmentPointOnBone(selectedNewAttachmentPointName);
					selectedNewAttachmentPointName = "";
				}
				GUILayout.FlexibleSpace();
				EditorGUILayout.EndHorizontal();

				/*
				EditorGUILayout.Space();
				EditorGUILayout.BeginHorizontal();
				selectedNewAttachmentPointName = EditorGUILayout.TextField("New Point Bone Name", selectedNewAttachmentPointName);
				if(GUILayout.Button("Add") && selectedNewAttachmentPointName != "")
				{
					Transform bone = data.boneService.getBoneByName (selectedNewAttachmentPointName);
					if(bone != null)
					{
						Undo.RecordObject(bone.gameObject, "New Attachment Point");
						data.CreateAttachmentPointOnBone(selectedNewAttachmentPointName);
					}
					selectedNewAttachmentPointName = "";
				}
				EditorGUILayout.EndHorizontal();

				EditorGUILayout.BeginHorizontal();
				selectedNewAttachmentPoint = (GameObject)EditorGUILayout.ObjectField("New Attachemnt Point", selectedNewAttachmentPoint, typeof(GameObject), true);
				if(selectedNewAttachmentPoint != null && !selectedNewAttachmentPoint.activeInHierarchy)
					selectedNewAttachmentPoint = null;
				if(GUILayout.Button("Add") && selectedNewAttachmentPoint != null)
				{
					if(selectedNewAttachmentPoint.GetComponent<CIattachmentPoint>() == null)
					{
						Undo.RecordObject(selectedNewAttachmentPoint, "New Attachment Point");
						data.CreateAttachmentPointFromGameObject(selectedNewAttachmentPoint);
					}
					selectedNewAttachmentPoint = null;
				}
				EditorGUILayout.EndHorizontal();
				*/

				EditorGUI.indentLevel--;
			}
			EditorGUILayout.Space();
			#endregion props
		}

		#region blendshapes_display
		protected float DisplayBlendShape(MORPH3D.FOUNDATIONS.CoreBlendshape shape, out bool lockShape)
		{
			float result;
			EditorGUILayout.BeginHorizontal();

			result = EditorGUILayout.Slider(GetLabelToDisplay(shape), shape.currentValue, 0f, 100f);
			lockShape = EditorGUILayout.Toggle(shape.isLocked);

			EditorGUILayout.EndHorizontal();

			return result;
		}

		protected string GetLabelToDisplay(MORPH3D.FOUNDATIONS.CoreBlendshape shape){
			string name_to_display = names.GetLabelFromDisplayName(shape.displayName);
			if (string.IsNullOrEmpty (name_to_display) == true)
				name_to_display = shape.displayName;
			return name_to_display;
		}

		protected float DisplayBlendShape(MORPH3D.FOUNDATIONS.CoreBlendshape shape, out bool lockShape, out bool delete)
		{
			float result;
			EditorGUILayout.BeginHorizontal();

			string showName = GetLabelToDisplay (shape);//names.GetLabelFromDisplayName (shape.displayName);
			result = EditorGUILayout.Slider((string.IsNullOrEmpty(showName)) ? shape.displayName : showName, shape.currentValue, 0f, 100f);
			lockShape = EditorGUILayout.Toggle(shape.isLocked);
			delete = GUILayout.Button ("X");

			EditorGUILayout.EndHorizontal();

			return result;
		}
		#endregion blendshapes_display

		#region clothing_display
		protected bool DisplayClothingMesh(MORPH3D.COSTUMING.CIclothing mesh, out bool lockItem)
		{
			bool result;
			EditorGUILayout.BeginHorizontal();

			EditorGUILayout.LabelField (mesh.displayName, GUILayout.Width(150));
			if(mesh.isVisible)
				GUILayout.Space (60);
			result = GUILayout.Button ((mesh.isVisible) ? "Disable" : "Enable", GUILayout.Width(60));
			if(!mesh.isVisible)
				GUILayout.Space (60);
			if (mesh.isVisible)
				lockItem = EditorGUILayout.Toggle (mesh.isLocked);
			else
				lockItem = mesh.isLocked;

			EditorGUILayout.EndHorizontal();

			return result;
		}

		#endregion clothing_display

		#region props_display
		protected bool DisplayProp(MORPH3D.COSTUMING.CIprop prop)
		{
			bool result;
			EditorGUILayout.BeginHorizontal();
			EditorGUILayout.LabelField (prop.displayName, GUILayout.Width(180));
			GUILayout.Space (60);
			result = GUILayout.Button ("Disable", GUILayout.Width(60));
			EditorGUILayout.EndHorizontal();

			return result;
		}
		#endregion props_display

		#region hair_display
		protected bool DisplayHair(MORPH3D.COSTUMING.CIhair mesh)
		{
			bool result;
			EditorGUILayout.BeginHorizontal();
			EditorGUILayout.LabelField (mesh.displayName, GUILayout.Width(150));
			if(mesh.isVisible)
				GUILayout.Space (60);
			result = GUILayout.Button ((mesh.isVisible) ? "Disable" : "Enable", GUILayout.Width(60));
			if(!mesh.isVisible)
				GUILayout.Space (60);
			EditorGUILayout.EndHorizontal();

			return result;
		}
		#endregion hair_display
	}
}

redpajama_set_name: RedPajamaGithub


text:
package com.adaptris.core.services.aggregator;

import java.io.InputStream;
import java.util.Collection;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import com.adaptris.annotation.DisplayOrder;
import com.adaptris.annotation.InputFieldDefault;
import com.adaptris.core.AdaptrisMessage;
import com.adaptris.core.CoreException;
import com.adaptris.core.util.ExceptionHelper;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * {@link MessageAggregator} implementation that creates single zip using each message as a file in the zip.
 *
 *

 * Use {@link #setFilenameMetadata(String)} to change the key that contains the filename to be used in the zip,
 * default: filename.
 *

 *
 *
Each message returned by the split needs to set a value of key returned by {@link #getFilenameMetadata()}, if the
 * a value is not set the message will be ignored. If the filenames are not unique an exception will be thrown.

 *
 * @config zip-aggregator
 * @author mwarman
 *
 */
@XStreamAlias("zip-aggregator")
@DisplayOrder(order = {"filenameMetadata", "overwriteMetadata" })
@NoArgsConstructor
public class ZipAggregator extends MessageAggregatorImpl {

  public static final String DEFAULT_FILENAME_METADATA = "filename";

  /**
   * The metadata key that contains the filename to use in the zip file when aggregating.
   *

   * This defaults to {@code 'filename'} if not explicitly configured.
   *

   */
  @InputFieldDefault(value = "filename")
  @Getter
  @Setter
  private String filenameMetadata;

  @Override
  public void joinMessage(AdaptrisMessage msg, Collection<AdaptrisMessage> msgs) throws CoreException {
    aggregate(msg, msgs);
  }

  @Override
  public void aggregate(AdaptrisMessage original, Iterable<AdaptrisMessage> messages)
      throws CoreException {
    try (ZipOutputStream zipOutputStream = new ZipOutputStream(original.getOutputStream())) {
      for (AdaptrisMessage m : messages) {
        if (BooleanUtils.and(new boolean[] {filter(m), m.headersContainsKey(filenameMetadata())})) {
          zipOutputStream.putNextEntry(new ZipEntry(m.getMetadataValue(filenameMetadata())));
          try (InputStream in = m.getInputStream()) {
            IOUtils.copy(in, zipOutputStream);
          }
          zipOutputStream.closeEntry();
        }
      }
    } catch (Exception e) {
      throw ExceptionHelper.wrapCoreException(e);
    }

  }

  private String filenameMetadata() {
    return StringUtils.defaultIfBlank(getFilenameMetadata(), DEFAULT_FILENAME_METADATA);
  }
}


text:
package org.aludratest.service.gui.integrationtest.selenium2;

import org.aludratest.service.gui.integrationtest.AbstractInputFieldTest;
import org.aludratest.service.gui.web.selenium.selenium2.AludraSelenium2;
import org.junit.BeforeClass;

/** Tests input field features of {@link AludraSelenium2}.
 * @author Volker Bergmann */
public class Selenium2InputFieldTest extends AbstractInputFieldTest {

    /** Activates Selenium 2 before the tests
     *  (inherited from the parent class) are executed. */
    @BeforeClass
    public static void setUpSelenium2() {
        activateSelenium2();
    }

}


text:
using System;

namespace DpTests
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            Console.WriteLine("WPF");
            Wpf.DpTests.Test();
            Wpf.TestBindingDependencyObject.Tests();
            Console.WriteLine();
            Console.WriteLine("WindowsForms");
            WindowsForms.DpTests.Test();
            WindowsForms.TestBindingDependencyObject.Tests();
            Console.WriteLine();
        }
    }
}


text:
#Terminate script on first occurred exception
$ErrorActionPreference = "Stop"

$path = Join-Path $env:TRIDION_HOME "bin\cm_xml_usr.xsd"

Write-Host "Modifying xml schema to allow international characters..."
[xml]$config = Get-Content $path
$element = $config.schema.simpleType | where {$_.name -eq "FileName"}
$element.restriction.pattern.SetAttribute("value", ".+")
$config.Save($path)

Write-Host "Restarting service ..."
Restart-Service -Name TcmServiceHost -Verbose -Force


text:
<?php
namespace TYPO3\CMS\Rtehtmlarea\Controller;

/**
 * Render custom attribute data-htmlarea-clickenlarge
 */
class CustomAttributeController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
{
    // Default plugin variables:
    /**
     * @var string
     */
    public $prefixId = 'tx_rtehtmlarea_pi3';

    // Same as class name
    /**
     * @var string
     */
    public $scriptRelPath = 'pi3/class.tx_rtehtmlarea_pi3.php';

    // Path to this script relative to the extension dir.
    /**
     * @var string
     */
    public $extKey = 'rtehtmlarea';

    // The extension key.
    /**
     * @var array
     */
    public $conf = [];

    /**
     * cObj object
     *
     * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
     */
    public $cObj;

    /**
     * Rendering the "data-htmlarea-clickenlarge" custom attribute, called from TypoScript
     *
     * @param string $content Content input. Not used, ignore.
     * @param array $conf TypoScript configuration
     * @return string HTML output.
     * @access private
     */
    public function render_clickenlarge($content, $conf)
    {
        $clickenlarge = isset($this->cObj->parameters['data-htmlarea-clickenlarge']) ? $this->cObj->parameters['data-htmlarea-clickenlarge'] : 0;
        if (!$clickenlarge) {
            // Backward compatibility
            $clickenlarge = isset($this->cObj->parameters['clickenlarge']) ? $this->cObj->parameters['clickenlarge'] : 0;
        }
        $fileFactory = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance();
        $fileUid = $this->cObj->parameters['data-htmlarea-file-uid'];
        if ($fileUid) {
            $fileObject = $fileFactory->getFileObject($fileUid);
            $filePath = $fileObject->getForLocalProcessing(false);
            $file = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($filePath);
        } else {
            // Pre-FAL backward compatibility
            $path = $this->cObj->parameters['src'];
            $magicFolder = $fileFactory->getFolderObjectFromCombinedIdentifier($GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir']);
            if ($magicFolder instanceof \TYPO3\CMS\Core\Resource\Folder) {
                $magicFolderPath = $magicFolder->getPublicUrl();
                $pathPre = $magicFolderPath . 'RTEmagicC_';
                if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($path, $pathPre)) {
                    // Find original file:
                    $pI = pathinfo(substr($path, strlen($pathPre)));
                    $filename = substr($pI['basename'], 0, -strlen(('.' . $pI['extension'])));
                    $file = $magicFolderPath . 'RTEmagicP_' . $filename;
                } else {
                    $file = $this->cObj->parameters['src'];
                }
            }
        }
        // Unset clickenlarge custom attribute
        unset($this->cObj->parameters['data-htmlarea-clickenlarge']);
        // Backward compatibility
        unset($this->cObj->parameters['clickenlarge']);
        unset($this->cObj->parameters['allParams']);
        $content = '<img ' . \TYPO3\CMS\Core\Utility\GeneralUtility::implodeAttributes($this->cObj->parameters, true, true) . ' />';
        if ($clickenlarge && is_array($conf['imageLinkWrap.'])) {
            $theImage = $file ? $this->frontendController->tmpl->getFileName($file) : '';
            if ($theImage) {
                $this->cObj->parameters['origFile'] = $theImage;
                if ($this->cObj->parameters['title']) {
                    $conf['imageLinkWrap.']['title'] = $this->cObj->parameters['title'];
                }
                if ($this->cObj->parameters['alt']) {
                    $conf['imageLinkWrap.']['alt'] = $this->cObj->parameters['alt'];
                }
                $content = $this->cObj->imageLinkWrap($content, $theImage, $conf['imageLinkWrap.']);
                $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
            }
        }
        return $content;
    }
}


text:
const versionUtils      = require('../../../lib/utilities/version-utils');
var emberCLIVersion   = versionUtils.emberCLIVersion;

module.exports = {
  name: 'ember',
  description: null,
  aliases: [],
  works: 'insideProject',
  availableOptions: [],
  anonymousOptions: ['<command (Default: help)>'],
  version: emberCLIVersion(),
  commands: [
    {
      name: 'foo',
      description: 'Initializes the warp drive.',
      aliases: [],
      works: 'insideProject',
      availableOptions: [
        {
          aliases: [
            'd'
          ],
          default: false,
          key: 'dryRun',
          name: 'dry-run',
          required: false
        }
      ],
      anonymousOptions: [
        '<speed>'
      ]
    }
  ],
  addons: []
};


text:
<?php

use Illuminate\Database\Query\Expression;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;

return [
    'up' => function (Builder $schema) {
        // Set non-existent entity IDs to NULL so that we will be able to create
        // foreign keys without any issues.
        $connection = $schema->getConnection();

        $selectId = function ($table, $column) use ($connection) {
            return new Expression(
                '('.$connection->table($table)->whereColumn('id', $column)->select('id')->toSql().')'
            );
        };

        $connection->table('discussions')->update([
            'user_id' => $selectId('users', 'user_id'),
            'last_posted_user_id' => $selectId('users', 'last_posted_user_id'),
            'hidden_user_id' => $selectId('users', 'hidden_user_id'),
            'first_post_id' => $selectId('posts', 'first_post_id'),
            'last_post_id' => $selectId('posts', 'last_post_id'),
        ]);

        $schema->table('discussions', function (Blueprint $table) {
            $table->foreign('user_id')->references('id')->on('users')->onDelete('set null');
            $table->foreign('last_posted_user_id')->references('id')->on('users')->onDelete('set null');
            $table->foreign('hidden_user_id')->references('id')->on('users')->onDelete('set null');
            $table->foreign('first_post_id')->references('id')->on('posts')->onDelete('set null');
            $table->foreign('last_post_id')->references('id')->on('posts')->onDelete('set null');
        });
    },

    'down' => function (Builder $schema) {
        $schema->table('discussions', function (Blueprint $table) {
            $table->dropForeign(['user_id']);
            $table->dropForeign(['last_posted_user_id']);
            $table->dropForeign(['hidden_user_id']);
            $table->dropForeign(['first_post_id']);
            $table->dropForeign(['last_post_id']);
        });
    }
];


text:
package gov.hhs.fha.nhinc.docsubmission.adapter.component.proxy;

import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType;
import gov.hhs.fha.nhinc.docsubmission.adapter.component.AdapterComponentDocSubmissionOrchImpl;

import ihe.iti.xds_b._2007.ProvideAndRegisterDocumentSetRequestType;

import oasis.names.tc.ebxml_regrep.xsd.rs._3.RegistryResponseType;

import org.apache.log4j.Logger;

/**
 *
 * @author jhoppesc
 */
public class AdapterComponentDocSubmissionProxyJavaImpl implements AdapterComponentDocSubmissionProxy {
    private static final Logger LOG = Logger.getLogger(AdapterComponentDocSubmissionProxyJavaImpl.class);

    public RegistryResponseType provideAndRegisterDocumentSetB(ProvideAndRegisterDocumentSetRequestType msg,
            AssertionType assertion) {
        LOG.trace("Using Java Implementation for Adapter Doc Submission Service");
        return new AdapterComponentDocSubmissionOrchImpl().provideAndRegisterDocumentSetB(msg, assertion);
    }

}


text:
@interface ElectronNSPanel : ElectronNSWindow
@property NSWindowStyleMask styleMask;
@property NSWindowStyleMask originalStyleMask;
- (id)initWithShell:(electron::NativeWindowMac*)shell
          styleMask:(NSUInteger)styleMask;
@end

#endif  // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_PANEL_H_


text:
ig.module(
    'plusplus.config-user'
)
    .defines(function() {

        /**
         * User configuration of Impact++.
         * Tip: it is recommended to modify this configuration file!
         * @example
         * // in order to add your own custom configuration to Impact++
         * // edit the file defining ig.CONFIG_USER, 'plusplus/config-user.js'
         * // ig.CONFIG_USER is never modified by Impact++ (it is strictly for your use)
         * // ig.CONFIG_USER is automatically merged over Impact++'s config
         * @static
         * @readonly
         * @memberof ig
         * @namespace ig.CONFIG_USER
         * @author Collin Hover - collinhover.com
         **/
        ig.CONFIG_USER = {

            /**
             * Needs a top-down style game? Uncomment below!
             */
            /**
            TOP_DOWN: true,
            ENTITY: {
                CAN_FLIP_X: true,
                CAN_FLIP_Y: true
            },
            CREATURE: {
                CAN_WANDER_X: true,
                CAN_WANDER_Y: true
            },
            */

            /**
             * Want to enable a touch dpad? Uncomment below!
             */
            /**
            PLAYER_MANAGER : {
                HOLD_TO_MOVE: false,
                SWIPE_TO_JUMP: false,
                TOUCH_DPAD_ENABLED: true
            },
            */

            /**
             * Fullscreen!
             */
            GAME_WIDTH_PCT: 1,
            GAME_HEIGHT_PCT: 1,

            /**
             * Dynamic scaling based on dimensions in view.
             */
            GAME_WIDTH_VIEW: 300,
            GAME_HEIGHT_VIEW: 100,

            /**
             * Camera trap and smoothness. This helps with motion sickness.
             */
            CAMERA: {
                // we don't want to keep perfectly centered
                KEEP_CENTERED: false,
                // but if we did, we can use the lerp to smooth
                LERP: 0.025,
                // when we use the trap
                // we want to keep it as a percent of the screen
                BOUNDS_TRAP_AS_PCT: true,
                // the percents are 20% on either side of center X
                // the percents are 30% on either side of center Y
                BOUNDS_TRAP_PCT_MINX: -0.2,
                BOUNDS_TRAP_PCT_MINY: -0.3,
                BOUNDS_TRAP_PCT_MAXX: 0.2,
                BOUNDS_TRAP_PCT_MAXY: 0.3,
                // make sure camera doesn't go outside our level
                KEEP_INSIDE_LEVEL: true
            },

            /**
             * Special fonts.
             */
            FONT: {
                MAIN_NAME: "font_04b03_white_16.png",
                ALT_NAME: "font_04b03_white_8.png",
                CHAT_NAME: "font_04b03_black_8.png"
            }

        };

    });


text:
.. _ref-templates:

====================
Javascript Templates
====================

Pipeline allows you to use javascript templates along with your javascript views.
To use your javascript templates, just add them to your ``JAVASCRIPT`` group ::

  PIPELINE['JAVASCRIPT'] = {
    'application': {
      'source_filenames': (
        'js/application.js',
        'js/templates/**/*.jst',
      ),
      'output_filename': 'js/application.js'
    }
  }

For example, if you have the following template ``js/templates/photo/detail.jst`` ::

   <img src="<%= src %>" />

    <%= caption %>

It will be available from your javascript code via window.JST ::

  JST.photo_detail({ src:"images/baby-panda.jpg", caption:"A baby panda is born" });

Configuration
-------------

Template function
.................

By default, Pipeline uses a variant of `Micro Templating <http://ejohn.org/blog/javascript-micro-templating/>`_ to compile the templates, but you can choose your preferred JavaScript templating engine by changing ``PIPELINE['TEMPLATE_FUNC']`` ::

  PIPELINE['TEMPLATE_FUNC'] = 'template'

Template namespace
..................

Your templates are made available in a top-level object, by default ``window.JST``,
but you can choose your own via ``PIPELINE['TEMPLATE_NAMESPACE']`` ::

  PIPELINE['TEMPLATE_NAMESPACE'] = 'window.Template'

Template extension
..................

Templates are detected by their extension, by default ``.jst``, but you can use
your own extension via ``PIPELINE['TEMPLATE_EXT']`` ::

  PIPELINE['TEMPLATE_EXT'] = '.mustache'

Template separator
..................

Templates identifier are built using a replacement for directory separator,
by default ``_``, but you specify your own separator via ``PIPELINE['TEMPLATE_SEPARATOR']`` ::

  PIPELINE['TEMPLATE_SEPARATOR'] = '/'

Using it with your favorite template library
--------------------------------------------

Mustache
........

To use it with `Mustache <https://github.com/janl/mustache.js>`_ you will need
some extra javascript ::

  Mustache.template = function(templateString) {
    return function() {
      if (arguments.length < 1) {
        return templateString;
      } else {
        return Mustache.to_html(templateString, arguments[0], arguments[1]);
      }
    };
  };

And use these settings ::

 PIPELINE['TEMPLATE_EXT'] = '.mustache'
 PIPELINE['TEMPLATE_FUNC'] = 'Mustache.template'

Handlebars
..........

To use it with `Handlebars <http://handlebarsjs.com/>`_, use the following settings ::

 PIPELINE['TEMPLATE_EXT'] = '.handlebars'
 PIPELINE['TEMPLATE_FUNC'] = 'Handlebars.compile'
 PIPELINE['TEMPLATE_NAMESPACE'] = 'Handlebars.templates'

Ember.js + Handlebars
.....................

To use it with `Ember.js <http://emberjs.com/>`_, use the following settings ::

 PIPELINE['TEMPLATE_EXT'] = '.handlebars'
 PIPELINE['TEMPLATE_FUNC'] = 'Ember.Handlebars.compile'
 PIPELINE['TEMPLATE_NAMESPACE'] = 'window.Ember.TEMPLATES'
 PIPELINE['TEMPLATE_SEPARATOR'] = '/'

Prototype
.........

To use it with `Prototype <http://www.prototypejs.org/>`_, just setup your
``PIPELINE['TEMPLATE_FUNC']`` ::

  PIPELINE['TEMPLATE_FUNC'] = 'new Template'


text:
package org.opencb.biodata.tools.alignment;

import htsjdk.samtools.*;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.opencb.biodata.models.alignment.RegionCoverage;
import org.opencb.biodata.models.core.Region;
import org.opencb.biodata.tools.alignment.exceptions.AlignmentCoverageException;
import org.opencb.biodata.tools.feature.BigWigManager;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URISyntaxException;
import java.nio.file.FileAlreadyExistsException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import static org.junit.Assert.assertEquals;

/**
 * Created by pfurio on 26/10/16.
 */
public class BamManagerTest {
    Path inputPath;
    Path bamPath;
    Path bwPath;

    @Before
    public void init() throws URISyntaxException, IOException {
        Assume.assumeTrue(bamCoverageExists());

        inputPath = Paths.get(getClass().getResource("/HG00096.chrom20.small.bam").toURI());
        bamPath = Paths.get("/tmp/" + inputPath.toFile().getName());
        bwPath = Paths.get("/tmp/" + inputPath.toFile().getName() + ".bw");
    }

    public boolean bamCoverageExists() throws IOException {
        String cmd = "which bamCoverage";
        java.util.Scanner s = new java.util.Scanner(Runtime.getRuntime().exec(cmd).getInputStream()).useDelimiter("\\A");
        return s.hasNext();
    }

    @Test
    public void testIndex() throws IOException {
        try {
            Files.copy(inputPath, bamPath);
        } catch (FileAlreadyExistsException e) {
            System.out.println("BAM file " + bamPath + " already copied");
        }
        System.out.println("bamPath = " + bamPath);
        BamManager bamManager = new BamManager(bamPath);
        bamManager.createIndex();
    }

    @Test
    public void testIndexBigWigCoverage() throws Exception {
        try {
            Files.copy(inputPath, bamPath);
        } catch (FileAlreadyExistsException e) {
            System.out.println("BAM file " + bamPath + " already copied");
        }

        System.out.println("bamPath = " + bamPath);
        System.out.println("bwPath = " + bwPath);
        BamManager bamManager = new BamManager(bamPath);
        bamManager.createIndex();
        bamManager.calculateBigWigCoverage(bwPath, 50);
    }

    @Test
    public void testQuery() throws Exception {
        BamManager bamManager = new BamManager(inputPath);
        AlignmentOptions options = new AlignmentOptions().setLimit(5);
        Region region = new Region("20", 60000, 65000);
        List<SAMRecord> query = bamManager.query(region, options);
        assertEquals(5, query.size());

        options.setLimit(3);
        query = bamManager.query(region, options);
        for (SAMRecord sam: query) {
            System.out.println(sam.toString());
        }
        assertEquals(3, query.size());
    }

    @Test
    public void testQueryBigWigCoverage() throws Exception {
        if (!bwPath.toFile().exists()) {
            testIndexBigWigCoverage();
        }

        BamManager bamManager = new BamManager(bamPath);

        int minCoverage = 4;
        int maxCoverage = 6;

        Region region = new Region("20", 62200, 62405);
        RegionCoverage coverage = bamManager.coverage(region, 1);

        System.out.println("Coverage");
        System.out.println(coverage.toJSON());
        System.out.println("mean coverage = " + coverage.meanCoverage());

        System.out.println("Filter coverage, range " + minCoverage + "-" + maxCoverage + ":");
        List<RegionCoverage> filterRegionByCoverage = BamUtils.filterByCoverage(coverage, minCoverage, maxCoverage);
        for (RegionCoverage uncoveredRegion : filterRegionByCoverage) {
            System.out.println(uncoveredRegion.toJSON());
        }

    }

    @Test
    public void testQueryBAMCoverage() throws Exception {
        System.out.println("inputPath = " + inputPath);
        BamManager bamManager = new BamManager(inputPath);

        AlignmentOptions options = new AlignmentOptions();
        options.setContained(false);
        Region region = new Region("20", 62000, 62200);
        RegionCoverage coverage = bamManager.coverage(region, null, options);
//        System.out.println(coverage.toString());
        System.out.println(coverage.toJSON());
        System.out.println("mean coverage = " + coverage.meanCoverage());
    }

    //@Test
    public void testFullCoverage() throws Exception {
        System.out.println("inputPath = " + inputPath);
        BamManager bamManager = new BamManager(inputPath);

        PrintWriter writer = new PrintWriter(new File(inputPath + ".coverage"));

//        short[] values;
        int chunkSize = 100000;

        SamReader sfr = SamReaderFactory.makeDefault().open(inputPath.toFile());
        SAMFileHeader h = sfr.getFileHeader();
        SAMSequenceDictionary dict = h.getSequenceDictionary();
        long totalStartTime = System.currentTimeMillis();
        for (SAMSequenceRecord ssr : dict.getSequences()) {
            String ref_name = ssr.getSequenceName();
            int ref_len = ssr.getSequenceLength();

//            if (!"chrM".equals(ref_name)) continue;
//            if (!"chr1".equals(ref_name)) continue;
            if (!"20".equals(ref_name)) continue;

            if (chunkSize == -1) {
                chunkSize = ref_len;
            }

            int pos = 1;
            // start time
            long startTime3 = System.currentTimeMillis();
            while (pos <= ref_len) {
                Region region = new Region(ref_name, pos, Math.min(pos + chunkSize - 1, ref_len));
//                System.out.println(region);
//
//                // start time
//                long startTime1 = System.currentTimeMillis();
                RegionCoverage coverage = bamManager.coverage(region, null, null);
                // stop time
//                long stopTime1 = System.currentTimeMillis();
//                System.out.println("\tComputing coverage: CHR " + ref_name + " in " + (stopTime1 - startTime1)/1000.0 + " seconds.");
//
//                // start time
//                long startTime2 = System.currentTimeMillis();
                BamUtils.printWigFormatCoverage(coverage, 1, coverage.getStart() == 1, writer);
                // stop time
//                long stopTime2 = System.currentTimeMillis();
//                System.out.println("\tWriting coverage: CHR " + ref_name + " in " + (stopTime2 - startTime2)/1000.0 + " seconds.");

                pos += chunkSize;
            }
            long stopTime3 = System.currentTimeMillis();
            System.out.println("\t\tTotal time: CHR " + ref_name + " in " + (stopTime3 - startTime3)/1000.0 + " seconds.");
        }
        long totalStopTime = System.currentTimeMillis();
        System.out.println("\nTotal time: " + (totalStopTime - totalStartTime)/1000.0 + " seconds.");

        writer.close();
    }

    @Test
    public void filterRegionByCoverage() throws IOException, AlignmentCoverageException {
        System.out.println("bamPath = " + bamPath);
        BamManager bamManager = new BamManager(bamPath);

        AlignmentOptions options = new AlignmentOptions();
        options.setContained(false);
        Region region = new Region("chr20", 62000, 62200);

        int minCoverage = 4;
        int maxCoverage = 6;

        RegionCoverage regionCoverage = bamManager.coverage(region, 20);
        List<RegionCoverage> uncoveredRegions = BamUtils.filterByCoverage(regionCoverage, minCoverage, maxCoverage);
        for (RegionCoverage uncoveredRegion : uncoveredRegions) {
            System.out.println(uncoveredRegion);
        }
    }

    public void testRanges() throws IOException {
        int refID = 1; // 1; // 22; //14;
        int beg = 114000; // 13000; // 10000; //24375199;
        int end = 200000; //13986; // 10100; //24378544;

        bamPath = Paths.get("/mnt/data/hgva/datasets/bams/NA12877_S1.bam");
        BamManager bamManager = new BamManager(bamPath);
        Region region = new Region("chr" + refID, beg, end);

        Region region1 = new Region(region.getChromosome(), region.getStart(), region.getEnd() + 32000);

        Set<String> breakSet = new HashSet<>(bamManager.getBreakpoints(region));
        Set<String> breakSet1 = new HashSet<>(bamManager.getBreakpoints(region1));

        System.out.println(breakSet.size() + " vs " + breakSet1.size());

        System.out.println("Commons:");
        Iterator<String> iterator = breakSet.iterator();
        while (iterator.hasNext()) {
            String breakpoint = iterator.next();
            if (breakSet1.contains(breakpoint)) {
                System.out.println("\t" + breakpoint);
            }
        }

        System.out.println("Only at region " + region);
        iterator = breakSet.iterator();
        while (iterator.hasNext()) {
            String breakpoint = iterator.next();
            if (!breakSet1.contains(breakpoint)) {
                System.out.println("\t" + breakpoint);
            }
        }

        System.out.println("Only at region " + region1);
        iterator = breakSet1.iterator();
        while (iterator.hasNext()) {
            String breakpoint = iterator.next();
            if (!breakSet.contains(breakpoint)) {
                System.out.println("\t" + breakpoint);
            }
        }

        //        Set<String> chunkSet = new HashSet<>();
//
//        List<Chunk> chunks = bamManager.getChunks(region);
//        for (Chunk chunk : chunks) {
//            chunkSet.add(chunk.toString());
//            System.out.println(chunk);
//        }

//        boolean keepGoing = true;
//        int blockSize = 65000;
//        while (keepGoing) {
//            region.setEnd(region.getEnd() + blockSize);
//            chunks = bamManager.getChunks(region);
//            for (Chunk chunk : chunks) {
//                if (!chunkSet.contains(chunk.toString())) {
//                    System.out.println("not found: " + chunk);
//                    keepGoing = false;
//                    break;
//                }
//            }
//        }

//        System.out.println();
//
//        List<String> breakpoints = bamManager.getBreakpoints(region);
//        for (String breakpoint : breakpoints) {
//            System.out.println(breakpoint);
//        }

    }

    //    @Test
    public void testChunks() throws IOException {
        int refID = 1; // 1; // 22; //14;
        int beg = 114000; // 13000; // 10000; //24375199;
        int end = 200000; //13986; // 10100; //24378544;

        bamPath = Paths.get("/mnt/data/hgva/datasets/bams/NA12877_S1.bam");
        BamManager bamManager = new BamManager(bamPath);
        Region region = new Region("chr" + refID, beg, end);

        Region region1 = new Region(region.getChromosome(), region.getStart(), region.getEnd() + 32000);

        Set<Chunk> chunkSet = new HashSet<>(bamManager.getChunks(region));
        Set<Chunk> chunkSet1 = new HashSet<>(bamManager.getChunks(region1));

        System.out.println(chunkSet.size() + " vs " + chunkSet1.size());

        System.out.println("Commons:");
        Iterator<Chunk> iterator = chunkSet.iterator();
        while (iterator.hasNext()) {
            Chunk chunk = iterator.next();
            if (chunkSet1.contains(chunk)) {
                System.out.println("\t" + chunk);
            }
        }

        System.out.println("Only at region " + region);
        iterator = chunkSet.iterator();
        while (iterator.hasNext()) {
            Chunk chunk = iterator.next();
            if (!chunkSet1.contains(chunk)) {
                System.out.println("\t" + chunk);
            }
        }

        System.out.println("Only at region " + region1);
        iterator = chunkSet1.iterator();
        while (iterator.hasNext()) {
            Chunk chunk = iterator.next();
            if (!chunkSet.contains(chunk)) {
                System.out.println("\t" + chunk);
            }
        }

        //        Set<String> chunkSet = new HashSet<>();
//
//        List<Chunk> chunks = bamManager.getChunks(region);
//        for (Chunk chunk : chunks) {
//            chunkSet.add(chunk.toString());
//            System.out.println(chunk);
//        }

//        boolean keepGoing = true;
//        int blockSize = 65000;
//        while (keepGoing) {
//            region.setEnd(region.getEnd() + blockSize);
//            chunks = bamManager.getChunks(region);
//            for (Chunk chunk : chunks) {
//                if (!chunkSet.contains(chunk.toString())) {
//                    System.out.println("not found: " + chunk);
//                    keepGoing = false;
//                    break;
//                }
//            }
//        }

//        System.out.println();
//
//        List<String> breakpoints = bamManager.getBreakpoints(region);
//        for (String breakpoint : breakpoints) {
//            System.out.println(breakpoint);
//        }

    }

    //    @Test
    public void testZoom() throws IOException {
//        Path path = Paths.get("~/data150/bw/NA12877_S1.bam.coverage.bw");
        Path path = Paths.get("~/data150/bw/coverage.bw");
        BigWigManager bigWigManager = new BigWigManager(path);

        for (Integer windowSize : bigWigManager.getZoomWindowSizes()) {
            System.out.println(windowSize);
        }

//        int windowSize = 385;
//        Region region = new Region("1", 67686000, 68669999);

        int windowSize = 100;
        Region region = new Region("20", 60200, 60431);
        double[] values = bigWigManager.groupBy(region, windowSize);
        for (double value : values) {
            System.out.print(value + ", ");
        }
    }

    @Test
    public void readCram() throws IOException {
        String cram = getClass().getResource("/cram/cram_with_crai_index.cram").getFile();
        String reference = getClass().getResource("/cram/hg19mini.fasta").getFile();

        BamManager bamManager = new BamManager(Paths.get(cram), Paths.get(reference));
        System.out.println(bamManager.getHeader());
    }
}


text:
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package io.flutter.app;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import androidx.annotation.NonNull;
import io.flutter.app.FlutterActivityDelegate.ViewFactory;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.view.FlutterNativeView;
import io.flutter.view.FlutterView;

/**
 * Deprecated base class for activities that use Flutter.
 *
 *
Deprecation: {@link io.flutter.embedding.android.FlutterActivity} is the new API that now
 * replaces this class. See https://flutter.dev/go/android-project-migration for more migration
 * details.
 */
public class FlutterActivity extends Activity
    implements FlutterView.Provider, PluginRegistry, ViewFactory {
  private static final String TAG = "FlutterActivity";

  private final FlutterActivityDelegate delegate = new FlutterActivityDelegate(this, this);

  // These aliases ensure that the methods we forward to the delegate adhere
  // to relevant interfaces versus just existing in FlutterActivityDelegate.
  private final FlutterActivityEvents eventDelegate = delegate;
  private final FlutterView.Provider viewProvider = delegate;
  private final PluginRegistry pluginRegistry = delegate;

  /**
   * Returns the Flutter view used by this activity; will be null before {@link #onCreate(Bundle)}
   * is called.
   */
  @Override
  public FlutterView getFlutterView() {
    return viewProvider.getFlutterView();
  }

  /**
   * Hook for subclasses to customize the creation of the {@code FlutterView}.
   *
   *
The default implementation returns {@code null}, which will cause the activity to use a
   * newly instantiated full-screen view.
   */
  @Override
  public FlutterView createFlutterView(Context context) {
    return null;
  }

  /**
   * Hook for subclasses to customize the creation of the {@code FlutterNativeView}.
   *
   *
The default implementation returns {@code null}, which will cause the activity to use a
   * newly instantiated native view object.
   */
  @Override
  public FlutterNativeView createFlutterNativeView() {
    return null;
  }

  @Override
  public boolean retainFlutterNativeView() {
    return false;
  }

  @Override
  public final boolean hasPlugin(String key) {
    return pluginRegistry.hasPlugin(key);
  }

  @Override
  public final <T> T valuePublishedByPlugin(String pluginKey) {
    return pluginRegistry.valuePublishedByPlugin(pluginKey);
  }

  @Override
  public final Registrar registrarFor(String pluginKey) {
    return pluginRegistry.registrarFor(pluginKey);
  }

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    eventDelegate.onCreate(savedInstanceState);
  }

  @Override
  protected void onStart() {
    super.onStart();
    eventDelegate.onStart();
  }

  @Override
  protected void onResume() {
    super.onResume();
    eventDelegate.onResume();
  }

  @Override
  protected void onDestroy() {
    eventDelegate.onDestroy();
    super.onDestroy();
  }

  @Override
  public void onBackPressed() {
    if (!eventDelegate.onBackPressed()) {
      super.onBackPressed();
    }
  }

  @Override
  protected void onStop() {
    eventDelegate.onStop();
    super.onStop();
  }

  @Override
  protected void onPause() {
    super.onPause();
    eventDelegate.onPause();
  }

  @Override
  protected void onPostResume() {
    super.onPostResume();
    eventDelegate.onPostResume();
  }

  // @Override - added in API level 23
  public void onRequestPermissionsResult(
      int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    eventDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
  }

  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (!eventDelegate.onActivityResult(requestCode, resultCode, data)) {
      super.onActivityResult(requestCode, resultCode, data);
    }
  }

  @Override
  protected void onNewIntent(Intent intent) {
    eventDelegate.onNewIntent(intent);
  }

  @Override
  public void onUserLeaveHint() {
    eventDelegate.onUserLeaveHint();
  }

  @Override
  public void onTrimMemory(int level) {
    eventDelegate.onTrimMemory(level);
  }

  @Override
  public void onLowMemory() {
    eventDelegate.onLowMemory();
  }

  @Override
  public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    eventDelegate.onConfigurationChanged(newConfig);
  }
}


text:
package org.apache.carbondata.processing.store;

/**
 * This class contains attributes of file which are required to
 * construct file name like taskId, factTimeStamp
 */
public class CarbonDataFileAttributes {
  /**
   * task Id which is unique for each spark task
   */
  private long taskId;

  /**
   * load start time
   */
  private long factTimeStamp;

  /**
   * @param taskId
   * @param factTimeStamp
   */
  public CarbonDataFileAttributes(long taskId, long factTimeStamp) {
    this.taskId = taskId;
    this.factTimeStamp = factTimeStamp;
  }

  /**
   * @return
   */
  public long getTaskId() {
    return taskId;
  }

  /**
   * @return fact time stamp which is load start time
   */
  public long getFactTimeStamp() {
    return factTimeStamp;
  }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="black">#FF000000</color>
    <color name="blackSemiTransparent">#80000000</color>
</resources>


text:
using namespace Kore;

Graphics4::IndexBuffer* IndexBufferImpl::current = nullptr;

IndexBufferImpl::IndexBufferImpl(int count) : myCount(count) {}

Graphics4::IndexBuffer::IndexBuffer(int indexCount) : IndexBufferImpl(indexCount) {
	glGenBuffers(1, &bufferId);
	glCheckErrors();
	data = new int[indexCount];
#if defined(KORE_ANDROID) || defined(KORE_PI)
	shortData = new u16[indexCount];
#endif
}

Graphics4::IndexBuffer::~IndexBuffer() {
	unset();
	delete[] data;
}

int* Graphics4::IndexBuffer::lock() {
	return data;
}

void Graphics4::IndexBuffer::unlock() {
#if defined(KORE_ANDROID) || defined(KORE_PI)
	for (int i = 0; i < myCount; ++i) shortData[i] = (u16)data[i];
#endif
	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferId);
	glCheckErrors();
#if defined(KORE_ANDROID) || defined(KORE_PI)
	glBufferData(GL_ELEMENT_ARRAY_BUFFER, myCount * 2, shortData, GL_STATIC_DRAW);
	glCheckErrors();
#else
	glBufferData(GL_ELEMENT_ARRAY_BUFFER, myCount * 4, data, GL_STATIC_DRAW);
	glCheckErrors();
#endif
	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
	glCheckErrors();
}

void Graphics4::IndexBuffer::_set() {
	current = this;
	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferId);
	glCheckErrors();
}

void IndexBufferImpl::unset() {
	if ((void*)current == (void*)this) current = nullptr;
}

int Graphics4::IndexBuffer::count() {
	return myCount;
}


text:
<?php

namespace Systream;

use Systream\EventDispatcher\Subscription;
use Systream\StateMachine\Exception\CantSetStatusException;
use Systream\StateMachine\State\StateInterface;
use Systream\StateMachine\State\StateObjectInterface;
use Systream\StateMachine\Transition\TransitionEvent;
use Systream\StateMachine\Transition\TransitionInterface;

class StateMachine
{

	/**
	 * @var EventDispatcher
	 */
	protected $eventDispatcher;

	/**
	 * @var StateInterface[]
	 */
	protected $states = array();

	/**
	 * @var array
	 */
	protected $transitionStatesFlow = array();

	/**
	 * @var TransitionInterface[]
	 */
	protected $transitions = array();

	/**
	 * @var array
	 */
	protected $transitionsStates = array();

	/**
	 * StateMachine constructor.
	 * @param EventDispatcher $eventDispatcher
	 */
	public function __construct(EventDispatcher $eventDispatcher)
	{
		$this->eventDispatcher = $eventDispatcher;
	}

	/**
	 * @param TransitionInterface $transition
	 * @param StateInterface $sourceState
	 * @param StateInterface $targetState
	 */
	public function addTransition(TransitionInterface $transition, StateInterface $sourceState, StateInterface $targetState)
	{
		$this->addState($sourceState);
		$this->addState($targetState);

		$this->transitions[] = $transition;

		if (!isset($this->transitionStatesFlow[$sourceState->getId()])) {
			$this->transitionStatesFlow[$sourceState->getId()] = array();
		}

		$this->transitionStatesFlow[$sourceState->getId()][] = $targetState->getId();
		$this->transitionsStates[$transition->getName()] = array($sourceState->getId(), $targetState->getId());

		$transitionSubscription = new Subscription(
			$this->getEventKey($sourceState, $targetState),
			function (TransitionEvent $event) use ($transition) {
				$transition->processTransaction($event->getModel(), $event->getTargetState());
			}
		);
		$this->eventDispatcher->subscribe($transitionSubscription);
	}

	/**
	 * @param StateObjectInterface $model
	 * @param StateInterface $targetStatus
	 * @return void
	 */
	public function process(StateObjectInterface $model, StateInterface $targetStatus)
	{
		if (!$this->can($model, $targetStatus)) {
			throw new CantSetStatusException(sprintf('There is no transition from "%s" to "%s"', $model->getState()->getName(), $targetStatus->getName()));
		}

		$event = new TransitionEvent($model, $targetStatus, $this->getEventKey($model->getState(), $targetStatus));
		$this->eventDispatcher->emit($event);
		$model->setState($targetStatus);
	}

	/**
	 * @param StateObjectInterface $model
	 * @param StateInterface $targetStatus
	 * @return bool
	 */
	public function can(StateObjectInterface $model, StateInterface $targetStatus)
	{
		$modelStateId = $model->getState()->getId();
		return isset($this->transitionStatesFlow[$modelStateId]) &&
			in_array($targetStatus->getId(), $this->transitionStatesFlow[$modelStateId]);
	}

	/**
	 * @return StateInterface[]
	 */
	public function getStates()
	{
		return array_values($this->states);
	}

	/**
	 * @param StateInterface $state
	 */
	protected function addState(StateInterface $state)
	{
		$id = $state->getId();
		if (!isset($this->states[$id])) {
			$this->states[$id] = $state;
		}
	}

	/**
	 * @param StateInterface $sourceState
	 * @param StateInterface $targetState
	 * @return string
	 */
	protected function getEventKey(StateInterface $sourceState, StateInterface $targetState)
	{
		return $sourceState->getId() . '|' . $targetState->getId();
	}

	/**
	 * @param StateObjectInterface $model
	 * @return StateInterface[]
	 */
	public function getNextStates(StateObjectInterface $model)
	{
		$result = array();
		$modelStateId = $model->getState()->getId();
		if (isset($this->transitionStatesFlow[$modelStateId])) {
			foreach ($this->transitionStatesFlow[$modelStateId] as $transitionStateId) {
				$result[] = $this->states[$transitionStateId];
			}
		}
		return $result;
	}

	/**
	 * @param StateInterface $sourceState
	 * @param StateInterface $targetState
	 * @return string
	 */
	public function getTransitionName(StateInterface $sourceState, StateInterface $targetState)
	{
		foreach ($this->transitionsStates as $transitionsStateName => $states) {
			if ($sourceState->getId() == $states[0] && $targetState->getId() == $states[1]) {
				return $transitionsStateName;
			}
		}
		return '';
	}

}


text:
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>

Package for constraints. ConBox is a special class, not a constraint, but has static methods for
creation of frequently used constraints.

</body>
</html>


text:
class Tier
  COUNTY = 1
  DISTRICT = 2
  UNITARY = 3

  def self.county
    COUNTY
  end

  def self.district
    DISTRICT
  end

  def self.unitary
    UNITARY
  end

  def self.as_string(tier)
    case tier
    when COUNTY
      "county"
    when DISTRICT
      "district"
    when UNITARY
      "unitary"
    end
  end
end


text:
#pragma once

#include "Component.h"

namespace Game {

  struct NullComponent : Component {
    NullComponent() {}

    ~NullComponent() = default;
  };

}


text:
interface Props {
  /**
   * The type of the button relevant to its `<form>`.
   * @default 'button'
   */
  type?: 'button' | 'reset' | 'submit';
}

export function Foo(props: Props): JSX.Element;


text:
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="description" content="Sample of using postMessage to communicate with Service Workers.">

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Service Worker Sample: Posting Messages</title>

    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="../../images/touch/chrome-touch-icon-192x192.png">

    <meta name="apple-mobile-web-app-title" content="Service Worker Sample: Posting Messages">

    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" href="../../images/apple-touch-icon-precomposed.png">

    <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
    <meta name="msapplication-TileColor" content="#3372DF">

    <link rel="icon" href="../../images/favicon.ico">

    <link rel="stylesheet" href="../../styles/main.css">

Service Worker Sample: Posting Messages

Available in Chrome 40+

      This sample demonstrates basic Service Worker registration, in conjunction with using the
      postMessage
      interface to communicate with the service worker controlling the page. Note that while the service worker can
      reply to messages sent from a controlled page, it's currently not possible for the service worker to originate a
      message. (The Push API specification, which is closely related to service workers, is currently being developed,
      and covers some of the use cases in which a service worker creates a message displayed to an end user.)

      The service worker's
      onmessage handler
      behaves differently depending on the type of message it receives; there's an arbitrary set of "commands" that this
      controlled page can send it to do things like determine whether the resource at a given URL is present in the
      cache, add resources to the cache, or remove them. Since the controlled page doesn't have access to the service
      worker's cache, using this type of message passing is a common way to get insight into the cache's contents.

      Visit chrome://inspect/#service-workers and click on the "inspect" link below
      the registered Service Worker to view logging statements for the various actions the
      service-worker.js script is performing.

          Resource URL:
          <input id="url" type="text" size="50" value="https://www.google.com/">
          <button id="add">Add to Cache</button>
          <button id="delete">Delete from Cache</button>

          <button id="list-contents">List Cache Contents</button>


text:
<?php

namespace Google\Service\RemoteBuildExecution;

class BuildBazelRemoteExecutionV2Command extends \Google\Collection
{
  protected $collection_key = 'outputPaths';
  public $arguments;
  protected $environmentVariablesType = BuildBazelRemoteExecutionV2CommandEnvironmentVariable::class;
  protected $environmentVariablesDataType = 'array';
  public $outputDirectories;
  public $outputFiles;
  public $outputNodeProperties;
  public $outputPaths;
  protected $platformType = BuildBazelRemoteExecutionV2Platform::class;
  protected $platformDataType = '';
  public $workingDirectory;

  public function setArguments($arguments)
  {
    $this->arguments = $arguments;
  }
  public function getArguments()
  {
    return $this->arguments;
  }
  /**
   * @param BuildBazelRemoteExecutionV2CommandEnvironmentVariable[]
   */
  public function setEnvironmentVariables($environmentVariables)
  {
    $this->environmentVariables = $environmentVariables;
  }
  /**
   * @return BuildBazelRemoteExecutionV2CommandEnvironmentVariable[]
   */
  public function getEnvironmentVariables()
  {
    return $this->environmentVariables;
  }
  public function setOutputDirectories($outputDirectories)
  {
    $this->outputDirectories = $outputDirectories;
  }
  public function getOutputDirectories()
  {
    return $this->outputDirectories;
  }
  public function setOutputFiles($outputFiles)
  {
    $this->outputFiles = $outputFiles;
  }
  public function getOutputFiles()
  {
    return $this->outputFiles;
  }
  public function setOutputNodeProperties($outputNodeProperties)
  {
    $this->outputNodeProperties = $outputNodeProperties;
  }
  public function getOutputNodeProperties()
  {
    return $this->outputNodeProperties;
  }
  public function setOutputPaths($outputPaths)
  {
    $this->outputPaths = $outputPaths;
  }
  public function getOutputPaths()
  {
    return $this->outputPaths;
  }
  /**
   * @param BuildBazelRemoteExecutionV2Platform
   */
  public function setPlatform(BuildBazelRemoteExecutionV2Platform $platform)
  {
    $this->platform = $platform;
  }
  /**
   * @return BuildBazelRemoteExecutionV2Platform
   */
  public function getPlatform()
  {
    return $this->platform;
  }
  public function setWorkingDirectory($workingDirectory)
  {
    $this->workingDirectory = $workingDirectory;
  }
  public function getWorkingDirectory()
  {
    return $this->workingDirectory;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BuildBazelRemoteExecutionV2Command::class, 'Google_Service_RemoteBuildExecution_BuildBazelRemoteExecutionV2Command');


text:
namespace DXFramework
{
	class X3DLoader
	{
	public:
		static void LoadX3dStatic(const std::wstring& filename,
			std::vector<DX::PosNormalTexTan>& vertices,
			std::vector<UINT>& indices,
			std::vector<Subset>& subsets,
			std::vector<X3dMaterial>& mats);
		static void X3DLoader::LoadX3dSkinned(const std::wstring& filename,
			std::vector<DX::PosNormalTexTanSkinned>& vertices,
			std::vector<UINT>& indices,
			std::vector<Subset>& subsets,
			std::vector<X3dMaterial>& mats,
			SkinnedData& skinInfo);

	private:
		static void ReadMaterials(std::ifstream& fin, UINT numMaterials, std::vector<X3dMaterial>& mats);
		static void ReadSubsetTable(std::ifstream& fin, UINT numSubsets, std::vector<Subset>& subsets);
		static void ReadVertices(std::ifstream& fin, UINT numVertices, std::vector<DX::PosNormalTexTan>& vertices);
		static void ReadIndices(std::ifstream& fin, UINT numTriangles, std::vector<UINT>& indices);
		static void ReadSkinnedVertices(std::ifstream& fin, UINT numVertices, std::vector<DX::PosNormalTexTanSkinned>& vertices);
		static void ReadBoneOffsets(std::ifstream& fin, UINT numBones, std::vector<DirectX::XMFLOAT4X4>& boneOffsets);
		static void ReadAnimationClips(std::ifstream& fin, UINT numBones, UINT numAnimationClips, std::map<std::wstring, AnimationClip>& animations);
		static void ReadBoneKeyframes(std::ifstream& fin, UINT numBones, BoneAnimation& boneAnimation);
	};
}


text:
'use strict'
const RpcHubServer = require('./RpcHubServer')
const httpConnQueue = require('./RpcHubServer/httpConnQueue')
const workerUtil = require('ddv-worker/util')
module.exports = function rpcHubServerMiddleware (options) {
  return function rpcHubServer (req, res, next) {
    var close = e => {
      httpConnQueue && httpConnQueue[req.requestId] && workerUtil.isFunction(httpConnQueue[req.requestId].destroy) && httpConnQueue[req.requestId].destroy()
      delete httpConnQueue[req.requestId]
    }
    httpConnQueue[req.requestId] = new RpcHubServer(options, req, res, next)
    res.on('end', close)
    close = void 0
  }
}


text:
Testing, testing, 1, 2, 3

    npm i success

## Usage
To use it

```js
var success = require("success");
assert.equal(success(2), 4);
```

## License
MIT