text:
namespace vqro {
namespace db {

void Series::Init() {
  string series_dir = HexString<size_t>(keyint);
  series_dir.insert(series_dir.begin() + 4, '/');

  data_dir.reset(new DatapointDirectory(
      this, db->GetDataDirectory() + "datapoints/" + series_dir + "/"));
}

void Series::Write(vqro::rpc::WriteOperation& op)
{
  write_buffer->Append(op);
}

void Series::Read(ReadOperation& read_op) {
  // First we read any datapoints stored on disk.
  data_dir->Read(read_op);

  // Next we append datapoints from our write_buffer onto the read_op buffer.
  // We only guarantee that the write buffer datapoints are merged into read
  // results for *new* datapoints. We do *not* guarantee that write buffer
  // datapoints covering the past will be reflected in read results until
  // those points are flushed to disk. While it is certainly feasible to support
  // fancier merging, it is far more complex and of little utility.
  if (!write_buffer->IsSorted())
    write_buffer->Sort();

  for (auto point : *write_buffer) {
    if (read_op.Complete() || !read_op.SpaceLeft())
      break;

    if (point.timestamp >= read_op.next_time &&
        point.timestamp < read_op.end_time)
      read_op.Append(point);
  }

  // If we didn't fill the read_op buffer then there is no more work we can
  // do, so we force completion.
  if (read_op.SpaceLeft())
    read_op.next_time = read_op.end_time;
}

size_t Series::DatapointsBuffered() {
  return write_buffer->Size();
}

void Series::FlushBufferedDatapoints() {
  if (write_buffer->IsEmpty())
    return;

  if (!write_buffer->IsSorted())
    write_buffer->Sort();

  WriteOperation write_op(write_buffer.get());
  data_dir->Write(write_op);
  write_buffer->Clear();
}

} // namespace db
} // namespace vqro


text:
<?php

declare(strict_types=1);

namespace Cog\Tests\Flag\Stubs\Models\Classic;

use Cog\Flag\Traits\Classic\HasApprovedAt;
use Illuminate\Database\Eloquent\Model;

