text:
.class public Landroid/media/MediaRecorder;
.super Ljava/lang/Object;
.source "MediaRecorder.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/media/MediaRecorder$EventHandler;,
        Landroid/media/MediaRecorder$OnInfoListener;,
        Landroid/media/MediaRecorder$OnErrorListener;,
        Landroid/media/MediaRecorder$VideoEncoder;,
        Landroid/media/MediaRecorder$AudioEncoder;,
        Landroid/media/MediaRecorder$OutputFormat;,
        Landroid/media/MediaRecorder$VideoSource;,
        Landroid/media/MediaRecorder$AudioSource;
    }
.end annotation

# static fields
.field public static final CAMERA_STEREO_PROHIBIT:I = 0x3d0

.field public static final MEDIA_RECORDER_ERROR_UNKNOWN:I = 0x1

.field public static final MEDIA_RECORDER_INFO_MAX_DURATION_REACHED:I = 0x320

.field public static final MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED:I = 0x321

.field public static final MEDIA_RECORDER_INFO_UNKNOWN:I = 0x1

.field public static final MEDIA_RECORDER_TRACK_INFO_COMPLETION_STATUS:I = 0x3e8

.field public static final MEDIA_RECORDER_TRACK_INFO_DATA_KBYTES:I = 0x3f1

.field public static final MEDIA_RECORDER_TRACK_INFO_DURATION_MS:I = 0x3eb

.field public static final MEDIA_RECORDER_TRACK_INFO_ENCODED_FRAMES:I = 0x3ed

.field public static final MEDIA_RECORDER_TRACK_INFO_INITIAL_DELAY_MS:I = 0x3ef

.field public static final MEDIA_RECORDER_TRACK_INFO_LIST_END:I = 0x7d0

.field public static final MEDIA_RECORDER_TRACK_INFO_LIST_START:I = 0x3e8

.field public static final MEDIA_RECORDER_TRACK_INFO_MAX_CHUNK_DUR_MS:I = 0x3ec

.field public static final MEDIA_RECORDER_TRACK_INFO_PROGRESS_IN_TIME:I = 0x3e9

.field public static final MEDIA_RECORDER_TRACK_INFO_START_OFFSET_MS:I = 0x3f0

.field public static final MEDIA_RECORDER_TRACK_INFO_TYPE:I = 0x3ea

.field public static final MEDIA_RECORDER_TRACK_INTER_CHUNK_TIME_MS:I = 0x3ee

.field private static final TAG:Ljava/lang/String; = "MediaRecorder"

# instance fields
.field private mEventHandler:Landroid/media/MediaRecorder$EventHandler;

.field private mFd:Ljava/io/FileDescriptor;

.field private mNativeContext:I

.field private mOnErrorListener:Landroid/media/MediaRecorder$OnErrorListener;

.field private mOnInfoListener:Landroid/media/MediaRecorder$OnInfoListener;

.field private mPath:Ljava/lang/String;

.field private mSurface:Landroid/view/Surface;

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

    .prologue
    .line 77
    const-string/jumbo v0, "media_jni"

    invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V

    .line 78
    invoke-static {}, Landroid/media/MediaRecorder;->native_init()V

    .line 79
    return-void
.end method

.method public constructor <init>()V
    .locals 2

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

    .line 101
    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object v0

    .local v0, looper:Landroid/os/Looper;
    if-eqz v0, :cond_0

    .line 102
    new-instance v1, Landroid/media/MediaRecorder$EventHandler;

    invoke-direct {v1, p0, p0, v0}, Landroid/media/MediaRecorder$EventHandler;-><init>(Landroid/media/MediaRecorder;Landroid/media/MediaRecorder;Landroid/os/Looper;)V

    iput-object v1, p0, Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;

    .line 112
    :goto_0
    new-instance v1, Ljava/lang/ref/WeakReference;

    invoke-direct {v1, p0}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    invoke-direct {p0, v1}, Landroid/media/MediaRecorder;->native_setup(Ljava/lang/Object;)V

    .line 113
    return-void

    .line 103
    :cond_0
    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 104
    new-instance v1, Landroid/media/MediaRecorder$EventHandler;

    invoke-direct {v1, p0, p0, v0}, Landroid/media/MediaRecorder$EventHandler;-><init>(Landroid/media/MediaRecorder;Landroid/media/MediaRecorder;Landroid/os/Looper;)V

    iput-object v1, p0, Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;

    goto :goto_0

    .line 106
    :cond_1
    const/4 v1, 0x0

    iput-object v1, p0, Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;

    goto :goto_0
.end method

.method private native _prepare()V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;,
            Ljava/io/IOException;
        }
    .end annotation
.end method

.method private native _setOutputFile(Ljava/io/FileDescriptor;JJ)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;,
            Ljava/io/IOException;
        }
    .end annotation
.end method

