text:
.class public final Landroid/nfc/NdefMessage;
.super Ljava/lang/Object;
.source "NdefMessage.java"

# interfaces
.implements Landroid/os/Parcelable;

# static fields
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/os/Parcelable$Creator",
            "<",
            "Landroid/nfc/NdefMessage;",
            ">;"
        }
    .end annotation
.end field

# instance fields
.field private final mRecords:[Landroid/nfc/NdefRecord;

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

    .prologue
    .line 216
    new-instance v0, Landroid/nfc/NdefMessage$1;

    invoke-direct {v0}, Landroid/nfc/NdefMessage$1;-><init>()V

    sput-object v0, Landroid/nfc/NdefMessage;->CREATOR:Landroid/os/Parcelable$Creator;

    return-void
.end method

.method public varargs constructor <init>(Landroid/nfc/NdefRecord;[Landroid/nfc/NdefRecord;)V
    .locals 8
    .parameter "record"
    .parameter "records"

    .prologue
    const/4 v7, 0x0

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

    .line 113
    if-nez p1, :cond_0

    new-instance v4, Ljava/lang/NullPointerException;

    const-string/jumbo v5, "record cannot be null"

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

    throw v4

    .line 115
    :cond_0
    move-object v0, p2

    .local v0, arr$:[Landroid/nfc/NdefRecord;
    array-length v2, v0

    .local v2, len$:I
    const/4 v1, 0x0

    .local v1, i$:I
    :goto_0
    if-ge v1, v2, :cond_2

    aget-object v3, v0, v1

    .line 116
    .local v3, r:Landroid/nfc/NdefRecord;
    if-nez v3, :cond_1

    .line 117
    new-instance v4, Ljava/lang/NullPointerException;

    const-string/jumbo v5, "record cannot be null"

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

    throw v4

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

    goto :goto_0

    .line 121
    .end local v3           #r:Landroid/nfc/NdefRecord;
    :cond_2
    array-length v4, p2

    add-int/lit8 v4, v4, 0x1

    new-array v4, v4, [Landroid/nfc/NdefRecord;

    iput-object v4, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    .line 122
    iget-object v4, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    aput-object p1, v4, v7

    .line 123
    iget-object v4, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    const/4 v5, 0x1

    array-length v6, p2

    invoke-static {p2, v7, v4, v5, v6}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 124
    return-void
.end method

.method public constructor <init>([B)V
    .locals 3
    .parameter "data"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/nfc/FormatException;
        }
    .end annotation

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

    .line 95
    if-nez p1, :cond_0

    new-instance v1, Ljava/lang/NullPointerException;

    const-string v2, "data is null"

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

    throw v1

    .line 96
    :cond_0
    invoke-static {p1}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;

    move-result-object v0

    .line 98
    .local v0, buffer:Ljava/nio/ByteBuffer;
    const/4 v1, 0x0

    invoke-static {v0, v1}, Landroid/nfc/NdefRecord;->parse(Ljava/nio/ByteBuffer;Z)[Landroid/nfc/NdefRecord;

    move-result-object v1

    iput-object v1, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    .line 100
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v1

    if-lez v1, :cond_1

    .line 101
    new-instance v1, Landroid/nfc/FormatException;

    const-string/jumbo v2, "trailing data"

    invoke-direct {v1, v2}, Landroid/nfc/FormatException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 103
    :cond_1
    return-void
.end method

.method public constructor <init>([Landroid/nfc/NdefRecord;)V
    .locals 6
    .parameter "records"

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

    .line 133
    array-length v4, p1

    const/4 v5, 0x1

    if-ge v4, v5, :cond_0

    .line 134
    new-instance v4, Ljava/lang/IllegalArgumentException;

    const-string/jumbo v5, "must have at least one record"

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

    throw v4

    .line 136
    :cond_0
    move-object v0, p1

    .local v0, arr$:[Landroid/nfc/NdefRecord;
    array-length v2, v0

    .local v2, len$:I
    const/4 v1, 0x0

    .local v1, i$:I
    :goto_0
    if-ge v1, v2, :cond_2

    aget-object v3, v0, v1

    .line 137
    .local v3, r:Landroid/nfc/NdefRecord;
    if-nez v3, :cond_1

    .line 138
    new-instance v4, Ljava/lang/NullPointerException;

    const-string/jumbo v5, "records cannot contain null"

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

    throw v4

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

    goto :goto_0

    .line 142
    .end local v3           #r:Landroid/nfc/NdefRecord;
    :cond_2
    iput-object p1, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    .line 143
    return-void
.end method

# virtual methods
.method public describeContents()I
    .locals 1

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

    return v0
.end method

.method public equals(Ljava/lang/Object;)Z
    .locals 4
    .parameter "obj"

    .prologue
    const/4 v1, 0x0

    .line 242
    if-ne p0, p1, :cond_1

    const/4 v1, 0x1

    .line 246
    :cond_0
    :goto_0
    return v1

    .line 243
    :cond_1
    if-eqz p1, :cond_0

    .line 244
    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v2

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v3

    if-ne v2, v3, :cond_0

    move-object v0, p1

    .line 245
    check-cast v0, Landroid/nfc/NdefMessage;

    .line 246
    .local v0, other:Landroid/nfc/NdefMessage;
    iget-object v1, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    iget-object v2, v0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    invoke-static {v1, v2}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z

    move-result v1

    goto :goto_0
.end method

.method public getByteArrayLength()I
    .locals 6

    .prologue
    .line 174
    const/4 v3, 0x0

    .line 175
    .local v3, length:I
    iget-object v0, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    .local v0, arr$:[Landroid/nfc/NdefRecord;
    array-length v2, v0

    .local v2, len$:I
    const/4 v1, 0x0

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

    aget-object v4, v0, v1

    .line 176
    .local v4, r:Landroid/nfc/NdefRecord;
    invoke-virtual {v4}, Landroid/nfc/NdefRecord;->getByteLength()I

    move-result v5

    add-int/2addr v3, v5

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

    goto :goto_0

    .line 178
    .end local v4           #r:Landroid/nfc/NdefRecord;
    :cond_0
    return v3
.end method

.method public getRecords()[Landroid/nfc/NdefRecord;
    .locals 1

    .prologue
    .line 157
    iget-object v0, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    return-object v0
.end method

.method public hashCode()I
    .locals 1

    .prologue
    .line 233
    iget-object v0, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    invoke-static {v0}, Ljava/util/Arrays;->hashCode([Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public toByteArray()[B
    .locals 8

    .prologue
    const/4 v5, 0x1

    const/4 v6, 0x0

    .line 193
    invoke-virtual {p0}, Landroid/nfc/NdefMessage;->getByteArrayLength()I

    move-result v2

    .line 194
    .local v2, length:I
    invoke-static {v2}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v0

    .line 196
    .local v0, buffer:Ljava/nio/ByteBuffer;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    iget-object v7, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    array-length v7, v7

    if-ge v1, v7, :cond_2

    .line 197
    if-nez v1, :cond_0

    move v3, v5

    .line 198
    .local v3, mb:Z
    :goto_1
    iget-object v7, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    array-length v7, v7

    add-int/lit8 v7, v7, -0x1

    if-ne v1, v7, :cond_1

    move v4, v5

    .line 199
    .local v4, me:Z
    :goto_2
    iget-object v7, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    aget-object v7, v7, v1

    invoke-virtual {v7, v0, v3, v4}, Landroid/nfc/NdefRecord;->writeToByteBuffer(Ljava/nio/ByteBuffer;ZZ)V

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

    goto :goto_0

    .end local v3           #mb:Z
    .end local v4           #me:Z
    :cond_0
    move v3, v6

    .line 197
    goto :goto_1

    .restart local v3       #mb:Z
    :cond_1
    move v4, v6

    .line 198
    goto :goto_2

    .line 202
    .end local v3           #mb:Z
    :cond_2
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v5

    return-object v5
.end method

.method public toString()Ljava/lang/String;
    .locals 2

    .prologue
    .line 251
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "NdefMessage "

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

    move-result-object v0

    iget-object v1, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    invoke-static {v1}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

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

    move-result-object v0

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

    move-result-object v0

    return-object v0
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .locals 1
    .parameter "dest"
    .parameter "flags"

    .prologue
    .line 212
    iget-object v0, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    array-length v0, v0

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

    .line 213
    iget-object v0, p0, Landroid/nfc/NdefMessage;->mRecords:[Landroid/nfc/NdefRecord;

    invoke-virtual {p1, v0, p2}, Landroid/os/Parcel;->writeTypedArray([Landroid/os/Parcelable;I)V

    .line 214
    return-void
.end method


text:
![Rocket.Chat logo](https://raw.githubusercontent.com/RocketChat/Rocket.Chat.Artwork/master/Logos/logo-dark.svg?sanitize=true)

# IMPORTANT:   PLEASE READ THIS FIRST

Rocket.Chat mobile is [moving to React Native](https://rocket.chat/2019/10/11/moving-mobile-apps-to-react/).   Development on this repository by Rocket.Chat has now ceased.   If your team is interested in taking over and maintaining this Android native client repository then please [contact us](https://rocket.chat/contact).

# Legacy Rocket.Chat Android native application

[![CircleCI](https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop.svg?style=shield)](https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a81156a8682e4649994270d3670c3c83)](https://www.codacy.com/app/matheusjardimb/Rocket.Chat.Android)

## Get it from the stores

[![](https://user-images.githubusercontent.com/551004/48210349-50649480-e35e-11e8-97d9-74a4331faf3a.png)](https://f-droid.org/en/packages/chat.rocket.android/)

## Description

This repository contains all the code related to the Android native application of [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat/#about-rocketchat). To send new pull-requests, always use the branch `develop` as base and open an issue with the description of what you want/need to accomplish, if the issue wasn't created yet.

## How to build

- Make sure that you have the latest **Gradle** and the **Android plugin** versions installed. Go to `File > Project Structure > Project` and make sure that you have the latest versions installed. Refer [this](https://developer.android.com/studio/releases/gradle-plugin.html#updating-gradle) to see the compatible versions.
- Kotlin is already configured in the project. To check, go to `Tools > Kotlin > Configure Kotlin in project`. A message saying kotlin is already configured in the project pops up. You can update kotlin to the latest version by going to `Tools > Kotlin > Configure Kotlin updates` and download the latest version of kotlin.

### SDK Instructions

- This version requires the [Kotlin SDK](https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK) for Rocket.Chat. Clone the Kotlin SDK in by running `git clone https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK.git`.
- First, a build is required for the SDK, so that required jar files are generated. Make sure that the Android repository and the Kotlin SDK have the same immediate parent directory. Change the current directory to `Rocket.Chat.Android/app` and run the `build-sdk.sh` which will result in creating of the required jar file `core*.jar` and `common*.jar` in `Rocket.Chat.Android/app/libs`, by the following steps in your terminal window:

```
cd Rocket.Chat.Android/app
./build-sdk.sh
```

**Note:** *You need to have Java 8 as default Java for the system (project won't build when using a Java 9+ version).*

## How to run

### Command Line

- Connect your physical device to your pc via USB or start an emulator. Run `adb devices` in terminal. You should see your device in the list of devices.
- In order to build the debug apk, run `./gradlew assembleDebug`. This would generate a debug apk which can be found under `Rocket.Chat.Android/app/build/outputs/apk/debug` folder with the name `app-debug.apk`.
- In order to build and install the apk directly to the connected device, run `./gradlew installDebug`.

### Android Studio

- After importing the project in Android Studio, go to `Run > Run app` and then select your device, or create a new virtual device by following the wizard.

## Bug report & Feature request

Are you having a technical issue trying to compile the app, or setting up Push Notifications? Please use our Community Support channel for that: https://forums.rocket.chat/c/community-support. The issues are only supposed to be used for bugs, improvements, and features in the native Android application.

## Coding Style

Please follow the official [Kotlin coding conventions](https://kotlinlang.org/docs/reference/coding-conventions.html) when contributing.

redpajama_set_name: RedPajamaGithub


text:
package net.phys2d.raw;

import net.phys2d.math.ROVector2f;

/**
 * An event describing a collision between two bodies
 *
 * @author Kevin Glass
 */
public class CollisionEvent {
	/** The time of the collision detection */
	private float time;
	/** The first body in the collision */
	private Body body1;
	/** The second body in the collision */
	private Body body2;
	/** The point of the collision */
	private ROVector2f point;
	/** The normal at the collision */
	private ROVector2f normal;
	/** The penetration caused by the collision */
	private float depth;

	/**
	 * Create a new event describing a contact
	 *
	 * @param time The time of the collision
	 * @param body1 The first body in the collision
	 * @param body2 The second body in the collision
	 * @param point The point of collision (not always perfect - accepts penetration)
	 * @param normal The normal of collision
	 * @param depth The penetration of of the contact
	 */
	public CollisionEvent(float time, Body body1, Body body2, ROVector2f point, ROVector2f normal, float depth) {
		this.time = time;
		this.body1 = body1;
		this.body2 = body2;
		this.point = point;
		this.normal = normal;
		this.depth = depth;
	}

	/**
	 * Get the time of the collision
	 *
	 * @return The time of the collision
	 */
	public float getTime() {
		return time;
	}

	/**
	 * Get the first body in the collision
	 *
	 * @return The first body in the collision
	 */
	public Body getBodyA() {
		return body1;
	}

	/**
	 * Get the second body in the collision
	 *
	 * @return The second body in the collision
	 */
	public Body getBodyB() {
		return body2;
	}

	/**
	 * Get the normal at the collision point
	 *
	 * @return The normal at the collision point
	 */
	public ROVector2f getNormal() {
		return normal;
	}

	/**
	 * Get the point where the collision occured
	 *
	 * @return The point where the collision occured
	 */
	public ROVector2f getPoint() {
		return point;
	}

	/**
	 * Get the penetration depth caused by the collision
	 *
	 * @return The penetration depth caused by the collision
	 */
	public float getPenetrationDepth() {
		return depth;
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return "[Collision \r\n"+
			   " body A: "+body1+"\r\n"+
			   " body B: "+body2+"\r\n"+
			   " contact: "+point+"\r\n"+
			   " normal: "+normal+"\r\n"+
			   " penetration: "+depth+"\r\n";
	}
}


text:
using java.lang;

public class Wildcard {
	public static bool test() {
		var w1 = new WildcardAux<Object>(new Object());
		var w2 = new WildcardAux<string>("STR");
		var o1 = test(w1);
		var o2 = test(w2);
		return o1 instanceof Object && o2 instanceof string;
	}

	public static Object test(WildcardAux<?> w) {
		return w.value;
	}
}

public class WildcardAux<T> {
	public WildcardAux(T value) {
		this.value = value;
	}
	public T value*;
}


text:
#region Imports

using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
#endregion

namespace P3Net.Kraken.Web.UI
{
	/// A <see cref="HyperLink"/> that can display both an image and text.
	/// <preliminary/>
	[CodeNotAnalyzed]
	[CodeNotTested]
	[ToolboxData("<{0}:ImageLink runat=\"server\"></{0}:ImageLink>")]
	public class ImageLink : HyperLink
	{
		#region Public Members

		#region Attributes

		/// Gets or sets the mode used to display the link.
		[Category("Appearance")]
		[Description("The mode used to display the link.")]
		[DefaultValue(typeof(ImageLinkDisplayMode), "ImageAndText")]
		public ImageLinkDisplayMode DisplayMode
		{
			[DebuggerStepThrough]
			get
			{
				object obj = ViewState["DisplayMode"];
				return (obj != null) ? (ImageLinkDisplayMode)obj : ImageLinkDisplayMode.ImageAndText;
			}

			[DebuggerStepThrough]
			set
			{
				ViewState["DisplayMode"] = value;
			}
		}

		/// Gets or sets the alignment of the text.
		[Category("Appearance")]
		[Description("The alignment of the text.")]
		[DefaultValue(typeof(TextAlign), "Right")]
		public TextAlign TextAlign
		{
			[DebuggerStepThrough]
			get
			{
				object obj = ViewState["TextAlign"];
				return (obj != null) ? (TextAlign)obj : TextAlign.Right;
			}

			[DebuggerStepThrough]
			set { ViewState["TextAlign"] = value; }
		}
		#endregion

		#endregion //Public Members

		#region Protected Members

		#region Methods

		/// Renders the control contents.
		/// <param name="writer">The writer to render to.</param>
		protected override void RenderContents ( HtmlTextWriter writer )
		{
			//Override the default hyperlink behavior by generating an image
			//only if the mode is set
			bool bDisplayImage = false, bDisplayText = false;
			switch (DisplayMode)
			{
				case ImageLinkDisplayMode.Image: bDisplayImage = true; break;
				case ImageLinkDisplayMode.ImageAndText: bDisplayImage = bDisplayText = true; break;
				case ImageLinkDisplayMode.Text: bDisplayText = true; break;
			};
			TextAlign align = TextAlign;

			//If displaying the text and text align is left
			if (bDisplayText && (align == TextAlign.Left))
			{
				//Write out the text
				writer.Write(this.Text);

				//Insert a space
				if (bDisplayImage)
					writer.Write(" ");
			};

			//If displaying the image then write it out now
			if (bDisplayImage && (ImageUrl.Length > 0))
			{
				//Render the image
				Image img = new Image();
				img.ImageUrl = this.ResolveClientUrl(ImageUrl);
				string text = (ToolTip.Length > 0) ? ToolTip : Text;
				img.ToolTip = img.AlternateText = text;
				img.Visible = this.Visible;
				img.EnableViewState = false;

				img.RenderControl(writer);
			};

			//If displaying the text and align is right
			if (bDisplayText && (align == TextAlign.Right))
			{
				//Insert a space
				if (bDisplayImage)
					writer.Write(" ");

				writer.Write(this.Text);
			};
		}
		#endregion

		#endregion //Protected Members
	}

	/// Specifies the modes used to render an <see cref="ImageLink"/>.
	/// <preliminary/>
	public enum ImageLinkDisplayMode
	{
		/// Displays both the image and the text.
		ImageAndText = 0,

		/// Displays the image only.
		Image = 1,

		/// Displays the text only.
		Text = 2,
	}
}


text:
<?php
/**
 * Basic class to abstract database interaction.
 *
 * @author Timo Tijhof, 2012
 * @since 0.3.0
 * @package TestSwarm
 */
class Database {
	private $context;

	protected $host, $username, $password, $dbname;
	protected $conn;
	protected $isOpen = false;

	/**
	 * Creates a Database object, opens the connection and returns the instance.
	 *
	 * @param context TestSwarmContext
	 * @param $connType int: [optional]
	 */

	public static function newFromContext( TestSwarmContext $context, $connType = DBCON_DEFAULT ) {
		$dbConf = $context->getConf()->database;
		$db = new self();

		$db->context = $context;
		$db->host = $dbConf->host;
		$db->username = $dbConf->username;
		$db->password = $dbConf->password;
		$db->dbname = $dbConf->database;

		$db->open( $connType );

		return $db;
	}

	/**
	 * @param $connType int: DBCON_DEFAULT or DBCON_PERSISTENT.
	 */
	public function open( $connType = DBCON_DEFAULT ) {
		$this->close();

		switch ( $connType ) {
		case DBCON_DEFAULT:
			$this->conn = mysql_connect( $this->host, $this->username, $this->password, /*force_new=*/true );
			break;
		case DBCON_PERSISTENT:
			$this->conn = mysql_pconnect( $this->host, $this->username, $this->password );
			break;
		default:
			throw new SwarmException( "Invalid connection type." );
		}

		if ( !$this->conn ) {
			throw new SwarmException( "Connection to {$this->host} failed.\nMySQL Error " . $this->lastErrNo() . ": " . $this->lastErrMsg() );
		}

		if ( $this->dbname ) {
			$isOK = mysql_select_db( $this->dbname, $this->conn );
			if ( !$isOK ) {
				throw new SwarmException( "Selecting database `{$this->dbname}` on {$this->host} failed." );
			}
		} else {
			$isOK = (bool)$this->conn;
		}

		$this->isOpen = $isOK;
		return $this;
	}

	/** @return array of objects|false */
	public function getRows( $sql ) {
		$res = $this->doQuery( $sql );
		if ( $res && $this->getNumRows( $res ) ) {
			$ret = array();
         while ( $res && $row = $this->fetchObject( $res ) ) {
         	$ret[] = $row;
         }
         return $ret;
		}
		return false;
	}

	/** @return obj|false */
	public function getRow( $sql ) {
		$res = $this->doQuery( $sql );
		if ( $res && $this->getNumRows( $res ) ) {
			return $this->fetchObject( $res );
		}
		return false;
	}

	/** @return mixed|false */
	public function getOne( $sql ) {
		$res = $this->doQuery( $sql );
		if ( $res && $this->getNumRows( $res ) ) {
			$row = mysql_fetch_array( $res );
			return $row ? reset( $row ) : false;
		}
		return false;
	}

	/** @return int */
	public function getNumRows( $res ) {
		$n = mysql_num_rows( $res );
		if ( $this->lastErrNo() ) { throw new SwarmException( 'Error in getNumRows: ' . $this->lastErrMsg() ); }
		return $n;
	}

	/**
	 * Queries other than SELECT, such as DELETE, UPDATE and INSERT.
	 * @return resource|false
	 */
	public function query( $sql ) {
		return $this->doQuery( $sql );
	}

	/** @return int */
	public function getInsertId() {
		return intval( mysql_insert_id( $this->conn ) );
	}

	public function lastErrNo() {
		return $this->conn ? mysql_errno( $this->conn ) : mysql_errno();
	}

	public function lastErrMsg() {
		return $this->conn ? mysql_error( $this->conn ) : mysql_error();
	}

	/** @return bool */
	public function close() {
		$this->isOpen = false;
		if ( $this->conn ) {
			$ret = $this->closeConn();
			$this->conn = null;
			return $ret;
		} else {
			return true;
		}
	}

	/** @return MySQL resource|false */
	protected function doQuery( $sql ) {
		return mysql_query( $sql, $this->conn );
	}

	protected function fetchObject( $res ) {
		$obj = mysql_fetch_object( $res );
		if ( $this->lastErrNo() ) { throw new SwarmException( 'Error in fetchObject: ' . $this->lastErrMsg() ); }
		return $obj;
	}

	/** @return bool */
	protected function closeConn() {
		return mysql_close( $this->conn );
	}

	protected function checkEnvironment() {
		if ( !function_exists( "mysql_connect" ) ) {
			throw new SwarmException( "MySQL functions missing." );
		}
	}

	private function __construct() {
		$this->checkEnvironment();
	}
}


text:
var searchData=
[
  ['objectdata',['ObjectData',['../structglutil_1_1_object_data.html',1,'glutil']]],
  ['objectpole',['ObjectPole',['../classglutil_1_1_object_pole.html',1,'glutil']]],
  ['openglpixeltransferparams',['OpenGLPixelTransferParams',['../structglimg_1_1_open_g_l_pixel_transfer_params.html',1,'glimg']]]
];


text:
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion

class Migration(migrations.Migration):

    dependencies = [
        ('stores', '0003_storeaddress_zip_code'),
    ]

    operations = [
        migrations.RenameField(
            model_name='storeaddress',
            old_name='point',
            new_name='coords',
        ),
        migrations.AlterField(
            model_name='store',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stores', to='stores.StoreCategory'),
        ),
        migrations.AlterField(
            model_name='store',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stores', to='stores.StoreOwner'),
        ),
        migrations.AlterField(
            model_name='storeaddress',
            name='store',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='address', to='stores.Store'),
        ),
    ]


text:
package org.motechproject.ihe.interop.util;

/**
 * The Constants contains constant values used in the IHE Interop module.
 */
public final class Constants {

    public static final String CHANNEL_DISPLAY_NAME = "ihe.name";

    public static final String RECIPIENT_NAME_PARAM = "recipient";
    public static final String RECIPIENT_DISPLAY_NAME = "ihe.recipient";

    public static final String TEMPLATE_NAME_PARAM = "template";
    public static final String TEMPLATE_DISPLAY_NAME = "ihe.template";

    public static final String HL7_RECIPIENTS_FILE = "hl7-recipients.json";

    private Constants() {}
}


text:
Useful Links

python-docx @ GitHub

python-docx @ PyPI

Issue Tracker


text:
package org.apache.camel.converter.saxon;

import java.util.LinkedList;
import java.util.List;

import javax.xml.transform.dom.DOMSource;

import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import net.sf.saxon.Configuration;
import net.sf.saxon.dom.DOMNodeList;
import net.sf.saxon.dom.NodeOverNodeInfo;
import net.sf.saxon.om.DocumentInfo;
import net.sf.saxon.om.NodeInfo;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.type.Type;
import org.apache.camel.Converter;
import org.apache.camel.Exchange;
import org.apache.camel.TypeConverter;
import org.apache.camel.spi.TypeConverterRegistry;

@Converter(generateLoader = true)
public final class SaxonConverter {

    private SaxonConverter() {
    }

    @Converter
    public static Document toDOMDocument(NodeInfo node) throws XPathException {
        switch (node.getNodeKind()) {
            case Type.DOCUMENT:
                // DOCUMENT type nodes can be wrapped directly
                return (Document) NodeOverNodeInfo.wrap(node);
            case Type.ELEMENT:
                // ELEMENT nodes need to build a new DocumentInfo before wrapping
                Configuration config = node.getConfiguration();
                DocumentInfo documentInfo = config.buildDocument(node);
                return (Document) NodeOverNodeInfo.wrap(documentInfo);
            default:
                return null;
        }
    }

    @Converter
    public static Node toDOMNode(NodeInfo node) {
        return NodeOverNodeInfo.wrap(node);
    }

    @Converter
    public static DOMSource toDOMSourceFromNodeInfo(NodeInfo nodeInfo) {
        return new DOMSource(toDOMNode(nodeInfo));
    }

    @Converter
    public static NodeList toDOMNodeList(List<? extends NodeInfo> nodeList) {
        List<Node> domNodeList = new LinkedList<>();
        if (nodeList != null) {
            for (NodeInfo ni : nodeList) {
                domNodeList.add(NodeOverNodeInfo.wrap(ni));
            }
        }
        return new DOMNodeList(domNodeList);
    }

    @Converter(fallback = true)
    public static <T> T convertTo(Class<T> type, Exchange exchange, Object value, TypeConverterRegistry registry) {
        if (NodeInfo.class.isAssignableFrom(value.getClass())) {
            // use a fallback type converter so we can convert the embedded body if the value is NodeInfo
            NodeInfo ni = (NodeInfo) value;
            // first try to find a Converter for Node
            TypeConverter tc = registry.lookup(type, Node.class);
            if (tc != null) {
                Node node = NodeOverNodeInfo.wrap(ni);
                return tc.convertTo(type, exchange, node);
            }
            // if this does not exist we can also try NodeList (there are some type converters for that) as
            // the default Xerces Node implementation also implements NodeList.
            tc = registry.lookup(type, NodeList.class);
            if (tc != null) {
                List<NodeInfo> nil = new LinkedList<>();
                nil.add((NodeInfo) value);
                return tc.convertTo(type, exchange, toDOMNodeList(nil));
            }
        } else if (List.class.isAssignableFrom(value.getClass())) {
            TypeConverter tc = registry.lookup(type, NodeList.class);
            if (tc != null) {
                List<NodeInfo> lion = new LinkedList<>();
                for (Object o : (List<?>) value) {
                    if (o instanceof NodeInfo) {
                        lion.add((NodeInfo) o);
                    }
                }
                if (lion.size() > 0) {
                    NodeList nl = toDOMNodeList(lion);
                    return tc.convertTo(type, exchange, nl);
                }
            }
        } else if (NodeOverNodeInfo.class.isAssignableFrom(value.getClass())) {
            // NodeOverNode info is a read-only Node implementation from Saxon. In contrast to the JDK
            // com.sun.org.apache.xerces.internal.dom.NodeImpl class it does not implement NodeList, but
            // many Camel type converters are based on that interface. Therefore we convert to NodeList and
            // try type conversion in the fallback type converter.
            TypeConverter tc = registry.lookup(type, NodeList.class);
            if (tc != null) {
                List<Node> domNodeList = new LinkedList<>();
                domNodeList.add((NodeOverNodeInfo) value);
                return tc.convertTo(type, exchange, new DOMNodeList(domNodeList));
            }
        }

        return null;
    }
}


text:
(function() {
  if (window) {
    function closestPolyfill() {
      if (window.Element && !Element.prototype.closest) {
        Element.prototype.closest = function(s) {
          var i;
          var matches = (this.document || this.ownerDocument).querySelectorAll(s);
          var el = this;

          do {
            i = matches.length;

            while (--i >= 0 && matches.item(i) !== el) {};
          } while ((i < 0) && (el = el.parentElement));

          return el;
        };
      }
    }

    function removePolyfill() {
      var prototypes = [];

      if (window.Element && !Element.prototype.remove) {
        prototypes.push(Element.prototype);
      }

      if (window.CharacterData && !CharacterData.prototype.remove) {
        prototypes.push(CharacterData.prototype);
      }

      if (window.DocumentType && !DocumentType.prototype.remove) {
        prototypes.push(DocumentType.prototype);
      }

      prototypes.forEach(function (item) {
        Object.defineProperty(item, 'remove', {
          configurable: true,
          enumerable: true,
          writable: true,

          value: function remove() {
            this.parentNode.removeChild(this);
          },
        });
      });
    }

    closestPolyfill();
    removePolyfill();
  }
})();


text:
package com.github.agourlay.cornichon.steps.wrapped

import cats.data.StateT
import cats.effect.IO
import com.github.agourlay.cornichon.core._

// Transparent wrapper - Steps are flatten in the main execution
case class FlatMapStep(started: Step, nestedProducers: Session => List[Step]) extends WrapperStep {

  val title: String = ""

  override val stateUpdate: StepState = StateT { runState =>
    ScenarioRunner.runStepsShortCircuiting(started :: Nil, runState).flatMap {
      case t @ (rs2, res) =>
        if (res.isLeft)
          IO.pure(t)
        else {
          val nestedStep = nestedProducers(rs2.session)
          ScenarioRunner.runStepsShortCircuiting(nestedStep, rs2)
        }
    }
  }

}


text:
import re
from subprocess import Popen, PIPE

kin="/Users/kristen/Documents/transposon_figure_data/tables/final_tables/Supplemental_Table_S1.txt"
result, err = Popen(["""bash ../R_scripts/transpose_matrix.sh {kin} working_file.txt""".format(**locals())], stdout=PIPE, stderr=PIPE, shell=True).communicate()
OUT=open("tes_cender.bed",'w')

strain_list={}
with open("working_file.txt", 'r') as IN:
	header=next(IN)
	print header
	header=header.rstrip()
	header=header.split('\t')
	for i,j in enumerate(header):
		strain_list[i]=j

	for line in IN:
		line=line.rstrip()
		items=line.split('\t')
		info=items[0]
		info2=info.split("_")

		chromosome=info2[0]
		position=info2[1]
		te=info2[2:]
		print te
		transposon="_".join(te)

		transposon=re.sub("_R$","",transposon)
		transposon=re.sub("_NR$","",transposon)
		print transposon
		position2=int(position)+1
		for i,j in enumerate(items):
			if i !="0":
				if j == "1":
					strain=strain_list[i]
					OUT.write("{chromosome}\t{position}\t{position2}\t{strain}\t{transposon}\t+\n".format(**locals()))

OUT.close()


text:
/*
	Based on the FS Import classes:
	Copyright (C) 2005-2006 Feeling Software Inc
	Copyright (C) 2005-2006 Autodesk Media Entertainment
	MIT License: http://www.opensource.org/licenses/mit-license.php
*/

#include "StdAfx.h"
#include "FCDocument/FCDocument.h"
#include "FCDocument/FCDAnimationChannel.h"
#include "FCDocument/FCDAnimationCurve.h"
#include "FCDocument/FCDAnimationCurveTools.h"
#include "FCDocument/FCDAnimated.h"

//
// FCDAnimated
//

ImplementObjectType(FCDAnimated);

FCDAnimated::FCDAnimated(FCDocument* document, size_t valueCount, const char** _qualifiers, float** _values)
    : FCDObject(document)
    , target(NULL)
{
    arrayElement = -1;

    // Allocate the values/qualifiers/curves arrays
    values.resize(valueCount);
    qualifiers.resize(valueCount);
    curves.resize(valueCount);

    for (size_t i = 0; i < valueCount; ++i)
    {
        values[i] = _values[i];
        qualifiers[i] = _qualifiers[i];
    }

    ResetRelativeAnimationFlag();
}

FCDAnimated::FCDAnimated(FCDObject* object, size_t valueCount, const char** _qualifiers, float** _values)
    : FCDObject(object->GetDocument())
{
    arrayElement = -1;

    // Allocate the values/qualifiers/curves arrays
    values.resize(valueCount);
    qualifiers.resize(valueCount);
    curves.resize(valueCount);

    for (size_t i = 0; i < valueCount; ++i)
    {
        values[i] = _values[i];
        qualifiers[i] = _qualifiers[i];
    }

    // Register this animated value with the document
    GetDocument()->RegisterAnimatedValue(this);

    target = object;
    TrackObject(target);
}

FCDAnimated::~FCDAnimated()
{
    GetDocument()->UnregisterAnimatedValue(this);

    values.clear();
    qualifiers.clear();
    curves.clear();

    UntrackObject(target);
}

// Assigns a curve to a value of the animated element.
bool FCDAnimated::AddCurve(size_t index, FCDAnimationCurve* curve)
{
    FUAssert(index < GetValueCount(), return false);
    curves.at(index).push_back(curve);
    SetNewChildFlag();
    return true;
}

bool FCDAnimated::AddCurve(size_t index, FCDAnimationCurveList& curve)
{
    FUAssert(index < GetValueCount() && !curve.empty(), return false);
    curves.at(index).insert(curves.at(index).end(), curve.begin(), curve.end());
    SetNewChildFlag();
    return true;
}

// Removes the curves affecting a value of the animated element.
bool FCDAnimated::RemoveCurve(size_t index)
{
    FUAssert(index < GetValueCount(), return false);
    bool hasCurve = !curves[index].empty();
    curves[index].clear();
    SetNewChildFlag();
    return hasCurve;
}

const fm::string& FCDAnimated::GetQualifier(size_t index) const
{
    FUAssert(index < GetValueCount(), return emptyString);
    return qualifiers.at(index);
}

// Retrieves an animated value, given a valid qualifier
float* FCDAnimated::FindValue(const fm::string& qualifier)
{
    for (size_t i = 0; i < qualifiers.size(); ++i)
    {
        if (qualifiers[i] == qualifier)
            return values[i];
    }
    return NULL;
}
const float* FCDAnimated::FindValue(const fm::string& qualifier) const
{
    for (size_t i = 0; i < qualifiers.size(); ++i)
    {
        if (qualifiers[i] == qualifier)
            return values[i];
    }
    return NULL;
}

// Retrieve the index of a given qualifier
size_t FCDAnimated::FindQualifier(const char* qualifier) const
{
    for (size_t i = 0; i < qualifiers.size(); ++i)
    {
        if (qualifiers[i] == qualifier)
            return i;
    }

    // Otherwise, check for a matrix element
    int32 matrixElement = FUStringConversion::ParseQualifier(qualifier);
    if (matrixElement >= 0 && matrixElement < (int32)qualifiers.size())
        return matrixElement;
    return size_t(-1);
}

// Retrieve the index of a given value pointer
size_t FCDAnimated::FindValue(const float* value) const
{
    for (size_t i = 0; i < values.size(); ++i)
    {
        if (values[i] == value)
            return i;
    }
    return size_t(-1);
}

// Return the update target of this animations
void FCDAnimated::SetTargetObject(FCDObject* _target)
{
    UntrackObject(target);
    target = _target;
    TrackObject(target);
}

// Returns whether any of the contained curves are non-NULL
bool FCDAnimated::HasCurve() const
{
    FCDAnimationCurveListList::const_iterator cit;
    for (cit = curves.begin(); cit != curves.end() && (*cit).empty(); ++cit)
    {
    }
    return cit != curves.end();
}

// Create one multi-curve out of this animated value's single curves
FCDAnimationMultiCurve* FCDAnimated::CreateMultiCurve() const
{
    FloatList defaultValues;
    size_t count = values.size();
    defaultValues.resize(count);
    for (size_t i = 0; i < count; ++i) defaultValues[i] = (*values[i]);

    fm::pvector<const FCDAnimationCurve> toMerge;
    toMerge.resize(count);
    for (size_t i = 0; i < count; ++i) toMerge[i] = (!curves[i].empty()) ? curves[i][0] : NULL;
    return FCDAnimationCurveTools::MergeCurves(toMerge, defaultValues);
}

// Create one multi-curve out of the single curves from many FCDAnimated objects
FCDAnimationMultiCurve* FCDAnimated::CreateMultiCurve(const FCDAnimatedList& toMerge)
{
    // Calculate the total dimension of the curve to create
    size_t count = 0;
    for (FCDAnimatedList::const_iterator cit = toMerge.begin(); cit != toMerge.end(); ++cit)
    {
        count += (*cit)->GetValueCount();
    }

    // Generate the list of default values and the list of curves
    FloatList defaultValues(count, 0.0f);
    FCDAnimationCurveConstList curves(count);
    size_t offset = 0;
    for (FCDAnimatedList::const_iterator cit = toMerge.begin(); cit != toMerge.end(); ++cit)
    {
        size_t localCount = (*cit)->GetValueCount();
        for (size_t i = 0; i < localCount; ++i)
        {
            defaultValues[offset + i] = *(*cit)->GetValue(i);
            curves[offset + i] = (*cit)->GetCurve(i);
        }
        offset += localCount;
    }

    return FCDAnimationCurveTools::MergeCurves(curves, defaultValues);
}

// Sample the animated values for a given time
void FCDAnimated::Evaluate(float time)
{
    size_t valueCount = values.size();
    size_t curveCount = curves.size();
    size_t count = min(curveCount, valueCount);
    for (size_t i = 0; i < count; ++i)
    {
        if (!curves[i].empty())
        {
            // Retrieve the curve and the corresponding value
            FCDAnimationCurve* curve = curves[i][0];
            if (curve == NULL)
                continue;
            float* value = values[i];
            if (value == NULL)
                continue;

            // Evaluate the curve at this time
            (*value) = curve->Evaluate(time);
            if (target != NULL)
                target->SetValueChange();
        }
    }
}

FCDAnimated* FCDAnimated::Clone(FCDocument* document) const
{
    // Generate the constant arrays for the qualifiers and the value pointers.
    size_t valueCount = GetValueCount();
    typedef const char* ccharptr;
    typedef float* floatptr;
    ccharptr* cloneQualifiers = new ccharptr[valueCount];
    floatptr* cloneValues = new floatptr[valueCount];
    for (size_t i = 0; i < valueCount; ++i)
    {
        cloneQualifiers[i] = qualifiers[i].c_str();
        cloneValues[i] = const_cast<float*>(values[i]);
    }

    // Clone this animated.
    FCDAnimated* clone = new FCDAnimated(document, GetValueCount(), cloneQualifiers, cloneValues);
    clone->arrayElement = arrayElement;
    for (size_t i = 0; i < curves.size(); ++i)
    {
        for (size_t j = 0; j < curves[i].size(); ++j)
        {
            FCDAnimationCurve* clonedCurve = const_cast<FCDAnimationCurve*>(curves[i][j])->GetParent()->AddCurve();
            curves[i][j]->Clone(clonedCurve);
            clone->AddCurve(i, clonedCurve);
        }
    }

    SAFE_DELETE_ARRAY(cloneQualifiers);
    SAFE_DELETE_ARRAY(cloneValues);
    return clone;
}

FCDAnimated* FCDAnimated::Clone(FCDAnimated* clone) const
{
    if (clone != NULL)
    {
        // Clone the miscellaneous parameters.
        clone->arrayElement = arrayElement;

        // Clone the qualifiers and the curve lists for each value.
        size_t valueCount = min(GetValueCount(), clone->GetValueCount());
        for (size_t i = 0; i < valueCount; ++i)
        {
            clone->qualifiers[i] = qualifiers[i];
            clone->curves[i] = curves[i];
        }
    }
    return clone;
}

void FCDAnimated::OnObjectReleased(FUTrackable* object)
{
    FUAssert(object == target, return );
    target = NULL;

    // Delete ourselves.  We have no job left, if something
    // wants us they can reconstruct from FCDAnimationChannel
    Release();
}

//
// FCDAnimatedCustom
//

ImplementObjectType(FCDAnimatedCustom);

static const char* customAnimatedTemporaryQualifier = "";
static float* customAnimatedTemporaryValue = NULL;

FCDAnimatedCustom::FCDAnimatedCustom(FCDObject* object)
    : FCDAnimated(object, 1, &customAnimatedTemporaryQualifier, &customAnimatedTemporaryValue)
    , dummy(0.0f)
{
    values[0] = &dummy;

    // Register this animated value with the document
    GetDocument()->RegisterAnimatedValue(this);
}

void FCDAnimatedCustom::Copy(const FCDAnimated* copy)
{
    if (copy != NULL)
    {
        Resize(copy->GetValueCount(), NULL, false);
        copy->Clone(this);
    }
}

void FCDAnimatedCustom::Resize(size_t count, const char** _qualifiers, bool prependDot)
{
    FUAssert(count >= values.size(), return ); // don't loose information, but growing is fine.
    values.reserve(count);
    while (values.size() < count) values.push_back(&dummy);
    qualifiers.resize(count);
    curves.resize(count);

    for (size_t i = 0; i < count && _qualifiers != NULL && *_qualifiers != 0; ++i)
    {
        qualifiers[i] = (prependDot ? fm::string(".") : fm::string("")) + *(_qualifiers++);
    }
}

void FCDAnimatedCustom::Resize(const StringList& _qualifiers, bool prependDot)
{
    size_t count = _qualifiers.size();
    FUAssert(count >= values.size(), return ); // don't loose information, but growing is fine.
    values.reserve(count);
    while (values.size() < count) values.push_back(&dummy);
    qualifiers.resize(count);
    curves.resize(count);

    for (size_t i = 0; i < count; ++i)
    {
        qualifiers[i] = (prependDot ? fm::string(".") : fm::string("")) + _qualifiers[i];
    }
}

namespace FCDAnimatedStandardQualifiers
{
FCOLLADA_EXPORT const char* EMPTY[1] = { "" };
FCOLLADA_EXPORT const char* XYZW[4] = { ".X", ".Y", ".Z", ".W" };
FCOLLADA_EXPORT const char* RGBA[4] = { ".R", ".G", ".B", ".A" };

FCOLLADA_EXPORT const char* ROTATE_AXIS[4] = { ".X", ".Y", ".Z", ".ANGLE" };
FCOLLADA_EXPORT const char* SKEW[7] = { ".ROTATEX", ".ROTATEY", ".ROTATEZ", ".AROUNDX", ".AROUNDY", ".AROUNDZ", ".ANGLE" };
FCOLLADA_EXPORT const char* MATRIX[16] = { "(0)(0)", "(1)(0)", "(2)(0)", "(3)(0)", "(0)(1)", "(1)(1)", "(2)(1)", "(3)(1)", "(0)(2)", "(1)(2)", "(2)(2)", "(3)(2)", "(0)(3)", "(1)(3)", "(2)(3)", "(3)(3)" };
FCOLLADA_EXPORT const char* LOOKAT[9] = { ".POSITIONX", ".POSITIONY", ".POSITIONZ", ".TARGETX", ".TARGETY", ".TARGETZ", ".UPX", ".UPY", ".UPZ" };
};


text:
import unittest
import logging
import Configuration

from . import GeoNamesTestCase

''' Test suite for all tools in the Sun Position Analysis Tools toolbox '''

def getTestSuite():

    if Configuration.DEBUG == True:
        print("      GeoNamesTestSuite.getSuite")

    testSuite = unittest.TestSuite()

    ''' Add the GeoNames tests '''

    loader = unittest.TestLoader()

    testSuite.addTest(loader.loadTestsFromTestCase(GeoNamesTestCase.GeoNamesTestCase))

    return testSuite


text:
package com.google.ads.googleads.lib;

import static org.junit.Assert.assertEquals;

import com.google.ads.googleads.lib.callables.GoogleAdsExceptionTransformation;
import com.google.ads.googleads.lib.catalog.ApiCatalog;
import com.google.ads.googleads.lib.catalog.Version;
import com.google.ads.googleads.lib.stubs.exceptions.BaseGoogleAdsException;
import com.google.api.gax.grpc.GrpcStatusCode;
import com.google.api.gax.rpc.ApiException;
import com.google.protobuf.Message;
import io.grpc.Metadata;
import io.grpc.Status;
import io.grpc.Status.Code;
import io.grpc.StatusException;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class GoogleAdsExceptionTransformationTest {

  private final ApiCatalog catalog = ApiCatalog.getDefault();
  private final GoogleAdsExceptionTransformation transformation =
      new GoogleAdsExceptionTransformation();

  @Test
  public void loadsAllVersions() {
    for (Version version : catalog.getSupportedVersions()) {
      Message expectedFailure = version.getExceptionFactory().createGoogleAdsFailure();
      ApiException exception =
          getApiExceptionForVersion(
              version.getExceptionFactory().getTrailerKey(), expectedFailure.toByteArray());
      Throwable result = transformation.transform(exception);
      Message actualFailure = ((BaseGoogleAdsException) result).getGoogleAdsFailure();
      assertEquals(expectedFailure, actualFailure);
    }
  }

  @Test
  public void handlesNoRootCause() {
    ApiException exception = new ApiException(null, GrpcStatusCode.of(Code.UNKNOWN), false);
    Throwable result = transformation.transform(exception);
    assertEquals(exception, result);
  }

  @Test
  public void handlesNullTrailers() {
    ApiException exception =
        new ApiException(
            new StatusException(Status.UNKNOWN), GrpcStatusCode.of(Code.UNKNOWN), false);
    Throwable result = transformation.transform(exception);
    assertEquals(exception, result);
  }

  @Test
  public void handlesEmptyTrailers() {
    for (Version version : catalog.getSupportedVersions()) {
      ApiException exception =
          getApiExceptionForVersion(version.getExceptionFactory().getTrailerKey(), null);
      Throwable result = transformation.transform(exception);
      assertEquals(exception, result);
    }
  }

  @Test
  public void failsGracefullyWithUnparsableFailureProto() {
    for (Version version : catalog.getSupportedVersions()) {
      ApiException exception =
          getApiExceptionForVersion(
              version.getExceptionFactory().getTrailerKey(), new byte[] {0, 1, 2, 3});
      Throwable result = transformation.transform(exception);
      assertEquals(exception, result);
    }
  }

  private static ApiException getApiExceptionForVersion(
      Metadata.Key<byte[]> failureKey, byte[] data) {
    Metadata trailers = new Metadata();
    if (data != null) {
      trailers.put(failureKey, data);
    }
    return new ApiException(
        new StatusException(Status.UNKNOWN, trailers), GrpcStatusCode.of(Code.UNKNOWN), false);
  }
}


text:
package life.catalogue.parser;

import java.util.List;

import com.google.common.collect.Lists;
import life.catalogue.api.vocab.Gazetteer;
import life.catalogue.parser.GazetteerParser;
import org.junit.Test;

/**
 *
 */
public class GazetteerParserTest extends ParserTestBase<Gazetteer> {

  public GazetteerParserTest() {
    super(GazetteerParser.PARSER);
  }

  @Test
  public void parse() throws Exception {
    assertParse(Gazetteer.TDWG, "level1");
    assertParse(Gazetteer.TDWG, "tdwg1");
    assertParse(Gazetteer.TDWG, "tdwg");
    assertParse(Gazetteer.ISO, "Iso");
  }

  @Override
  List<String> additionalUnparsableValues() {
    return Lists.newArrayList("term", "deuter");
  }
}


text:
require 'rubygems'
require 'bundler'
Bundler.setup

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'

require 'active_support'
require 'action_pack'
require 'action_view'
require 'action_controller'
require 'formtastic'
require 'rspec_tag_matchers'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

require 'ui_datepicker-rails3'

RSpec.configure do |config|
  config.include RspecTagMatchers
  config.include CustomMacros
  config.mock_with :rspec
end


text:
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';

import { DevicesComponent } from './devices.component';

describe('DevicesComponent', () => {
  let component: DevicesComponent;
  let fixture: ComponentFixture<DevicesComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ DevicesComponent ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(DevicesComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});


text:
package fr.rjoakim.app.checklink;

import com.google.common.collect.Lists;
import fr.rjoakim.app.checklink.exceptions.ConfigurationKeyNotFoundException;

import java.util.Collection;
import java.util.List;
import java.util.Properties;

public class Configuration {

	public static class Builder {
		private Properties properties;

		public Builder() {}

		public Builder properties(Properties properties) {
			this.properties = properties;
			return this;
		}

		public Configuration build() {
			if (properties == null) {
				throw new IllegalArgumentException("properties field is required");
			}

			checkKeysConfigurationFile(
					Configuration.URL_FIELD + 1,
					Configuration.SMTP_FIELD,
					Configuration.USERNAME_FIELD,
					Configuration.PASSWORD_FIELD,
					Configuration.FROM_FIELD,
					Configuration.TO_FIELD,
					Configuration.SUBJECT_FIELD,
					Configuration.TEXT_FIELD,
					Configuration.SMTP_DEBUG_FIELD);

			return new Configuration(properties);
		}

		private void checkKeysConfigurationFile(String... keys) {
			for (String key: keys) {
				if (!properties.containsKey(key)) {
					throw new IllegalArgumentException("key " + key + " is required");
				}
			}
		}
	}

	private final static String URL_FIELD = "URL_";
	private final static String SMTP_FIELD = "smtp";
	private final static String USERNAME_FIELD = "username";
	private final static String PASSWORD_FIELD = "password";
	private final static String FROM_FIELD = "from";
	private final static String TO_FIELD = "to";
	private final static String CC_FIELD = "cc";
	private final static String SUBJECT_FIELD = "subject";
	private final static String TEXT_FIELD = "text";
	private final static String SMTP_DEBUG_FIELD = "smtp_debug";

	private final Properties properties;

	private Configuration(Properties properties) {
		this.properties = properties;
	}

	private String getPropertyValue(String key) throws ConfigurationKeyNotFoundException {
		if (!properties.containsKey(key)) {
			throw new ConfigurationKeyNotFoundException("key " + key + "not found");
		}
		return properties.getProperty(key);
	}

	private String getPropertyValue(String key, String defaultValue) {
		try {
			return getPropertyValue(key);
		} catch (ConfigurationKeyNotFoundException e) {
			return defaultValue;
		}
	}

	public Collection<String> listURLsHttp() {
		List<String> URLs = Lists.newArrayList();
		fillURLs(1, URLs);
		return URLs;
	}

	private void fillURLs(int id, List<String> URLs) {
		try {
			String URL = getPropertyValue(URL_FIELD + id);
			if (URL != null) {
				URLs.add(URL);
				fillURLs(id + 1, URLs);
			}
		} catch (ConfigurationKeyNotFoundException e) {
			return ;
		}
	}

	public String getSMTPHost() throws ConfigurationKeyNotFoundException {
		return getPropertyValue(SMTP_FIELD);
	}

	public boolean getSMTPDebug() throws ConfigurationKeyNotFoundException {
		return Boolean.valueOf(getPropertyValue(SMTP_DEBUG_FIELD));
	}

	public String getSMTPUser() throws ConfigurationKeyNotFoundException {
		return getPropertyValue(USERNAME_FIELD);
	}

	public String getSMTPPassword() throws ConfigurationKeyNotFoundException {
		return getPropertyValue(PASSWORD_FIELD);
	}

	public String getMailFrom() throws ConfigurationKeyNotFoundException {
		return getPropertyValue(FROM_FIELD);
	}

	public String getMailTo() throws ConfigurationKeyNotFoundException {
		return getPropertyValue(TO_FIELD);
	}

	public String getMailCC() {
		return getPropertyValue(CC_FIELD, "");
	}

	public String getMailSubject() throws ConfigurationKeyNotFoundException {
		return getPropertyValue(SUBJECT_FIELD);
	}

	public String getMaiText() throws ConfigurationKeyNotFoundException {
		return getPropertyValue(TEXT_FIELD);
	}

	public Properties getProperties() {
		return properties;
	}
}


text:
__author__ = 'Michael Liao'

'''
Models for user, blog, comment.
'''

import time, uuid

from transwarp.db import next_id
from transwarp.orm import Model, StringField, BooleanField, FloatField, TextField

def next_id():
    return '%015d%s000' % (int(time.time() * 1000), uuid.uuid4().hex)

class User(Model):
    __table__ = 'users'

    id = StringField(primary_key=True, default=next_id, ddl='varchar(50)')
    email = StringField(updatable=False, ddl='varchar(50)')
    password = StringField(ddl='varchar(50)')
    admin = BooleanField()
    name = StringField(ddl='varchar(50)')
    image = StringField(ddl='varchar(500)')
    created_at = FloatField(updatable=False, default=time.time)

class Blog(Model):
    __table__ = 'blogs'

    id = StringField(primary_key=True, default=next_id, ddl='varchar(50)')
    user_id = StringField(updatable=False, ddl='varchar(50)')
    user_name = StringField(ddl='varchar(50)')
    user_image = StringField(ddl='varchar(500)')
    name = StringField(ddl='varchar(50)')
    summary = StringField(ddl='varchar(200)')
    content = TextField()
    created_at = FloatField(updatable=False, default=time.time)

class Comment(Model):
    __table__ = 'comments'

    id = StringField(primary_key=True, default=next_id, ddl='varchar(50)')
    blog_id = StringField(updatable=False, ddl='varchar(50)')
    user_id = StringField(updatable=False, ddl='varchar(50)')
    user_name = StringField(ddl='varchar(50)')
    user_image = StringField(ddl='varchar(500)')
    content = TextField()
    created_at = FloatField(updatable=False, default=time.time)


text:
/* eslint-disable */
;(function(root, factory) {
  if (typeof define === 'function' && define.amd) { // AMD
    define(['Blockly'], factory);
  } else if (typeof exports === 'object') { // Node.js
    module.exports = factory();
  } else { // Browser
    var messages = factory();
    for (var key in messages) {
      root.Blockly.Msg[key] = messages[key];
    }
  }
}(this, function() {
// This file was automatically generated.  Do not modify.

'use strict';

const messages = Object.create(null);

messages["ADD_COMMENT"] = "Agiunghe unu cumentu";
messages["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Can't delete the variable '%1' because it's part of the definition of the function '%2'";  // untranslated
messages["CHANGE_VALUE_TITLE"] = "Muda valori:";
messages["CLEAN_UP"] = "Lìmpia is brocus";
messages["COLLAPSED_WARNINGS_WARNING"] = "Collapsed blocks contain warnings.";  // untranslated
messages["COLLAPSE_ALL"] = "Serra e stringi Brocus";
messages["COLLAPSE_BLOCK"] = "Serra e stringi Brocu";
messages["COLOUR_BLEND_COLOUR1"] = "colori 1";
messages["COLOUR_BLEND_COLOUR2"] = "colori 2";
messages["COLOUR_BLEND_HELPURL"] = "https://meyerweb.com/eric/tools/color-blend/#:::rgbp";  // untranslated
messages["COLOUR_BLEND_RATIO"] = "raportu";
messages["COLOUR_BLEND_TITLE"] = "mestura";
messages["COLOUR_BLEND_TOOLTIP"] = "Amestura duus coloris cun unu raportu (0.0 - 1.0).";
messages["COLOUR_PICKER_HELPURL"] = "https://en.wikipedia.org/wiki/Color";
messages["COLOUR_PICKER_TOOLTIP"] = "Scebera unu colori de sa tauledda.";
messages["COLOUR_RANDOM_HELPURL"] = "http://randomcolour.com";  // untranslated
messages["COLOUR_RANDOM_TITLE"] = "Unu colori a brítiu";
messages["COLOUR_RANDOM_TOOLTIP"] = "Scebera unu colori a brítiu.";
messages["COLOUR_RGB_BLUE"] = "blue";
messages["COLOUR_RGB_GREEN"] = "birdi";
messages["COLOUR_RGB_HELPURL"] = "https://www.december.com/html/spec/colorpercompact.html";  // untranslated
messages["COLOUR_RGB_RED"] = "arrùbiu";
messages["COLOUR_RGB_TITLE"] = "colora cun";
messages["COLOUR_RGB_TOOLTIP"] = "Cuncorda unu colori cun su tanti de arrubiu, birdi, e blue. Totu is valoris depint essi intra 0 e 100.";
messages["CONTROLS_FLOW_STATEMENTS_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";  // untranslated
messages["CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK"] = "sàrtiat a foras de sa lòriga";
messages["CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE"] = "sighit cun su repicu afatànti";
messages["CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK"] = "Bessit de sa lòriga.";
messages["CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE"] = "Sartiat su chi abarrat de sa loriga, e sighit cun su repicu afatànti.";
messages["CONTROLS_FLOW_STATEMENTS_WARNING"] = "Amonestu: Custu brocu ddu podis ponni sceti aintru de una lòriga.";
messages["CONTROLS_FOREACH_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#for-each";  // untranslated
messages["CONTROLS_FOREACH_TITLE"] = "po dònnia item %1 in lista %2";
messages["CONTROLS_FOREACH_TOOLTIP"] = "Po dònnia item in sa lista, ponit sa variàbili '%1' pari a s'item, e tandu fait pariga de cumandus.";
messages["CONTROLS_FOR_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#count-with";  // untranslated
messages["CONTROLS_FOR_TITLE"] = "po %1 de %2 fintzas %3 a passus de %4";
messages["CONTROLS_FOR_TOOLTIP"] = "Fait pigai a sa variàbili \"%1\" i valoris de su primu numeru a s'urtimu, a su passu impostau e fait su brocu.";
messages["CONTROLS_IF_ELSEIF_TOOLTIP"] = "Aciungi una cunditzioni a su brocu si.";
messages["CONTROLS_IF_ELSE_TOOLTIP"] = "Aciungi una urtima cunditzioni piga-totu a su brocu si.";
messages["CONTROLS_IF_HELPURL"] = "https://github.com/google/blockly/wiki/IfElse";  // untranslated
messages["CONTROLS_IF_IF_TOOLTIP"] = "Aciungi, fùlia, o assenta is partis po torrai a sètiu custu brocu si.";
messages["CONTROLS_IF_MSG_ELSE"] = "sinuncas";
messages["CONTROLS_IF_MSG_ELSEIF"] = "sinuncas si";
messages["CONTROLS_IF_MSG_IF"] = "si";
messages["CONTROLS_IF_TOOLTIP_1"] = "Si su valori est berus, tandu fait pariga de cumandus.";
messages["CONTROLS_IF_TOOLTIP_2"] = "Si su valori est berus, tandu fai su primu brocu de is cumandus. Sinuncas, fai su segundu brocu de is cumandus.";
messages["CONTROLS_IF_TOOLTIP_3"] = "Si su primu valori est beridadi, tandu fai su primu brocu de is cumandus. Sinuncas, si su segundu valori est beridadi, fai su segundu brocu de is cumandus.";
messages["CONTROLS_IF_TOOLTIP_4"] = "Si su primu valori est berus, tandu fai su primu brocu de is cumandus. Sinuncas, si su segundu valori est berus, fai su segundu brocu de is cumandus. Si mancu unu valori est berus, tandu fai s'urtimu brocu de is cumandus.";
messages["CONTROLS_REPEAT_HELPURL"] = "https://en.wikipedia.org/wiki/For_loop";
messages["CONTROLS_REPEAT_INPUT_DO"] = "fai";
messages["CONTROLS_REPEAT_TITLE"] = "repiti %1 bortas";
messages["CONTROLS_REPEAT_TOOLTIP"] = "Fait pariga de cumandus prus bortas.";
messages["CONTROLS_WHILEUNTIL_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#repeat";  // untranslated
messages["CONTROLS_WHILEUNTIL_OPERATOR_UNTIL"] = "repiti fintzas";
messages["CONTROLS_WHILEUNTIL_OPERATOR_WHILE"] = "repiti interis";
messages["CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL"] = "Interis su valori est frassu, tandu fai pariga de cumandus.";
messages["CONTROLS_WHILEUNTIL_TOOLTIP_WHILE"] = "Interis su valori est berus, tandu fai pariga de cumandus.";
messages["DELETE_ALL_BLOCKS"] = "Scancellu su %1 de is brocus?";
messages["DELETE_BLOCK"] = "Fùlia Blocu";
messages["DELETE_VARIABLE"] = "Delete the '%1' variable";  // untranslated
messages["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the '%2' variable?";  // untranslated
messages["DELETE_X_BLOCKS"] = "Fulia %1 Blocus";
messages["DIALOG_CANCEL"] = "Annulla";
messages["DIALOG_OK"] = "OK";
messages["DISABLE_BLOCK"] = "Disabìlita Blocu";
messages["DUPLICATE_BLOCK"] = "Dùplica";
messages["DUPLICATE_COMMENT"] = "Duplicate Comment";  // untranslated
messages["ENABLE_BLOCK"] = "Abìlita Blocu";
messages["EXPAND_ALL"] = "Aberi Brocus";
messages["EXPAND_BLOCK"] = "Aberi Brocu";
messages["EXTERNAL_INPUTS"] = "Intradas esternas";
messages["HELP"] = "Agiudu";
messages["INLINE_INPUTS"] = "Intradas in lìnia";
messages["LISTS_CREATE_EMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-empty-list";  // untranslated
messages["LISTS_CREATE_EMPTY_TITLE"] = "fait una lista buida";
messages["LISTS_CREATE_EMPTY_TOOLTIP"] = "Torrat una lista, de longària 0, chena records de datus.";
messages["LISTS_CREATE_WITH_CONTAINER_TITLE_ADD"] = "lista";
messages["LISTS_CREATE_WITH_CONTAINER_TOOLTIP"] = "Aciungi, fùlia, o assenta is partis po torrai a sètiu custu brocu lista.";
messages["LISTS_CREATE_WITH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with";  // untranslated
messages["LISTS_CREATE_WITH_INPUT_WITH"] = "fait una lista cun";
messages["LISTS_CREATE_WITH_ITEM_TOOLTIP"] = "Acciungi unu item a sa lista.";
messages["LISTS_CREATE_WITH_TOOLTIP"] = "Fait una lista cun calisiollat numeru de items.";
messages["LISTS_GET_INDEX_FIRST"] = "primu";
messages["LISTS_GET_INDEX_FROM_END"] = "# de sa fini";
messages["LISTS_GET_INDEX_FROM_START"] = "#";  // untranslated
messages["LISTS_GET_INDEX_GET"] = "piga";
messages["LISTS_GET_INDEX_GET_REMOVE"] = "piga e fùlia";
messages["LISTS_GET_INDEX_LAST"] = "urtimu";
messages["LISTS_GET_INDEX_RANDOM"] = "a brìtiu (random)";
messages["LISTS_GET_INDEX_REMOVE"] = "fùlia";
messages["LISTS_GET_INDEX_TAIL"] = "";  // untranslated
messages["LISTS_GET_INDEX_TOOLTIP_GET_FIRST"] = "Torrat su primu elementu de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_GET_FROM"] = "Torrat s'elementu de su postu inditau de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_GET_LAST"] = "Torrat s'urtimu elementu de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_GET_RANDOM"] = "Torrat un'elementu a brìtiu de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST"] = "Fùliat e torrat su primu elementu de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM"] = "Fùliat e torrat s'elementu de su postu inditau de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST"] = "Fùliat e torrat s'urtimu elementu de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM"] = "Fùliat e torrat un'elementu a brìtiu de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST"] = "Fùliat su primu elementu de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM"] = "Fùliat s'elementu de su postu inditau de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST"] = "Fùliat s'urtimu elementu de una lista.";
messages["LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM"] = "Fùliat unu elementu a brìtiu de una lista.";
messages["LISTS_GET_SUBLIST_END_FROM_END"] = "a # de sa fini";
messages["LISTS_GET_SUBLIST_END_FROM_START"] = "fintzas a #";
messages["LISTS_GET_SUBLIST_END_LAST"] = "a s'urtimu";
messages["LISTS_GET_SUBLIST_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist";  // untranslated
messages["LISTS_GET_SUBLIST_START_FIRST"] = "bogandi suta-lista de su primu";
messages["LISTS_GET_SUBLIST_START_FROM_END"] = "bogandi suta-lista de # de sa fini.";
messages["LISTS_GET_SUBLIST_START_FROM_START"] = "bogandi suta-lista de #";
messages["LISTS_GET_SUBLIST_TAIL"] = "";  // untranslated
messages["LISTS_GET_SUBLIST_TOOLTIP"] = "Fait una copia de sa parti inditada de sa lista.";
messages["LISTS_INDEX_FROM_END_TOOLTIP"] = "%1 est po s'urtimu elementu.";
messages["LISTS_INDEX_FROM_START_TOOLTIP"] = "%1 est po su primu elementu.";
messages["LISTS_INDEX_OF_FIRST"] = "circa prima ocasioni de s'item";
messages["LISTS_INDEX_OF_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list";  // untranslated
messages["LISTS_INDEX_OF_LAST"] = "circa urtima ocasioni de s'item";
messages["LISTS_INDEX_OF_TOOLTIP"] = "Torrat s'indixi de sa primu/urtima ocasioni de s'item in sa lista. Torrat %1 si s'item non s'agatat.";
messages["LISTS_INLIST"] = "in lista";
messages["LISTS_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#is-empty";  // untranslated
messages["LISTS_ISEMPTY_TITLE"] = "%1 est buidu";
messages["LISTS_ISEMPTY_TOOLTIP"] = "Torrat berus si sa lista est buida.";
messages["LISTS_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#length-of";  // untranslated
messages["LISTS_LENGTH_TITLE"] = "longària de %1";
messages["LISTS_LENGTH_TOOLTIP"] = "Torrat sa longària de una lista.";
messages["LISTS_REPEAT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with";  // untranslated
messages["LISTS_REPEAT_TITLE"] = "fait una lista cun item %1 repitiu %2 bortas";
messages["LISTS_REPEAT_TOOLTIP"] = "Fait una lista cun unu numeru giau repitiu su tanti de is bortas inditadas.";
messages["LISTS_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#reversing-a-list";  // untranslated
messages["LISTS_REVERSE_MESSAGE0"] = "reverse %1";  // untranslated
messages["LISTS_REVERSE_TOOLTIP"] = "Reverse a copy of a list.";  // untranslated
messages["LISTS_SET_INDEX_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#in-list--set";  // untranslated
messages["LISTS_SET_INDEX_INPUT_TO"] = "a";
messages["LISTS_SET_INDEX_INSERT"] = "inserta a";
messages["LISTS_SET_INDEX_SET"] = "imposta";
messages["LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST"] = "Insertat s'elementu a su cumintzu de sa lista.";
messages["LISTS_SET_INDEX_TOOLTIP_INSERT_FROM"] = "Insertat s'elementu in su postu inditau in una lista.";
messages["LISTS_SET_INDEX_TOOLTIP_INSERT_LAST"] = "Aciungit s'elementu a sa fini de sa lista.";
messages["LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM"] = "Aciungit s'elementu a brítiu in sa lista.";
messages["LISTS_SET_INDEX_TOOLTIP_SET_FIRST"] = "Impostat su primu elementu in una lista.";
messages["LISTS_SET_INDEX_TOOLTIP_SET_FROM"] = "Impostat s'elementu in su postu inditau de una lista.";
messages["LISTS_SET_INDEX_TOOLTIP_SET_LAST"] = "Impostat s'urtimu elementu in una lista.";
messages["LISTS_SET_INDEX_TOOLTIP_SET_RANDOM"] = "Impostat unu elementu random in una lista.";
messages["LISTS_SORT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";  // untranslated
messages["LISTS_SORT_ORDER_ASCENDING"] = "ascending";  // untranslated
messages["LISTS_SORT_ORDER_DESCENDING"] = "descending";  // untranslated
messages["LISTS_SORT_TITLE"] = "sort %1 %2 %3";  // untranslated
messages["LISTS_SORT_TOOLTIP"] = "Sort a copy of a list.";  // untranslated
messages["LISTS_SORT_TYPE_IGNORECASE"] = "alphabetic, ignore case";  // untranslated
messages["LISTS_SORT_TYPE_NUMERIC"] = "numeric";  // untranslated
messages["LISTS_SORT_TYPE_TEXT"] = "alphabetic";  // untranslated
messages["LISTS_SPLIT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";  // untranslated
messages["LISTS_SPLIT_LIST_FROM_TEXT"] = "fai una lista de unu testu";
messages["LISTS_SPLIT_TEXT_FROM_LIST"] = "fai unu testu de una lista";
messages["LISTS_SPLIT_TOOLTIP_JOIN"] = "Auni una lista de testus in d-unu sceti, ponendi separadoris.";
messages["LISTS_SPLIT_TOOLTIP_SPLIT"] = "Dividi su testu in un'elencu de testus, firmendi po dònnia separadori.";
messages["LISTS_SPLIT_WITH_DELIMITER"] = "cun  separadori";
messages["LOGIC_BOOLEAN_FALSE"] = "frassu";
messages["LOGIC_BOOLEAN_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#values";  // untranslated
messages["LOGIC_BOOLEAN_TOOLTIP"] = "Torrat berus o frassu.";
messages["LOGIC_BOOLEAN_TRUE"] = "berus";
messages["LOGIC_COMPARE_HELPURL"] = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
messages["LOGIC_COMPARE_TOOLTIP_EQ"] = "Torrat berus si is inputs funt unu uguali a s'àteru.";
messages["LOGIC_COMPARE_TOOLTIP_GT"] = "Torrat berus si su primu input est prus mannu de s'àteru.";
messages["LOGIC_COMPARE_TOOLTIP_GTE"] = "Torrat berus si su primu input est prus mannu o uguali a s'àteru.";
messages["LOGIC_COMPARE_TOOLTIP_LT"] = "Torrat berus si su primu input est prus piticu de s'àteru.";
messages["LOGIC_COMPARE_TOOLTIP_LTE"] = "Torrat berus si su primu input est prus piticu o uguali a s'àteru.";
messages["LOGIC_COMPARE_TOOLTIP_NEQ"] = "Torrat berus si is inputs non funt unu uguali a s'àteru.";
messages["LOGIC_NEGATE_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#not";  // untranslated
messages["LOGIC_NEGATE_TITLE"] = "non %1";
messages["LOGIC_NEGATE_TOOLTIP"] = "Torrat berus si s'input est frassu. Torrat frassu si s'input est berus.";
messages["LOGIC_NULL"] = "null";
messages["LOGIC_NULL_HELPURL"] = "https://en.wikipedia.org/wiki/Nullable_type";  // untranslated
messages["LOGIC_NULL_TOOLTIP"] = "Torrat null.";
messages["LOGIC_OPERATION_AND"] = "and";
messages["LOGIC_OPERATION_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#logical-operations";  // untranslated
messages["LOGIC_OPERATION_OR"] = "or";
messages["LOGIC_OPERATION_TOOLTIP_AND"] = "Torrat berus si ambos is inputs funt berus.";
messages["LOGIC_OPERATION_TOOLTIP_OR"] = "Torrat berus si assumancu unu de is inputs est berus.";
messages["LOGIC_TERNARY_CONDITION"] = "cumpròa";
messages["LOGIC_TERNARY_HELPURL"] = "https://en.wikipedia.org/wiki/%3F:";  // untranslated
messages["LOGIC_TERNARY_IF_FALSE"] = "si frassu";
messages["LOGIC_TERNARY_IF_TRUE"] = "si berus";
messages["LOGIC_TERNARY_TOOLTIP"] = "Cumproa sa cunditzioni in 'cumproa'. Si sa cunditzioni est berus, torrat su valori 'si berus'; sinuncas torrat su valori 'si frassu'.";
messages["MATH_ADDITION_SYMBOL"] = "+";  // untranslated
messages["MATH_ARITHMETIC_HELPURL"] = "https://en.wikipedia.org/wiki/Arithmetic";
messages["MATH_ARITHMETIC_TOOLTIP_ADD"] = "Torrat sa summa de is duus nùmerus.";
messages["MATH_ARITHMETIC_TOOLTIP_DIVIDE"] = "Torrat su cuotzienti de is duus nùmerus.";
messages["MATH_ARITHMETIC_TOOLTIP_MINUS"] = "Torrat sa diferèntzia de is duus nùmerus.";
messages["MATH_ARITHMETIC_TOOLTIP_MULTIPLY"] = "Torrat su produtu de is duus nùmerus.";
messages["MATH_ARITHMETIC_TOOLTIP_POWER"] = "Torrat su primu numeru artziau a sa potenza de su segundu nùmeru.";
messages["MATH_ATAN2_HELPURL"] = "https://en.wikipedia.org/wiki/Atan2";  // untranslated
messages["MATH_ATAN2_TITLE"] = "atan2 of X:%1 Y:%2";  // untranslated
messages["MATH_ATAN2_TOOLTIP"] = "Return the arctangent of point (X, Y) in degrees from -180 to 180.";  // untranslated
messages["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
messages["MATH_CHANGE_TITLE"] = "muda %1 de %2";
messages["MATH_CHANGE_TOOLTIP"] = "Aciungi unu numeru a sa variabili '%1'.";
messages["MATH_CONSTANT_HELPURL"] = "https://en.wikipedia.org/wiki/Mathematical_constant";
messages["MATH_CONSTANT_TOOLTIP"] = "Torrat una de is costantis comunas: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), o ∞ (infiniu).";
messages["MATH_CONSTRAIN_HELPURL"] = "https://en.wikipedia.org/wiki/Clamping_(graphics)";  // untranslated
messages["MATH_CONSTRAIN_TITLE"] = "custringi %1 de %2 a %3";
messages["MATH_CONSTRAIN_TOOLTIP"] = "Custringi unu numeru aintru de is liminaxus giaus (cumprendius).";
messages["MATH_DIVISION_SYMBOL"] = "÷";  // untranslated
messages["MATH_IS_DIVISIBLE_BY"] = "fait a ddu dividi po";
messages["MATH_IS_EVEN"] = "est paris";
messages["MATH_IS_NEGATIVE"] = "est negativu";
messages["MATH_IS_ODD"] = "est dísparu";
messages["MATH_IS_POSITIVE"] = "est positivu";
messages["MATH_IS_PRIME"] = "est primu";
messages["MATH_IS_TOOLTIP"] = "Cumprova si unu numeru est paris, dìsparis, primu, intreu, positivu, negativu o si fait a ddu dividi po unu numeru giau. Torrat berus o frassu.";
messages["MATH_IS_WHOLE"] = "est intreu";
messages["MATH_MODULO_HELPURL"] = "https://en.wikipedia.org/wiki/Modulo_operation";
messages["MATH_MODULO_TITLE"] = "arrestu de %1 ÷ %2";
messages["MATH_MODULO_TOOLTIP"] = "Torrat s'arrestu de sa divisioni de duus numerus.";
messages["MATH_MULTIPLICATION_SYMBOL"] = "×";  // untranslated
messages["MATH_NUMBER_HELPURL"] = "https://en.wikipedia.org/wiki/Number";
messages["MATH_NUMBER_TOOLTIP"] = "Unu numeru";
messages["MATH_ONLIST_HELPURL"] = "";  // untranslated
messages["MATH_ONLIST_OPERATOR_AVERAGE"] = "mèdia de sa lista";
messages["MATH_ONLIST_OPERATOR_MAX"] = "massimu de sa lista";
messages["MATH_ONLIST_OPERATOR_MEDIAN"] = "medianu de sa lista";
messages["MATH_ONLIST_OPERATOR_MIN"] = "minimu de sa lista";
messages["MATH_ONLIST_OPERATOR_MODE"] = "modas de sa lista";
messages["MATH_ONLIST_OPERATOR_RANDOM"] = "unu item a brìtiu de sa lista";
messages["MATH_ONLIST_OPERATOR_STD_DEV"] = "deviadura standard de sa lista";
messages["MATH_ONLIST_OPERATOR_SUM"] = "suma sa lista";
messages["MATH_ONLIST_TOOLTIP_AVERAGE"] = "Torrat sa mèdia (aritimètica) de is valoris de sa lista.";
messages["MATH_ONLIST_TOOLTIP_MAX"] = "Torrat su numeru prus mannu de sa lista";
messages["MATH_ONLIST_TOOLTIP_MEDIAN"] = "Torrat su numeru medianu de sa lista.";
messages["MATH_ONLIST_TOOLTIP_MIN"] = "Torrat su numeru prus piticu de sa lista.";
messages["MATH_ONLIST_TOOLTIP_MODE"] = "Torrat una lista de is itams prus frecuentis de sa lista.";
messages["MATH_ONLIST_TOOLTIP_RANDOM"] = "Torrat unu item a brìtiu de sa lista.";
messages["MATH_ONLIST_TOOLTIP_STD_DEV"] = "Torrat sa deviadura standard de sa lista.";
messages["MATH_ONLIST_TOOLTIP_SUM"] = "Torrat sa suma de totu is numerus de sa lista.";
messages["MATH_POWER_SYMBOL"] = "^";  // untranslated
messages["MATH_RANDOM_FLOAT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation";
messages["MATH_RANDOM_FLOAT_TITLE_RANDOM"] = "una fratzioni a brìtiu";
messages["MATH_RANDOM_FLOAT_TOOLTIP"] = "Torrat una fratzioni a brìtiu intra 0.0 (cumpresu) e 1.0 (bogau).";
messages["MATH_RANDOM_INT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation";
messages["MATH_RANDOM_INT_TITLE"] = "numeru intreu a brítiu de %1 a %2";
messages["MATH_RANDOM_INT_TOOLTIP"] = "Torrat unu numeru intreu a brìtiu intra duus nùmerus giaus (cumpresus).";
messages["MATH_ROUND_HELPURL"] = "https://en.wikipedia.org/wiki/Rounding";
messages["MATH_ROUND_OPERATOR_ROUND"] = "arretunda";
messages["MATH_ROUND_OPERATOR_ROUNDDOWN"] = "arretunda faci a bàsciu.";
messages["MATH_ROUND_OPERATOR_ROUNDUP"] = "Arretunda faci a susu";
messages["MATH_ROUND_TOOLTIP"] = "Arretunda unu numeru faci a susu o faci a bàsciu.";
messages["MATH_SINGLE_HELPURL"] = "https://en.wikipedia.org/wiki/Square_root";
messages["MATH_SINGLE_OP_ABSOLUTE"] = "assolutu";
messages["MATH_SINGLE_OP_ROOT"] = "arraxina cuadra";
messages["MATH_SINGLE_TOOLTIP_ABS"] = "Torrat su valori assolútu de unu numeru.";
messages["MATH_SINGLE_TOOLTIP_EXP"] = "Torrat (e) a sa potèntzia de unu numeru.";
messages["MATH_SINGLE_TOOLTIP_LN"] = "Torrat su logaritmu naturali de unu numeru.";
messages["MATH_SINGLE_TOOLTIP_LOG10"] = "Torrat su logaritmu a basi 10 de unu numeru.";
messages["MATH_SINGLE_TOOLTIP_NEG"] = "Torrat su valori negau de unu numeru.";
messages["MATH_SINGLE_TOOLTIP_POW10"] = "Torrat (10) a sa potèntzia de unu numeru.";
messages["MATH_SINGLE_TOOLTIP_ROOT"] = "Torrat s'arraxina cuadra de unu numeru.";
messages["MATH_SUBTRACTION_SYMBOL"] = "-";  // untranslated
messages["MATH_TRIG_ACOS"] = "acos";  // untranslated
messages["MATH_TRIG_ASIN"] = "asin";  // untranslated
messages["MATH_TRIG_ATAN"] = "atan";  // untranslated
messages["MATH_TRIG_COS"] = "cos";  // untranslated
messages["MATH_TRIG_HELPURL"] = "https://en.wikipedia.org/wiki/Trigonometric_functions";
messages["MATH_TRIG_SIN"] = "sin";  // untranslated
messages["MATH_TRIG_TAN"] = "tan";  // untranslated
messages["MATH_TRIG_TOOLTIP_ACOS"] = "Torrat su arccosinu de unu numeru.";
messages["MATH_TRIG_TOOLTIP_ASIN"] = "Torrat su arcsinu de unu numeru.";
messages["MATH_TRIG_TOOLTIP_ATAN"] = "Torrat su arctangenti de unu numeru.";
messages["MATH_TRIG_TOOLTIP_COS"] = "Torrat su cosinu de unu gradu (no radianti).";
messages["MATH_TRIG_TOOLTIP_SIN"] = "Torrat su sinu de unu gradu (no radianti).";
messages["MATH_TRIG_TOOLTIP_TAN"] = "Torrat sa tangenti de unu gradu (no radianti).";
messages["NEW_COLOUR_VARIABLE"] = "Create colour variable...";  // untranslated
messages["NEW_NUMBER_VARIABLE"] = "Create number variable...";  // untranslated
messages["NEW_STRING_VARIABLE"] = "Create string variable...";  // untranslated
messages["NEW_VARIABLE"] = "Variabili noa...";
messages["NEW_VARIABLE_TITLE"] = "Nòmini de sa variabili noa:";
messages["NEW_VARIABLE_TYPE_TITLE"] = "New variable type:";  // untranslated
messages["ORDINAL_NUMBER_SUFFIX"] = "";  // untranslated
messages["PROCEDURES_ALLOW_STATEMENTS"] = "permiti decraratzionis";
messages["PROCEDURES_BEFORE_PARAMS"] = "con:";
messages["PROCEDURES_CALLNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
messages["PROCEDURES_CALLNORETURN_TOOLTIP"] = "Arròllia sa funtzione '%1' cuncordada dae s'impitadore.";
messages["PROCEDURES_CALLRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
messages["PROCEDURES_CALLRETURN_TOOLTIP"] = "Arròllia sa funtzione '%1' cuncordada dae s'impitadore e imprea s'output suu.";
messages["PROCEDURES_CALL_BEFORE_PARAMS"] = "cun";
messages["PROCEDURES_CREATE_DO"] = "Ingenerau'%1'";
messages["PROCEDURES_DEFNORETURN_COMMENT"] = "Describe this function...";  // untranslated
messages["PROCEDURES_DEFNORETURN_DO"] = "";  // untranslated
messages["PROCEDURES_DEFNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine";  // untranslated
messages["PROCEDURES_DEFNORETURN_PROCEDURE"] = "fait calincuna cosa";
messages["PROCEDURES_DEFNORETURN_TITLE"] = "po";
messages["PROCEDURES_DEFNORETURN_TOOLTIP"] = "Fait una funtzioni chena output.";
messages["PROCEDURES_DEFRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine";  // untranslated
messages["PROCEDURES_DEFRETURN_RETURN"] = "torrat";
messages["PROCEDURES_DEFRETURN_TOOLTIP"] = "Fait una funtzioni cun output.";
messages["PROCEDURES_DEF_DUPLICATE_WARNING"] = "Amonestu: Custa funtzioni tenit parametrus duplicaus.";
messages["PROCEDURES_HIGHLIGHT_DEF"] = "Marca sa definitzioni de funtzioni.";
messages["PROCEDURES_IFRETURN_HELPURL"] = "http://c2.com/cgi/wiki?GuardClause";  // untranslated
messages["PROCEDURES_IFRETURN_TOOLTIP"] = "Si unu valori est berus, tandu torrat unu segundu valori.";
messages["PROCEDURES_IFRETURN_WARNING"] = "Amonestu: Custu brocu ddu podis ponni sceti aintru de una funtzioni.";
messages["PROCEDURES_MUTATORARG_TITLE"] = "nomini input:";
messages["PROCEDURES_MUTATORARG_TOOLTIP"] = "Aciungi un input a sa funtzioni.";
messages["PROCEDURES_MUTATORCONTAINER_TITLE"] = "inputs";
messages["PROCEDURES_MUTATORCONTAINER_TOOLTIP"] = "Aciungi, fùlia, o assenta is inputs a custa funtzioni.";
messages["REDO"] = "Redo";  // untranslated
messages["REMOVE_COMMENT"] = "Fùlia unu cumentu";
messages["RENAME_VARIABLE"] = "Muda nòmini a variabili...";
messages["RENAME_VARIABLE_TITLE"] = "A is variabilis '%1' muda nòmini a:";
messages["TEXT_APPEND_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification";  // untranslated
messages["TEXT_APPEND_TITLE"] = "a %1 acciungi su testu %2";
messages["TEXT_APPEND_TOOLTIP"] = "Aciungit testu a sa variàbili '%1'.";
messages["TEXT_CHANGECASE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#adjusting-text-case";  // untranslated
messages["TEXT_CHANGECASE_OPERATOR_LOWERCASE"] = "a minúdu";
messages["TEXT_CHANGECASE_OPERATOR_TITLECASE"] = "cun Primu lìtera a Mauschínu";
messages["TEXT_CHANGECASE_OPERATOR_UPPERCASE"] = "a mauschínu";
messages["TEXT_CHANGECASE_TOOLTIP"] = "Torrat una copia de su testu inditau mudendi mauschínu/minúdu.";
messages["TEXT_CHARAT_FIRST"] = "piga sa prima lìtera";
messages["TEXT_CHARAT_FROM_END"] = "piga sa lìtera # de sa fini";
messages["TEXT_CHARAT_FROM_START"] = "piga sa lìtera #";
messages["TEXT_CHARAT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#extracting-text";  // untranslated
messages["TEXT_CHARAT_LAST"] = "piga s'urtima lìtera";
messages["TEXT_CHARAT_RANDOM"] = "piga una lìtera a brìtiu";
messages["TEXT_CHARAT_TAIL"] = "";  // untranslated
messages["TEXT_CHARAT_TITLE"] = "in text %1 %2";  // untranslated
messages["TEXT_CHARAT_TOOLTIP"] = "Torrat sa lìtera de su postu giau.";
messages["TEXT_COUNT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#counting-substrings";  // untranslated
messages["TEXT_COUNT_MESSAGE0"] = "count %1 in %2";  // untranslated
messages["TEXT_COUNT_TOOLTIP"] = "Count how many times some text occurs within some other text.";  // untranslated
messages["TEXT_CREATE_JOIN_ITEM_TOOLTIP"] = "Acciungi unu item a su testu.";
messages["TEXT_CREATE_JOIN_TITLE_JOIN"] = "auni a pari";
messages["TEXT_CREATE_JOIN_TOOLTIP"] = "Aciungi, fùlia, o assenta is partis po torrai a sètiu custu brocu de testu.";
messages["TEXT_GET_SUBSTRING_END_FROM_END"] = "a sa lìtera # de sa fini";
messages["TEXT_GET_SUBSTRING_END_FROM_START"] = "a sa lìtera #";
messages["TEXT_GET_SUBSTRING_END_LAST"] = "a s'urtima lìtera";
messages["TEXT_GET_SUBSTRING_HELPURL"] = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text";  // untranslated
messages["TEXT_GET_SUBSTRING_INPUT_IN_TEXT"] = "in su testu";
messages["TEXT_GET_SUBSTRING_START_FIRST"] = "piga suta-stringa de sa primu lìtera";
messages["TEXT_GET_SUBSTRING_START_FROM_END"] = "piga suta-stringa de sa lìtera # fintzas a fini";
messages["TEXT_GET_SUBSTRING_START_FROM_START"] = "piga suta-stringa de sa lìtera #";
messages["TEXT_GET_SUBSTRING_TAIL"] = "";  // untranslated
messages["TEXT_GET_SUBSTRING_TOOLTIP"] = "Torrat su testu inditau.";
messages["TEXT_INDEXOF_HELPURL"] = "https://github.com/google/blockly/wiki/Text#finding-text";  // untranslated
messages["TEXT_INDEXOF_OPERATOR_FIRST"] = "circa prima ocasioni de su testu";
messages["TEXT_INDEXOF_OPERATOR_LAST"] = "circa urtima ocasioni de su testu";
messages["TEXT_INDEXOF_TITLE"] = "in su testu %1 %2 %3";
messages["TEXT_INDEXOF_TOOLTIP"] = "Torrat s'indixi de sa primu/urtima ocasioni de su primu testu in su segundu testu. Torrat %1 si su testu no ddu agatat.";
messages["TEXT_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text";  // untranslated
messages["TEXT_ISEMPTY_TITLE"] = "%1 est buidu";
messages["TEXT_ISEMPTY_TOOLTIP"] = "Torrat berus si su testu giau est buidu.";
messages["TEXT_JOIN_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-creation";  // untranslated
messages["TEXT_JOIN_TITLE_CREATEWITH"] = "scri testu cun";
messages["TEXT_JOIN_TOOLTIP"] = "Fait unu testu ponendi a pari parigas de items.";
messages["TEXT_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification";  // untranslated
messages["TEXT_LENGTH_TITLE"] = "longària de %1";
messages["TEXT_LENGTH_TOOLTIP"] = "Torrat su numeru de lìteras (cun is spàtzius) in su testu giau.";
messages["TEXT_PRINT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#printing-text";  // untranslated
messages["TEXT_PRINT_TITLE"] = "scri %1";
messages["TEXT_PRINT_TOOLTIP"] = "Scri su testu, numeru o àteru valori.";
messages["TEXT_PROMPT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";  // untranslated
messages["TEXT_PROMPT_TOOLTIP_NUMBER"] = "Pregonta unu nùmeru a s'impitadore.";
messages["TEXT_PROMPT_TOOLTIP_TEXT"] = "Pregonta testu a s'impitadore.";
messages["TEXT_PROMPT_TYPE_NUMBER"] = "pregonta po unu numeru";
messages["TEXT_PROMPT_TYPE_TEXT"] = "pregonta po su testu";
messages["TEXT_REPLACE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#replacing-substrings";  // untranslated
messages["TEXT_REPLACE_MESSAGE0"] = "replace %1 with %2 in %3";  // untranslated
messages["TEXT_REPLACE_TOOLTIP"] = "Replace all occurances of some text within some other text.";  // untranslated
messages["TEXT_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#reversing-text";  // untranslated
messages["TEXT_REVERSE_MESSAGE0"] = "reverse %1";  // untranslated
messages["TEXT_REVERSE_TOOLTIP"] = "Reverses the order of the characters in the text.";  // untranslated
messages["TEXT_TEXT_HELPURL"] = "https://en.wikipedia.org/wiki/String_(computer_science)";
messages["TEXT_TEXT_TOOLTIP"] = "Una lìtera, paràula, o linia de testu.";
messages["TEXT_TRIM_HELPURL"] = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";  // untranslated
messages["TEXT_TRIM_OPERATOR_BOTH"] = "bogat spàtzius de ambus càbudus de";
messages["TEXT_TRIM_OPERATOR_LEFT"] = "bogat spàtzius de su càbudu de manca de";
messages["TEXT_TRIM_OPERATOR_RIGHT"] = "bogat spàtzius de su càbudu de dereta de";
messages["TEXT_TRIM_TOOLTIP"] = "Torrat una copia de su testu bogaus is spàtzius de unu o de ambus is càbudus.";
messages["TODAY"] = "Oe";
messages["UNDO"] = "Undo";  // untranslated
messages["UNNAMED_KEY"] = "unnamed";  // untranslated
messages["VARIABLES_DEFAULT_NAME"] = "item";
messages["VARIABLES_GET_CREATE_SET"] = "Fait 'imposta %1'";
messages["VARIABLES_GET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#get";  // untranslated
messages["VARIABLES_GET_TOOLTIP"] = "Torrat su valori de custa variabili.";
messages["VARIABLES_SET"] = "imposta %1 a %2";
messages["VARIABLES_SET_CREATE_GET"] = "Fait 'piga %1'";
messages["VARIABLES_SET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#set";  // untranslated
messages["VARIABLES_SET_TOOLTIP"] = "Imposta custa variabili uguali a s'input.";
messages["VARIABLE_ALREADY_EXISTS"] = "A variable named '%1' already exists.";  // untranslated
messages["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named '%1' already exists for another type: '%2'.";  // untranslated
messages["WORKSPACE_ARIA_LABEL"] = "Blockly Workspace";  // untranslated
messages["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Say something...";  // untranslated
messages["CONTROLS_FOREACH_INPUT_DO"] = messages["CONTROLS_REPEAT_INPUT_DO"];
messages["CONTROLS_FOR_INPUT_DO"] = messages["CONTROLS_REPEAT_INPUT_DO"];
messages["CONTROLS_IF_ELSEIF_TITLE_ELSEIF"] = messages["CONTROLS_IF_MSG_ELSEIF"];
messages["CONTROLS_IF_ELSE_TITLE_ELSE"] = messages["CONTROLS_IF_MSG_ELSE"];
messages["CONTROLS_IF_IF_TITLE_IF"] = messages["CONTROLS_IF_MSG_IF"];
messages["CONTROLS_IF_MSG_THEN"] = messages["CONTROLS_REPEAT_INPUT_DO"];
messages["CONTROLS_WHILEUNTIL_INPUT_DO"] = messages["CONTROLS_REPEAT_INPUT_DO"];
messages["LISTS_CREATE_WITH_ITEM_TITLE"] = messages["VARIABLES_DEFAULT_NAME"];
messages["LISTS_GET_INDEX_HELPURL"] = messages["LISTS_INDEX_OF_HELPURL"];
messages["LISTS_GET_INDEX_INPUT_IN_LIST"] = messages["LISTS_INLIST"];
messages["LISTS_GET_SUBLIST_INPUT_IN_LIST"] = messages["LISTS_INLIST"];
messages["LISTS_INDEX_OF_INPUT_IN_LIST"] = messages["LISTS_INLIST"];
messages["LISTS_SET_INDEX_INPUT_IN_LIST"] = messages["LISTS_INLIST"];
messages["MATH_CHANGE_TITLE_ITEM"] = messages["VARIABLES_DEFAULT_NAME"];
messages["PROCEDURES_DEFRETURN_COMMENT"] = messages["PROCEDURES_DEFNORETURN_COMMENT"];
messages["PROCEDURES_DEFRETURN_DO"] = messages["PROCEDURES_DEFNORETURN_DO"];
messages["PROCEDURES_DEFRETURN_PROCEDURE"] = messages["PROCEDURES_DEFNORETURN_PROCEDURE"];
messages["PROCEDURES_DEFRETURN_TITLE"] = messages["PROCEDURES_DEFNORETURN_TITLE"];
messages["TEXT_APPEND_VARIABLE"] = messages["VARIABLES_DEFAULT_NAME"];
messages["TEXT_CREATE_JOIN_ITEM_TITLE_ITEM"] = messages["VARIABLES_DEFAULT_NAME"];

messages["MATH_HUE"] = "230";
messages["LOOPS_HUE"] = "120";
messages["LISTS_HUE"] = "260";
messages["LOGIC_HUE"] = "210";
messages["VARIABLES_HUE"] = "330";
messages["TEXTS_HUE"] = "160";
messages["PROCEDURES_HUE"] = "290";
messages["COLOUR_HUE"] = "20";
messages["VARIABLES_DYNAMIC_HUE"] = "310";
return messages;
}));


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Main.cs" company="Catel development team">
//   Copyright (c) 2008 - 2014 Catel development team. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace MobileExample.iOS
{
    using MonoTouch.UIKit;

    public class Application
    {
        #region Methods
        private static void Main(string[] args)
        {
            AppInitializer.Initialize();

            // if you want to use a different Application Delegate class from "AppDelegate"
            // you can specify it here.
            UIApplication.Main(args, null, "AppDelegate");
        }
        #endregion
    }
}


text:
'use strict';

var Promise               = require('bluebird');
var loaderUtils           = require('loader-utils');
var path                  = require('path');
var TypeScriptWebpackHost = require('./TypeScriptWebpackHost');

function typescriptLoader(text) {
  if (this.cacheable) {
    this.cacheable();
  }
  var cb = this.async();
  var filename = this.resourcePath;
  var resolver = Promise.promisify(this.resolve);

  if (this._compiler.typeScriptWebpackHost === undefined) {
    var options = loaderUtils.parseQuery(this.query);
    if (options.typescriptCompiler) {
      var ts = require(options.typescriptCompiler);
    } else {
      var ts = require('typescript');
    }
    if (options.target) {
      options.target = parseOptionTarget(options.target, ts);
    }
    this._compiler.typeScriptWebpackHost = new TypeScriptWebpackHost(
      options,
      this._compiler.inputFileSystem,
      ts
    );
  }

  this._compiler.typeScriptWebpackHost.emit(resolver, filename, text)
    .then(function(output) {
      var result = findResultFor(output, filename);
      var sourceFilename = loaderUtils.getRemainingRequest(this);
      var current = loaderUtils.getCurrentRequest(this);
      if (result.text === undefined) {
        throw new Error('no output found for ' + filename);
      }
      var sourceMap = JSON.parse(result.sourceMap);
      sourceMap.sources = [sourceFilename];
      sourceMap.file = current;
      sourceMap.sourcesContent = [text];
      cb(null, result.text, sourceMap);
    }.bind(this))
    .catch(TypeScriptWebpackHost.TypeScriptCompilationError, function(err) {
      var errors = formatErrors(err.diagnostics);
      errors.forEach(this.emitError, this);
      cb(null, codegenErrorReport(errors));
    }.bind(this))
    .catch(cb);
}

function findResultFor(output, filename) {
  var text;
  var sourceMap;
  filename = path.normalize(filename);
  for (var i = 0; i < output.outputFiles.length; i++) {
    var o = output.outputFiles[i];
    var outputFileName = path.normalize(o.name);
    if (outputFileName.replace(/\.js$/, '.ts') === filename) {
      text = o.text;
    }
    if (outputFileName.replace(/\.js.map$/, '.ts') === filename) {
      sourceMap = o.text;
    }
  }
  return {
    text: text,
    sourceMap: sourceMap
  };
}

function parseOptionTarget(target, ts) {
  target = target.toLowerCase();
  switch (target) {
    case 'es3':
      return ts.ScriptTarget.ES3;
    case 'es5':
      return ts.ScriptTarget.ES5;
    case 'es6':
      return ts.ScriptTarget.ES6;
  }
}

function codegenErrorReport(errors) {
  return errors
    .map(function(error) {
      return 'console.error(' + JSON.stringify(error) + ');';
    })
    .join('\n');
}

function hasExtensionError(d){
  return d.messageText.indexOf('must have extension') > -1;
}

function extensionErrorFilter(errors) {
  var otherErrors = !errors.every(hasExtensionError);
  return function(d) {
    return !(otherErrors && hasExtensionError(d));
  }
}

function formatErrors(errors) {
  return errors
    .filter(extensionErrorFilter(errors))
    .map(function(diagnostic) {
      var lineChar;
      if (diagnostic.file) {
        lineChar = diagnostic.file.getLineAndCharacterFromPosition(diagnostic.start);
      }
      return (
        (lineChar ? formatLineChar(lineChar) + ' ': '')
        + diagnostic.messageText
      );
    });
}

function formatLineChar(lineChar) {
  return '(Line: ' + lineChar.line + ', Char: ' + lineChar.character + ')';
}

module.exports = typescriptLoader;


text:
namespace Microsoft.Azure.Management.Billing.Models
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// Result of listing enrollment accounts.
    /// </summary>
    public partial class EnrollmentAccountListResult
    {
        /// <summary>
        /// Initializes a new instance of the EnrollmentAccountListResult
        /// class.
        /// </summary>
        public EnrollmentAccountListResult()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the EnrollmentAccountListResult
        /// class.
        /// </summary>
        /// <param name="value">The list of enrollment accounts.</param>
        /// <param name="nextLink">The link (url) to the next page of
        /// results.</param>
        public EnrollmentAccountListResult(IList<EnrollmentAccount> value = default(IList<EnrollmentAccount>), string nextLink = default(string))
        {
            Value = value;
            NextLink = nextLink;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets the list of enrollment accounts.
        /// </summary>
        [JsonProperty(PropertyName = "value")]
        public IList<EnrollmentAccount> Value { get; private set; }

        /// <summary>
        /// Gets the link (url) to the next page of results.
        /// </summary>
        [JsonProperty(PropertyName = "nextLink")]
        public string NextLink { get; private set; }

    }
}


text:
package com.arialyy.aria.core.upload;

import com.arialyy.aria.core.scheduler.NormalTaskListenerInterface;
import com.arialyy.aria.core.task.UploadTask;

/**
 * 上传任务接口
 *
 * @author ChenFei(chenfei0928 @ gmail.com)
 * Date: 2020-07-07 13:23
 */
public interface UploadTaskListener extends NormalTaskListenerInterface<UploadTask> {
}