final class EntityWithApprovedAtUnapplied extends Model
{
    use HasApprovedAt;

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'entity_with_approved_at';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name',
    ];

    /**
     * Determine if ApprovedAtScope should be applied by default.
     *
     * @return bool
     */
    public function shouldApplyApprovedAtScope(): bool
    {
        return false;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<site>
   <feature url="features/tubame.feature_1.1.3.qualifier.jar" id="tubame.feature" version="1.1.3.qualifier"/>
</site>


text:
package com.bernard.beaconportal.activities.crypto;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import android.app.Activity;
import android.app.Fragment;
import android.content.ActivityNotFoundException;
import android.content.ContentUris;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.database.Cursor;
import android.net.Uri;
import android.widget.Toast;

import com.bernard.beaconportal.activities.R;
import com.bernard.beaconportal.activities.activity.MessageCompose;
import com.bernard.beaconportal.activities.mail.Message;
import com.bernard.beaconportal.activities.mail.MessagingException;
import com.bernard.beaconportal.activities.mail.Part;
import com.bernard.beaconportal.activities.mail.internet.MimeUtility;

/**
 * APG integration.
 */
public class Apg extends CryptoProvider {
	static final long serialVersionUID = 0x21071235;
	public static final String NAME = "apg";

	private static final String mApgPackageName = "org.thialfihar.android.apg";
	private static final int mMinRequiredVersion = 16;

	public static final String AUTHORITY = "org.thialfihar.android.apg.provider";
	public static final Uri CONTENT_URI_SECRET_KEY_RING_BY_KEY_ID = Uri
			.parse("content://" + AUTHORITY + "/key_rings/secret/key_id/");
	public static final Uri CONTENT_URI_SECRET_KEY_RING_BY_EMAILS = Uri
			.parse("content://" + AUTHORITY + "/key_rings/secret/emails/");

	public static final Uri CONTENT_URI_PUBLIC_KEY_RING_BY_KEY_ID = Uri
			.parse("content://" + AUTHORITY + "/key_rings/public/key_id/");
	public static final Uri CONTENT_URI_PUBLIC_KEY_RING_BY_EMAILS = Uri
			.parse("content://" + AUTHORITY + "/key_rings/public/emails/");

	public static class Intent {
		public static final String DECRYPT = "org.thialfihar.android.apg.intent.DECRYPT";
		public static final String ENCRYPT = "org.thialfihar.android.apg.intent.ENCRYPT";
		public static final String DECRYPT_FILE = "org.thialfihar.android.apg.intent.DECRYPT_FILE";
		public static final String ENCRYPT_FILE = "org.thialfihar.android.apg.intent.ENCRYPT_FILE";
		public static final String DECRYPT_AND_RETURN = "org.thialfihar.android.apg.intent.DECRYPT_AND_RETURN";
		public static final String ENCRYPT_AND_RETURN = "org.thialfihar.android.apg.intent.ENCRYPT_AND_RETURN";
		public static final String SELECT_PUBLIC_KEYS = "org.thialfihar.android.apg.intent.SELECT_PUBLIC_KEYS";
		public static final String SELECT_SECRET_KEY = "org.thialfihar.android.apg.intent.SELECT_SECRET_KEY";
	}

	public static final String EXTRA_TEXT = "text";
	public static final String EXTRA_DATA = "data";
	public static final String EXTRA_ERROR = "error";
	public static final String EXTRA_DECRYPTED_MESSAGE = "decryptedMessage";
	public static final String EXTRA_ENCRYPTED_MESSAGE = "encryptedMessage";
	public static final String EXTRA_SIGNATURE = "signature";
	public static final String EXTRA_SIGNATURE_KEY_ID = "signatureKeyId";
	public static final String EXTRA_SIGNATURE_USER_ID = "signatureUserId";
	public static final String EXTRA_SIGNATURE_SUCCESS = "signatureSuccess";
	public static final String EXTRA_SIGNATURE_UNKNOWN = "signatureUnknown";
	public static final String EXTRA_USER_ID = "userId";
	public static final String EXTRA_KEY_ID = "keyId";
	public static final String EXTRA_ENCRYPTION_KEY_IDS = "encryptionKeyIds";
	public static final String EXTRA_SELECTION = "selection";
	public static final String EXTRA_MESSAGE = "message";
	public static final String EXTRA_INTENT_VERSION = "intentVersion";

	public static final String INTENT_VERSION = "1";

	// Note: The support package only allows us to use the lower 16 bits of a
	// request code.
	public static final int DECRYPT_MESSAGE = 0x0000A001;
	public static final int ENCRYPT_MESSAGE = 0x0000A002;
	public static final int SELECT_PUBLIC_KEYS = 0x0000A003;
	public static final int SELECT_SECRET_KEY = 0x0000A004;

	public static Pattern PGP_MESSAGE = Pattern.compile(
			".*?(-----BEGIN PGP MESSAGE-----.*?-----END PGP MESSAGE-----).*",
			Pattern.DOTALL);

	public static Pattern PGP_SIGNED_MESSAGE = Pattern
			.compile(
					".*?(-----BEGIN PGP SIGNED MESSAGE-----.*?-----BEGIN PGP SIGNATURE-----.*?-----END PGP SIGNATURE-----).*",
					Pattern.DOTALL);

	public static Apg createInstance() {
		return new Apg();
	}

	/**
	 * Check whether APG is installed and at a high enough version.
	 *
	 * @param context
	 * @return whether a suitable version of APG was found
	 */
	@Override
	public boolean isAvailable(Context context) {
		try {
			PackageInfo pi = context.getPackageManager().getPackageInfo(
					mApgPackageName, 0);
			if (pi.versionCode >= mMinRequiredVersion) {
				return true;
			} else {
				Toast.makeText(context,
						R.string.error_apg_version_not_supported,
						Toast.LENGTH_SHORT).show();
			}
		} catch (NameNotFoundException e) {
			// not found
		}

		return false;
	}

	/**
	 * Select the signature key.
	 *
	 * @param activity
	 * @param pgpData
	 * @return success or failure
	 */
	@Override
	public boolean selectSecretKey(Activity activity, PgpData pgpData) {
		android.content.Intent intent = new android.content.Intent(
				Intent.SELECT_SECRET_KEY);
		intent.putExtra(EXTRA_INTENT_VERSION, INTENT_VERSION);
		try {
			activity.startActivityForResult(intent, Apg.SELECT_SECRET_KEY);
			return true;
		} catch (ActivityNotFoundException e) {
			Toast.makeText(activity, R.string.error_activity_not_found,
					Toast.LENGTH_SHORT).show();
			return false;
		}
	}

	/**
	 * Select encryption keys.
	 *
	 * @param activity
	 * @param emails
	 *            The emails that should be used for preselection.
	 * @param pgpData
	 * @return success or failure
	 */
	@Override
	public boolean selectEncryptionKeys(Activity activity, String emails,
			PgpData pgpData) {
		android.content.Intent intent = new android.content.Intent(
				Apg.Intent.SELECT_PUBLIC_KEYS);
		intent.putExtra(EXTRA_INTENT_VERSION, INTENT_VERSION);
		long[] initialKeyIds = null;
		if (!pgpData.hasEncryptionKeys()) {
			List<Long> keyIds = new ArrayList<Long>();
			if (pgpData.hasSignatureKey()) {
				keyIds.add(pgpData.getSignatureKeyId());
			}

			try {
				Uri contentUri = Uri.withAppendedPath(
						Apg.CONTENT_URI_PUBLIC_KEY_RING_BY_EMAILS, emails);
				Cursor c = activity.getContentResolver().query(contentUri,
						new String[] { "master_key_id" }, null, null, null);
				if (c != null) {
					while (c.moveToNext()) {
						keyIds.add(c.getLong(0));
					}
				}

				if (c != null) {
					c.close();
				}
			} catch (SecurityException e) {
				Toast.makeText(
						activity,
						activity.getResources().getString(
								R.string.insufficient_apg_permissions),
						Toast.LENGTH_LONG).show();
			}
			if (!keyIds.isEmpty()) {
				initialKeyIds = new long[keyIds.size()];
				for (int i = 0, size = keyIds.size(); i < size; ++i) {
					initialKeyIds[i] = keyIds.get(i);
				}
			}
		} else {
			initialKeyIds = pgpData.getEncryptionKeys();
		}
		intent.putExtra(Apg.EXTRA_SELECTION, initialKeyIds);
		try {
			activity.startActivityForResult(intent, Apg.SELECT_PUBLIC_KEYS);
			return true;
		} catch (ActivityNotFoundException e) {
			Toast.makeText(activity, R.string.error_activity_not_found,
					Toast.LENGTH_SHORT).show();
			return false;
		}
	}

	/**
	 * Get secret key ids based on a given email.
	 *
	 * @param context
	 * @param email
	 *            The email in question.
	 * @return key ids
	 */
	@Override
	public long[] getSecretKeyIdsFromEmail(Context context, String email) {
		long ids[] = null;
		try {
			Uri contentUri = Uri.withAppendedPath(
					Apg.CONTENT_URI_SECRET_KEY_RING_BY_EMAILS, email);
			Cursor c = context.getContentResolver().query(contentUri,
					new String[] { "master_key_id" }, null, null, null);
			if (c != null && c.getCount() > 0) {
				ids = new long[c.getCount()];
				while (c.moveToNext()) {
					ids[c.getPosition()] = c.getLong(0);
				}
			}

			if (c != null) {
				c.close();
			}
		} catch (SecurityException e) {
			Toast.makeText(
					context,
					context.getResources().getString(
							R.string.insufficient_apg_permissions),
					Toast.LENGTH_LONG).show();
		}

		return ids;
	}

	/**
	 * Get public key ids based on a given email.
	 *
	 * @param context
	 * @param email
	 *            The email in question.
	 * @return key ids
	 */
	@Override
	public long[] getPublicKeyIdsFromEmail(Context context, String email) {
		long ids[] = null;
		try {
			Uri contentUri = Uri.withAppendedPath(
					Apg.CONTENT_URI_PUBLIC_KEY_RING_BY_EMAILS, email);
			Cursor c = context.getContentResolver().query(contentUri,
					new String[] { "master_key_id" }, null, null, null);
			if (c != null && c.getCount() > 0) {
				ids = new long[c.getCount()];
				while (c.moveToNext()) {
					ids[c.getPosition()] = c.getLong(0);
				}
			}

			if (c != null) {
				c.close();
			}
		} catch (SecurityException e) {
			Toast.makeText(
					context,
					context.getResources().getString(
							R.string.insufficient_apg_permissions),
					Toast.LENGTH_LONG).show();
		}

		return ids;
	}

	/**
	 * Find out if a given email has a secret key.
	 *
	 * @param context
	 * @param email
	 *            The email in question.
	 * @return true if there is a secret key for this email.
	 */
	@Override
	public boolean hasSecretKeyForEmail(Context context, String email) {
		try {
			Uri contentUri = Uri.withAppendedPath(
					Apg.CONTENT_URI_SECRET_KEY_RING_BY_EMAILS, email);
			Cursor c = context.getContentResolver().query(contentUri,
					new String[] { "master_key_id" }, null, null, null);
			if (c != null && c.getCount() > 0) {
				c.close();
				return true;
			}
			if (c != null) {
				c.close();
			}
		} catch (SecurityException e) {
			Toast.makeText(
					context,
					context.getResources().getString(
							R.string.insufficient_apg_permissions),
					Toast.LENGTH_LONG).show();
		}
		return false;
	}

	/**
	 * Find out if a given email has a public key.
	 *
	 * @param context
	 * @param email
	 *            The email in question.
	 * @return true if there is a public key for this email.
	 */
	@Override
	public boolean hasPublicKeyForEmail(Context context, String email) {
		try {
			Uri contentUri = Uri.withAppendedPath(
					Apg.CONTENT_URI_PUBLIC_KEY_RING_BY_EMAILS, email);
			Cursor c = context.getContentResolver().query(contentUri,
					new String[] { "master_key_id" }, null, null, null);
			if (c != null && c.getCount() > 0) {
				c.close();
				return true;
			}
			if (c != null) {
				c.close();
			}
		} catch (SecurityException e) {
			Toast.makeText(
					context,
					context.getResources().getString(
							R.string.insufficient_apg_permissions),
					Toast.LENGTH_LONG).show();
		}
		return false;
	}

	/**
	 * Get the user id based on the key id.
	 *
	 * @param context
	 * @param keyId
	 * @return user id
	 */
	@Override
	public String getUserId(Context context, long keyId) {
		String userId = null;
		try {
			Uri contentUri = ContentUris.withAppendedId(
					Apg.CONTENT_URI_SECRET_KEY_RING_BY_KEY_ID, keyId);
			Cursor c = context.getContentResolver().query(contentUri,
					new String[] { "user_id" }, null, null, null);
			if (c != null && c.moveToFirst()) {
				userId = c.getString(0);
			}

			if (c != null) {
				c.close();
			}
		} catch (SecurityException e) {
			Toast.makeText(
					context,
					context.getResources().getString(
							R.string.insufficient_apg_permissions),
					Toast.LENGTH_LONG).show();
		}

		if (userId == null) {
			userId = context
					.getString(R.string.unknown_crypto_signature_user_id);
		}
		return userId;
	}

	/**
	 * Handle the activity results that concern us.
	 *
	 * @param activity
	 * @param requestCode
	 * @param resultCode
	 * @param data
	 * @return handled or not
	 */
	@Override
	public boolean onActivityResult(Activity activity, int requestCode,
			int resultCode, android.content.Intent data, PgpData pgpData) {
		switch (requestCode) {
		case Apg.SELECT_SECRET_KEY:
			if (resultCode != Activity.RESULT_OK || data == null) {
				break;
			}
			pgpData.setSignatureKeyId(data.getLongExtra(Apg.EXTRA_KEY_ID, 0));
			pgpData.setSignatureUserId(data.getStringExtra(Apg.EXTRA_USER_ID));
			((MessageCompose) activity).updateEncryptLayout();
			break;

		case Apg.SELECT_PUBLIC_KEYS:
			if (resultCode != Activity.RESULT_OK || data == null) {
				pgpData.setEncryptionKeys(null);
				((MessageCompose) activity).onEncryptionKeySelectionDone();
				break;
			}
			pgpData.setEncryptionKeys(data
					.getLongArrayExtra(Apg.EXTRA_SELECTION));
			((MessageCompose) activity).onEncryptionKeySelectionDone();
			break;

		case Apg.ENCRYPT_MESSAGE:
			if (resultCode != Activity.RESULT_OK || data == null) {
				pgpData.setEncryptionKeys(null);
				((MessageCompose) activity).onEncryptDone();
				break;
			}
			pgpData.setEncryptedData(data
					.getStringExtra(Apg.EXTRA_ENCRYPTED_MESSAGE));
			// this was a stupid bug in an earlier version, just gonna leave
			// this in for an APG
			// version or two
			if (pgpData.getEncryptedData() == null) {
				pgpData.setEncryptedData(data
						.getStringExtra(Apg.EXTRA_DECRYPTED_MESSAGE));
			}
			if (pgpData.getEncryptedData() != null) {
				((MessageCompose) activity).onEncryptDone();
			}
			break;

		default:
			return false;
		}

		return true;
	}

	@Override
	public boolean onDecryptActivityResult(CryptoDecryptCallback callback,
			int requestCode, int resultCode, android.content.Intent data,
			PgpData pgpData) {

		switch (requestCode) {
		case Apg.DECRYPT_MESSAGE: {
			if (resultCode != Activity.RESULT_OK || data == null) {
				break;
			}

			pgpData.setSignatureUserId(data
					.getStringExtra(Apg.EXTRA_SIGNATURE_USER_ID));
			pgpData.setSignatureKeyId(data.getLongExtra(
					Apg.EXTRA_SIGNATURE_KEY_ID, 0));
			pgpData.setSignatureSuccess(data.getBooleanExtra(
					Apg.EXTRA_SIGNATURE_SUCCESS, false));
			pgpData.setSignatureUnknown(data.getBooleanExtra(
					Apg.EXTRA_SIGNATURE_UNKNOWN, false));

			pgpData.setDecryptedData(data
					.getStringExtra(Apg.EXTRA_DECRYPTED_MESSAGE));
			callback.onDecryptDone(pgpData);

			break;
		}
		default: {
			return false;
		}
		}

		return true;
	}

	/**
	 * Start the encrypt activity.
	 *
	 * @param activity
	 * @param data
	 * @param pgpData
	 * @return success or failure
	 */
	@Override
	public boolean encrypt(Activity activity, String data, PgpData pgpData) {
		android.content.Intent intent = new android.content.Intent(
				Intent.ENCRYPT_AND_RETURN);
		intent.putExtra(EXTRA_INTENT_VERSION, INTENT_VERSION);
		intent.setType("text/plain");
		intent.putExtra(Apg.EXTRA_TEXT, data);
		intent.putExtra(Apg.EXTRA_ENCRYPTION_KEY_IDS,
				pgpData.getEncryptionKeys());
		intent.putExtra(Apg.EXTRA_SIGNATURE_KEY_ID, pgpData.getSignatureKeyId());
		try {
			activity.startActivityForResult(intent, Apg.ENCRYPT_MESSAGE);
			return true;
		} catch (ActivityNotFoundException e) {
			Toast.makeText(activity, R.string.error_activity_not_found,
					Toast.LENGTH_SHORT).show();
			return false;
		}
	}

	/**
	 * Start the decrypt activity.
	 *
	 * @param fragment
	 * @param data
	 * @param pgpData
	 * @return success or failure
	 */
	@Override
	public boolean decrypt(Fragment fragment, String data, PgpData pgpData) {
		android.content.Intent intent = new android.content.Intent(
				Apg.Intent.DECRYPT_AND_RETURN);
		intent.putExtra(EXTRA_INTENT_VERSION, INTENT_VERSION);
		intent.setType("text/plain");
		if (data == null) {
			return false;
		}
		try {
			intent.putExtra(EXTRA_TEXT, data);
			fragment.startActivityForResult(intent, Apg.DECRYPT_MESSAGE);
			return true;
		} catch (ActivityNotFoundException e) {
			Toast.makeText(fragment.getActivity(),
					R.string.error_activity_not_found, Toast.LENGTH_SHORT)
					.show();
			return false;
		}
	}

	@Override
	public boolean isEncrypted(Message message) {
		String data = null;
		try {
			Part part = MimeUtility.findFirstPartByMimeType(message,
					"text/plain");
			if (part == null) {
				part = MimeUtility
						.findFirstPartByMimeType(message, "text/html");
			}
			if (part != null) {
				data = MimeUtility.getTextFromPart(part);
			}
		} catch (MessagingException e) {
			// guess not...
			// TODO: maybe log this?
		}

		if (data == null) {
			return false;
		}

		Matcher matcher = PGP_MESSAGE.matcher(data);
		return matcher.matches();
	}

	@Override
	public boolean isSigned(Message message) {
		String data = null;
		try {
			Part part = MimeUtility.findFirstPartByMimeType(message,
					"text/plain");
			if (part == null) {
				part = MimeUtility
						.findFirstPartByMimeType(message, "text/html");
			}
			if (part != null) {
				data = MimeUtility.getTextFromPart(part);
			}
		} catch (MessagingException e) {
			// guess not...
			// TODO: maybe log this?
		}

		if (data == null) {
			return false;
		}

		Matcher matcher = PGP_SIGNED_MESSAGE.matcher(data);
		return matcher.matches();
	}

	/**
	 * Get the name of the provider.
	 *
	 * @return provider name
	 */
	@Override
	public String getName() {
		return NAME;
	}

	/**
	 * Test the APG installation.
	 *
	 * @return success or failure
	 */
	@Override
	public boolean test(Context context) {
		if (!isAvailable(context)) {
			return false;
		}

		try {
			// try out one content provider to check permissions
			Uri contentUri = ContentUris.withAppendedId(
					Apg.CONTENT_URI_SECRET_KEY_RING_BY_KEY_ID, 12345);
			Cursor c = context.getContentResolver().query(contentUri,
					new String[] { "user_id" }, null, null, null);
			if (c != null) {
				c.close();
			}
		} catch (SecurityException e) {
			// if there was a problem, then let the user know, this will not
			// stop MAIL/APG from
			// working, but some features won't be available, so we can still
			// return "true"
			Toast.makeText(
					context,
					context.getResources().getString(
							R.string.insufficient_apg_permissions),
					Toast.LENGTH_LONG).show();
		}

		return true;
	}
}


text:
set -e

# grab nunit runners
nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner
NUNIT="${PWD}/testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe"

cd Src/Support

# Build ReleaseTravis configuration that skips all Windows projects
# as they are tricky to build under Mono.
xbuild /p:Configuration=ReleaseTravis GoogleApisClient.sln

OUTDIR=bin/ReleaseSigned

mono "${NUNIT}" \
    "GoogleApis.Tests/${OUTDIR}/Google.Apis.Tests.dll" \
    "GoogleApis.Auth.Tests/${OUTDIR}/Google.Apis.Auth.Tests.dll" \
    "GoogleApis.Auth.DotNet4.Tests/${OUTDIR}/Google.Apis.Auth.DotNet4.Tests.dll"


text:
package io.rdbc.japi;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;

/**
 * Represents a set of rows returned by a database engine.
 */
public final class ResultSet implements Iterable<Row> {

    private final long rowsAffected;
    private final List<Warning> warnings;
    private final RowMetadata metadata;
    private final List<Row> rows;

    private ResultSet(long rowsAffected, List<Warning> warnings,
                      RowMetadata metadata, List<Row> rows) {
        this.rowsAffected = rowsAffected;
        this.warnings = new ArrayList<>(warnings);
        this.metadata = metadata;
        this.rows = new ArrayList<>(rows);
    }

    /**
     * Creates a new instance of ResultSet.
     *
     * @param rowsAffected a number of rows that were affected by the statement
     *                     that this result set is for
     * @param warnings     a sequence of warnings that were emitted by the database
     *                     during processing the statement that this result set is for
     * @param metadata     a meta data of columns of this result set
     * @param rows         a sequence of rows returned by a database
     */
    public static ResultSet of(long rowsAffected, List<Warning> warnings,
                               RowMetadata metadata, List<Row> rows) {
        return new ResultSet(
                rowsAffected,
                warnings,
                metadata,
                rows
        );
    }

    public long getRowsAffected() {
        return rowsAffected;
    }

    public List<Warning> getWarnings() {
        return new ArrayList<>(warnings);
    }

    public RowMetadata getMetadata() {
        return this.metadata;
    }

    public List<Row> getRows() {
        return new ArrayList<>(rows);
    }

    @Override
    public Iterator<Row> iterator() {
        return new Iterator<Row>() {
            //this inner class was created to remove "remove()" operation
            Iterator<Row> underlying = rows.iterator();

            @Override
            public boolean hasNext() {
                return underlying.hasNext();
            }

            @Override
            public Row next() {
                return underlying.next();
            }
        };
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ResultSet rows1 = (ResultSet) o;
        return rowsAffected == rows1.rowsAffected &&
                Objects.equals(warnings, rows1.warnings) &&
                Objects.equals(metadata, rows1.metadata) &&
                Objects.equals(rows, rows1.rows);
    }

    @Override
    public int hashCode() {

        return Objects.hash(rowsAffected, warnings, metadata, rows);
    }

    @Override
    public String toString() {
        return "ResultSet(" +
                "rowsAffected=" + rowsAffected +
                ", warnings=" + warnings +
                ", metadata=" + metadata +
                ", rows=" + rows +
                ')';
    }
}


text:
<?php

namespace Omnipay\WechatPay\Message;

/**
 * Class QueryBankResponse
 *
 * @package Omnipay\WechatPay\Message
 * @link    https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=24_3
 */
class QueryBankResponse extends BaseAbstractResponse
{
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                    "http://www.w3.org/TR/html4/loose.dtd">

	<link rel="stylesheet" href="qunit.css" type="text/css" media="screen" />

jquery-aop test suite


text:
package godes

import (
	"fmt"
	"time"
)

type RunnerInterface interface {
	Run()
	setState(i int)
	getState() int
	setChannel(c chan int)
	getChannel() chan int
	setInternalId(id int)
	getInternalId() int
	setMovingTime(m float64)
	getMovingTime() float64
	setMarkTime(m time.Time)
	getMarkTime() time.Time
	setPriority(p int)
	getPriority() int
	setWaitingForBool(p bool)
	getWaitingForBool() bool
	setWaitingForBoolControl(p *BooleanControl)
	getWaitingForBoolControl() *BooleanControl
	setWaitingForBoolControlTimeoutId(id int)
	getWaitingForBoolControlTimeoutId() int
}

type Runner struct {
	state                          int
	channel                        chan int
	internalId                     int
	movingTime                     float64
	markTime                       time.Time
	priority                       int
	waitingForBool                 bool
	waitingForBoolControl          *BooleanControl
	waitingForBoolControlTimeoutId int
	//schedulledTime					 float64
}

type TimeoutRunner struct {
	*Runner
	original      RunnerInterface
	timeoutPeriod float64
}

func (timeOut *TimeoutRunner) Run() {
	Advance(timeOut.timeoutPeriod)
	if timeOut.original.getWaitingForBoolControl() != nil && timeOut.original.getWaitingForBoolControlTimeoutId() == timeOut.internalId {
		timeOut.original.setState(rUNNER_STATE_READY)
		timeOut.original.setWaitingForBoolControl(nil)
		modl.addToMovingList(timeOut.original)
		delete(modl.waitingConditionMap, timeOut.original.getInternalId())
	}

}

func newRunner() *Runner {
	return &Runner{}
}

func (b *Runner) Run() {
	fmt.Println("Run Run Run Run")
}

func (b *Runner) setState(i int) {
	b.state = i
}

func (b *Runner) getState() int {
	return b.state
}

func (b *Runner) setChannel(c chan int) {
	b.channel = c
}

func (b *Runner) getChannel() chan int {
	return b.channel
}

func (b *Runner) setInternalId(i int) {
	b.internalId = i

}
func (b *Runner) getInternalId() int {
	return b.internalId
}

func (b *Runner) setMovingTime(m float64) {
	b.movingTime = m

}
func (b *Runner) getMovingTime() float64 {
	return b.movingTime
}

func (b *Runner) setMarkTime(m time.Time) {
	b.markTime = m

}
func (b *Runner) getMarkTime() time.Time {
	return b.markTime
}

func (b *Runner) setPriority(p int) {
	b.priority = p
}
func (b *Runner) getPriority() int {
	return b.priority
}

func (b *Runner) setWaitingForBool(p bool) {
	b.waitingForBool = p

}

func (b *Runner) getWaitingForBool() bool {
	return b.waitingForBool

}

func (b *Runner) setWaitingForBoolControl(p *BooleanControl) {
	b.waitingForBoolControl = p

}

func (b *Runner) getWaitingForBoolControl() *BooleanControl {
	return b.waitingForBoolControl
}

func (b *Runner) setWaitingForBoolControlTimeoutId(p int) {
	b.waitingForBoolControlTimeoutId = p

}

func (b *Runner) getWaitingForBoolControlTimeoutId() int {
	return b.waitingForBoolControlTimeoutId
}

func (b *Runner) IsShedulled() bool {
	if b.state == rUNNER_STATE_SCHEDULED {
		return true
	}
	return false
}

func (b *Runner) GetMovingTime() float64 {
	if b.state == rUNNER_STATE_SCHEDULED {
		return b.movingTime
	} else {
		panic("Runner is Not Shedulled ")
	}
}

func (b *Runner) String() string {

	var st = ""

	switch b.state {
	case rUNNER_STATE_READY:
		st = "READY"
	case rUNNER_STATE_ACTIVE:
		st = "ACTIVE"
	case rUNNER_STATE_WAITING_COND:
		st = "WAITING_COND"
	case rUNNER_STATE_SCHEDULED:
		st = "SCHEDULED"
	case rUNNER_STATE_INTERRUPTED:
		st = "INTERRUPTED"
	case rUNNER_STATE_TERMINATED:
		st = "TERMINATED"

	default:
		panic("Unknown state")
	}
	return fmt.Sprintf(" st=%v ch=%v id=%v mt=%v mk=%v pr=%v", st, b.channel, b.internalId, b.movingTime, b.markTime, b.priority)
}


text:
import {Component} from '@angular/core';

@Component({
    selector: 'medical-test',
    template: `<router-outlet></router-outlet>`
})
export class MedicalTestComponent {
    constructor(){

    }
}


text:
<?php
/*
 * InformationMachineAPILib
 *
 *
 */

namespace InformationMachineAPILib\Models;

use JsonSerializable;

/**
 * @todo Write general description for this model
 */
class PurchaseItemData implements JsonSerializable {
    /**
     * @todo Write general description for this property
     * @required
     * @var integer $id public property
     */
    public $id;

    /**
     * @todo Write general description for this property
     * @required
     * @maps purchase_id
     * @var integer $purchaseId public property
     */
    public $purchaseId;

    /**
     * @todo Write general description for this property
     * @var string $name public property
     */
    public $name;

    /**
     * @todo Write general description for this property
     * @var double $quantity public property
     */
    public $quantity;

    /**
     * @todo Write general description for this property
     * @var double $price public property
     */
    public $price;

    /**
     * @todo Write general description for this property
     * @maps discounted_price
     * @var double $discountedPrice public property
     */
    public $discountedPrice;

    /**
     * @todo Write general description for this property
     * @maps unit_of_measurement
     * @var string $unitOfMeasurement public property
     */
    public $unitOfMeasurement;

    /**
     * @todo Write general description for this property
     * @var string $upc public property
     */
    public $upc;

    /**
     * @todo Write general description for this property
     * @maps upc_resolved_at
     * @var string $upcResolvedAt public property
     */
    public $upcResolvedAt;

    /**
     * @todo Write general description for this property
     * @var ProductData $product public property
     */
    public $product;

    /**
     * Constructor to set initial or default values of member properties
     * @param   integer           $id                    Initialization value for the property $this->id
     * @param   integer           $purchaseId            Initialization value for the property $this->purchaseId
     * @param   string            $name                  Initialization value for the property $this->name
     * @param   double            $quantity              Initialization value for the property $this->quantity
     * @param   double            $price                 Initialization value for the property $this->price
     * @param   double            $discountedPrice       Initialization value for the property $this->discountedPrice
     * @param   string            $unitOfMeasurement     Initialization value for the property $this->unitOfMeasurement
     * @param   string            $upc                   Initialization value for the property $this->upc
     * @param   string            $upcResolvedAt         Initialization value for the property $this->upcResolvedAt
     * @param   ProductData       $product               Initialization value for the property $this->product
     */
    public function __construct()
    {
        if(10 == func_num_args())
        {
            $this->id                  = func_get_arg(0);
            $this->purchaseId          = func_get_arg(1);
            $this->name                = func_get_arg(2);
            $this->quantity            = func_get_arg(3);
            $this->price               = func_get_arg(4);
            $this->discountedPrice     = func_get_arg(5);
            $this->unitOfMeasurement   = func_get_arg(6);
            $this->upc                 = func_get_arg(7);
            $this->upcResolvedAt       = func_get_arg(8);
            $this->product             = func_get_arg(9);
        }
    }

    /**
     * Encode this object to JSON
     */
    public function jsonSerialize()
    {
        $json = array();
        $json['id']                  = $this->id;
        $json['purchase_id']         = $this->purchaseId;
        $json['name']                = $this->name;
        $json['quantity']            = $this->quantity;
        $json['price']               = $this->price;
        $json['discounted_price']    = $this->discountedPrice;
        $json['unit_of_measurement'] = $this->unitOfMeasurement;
        $json['upc']                 = $this->upc;
        $json['upc_resolved_at']     = $this->upcResolvedAt;
        $json['product']             = $this->product;

        return $json;
    }
}


text:
package org.kuali.kra.common.specialreview.rule;

import org.kuali.kra.common.specialreview.bo.SpecialReview;
import org.kuali.kra.common.specialreview.bo.SpecialReviewExemption;
import org.kuali.kra.common.specialreview.rule.event.AddSpecialReviewEvent;
import org.kuali.kra.common.specialreview.rules.SpecialReviewRuleBase;
import org.kuali.kra.rule.BusinessRuleInterface;

/**
 * Runs the rule processing for adding a Special Review.
 * @param <T> The subclass of Special Review
 */
public class AddSpecialReviewRule<T extends SpecialReview<? extends SpecialReviewExemption>> extends SpecialReviewRuleBase<T>
    implements BusinessRuleInterface<AddSpecialReviewEvent<T>> {

    /**
     * {@inheritDoc}
     * @see org.kuali.kra.rule.BusinessRuleInterface#processRules(org.kuali.kra.rule.event.KraDocumentEventBaseExtension)
     */
    public boolean processRules(AddSpecialReviewEvent<T> event) {
        return processAddSpecialReviewEvent(event);
    }

}


text:
David Pierson Bradway, Ph.D.
=============================

| david.bradway@duke.edu
| Research Scientist
| Biomedical Engineering
| Duke University
| Durham, NC 27708 USA

Objective
---------

-  Career in research, visualization, data acquisition, and signal
   processing
-  Engineering, research and development role in academia or industry

Work Experience
---------------

-  **Duke University** (Durham, NC, USA)

   Research Scientist, 2014 - present

   -  Managing clinical trials on ultrsound imaging in fetal and liver
      clinics
   -  Working with graduate students on NIH-funded research
   -  Contributed to several funded NIH grant applications

-  **Technical University of Denmark (DTU)** (Kongens Lyngby, Denmark)

   Postdoctoral Researcher, 2013 - 2014

   -  Developed OpenCL software for processing 3-D vector flow imaging
      ultrasound data on the GPU
   -  Presented a conference presentation, a poster, and proceedings
      (SPIE 2014 & 2015)
   -  Contributed as co-author to another peer-reviewed journal article
   -  Examined feasibility of transthoracic cardiac vector flow imaging
      on a phased-array probe

-  **Duke University** (Durham, NC, USA)

   Graduate Research and Teaching Assistant, 2005 - 2013

   -  PhD project using ultrasound to noninvasively measure the heart's
      mechanical properties
   -  Organized and conducted clinical studies at Duke University
      Medical Center
   -  Presented results in conferences and proceedings and via
      peer-reviewed journal articles

-  **Siemens Healthcare** (Issaquah, WA, USA)

   Graduate Student Research Intern, 2008

   -  Worked within a research and development team in a large
      corporation
   -  Added multiple focal zone ARFI excitation to research mode of
      Acuson S2000 ultrasound scanner
   -  Learned `version
      control <http://www-03.ibm.com/software/products/en/clearcase>`__
      and `MS Visual Studio IDE <http://www.visualstudio.com/>`__ tools

Education
---------

-  **Duke University** (Durham, NC, USA)

   `Ph.D. in Biomedical Engineering <http://bme.duke.edu/grad>`__, May
   2013.

-  **The Ohio State University (OSU)** (Columbus, OH, USA)

   `B.S. in Electrical and Computer
   Engineering <http://ece.osu.edu/futurestudents/undergrad>`__, June
   2005.

Teaching
--------

-  Co-Instructor, Instructor, Adv. Top. Lab for Grads in BME - Intro. to
   Electronics Biomedical Engineering 790L (2018, 2019)
-  Instructor, Ultrasound module of Medical Physics 731 (2015, 2016)
-  Guest lecturer, Biomedical Engineering 590 (2016)
-  Co-Instructor, "International Summer School on Advanced Ultrasound
   Imaging", Technical University of Denmark (June 2015)

Grants and Contracts
--------------------

-  `2019 Research Germinator Award, Duke Institute for Brain Sciences
   (DIBS) <https://dibs.duke.edu/research/awards/schedule-application>`__
   Ravikanth Velagapudi, PhD, Anesthesiology, School of Medicine; and
   William Huffman and David Bradway, PhD, Biomedical Engineering, Pratt
   School of Engineering. Targeting Autophagy with Non-Invasive Vagal
   Nerve Stimulation to Treat Delirium Superimposed on Dementia.

Invention Disclosures and Patents
---------------------------------

-  Duke IDF #a3348ed7: "Split Aperture ARFI / SWEI"
-  Duke IDF #540: "Visual Feedback for Improved Triggered Acquisitions
   for Ultrasound Imaging"
-  Trahey, G., Long, W., Hollender, P., Bradway, D., Kakkad, V. and
   Bottenus, N., Duke University, 2021. Methods, systems and computer
   program products for triggering ultrasound data acquisition. U.S.
   Patent 10,969,487.

Honors and Activities
---------------------

-  `Whitaker International Program
   Scholar <http://www.whitaker.org/grants/fellows-scholars>`__ (2013)
-  `National Science Foundation Graduate Research
   Fellow <http://www.nsfgrfp.org/>`__ (2005-2008)
-  `Goldwater Research Scholar <https://goldwater.scholarsapply.org/>`__
   (2004-2005)
-  `Organized engineering design and build trip to Honduran
   orphanage <http://www.montanadeluz.org/>`__ (2004)
-  `Founded engineering community service group at Ohio
   State <http://ecos.osu.edu/>`__ (2003)

Professional Activities
-----------------------

-  Early Career Professional Development in Medical Imaging Workshop,
   SPIE Medical Imaging 2015
-  Associate Editor, Ultrasonic Imaging journal (2016-)
-  Reviewer for the journals Ultrasound in Medicine and Biology,
   Ultrasonic Imaging, and IEEE Transactions on Medical Imaging

Skills
------

-  Advanced signal and imaging processing programming: Matlab and Python
-  Tools and languages: `Git <http://git-scm.com/>`__, C/C++,
   OpenCL/CUDA, Docker, Linux
-  Problem solving, signal and image analysis, data science, scientific
   computing, and experimental design
-  Strong written and verbal communication, data visualization
-  Successfully written fellowships, scholarships, proposals
-  Personal projects in mobile and embedded systems:
   `Arduino <http://www.arduino.cc/>`__, `Raspberry
   Pi <http://www.raspberrypi.org/>`__

Journal Articles
~~~~~~~~~~~~~~~~

[1–13]

Book Chapters
~~~~~~~~~~~~~

[14,15]

Abstracts and Proceedings
~~~~~~~~~~~~~~~~~~~~~~~~~

[16–44]

Publications
------------

.. container:: references
   :name: refs

   .. container::
      :name: ref-Fahey2008a

      1. Fahey BJ, Nelson RC, Bradway DP, Hsu SJ, Dumont DM, et al.
      (2008) In vivo visualization of abdominal malignancies with
      acoustic radiation force elastography. Physics in medicine and
      biology 53: 279–93.
      doi:`10.1088/0031-9155/53/1/020 <https://doi.org/10.1088/0031-9155/53/1/020>`__

   .. container::
      :name: ref-Fahey2008c

      2. Fahey BJ, Nelson RC, Hsu SJ, Bradway DP, Dumont DM, et al.
      (2008) In vivo guidance and assessment of liver radio-frequency
      ablation with acoustic radiation force elastography. Ultrasound in
      medicine & biology 34: 1590–603.
      doi:`10.1016/j.ultrasmedbio.2008.03.006 <https://doi.org/10.1016/j.ultrasmedbio.2008.03.006>`__

   .. container::
      :name: ref-Nightingale2008

      3. Nightingale K, Palmeri M, Zhai L, Frinkley K, Wang M, et al.
      (n.d.) Impulsive acoustic radiation force: imaging approaches and
      clinical applications. The Journal of the Acoustical Society of
      America 123: 3792.
      doi:`10.1121/1.2935460 <https://doi.org/10.1121/1.2935460>`__

   .. container::
      :name: ref-Nightingale2009

      4. Nightingale K, Palmeri M, Dahl J, Bradway D, Hsu S, et al.
      (2009) Elasticity imaging with acoustic radiation force: Methods
      and clinical applications. Japanese journal of medical ultrasonics
      36: 116.

   .. container::
      :name: ref-Wolf2011

      5. Wolf PD, Eyerly SA, Bradway DP, Dumont DM, Bahnson TD, et al.
      (2011) Near real time evaluation of cardiac radiofrequency
      ablation lesions with intracardiac echocardiography based acoustic
      radiation force impulse imaging. The Journal of the Acoustical
      Society of America 129: 2438.
      doi:`10.1121/1.3587978 <https://doi.org/10.1121/1.3587978>`__

   .. container::
      :name: ref-Eyerly2012

      6. Eyerly SA, Bahnson TD, Koontz JI, Bradway DP, Dumont DM, et al.
      (2012) Intracardiac acoustic radiation force impulse imaging: A
      novel imaging method for intraprocedural evaluation of
      radiofrequency ablation lesions. Heart rhythm: the official
      journal of the Heart Rhythm Society 9: 1855–1862.
      doi:`10.1016/j.hrthm.2012.07.003 <https://doi.org/10.1016/j.hrthm.2012.07.003>`__

   .. container::
      :name: ref-Hollender2013

      7. Hollender P, Bradway D, Wolf P, Goswami R, Trahey G (2013)
      Intracardiac acoustic radiation force impulse (arfi) and shear
      wave imaging in pigs with focal infarctions. IEEE transactions on
      ultrasonics, ferroelectrics, and frequency control 60: 1669–1682.
      doi:`10.1109/TUFFC.2013.2749 <https://doi.org/10.1109/TUFFC.2013.2749>`__

   .. container::
      :name: ref-Patel2014

      8. Patel V, Dahl JJ, Bradway DP, Doherty JR, Lee SY, et al. (2014)
      Acoustic Radiation Force Impulse Imaging (ARFI) on an IVUS
      Circular Array. Ultrasonic Imaging 36: 98–111.
      doi:`10.1177/0161734613511595 <https://doi.org/10.1177/0161734613511595>`__

   .. container::
      :name: ref-Eyerly2014

      9. Eyerly SA, Bahnson TD, Koontz JI, Bradway DP, Dumont DM, et al.
      (2014) Contrast in Intracardiac Acoustic Radiation Force Impulse
      Images of Radiofrequency Ablation Lesions. Ultrasonic Imaging 36:
      133–148.
      doi:`10.1177/0161734613519602 <https://doi.org/10.1177/0161734613519602>`__

   .. container::
      :name: ref-jensen2016

      10. Jensen JA, Rasmussen MF, Pihl MJ, Holbek S, Villagómez HCA, et
      al. (2016) Safety assessment of advanced imaging sequences i:
      Measurements. IEEE transactions on ultrasonics, ferroelectrics,
      and frequency control 63: 110–119.
      doi:`10.1109/TUFFC.2015.2502987 <https://doi.org/10.1109/TUFFC.2015.2502987>`__

   .. container::
      :name: ref-bottenus2016

      11. Bottenus N, Long W, Zhang H, Jakovljevic M, Bradway D, et al.
      (2016) Feasibility of swept synthetic aperture ultrasound imaging.
      doi:`10.1109/TMI.2016.2524992 <https://doi.org/10.1109/TMI.2016.2524992>`__

   .. container::
      :name: ref-Long2017umb

      12. Long W, Hyun D, Roy Choudhury K, Bradway D, McNally P, et al.
      (2018) Clinical utility of fetal short-lag spatial coherence
      imaging. Ultrasound in Medicine and Biology 44: 794–806.
      doi:`10.1016/j.ultrasmedbio.2017.12.006 <https://doi.org/10.1016/j.ultrasmedbio.2017.12.006>`__

   .. container::
      :name: ref-Flint2020

      13. Flint K, Bottenus N, Bradway D, McNally P, Ellestad S, et al.
      (2021) An Automated ALARA Method for Ultrasound: An Obstetric
      Ultrasound Feasibility Study. Journal of Ultrasound in Medicine
      40: 1863–1877. Available:
      https://onlinelibrary.wiley.com/doi/abs/10.1002/jum.15570.

   .. container::
      :name: ref-dobbins2019medical

      14. Dobbins JT, Frush DP, Kigongo CJ, MacFall JR, Reiman RE, et
      al. (2019) Medical imaging safety in global health radiology. In:
      Radiology in global health. Springer. pp. 85–105.

   .. container::
      :name: ref-eyerly2018acoustic

      15. Eyerly-Webb SA, Vejdani-Jahromi M, Kakkad V, Hollender P,
      Bradway D, et al. (2018) Acoustic radiation force-based ultrasound
      elastography for cardiac imaging applications. In: Ultrasound
      elastography for biomedical applications and medicine. John Wiley
      & Sons. pp. 504–519.

   .. container::
      :name: ref-Hsu2007c

      16. Hsu SJ, Bradway DP, Fahey BJ, Trahey GE (2007) Transthoracic
      Acoustic Radiation Force Impulse Imaging of the Cardiac Cycle. In:
      Ultrasonic measurement and imaging of tissue elasticity.

   .. container::
      :name: ref-Bradway2007

      17. Bradway DP, Hsu SJ, Fahey BJ, Dahl JJ, Nichols TC, et al.
      (2007) 6B-6 Transthoracic Cardiac Acoustic Radiation Force Impulse
      Imaging: A Feasibility Study. IEEE. pp. 448–451.
      doi:`10.1109/ULTSYM.2007.121 <https://doi.org/10.1109/ULTSYM.2007.121>`__

   .. container::
      :name: ref-Fahey2007b

      18. Fahey BJ, Nelson RC, Hsu SJ, Bradway DP, Dumont DM, et al.
      (2007) 6B-4 In Vivo Acoustic Radiation Force Impulse Imaging of
      Abdominal Lesions. In: 2007 ieee ultrasonics symposium
      proceedings. IEEE. pp. 440–443.
      doi:`10.1109/ULTSYM.2007.119 <https://doi.org/10.1109/ULTSYM.2007.119>`__

   .. container::
      :name: ref-Bradway2009

      19. Bradway DP, Fahey BJ, Nelson RC, Trahey GE (2009) ARFI imaging
      of abdominal ablation and liver lesion biopsy. In: International
      symposium on ultrasonic imaging and tissue characterization, 2009.
      Available: http://uitc-symposium.org/2009_abstracts.pdf.

   .. container::
      :name: ref-Husarik2009

      20. Husarik DB, Nelson RC, Bradway DP, Fahey BJ, Nightingale KR,
      et al. (2009) First Clinical Experience with Sonographic
      Elastography of the Liver Using Acoustic Radiation Force Impulse
      (ARFI) Imaging. In: RSNA. Available:
      http://rsna2009.rsna.org/search.

   .. container::
      :name: ref-Nelson2009

      21. Nelson RC, Bradway DP, Fahey BJ, Trahey GE (2009) Future
      Application of Ultrasound: Acoustic Radiation Force Impulse (ARFI)
      Imaging. In: AIUM. Available:
      http://www.aium.org/loginRequired/membersOnly/proceedings/2009.pdf.

   .. container::
      :name: ref-Bradway2009b

      22. Bradway DP, Fahey BJ, Nelson RC, Trahey GE (2009) Recent
      Clinical Results of Acoustic Radiation Force Impulse Imaging of
      Abdominal Ablation. In: International tissue elasticity
      conference. Available:
      http://www.elasticityconference.org/prior_conf/2009/PDF/2009Proceedings.pdf.

   .. container::
      :name: ref-Hsu2010

      23. Hsu SJ, Bradway DP, Bouchard RR, Hollender PJ, Wolf PD, et al.
      (2010) Parametric pressure-volume analysis and acoustic radiation
      force impulse imaging of left ventricular function. In: 2010 ieee
      international ultrasonics symposium. IEEE. pp. 698–701.
      doi:`10.1109/ULTSYM.2010.5935661 <https://doi.org/10.1109/ULTSYM.2010.5935661>`__

   .. container::
      :name: ref-Hollender2010

      24. Hollender PJ, Bouchard RR, Hsu SJ, Bradway DP, Wolf PD, et al.
      (2010) Intracardiac measurements of elasticity using Acoustic
      Radiation Force Impulse (ARFI) methods: Temporal and spatial
      stability of shear wave velocimetry. In: 2010 ieee international
      ultrasonics symposium. IEEE. pp. 698–701.
      doi:`10.1109/ULTSYM.2010.5935946 <https://doi.org/10.1109/ULTSYM.2010.5935946>`__

   .. container::
      :name: ref-Bradway2010

      25. Bradway DP, Hsu SJ, Wolf PD, Trahey GE (2010) Acoustic
      Radiation Force Impulse Imaging of Acute Myocardial Ischemia and
      Infarct. In: International symposium on ultrasonic imaging and
      tissue characterization. Available:
      http://uitc-symposium.org/2010_abstracts.pdf.

   .. container::
      :name: ref-Bradway2010b

      26. Bradway DP, Hsu SJ, Wolf PD, Trahey GE (2010) Transthoracic
      Acoustic Radiation Force Impulse Imaging of Cardiac Function. In:
      International tissue elasticity conference. Available:
      http://www.elasticityconference.org/prior_conf/2010/PDF/2010Proceedings.pdf.

   .. container::
      :name: ref-Bradway2011

      27. Bradway DP, Rosenzweig SR, Doherty JR, Hyun D, Trahey GE
      (2011) Recent Results and Advances in Transthoracic Cardiac
      Acoustic Radiation Force Impulse Imaging. In: International
      symposium on ultrasonic imaging and tissue characterization.
      Available:
      http://www.elasticityconference.org/prior_conf/2011/PDF/2011ITECProceedings.pdf.

   .. container::
      :name: ref-Byram2011

      28. Byram BC, Gianantonio DM, Bradway DP, Hyun D, Jakovljevic M,
      et al. (2011) Direct in vivo Myocardial Infarct Visualization
      Using 3D Ultrasound and Passive Strain Contrast. In: International
      tissue elasticity conference. Available:
      http://www.elasticityconference.org/prior_conf/2011/PDF/2011ITECProceedings.pdf.

   .. container::
      :name: ref-Byram2011b

      29. Byram BC, Bradway DP, Jakovljevic M, Gianantonio D, Hyun D, et
      al. (2011) Direct In Vivo Myocardial Infarct Visualization Using
      3D Ultrasound and Passive Strain Contrast. In: IEEE ultrasonics
      symp.
      doi:`10.1109/ULTSYM.2011.0007 <https://doi.org/10.1109/ULTSYM.2011.0007>`__

   .. container::
      :name: ref-Bradway2012

      30. Bradway DP, Hollender PJ, Goswami R, Wolf PD, Trahey GE (2012)
      Feasibility and safety of transthoracic cardiac acoustic radiation
      force impulse imaging methods. In: 2012 ieee international
      ultrasonics symposium. IEEE. pp. 2027–2030.
      doi:`10.1109/ULTSYM.2012.0507 <https://doi.org/10.1109/ULTSYM.2012.0507>`__

   .. container::
      :name: ref-Bradway2012b

      31. Bradway DP, Hollender PJ, Goswami R, Wolf PD, Trahey GE (2012)
      Transthoracic Cardiac Acoustic Radiation Force Impulse Imaging: in
      vivo Feasibility, Methods, and Initial Results. In: International
      symposium on ultrasonic imaging and tissue characterization, 2012.
      Available: http://uitc-symposium.org/2012_abstracts.pdf.

   .. container::
      :name: ref-Hollender2012

      32. Hollender PJ, Bradway DP, Goswami R, Wolf PD, Trahey GE (2012)
      Acoustic radiation force techniques for imaging cardiac infarct in
      vivo: methods and initial results. In: International symposium on
      ultrasonic imaging and tissue characterization. Available:
      http://uitc-symposium.org/2012_abstracts.pdf.

   .. container::
      :name: ref-Eyerly2012b

      33. Eyerly SA, Bahnson T, Koontz J, Bradway DP, Dumont DM, et al.
      (2012) Confirmation of Cardiac Radiofrequency Ablation Treatment
      Using Intra-Procedure Acoustic Radiation Force Impulse Imaging.
      In: IEEE ultrasonics symposium.
      doi:`10.1109/ULTSYM.2012.0509 <https://doi.org/10.1109/ULTSYM.2012.0509>`__

   .. container::
      :name: ref-Hollender2012b

      34. Hollender PJ, Bradway DP, Wolf PD, Goswami R, Trahey GE (2012)
      Intracardiac ARF-driven Shear Wave Velocimetry to Estimate
      Regional Myocardial Stiffness and Contractility in Pigs with Focal
      Infarctions. In: IEEE ultrasonics symposium.
      doi:`10.1109/ULTSYM.2012.0508 <https://doi.org/10.1109/ULTSYM.2012.0508>`__

   .. container::
      :name: ref-Goswami2013

      35. Goswami R, Bradway D, Kisslo J, Trahey G (2013) Novel
      Application of Acoustic Radiation Force Impulse Imaging in
      Transthoracic Echocardiography. In: Journal of the american
      college of cardiology. American College of Cardiology Foundation,
      Vol. 61. p. E1090.
      doi:`10.1016/S0735-1097(13)61090-6 <https://doi.org/10.1016/S0735-1097(13)61090-6>`__

   .. container::
      :name: ref-Patel2013

      36. Patel V, Dahl JJ, Bradway DP, Doherty JR, Smith SW (2013)
      Acoustic radiation force impulse imaging on an IVUS circular
      array. In: 2013 ieee international ultrasonics symposium (ius).
      IEEE. pp. 773–776.
      doi:`10.1109/ULTSYM.2013.0199 <https://doi.org/10.1109/ULTSYM.2013.0199>`__

   .. container::
      :name: ref-Bradway2014

      37. Bradway DP, Pihl MJ, Krebs andreas, Tomov BG, Kjær CS, et al.
      (2014) Real-time GPU implementation of transverse oscillation
      vector velocity flow imaging. In: SPIE medical imaging.Vol. 9040.
      pp. 90401Y–90401Y–6.
      doi:`10.1117/12.2043582 <https://doi.org/10.1117/12.2043582>`__

   .. container::
      :name: ref-Bradway2015

      38. Bradway DP, Hansen KL, Nielsen MB, Jensen JA (2015) Transverse
      oscillation vector flow imaging for transthoracic
      echocardiography. In: SPIE medical imaging. pp. 941902–941902–7.
      doi:`10.1117/12.2081145 <https://doi.org/10.1117/12.2081145>`__

   .. container::
      :name: ref-Bottenus2015

      39. Bottenus N, Long W, Bradway D, Trahey G (2015) Phantom and in
      vivo demonstration of swept synthetic aperture imaging. In: 2015
      ieee international ultrasonics symposium (ius). pp. 1–4.
      doi:`10.1109/ULTSYM.2015.0075 <https://doi.org/10.1109/ULTSYM.2015.0075>`__

   .. container::
      :name: ref-Kakkad2015

      40. Kakkad V, Kuo L, Bradway D, Trahey G, Sivak J, et al. (2015)
      In vivo transthoracic measurements of acoustic radiation force
      induced displacements in the heart over the cardiac cycle. In:
      2015 ieee international ultrasonics symposium (ius). pp. 1–5.
      doi:`10.1109/ULTSYM.2015.0155 <https://doi.org/10.1109/ULTSYM.2015.0155>`__

   .. container::
      :name: ref-Kakkad2017

      41. Kakkad V, Ferlauto H, Bradway D, Heyde B, Kisslo J, et al.
      (2017) Clinical feasibility of a noninvasive method to interrogate
      myocardial function via strain and acoustic radiation
      force-derived stiffness. In: IEEE international ultrasonics
      symposium, ius.
      doi:`10.1109/ULTSYM.2017.8092067 <https://doi.org/10.1109/ULTSYM.2017.8092067>`__

   .. container::
      :name: ref-Hollender2017

      42. Hollender P, Bottenus N, Bradway D, Trahey G (2017) Single
      track location comb-push ultrasound shear elastography (STL-CUSE).
      In: IEEE international ultrasonics symposium, ius.
      doi:`10.1109/ULTSYM.2017.8092809 <https://doi.org/10.1109/ULTSYM.2017.8092809>`__

   .. container::
      :name: ref-Long2017IUS

      43. Long W, Hyun D, Choudhury K, Bradway D, McNally P, et al.
      (2017) Translation of fetal short-lag spatial coherence (slsc)
      imaging into clinical practice: A pilot study. In: 2017 ieee
      international ultrasonics symposium (ius). pp. 1–1.
      doi:`10.1109/ULTSYM.2017.8091968 <https://doi.org/10.1109/ULTSYM.2017.8091968>`__

   .. container::
      :name: ref-Flint2018

      44. Flint K, Bottenus N, Long W, Bradway D, McNally P, et al.
      (2018) Implementation and clinical evaluation of a fetal alara
      ultrasound system. In: 2018 ieee international ultrasonics
      symposium (ius). pp. 1–4.
      doi:`10.1109/ULTSYM.2018.8579734 <https://doi.org/10.1109/ULTSYM.2018.8579734>`__


text:
using System.Runtime.InteropServices;

namespace Vanara.PInvoke
{
	public static partial class Kernel32
	{
		/// <summary>
		/// <para>Checks whether the user has opted in for SQM data collection as part of the Customer Experience Improvement Program (CEIP).</para>
		/// </summary>
		/// <returns>
		/// <para>True if SQM data collection is opted in and the machine can send data. Otherwise, false.</para>
		/// </returns>
		// https://docs.microsoft.com/en-us/windows/desktop/api/windowsceip/nf-windowsceip-ceipisoptedin
		// BOOL CeipIsOptedIn( );
		[DllImport(Lib.Kernel32, SetLastError = false, ExactSpelling = true)]
		[PInvokeData("windowsceip.h", MSDNShortId = "4CDB5B09-B172-4E99-AB46-A08E32346266")]
		[return: MarshalAs(UnmanagedType.Bool)]
		public static extern bool CeipIsOptedIn();
	}
}


text:
package org.zaproxy.zap.network;

import java.io.IOException;
import java.nio.file.Path;
import org.parosproxy.paros.network.HttpMessage;
import org.parosproxy.paros.network.HttpSender;

/** Note: Not part of the public API. */
public interface HttpSenderImpl<T extends HttpSenderContext> {

    boolean isGlobalStateEnabled();

    void addListener(HttpSenderListener listener);

    void removeListener(HttpSenderListener listener);

    T createContext(HttpSender parent, int initiator);

    void sendAndReceive(T ctx, HttpRequestConfig config, HttpMessage msg, Path file)
            throws IOException;
}


text:
package com.google.api.codegen.transformer;

import com.google.api.codegen.ApiConfig;
import com.google.api.codegen.CollectionConfig;
import com.google.api.codegen.InterfaceConfig;
import com.google.api.codegen.MethodConfig;
import com.google.api.tools.framework.model.Interface;
import com.google.api.tools.framework.model.Method;
import com.google.auto.value.AutoValue;

import java.util.Collection;

import javax.annotation.Nullable;

/**
 * The context for transforming a method to a view model object.
 */
@AutoValue
public abstract class MethodTransformerContext {
  public static MethodTransformerContext create(
      Interface interfaze,
      ApiConfig apiConfig,
      ModelTypeTable typeTable,
      SurfaceNamer namer,
      Method method,
      MethodConfig methodConfig) {
    return new AutoValue_MethodTransformerContext(
        interfaze, apiConfig, typeTable, namer, method, methodConfig);
  }

  public abstract Interface getInterface();

  public abstract ApiConfig getApiConfig();

  public abstract ModelTypeTable getTypeTable();

  public abstract SurfaceNamer getNamer();

  public abstract Method getMethod();

  @Nullable
  public abstract MethodConfig getMethodConfig();

  public Interface getTargetInterface() {
    return InterfaceConfig.getTargetInterface(
        getInterface(), getMethodConfig().getRerouteToGrpcInterface());
  }

  public InterfaceConfig getInterfaceConfig() {
    return getApiConfig().getInterfaceConfig(getInterface());
  }

  public Collection<CollectionConfig> getCollectionConfigs() {
    return getInterfaceConfig().getCollectionConfigs();
  }

  public CollectionConfig getCollectionConfig(String entityName) {
    return getInterfaceConfig().getCollectionConfig(entityName);
  }

  public MethodTransformerContext cloneWithEmptyTypeTable() {
    return create(
        getInterface(),
        getApiConfig(),
        getTypeTable().cloneEmpty(),
        getNamer(),
        getMethod(),
        getMethodConfig());
  }
}


text:
介紹各種 git 基本指令

---

## Tutorial
- [Git 教學 | kingofamani](http://kingofamani.gitbooks.io/git-teach/content/)

## Others

- [git cherry-pick 處理專案 pull request](http://blog.wu-boy.com/2011/08/git-cherry-pick-%E8%99%95%E7%90%86%E5%B0%88%E6%A1%88-pull-request/)

- [Github - gitignore 範例](https://github.com/github/gitignore): A collection of useful .gitignore templates. 各種程式語言的建議 .gitignore 檔,實用!以下有幾個比較
 - [android-bootstrap/.gitignore](https://github.com/AndroidBootstrap/android-bootstrap/blob/master/.gitignore): 基本上是下面三個的集合版
 - gitignore
   - [Android.gitignore](https://github.com/github/gitignore/blob/master/Android.gitignore)
   - [Global/JetBrains.gitignore](https://github.com/androchentw/gitignore/blob/master/Global/JetBrains.gitignore): For Android Studio / IntelliJ
   - [Global/OSX.gitignore](https://github.com/androchentw/gitignore/blob/master/Global/OSX.gitignore)


text:
(function (ko) {
	ko.extenders.localStorage = function (target, key) {
		var isArray = ko.isObservable(target) && target.push;

		target.subscribe(function (newValue) {
			localStorage.setItem(key, isArray ? JSON.stringify(newValue) : newValue);
		});

		if (localStorage[key] != undefined) {
			var val = isArray ? JSON.parse(localStorage[key]) : localStorage[key];
			if (val == 'true') val = true;
			if (val == 'false') val = false;
	        	if(Number(val) != NaN) return Number(val);
				target(val);
			}

		return target;
	}
})(ko);


text:
package com.sourceclear.headlines.impl;

import com.sourceclear.headlines.AbstractHeaderLinesInjector;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public final class AcaoInjector extends AbstractHeaderLinesInjector<AcaoConfig> {

    ///////////////////////////// Class Attributes \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    ////////////////////////////// Class Methods \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    //////////////////////////////// Attributes \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    /////////////////////////////// Constructors \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    public AcaoInjector() {
        setConfig(new AcaoConfig());
    }

    ////////////////////////////////// Methods \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    //------------------------ Implements: HttpInjector

    public void inject(HttpServletRequest request, HttpServletResponse response) {
        AcaoConfig config = getConfig();
        if (config.isEnabled() && config.getOrigin() != null) {
            response.setHeader("Access-Control-Allow-Origin", config.getOrigin());
        }
    }

    //------------------------ Overrides:

    //---------------------------- Abstract Methods -----------------------------

    //---------------------------- Utility Methods ------------------------------

    //---------------------------- Property Methods -----------------------------

}


text:
"""Auto-generated file, do not edit by hand. 30 metadata"""
from ..phonemetadata import NumberFormat

PHONE_ALT_FORMAT_30 = [NumberFormat(pattern='(\\d{3})(\\d{3})(\\d{4})', format='\\1 \\2 \\3', leading_digits_pattern=['21'])]


text:
<?php

  require('includes/application_top.php');

// if the customer is not logged on, redirect them to the shopping cart page
  if (!tep_session_is_registered('customer_id')) {
    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
  }

  if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {
    $notify_string = '';

    if (isset($HTTP_POST_VARS['notify']) && !empty($HTTP_POST_VARS['notify'])) {
      $notify = $HTTP_POST_VARS['notify'];

      if (!is_array($notify)) {
        $notify = array($notify);
      }

      for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
        if (is_numeric($notify[$i])) {
          $notify_string .= 'notify[]=' . $notify[$i] . '&';
        }
      }

      if (!empty($notify_string)) {
        $notify_string = 'action=notify&' . substr($notify_string, 0, -1);
      }
    }

    tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
  }

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS);

  $breadcrumb->add(NAVBAR_TITLE_1);
  $breadcrumb->add(NAVBAR_TITLE_2);

  $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "'");
  $global = tep_db_fetch_array($global_query);

  if ($global['global_product_notifications'] != '1') {
    $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");
    $orders = tep_db_fetch_array($orders_query);

    $products_array = array();
    $products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'] . "' order by products_name");
    while ($products = tep_db_fetch_array($products_query)) {
      $products_array[] = array('id' => $products['products_id'],
                                'text' => $products['products_name']);
    }
  }

  require(DIR_WS_INCLUDES . 'template_top.php');
?>

<?php echo HEADING_TITLE; ?>

        <?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?>

<?php echo TEXT_SUCCESS; ?>

        <?php
          if ($global['global_product_notifications'] != '1') {
            echo TEXT_NOTIFY_PRODUCTS . '

';

            $products_displayed = array();
            for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
              if (!in_array($products_array[$i]['id'], $products_displayed)) {
                echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '
';
                $products_displayed[] = $products_array[$i]['id'];
              }
            }

            echo '
';
          }

          echo TEXT_SEE_ORDERS . '

' . TEXT_CONTACT_STORE_OWNER;
        ?>

<?php echo TEXT_THANKS_FOR_SHOPPING; ?>

        <?php
          if (DOWNLOAD_ENABLED == 'true') {
            include(DIR_WS_MODULES . 'downloads.php');
          }
        ?>

          <?php echo tep_draw_button(' '.IMAGE_BUTTON_CONTINUE, '', null, 'primary',null, 'btn btn-default btn-lg'); ?>

      </form>

<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>


text:
namespace ReactiveDomain.Messaging.Bus
{
    public class DynamicHandler:IHandle<IMessage>
    {
        private readonly dynamic _target;

        public DynamicHandler(dynamic target)
        {
            _target = target;
        }

        public void Handle(IMessage message)
        {
            dynamic msg = message;
            _target.Handle(msg);
        }
    }
}


text:
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe SpyFu do
  let(:app_id) { '1234' }
  let(:secret_key) { 'abcd' }

  describe "client" do
    it "should return a client" do
      SpyFu.client(app_id, secret_key).should be_a(SpyFu::Client)
    end
  end

end


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

import java.io.Serializable;

/**
 *

 * DescribeTapesOutput
 *

 */
public class DescribeTapesResult implements Serializable, Cloneable {

    /**
     * An array of virtual tape descriptions.
     */
    private com.amazonaws.internal.ListWithAutoConstructFlag<Tape> tapes;

    /**
     * An opaque string which can be used as part of a subsequent
     * DescribeTapes call to retrieve the next page of results.
If a
     * response does not contain a marker, then there are no more results to
     * be retrieved.
     *

     * Constraints:

     * Length: 1 - 1000

     */
    private String marker;

    /**
     * An array of virtual tape descriptions.
     *
     * @return An array of virtual tape descriptions.
     */
    public java.util.List<Tape> getTapes() {
        if (tapes == null) {
              tapes = new com.amazonaws.internal.ListWithAutoConstructFlag<Tape>();
              tapes.setAutoConstruct(true);
        }
        return tapes;
    }

    /**
     * An array of virtual tape descriptions.
     *
     * @param tapes An array of virtual tape descriptions.
     */
    public void setTapes(java.util.Collection<Tape> tapes) {
        if (tapes == null) {
            this.tapes = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<Tape> tapesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Tape>(tapes.size());
        tapesCopy.addAll(tapes);
        this.tapes = tapesCopy;
    }

    /**
     * An array of virtual tape descriptions.
     *

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setTapes(java.util.Collection)} or {@link
     * #withTapes(java.util.Collection)} if you want to override the existing
     * values.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param tapes An array of virtual tape descriptions.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeTapesResult withTapes(Tape... tapes) {
        if (getTapes() == null) setTapes(new java.util.ArrayList<Tape>(tapes.length));
        for (Tape value : tapes) {
            getTapes().add(value);
        }
        return this;
    }

    /**
     * An array of virtual tape descriptions.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param tapes An array of virtual tape descriptions.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeTapesResult withTapes(java.util.Collection<Tape> tapes) {
        if (tapes == null) {
            this.tapes = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<Tape> tapesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Tape>(tapes.size());
            tapesCopy.addAll(tapes);
            this.tapes = tapesCopy;
        }

        return this;
    }

    /**
     * An opaque string which can be used as part of a subsequent
     * DescribeTapes call to retrieve the next page of results.
If a
     * response does not contain a marker, then there are no more results to
     * be retrieved.
     *

     * Constraints:

     * Length: 1 - 1000

     *
     * @return An opaque string which can be used as part of a subsequent
     *         DescribeTapes call to retrieve the next page of results.
If a
     *         response does not contain a marker, then there are no more results to
     *         be retrieved.
     */
    public String getMarker() {
        return marker;
    }

    /**
     * An opaque string which can be used as part of a subsequent
     * DescribeTapes call to retrieve the next page of results.
If a
     * response does not contain a marker, then there are no more results to
     * be retrieved.
     *

     * Constraints:

     * Length: 1 - 1000

     *
     * @param marker An opaque string which can be used as part of a subsequent
     *         DescribeTapes call to retrieve the next page of results.
If a
     *         response does not contain a marker, then there are no more results to
     *         be retrieved.
     */
    public void setMarker(String marker) {
        this.marker = marker;
    }

    /**
     * An opaque string which can be used as part of a subsequent
     * DescribeTapes call to retrieve the next page of results.
If a
     * response does not contain a marker, then there are no more results to
     * be retrieved.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *

     * Constraints:

     * Length: 1 - 1000

     *
     * @param marker An opaque string which can be used as part of a subsequent
     *         DescribeTapes call to retrieve the next page of results.
If a
     *         response does not contain a marker, then there are no more results to
     *         be retrieved.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public DescribeTapesResult withMarker(String marker) {
        this.marker = marker;
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getTapes() != null) sb.append("Tapes: " + getTapes() + ",");
        if (getMarker() != null) sb.append("Marker: " + getMarker() );
        sb.append("}");
        return sb.toString();
    }

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

        hashCode = prime * hashCode + ((getTapes() == null) ? 0 : getTapes().hashCode());
        hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode());
        return hashCode;
    }

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

        if (obj instanceof DescribeTapesResult == false) return false;
        DescribeTapesResult other = (DescribeTapesResult)obj;

        if (other.getTapes() == null ^ this.getTapes() == null) return false;
        if (other.getTapes() != null && other.getTapes().equals(this.getTapes()) == false) return false;
        if (other.getMarker() == null ^ this.getMarker() == null) return false;
        if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false;
        return true;
    }

    @Override
    public DescribeTapesResult clone() {
        try {
            return (DescribeTapesResult) super.clone();

        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }

    }

}


text:
**through live coding, tutorials, testing, debugging and version transpiling**
##### A VERY DETAILED INTRODUCTION.

##### NB: this is a work in progress, so any contributions are very much welcome.

**This contributions might include:**
- [x] - bug fixes
- [x] - correcting any false statements in docs.
- [x] - new and helpful topics in es6
- [x] - code samples that can serve as teaching tools.

*all codes should be tested and debugged. if you create a new directory, don't worry about updating package.json*

## FEATURES

**`DOCS`**

this folder contains tutorials on almost all the new concepts in es6. the tutorials are structured in a specific files with the name of the topic as the filename.

**`ES5`**

this folder will contain all the codes that are transpiled or compiled from es6 to es5.

**`ES6`**

this directory contains or will contain code samples that are not for tutorial purposes but are written in es6. do not expect the files over here to have detail documentations on implementations.

**`.babelrc.json`**

the babel configuration file.

**`.eslintrc.json`**

the eslint configuration file

**`package.json`**

basic configuration.

#### NB: tutorials in the docs are excerpted from great contents on the internet, especially from MDN.

## TOOLING

**`babel`**

babel is used for transpiling codes from es6 to es5. babel is used for evaluating scripts.
Runs to check if your script contains any errors. Don't worry about configurations, they are already setup

**`eslint`**

for debugging and testing your codes, I used eslint to check the codes for any errors that might occur in your code.
run the command to to use the feature. Dont worry about setup. already done.
Anyone familiar with eslint can go into the eslint file and add more configurations and modify the file.

## REQUIREMENTS

- [x] commandline
- [x] node
- [x] npm
- [x] clone this repo and cd into it.
- [x] run npm install

## USAGE or COMMANDS.

#### BUILDS

**`npm run build:docs`**

this command compiles all the files in the docs and places them in the es5 directory.

**`npm run build:es6`**

compiles all the files in the es6 folder into the es5 folder.

**`npm run build `** + filepath

the arguments takes a particular file you want to compile.

eg. **`npm run build docs/class.js`** // builds the class file from the docs folder into es5 folder.

**`npm run build:watch`** + directory

this a command takes the directory you want to build the files from and as long as you modify any file in that
directory, it gets transpiled into the es5 folder.
eg: **`npm run build:watch es6`** // transpiles changed files in the es6 directory into the es5 directory.

#### TESTS.

**`npm test`** + filepath

this tests the functionality of the file that is passed to it. if it works as expected. by logging outputs to stdin
eg. **`npm test docs/object.js`** // runs the object.js file in the docs folder.

**`npm run test:watch`** + directory

This command watches the directory and the run any file that has being modified in that particular directory.
It uses the node environment to run files.
eg. **`npm run test:watch es6`** runs any files modified in es6

#### LINTS

**`npm run lint:docs`**

this command uses eslint to check all the files in the docs directory for errors.

**`npm run lint:es6`**

checks all the files in the es6 directory for errors.

**`npm run lint`** + filepath

the argument over here is the name of the you want to lint.

eg: **`npm run lint docs/template.js`**

**`npm run lint:watch-docs`**

this command watches the docs directory and then lints any files that have being changed.

**`npm run lint:watch-es6`**

when you want to test the code for functionality purposes. for instance in case you want to run the code to see if it works as planned by logging to the console or whatever action it is. this command is your new friend.

**`npm run lint:watch`** + directory

It takes the directory where the file resides. generally any file at all you changed in that directory gets linted.
specify that directory to lint all changed files.
eg: npm run lint:watch tests/   // watches the files in the tests directory and lints anyone that is changed.

## Need help?
Feel free to [create an issue](http://github.com/DannyMcwaves/learn-es6/issues), [tweet me](http://twitter.com/DannyMcwaves), or [send me an email](mailto:dannymcwaves96@gmail.com). I'd be glad to help where I can! Can you make this repo better. Please CONTRIBUTE to it.

:smile::smile::smile::smiley::+1::+1::+1::ok_hand::metal::hand::raised_hands::muscle::clap::wave:


text:
angular.module('LEDWAXW3.characters.filter', []).filter('characters', [ function() {
	return function(input, chars, breakOnWord) {

		if (isNaN(chars)) return input;
		if (chars <= 0) return '';
		if (input && input.length > chars) {
			input = input.substring(0, chars);

			if (!breakOnWord) {
				var lastspace = input.lastIndexOf(' ');
				//get last space
				if (lastspace !== -1) {
					input = input.substr(0, lastspace);
				}
			} else {
				while (input.charAt(input.length - 1) === ' ') {
					input = input.substr(0, input.length - 1);
				}
			}
			return input + '...';
		}
		return input;
	};
} ]);


text:
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
using osu.Game.Tournament.Screens.Editors;
using osuTK;
using osuTK.Graphics;
using osuTK.Input;

namespace osu.Game.Tournament.Screens.Ladder.Components
{
    public class DrawableMatchTeam : DrawableTournamentTeam, IHasContextMenu
    {
        private readonly TournamentMatch match;
        private readonly bool losers;
        private TournamentSpriteText scoreText;
        private Box background;
        private Box backgroundRight;

        private readonly Bindable<int?> score = new Bindable<int?>();
        private readonly BindableBool completed = new BindableBool();

        private Color4 colourWinner;

        private readonly Func<bool> isWinner;
        private LadderEditorScreen ladderEditor;

        [Resolved(canBeNull: true)]
        private LadderInfo ladderInfo { get; set; }

        private void setCurrent()
        {
            if (ladderInfo == null) return;

            //todo: tournamentgamebase?
            if (ladderInfo.CurrentMatch.Value != null)
                ladderInfo.CurrentMatch.Value.Current.Value = false;

            ladderInfo.CurrentMatch.Value = match;
            ladderInfo.CurrentMatch.Value.Current.Value = true;
        }

        [Resolved(CanBeNull = true)]
        private LadderEditorInfo editorInfo { get; set; }

        public DrawableMatchTeam(TournamentTeam team, TournamentMatch match, bool losers)
            : base(team)
        {
            this.match = match;
            this.losers = losers;
            Size = new Vector2(150, 40);

            Flag.Scale = new Vector2(0.9f);
            Flag.Anchor = Flag.Origin = Anchor.CentreLeft;

            AcronymText.Anchor = AcronymText.Origin = Anchor.CentreLeft;
            AcronymText.Padding = new MarginPadding { Left = 50 };
            AcronymText.Font = OsuFont.Torus.With(size: 22, weight: FontWeight.Bold);

            if (match != null)
            {
                isWinner = () => match.Winner == Team;

                completed.BindTo(match.Completed);
                if (team != null)
                    score.BindTo(team == match.Team1.Value ? match.Team1Score : match.Team2Score);
            }
        }

        [BackgroundDependencyLoader(true)]
        private void load(OsuColour colours, LadderEditorScreen ladderEditor)
        {
            this.ladderEditor = ladderEditor;

            colourWinner = losers
                ? Color4Extensions.FromHex("#8E7F48")
                : Color4Extensions.FromHex("#1462AA");

            InternalChildren = new Drawable[]
            {
                background = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                },
                new Container
                {
                    Padding = new MarginPadding(5),
                    RelativeSizeAxes = Axes.Both,
                    Children = new Drawable[]
                    {
                        AcronymText,
                        Flag,
                    }
                },
                new Container
                {
                    Masking = true,
                    Width = 0.3f,
                    Anchor = Anchor.CentreRight,
                    Origin = Anchor.CentreRight,
                    RelativeSizeAxes = Axes.Both,
                    Children = new Drawable[]
                    {
                        backgroundRight = new Box
                        {
                            Colour = OsuColour.Gray(0.1f),
                            Alpha = 0.8f,
                            RelativeSizeAxes = Axes.Both,
                        },
                        scoreText = new TournamentSpriteText
                        {
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                            Font = OsuFont.Torus.With(size: 22),
                        }
                    }
                }
            };

            completed.BindValueChanged(_ => updateWinStyle());

            score.BindValueChanged(val =>
            {
                scoreText.Text = val.NewValue?.ToString() ?? string.Empty;
                updateWinStyle();
            }, true);
        }

        protected override bool OnClick(ClickEvent e)
        {
            if (Team == null || editorInfo != null) return false;

            if (!match.Current.Value)
            {
                setCurrent();
                return true;
            }

            if (e.Button == MouseButton.Left)
            {
                if (score.Value == null)
                {
                    match.StartMatch();
                }
                else if (!match.Completed.Value)
                    score.Value++;
            }
            else
            {
                if (match.Progression.Value?.Completed.Value == true)
                    // don't allow changing scores if the match has a progression. can cause large data loss
                    return false;

                if (match.Completed.Value && match.Winner != Team)
                    // don't allow changing scores from the non-winner
                    return false;

                if (score.Value > 0)
                    score.Value--;
                else
                    match.CancelMatchStart();
            }

            return false;
        }

        private void updateWinStyle()
        {
            bool winner = completed.Value && isWinner?.Invoke() == true;

            background.FadeColour(winner ? Color4.White : Color4Extensions.FromHex("#444"), winner ? 500 : 0, Easing.OutQuint);
            backgroundRight.FadeColour(winner ? colourWinner : Color4Extensions.FromHex("#333"), winner ? 500 : 0, Easing.OutQuint);

            AcronymText.Colour = winner ? Color4.Black : Color4.White;

            scoreText.Font = scoreText.Font.With(weight: winner ? FontWeight.Bold : FontWeight.Regular);
        }

        public MenuItem[] ContextMenuItems
        {
            get
            {
                if (editorInfo == null)
                    return Array.Empty<MenuItem>();

                return new MenuItem[]
                {
                    new OsuMenuItem("Set as current", MenuItemType.Standard, setCurrent),
                    new OsuMenuItem("Join with", MenuItemType.Standard, () => ladderEditor.BeginJoin(match, false)),
                    new OsuMenuItem("Join with (loser)", MenuItemType.Standard, () => ladderEditor.BeginJoin(match, true)),
                    new OsuMenuItem("Remove", MenuItemType.Destructive, () => ladderEditor.Remove(match)),
                };
            }
        }
    }
}


text:
package io.digdag.standards.command;

import com.fasterxml.jackson.databind.node.ObjectNode;
import io.digdag.spi.CommandStatus;

public class KubernetesCommandStatus
        implements CommandStatus
{
    static KubernetesCommandStatus of(final boolean isFinished,
            final ObjectNode json)
    {
        return new KubernetesCommandStatus(isFinished, json);
    }

    private final boolean isFinished;
    private final ObjectNode json;

    KubernetesCommandStatus(final boolean isFinished,
            final ObjectNode json)
    {
        this.isFinished = isFinished;
        this.json = json;
    }

    @Override
    public boolean isFinished()
    {
        return isFinished;
    }

    @Override
    public int getStatusCode()
    {
        return json.get("status_code").intValue();
    }

    @Override
    public String getIoDirectory()
    {
        return json.get("io_directory").textValue();
    }

    @Override
    public ObjectNode toJson()
    {
        return json;
    }
}


text:
An implementation of [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life "Wikipedia") in Rust.

## Instalation
Clone the repository and cd into it:
```
$ git clone https://github.com/burniintree/conway-s-game-of-life
$ cd conway-s-game-of-life
```
### Build it with Cargo:
```
$ cargo build --release
```
You can find it under `target/release/gol`
### or run it:
```
$ cargo run --release
```
### or install it:
```
$ cargo install
```

## Usage
```
$ gol
```
You can close it with Escape,
pause with Space,
kill everithing with c,
and let everithing live with f.
When the game is paused, you can click on cells to toggle their current status.