.method static synthetic access$000(Landroid/media/MediaRecorder;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 74
    iget v0, p0, Landroid/media/MediaRecorder;->mNativeContext:I

    return v0
.end method

.method static synthetic access$100(Landroid/media/MediaRecorder;)Landroid/media/MediaRecorder$OnErrorListener;
    .locals 1
    .parameter "x0"

    .prologue
    .line 74
    iget-object v0, p0, Landroid/media/MediaRecorder;->mOnErrorListener:Landroid/media/MediaRecorder$OnErrorListener;

    return-object v0
.end method

.method static synthetic access$200(Landroid/media/MediaRecorder;)Landroid/media/MediaRecorder$OnInfoListener;
    .locals 1
    .parameter "x0"

    .prologue
    .line 74
    iget-object v0, p0, Landroid/media/MediaRecorder;->mOnInfoListener:Landroid/media/MediaRecorder$OnInfoListener;

    return-object v0
.end method

.method public static final getAudioSourceMax()I
    .locals 1

    .prologue
    .line 304
    const/4 v0, 0x7

    return v0
.end method

.method private final native native_finalize()V
.end method

.method private static final native native_init()V
.end method

.method private native native_reset()V
.end method

.method private final native native_setup(Ljava/lang/Object;)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method private static postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
    .locals 3
    .parameter "mediarecorder_ref"
    .parameter "what"
    .parameter "arg1"
    .parameter "arg2"
    .parameter "obj"

    .prologue
    .line 1052
    check-cast p0, Ljava/lang/ref/WeakReference;

    .end local p0
    invoke-virtual {p0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/media/MediaRecorder;

    .line 1053
    .local v1, mr:Landroid/media/MediaRecorder;
    if-nez v1, :cond_1

    .line 1061
    :cond_0
    :goto_0
    return-void

    .line 1057
    :cond_1
    iget-object v2, v1, Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;

    if-eqz v2, :cond_0

    .line 1058
    iget-object v2, v1, Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;

    invoke-virtual {v2, p1, p2, p3, p4}, Landroid/media/MediaRecorder$EventHandler;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    .line 1059
    .local v0, m:Landroid/os/Message;
    iget-object v2, v1, Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;

    invoke-virtual {v2, v0}, Landroid/media/MediaRecorder$EventHandler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0
.end method

.method private native setParameter(Ljava/lang/String;)V
.end method

# virtual methods
.method public native _start()V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public changeVideoBitRate(I)V
    .locals 2
    .parameter "bitRate"

    .prologue
    .line 591
    if-gtz p1, :cond_0

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

    const-string v1, "Video encoding bit rate is not positive"

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

    throw v0

    .line 594
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string/jumbo v1, "video-param-encoding-bitrate-dynamically="

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

    move-result-object v0

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

    move-result-object v0

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

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 595
    return-void
.end method

.method protected finalize()V
    .locals 0

    .prologue
    .line 1092
    invoke-direct {p0}, Landroid/media/MediaRecorder;->native_finalize()V

    return-void
.end method

.method public native getMaxAmplitude()I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public prepare()V
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;,
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    const-wide/16 v2, 0x0

    .line 690
    iget-object v0, p0, Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;

    if-eqz v0, :cond_0

    .line 691
    new-instance v6, Ljava/io/FileOutputStream;

    iget-object v0, p0, Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;

    invoke-direct {v6, v0}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    .line 693
    .local v6, fos:Ljava/io/FileOutputStream;
    :try_start_0
    invoke-virtual {v6}, Ljava/io/FileOutputStream;->getFD()Ljava/io/FileDescriptor;

    move-result-object v1

    const-wide/16 v2, 0x0

    const-wide/16 v4, 0x0

    move-object v0, p0

    invoke-direct/range {v0 .. v5}, Landroid/media/MediaRecorder;->_setOutputFile(Ljava/io/FileDescriptor;JJ)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 695
    invoke-virtual {v6}, Ljava/io/FileOutputStream;->close()V

    .line 703
    .end local v6           #fos:Ljava/io/FileOutputStream;
    :goto_0
    invoke-direct {p0}, Landroid/media/MediaRecorder;->_prepare()V

    .line 704
    return-void

    .line 695
    .restart local v6       #fos:Ljava/io/FileOutputStream;
    :catchall_0
    move-exception v0

    invoke-virtual {v6}, Ljava/io/FileOutputStream;->close()V

    throw v0

    .line 697
    .end local v6           #fos:Ljava/io/FileOutputStream;
    :cond_0
    iget-object v0, p0, Landroid/media/MediaRecorder;->mFd:Ljava/io/FileDescriptor;

    if-eqz v0, :cond_1

    .line 698
    iget-object v1, p0, Landroid/media/MediaRecorder;->mFd:Ljava/io/FileDescriptor;

    move-object v0, p0

    move-wide v4, v2

    invoke-direct/range {v0 .. v5}, Landroid/media/MediaRecorder;->_setOutputFile(Ljava/io/FileDescriptor;JJ)V

    goto :goto_0

    .line 700
    :cond_1
    new-instance v0, Ljava/io/IOException;

    const-string v1, "No valid output file"

    invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public prepare(I)V
    .locals 0
    .parameter "i"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;,
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 752
    invoke-direct {p0}, Landroid/media/MediaRecorder;->_prepare()V

    .line 753
    return-void
.end method

.method public native release()V
.end method

.method public requestVideoIFrame(I)V
    .locals 2
    .parameter "num"

    .prologue
    .line 598
    if-gtz p1, :cond_0

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

    const-string v1, "Video I frame request is not positive"

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

    throw v0

    .line 601
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string/jumbo v1, "video-param-encoding-I-frame-request="

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

    move-result-object v0

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

    move-result-object v0

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

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 602
    return-void
.end method

.method public reset()V
    .locals 2

    .prologue
    .line 814
    invoke-direct {p0}, Landroid/media/MediaRecorder;->native_reset()V

    .line 817
    iget-object v0, p0, Landroid/media/MediaRecorder;->mEventHandler:Landroid/media/MediaRecorder$EventHandler;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/media/MediaRecorder$EventHandler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    .line 818
    return-void
.end method

.method public setAudioChannels(I)V
    .locals 2
    .parameter "numChannels"

    .prologue
    .line 551
    if-gtz p1, :cond_0

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

    const-string v1, "Number of channels is not positive"

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

    throw v0

    .line 554
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "audio-param-number-of-channels="

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

    move-result-object v0

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

    move-result-object v0

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

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 555
    return-void
.end method

.method public native setAudioEncoder(I)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public setAudioEncodingBitRate(I)V
    .locals 2
    .parameter "bitRate"

    .prologue
    .line 567
    if-gtz p1, :cond_0

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

    const-string v1, "Audio encoding bit rate is not positive"

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

    throw v0

    .line 570
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "audio-param-encoding-bitrate="

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

    move-result-object v0

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

    move-result-object v0

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

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 571
    return-void
.end method

.method public setAudioSamplingRate(I)V
    .locals 2
    .parameter "samplingRate"

    .prologue
    .line 536
    if-gtz p1, :cond_0

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

    const-string v1, "Audio sampling rate is not positive"

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

    throw v0

    .line 539
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "audio-param-sampling-rate="

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

    move-result-object v0

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

    move-result-object v0

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

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 540
    return-void
.end method

.method public native setAudioSource(I)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public setAuxiliaryOutputFile(Ljava/io/FileDescriptor;)V
    .locals 2
    .parameter "fd"

    .prologue
    .line 633
    const-string v0, "MediaRecorder"

    const-string/jumbo v1, "setAuxiliaryOutputFile(FileDescriptor) is no longer supported."

    invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 634
    return-void
.end method

.method public setAuxiliaryOutputFile(Ljava/lang/String;)V
    .locals 2
    .parameter "path"

    .prologue
    .line 643
    const-string v0, "MediaRecorder"

    const-string/jumbo v1, "setAuxiliaryOutputFile(String) is no longer supported."

    invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 644
    return-void
.end method

.method public native setCamera(Landroid/hardware/Camera;)V
.end method

.method public setCaptureRate(D)V
    .locals 7
    .parameter "fps"

    .prologue
    .line 358
    const-wide/high16 v3, 0x3ff0

    div-double v0, v3, p1

    .line 359
    .local v0, timeBetweenFrameCapture:D
    const-wide v3, 0x408f400000000000L

    mul-double/2addr v3, v0

    double-to-int v2, v3

    .line 360
    .local v2, timeBetweenFrameCaptureMs:I
    const-string/jumbo v3, "time-between-time-lapse-frame-capture=%d"

    const/4 v4, 0x1

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

    const/4 v5, 0x0

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

    move-result-object v6

    aput-object v6, v4, v5

    invoke-static {v3, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, v3}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 362
    return-void
.end method

.method public setDLNADelay(Z)V
    .locals 5
    .parameter "isDelay"

    .prologue
    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 616
    const-string v3, "MediaRecorder"

    const-string/jumbo v4, "setDLNADelay"

    invoke-static {v3, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 617
    if-eqz p1, :cond_0

    move v0, v1

    .line 618
    .local v0, isDelayI:I
    :goto_0
    const-string/jumbo v3, "video-DLNA-delay=%d"

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

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

    move-result-object v4

    aput-object v4, v1, v2

    invoke-static {v3, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 619
    return-void

    .end local v0           #isDelayI:I
    :cond_0
    move v0, v2

    .line 617
    goto :goto_0
.end method

.method public setLocation(FF)V
    .locals 8
    .parameter "latitude"
    .parameter "longitude"

    .prologue
    const v7, 0x461c4000

    const-wide/high16 v5, 0x3fe0

    .line 406
    mul-float v3, p1, v7

    float-to-double v3, v3

    add-double/2addr v3, v5

    double-to-int v0, v3

    .line 407
    .local v0, latitudex10000:I
    mul-float v3, p2, v7

    float-to-double v3, v3

    add-double/2addr v3, v5

    double-to-int v1, v3

    .line 409
    .local v1, longitudex10000:I
    const v3, 0xdbba0

    if-gt v0, v3, :cond_0

    const v3, -0xdbba0

    if-ge v0, v3, :cond_1

    .line 410
    :cond_0
    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "Latitude: "

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

    move-result-object v3

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

    move-result-object v3

    const-string v4, " out of range."

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

    move-result-object v3

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

    move-result-object v2

    .line 411
    .local v2, msg:Ljava/lang/String;
    new-instance v3, Ljava/lang/IllegalArgumentException;

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

    throw v3

    .line 413
    .end local v2           #msg:Ljava/lang/String;
    :cond_1
    const v3, 0x1b7740

    if-gt v1, v3, :cond_2

    const v3, -0x1b7740

    if-ge v1, v3, :cond_3

    .line 414
    :cond_2
    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "Longitude: "

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

    move-result-object v3

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " out of range"

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

    move-result-object v3

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

    move-result-object v2

    .line 415
    .restart local v2       #msg:Ljava/lang/String;
    new-instance v3, Ljava/lang/IllegalArgumentException;

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

    throw v3

    .line 418
    .end local v2           #msg:Ljava/lang/String;
    :cond_3
    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string/jumbo v4, "param-geotag-latitude="

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

    move-result-object v3

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

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

    move-result-object v3

    invoke-direct {p0, v3}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 419
    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string/jumbo v4, "param-geotag-longitude="

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

    invoke-direct {p0, v3}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 420
    return-void
.end method

.method public native setMaxDuration(I)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalArgumentException;
        }
    .end annotation
.end method

.method public native setMaxFileSize(J)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalArgumentException;
        }
    .end annotation
.end method

.method public setOnErrorListener(Landroid/media/MediaRecorder$OnErrorListener;)V
    .locals 0
    .parameter "l"

    .prologue
    .line 868
    iput-object p1, p0, Landroid/media/MediaRecorder;->mOnErrorListener:Landroid/media/MediaRecorder$OnErrorListener;

    .line 869
    return-void
.end method

.method public setOnInfoListener(Landroid/media/MediaRecorder$OnInfoListener;)V
    .locals 0
    .parameter "listener"

    .prologue
    .line 987
    iput-object p1, p0, Landroid/media/MediaRecorder;->mOnInfoListener:Landroid/media/MediaRecorder$OnInfoListener;

    .line 988
    return-void
.end method

.method public setOrientationHint(I)V
    .locals 3
    .parameter "degrees"

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

    const/16 v0, 0x5a

    if-eq p1, v0, :cond_0

    const/16 v0, 0xb4

    if-eq p1, v0, :cond_0

    const/16 v0, 0x10e

    if-eq p1, v0, :cond_0

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

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "Unsupported angle: "

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

    move-result-object v1

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

    move-result-object v1

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

    move-result-object v1

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

    throw v0

    .line 386
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string/jumbo v1, "video-param-rotation-angle-degrees="

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

    move-result-object v0

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

    move-result-object v0

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

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 387
    return-void
.end method

.method public setOutputFile(Ljava/io/FileDescriptor;)V
    .locals 1
    .parameter "fd"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation

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

    iput-object v0, p0, Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;

    .line 657
    iput-object p1, p0, Landroid/media/MediaRecorder;->mFd:Ljava/io/FileDescriptor;

    .line 658
    return-void
.end method

.method public setOutputFile(Ljava/lang/String;)V
    .locals 1
    .parameter "path"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation

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

    iput-object v0, p0, Landroid/media/MediaRecorder;->mFd:Ljava/io/FileDescriptor;

    .line 671
    iput-object p1, p0, Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;

    .line 672
    return-void
.end method

.method public native setOutputFormat(I)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public setPreviewDisplay(Landroid/view/Surface;)V
    .locals 0
    .parameter "sv"

    .prologue
    .line 133
    iput-object p1, p0, Landroid/media/MediaRecorder;->mSurface:Landroid/view/Surface;

    .line 134
    return-void
.end method

.method public setProfile(Landroid/media/CamcorderProfile;)V
    .locals 2
    .parameter "profile"

    .prologue
    .line 327
    iget v0, p1, Landroid/media/CamcorderProfile;->fileFormat:I

    invoke-virtual {p0, v0}, Landroid/media/MediaRecorder;->setOutputFormat(I)V

    .line 328
    iget v0, p1, Landroid/media/CamcorderProfile;->videoFrameRate:I

    invoke-virtual {p0, v0}, Landroid/media/MediaRecorder;->setVideoFrameRate(I)V

    .line 329
    iget v0, p1, Landroid/media/CamcorderProfile;->videoFrameWidth:I

    iget v1, p1, Landroid/media/CamcorderProfile;->videoFrameHeight:I

    invoke-virtual {p0, v0, v1}, Landroid/media/MediaRecorder;->setVideoSize(II)V

    .line 330
    iget v0, p1, Landroid/media/CamcorderProfile;->videoBitRate:I

    invoke-virtual {p0, v0}, Landroid/media/MediaRecorder;->setVideoEncodingBitRate(I)V

    .line 331
    iget v0, p1, Landroid/media/CamcorderProfile;->videoCodec:I

    invoke-virtual {p0, v0}, Landroid/media/MediaRecorder;->setVideoEncoder(I)V

    .line 332
    iget v0, p1, Landroid/media/CamcorderProfile;->quality:I

    const/16 v1, 0x3e8

    if-lt v0, v1, :cond_0

    iget v0, p1, Landroid/media/CamcorderProfile;->quality:I

    const/16 v1, 0x3ef

    if-gt v0, v1, :cond_0

    .line 335
    const-string/jumbo v0, "time-lapse-enable=1"

    const/4 v1, 0x0

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

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 342
    :goto_0
    return-void

    .line 337
    :cond_0
    iget v0, p1, Landroid/media/CamcorderProfile;->audioBitRate:I

    invoke-virtual {p0, v0}, Landroid/media/MediaRecorder;->setAudioEncodingBitRate(I)V

    .line 338
    iget v0, p1, Landroid/media/CamcorderProfile;->audioChannels:I

    invoke-virtual {p0, v0}, Landroid/media/MediaRecorder;->setAudioChannels(I)V

    .line 339
    iget v0, p1, Landroid/media/CamcorderProfile;->audioSampleRate:I

    invoke-virtual {p0, v0}, Landroid/media/MediaRecorder;->setAudioSamplingRate(I)V

    .line 340
    iget v0, p1, Landroid/media/CamcorderProfile;->audioCodec:I

    invoke-virtual {p0, v0}, Landroid/media/MediaRecorder;->setAudioEncoder(I)V

    goto :goto_0
.end method

.method public setRTPParameters(Ljava/lang/String;)V
    .locals 3
    .parameter "RTPandIP"

    .prologue
    .line 612
    const-string/jumbo v0, "video-param-rtp-port-ipAdd=%s"

    const/4 v1, 0x1

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

    const/4 v2, 0x0

    aput-object p1, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 613
    return-void
.end method

.method public setRTPPause()V
    .locals 2

    .prologue
    .line 623
    const-string/jumbo v0, "video-param-rtp-pause=1"

    const/4 v1, 0x0

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

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 624
    return-void
.end method

.method public native setVideoEncoder(I)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public setVideoEncodingBitRate(I)V
    .locals 2
    .parameter "bitRate"

    .prologue
    .line 583
    if-gtz p1, :cond_0

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

    const-string v1, "Video encoding bit rate is not positive"

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

    throw v0

    .line 586
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string/jumbo v1, "video-param-encoding-bitrate="

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

    move-result-object v0

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

    move-result-object v0

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

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 587
    return-void
.end method

.method public native setVideoFrameRate(I)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public setVideoIFrameInterval(F)V
    .locals 4
    .parameter "interval"

    .prologue
    .line 606
    const-string/jumbo v0, "video-param-i-frames-intervalInms=%f"

    const/4 v1, 0x1

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

    const/4 v2, 0x0

    invoke-static {p1}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/media/MediaRecorder;->setParameter(Ljava/lang/String;)V

    .line 607
    return-void
.end method

.method public native setVideoSize(II)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public native setVideoSource(I)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method

.method public start()V
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation

    .prologue
    .line 770
    :try_start_0
    invoke-virtual {p0}, Landroid/media/MediaRecorder;->_start()V
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_1

    .line 790
    return-void

    .line 772
    :catch_0
    move-exception v1

    .line 773
    .local v1, ex:Ljava/lang/IllegalStateException;
    throw v1

    .line 775
    .end local v1           #ex:Ljava/lang/IllegalStateException;
    :catch_1
    move-exception v1

    .line 776
    .local v1, ex:Ljava/lang/RuntimeException;
    const-string v3, "MediaRecorder"

    const-string/jumbo v4, "start failed."

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 777
    iget-object v3, p0, Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;

    if-eqz v3, :cond_0

    .line 779
    const-string v3, "MediaRecorder"

    new-instance v4, Ljava/lang/StringBuilder;

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

    const-string/jumbo v5, "try to delete broken file: "

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

    move-result-object v4

    iget-object v5, p0, Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;

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

    move-result-object v4

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

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 781
    :try_start_1
    new-instance v2, Ljava/io/File;

    iget-object v3, p0, Landroid/media/MediaRecorder;->mPath:Ljava/lang/String;

    invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 782
    .local v2, file:Ljava/io/File;
    invoke-virtual {v2}, Ljava/io/File;->delete()Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2

    .line 788
    .end local v2           #file:Ljava/io/File;
    :cond_0
    :goto_0
    throw v1

    .line 784
    :catch_2
    move-exception v0

    .line 785
    .local v0, e:Ljava/lang/Exception;
    const-string v3, "MediaRecorder"

    new-instance v4, Ljava/lang/StringBuilder;

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

    const-string v5, "Delete file failed: "

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

    move-result-object v4

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v5

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

    move-result-object v4

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

    move-result-object v4

    invoke-static {v3, v4, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0
.end method

.method public native stop()V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation
.end method


text:
import StatementItem from "./../StatementItem";

export default class StatementParser {

	public parse(statementText: string[]): StatementItem[] {
		let items = [],
			cardNumber = null,
			startIndex = this.indexOfNextTransactionRow(statementText, 0);

		while (startIndex > -1)
		{
			let index = startIndex;

			while (index < statementText.length) {
				if (this.textIsInternationTransanctionFee(statementText[index])) {
					index += 1;
				}

				if (this.textIsCardNumber(statementText[index])) {
					cardNumber = this.parseCardNumber(statementText[index]);
					index += 1;
				}

				if (this.textIsRowEnding(statementText[index]) ||
					this.textIsTransactionsEnd(statementText[index])) {
					break;
				}

				if (index + 4 >= statementText.length)
				{
					// Parser has reached the end of the statement text
					break;
				}

				let date = statementText[index],
					transactionDetails = statementText[index + 1],
					amount = statementText[index + 2],
					referenceNumber = statementText[index + 3],
					foreignCurrencyAmount = "";

				if (!this.textMatchesTransactionRow(date, amount, referenceNumber))
				{
					index += 1;
					continue;
				}

				index += 4;

				if (this.textIsForeignCurrencyAmount(statementText[index])) {
					foreignCurrencyAmount = statementText[index];
					index += 1;
				}

				items.push(new StatementItem(cardNumber, date, transactionDetails, referenceNumber, amount, foreignCurrencyAmount));
			}

			startIndex = this.indexOfNextTransactionRow(statementText, index);
		}

		return items;
	}

	private indexOfNextTransactionRow(statementText: string[], searchFrom: number): number {
		let index = -1;

		for (let i = searchFrom; i < statementText.length; i++) {
			if ((statementText[i] == "Transactions" || statementText[i] == "Transactions (Continued)")&&
				statementText[i + 1] == "Date" &&
				statementText[i + 2] == "Transaction Details" &&
				statementText[i + 3] == "Reference Number" &&
				statementText[i + 4] == "Amount")
			{
				return i + 5;
			}
		}

		return index;
	}

	private textIsCardNumber(text: string): boolean {
		return /Card Number (\d\d\d\d \d\d\d\d \d\d\d\d \d\d\d\d)/.test(text);
	}

	private parseCardNumber(text: string): string {
		return text.match(/Card Number (\d\d\d\d \d\d\d\d \d\d\d\d \d\d\d\d)/)[1];
	}

	private textIsRowEnding(text: string): boolean {
		return text === "(Continued next page)" ||
			/Page \d of \d, (January|February|March|April|May|June|July|August|September|October|November|December) \d\d\d\d/.test(text);
	}

	private textIsTransactionsEnd(text: string): boolean {
		return text === "Closing Balance" || text === "Total Citi Card Transactions ";
	}

	private textIsForeignCurrencyAmount(text: string): boolean {
		return text.startsWith("Foreign Amount ");
	}

	private textIsInternationTransanctionFee(text: string): boolean {
		return /AUD (\d)*.\d\d includes International Transaction fee AUD (\d)*.\d\d/.test(text);
	}

	private textMatchesTransactionRow(date: string, amount: string, referenceNumber: string): boolean {
		return /(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d\d/.test(date) &&
			/\d+.\d+/.test(amount) &&
			(/\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/.test(referenceNumber) || /\D\D\D\D\d\d\d\d\d\d\d\d\d\d\d\d\d\d/.test(referenceNumber))
	}
}

redpajama_set_name: RedPajamaGithub


text:
remote_file "/tmp/#{node[:splunk][:package_name]}" do
  source node[:splunk][:package_url]
  not_if { ::File.exists?("/tmp/#{node[:splunk][:package_name]}") }
end

execute "Install splunk from debian package, accept license and start on server boot" do
  command "dpkg -i /tmp/#{node[:splunk][:package_name]}; #{node[:splunk][:bin_path]}/splunk start --accept-license; #{node[:splunk][:bin_path]}/splunk enable boot-start"
  not_if {::File.exists?( node[:splunk][:bin_path] ) }
end

service "splunk" do
  service_name "splunk"
  start_command "#{node[:splunk][:bin_path]}/splunk start"
  stop_command "#{node[:splunk][:bin_path]}/splunk stop"
  restart_command "#{node[:splunk][:bin_path]}/splunk restart"

  supports [ :start, :stop, :restart ]
  action [:start]
end

execute "Listen for data being forwarded" do
 command "#{node[:splunk][:bin_path]}/splunk enable listen #{node[:splunk][:reciever][:port]} -auth '#{node[:splunk][:reciever][:username]}':'#{node[:splunk][:reciever][:password]}'"
 returns [0,24] #24 indicates the port is already configured to be listened on
end

template "#{node[:splunk][:install_path]}/etc/system/local/inputs.conf" do
  source "indexer/inputs.conf.erb"
  variables :files_to_monitor => node[:splunk][:files_to_monitor],
            :port             => node[:splunk][:reciever][:port],
            :tcp_compressed   => true
  notifies :restart, resources(:service => "splunk")
end

template "#{node[:splunk][:install_path]}/etc/system/local/props.conf" do
  source "indexer/props.conf.erb"
  notifies :restart, resources(:service => "splunk")
end


text:
package org.spongepowered.mod.mixin.core.item;

import org.spongepowered.api.item.Enchantment;
import org.spongepowered.api.item.ItemTypes;
import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

@Mixin(net.minecraft.enchantment.Enchantment.class)
public abstract class MixinEnchantment implements Enchantment {

    @Shadow public abstract boolean canApply(net.minecraft.item.ItemStack stack);
    @Shadow(remap = false)
    public abstract boolean isAllowedOnBooks();

    @Override
    public boolean canBeAppliedToStack(ItemStack stack) {
        return (stack.getItem() == ItemTypes.BOOK) ? isAllowedOnBooks() : canApply((net.minecraft.item.ItemStack) stack);
    }

}


text:
<resources>
    <string name="app_name">Example</string>

    <string name="all_baseratingbar_title">BaseRatingBar</string>
    <string name="all_scaleratingbar_title">ScaleRatingBar</string>
    <string name="all_rotationratingbar_title">RotationRatingBar</string>
    <string name="all_add_rating_title">Add rating</string>
</resources>


text:
package eu.aylett.atunit.spring;

import java.lang.annotation.*;

/**
 * Specifies the location of Spring XML context configuration file to load. The
 * classpath will be searched for the name provided. Bean definitions loaded
 * from the XML file will be merged into the same context as bean definitions
 * from test class fields.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Inherited
public @interface Context {

    String value();

}


text:
set -e

target_repo=${1-sonatanfv}

# empty vnf
docker push $target_repo/sonata-empty-vnf

# iperf3 vnf
docker push $target_repo/sonata-iperf3-vnf

# snort IDS vnf
docker push $target_repo/sonata-snort-ids-vnf

# ovs1 vnf
docker push $target_repo/sonata-ovs1-vnf
# ovs-userspace vnf
docker push $target_repo/sonata-ovs-user-vnf

# ryu-snort vnf
docker push $target_repo/sonata-ryu-snort-vnf

# ryu vnf
docker push $target_repo/sonata-ryu-vnf

# son-emu-sap vnf
docker push $target_repo/son-emu-sap

# vtc vnf
#docker push $target_repo/sonata-vtc-vnf

# snort IDS vnf for ovs fw
docker push $target_repo/sonata-snort-ovs-vnf

# fw vnf
docker push $target_repo/sonata-fw-vnf

# stress vnf
docker push $target_repo/sonata-stress-vnf

# squid vnf
docker push $target_repo/sonata-squid-vnf

# nginx loadbalancer vnf
docker push $target_repo/sonata-nginx-lb-vnf

# apache bench vnf
docker push $target_repo/sonata-apache-bench-vnf

# apache server vnf
docker push $target_repo/sonata-apache-server-vnf


text:
(function (module, undefined) {

    controller.$inject = ['$scope', '$attrs', 'phResolveFactory', '$routeParams'];
    function controller(scope, attrs, phFactory, params) {
        var factory = phFactory(attrs.options, attrs.override, attrs.path),
            self = resolveSelf(),
            forEach = angular.forEach,
            bind = angular.bind,
            isFunction = angular.isFunction,
            isEmpty = module.isEmpty;

        function resolveSelf() {
            var obj;
            if (factory.as) {
                if (obj = scope[factory.as]) {
                    return obj;
                }
                else {
                    return scope[factory.as] = {};
                }
            }
            return scope;
        }
        function createModel() {
            self.model = {};
        }
        function bindEval() {
            self.phEval = bind(scope, scope.$eval)
        }

        function resolvePath() {
            if (factory.regexPath) {
                var result = factory.regexPath.regexp.exec(attrs.path);
                if (result) {
                    factory.path = attrs.path;
                }
            }
        }

        function resolveCommandFunction(key, fn) {
            self[key] = function () {
                if (factory.ajaxCmd === key) {
                    resolvePath();
                }
                fn.call(self, factory, arguments);
            };
        }

        function bindFactories() {
            forEach(['config', 'before', 'success', 'error', 'auto'], function (value) {
                var fct = factory[value];
                forEach(fct, function (fn, key) {
                    if (isFunction(fn)) {
                        fct[key] = bind(self, fn);
                    }
                })
            });
        }

        function processCommand() {
            forEach(factory.cmd, function (fn, key) {
                if (isFunction(fn)) {
                    resolveCommandFunction(key, fn);
                }
            });
        }

        function processInitValues() {
            factory.init && self.phEval(factory.init);
        }

        function restoreCache() {
            var x = factory.cacheKey
        }

        function processRouteParams() {
            if (!isEmpty(params)) {
                self['params'] = params;
            }
        }

        function checkPath(fn) {
            if (factory.regexPath) {
                attrs.$observe('path', function (value) {
                    var result = factory.regexPath.regexp.exec(value);
                    if (result) {
                        factory.path = value;
                        fn();
                    };
                });
            } else {
                fn();
            }
        }

        function runAuto() {
            var fnauto = (factory.cmd && factory.cmd[factory.auto]) ? self[factory.auto] : undefined;
            if (isFunction(fnauto)) {
                checkPath(fnauto);
            }
        }
        createModel();
        bindEval();
        bindFactories();
        processCommand();
        processInitValues();
        processRouteParams();
        restoreCache();
        runAuto();

    }

    function phAjax() {

        return {
            restrict: 'EA',
            scope: true,
            dynamicScope: function (attr) {
                var value = attr.scope;
                return (value) ? (value.toLowerCase() === "true") ? true : false : true;
            },
            controller: controller
        };
    }

    module.directive('phAjax', phAjax);

})(angular.module('phCrud'));


text:
require "chef/provider/package"
require "chef/resource/apt_package"

class Chef
  class Provider
    class Package
      class Apt < Chef::Provider::Package
        use_multipackage_api

        provides :package, platform_family: "debian"
        provides :apt_package, os: "linux"

        def initialize(new_resource, run_context)
          super
        end

        def load_current_resource
          @current_resource = Chef::Resource::AptPackage.new(new_resource.name)
          current_resource.package_name(new_resource.package_name)
          current_resource.version(get_current_versions)
          current_resource
        end

        def define_resource_requirements
          super

          requirements.assert(:all_actions) do |a|
            a.assertion { !new_resource.source }
            a.failure_message(Chef::Exceptions::Package, "apt package provider cannot handle source attribute. Use dpkg provider instead")
          end
        end

        def package_data
          @package_data ||= Hash.new do |hash, key|
            hash[key] = package_data_for(key)
          end
        end

        def get_current_versions
          package_name_array.map do |package_name|
            package_data[package_name][:current_version]
          end
        end

        def get_candidate_versions
          package_name_array.map do |package_name|
            package_data[package_name][:candidate_version]
          end
        end

        def candidate_version
          @candidate_version ||= get_candidate_versions
        end

        def package_locked(name, version)
          locked = shell_out_compact_timeout!("apt-mark", "showhold")
          locked_packages = locked.stdout.each_line.map do |line|
            line.strip
          end
          name.all? { |n| locked_packages.include? n }
        end

        def install_package(name, version)
          package_name = name.zip(version).map do |n, v|
            package_data[n][:virtual] ? n : "#{n}=#{v}"
          end
          run_noninteractive("apt-get", "-q", "-y", config_file_options, default_release_options, options, "install", package_name)
        end

        def upgrade_package(name, version)
          install_package(name, version)
        end

        def remove_package(name, version)
          package_name = name.map do |n|
            package_data[n][:virtual] ? resolve_virtual_package_name(n) : n
          end
          run_noninteractive("apt-get", "-q", "-y", options, "remove", package_name)
        end

        def purge_package(name, version)
          package_name = name.map do |n|
            package_data[n][:virtual] ? resolve_virtual_package_name(n) : n
          end
          run_noninteractive("apt-get", "-q", "-y", options, "purge", package_name)
        end

        def preseed_package(preseed_file)
          Chef::Log.info("#{new_resource} pre-seeding package installation instructions")
          run_noninteractive("debconf-set-selections", preseed_file)
        end

        def reconfig_package(name, version)
          Chef::Log.info("#{new_resource} reconfiguring")
          run_noninteractive("dpkg-reconfigure", name)
        end

        def lock_package(name, version)
          run_noninteractive("apt-mark", options, "hold", name)
        end

        def unlock_package(name, version)
          run_noninteractive("apt-mark", options, "unhold", name)
        end

        private

        # compare 2 versions to each other to see which is newer.
        # this differs from the standard package method because we
        # need to be able to parse debian version strings which contain
        # tildes which Gem cannot properly parse
        #
        # @return [Integer] 1 if v1 > v2. 0 if they're equal. -1 if v1 < v2
        def version_compare(v1, v2)
          if !shell_out_compact_timeout("dpkg", "--compare-versions", v1.to_s, "gt", v2.to_s).error?
            1
          elsif !shell_out_compact_timeout("dpkg", "--compare-versions", v1.to_s, "eq", v2.to_s).error?
            0
          else
            -1
          end
        end

        # Runs command via shell_out with magic environment to disable
        # interactive prompts. Command is run with default localization rather
        # than forcing locale to "C", so command output may not be stable.
        def run_noninteractive(*args)
          shell_out_compact_timeout!(*args, env: { "DEBIAN_FRONTEND" => "noninteractive" })
        end

        def default_release_options
          # Use apt::Default-Release option only if provider supports it
          if new_resource.respond_to?(:default_release) && new_resource.default_release
            [ "-o", "APT::Default-Release=#{new_resource.default_release}" ]
          end
        end

        def config_file_options
          # If the user has specified config file options previously, respect those.
          return if Array(options).any? { |opt| opt =~ /--force-conf/ }

          # It doesn't make sense to install packages in a scenario that can
          # result in a prompt. Have users decide up-front whether they want to
          # forcibly overwrite the config file, otherwise preserve it.
          if new_resource.overwrite_config_files
            [ "-o", "Dpkg::Options::=--force-confnew" ]
          else
            [ "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold" ]
          end
        end

        def resolve_package_versions(pkg)
          current_version = nil
          candidate_version = nil
          run_noninteractive("apt-cache", default_release_options, "policy", pkg).stdout.each_line do |line|
            case line
            when /^\s{2}Installed: (.+)$/
              current_version = ( $1 != "(none)" ) ? $1 : nil
              Chef::Log.debug("#{new_resource} installed version for #{pkg} is #{$1}")
            when /^\s{2}Candidate: (.+)$/
              candidate_version = ( $1 != "(none)" ) ? $1 : nil
              Chef::Log.debug("#{new_resource} candidate version for #{pkg} is #{$1}")
            end
          end
          [ current_version, candidate_version ]
        end

        def resolve_virtual_package_name(pkg)
          showpkg = run_noninteractive("apt-cache", "showpkg", pkg).stdout
          partitions = showpkg.rpartition(/Reverse Provides: ?#{$/}/)
          return nil if partitions[0] == "" && partitions[1] == "" # not found in output
          set = partitions[2].lines.each_with_object(Set.new) do |line, acc|
            # there may be multiple reverse provides for a single package
            acc.add(line.split[0])
          end
          if set.size > 1
            raise Chef::Exceptions::Package, "#{new_resource.package_name} is a virtual package provided by multiple packages, you must explicitly select one"
          end
          set.to_a.first
        end

        def package_data_for(pkg)
          virtual           = false
          current_version   = nil
          candidate_version = nil

          current_version, candidate_version = resolve_package_versions(pkg)

          if candidate_version.nil?
            newpkg = resolve_virtual_package_name(pkg)

            if newpkg
              virtual = true
              Chef::Log.info("#{new_resource} is a virtual package, actually acting on package[#{newpkg}]")
              current_version, candidate_version = resolve_package_versions(newpkg)
            end
          end

          {
            current_version:    current_version,
            candidate_version:  candidate_version,
            virtual:            virtual,
          }
        end

      end
    end
  end
end


text:
(function () {
    'use strict';

    angular.module('mean.dashboard')
        .controller('BroadcastModalController', BroadcastModalController);

    BroadcastModalController.$inject = ['$q', '$scope', '$modalInstance', 'clients', 'dashboards', 'edit'];

    function BroadcastModalController($q, $scope, $modalInstance, clients, dashboards, edit) {
        var modal = this;

        var allClientsTag = {
            name: 'All Clients',
            _id: '__all__'
        };

        modal.dateOptions = {};
        modal.clients = clients;

        modal.dashboards = dashboards;
        modal.broadcast = angular.copy(edit);
        modal.ok = ok;
        modal.cancel = cancel;
        modal.open = open;
        modal.getClients = getClients;

        activate();

        ///////////////////////////////////////

        function activate() {
            if (modal.broadcast.allClients) {
                modal.broadcast.clients = [allClientsTag];
            } else {
                angular.forEach(modal.broadcast.clients, function (client) {
                    client.name = modal.clients.filter(function (fullClientDetails) {
                        return fullClientDetails.ip = client.ip;
                    })[0].name;
                });
            }
        }

        function ok() {
            $modalInstance.close(modal.broadcast);
        };

        function cancel() {
            $modalInstance.dismiss();
        };

        function open($event, time) {
            $event.preventDefault();
            $event.stopPropagation();

            modal[time + 'Opened'] = true;
        };

        function getClients(query) {
            var deferred = $q.defer();
            var result = modal.clients.filter(function (client) {
                return client.name.toLowerCase().indexOf(query.toLowerCase()) === 0;
            });
            result.unshift(allClientsTag);
            deferred.resolve(result);
            return deferred.promise;
        }

    }
})();


text:
class AddIniciativeToNotification < ActiveRecord::Migration
  def change
    add_column :notifications, :iniciative_id, :integer
  end
end


text:
const gulp = require('gulp')
const path = require('path')
const fs = require('fs')
const inject = require('gulp-inject');
const runSequence = require('run-sequence')
const _ = require('lodash')

const folders = {
  app: path.resolve(__dirname, 'app'),
  components: path.resolve(__dirname, 'app', 'components'),
  schemas: path.resolve(__dirname, 'app', 'services', 'schemas'),
  css: path.resolve(__dirname, 'app', 'css'),
  views: path.resolve(__dirname, 'app', 'views'),
  hooks: path.resolve(__dirname, 'server', 'hooks'),
  root: path.resolve(__dirname)
}

function generateInject(injectTo, outputFolder, arrayOfFilesToInject, startTag, importStatement, extractFileName) {
  return gulp.src(injectTo)
    .pipe(inject(gulp.src(arrayOfFilesToInject, {
      read: false
    }), {
      relative: true,
      starttag: "// " + startTag,
      endtag: "// end " + startTag,
      transform: function(filepath, file, i, length) {
        if(extractFileName) {
          var title = filepath.replace(/^.*[\\\/]/, '')

          title = _.camelCase(title.substr(0, title.lastIndexOf('.')))

          if(importStatement === 'vueGlobal') {
            var path
            if (filepath.indexOf('..') !== -1) {
              path = 'require("' + filepath + '")'
            } else {
              path = 'require("./' + filepath + '")'
            }
            return `Vue.component('${title}', ${path})`
          } else if(importStatement !== 'require') {
            if (filepath.indexOf('..') !== -1) {
              return importStatement + '("' + filepath + '")'
            } else {
              return importStatement + '("./' + filepath + '")'
            }
          } else {
            if (filepath.indexOf('..') !== -1) {
              return title + ': require("' + filepath + '"),'
            } else {
              return title + ': require("./' + filepath + '"),'
            }
          }

        } else {
          if(extractFileName) {
            var title = filepath.replace(/^.*[\\\/]/, '')
            title = title.substr(0, title.lastIndexOf('.')).replace('-', '_')
            if(importStatement !== 'require') {
              if (filepath.indexOf('..') !== -1) {
                return 'var ' + title + ' = require("' + filepath + '")'
              } else {
                return 'var ' + title + ' = require("./' + filepath + '")'
              }
            } else {
              if (filepath.indexOf('..') !== -1) {
                return title + ': require("' + filepath + '"),'
              } else {
                return title + ': require("./' + filepath + '"),'
              }
            }

          } else {
            if (filepath.indexOf('..') !== -1) {
              if(importStatement) {
                return importStatement + '("' + filepath + '")'
              }
              return 'require("' + filepath + '")'
            } else {
              if(importStatement) {
                return importStatement + '("./' + filepath + '")'
              }
              return 'require("./' + filepath + '")'
            }
          }

          if (filepath.indexOf('..') !== -1) {
            return 'require("' + filepath + '")'
          } else {
            return 'require("./' + filepath + '")'
          }
        }
      }
    }))
    .pipe(gulp.dest(outputFolder))
}

gulp.task('inject-component-js', function() {
  return generateInject(
    path.join(folders.components, 'index.js'),
    folders.components,
    [
      folders.components + '/**/*.js',
      '!**/*spec.js',
      '!**/*mock.js',
    ],
    'inject component js'
  )
})

