text:
.class final Landroid/location/Address$1;
.super Ljava/lang/Object;
.source "Address.java"

# interfaces
.implements Landroid/os/Parcelable$Creator;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/location/Address;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/os/Parcelable$Creator",
        "<",
        "Landroid/location/Address;",
        ">;"
    }
.end annotation

# direct methods
.method constructor <init>()V
    .locals 0

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

    return-void
.end method

# virtual methods
.method public createFromParcel(Landroid/os/Parcel;)Landroid/location/Address;
    .locals 14
    .param p1, "in"    # Landroid/os/Parcel;

    .prologue
    const/4 v10, 0x1

    const/4 v9, 0x0

    .line 478
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v5

    .line 479
    .local v5, "language":Ljava/lang/String;
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v2

    .line 480
    .local v2, "country":Ljava/lang/String;
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v8

    if-lez v8, :cond_0

    .line 481
    new-instance v7, Ljava/util/Locale;

    invoke-direct {v7, v5, v2}, Ljava/util/Locale;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 483
    .local v7, "locale":Ljava/util/Locale;
    :goto_0
    new-instance v1, Landroid/location/Address;

    invoke-direct {v1, v7}, Landroid/location/Address;-><init>(Ljava/util/Locale;)V

    .line 485
    .local v1, "a":Landroid/location/Address;
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v0

    .line 486
    .local v0, "N":I
    if-lez v0, :cond_1

    .line 487
    new-instance v8, Ljava/util/HashMap;

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

    invoke-static {v1, v8}, Landroid/location/Address;->-set0(Landroid/location/Address;Ljava/util/HashMap;)Ljava/util/HashMap;

    .line 488
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_1
    if-ge v3, v0, :cond_2

    .line 489
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v4

    .line 490
    .local v4, "index":I
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v6

    .line 491
    .local v6, "line":Ljava/lang/String;
    invoke-static {v1}, Landroid/location/Address;->-get0(Landroid/location/Address;)Ljava/util/HashMap;

    move-result-object v8

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

    move-result-object v11

    invoke-virtual {v8, v11, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 493
    invoke-static {v1}, Landroid/location/Address;->-get3(Landroid/location/Address;)I

    move-result v8

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

    move-result v8

    .line 492
    invoke-static {v1, v8}, Landroid/location/Address;->-set11(Landroid/location/Address;I)I

    .line 488
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 482
    .end local v0    # "N":I
    .end local v1    # "a":Landroid/location/Address;
    .end local v3    # "i":I
    .end local v4    # "index":I
    .end local v6    # "line":Ljava/lang/String;
    .end local v7    # "locale":Ljava/util/Locale;
    :cond_0
    new-instance v7, Ljava/util/Locale;

    invoke-direct {v7, v5}, Ljava/util/Locale;-><init>(Ljava/lang/String;)V

    .restart local v7    # "locale":Ljava/util/Locale;
    goto :goto_0

    .line 496
    .restart local v0    # "N":I
    .restart local v1    # "a":Landroid/location/Address;
    :cond_1
    const/4 v8, 0x0

    invoke-static {v1, v8}, Landroid/location/Address;->-set0(Landroid/location/Address;Ljava/util/HashMap;)Ljava/util/HashMap;

    .line 497
    const/4 v8, -0x1

    invoke-static {v1, v8}, Landroid/location/Address;->-set11(Landroid/location/Address;I)I

    .line 499
    :cond_2
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set5(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 500
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set1(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 501
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set15(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 502
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set9(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 503
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set16(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 504
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set18(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 505
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set17(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 506
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set14(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 507
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set13(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 508
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set2(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 509
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set3(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 510
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    if-nez v8, :cond_5

    move v8, v9

    :goto_2
    invoke-static {v1, v8}, Landroid/location/Address;->-set6(Landroid/location/Address;Z)Z

    .line 511
    invoke-static {v1}, Landroid/location/Address;->-get1(Landroid/location/Address;)Z

    move-result v8

    if-eqz v8, :cond_3

    .line 512
    invoke-virtual {p1}, Landroid/os/Parcel;->readDouble()D

    move-result-wide v12

    invoke-static {v1, v12, v13}, Landroid/location/Address;->-set8(Landroid/location/Address;D)D

    .line 514
    :cond_3
    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v8

    if-nez v8, :cond_6

    :goto_3
    invoke-static {v1, v9}, Landroid/location/Address;->-set7(Landroid/location/Address;Z)Z

    .line 515
    invoke-static {v1}, Landroid/location/Address;->-get2(Landroid/location/Address;)Z

    move-result v8

    if-eqz v8, :cond_4

    .line 516
    invoke-virtual {p1}, Landroid/os/Parcel;->readDouble()D

    move-result-wide v8

    invoke-static {v1, v8, v9}, Landroid/location/Address;->-set10(Landroid/location/Address;D)D

    .line 518
    :cond_4
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set12(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 519
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set19(Landroid/location/Address;Ljava/lang/String;)Ljava/lang/String;

    .line 520
    invoke-virtual {p1}, Landroid/os/Parcel;->readBundle()Landroid/os/Bundle;

    move-result-object v8

    invoke-static {v1, v8}, Landroid/location/Address;->-set4(Landroid/location/Address;Landroid/os/Bundle;)Landroid/os/Bundle;

    .line 521
    return-object v1

    :cond_5
    move v8, v10

    .line 510
    goto :goto_2

    :cond_6
    move v9, v10

    .line 514
    goto :goto_3
.end method

.method public bridge synthetic createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;
    .locals 1
    .param p1, "in"    # Landroid/os/Parcel;

    .prologue
    .line 477
    invoke-virtual {p0, p1}, Landroid/location/Address$1;->createFromParcel(Landroid/os/Parcel;)Landroid/location/Address;

    move-result-object v0

    return-object v0
.end method

.method public newArray(I)[Landroid/location/Address;
    .locals 1
    .param p1, "size"    # I

    .prologue
    .line 525
    new-array v0, p1, [Landroid/location/Address;

    return-object v0
.end method

.method public bridge synthetic newArray(I)[Ljava/lang/Object;
    .locals 1
    .param p1, "size"    # I

    .prologue
    .line 524
    invoke-virtual {p0, p1}, Landroid/location/Address$1;->newArray(I)[Landroid/location/Address;

    move-result-object v0

    return-object v0
.end method


text:
package com.amazonaws.services.quicksight.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeIAMPolicyAssignmentResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {

    /**
     *

     * Information describing the IAM policy assignment.
     *

     */
    private IAMPolicyAssignment iAMPolicyAssignment;
    /**
     *

     * The Amazon Web Services request ID for this operation.
     *

     */
    private String requestId;
    /**
     *

     * The HTTP status of the request.
     *

     */
    private Integer status;

    /**
     *

     * Information describing the IAM policy assignment.
     *

     *
     * @param iAMPolicyAssignment
     *        Information describing the IAM policy assignment.
     */

    public void setIAMPolicyAssignment(IAMPolicyAssignment iAMPolicyAssignment) {
        this.iAMPolicyAssignment = iAMPolicyAssignment;
    }

    /**
     *

     * Information describing the IAM policy assignment.
     *

     *
     * @return Information describing the IAM policy assignment.
     */

    public IAMPolicyAssignment getIAMPolicyAssignment() {
        return this.iAMPolicyAssignment;
    }

    /**
     *

     * Information describing the IAM policy assignment.
     *

     *
     * @param iAMPolicyAssignment
     *        Information describing the IAM policy assignment.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeIAMPolicyAssignmentResult withIAMPolicyAssignment(IAMPolicyAssignment iAMPolicyAssignment) {
        setIAMPolicyAssignment(iAMPolicyAssignment);
        return this;
    }

    /**
     *

     * The Amazon Web Services request ID for this operation.
     *

     *
     * @param requestId
     *        The Amazon Web Services request ID for this operation.
     */

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    /**
     *

     * The Amazon Web Services request ID for this operation.
     *

     *
     * @return The Amazon Web Services request ID for this operation.
     */

    public String getRequestId() {
        return this.requestId;
    }

    /**
     *

     * The Amazon Web Services request ID for this operation.
     *

     *
     * @param requestId
     *        The Amazon Web Services request ID for this operation.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeIAMPolicyAssignmentResult withRequestId(String requestId) {
        setRequestId(requestId);
        return this;
    }

    /**
     *

     * The HTTP status of the request.
     *

     *
     * @param status
     *        The HTTP status of the request.
     */

    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     *

     * The HTTP status of the request.
     *

     *
     * @return The HTTP status of the request.
     */

    public Integer getStatus() {
        return this.status;
    }

    /**
     *

     * The HTTP status of the request.
     *

     *
     * @param status
     *        The HTTP status of the request.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeIAMPolicyAssignmentResult withStatus(Integer status) {
        setStatus(status);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getIAMPolicyAssignment() != null)
            sb.append("IAMPolicyAssignment: ").append(getIAMPolicyAssignment()).append(",");
        if (getRequestId() != null)
            sb.append("RequestId: ").append(getRequestId()).append(",");
        if (getStatus() != null)
            sb.append("Status: ").append(getStatus());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof DescribeIAMPolicyAssignmentResult == false)
            return false;
        DescribeIAMPolicyAssignmentResult other = (DescribeIAMPolicyAssignmentResult) obj;
        if (other.getIAMPolicyAssignment() == null ^ this.getIAMPolicyAssignment() == null)
            return false;
        if (other.getIAMPolicyAssignment() != null && other.getIAMPolicyAssignment().equals(this.getIAMPolicyAssignment()) == false)
            return false;
        if (other.getRequestId() == null ^ this.getRequestId() == null)
            return false;
        if (other.getRequestId() != null && other.getRequestId().equals(this.getRequestId()) == false)
            return false;
        if (other.getStatus() == null ^ this.getStatus() == null)
            return false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getIAMPolicyAssignment() == null) ? 0 : getIAMPolicyAssignment().hashCode());
        hashCode = prime * hashCode + ((getRequestId() == null) ? 0 : getRequestId().hashCode());
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return hashCode;
    }

    @Override
    public DescribeIAMPolicyAssignmentResult clone() {
        try {
            return (DescribeIAMPolicyAssignmentResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
#include <jni.h>
#include <iostream>
#include <sstream>
#include "java-m3g.hpp"
#include "java-m3g-common.hpp"
#include "m3g/m3g.hpp"
using namespace std;
using namespace m3g;

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_initialize
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_org_karlsland_m3g_Appearance_jni_1initialize
  (JNIEnv* env, jobject thiz)
{
    //cout << "Java-Appearance: initilize is called.\n";
    Appearance* app = NULL;
    __TRY__;
    app = new Appearance ();
    __CATCH__;
    if (env->ExceptionOccurred ()) {
        return;
    }
    setNativePointer  (env, thiz, app);
    bindJavaReference (env, thiz, app);
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_finalize
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_org_karlsland_m3g_Appearance_jni_1finalize
  (JNIEnv* env, jobject thiz)
{
    //cout << "Java-Appearance: finalize is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    releaseJavaReference (env, app);
    addUsedObject (app);
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_getCompositingMode
 * Signature: ()Lorg/karlsland/m3g/CompositingMode;
 */
JNIEXPORT jobject JNICALL Java_org_karlsland_m3g_Appearance_jni_1getCompositingMode
  (JNIEnv* env, jobject thiz)
{
    //cout << "Java-Appearance: getCompositingMode is called.\n";
    Appearance*      app   = (Appearance*)getNativePointer (env, thiz);
    CompositingMode* cmode = NULL;
    __TRY__;
    cmode = app->getCompositingMode ();
    __CATCH__;
    return getJavaReference (env, cmode);
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_getFog
 * Signature: ()Lorg/karlsland/m3g/Fog;
 */
JNIEXPORT jobject JNICALL Java_org_karlsland_m3g_Appearance_jni_1getFog
  (JNIEnv* env, jobject thiz)
{
    //cout << "Java-Appearance: getFog is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    Fog*        fog = NULL;
    __TRY__;
    fog = app->getFog ();
    __CATCH__;
    return getJavaReference (env, fog);
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_getLayer
 * Signature: ()I
 */
JNIEXPORT jint JNICALL Java_org_karlsland_m3g_Appearance_jni_1getLayer
  (JNIEnv* env, jobject thiz)
{
    //cout << "Java-Appearance: getLayer is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    int layer = 0;
    __TRY__;
    layer = app->getLayer ();
    __CATCH__;
    return layer;
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_getMaterial
 * Signature: ()Lorg/karlsland/m3g/Material;
 */
JNIEXPORT jobject JNICALL Java_org_karlsland_m3g_Appearance_jni_1getMaterial
  (JNIEnv* env, jobject thiz)
{
    //cout << "Java-Appearance: getMaterial is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    Material*   mat = NULL;
    __TRY__;
    mat = app->getMaterial ();
    __CATCH__;
    return getJavaReference (env, mat);
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_getPolygonMode
 * Signature: ()Lorg/karlsland/m3g/PolygonMode;
 */
JNIEXPORT jobject JNICALL Java_org_karlsland_m3g_Appearance_jni_1getPolygonMode
  (JNIEnv* env, jobject thiz)
{
    //cout << "Java-Appearance: getPolygonMode is called.\n";
    Appearance*  app   = (Appearance*)getNativePointer (env, thiz);
    PolygonMode* pmode = NULL;
    __TRY__;
    pmode = app->getPolygonMode ();
    __CATCH__;
    return getJavaReference (env, pmode);
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_getTexture
 * Signature: (I)Lorg/karlsland/m3g/Texture2D;
 */
JNIEXPORT jobject JNICALL Java_org_karlsland_m3g_Appearance_jni_1getTexture
  (JNIEnv* env, jobject thiz, jint index)
{
    //cout << "Java-Appearance: getTexture is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    Texture2D*  tex = NULL;
    __TRY__;
    tex = app->getTexture (index);
    __CATCH__;
    return getJavaReference (env, tex);
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_setCompositingMode
 * Signature: (Lorg/karlsland/m3g/CompositingMode;)V
 */
JNIEXPORT void JNICALL Java_org_karlsland_m3g_Appearance_jni_1setCompositingMode
  (JNIEnv* env, jobject thiz, jobject compositingMode)
{
    //cout << "Java-Appearance: getCompositingMode is called.\n";
    Appearance*      app   = (Appearance*)getNativePointer (env, thiz);
    CompositingMode* cmode = (CompositingMode*)getNativePointer (env, compositingMode);
    __TRY__;
    app->setCompositingMode (cmode);
    __CATCH__;
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_setFog
 * Signature: (Lorg/karlsland/m3g/Fog;)V
 */
JNIEXPORT void JNICALL Java_org_karlsland_m3g_Appearance_jni_1setFog
  (JNIEnv* env, jobject thiz, jobject fog)
{
    //cout << "Java-Appearance: setFog is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    Fog*        fg  = (Fog*)getNativePointer (env, fog);
    __TRY__;
    app->setFog (fg);
    __CATCH__;
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_setLayer
 * Signature: (I)V
 */
JNIEXPORT void JNICALL Java_org_karlsland_m3g_Appearance_jni_1setLayer
  (JNIEnv* env, jobject thiz, jint layer)
{
    //cout << "Java-Appearance: setLayer is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    __TRY__;
    app->setLayer (layer);
    __CATCH__;
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_setMaterial
 * Signature: (Lorg/karlsland/m3g/Material;)V
 */
JNIEXPORT void JNICALL Java_org_karlsland_m3g_Appearance_jni_1setMaterial
  (JNIEnv* env, jobject thiz, jobject material)
{
    //cout << "Java-Appearance: setMaterial is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    Material*   mat = (Material*)getNativePointer (env, material);
    __TRY__;
    app->setMaterial (mat);
    __CATCH__;
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_setPolygonMode
 * Signature: (Lorg/karlsland/m3g/PolygonMode;)V
 */
JNIEXPORT void JNICALL Java_org_karlsland_m3g_Appearance_jni_1setPolygonMode
  (JNIEnv* env, jobject thiz, jobject polygonMode)
{
    //cout << "Java-Appearance: setPolygonMode is called.\n";
    Appearance*  app   = (Appearance*)getNativePointer (env, thiz);
    PolygonMode* pmode = (PolygonMode*)getNativePointer (env, polygonMode);
    __TRY__;
    app->setPolygonMode (pmode);
    __CATCH__;
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_setTexture
 * Signature: (ILorg/karlsland/m3g/Texture2D;)V
 */
JNIEXPORT void JNICALL Java_org_karlsland_m3g_Appearance_jni_1setTexture
  (JNIEnv* env, jobject thiz, jint index, jobject texture)
{
    //cout << "Java-Appearance: setTexture is called.\n";
    Appearance* app = (Appearance*)getNativePointer (env, thiz);
    Texture2D*  tex = (Texture2D*)getNativePointer (env, texture);
    __TRY__;
    app->setTexture (index, tex);
    __CATCH__;
}

/*
 * Class:     org_karlsland_m3g_Appearance
 * Method:    jni_print
 * Signature: ()Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_org_karlsland_m3g_Appearance_jni_1print
  (JNIEnv* env, jobject thiz)
{
    //cout << "Java-Appearance: print is called.\n";
    Appearance*   app = (Appearance*)getNativePointer (env, thiz);
    ostringstream oss;
    __TRY__;
    app->print (oss);
    __CATCH__;
    return env->NewStringUTF (oss.str().c_str());
}

void Java_new_Appearance          (JNIEnv* env, m3g::Object3D* obj)
{
    //cout << "Java-Loader: build java Appearance.\n";
    Appearance* app     = dynamic_cast<Appearance*>(obj);
    jobject     app_obj = allocJavaObject (env, "org/karlsland/m3g/Appearance");
    setNativePointer  (env, app_obj, app);
    bindJavaReference (env, app_obj, app);

    Java_build_Object3D   (env, app_obj, app);
    Java_build_Appearance (env, app_obj, app);

    env->DeleteLocalRef (app_obj);
}

void Java_build_Appearance (JNIEnv* env, jobject app_obj, m3g::Appearance* app)
{
    jclass   app_class           = env->GetObjectClass (app_obj);
    jfieldID app_polygonMode     = env->GetFieldID     (app_class, "polygonMode"    , "Lorg/karlsland/m3g/PolygonMode;");
    jfieldID app_compositingMode = env->GetFieldID     (app_class, "compositingMode", "Lorg/karlsland/m3g/CompositingMode;");
    jfieldID app_material        = env->GetFieldID     (app_class, "material"       , "Lorg/karlsland/m3g/Material;");
    jfieldID app_textures        = env->GetFieldID     (app_class, "textures"       , "Ljava/util/List;");
    jfieldID app_fog             = env->GetFieldID     (app_class, "fog"            , "Lorg/karlsland/m3g/Fog;");

    PolygonMode* pmode = app->getPolygonMode ();
    if (pmode) {
        env->SetObjectField (app_obj, app_polygonMode, getJavaReference(env, pmode));
    }

    CompositingMode* cmode = app->getCompositingMode ();
    if (cmode) {
        env->SetObjectField (app_obj, app_compositingMode, getJavaReference(env, cmode));
    }

    Material* mat = app->getMaterial ();
    if (mat) {
        env->SetObjectField (app_obj, app_material, getJavaReference(env, mat));
    }

    jclass    textures_class = env->FindClass   ("java/util/ArrayList");
    jmethodID textures_init  = env->GetMethodID (textures_class, "<init>", "()V");
    jmethodID textures_add   = env->GetMethodID (textures_class, "add", "(Ljava/lang/Object;)Z");
    jobject   textures_obj   = env->NewObject   (textures_class, textures_init);

    for (int i = 0; i < MAX_TEXTURE_UNITS; i++) {
        Texture2D* tex = app->getTexture (i);
        if (tex) {
            env->CallObjectMethod (textures_obj, textures_add, getJavaReference(env, tex));
        } else {
            env->CallObjectMethod (textures_obj, textures_add, (jobject)0);
        }
    }
    env->SetObjectField (app_obj, app_textures, textures_obj);

    Fog* fog = app->getFog ();
    if (fog) {
        env->SetObjectField (app_obj, app_fog, getJavaReference(env, fog));
    }

    env->DeleteLocalRef (app_class);
    env->DeleteLocalRef (textures_class);
    env->DeleteLocalRef (textures_obj);
}


text:
package codegen;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import com.github.javaparser.JavaParser;
import com.github.javaparser.ParseException;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.expr.AnnotationExpr;

import codegen.Configuration.ClazzContainer;

public class CodeGenerator {

	private final InternalConfiguration config;
	private final Charset encoding;

	public CodeGenerator(final File configFile) throws IOException, ParseException {
		Utils.assertParamNotNull(configFile, "configFile");
		final Configuration parsedConfig = Configuration.parse(configFile);
		this.encoding = Charset.forName(parsedConfig.getEncoding() != null ? parsedConfig.getEncoding() : "UTF-8");
		config = validate(parsedConfig.getClasses());
	}

	private InternalConfiguration validate(final Map<String, ClazzContainer> classes) throws ParseException {
		final Map<String, InternalConfiguration.ClazzContainer> internalClasses = new HashMap<String, InternalConfiguration.ClazzContainer>();
		for (Entry<String, ClazzContainer> clazzContainer : classes.entrySet()) {
			final List<AnnotationExpr> classAnnotations = new ArrayList<AnnotationExpr>();

			for (String string : clazzContainer.getValue().getClassAnnotations()) {
				classAnnotations.add(JavaParser.parseAnnotation(string));
			}

			final Map<String, List<AnnotationExpr>> fieldAnnotations = parseAnnotations(
					clazzContainer.getValue().getFieldAnnotations().entrySet());
			final Map<String, List<AnnotationExpr>> methodAnnotations = parseAnnotations(
					clazzContainer.getValue().getMethodAnnotations().entrySet());

			internalClasses.put(clazzContainer.getKey(),
					new InternalConfiguration.ClazzContainer(classAnnotations, fieldAnnotations, methodAnnotations));
		}
		return new InternalConfiguration(internalClasses);
	}

	private Map<String, List<AnnotationExpr>> parseAnnotations(final Set<Entry<String, List<String>>> entrySet)
			throws ParseException {
		final Map<String, List<AnnotationExpr>> map = new HashMap<String, List<AnnotationExpr>>();
		for (Entry<String, List<String>> entry : entrySet) {
			final String key = entry.getKey();
			final List<String> annotationStrings = entry.getValue();
			final List<AnnotationExpr> list = new ArrayList<AnnotationExpr>(annotationStrings.size());
			for (String annotation : annotationStrings) {
				list.add(JavaParser.parseAnnotation(annotation));
			}
			map.put(key, list);
		}
		return map;
	}

	public List<File> parse(final List<File> files) throws IOException, ParseExceptions {
		final List<FileParseFaultResult> list = new ArrayList<FileParseFaultResult>();
		final List<File> parsedFiles = new ArrayList<File>();
		for (File file : files) {
			try {
				if (parse(file)) {
					parsedFiles.add(file);
				}
			} catch (ParseException e) {
				list.add(new FileParseFaultResult(e, file.toString()));
			}
		}
		if (!list.isEmpty()) {
			throw new ParseExceptions(list);
		}
		return parsedFiles;
	}

	public List<File> parse(final File... files) throws IOException, ParseExceptions {
		return parse(Arrays.asList(files));
	}

	public boolean parse(final File targetFile) throws IOException, ParseException {
		if (targetFile == null) {
			throw new NullPointerException();
		}
		if (!targetFile.exists()) {
			throw new FileNotFoundException(targetFile.toString());
		}
		final CompilationUnit cu = JavaParser.parse(targetFile, encoding.name());
		final ClassAnnotationVisitor visitor = new ClassAnnotationVisitor(config);
		visitor.visit(cu, null);
		if (visitor.hasChanged()) {
			writeFile(cu, targetFile);
		}
		return visitor.hasChanged();
	}

	private void writeFile(final CompilationUnit cu, final File targetFile) throws IOException {
		if (targetFile.exists()) {
			if (!targetFile.delete()) {
				throw new IOException("Couldn't delete file " + targetFile.getAbsolutePath());
			}
		}
		final BufferedWriter fileOutput = new BufferedWriter(
				new OutputStreamWriter(new FileOutputStream(targetFile), encoding));
		try {
			fileOutput.write(cu.toString());
		} finally {
			fileOutput.close();
		}
	}
}


text:
=head1 LICENSE

Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Copyright [2016-2022] EMBL-European Bioinformatics Institute

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

=cut

# this draft will just do the first part of the pipeline - downlaod the fasta files, remove kill list obj and then clean and clip

package Bio::EnsEMBL::Analysis::Hive::Config::Hive_PacBio_conf;

use strict;
use warnings;

use File::Spec::Functions qw(catfile);

use Bio::EnsEMBL::ApiVersion qw/software_version/;
use Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf; # This is needed for WHEN() ELSE
use Bio::EnsEMBL::Analysis::Tools::Utilities qw (get_analysis_settings);
use parent ('Bio::EnsEMBL::Analysis::Hive::Config::HiveBaseConfig_conf');

sub default_options {
  my ($self) = @_;

  return {
    # inherit other stuff from the base class
    %{ $self->SUPER::default_options() },

##########################################################################
#                                                                        #
# CHANGE STUFF HERE                                                      #
#                                                                        #
##########################################################################

    'pipeline_name' => '',
    'pipe_db_name'   => $self->o('dbowner').'_'.$self->o('pipeline_name').'_hive',

    'host'     => '',
    'user_r'   => '',
    'user'     => '',
    'password' => '',
    'port'     => '',

    'dna_db_name'    => '',
    'dna_db_server' => '',
    'dna_db_port'   => '',

    'killlist_db_host' => 'mysql-ens-genebuild-prod-6',
    'killlist_db_port'   => '4532',

    'target_db_name'   => $self->o('dbowner').'_'.$self->o('pipeline_name').'_exonerate',
    'target_db_host' => '',
    'target_db_port'   => '4527',

    'exonerate_batch_size' => '50',
    'exonerate_path'       => catfile($self->o('software_base_path'), 'opt', 'exonerate09', 'bin', 'exonerate'), #You may need to specify the full path to the exonerate binary version 0.9.0
    'genome_file'          => '',

    'repeat_masking_logic_names' => [],
    'index_type' => 'flat_seq', # can be flat_seq or db_seq
    'hive_capacity' => undef,

##########################################################################
#                                                                        #
# MOSTLY STAYS CONSTANT, MOSTLY                                          #
#                                                                        #
##########################################################################

    'seqfetcher_object' => 'Bio::EnsEMBL::Analysis::Tools::SeqFetcher::OBDAIndexSeqFetcher',
    'isoseq_table_name'            => 'cdna_sequences',
    'batch_size'            => '100',
    'calculate_coverage_and_pid' => 0,

    'create_type'                => 'clone',

    'killlist_db_name'           => 'gb_kill_list',

    'target_db' => {
      -dbname => $self->o('target_db_name'),
      -host => $self->o('target_db_host'),
      -port => $self->o('target_db_port'),
      -user => $self->o('target_db_user'),
      -pass => $self->o('target_db_pass'),
      -driver => $self->o('hive_driver'),
    },

    'killlist_db' => {
      -dbname => $self->o('killlist_db_name'),
      -host   => $self->o('killlist_db_host'),
      -port   => $self->o('killlist_db_port'),
      -user   => $self->o('user_r'),
      -pass   => $self->o('password_r'),
      -driver => $self->o('hive_driver'),
    },

    databases_to_delete => ['target_db'],
  };
}

sub pipeline_create_commands {
  my ($self) = @_;
  return [
  # inheriting database and hive tables' creation
    @{$self->SUPER::pipeline_create_commands},
    $self->hive_data_table('refseq', $self->o('isoseq_table_name')),
  ];
}

## See diagram for pipeline structure
sub pipeline_analyses {
  my ($self) = @_;

  my @analyses = (
    {
      # need to make sure the database actually copies as if it doesn't the job does appear to complete according to eHive
      -logic_name => 'create_output_db',
      -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveCreateDatabase',
      -parameters => {
        source_db => $self->o('dna_db'),
        target_db => $self->o('target_db'),
        create_type => $self->o('create_type'),
      },
      -rc_name => 'default',
      -input_ids => [{cdna_file => $self->o('cdna_file')}],
      -max_retry_count => 0,
      -flow_into => {
        1 => ['load_isoseqs'],
      }
    },
    {
      -logic_name => 'load_isoseqs',
      -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveLoadcDNAs',
      -rc_name => 'default',
      -parameters => {
        process_polyA => 1,
        iid_type => $self->o('index_type'),
        output_file => '#cdna_file#.clipped',
      },
      -max_retry_count => 0,
      -flow_into => WHEN( '#iid_type# eq "db_seq"' => 'generate_jobs', ELSE 'index_fasta',),
    },
    {
      -logic_name => 'index_fasta',
      -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveIndexFlatFile',
      -rc_name => 'exonerate',
      -parameters => {
        seqfetcher_index => '#cdna_file#_index',
        input_files => ['#cdna_file#.clipped'],
        batch_size => $self->o('batch_size'),
      },
      -max_retry_count => 0,
      -flow_into => {
        2 => ['exonerate'],
      }
    },
    {
      -logic_name => 'generate_jobs',
      -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveSubmitAnalysis',
      -parameters => {
        iid_type => 'sequence_accession',
        batch_size => $self->o('batch_size'),
        sequence_table_name => $self->o('isoseq_table_name'),
      },
      -rc_name => 'exonerate_himem',
      -flow_into => {
        2 => ['exonerate'],
      },
    },
    {
      -logic_name => 'exonerate',
      -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveIsoseqs2Genes',
      -parameters => {
        iid_type => $self->o('index_type'),
        dna_db => $self->o('dna_db'),
        target_db => $self->o('target_db'),
        logic_name => 'isoseq',
        exonerate_cdna_cov => 90,
        exonerate_cdna_pid => 95,
        exonerate_bestn => 1,
        calculate_coverage_and_pid => $self->o('calculate_coverage_and_pid'),
        %{get_analysis_settings('Bio::EnsEMBL::Analysis::Hive::Config::ExonerateStatic','exonerate_cov_per_bestn_sub')},
      },
      -flow_into => {
        -1 => ['exonerate_himem'],
      },
      -rc_name => 'exonerate',
      -batch_size => $self->o('exonerate_batch_size'),
    },
    {
      -logic_name => 'split_batch',
      -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveSubmitAnalysis',
      -parameters => {
        iid_type => 'rechunk',
        batch_size => 1,
      },
      -rc_name => 'exonerate_himem',
      -flow_into => {
        2 => {'exonerate_himem' => {'iid' => '#iid#', 'seqfetcher_index' => '#seqfetcher_index#'}},
      },
    },
    {
      -logic_name => 'exonerate_himem',
      -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveIsoseqs2Genes',
      -parameters => {
        iid_type => $self->o('index_type'),
        dna_db => $self->o('dna_db'),
        target_db => $self->o('target_db'),
        logic_name => 'isoseq',
        exonerate_cdna_cov => 90,
        exonerate_cdna_pid => 95,
        exonerate_bestn => 1,
        calculate_coverage_and_pid => $self->o('calculate_coverage_and_pid'),
        %{get_analysis_settings('Bio::EnsEMBL::Analysis::Hive::Config::ExonerateStatic','exonerate_cov_per_bestn_sub')},
      },
      -rc_name => 'exonerate_himem',
      -can_be_empty => 1,
    },
  );
  if ($self->o('hive_capacity')) {
    foreach my $analysis (@analyses) {
      $analysis->{'-hive_capacity'} = $self->o('hive_capacity');
    }
  }
  return \@analyses;
}

sub pipeline_wide_parameters {
  my ($self) = @_;
  return {
    %{ $self->SUPER::pipeline_wide_parameters() },  # inherit other stuff from the base class
    genome_file         => $self->o('genome_file'),
    exonerate_path      => $self->o('exonerate_path'),
    SOFT_MASKED_REPEATS => $self->o('repeat_masking_logic_names'),
    SEQFETCHER_OBJECT   => $self->o('seqfetcher_object'),
  };
}

sub resource_classes {
  my $self = shift;

  return {
    'default' => { LSF => $self->lsf_resource_builder('production-rh7', 900, [$self->default_options->{'pipe_db_server'}]) },
    'exonerate' => { LSF => [$self->lsf_resource_builder('production-rh7', 3900, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'exonerate_output_db_server'}, $self->default_options->{'dna_db_server'}]) , '-life_span 18000']},
    'exonerate_himem' => { LSF => [$self->lsf_resource_builder('production-rh7', 5900, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'exonerate_output_db_server'}, $self->default_options->{'dna_db_server'}]) , '-life_span 18000']},
  }
}

1;


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/custom_marker_view"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:background="@color/main_blue">

    <ImageView
        android:id="@+id/profile_image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center_horizontal"
        android:contentDescription="@null"
        android:src="@drawable/car"
        android:background="@color/main_blue"
        android:padding="3dp"/>
</RelativeLayout>


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<!-- We must have unique ID's for the address fields in order to have the text
automatically saved by framework.-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/compose_recipients_wrapper"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <!-- To -->

    <LinearLayout android:id="@+id/to_content"
        style="@style/RecipientComposeFieldLayout">
        <LinearLayout android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:addStatesFromChildren="true"
            android:gravity="center_vertical"
            android:layout_gravity="center_vertical">

            <TextView style="@style/RecipientComposeHeading"
                android:text="@string/to"
                android:id="@+id/to_label"
                android:contentDescription="@string/to"/>

            <com.android.email.activity.AddressTextView
                android:id="@+id/to"
                style="@style/RecipientEditTextViewStyle"/>

        </LinearLayout>

        <View style="@style/RecipientComposeFieldSpacer"/>
    </LinearLayout>

    <RelativeLayout android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:id="@+id/cc_bcc_wrapper"
        android:layout_below="@id/to_content"
        android:visibility="gone">

        <LinearLayout style="@style/RecipientComposeFieldLayout"
            android:id="@+id/cc_content"
            android:layout_alignParentTop="true">

            <LinearLayout android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:addStatesFromChildren="true"
                android:gravity="center_vertical">

                <TextView
                    style="@style/RecipientComposeHeading"
                    android:text="@string/cc"
                    android:id="@+id/cc_label"
                    android:contentDescription="@string/cc"/>

                <com.android.email.activity.AddressTextView
                    android:id="@+id/cc"
                    style="@style/RecipientEditTextViewStyle"/>
            </LinearLayout>

            <View style="@style/RecipientComposeFieldSpacer"/>
        </LinearLayout>

        <LinearLayout style="@style/RecipientComposeFieldLayout"
            android:id="@+id/bcc_content"
            android:layout_below="@id/cc_content">

            <LinearLayout android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:addStatesFromChildren="true"
                android:gravity="center_vertical">

                <TextView style="@style/RecipientComposeHeading"
                    android:text="@string/bcc"
                    android:id="@+id/bcc_label"
                    android:contentDescription="@string/bcc"/>

                <com.android.email.activity.AddressTextView
                    android:id="@+id/bcc"
                    style="@style/RecipientEditTextViewStyle"/>

            </LinearLayout>

            <View style="@style/RecipientComposeFieldSpacer"/>
        </LinearLayout>

    </RelativeLayout>

    <RelativeLayout style="@style/ComposeFieldLayout"
                android:layout_below="@id/cc_bcc_wrapper">
        <!-- Subject: localization cannot control what field pressing tab will bring the user to. This is controlled at runtime.  -->
        <EditText android:id="@+id/subject"
            android:inputType="textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine|textMultiLine"
            android:hint="@string/subject_hint"
            android:textColorHint="@color/compose_label_text"
            android:imeOptions="actionDone|flagNoExtractUi"
            style="@style/ComposeEditTextView" />
    </RelativeLayout>
</RelativeLayout>


text:
/**
 *  Document root : fundamental styles
 *
 *  @require base/typography.vars.css
 *  @require base/colors.vars.css
 */

:root {
    --html-bg-color: var(--color-1);
    --text-color: white;
    --text-color-inverse: var(--color-grey-4);
}

@viewport {
    width: device-width;
}

/*  Bug : why is :root needed in the selector here ?
    (tested without : breaks most base styles - can't find where / why for now)

    1. See https://github.com/seaneking/postcss-responsive-type/
*/
:root,
html {
    background: var(--html-bg-color);
    font-family: var(--font-family);
    font-weight: var(--font-weight);
    line-height: var(--line-height);
    color: var(--text-color);
    text-rendering: optimizeLegibility;
    font-size: responsive; /* 1 */
    min-font-size: 13px; /* 1 */
    max-font-size: 18px; /* 1 */
    lower-font-range: 328px; /* 1 */
    upper-font-range: 1400px; /* 1 */
}

/*  FOIT prevention.
    @see /sites/all/themes/chouette/js/main.js
*/

.fontA-is-loaded {
    font-family: var(--font-family-loaded);
}


text:
"""AoC 2018.01 problem solver.

Takes input from STDIN by default.
"""
import sys

def solver(file):
  """
  Take a file object with input and solve AoC 2015.XX problem on the input.

  Keyword arguments:
  file          --- a file object to read input from
  """
  input = list(map(int, map(str.strip, file.readlines())))

  freq = 0

  for adj in input:
    freq += adj

  answer_a = freq

  print(answer_a)

  freq_set = set([0])
  freq = 0
  searching = True

  while searching:
    for adj in input:
      freq += adj
      if freq in freq_set:
        answer_b = freq
        searching = False
        break
      else:
        freq_set.add(freq)

  return (answer_a, answer_b)

if __name__ == "__main__":
  solution = solver(sys.stdin)

  print("Part A: Solution is {}.".format(solution[0]))
  print("Part B: Solution is {}.".format(solution[1]))


text:
class CreateUsers < ActiveRecord::Migration
  def change
    create_table :users do |t|
      t.string :screen_name
      t.integer :number_followers

      t.timestamps null: false
    end
  end
end


text:
package pl.olszak.michal.detector.utils;

import javafx.stage.DirectoryChooser;
import javafx.stage.Window;

import java.io.File;
import java.nio.file.Paths;
import java.util.Optional;

/**
 * @author molszak
 *         created on 09.05.2017.
 */
public final class DialogUtils {

    private DialogUtils() {
    }

    public static Optional<File> openFolder(final String windowTitle,final Window window) {
        final DirectoryChooser directoryChooser = new DirectoryChooser();
        directoryChooser.setTitle(windowTitle);
        directoryChooser.setInitialDirectory(new File(Paths.get(".").toAbsolutePath().toString()));
        File directory = directoryChooser.showDialog(window);
        if (directory == null) {
            return Optional.empty();
        }
        return Optional.of(directory);
    }

}


text:
var React = require('React');
var CollectionRenameForm = require('./collectionrenameform.react');
var Header = require('./header.react');
var CollectionExportForm = require('./collectionexportform.react');
var Button = require('./button.react');
var CollectionStore = require('../stores/collectionstore');
var CollectionActionCreator = require('../actions/collectionactioncreators');

var CollectionControls = React.createClass({
	getInitialState: function() {
		return {
			isEditingName: false
		};
	},
	getHeaderText: function() {
		var numberOfTweetsInCollection = this.props.numberOfTweetsInCollection;
		var text = numberOfTweetsInCollection;
		var name = CollectionStore.getCollectionName();
		if(text === 1) {
			text = text + ' tweet in your';
		} else {
			text = text + ' tweets in your';
		}
		return (

				{text} {name} collection

		);
	},
	toggleEditCollectionName: function() {
		this.setState({
			isEditingName: !this.state.isEditingName
		});
	},
	removeAllTweetsFromCollection: function() {
		CollectionActionCreator.removeAllTweetsFromCollection();
	},
	render() {
		if(this.state.isEditingName) {
			return (
				<CollectionRenameForm onCancelCollectionNameChange={this.toggleEditCollectionName} />
			);
		}
		return (

				<Button label="Rename collection" handleClick={this.toggleEditCollectionName} />
				<Button label="Empty collection" handleClick={this.removeAllTweetsFromCollection} />
				<CollectionExportForm htmlMarkup={this.props.htmlMarkup} />

		);
	}
});

module.exports = CollectionControls;


text:
<title>Density Instructions - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Xtensa-Optimizations.html#Xtensa-Optimizations" title="Xtensa Optimizations">
<link rel="next" href="Xtensa-Automatic-Alignment.html#Xtensa-Automatic-Alignment" title="Xtensa Automatic Alignment">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">

<meta http-equiv="Content-Style-Type" content="text/css">

Next: Xtensa Automatic Alignment,
Up: Xtensa Optimizations

9.36.3.1 Using Density Instructions

The Xtensa instruction set has a code density option that provides
16-bit versions of some of the most commonly used opcodes.  Use of these
opcodes can significantly reduce code size.  When possible, the
assembler automatically translates instructions from the core
Xtensa instruction set into equivalent instructions from the Xtensa code
density option.  This translation can be disabled by using underscore
prefixes (see Opcode Names), by using the
--no-transform command-line option (see Command Line Options), or by using the no-transform directive
(see transform).

It is a good idea not to use the density instructions directly.
The assembler will automatically select dense instructions where
possible.  If you later need to use an Xtensa processor without the code
density option, the same assembly code will then work without modification.


text: TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(LIB_OPTIONAL_PACKAGES SEACASExodus)


text:
'use strict';

const expect = require('chai').expect;

module.exports = (testName, describes) => {

  const testTypes = ['IsIn', 'Is', 'To'];

  // let isQuarkTo = (/to/i.test(testName));
  // let isQuarkIs = (/is/i.test(testName));
  // let isQuarkIsIn = (/isin/i.test(testName));
  let tests = [];

  testTypes.forEach( (element, index) => {
    // verificação de qual eh o teste
    let regex = new RegExp(element, 'i');

    if(!!testName.match(regex)){

      let testModule = require('./config/testQuark'+element);
      let testFunction = 'Quark'+element;
      let test = {};
      tests[testFunction] = testModule;
    }

  });
  console.log(tests);
  const testQuarkIs = require('./config/testQuarkIs');
  const testQuarkTo = require('./config/testQuarkTo');
  const testQuarkIsIn = require('./config/testQuarkIsIn');

  let test = (values, valueToTest) => {

    if(isQuarkTo) tests['QuarkTo'](values, valueToTest, testName, describes);
    else tests['QuarkIs'](values, valueToTest, testName);
  };

  if(describes[0].list) {
    const list = describes.splice(0,1)[0].list;
    test = (values, valueToTest) => {
      tests['QuarkIsIn'](values, valueToTest, list, testName);
    };
  }

  describe(testName, () => {
    describes.forEach( (element, index) => {
      if(element.type) {
        describe(element.message,  () => {
          test(element.values, element.type);
        });
      }
      else {
        describe(element.message,  () => {
          test(element.values, element.type);
        });
      }
      if(element.list) return true;
    });
  });
};


text:
require 'ffaker/address'

module FFaker
  # List of countries from http://sv.wikipedia.org/wiki/V%C3%A4rldens_l%C3%A4nder#Lista_.C3.B6ver_l.C3.A4nder
  # The streetnames are all the roads in Stockholm that contains "väg" or "gata"
  # List of cities are from http://sv.wikipedia.org/wiki/Sveriges_kommuner
  module AddressSE
    include FFaker::Address

    extend ModuleUtils
    extend self

    ZIP_FORMATS = ['#####', '## ###'].freeze
    STREET_NBR_FORMATS = ['##', '#', '#a', '#b', '###'].freeze

    def zip_code
      FFaker.numerify(fetch_sample(ZIP_FORMATS))
    end

    def city
      fetch_sample(CITY)
    end

    def street_name
      fetch_sample(STREET)
    end

    def street_address
      "#{street_name} #{street_nbr}"
    end

    def street_nbr
      FFaker.numerify(fetch_sample(STREET_NBR_FORMATS))
    end

    def full_address
      "#{street_address}, #{zip_code} #{city}, SVERIGE"
    end

    def random_country
      fetch_sample(COUNTRIES)
    end
  end
end


text:
import os

import sublime
from sublime_plugin import WindowCommand, TextCommand

from ..git_command import GitCommand
from ...common import util

COMMIT_HELP_TEXT_EXTRA = """##
## You may also reference or close a GitHub issue with this commit.  To do so,
## type `#` followed by the `tab` key.  You will be shown a list of issues
## related to the current repo.  You may also type `owner/repo#` plus the `tab`
## key to reference an issue in a different GitHub repo.

"""

COMMIT_HELP_TEXT_ALT = """

## To make a commit, type your commit message and close the window. To cancel
## the commit, delete the commit message and close the window. To sign off on
## the commit, press {key}-S.
""".format(key=util.super_key) + COMMIT_HELP_TEXT_EXTRA

COMMIT_HELP_TEXT = """

## To make a commit, type your commit message and press {key}-ENTER. To cancel
## the commit, close the window. To sign off on the commit, press {key}-S.
""".format(key=util.super_key) + COMMIT_HELP_TEXT_EXTRA

COMMIT_SIGN_TEXT = """

Signed-off-by: {name} <{email}>
"""

COMMIT_TITLE = "COMMIT: {}"

class GsCommitCommand(WindowCommand, GitCommand):

    """
    Display a transient window to capture the user's desired commit message.
    If the user is amending the previous commit, pre-populate the commit
    message area with the previous commit message.
    """

    def run(self, **kwargs):
        sublime.set_timeout_async(lambda: self.run_async(**kwargs), 0)

    def run_async(self, repo_path=None, include_unstaged=False, amend=False):
        repo_path = repo_path or self.repo_path
        view = self.window.new_file()
        settings = view.settings()
        settings.set("git_savvy.get_long_text_view", True)
        settings.set("git_savvy.commit_view", True)
        settings.set("git_savvy.commit_view.include_unstaged", include_unstaged)
        settings.set("git_savvy.commit_view.amend", amend)
        settings.set("git_savvy.repo_path", repo_path)

        savvy_settings = sublime.load_settings("GitSavvy.sublime-settings")
        if savvy_settings.get("use_syntax_for_commit_editmsg"):
            syntax_file = util.file.get_syntax_for_file("COMMIT_EDITMSG")
            view.set_syntax_file(syntax_file)
        else:
            view.set_syntax_file("Packages/GitSavvy/syntax/make_commit.sublime-syntax")

        view.run_command("gs_handle_vintageous")

        commit_on_close = savvy_settings.get("commit_on_close")
        settings.set("git_savvy.commit_on_close", commit_on_close)

        title = COMMIT_TITLE.format(os.path.basename(repo_path))
        view.set_name(title)
        if commit_on_close or not savvy_settings.get("prompt_on_abort_commit"):
            view.set_scratch(True)
        view.run_command("gs_commit_initialize_view")

class GsCommitInitializeViewCommand(TextCommand, GitCommand):

    """
    Fill the view with the commit view help message, and optionally
    the previous commit message if amending.
    """

    def run(self, edit):
        merge_msg_path = os.path.join(self.repo_path, ".git", "MERGE_MSG")
        savvy_settings = sublime.load_settings("GitSavvy.sublime-settings")

        help_text = (COMMIT_HELP_TEXT_ALT
                     if savvy_settings.get("commit_on_close")
                     else COMMIT_HELP_TEXT)
        self.view.settings().set("git_savvy.commit_view.help_text", help_text)

        include_unstaged = self.view.settings().get("git_savvy.commit_view.include_unstaged", False)
        option_amend = self.view.settings().get("git_savvy.commit_view.amend")
        if option_amend:
            last_commit_message = self.git("log", "-1", "--pretty=%B").strip()
            initial_text = last_commit_message + help_text
        elif os.path.exists(merge_msg_path):
            with util.file.safe_open(merge_msg_path, "r") as f:
                initial_text = f.read() + help_text
        else:
            initial_text = help_text

        commit_help_extra_file = savvy_settings.get("commit_help_extra_file") or ".commit_help"
        commit_help_extra_path = os.path.join(self.repo_path, commit_help_extra_file)
        if os.path.exists(commit_help_extra_path):
            with util.file.safe_open(commit_help_extra_path, "r", encoding="utf-8") as f:
                initial_text += f.read()

        git_args = [
            "diff",
            "--no-color"
        ]

        show_commit_diff = savvy_settings.get("show_commit_diff")
        # for backward compatibility, check also if show_commit_diff is True
        if show_commit_diff is True or show_commit_diff == "full":
            git_args.append("--patch")

        show_diffstat = savvy_settings.get("show_diffstat")
        if show_commit_diff == "stat" or (show_commit_diff == "full" and show_diffstat):
            git_args.append("--stat")

        if not include_unstaged:
            git_args.append("--cached")

        if option_amend:
            git_args.append("HEAD^")
        elif include_unstaged:
            git_args.append("HEAD")

        initial_text += self.git(*git_args) if show_commit_diff else ''
        self.view.run_command("gs_replace_view_text", {
            "text": initial_text,
            "nuke_cursors": True
            })

class GsCommitViewDoCommitCommand(TextCommand, GitCommand):

    """
    Take the text of the current view (minus the help message text) and
    make a commit using the text for the commit message.
    """

    def run(self, edit, message=None):
        sublime.set_timeout_async(lambda: self.run_async(commit_message=message), 0)

    def run_async(self, commit_message=None):
        if commit_message is None:
            view_text = self.view.substr(sublime.Region(0, self.view.size()))
            help_text = self.view.settings().get("git_savvy.commit_view.help_text")
            commit_message = view_text.split(help_text)[0]

        include_unstaged = self.view.settings().get("git_savvy.commit_view.include_unstaged")

        show_panel_overrides = \
            sublime.load_settings("GitSavvy.sublime-settings").get("show_panel_for")

        self.git(
            "commit",
            "-q" if "commit" not in show_panel_overrides else None,
            "-a" if include_unstaged else None,
            "--amend" if self.view.settings().get("git_savvy.commit_view.amend") else None,
            "-F",
            "-",
            stdin=commit_message
            )

        # ensure view is not already closed (i.e.: when "commit_on_close" enabled)
        is_commit_view = self.view.settings().get("git_savvy.commit_view")
        if is_commit_view and self.view.window():
            self.view.window().focus_view(self.view)
            self.view.set_scratch(True)  # ignore dirty on actual commit
            self.view.window().run_command("close_file")
        else:
            sublime.set_timeout_async(
                lambda: util.view.refresh_gitsavvy(sublime.active_window().active_view()))

class GsCommitViewSignCommand(TextCommand, GitCommand):

    """
    Sign off on the commit with full name and email.
    """

    def run(self, edit):
        view_text = self.view.substr(sublime.Region(0, self.view.size()))
        help_text = self.view.settings().get("git_savvy.commit_view.help_text")
        view_text_list = view_text.split(help_text)

        config_name = self.git("config", "user.name").strip()
        config_email = self.git("config", "user.email").strip()

        sign_text = COMMIT_SIGN_TEXT.format(name=config_name, email=config_email)
        view_text_list[0] += sign_text

        self.view.run_command("gs_replace_view_text", {
            "text": help_text.join(view_text_list),
            "nuke_cursors": True
            })

class GsCommitViewCloseCommand(TextCommand, GitCommand):

    """
    Perform commit action on commit view close if `commit_on_close` setting
    is enabled.
    """

    def run(self, edit):
        savvy_settings = sublime.load_settings("GitSavvy.sublime-settings")
        if savvy_settings.get("commit_on_close"):
            view_text = self.view.substr(sublime.Region(0, self.view.size()))
            help_text = self.view.settings().get("git_savvy.commit_view.help_text")
            message_txt = (view_text.split(help_text)[0]
                           if help_text in view_text
                           else "")
            message_txt = message_txt.strip()

            if message_txt:
                self.view.run_command("gs_commit_view_do_commit", {"message": message_txt})


text:
namespace data_reduction_proxy {

class DataReductionProxyParamsTest : public testing::Test {};

TEST_F(DataReductionProxyParamsTest, PromoFieldTrial) {
  const struct {
    std::string trial_group_name;
    bool expected_enabled;
  } tests[] = {
      {"Enabled", true},
      {"Enabled_Control", true},
      {"Disabled", false},
      {"enabled", false},
  };

  for (const auto& test : tests) {
    base::test::ScopedFeatureList scoped_feature_list;
    scoped_feature_list.Init();

    ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
        "DataCompressionProxyPromoVisibility", test.trial_group_name));
    EXPECT_EQ(test.expected_enabled, params::IsIncludedInPromoFieldTrial())
        << test.trial_group_name;
  }
}

TEST_F(DataReductionProxyParamsTest, FREPromoFieldTrial) {
  const struct {
    std::string trial_group_name;
    bool expected_enabled;
  } tests[] = {
      {"Enabled", true},
      {"Enabled_Control", true},
      {"Disabled", false},
      {"enabled", false},
  };

  for (const auto& test : tests) {
    base::test::ScopedFeatureList scoped_feature_list;
    scoped_feature_list.Init();

    ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
        "DataReductionProxyFREPromo", test.trial_group_name));
    EXPECT_EQ(test.expected_enabled, params::IsIncludedInFREPromoFieldTrial())
        << test.trial_group_name;
  }
}

TEST_F(DataReductionProxyParamsTest, LowMemoryPromoFeature) {
  const struct {
    bool expected_in_field_trial;
  } tests[] = {
      {false}, {true},
  };

  for (const auto& test : tests) {
    base::test::ScopedFeatureList scoped_feature_list;
    if (test.expected_in_field_trial) {
      scoped_feature_list.InitAndDisableFeature(
          features::kDataReductionProxyLowMemoryDevicePromo);
    } else {
      scoped_feature_list.InitAndEnableFeature(
          features::kDataReductionProxyLowMemoryDevicePromo);
    }

#if defined(OS_ANDROID)
    EXPECT_EQ(test.expected_in_field_trial && base::SysInfo::IsLowEndDevice(),
              params::IsIncludedInPromoFieldTrial());
    EXPECT_EQ(test.expected_in_field_trial && base::SysInfo::IsLowEndDevice(),
              params::IsIncludedInFREPromoFieldTrial());
#else
    EXPECT_FALSE(params::IsIncludedInPromoFieldTrial());
    EXPECT_FALSE(params::IsIncludedInFREPromoFieldTrial());
#endif
  }
}

}  // namespace data_reduction_proxy


text:
namespace exp_mod_normal_lcdf2_test {

auto exp_mod_normal_lcdf_functor
    = [](const auto& y, const auto& mu, const auto& sigma, const auto& lambda) {
        return stan::math::exp_mod_normal_lcdf(y, mu, sigma, lambda);
      };

TEST(ProbDistributionsDoubleExpModNormalLcdf, opencl_broadcast_mu) {
  int N = 3;

  Eigen::VectorXd y(N);
  y << 0.3, 0.8, 1.0;
  double mu_scal = 12.3;
  Eigen::VectorXd sigma(N);
  sigma << 0.3, 0.8, 1.0;
  Eigen::VectorXd lambda(N);
  lambda << 0.3, 0.4, 1.1;

  stan::math::test::test_opencl_broadcasting_prim_rev<1>(
      exp_mod_normal_lcdf_functor, y, mu_scal, sigma, lambda);
  stan::math::test::test_opencl_broadcasting_prim_rev<1>(
      exp_mod_normal_lcdf_functor, y.transpose().eval(), mu_scal, sigma,
      lambda.transpose().eval());
}
}  // namespace exp_mod_normal_lcdf2_test

#endif


text:
tag: OpenMisc
permalink: "/category/OpenMisc"
---


text:
    <title>Wicket Examples - linkomatic</title>
    <link rel="stylesheet" type="text/css" href="style.css"/>

Title: Huckleberry Finn

<wicket:link>[go back]</wicket:link>


text:
/**
 * Apache Licence Version 2.0
 * Please read the LICENCE file
 */
package org.hypothesis.common.utility;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.commons.lang3.StringUtils;

/**
 * @author Kamil Morong, Tilioteo Ltd
 *
 *         Hypothesis
 *
 */
public class ConversionUtility {

	private static final String STR_UNIT_PX = "px";
	private static final String STR_UNIT_PT = "pt";
	private static final String STR_UNIT_EM = "em";
	private static final String STR_UNIT_EX = "ex";
	private static final String STR_UNIT_MM = "mm";
	private static final String STR_UNIT_CM = "cm";
	private static final String STR_UNIT_PERCENT = "%";

	private static final String ERROR_INPUT_STRING_NUM_CHARS = "Input string must contain an even number of characters";
	private static final String STR_HEX_PREFIX = "0x";
	private static final String STR_0 = "0";

	private ConversionUtility() {
	}

	public static String getStringOrDefault(String value, String defaultValue) {
		return value != null ? value : defaultValue;
	}

	public static String getDimension(String string) {
		if (string != null && !(string.endsWith(STR_UNIT_PX) || string.endsWith(STR_UNIT_PT)
				|| string.endsWith(STR_UNIT_EM) || string.endsWith(STR_UNIT_EX) || string.endsWith(STR_UNIT_MM)
				|| string.endsWith(STR_UNIT_CM) || string.endsWith(STR_UNIT_PERCENT))) {
			try {
				Double doubleValue = Double.parseDouble(string);
				string = doubleValue + STR_UNIT_PX;
			} catch (NumberFormatException e) {
				string = null;
			}
		}

		return string;
	}

	public static Boolean getBoolean(String string) {
		if (StringUtils.isNotBlank(string)) {
			string = string.trim();
			if ("true".equalsIgnoreCase(string) || "1".equals(string)) {
				return Boolean.TRUE;
			} else if ("false".equalsIgnoreCase(string) || "0".equals(string)) {
				return Boolean.FALSE;
			}
		}
		return null;
	}

	public static boolean getBooleanOrDefault(String string, boolean defaultValue) {
		Boolean value = getBoolean(string);
		return value != null ? value : defaultValue;
	}

	public static Integer getInteger(String string) {
		if (StringUtils.isNotBlank(string)) {
			try {
				Integer value = Integer.parseInt(string);
				return value;
			} catch (Exception e) {
			}
		}
		return null;
	}

	public static int getIntegerOrDefault(String string, int defaultValue) {
		Integer value = getInteger(string);
		return value != null ? value : defaultValue;
	}

	public static Double getDouble(String string) {
		if (StringUtils.isNotBlank(string)) {
			try {
				Double value = Double.parseDouble(string);
				return value;
			} catch (Exception e) {
			}
		}
		return null;
	}

	public static double getDoubleOrDefault(String string, double defaultValue) {
		Double value = getDouble(string);
		return value != null ? value : defaultValue;
	}

	public static Date getDate(String string, String format) {
		if (StringUtils.isNotBlank(string) && StringUtils.isNotBlank(format)) {
			try {
				DateFormat formatter = new SimpleDateFormat(format);
				Date value = formatter.parse(string);
				return value;
			} catch (Exception e) {
			}
		}
		return null;
	}

	public static Date getDateOrDefault(String string, String format, Date defaultValue) {
		Date value = getDate(string, format);
		return value != null ? value : defaultValue;
	}

	public static String toHexString(byte[] bytes) {
		StringBuilder sb = new StringBuilder(bytes.length * 2);
		int i;

		for (i = 0; i < bytes.length; i++) {
			if ((bytes[i] & 0xff) < 0x10)
				sb.append(STR_0);

			sb.append(Long.toString(bytes[i] & 0xff, 16));
		}

		return sb.toString();
	}

	public static byte[] fromHexString(final String str) {
		if ((str.length() % 2) != 0)
			throw new IllegalArgumentException(ERROR_INPUT_STRING_NUM_CHARS);

		byte[] result = new byte[str.length() / 2];
		for (int i = 0; i < str.length() / 2; i++) {
			result[i] = (Integer.decode(STR_HEX_PREFIX + str.substring(i * 2, (i + 1) * 2))).byteValue();
		}
		return result;
	}

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Gloniopsis regia Rehm

### Remarks
null


text:
\chapter{Robust instrumental variables estimation}
\label{chap:iv}

\begin{itemize}
\item
    Robust IV/2SLS estimators   % Cohe Freue-Zamar method, the Amemyia 2 proposal, tests
\end{itemize}

\endinput


text:
"use strict";

function privateMethod (value) {
  // do private stuff.
  // No access to object, if shared move to a utility include.
  return value + " private method added this";
}

/**
 * @doc module
 * @name Radio
 * @description
 * Custom event subscription and broadcasting system.
 * @sample
 * var Radio = require("./experimental/radio"); // require radio module
 * var radio = new Radio("myChannel"); // create radio channels
 * radio.subscribe(el, "myChannel", callback);
 * radio.broadcast("myChannel"); // el callback should fire
 * radio.unsubscribe(el, "myChannel", callback);
 * radio.broadcast("myChannel"); // el callback should not fire
 */
var Radio = function (channelNames) {

  this.events = [];

  if (typeof channelNames === "string") {
    channelNames = [channelNames];
  }
  channelNames.forEach(function (channelName) {
    this.events[channelName] = {
      e: new Event(channelName),
      elements: []
    };
  }, this);

  return this;

};

Radio.prototype.addChannel = function (channelName) {
  this.events[channelName] = {
    e: new Event(channelName),
    elements: []
  };
};

Radio.prototype.broadcast = function (channelName) {
  this.events[channelName].elements.forEach(function (element) {
    element.dispatchEvent(this.events[channelName].e);
  }, this);
};

var privateFunction = function (callback, e, args) {
  console.log(callback);
  e.extra = args;
  callback.apply(e.target,[e]);
};

Radio.prototype.subscribe = function (element, channelName, callback) {
  element.addEventListener(channelName, function (e) {
    privateFunction(callback, e, {hi: "hi"});
  }, false);
  this.events[channelName].elements.push(element);
};

Radio.prototype.unsubscribe = function (element, channelName, callback) {

  var elArr = this.events[channelName].elements,
      index = elArr.indexOf(element);

  // figure out how to find the callback without passing it...
  element.removeEventListener(channelName, privateFunction, false);

  // remove from broadcast array
  elArr.splice(index, 1);

};

//Exports the page module for app.js to use
module.exports = Radio;


text:
package gg.uhc.uhc.modules.reset.resetters;

import gg.uhc.uhc.modules.reset.actions.Action;
import gg.uhc.uhc.modules.reset.actions.FullHungerAction;

import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;

public class PlayerFoodResetter extends PlayerResetter {

    public PlayerFoodResetter(Plugin plugin, long cacheTicks) {
        super(plugin, cacheTicks);
    }

    @Override
    protected Action getActionForPlayer(Player player) {
        return new FullHungerAction(player.getUniqueId());
    }
}


text:
package com.foxty.jmon.job.task;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;

import com.foxty.jmon.pojo.Env;
import com.foxty.jmon.pojo.JProcess;
import com.foxty.jmon.util.JmonUtil;

public abstract class CommandTask implements Runnable {

	private static Logger log = LoggerFactory.getLogger(CommandTask.class);
	final private JdbcTemplate jdbc;
	final private Env env;
	final private JProcess process;
	private int failedCount;

	public CommandTask(JdbcTemplate jdbc, Env env, JProcess process) {
		this.jdbc = jdbc;
		this.env = env;
		this.process = process;
	}

	public JdbcTemplate getJdbc() {
		return jdbc;
	}

	public Env getEnv() {
		return env;
	}

	public JProcess getProcess() {
		return process;
	}

	protected CmdResult execCmd(List<String> commands, int timeoutInMs) {
		return JmonUtil.execCmd(commands, timeoutInMs);
	}

	public void run() {
		try {
			boolean re = runTask();
			failedCount = re ? 0 : failedCount + 1;
		} catch (Exception e) {
			log.error(e.getMessage(), e);
			onException(e);
		}
		if (failedCount >= 5) {
			log.warn(
					"Curernt job failed {} times, now canceling execution thread.",
					failedCount);
			throw new RuntimeException("Cancel task for " + process);
		}
	}

	/**
	 * Task executions should implement this method.
	 *
	 * @return task execution success or fail
	 */
	abstract boolean runTask();

	/**
	 * Exception handler for task.
	 *
	 * @param e
	 */
	abstract void onException(Exception e);
}


text:
require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../../fixtures/classes', __FILE__)

ruby_version_is ""..."1.9" do
  describe "BasicSocket.do_not_reverse_lookup" do
    before :all do
      @do_not_reverse_lookup = BasicSocket.do_not_reverse_lookup
    end

    before(:each) do
      @server = TCPServer.new('127.0.0.1', SocketSpecs.port)
      @socket = TCPSocket.new('127.0.0.1', SocketSpecs.port)
    end

    after(:each) do
      @socket.close unless @socket.closed?
      @server.close unless @server.closed?
    end

    after :all do
      BasicSocket.do_not_reverse_lookup = @do_not_reverse_lookup
    end

    it "defaults to false" do
      BasicSocket.do_not_reverse_lookup.should be_false
    end

    it "causes 'peeraddr' to avoid name lookups" do
      BasicSocket.do_not_reverse_lookup = true
      @socket.peeraddr.should == ["AF_INET", SocketSpecs.port, "127.0.0.1", "127.0.0.1"]
    end

    it "looks for hostnames when set to false" do
      BasicSocket.do_not_reverse_lookup = false
      @socket.peeraddr[2].should == SocketSpecs.hostname
    end

    it "looks for numeric addresses when set to true" do
      BasicSocket.do_not_reverse_lookup = true
      @socket.peeraddr[2].should == "127.0.0.1"
    end
  end
end

ruby_version_is "1.9" do
  describe "BasicSocket.do_not_reverse_lookup" do
    before(:each) do
      @server = TCPServer.new('127.0.0.1', SocketSpecs.port)
      @socket = TCPSocket.new('127.0.0.1', SocketSpecs.port)
    end

    after(:each) do
      @server.close unless @server.closed?
      @socket.close unless @socket.closed?
    end

    it "defaults to true" do
      BasicSocket.do_not_reverse_lookup.should be_true
    end

    it "causes 'peeraddr' to avoid name lookups" do
      @socket.do_not_reverse_lookup = true
      BasicSocket.do_not_reverse_lookup = true
      @socket.peeraddr.should == ["AF_INET", SocketSpecs.port, "127.0.0.1", "127.0.0.1"]
    end

    it "looks for hostnames when set to false" do
      @socket.do_not_reverse_lookup = false
      BasicSocket.do_not_reverse_lookup = false
      @socket.peeraddr[2].should == SocketSpecs.hostname
    end

    it "looks for numeric addresses when set to true" do
      @socket.do_not_reverse_lookup = true
      BasicSocket.do_not_reverse_lookup = true
      @socket.peeraddr[2].should == "127.0.0.1"
    end
  end
end


text:
package serial_fixture_test

import (
	"flag"
	"fmt"
	"io"
	"net/http"
	"sync"
	"testing"
	"time"

	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/ghttp"
)

var noSerial *bool

func init() {
	noSerial = flag.CommandLine.Bool("no-serial", false, "set to turn off serial decoration")
}

var SerialDecoration = []interface{}{Serial}

func TestSerialFixture(t *testing.T) {
	RegisterFailHandler(Fail)
	if *noSerial {
		SerialDecoration = []interface{}{}
	}

	RunSpecs(t, "SerialFixture Suite")
}

var addr string

var _ = SynchronizedBeforeSuite(func() []byte {
	server := ghttp.NewServer()
	lock := &sync.Mutex{}
	count := 0
	server.RouteToHandler("POST", "/counter", func(w http.ResponseWriter, r *http.Request) {
		lock.Lock()
		count += 1
		lock.Unlock()
		w.WriteHeader(http.StatusOK)
	})
	server.RouteToHandler("GET", "/counter", func(w http.ResponseWriter, r *http.Request) {
		lock.Lock()
		data := []byte(fmt.Sprintf("%d", count))
		lock.Unlock()
		w.Write(data)
	})
	return []byte(server.HTTPTestServer.URL)
}, func(data []byte) {
	addr = string(data) + "/counter"
})

var postToCounter = func(g Gomega) {
	req, err := http.Post(addr, "", nil)
	g.Ω(err).ShouldNot(HaveOccurred())
	g.Ω(req.StatusCode).Should(Equal(http.StatusOK))
	g.Ω(req.Body.Close()).Should(Succeed())
}

var getCounter = func(g Gomega) string {
	req, err := http.Get(addr)
	g.Ω(err).ShouldNot(HaveOccurred())
	content, err := io.ReadAll(req.Body)
	g.Ω(err).ShouldNot(HaveOccurred())
	g.Ω(req.Body.Close()).Should(Succeed())
	return string(content)
}

var _ = SynchronizedAfterSuite(func() {
	Consistently(postToCounter, 200*time.Millisecond, 10*time.Millisecond).Should(Succeed())
}, func() {
	initialValue := getCounter(Default)
	Consistently(func(g Gomega) {
		currentValue := getCounter(g)
		g.Ω(currentValue).Should(Equal(initialValue))
	}, 100*time.Millisecond, 10*time.Millisecond).Should(Succeed())
})

var _ = Describe("tests", func() {
	for i := 0; i < 10; i += 1 {
		It("runs in parallel", func() {
			Consistently(postToCounter, 200*time.Millisecond, 10*time.Millisecond).Should(Succeed())
		})
	}

	for i := 0; i < 5; i += 1 {
		It("runs in series", SerialDecoration, func() {
			Ω(GinkgoParallelProcess()).Should(Equal(1))
			initialValue := getCounter(Default)
			Consistently(func(g Gomega) {
				currentValue := getCounter(g)
				g.Ω(currentValue).Should(Equal(initialValue))
			}, 100*time.Millisecond, 10*time.Millisecond).Should(Succeed())
		})
	}
})


text:
.payment-modal .actions{
	margin-bottom: 20px;
}

.payment-modal .validate{
	margin-bottom: 10px;
}


text:
package org.jkiss.dbeaver.ext.exasol.model.cache;

import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.ext.exasol.ExasolSysTablePrefix;
import org.jkiss.dbeaver.ext.exasol.model.ExasolSchema;
import org.jkiss.dbeaver.ext.exasol.model.ExasolTable;
import org.jkiss.dbeaver.ext.exasol.model.ExasolTableColumn;
import org.jkiss.dbeaver.ext.exasol.tools.ExasolUtils;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCStatement;
import org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCStructCache;
import org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl;

import java.sql.SQLException;

public final class ExasolTableCache
		extends JDBCStructCache<ExasolSchema, ExasolTable, ExasolTableColumn> {

	private static final String SQL_COLS_TAB = "SELECT " +
			"c.* " +
			"FROM " +
			"SYS.%s_COLUMNS c " +
			"WHERE " +
			"COLUMN_SCHEMA = '%s' " +
			"AND COLUMN_TABLE = '%s' " +
			"ORDER BY " +
			"COLUMN_ORDINAL_POSITION ";
	private static final String SQL_COLS_ALL = "SELECT " +
			"c.* " +
			"FROM " +
			"SYS.%s_COLUMNS c " +
			"WHERE " +
			"COLUMN_SCHEMA = '%s' AND COLUMN_OBJECT_TYPE = 'TABLE' " +
			"ORDER BY " +
			"COLUMN_ORDINAL_POSITION ";

	private static final String SQL_TABLES = "SELECT * FROM \"$ODBCJDBC\".ALL_TABLES WHERE TABLE_SCHEM = '%s' and TABLE_TYPE = 'TABLE' order by TABLE_NAME";

	public ExasolTableCache()
	{
		super("TABLE_NAME");
	}

	@NotNull
    @Override
	protected JDBCStatement prepareObjectsStatement(
			@NotNull JDBCSession session, @NotNull ExasolSchema exasolSchema)
			throws SQLException
	{
		String sql = String.format(SQL_TABLES, exasolSchema.getName());

		JDBCStatement dbstat = session.createStatement();

		dbstat.setQueryString(sql);

		return dbstat;

	}

	@SuppressWarnings("rawtypes")
	@Override
	protected JDBCStatement prepareChildrenStatement(
			@NotNull JDBCSession session, @NotNull ExasolSchema exasolSchema,
			@Nullable ExasolTable exasolTable) throws SQLException
	{

		String tablePrefix = exasolSchema.getDataSource().getTablePrefix(ExasolSysTablePrefix.ALL);
		String sql;

		if (exasolTable != null)
			sql = String.format(SQL_COLS_TAB,tablePrefix, ExasolUtils.quoteString(exasolSchema.getName()),ExasolUtils.quoteString(exasolTable.getName()));
		else
			sql = String.format(SQL_COLS_ALL,tablePrefix, ExasolUtils.quoteString(exasolSchema.getName()));

		JDBCStatement dbstat = session.createStatement();

		((JDBCStatementImpl) dbstat).setQueryString(sql);

		return dbstat;
	}

	@Override
	protected ExasolTableColumn fetchChild(@NotNull JDBCSession session,
                                           @NotNull ExasolSchema owner, @NotNull ExasolTable parent,
                                           @NotNull JDBCResultSet dbResult) throws SQLException, DBException
	{
		return new ExasolTableColumn(session.getProgressMonitor(), parent,
				dbResult);
	}

	@Override
	protected ExasolTable fetchObject(@NotNull JDBCSession session,
			@NotNull ExasolSchema owner, @NotNull JDBCResultSet resultSet)
			throws SQLException, DBException
	{
		return new ExasolTable(session.getProgressMonitor(), owner, resultSet);
	}

}