gulp.task('inject-vue', function() {
  return generateInject(
    path.join(folders.views, 'index.js'),
    folders.views,
    [
      folders.app + '/views/**/*.vue',
      '!' + folders.app + '/views/app.vue'
    ],
    'inject vue'
  )
})

gulp.task('inject-css', function() {
  console.log('inject-css');
  return generateInject(
    path.join(folders.css, 'app.styl'),
    folders.css,
    [
      folders.app + '/components/**/*.css',
      folders.app + '/css/**/*.css',
      folders.app + '/components/**/*.styl',
      folders.app + '/css/**/*.styl',
      "!**/vendor.scss",
      "!**/app.styl",
    ],
    'inject css',
    '@import'
  )
})

gulp.task('inject-views', function() {
  return generateInject(
    path.join(folders.app, 'routes.js'),
    folders.app,
    [
      folders.views + '/**/*.vue',
      '!' + folders.views + '/**/app.vue',
    ],
    'inject views',
    'require',
    true
  )
})

gulp.task('inject-schemas', function() {
  return generateInject(
    path.join(folders.schemas, 'index.js'),
    folders.schemas,
    [
      folders.schemas + '/**/*.js',
      '!' + folders.schemas + '/**/index.js',
    ],
    'inject schemas',
    'require',
    true
  )
})

gulp.task('inject-hooks', function() {
  return generateInject(
    path.join(folders.hooks, 'index.js'),
    folders.hooks,
    [
      folders.hooks + '/**/*.js',
      '!' + folders.hooks + '/**/index.js',
    ],
    'inject hooks',
    'require',
    true
  )
})

gulp.task('globalize-vue-components', function() {
  return generateInject(
    path.join(folders.components, 'index.js'),
    folders.components,
    [
      folders.components + '/**/*.vue',
      '!' + folders.components + '/**/index.js'
    ],
    'globalize vue components',
    'vueGlobal',
    true
  )
})

gulp.task('default', function(done) {
  runSequence('inject-css', 'inject-schemas', 'inject-component-js', 'inject-vue', 'inject-views', 'inject-hooks', 'globalize-vue-components', done)
})


text:
Ignore CSS
==========

Ignore CSS requires server side. This library is used to blend client and server side code by ignoring CSS requires when using webpack. Currently the only way to require CSS files is to place them into the render method of a component. This is an attempt to push that further up so that CSS can be combined at an earlier stage.


text:
SET RESOLUTION=720p
SET RESOLUTION_QUALITY=HQ

CALL "%~dp0.\handbrake.transcode-x264.cmd" %*


text:
As of May 25, 2014  5:08pm. 11 total, _1 unapproved_

## Summary
  * 8 MIT
  * 1 LGPL
  * 1 BSD
  * 1 Apache 2.0

1 unapproved dependencies

* thread_safe (Apache-2.0)

## Items

### [bundler](http://bundler.io) v1.5.3

| Summary | License | Approved? |
|---------|-------------|---------|
|The best way to manage your application's dependencies|MIT| Yes |

> Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably

### [color](http://color.rubyforge.org) v1.6(default)

| Summary | License | Approved? |
|---------|-------------|---------|
|Color is a Ruby library to provide basic RGB, CMYK, HSL, and other colourspace manipulation support to applications that require it|MIT| Yes |

> Color is a Ruby library to provide basic RGB, CMYK, HSL, and other colourspace
> manipulation support to applications that require it. It also provides 152
> named RGB colours (184 with spelling variations) that are commonly supported in
> HTML, SVG, and X11 applications. A technique for generating monochromatic
> contrasting palettes is also included.
>
> The Color library performs purely mathematical manipulation of the colours
> based on colour theory without reference to colour profiles (such as sRGB or
> Adobe RGB). For most purposes, when working with RGB and HSL colour spaces,
> this won't matter. Absolute colour spaces (like CIE L*a*b* and XYZ) and cannot
> be reliably converted to relative colour spaces (like RGB) without colour
> profiles.
>
> Color version 1.6 primarily adds a colour matching method for RGB and
> experimental CIE L*a*b* and XYZ conversion methods for use with the colour
> matching method.
>
> Barring bugs introduced in this release, this is the last version of color that
> supports Ruby 1.8, so make sure that your gem specification is set properly (to
> <tt>~> 1.6</tt>) if that matters for your application.

### [ffi](http://wiki.github.com/ffi/ffi) v1.9.3

| Summary | License | Approved? |
|---------|-------------|---------|
|Ruby FFI|BSD| Yes |

> Ruby FFI library

### [kwalify](http://www.kuwata-lab.com/kwalify/) v0.7.2(default)

| Summary | License | Approved? |
|---------|-------------|---------|
|a parser, schema validator, and data-binding tool for YAML and JSON.|MIT| Yes |

>    Kwalify is a parser, schema validator, and data binding tool for YAML and JSON.

### [libusb](http://github.com/larskanis/libusb) v0.4.1(default)

| Summary | License | Approved? |
|---------|-------------|---------|
|Access USB devices from Ruby via libusb-1.0|LGPL| Yes |

> LIBUSB is a Ruby binding that gives Ruby programmers access to arbitrary USB devices

### [mini_portile](http://github.com/luislavena/mini_portile) v0.6.0

| Summary | License | Approved? |
|---------|-------------|---------|
|Simplistic port-like solution for developers|MIT| Yes |

> Simplistic port-like solution for developers. It provides a standard and simplified way to compile against dependency libraries without messing up your system.

### [nokogiri](http://nokogiri.org) v1.6.2.1(default)

| Summary | License | Approved? |
|---------|-------------|---------|
|Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser|MIT| Yes |

> Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser.  Among Nokogiri's
> many features is the ability to search documents via XPath or CSS3 selectors.
>
> XML is like violence - if it doesn't solve your problems, you are not using
> enough of it.

### [rake](https://github.com/jimweirich/rake) v10.3.2(default)

| Summary | License | Approved? |
|---------|-------------|---------|
|Rake is a Make-like program implemented in Ruby|MIT| Yes |

> Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
> specified in standard Ruby syntax.
>
> Rake has the following features:
>
> * Rakefiles (rake's version of Makefiles) are completely defined in
>   standard Ruby syntax.  No XML files to edit.  No quirky Makefile
>   syntax to worry about (is that a tab or a space?)
>
> * Users can specify tasks with prerequisites.
>
> * Rake supports rule patterns to synthesize implicit tasks.
>
> * Flexible FileLists that act like arrays but know about manipulating
>   file names and paths.
>
> * A library of prepackaged tasks to make building rakefiles easier. For example,
>   tasks for building tarballs and publishing to FTP or SSH sites.  (Formerly
>   tasks for building RDoc and Gems were included in rake but they're now
>   available in RDoc and RubyGems respectively.)
>
> * Supports parallel execution of tasks.

### [rufus-scheduler](http://github.com/jmettraux/rufus-scheduler) v3.0.7(default)

| Summary | License | Approved? |
|---------|-------------|---------|
|job scheduler for Ruby (at, cron, in and every jobs)|MIT| Yes |

> job scheduler for Ruby (at, cron, in and every jobs).

### [thread_safe](https://github.com/headius/thread_safe) v0.3.3

| Summary | License | Approved? |
|---------|-------------|---------|
|A collection of data structures and utilities to make thread-safe programming in Ruby easier|Apache-2.0| _*No*_ |

> Thread-safe collections and utilities for Ruby

### [tzinfo](http://tzinfo.github.io) v1.1.0

| Summary | License | Approved? |
|---------|-------------|---------|
|Daylight savings aware timezone library|MIT| Yes |

> TZInfo provides daylight savings aware transformations between times in different time zones.


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest
    package="com.fei_ke.chiphellclient"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="9"
    android:versionName="1.2.2">

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="21"/>

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application
        android:name=".ChhApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:logo="@drawable/logo_white"
        android:theme="@style/AppTheme"
        >
        <activity
            android:name="com.fei_ke.chiphellclient.ui.activity.MainActivity_"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.MainActivity"
            android:windowSoftInputMode="adjustPan|stateHidden"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity android:name="com.fei_ke.chiphellclient.ui.activity.LoginActivity_"/>
        <activity
            android:name="com.fei_ke.chiphellclient.ui.activity.ThreadDetailActivity_"
            android:exported="true"
            android:windowSoftInputMode="adjustPan|stateHidden">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>

                <data
                    android:host="www.chiphell.com"
                    android:scheme="http"/>

                <data
                    android:host="www.chiphell.com"
                    android:scheme="https"/>
            </intent-filter>
        </activity>
        <activity android:name="com.fei_ke.chiphellclient.ui.activity.AlbumActivity_"/>
        <activity android:name="com.fei_ke.chiphellclient.ui.activity.AboutActivity_"/>
        <activity android:name="com.fei_ke.chiphellclient.ui.activity.SoftwareNoticesActivity"/>
        <activity android:name="com.fei_ke.chiphellclient.ui.activity.SettingActivity"/>
        <activity
            android:name=".ui.activity.UpdateActivity_"
            android:theme="@style/AppTheme.UpdateActivity"/>
        <!-- 友盟相关 -->
        <service
            android:name="com.umeng.update.net.DownloadingService"
            android:process=":DownloadingService">
        </service>

        <meta-data
            android:name="UMENG_APPKEY"
            android:value="539dc70d56240ba62712fe72"/>
        <meta-data
            android:name="UMENG_CHANNEL"
            android:value="${UMENG_CHANNEL_VALUE}"/>

    </application>

</manifest>


text:
<?php
/**
 * Created by PhpStorm.
 * User: i2070p
 * Date: 2015-03-08
 * Time: 17:36
 */

namespace MainBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\UserInterface;
/**
 * @ORM\Entity
 */

class Command
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="string")
     * @Assert\NotBlank()
     */
    protected $command;

    /**
     * @ORM\Column(type="integer")
     */
    protected $image_id;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set command
     *
     * @param string $command
     * @return Command
     */
    public function setCommand($command)
    {
        $this->command = $command;

        return $this;
    }

    /**
     * Get command
     *
     * @return string
     */
    public function getCommand()
    {
        return $this->command;
    }

    /**
     * Set image_id
     *
     * @param integer $imageId
     * @return Command
     */
    public function setImageId($imageId)
    {
        $this->image_id = $imageId;

        return $this;
    }

    /**
     * Get image_id
     *
     * @return integer
     */
    public function getImageId()
    {
        return $this->image_id;
    }
}


text:
//-------------------------------------------------------------------------------
// Annotations
//-------------------------------------------------------------------------------

//@TestFile

//@Require('Class')
//@Require('bugcli.CliAction')
//@Require('bugcli.CliActionInstance')
//@Require('bugcli.CliOptionInstance')
//@Require('bugcli.CliParameterInstance')
//@Require('bugmeta.BugMeta')
//@Require('bugunit.TestTag')

//-------------------------------------------------------------------------------
// Context
//-------------------------------------------------------------------------------

require('bugpack').context("*", function(bugpack) {

    //-------------------------------------------------------------------------------
    // BugPack
    //-------------------------------------------------------------------------------

    var Class                   = bugpack.require('Class');
    var CliAction               = bugpack.require('bugcli.CliAction');
    var CliActionInstance       = bugpack.require('bugcli.CliActionInstance');
    var CliOptionInstance       = bugpack.require('bugcli.CliOptionInstance');
    var CliParameterInstance    = bugpack.require('bugcli.CliParameterInstance');
    var BugMeta                 = bugpack.require('bugmeta.BugMeta');
    var TestTag                 = bugpack.require('bugunit.TestTag');

    //-------------------------------------------------------------------------------
    // Simplify References
    //-------------------------------------------------------------------------------

    var bugmeta                 = BugMeta.context();
    var test                    = TestTag.test;

    //-------------------------------------------------------------------------------
    // Declare Tests
    //-------------------------------------------------------------------------------

    /**
     *
     */
    var cliActionInstanceInstantiationTest = {

        // Setup Test
        //-------------------------------------------------------------------------------

        setup: function() {
            this.testCliActionObject    = {
                command: "test-command",
                executeMethod: function() {}
            };
            this.testCliAction          = CliAction.alloc().initWithObject(this.testCliActionObject);
            this.testCliActionInstance  = CliActionInstance.alloc().initWithCliAction(this.testCliAction);
        },

        // Run Test
        //-------------------------------------------------------------------------------

        test: function(test) {
            test.assertTrue(Class.doesExtend(this.testCliActionInstance, CliActionInstance),
                "Assert instance of CliActionInstance");
            test.assertEqual(this.testCliActionInstance.getCliAction(), this.testCliAction,
                "Assert CliActionInstance.cliAction was set correctly");
            test.assertTrue(this.testCliActionInstance.getCliOptionInstanceMap().isEmpty(),
                "Assert CliActionInstance.cliOptionInstanceMap is empty");
            test.assertTrue(this.testCliActionInstance.getCliParameterInstanceMap().isEmpty(),
                "Assert CliActionInstance.cliParameterInstanceMap is empty");
            test.assertEqual(this.testCliActionInstance.getCommand(), this.testCliActionObject.command,
                "Assert CliActionInstance#getCommand method correctly returns command value");
        }
    };

    /**
     *
     */
    var cliActionInstanceAddCliParameterInstanceTest = {

        // Setup Test
        //-------------------------------------------------------------------------------

        setup: function() {
            this.testCliActionObject    = {
                command: "test-command",
                default: true,
                parameters: [
                    {
                        name: "testParameter"
                    }
                ],
                executeMethod: function() {},
                validateMethod: function() {}
            };
            this.testParameterInstanceValue = "testParameterInstanceValue";

            this.testCliAction          = CliAction.alloc().initWithObject(this.testCliActionObject);
            this.testCliActionInstance  = CliActionInstance.alloc().initWithCliAction(this.testCliAction);
            var cliParameter = this.testCliAction.getParameterWithParameterName(this.testCliActionObject.parameters[0].name);
            this.testCliParameterInstance = CliParameterInstance.alloc().initWithCliParameterAndValue(cliParameter, this.testParameterInstanceValue);
            this.testCliActionInstance.addCliParameterInstance(this.testCliParameterInstance);
        },

        // Run Test
        //-------------------------------------------------------------------------------

        test: function(test) {
            test.assertTrue(Class.doesExtend(this.testCliActionInstance, CliActionInstance),
                "Assert instance of CliActionInstance");
            var cliParameterInstance = this.testCliActionInstance.getCliParameterInstance(this.testCliActionObject.parameters[0].name);
            test.assertEqual(cliParameterInstance, this.testCliParameterInstance,
                "Assert CliActionInstance.getCliParameterInstance returned the newly added CliParameterInstance");
        }
    };

    //-------------------------------------------------------------------------------
    // BugMeta
    //-------------------------------------------------------------------------------

    bugmeta.tag(cliActionInstanceInstantiationTest).with(
        test().name("CliActionInstance - instantiation test")
    );
    bugmeta.tag(cliActionInstanceAddCliParameterInstanceTest).with(
        test().name("CliActionInstance - #addCliParameterInstance test")
    );
});


text:
using System.Threading.Tasks;
using Famoser.SyncApi.Models.Information;

namespace Famoser.SyncApi.Repositories.Interfaces.Base
{
    public interface IPersistentRespository<T> : IBasePersistentRepository
    {
        Task<T> GetAsync();
        Task<bool> SaveAsync();
        Task<bool> RemoveAsync();
        CacheInformations GetCacheInformations();
    }
}


text:
---
title: Rule wrap-regex
layout: doc
---
<!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. -->
# Require Regex Literals to be Wrapped (wrap-regex)

When a regular expression is used in certain situations, it can end up looking like a division operator. For example:

```js
function a() {
    return /foo/.test("bar");
}
```

## Rule Details

This is used to disambiguate the slash operator and facilitates more readable code.

The following patterns are considered problems:

```js
/*eslint wrap-regex: 2*/

function a() {
    return /foo/.test("bar"); /*error Wrap the regexp literal in parens to disambiguate the slash.*/
}
```

The following patterns are not considered problems:

```js
/*eslint wrap-regex: 2*/

function a() {
    return (/foo/).test("bar");
}
```

## Version

This rule was introduced in ESLint 0.1.0.

## Resources

* [Rule source](https://github.com/eslint/eslint/tree/master/lib/rules/wrap-regex.js)
* [Documentation source](https://github.com/eslint/eslint/tree/master/docs/rules/wrap-regex.md)


text:
**UDOO NEO** is an all-in-one open hardware low-cost computer equipped with a NXP™ i.MX 6SoloX applications processor for Android and Linux.

UDOO NEO embeds two cores on the same processor: a powerful 1GHz ARM® Cortex-A9, and an ARM Cortex-M4 I/O real-time co-processor that can run up to 200Mhz.

While the Cortex-A9 can run both Android Lollipop and [UDOObuntu 2](!Software_&_Operating_Systems/UDOObuntu) - a dedicated Ubuntu-based Linux distro - the Cortex-M4 allows easy access to a Arduino™ environment. The snap-in connector ensures a plug-and-play interaction with most sensors and actuators.

Thanks to its embedded 9-axis motion sensors and a Wi-Fi + Bluetooth 4.0 module, the board is ideal to create robots, drones and rovers as well as any Mobile IoT project you can imagine.

Heads up! In order to prevent damages to your board, remember to:

* Never provide more than 3.3V in input to the GPIOs
* Never keep the board in touch with metal objects or surfaces while it is powered up

### Lineup
UDOO NEO retail line up consists of [three models](!Hardware_Reference/Board%20versions).

### Technical specifications

* NXP® i.MX 6SoloX applications processor with an embedded ARM Cortex-A9 core and a Cortex-M4 Core
* 512MB (Basic) or 1GB (only Extended and Full)
* Integrated 2d/3d graphics controller
* Micro HDMI interface
* LVDS interface + touch (I2C signals)
* Analog camera connection supporting NTSC and PAL
* 8-bit parallel camera interface*
* HDMI audio transmitter
* S/PIDF & I2S*
* 1x USB 2.0 Type A ports
* 1x USB OTG (micro-AB connector)
* Fast ethernet RJ45 – 10/100Mbps (only Basic and Full)
* Wi-Fi 802.11 b/g/n,Direct Mode SmartConfig and Bluetooth 4.0 Low Energy (only Extended and Full)
* 3x UART ports*
* 2x CAN Bus interfaces*
* 8x PWM signals*
* 3x I2C interface*
* 1x SPI interface*
* 6x multiplexable signals*
* 5 V DC Micro USB
* 6-15 V DC Power Jack
* RTC Battery Connector
* Green Power Status LED
* User Configurable LEDs (Red and Orange)
* 3-Axis Accelerometer (only Extended and Full)
* 3-Axis Magnetometer (only Extended and Full)
* 3-Axis Digital Gyroscope (only Extended and Full)
* 1x Sensor Snap-In I2C connector
* 89mm x59mm (3.50″ x 2.32″)
* Arduino-Compatible through the standard Arduino Pins layout and compatible with Arduino shields.
* 32 extended GPIOs (A9 dedicated)
* 22 Arduino GPIOs (M4 dedicated)
* 6 available Pins
* Android Lollipop & Linux UDOObuntu2 (14.04 LTS)

*Available on Pin Header

## Community
* Official web site [www.udoo.org](https://www.udoo.org)
* Official forum [www.udoo.org/forum](https://www.udoo.org/forum/index.php)

### Forums
The official UDOO forums can be found at [www.udoo.org/forum](https://www.udoo.org/forum)

The forum search facility has been tweaked to allow more general searching. Please do a search before making a post as the issue may already have been raised and answered.

### IRC channel
There is an (unofficial) UDOO discussion channel on IRC. Using the IRC client of your choice, use server information: `irc.freenode.net`. Room name is `#udoo`.

### Social networks
 * [Facebook fan page](http://www.facebook.com/udooboard)
 * [Twitter](http://twitter.com/UDOO_Board)
 * [Google+](https://plus.google.com/u/0/110742692974455430878/posts)
 * [YouTube](http://www.youtube.com/channel/UCXv5UyGn5jArK8xOAmuSeHg)


text:
<?php
/**
 * Base configuration file for module Event
 */

use Event\Controller\DashboardController;
use Event\Controller\DonationController;
use Event\Controller\EventController;
use Event\Controller\MealController;
use Event\Controller\StatisticController;
use Event\Controller\UserController;
use Event\Form\Donation as DonationForm;
use Event\Form\Filter\Donation as DonationFilter;
use Event\Form\Event as EventForm;
use Event\Form\Filter\Event as EventFilter;
use Event\Form\Filter\Meal;
use Event\Form\Filter\User as UserFilter;
use Event\Form\Meal as MealForm;
use Event\Form\User;
use Zend\Mvc\Controller\ControllerManager;

return array(
    'controllers' => array(
        'invokables' => array(),
        'factories' => array(
            'Event\Controller\User' => function (ControllerManager $cm) {
                $serviceLocator = $cm->getServiceLocator();
                $controller = new UserController();
                $controller->setManager($serviceLocator->get('doctrine.entitymanager.orm_default'));
                $controller->setBaseRoutePattern('user');
                $controller->setClassName('Event\Doctrine\Orm\User');
                $controller->setForm(new User('user', $serviceLocator->get('doctrine.entitymanager.orm_default')));
                $controller->setInputFilter(new UserFilter());

                return $controller;
            },
            'Event\Controller\Meal' => function (ControllerManager $cm) {
                    $serviceLocator = $cm->getServiceLocator();
                    $controller = new MealController();
                    $controller->setManager($serviceLocator->get('doctrine.entitymanager.orm_default'));
                    $controller->setBaseRoutePattern('meal');
                    $controller->setClassName('Event\Doctrine\Orm\Meal');
                    $controller->setForm(new MealForm('meal'));
                    $controller->setInputFilter(new Meal());

                    return $controller;
            },
            'Event\Controller\Event' => function (ControllerManager $cm) {
                    $serviceLocator = $cm->getServiceLocator();
                    $controller = new EventController();
                    $controller->setManager($serviceLocator->get('doctrine.entitymanager.orm_default'));
                    $controller->setBaseRoutePattern('event');
                    $controller->setClassName('Event\Doctrine\Orm\Event');
                    $controller->setForm(new EventForm('meal', $serviceLocator->get('doctrine.entitymanager.orm_default')));
                    $controller->setInputFilter(new EventFilter());

                    return $controller;
            },
            'Event\Controller\Donation' => function (ControllerManager $cm) {
                    $serviceLocator = $cm->getServiceLocator();
                    $controller = new DonationController();
                    $controller->setManager($serviceLocator->get('doctrine.entitymanager.orm_default'));
                    $controller->setBaseRoutePattern('donation');
                    $controller->setClassName('Event\Doctrine\Orm\Donation');
                    $controller->setForm(new DonationForm('donation', $serviceLocator->get('doctrine.entitymanager.orm_default')));
                    $controller->setInputFilter(new DonationFilter());

                    return $controller;
                },
            'Event\Controller\Dashboard' => function (ControllerManager $cm) {
                    $serviceLocator = $cm->getServiceLocator();
                    $controller = new DashboardController();
                    $controller->setManager($serviceLocator->get('doctrine.entitymanager.orm_default'));
                    $controller->setBaseRoutePattern('dashboard');

                    return $controller;
            },
            'Event\Controller\Statistic' => function (ControllerManager $cm) {
                    $serviceLocator = $cm->getServiceLocator();
                    $controller = new StatisticController();
                    $controller->setManager($serviceLocator->get('doctrine.entitymanager.orm_default'));
                    $controller->setBaseRoutePattern('statistic');

                    return $controller;
            },
        ),
    ),

    // The following section is new and should be added to your file
    'router' => array(
        'routes' => array(
            'meal' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/meal[/][:action][/:id]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'id'     => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'Event\Controller\Meal',
                        'action'     => 'list',
                    ),
                ),
            ),
            'user' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/user[/][:action][/:id]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'id'     => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'Event\Controller\User',
                        'action'     => 'list',
                    ),
                ),
            ),
            'donation' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/donation[/][:action][/:id]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'id'     => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'Event\Controller\Donation',
                        'action'     => 'list',
                    ),
                ),
            ),
            'event' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/event[/][:action][/:id]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'id'     => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'Event\Controller\Event',
                        'action'     => 'list',
                    ),
                ),
            ),
            'dashboard' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/dashboard',
                    'defaults' => array(
                        'controller' => 'Event\Controller\Dashboard',
                        'action'     => 'index',
                    ),
                ),
            ),
            'statistic' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/statistic[/][:action][/:id]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'id'     => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'Event\Controller\Statistic',
                        'action'     => 'cashBox',
                    ),
                ),
            ),
        ),
    ),

    'view_manager' => array(
        'template_path_stack' => array(
            'event' => __DIR__ . '/../view',
        ),
    ),
    'doctrine' => array(
        'driver' => array(
            'EventDriver' => array(
                'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
                'cache' => 'array',
                'paths' => array(__DIR__ . '/../src/Event/Doctrine/Orm')
            ),
            'orm_default' => array(
                'drivers' => array(
                    'Event\Doctrine\Orm' => 'EventDriver'
                )
            )
        )
    )
);


text:
class GendersController < ApplicationController
  before_action :set_gender, only: [:show, :edit, :update, :destroy]

  # GET /genders
  # GET /genders.json
  def index
    @genders = Gender.all
  end

  # GET /genders/1
  # GET /genders/1.json
  def show
  end

  # GET /genders/new
  def new
    @gender = Gender.new
  end

  # GET /genders/1/edit
  def edit
  end

  # POST /genders
  # POST /genders.json
  def create
    @gender = Gender.new(gender_params)

    respond_to do |format|
      if @gender.save
        format.html { redirect_to @gender, notice: 'Gender was successfully created.' }
        format.json { render :show, status: :created, location: @gender }
      else
        format.html { render :new }
        format.json { render json: @gender.errors, status: :unprocessable_entity }
      end
    end
  end

  # PATCH/PUT /genders/1
  # PATCH/PUT /genders/1.json
  def update
    respond_to do |format|
      if @gender.update(gender_params)
        format.html { redirect_to @gender, notice: 'Gender was successfully updated.' }
        format.json { render :show, status: :ok, location: @gender }
      else
        format.html { render :edit }
        format.json { render json: @gender.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /genders/1
  # DELETE /genders/1.json
  def destroy
    @gender.destroy
    respond_to do |format|
      format.html { redirect_to genders_url, notice: 'Gender was successfully destroyed.' }
      format.json { head :no_content }
    end
  end

  private
    # Use callbacks to share common setup or constraints between actions.
    def set_gender
      @gender = Gender.find(params[:id])
    end

    # Never trust parameters from the scary internet, only allow the white list through.
    def gender_params
      params.require(:gender).permit(:content)
    end
end


text:
const express = require('express');
const router = express.Router();

router.post('/', (req, res) => {
});

module.exports = router;


text: java -jar ./code/PuzzleCalculator.jar