text:
require 'yt/models/resource'

module Yt
  module Models
    # A channel resource contains information about a YouTube channel.
    # @see https://developers.google.com/youtube/v3/docs/channels
    class Channel < Resource
      # @!attribute [r] subscriptions
      #   @return [Yt::Collections::Subscriptions] the channel's subscriptions.
      has_many :subscriptions

      # @!attribute [r] videos
      #   @return [Yt::Collections::Videos] the channel's videos.
      has_many :videos

      # @!attribute [r] playlists
      #   @return [Yt::Collections::Playlists] the channel's playlists.
      has_many :playlists

      # @macro has_report
      has_report :earnings

      # @macro has_report
      has_report :views

      # @macro has_report
      has_report :comments

      # @macro has_report
      has_report :likes

      # @macro has_report
      has_report :dislikes

      # @macro has_report
      has_report :shares

      # @macro has_report
      has_report :impressions

      # @macro has_viewer_percentages
      has_viewer_percentages

      # @!attribute [r] statistics_set
      #   @return [Yt::Models::StatisticsSet] the statistics for the video.
      has_one :statistics_set
      delegate :view_count, :comment_count, :video_count, :subscriber_count,
        :subscriber_count_visible?, to: :statistics_set

      # Returns whether the authenticated account is subscribed to the channel.
      #
      # This method requires {Resource#auth auth} to return an
      # authenticated instance of {Yt::Account}.
      # @return [Boolean] whether the account is subscribed to the channel.
      # @raise [Yt::Errors::Unauthorized] if {Resource#auth auth} does not
      #   return an authenticated account.
      def subscribed?
        subscriptions.any?{|s| s.exists?}
      end

      # Subscribes the authenticated account to the channel.
      # Does not raise an error if the account was already subscribed.
      #
      # This method requires {Resource#auth auth} to return an
      # authenticated instance of {Yt::Account}.
      # @raise [Yt::Errors::Unauthorized] if {Resource#auth auth} does not
      #   return an authenticated account.
      def subscribe
        subscriptions.insert ignore_errors: true
      end

      # Subscribes the authenticated account to the channel.
      # Raises an error if the account was already subscribed.
      #
      # This method requires {Resource#auth auth} to return an
      # authenticated instance of {Yt::Account}.
      # @raise [Yt::Errors::RequestError] if {Resource#auth auth} was already
      #   subscribed to the channel.
      # @raise [Yt::Errors::Unauthorized] if {Resource#auth auth} does not
      #   return an authenticated account.
      def subscribe!
        subscriptions.insert
      end

      # Unsubscribes the authenticated account from the channel.
      # Does not raise an error if the account was not subscribed.
      #
      # This method requires {Resource#auth auth} to return an
      # authenticated instance of {Yt::Account}.
      # @raise [Yt::Errors::Unauthorized] if {Resource#auth auth} does not
      #   return an authenticated account.
      def unsubscribe
        subscriptions.delete_all({}, ignore_errors: true)
      end

      # Unsubscribes the authenticated account from the channel.
      # Raises an error if the account was not subscribed.
      #
      # This method requires {Resource#auth auth} to return an
      # authenticated instance of {Yt::Account}.
      # @raise [Yt::Errors::RequestError] if {Resource#auth auth} was not
      #   subscribed to the channel.
      # @raise [Yt::Errors::Unauthorized] if {Resource#auth auth} does not
      #   return an authenticated account.
      def unsubscribe!
        subscriptions.delete_all
      end

      def create_playlist(params = {})
        playlists.insert params
      end

      def delete_playlists(attrs = {})
        playlists.delete_all attrs
      end

      # @private
      # Tells `has_many :videos` that channel.videos should return all the
      # videos publicly available on the channel.
      def videos_params
        {channelId: id}
      end

      # @private
      # Tells `has_reports` to retrieve the reports from YouTube Analytics API
      # either as a Channel or as a Content Owner.
      # @see https://developers.google.com/youtube/analytics/v1/reports
      def reports_params
        {}.tap do |params|
          if auth.owner_name
            params['ids'] = "contentOwner==#{auth.owner_name}"
            params['filters'] = "channel==#{id}"
          else
            params['ids'] = "channel==#{id}"
          end
        end
      end
    end
  end
end


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

# instance fields
.field private mNativeLargeBitmap:J

.field private mRecycled:Z

# direct methods
.method private constructor <init>(J)V
    .locals 1

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

    iput-wide p1, p0, Landroid/graphics/LargeBitmap;->mNativeLargeBitmap:J

    const/4 v0, 0x0

    iput-boolean v0, p0, Landroid/graphics/LargeBitmap;->mRecycled:Z

    return-void
.end method

.method private checkRecycled(Ljava/lang/String;)V
    .locals 1

    iget-boolean v0, p0, Landroid/graphics/LargeBitmap;->mRecycled:Z

    if-eqz v0, :cond_0

    new-instance v0, Ljava/lang/IllegalStateException;

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

    throw v0

    :cond_0
    return-void
.end method

.method private static native nativeClean(J)V
.end method

.method private static native nativeDecodeRegion(JIIIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
.end method

.method private static native nativeGetHeight(J)I
.end method

.method private static native nativeGetWidth(J)I
.end method

# virtual methods
.method public decodeRegion(Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    .locals 7

    const-string/jumbo v0, "decodeRegion called on recycled large bitmap"

    invoke-direct {p0, v0}, Landroid/graphics/LargeBitmap;->checkRecycled(Ljava/lang/String;)V

    iget v0, p1, Landroid/graphics/Rect;->left:I

    if-ltz v0, :cond_0

    iget v0, p1, Landroid/graphics/Rect;->top:I

    if-gez v0, :cond_1

    :cond_0
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string/jumbo v1, "rectangle is not inside the image"

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

    throw v0

    :cond_1
    iget v0, p1, Landroid/graphics/Rect;->right:I

    invoke-virtual {p0}, Landroid/graphics/LargeBitmap;->getWidth()I

    move-result v1

    if-gt v0, v1, :cond_0

    iget v0, p1, Landroid/graphics/Rect;->bottom:I

    invoke-virtual {p0}, Landroid/graphics/LargeBitmap;->getHeight()I

    move-result v1

    if-gt v0, v1, :cond_0

    iget-wide v0, p0, Landroid/graphics/LargeBitmap;->mNativeLargeBitmap:J

    iget v2, p1, Landroid/graphics/Rect;->left:I

    iget v3, p1, Landroid/graphics/Rect;->top:I

    iget v4, p1, Landroid/graphics/Rect;->right:I

    iget v5, p1, Landroid/graphics/Rect;->left:I

    sub-int/2addr v4, v5

    iget v5, p1, Landroid/graphics/Rect;->bottom:I

    iget v6, p1, Landroid/graphics/Rect;->top:I

    sub-int/2addr v5, v6

    move-object v6, p2

    invoke-static/range {v0 .. v6}, Landroid/graphics/LargeBitmap;->nativeDecodeRegion(JIIIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    move-result-object v0

    return-object v0
.end method

.method protected finalize()V
    .locals 0

    invoke-virtual {p0}, Landroid/graphics/LargeBitmap;->recycle()V

    return-void
.end method

.method public getHeight()I
    .locals 2

    const-string/jumbo v0, "getHeight called on recycled large bitmap"

    invoke-direct {p0, v0}, Landroid/graphics/LargeBitmap;->checkRecycled(Ljava/lang/String;)V

    iget-wide v0, p0, Landroid/graphics/LargeBitmap;->mNativeLargeBitmap:J

    invoke-static {v0, v1}, Landroid/graphics/LargeBitmap;->nativeGetHeight(J)I

    move-result v0

    return v0
.end method

.method public getWidth()I
    .locals 2

    const-string/jumbo v0, "getWidth called on recycled large bitmap"

    invoke-direct {p0, v0}, Landroid/graphics/LargeBitmap;->checkRecycled(Ljava/lang/String;)V

    iget-wide v0, p0, Landroid/graphics/LargeBitmap;->mNativeLargeBitmap:J

    invoke-static {v0, v1}, Landroid/graphics/LargeBitmap;->nativeGetWidth(J)I

    move-result v0

    return v0
.end method

.method public final isRecycled()Z
    .locals 1

    iget-boolean v0, p0, Landroid/graphics/LargeBitmap;->mRecycled:Z

    return v0
.end method

.method public recycle()V
    .locals 2

    iget-boolean v0, p0, Landroid/graphics/LargeBitmap;->mRecycled:Z

    if-nez v0, :cond_0

    iget-wide v0, p0, Landroid/graphics/LargeBitmap;->mNativeLargeBitmap:J

    invoke-static {v0, v1}, Landroid/graphics/LargeBitmap;->nativeClean(J)V

    const/4 v0, 0x1

    iput-boolean v0, p0, Landroid/graphics/LargeBitmap;->mRecycled:Z

    :cond_0
    return-void
.end method

redpajama_set_name: RedPajamaGithub


text:
class QueryRecord < ApplicationRecord
  attr_accessor :query

  def query # rubocop:disable Lint/DuplicateMethods
    ::Query.deserialize(description)
  end

  # Only keep unused states around for an hour, and used states for a day.
  # This goes through the whole lot and destroys old ones.
  def self.cleanup
    return unless !defined?(@@last_cleanup) ||
                  (@@last_cleanup < 5.minutes.ago) ||
                  ::Rails.env.test?

    connection.delete %(
      DELETE FROM #{table_name}
      WHERE
        access_count = 0 AND updated_at < DATE_SUB(NOW(), INTERVAL 6 HOUR) OR
        access_count > 0 AND updated_at < DATE_SUB(NOW(), INTERVAL 1 DAY)
    )
    @@last_cleanup = Time.zone.now
  end
end


text:
"""
Created on Mon Jul 10 13:45:40 2017

@author: Thomas Barillot

Setup file for standalone python acq program

"""
from distutils.core import setup
import py2exe

setup(console=['TOFAcqDigitizerGUI_withStream.py'])


text:
{% if include.name == 'sign-up' %}

<form method="post">

      First name
      <input type="text" class="input" placeholder="First name" id="input-11">

      Last name
      <input type="text" class="input" placeholder="Last name" id="input-12">

  Email
  <input type="email" class="input" placeholder="Email" id="input-13" required>
  Password
  <input type="password" class="input" placeholder="Password" id="input-14">

  Birthday

<select class="input"><option>Day</option></select>

<select class="input"><option>Month</option></select>

<select class="input"><option>Year</option></select>

  <input type="radio" name="gender"> Female
  <input type="radio" name="gender"> Male

  <input type="checkbox"> I agree to the terms and conditions

  <button type="submit" class="primary button">Sign up</button>
</form>

{% elsif include.name == 'sign-in-horizontal' %}

<form>

Email

<input type="email" class="input" placeholder="Email" id="input-21">

Password

<input type="password" class="input" placeholder="Password" id="input-22">

<input type="checkbox"> Remember me

<input class="primary button" type="submit" value="Sign in">

</form>

{% elsif include.name == 'sizing' %}

<input type="text" class="input size-large" placeholder="large input">
<textarea class="input size-large" placeholder="large textarea"></textarea>
<select class="input size-large"><option>large select</option></select>
<input type="text" class="input size-small" placeholder="small input">
<textarea class="input size-small" placeholder="small textarea"></textarea>
<select class="input size-small"><option>small select</option></select>

{% elsif include.name == 'attributes' %}

<input {{ include.attribute }} type="text" class="input" placeholder="{{ include.attribute }} input">
<textarea {{ include.attribute }} class="input" placeholder="{{ include.attribute }} textarea"></textarea>
{% if include.attribute != 'readonly' %}<select {{ include.attribute }} class="input"><option value="">{{ include.attribute }} select</option></select>{% endif %}

{% elsif include.name == 'fieldset' %}

<fieldset>
  <input type="text" class="input" placeholder="input">
  <textarea class="input" placeholder="textarea"></textarea>
  <select class="input"><option>select</option></select>
</fieldset>
<fieldset disabled>
  <input type="text" class="input" placeholder="disabled input">
  <textarea class="input" placeholder="disabled textarea"></textarea>
  <select class="input"><option>disabled select</option></select>
</fieldset>

{% endif %}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Statistics of AUX in UD_Gothic</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

Treebank Statistics: UD_Gothic: POS Tags: AUX

There are 2 AUX lemmas (0%), 3 AUX types (0%) and 102 AUX tokens (0%).
Out of 14 observed tags, the rank of AUX is: 14 in number of lemmas, 14 in number of types and 13 in number of tokens.

The 10 most frequent AUX lemmas: sik, silba

The 10 most frequent AUX types:  sik, sis, silbin

The 10 most frequent ambiguous lemmas: sik (<tt>PRON</tt> 143, <tt>AUX</tt> 101), silba (<tt>ADJ</tt> 99, <tt>PRON</tt> 74, <tt>AUX</tt> 1)

The 10 most frequent ambiguous types:  sik (<tt>AUX</tt> 90, <tt>PRON</tt> 52), sis (<tt>PRON</tt> 90, <tt>AUX</tt> 11), silbin (<tt>PRON</tt> 26, <tt>ADJ</tt> 4, <tt>AUX</tt> 1)

sik

<tt>AUX</tt> 90: gawandjands sik in managein qaþ

<tt>PRON</tt> 52: saƕazuh izei þiudan sik silban taujiþ andstandiþ kaisara

sis

<tt>PRON</tt> 90: jah warþ afslauþnan ana allans jah rodidedun du sis misso qiþandans

<tt>AUX</tt> 11: biþe gahausida Peilatus þata waurd mais ohta sis

silbin

<tt>PRON</tt> 26: jah sunsaiw Iesus ufkunþa in sis silbin þo us sis maht usgaggandein

<tt>ADJ</tt> 4: atsaiƕ du þus silbin jah du laiseinai usdaudo

<tt>AUX</tt> 1: sa auk ist gawairþi unsar saei gatawida þo ba du samin jah midgardiwaddju faþos gatairands fijaþwa ana leika seinamma witoþ anabusne garaideinim gatairands ei þans twans gaskopi in sis silbin du ainamma niujamma mann waurkjands gawairþi jah gafriþodedi þans bans in ainamma leika guda þairh galgan afslahands fijaþwa in sis silbin

Morphology

The form / lemma ratio of AUX is 1.500000 (the average of all parts of speech is 2.625147).

The 1st highest number of forms (2) was observed with the lemma "sik": sik, sis.

The 2nd highest number of forms (1) was observed with the lemma "silba": silbin.

AUX occurs with 4 features: <tt>Case</tt> (102; 100% instances), <tt>Number</tt> (102; 100% instances), <tt>Person</tt> (102; 100% instances), <tt>Gender</tt> (98; 96% instances)

AUX occurs with 10 feature-value pairs: Case=Acc, Case=Dat, Gender=Fem, Gender=Fem,Masc, Gender=Masc, Gender=Masc,Neut, Gender=Neut, Number=Plur, Number=Sing, Person=3

AUX occurs with 13 feature combinations.
The most frequent feature combination is Case=Acc|Gender=Masc|Number=Sing|Person=3 (46 tokens).
Examples: sik

Relations

AUX nodes are attached to their parents using 1 different relations: <tt>aux</tt> (102; 100% instances)

Parents of AUX nodes belong to 2 different parts of speech: <tt>VERB</tt> (101; 99% instances), <tt>PRON</tt> (1; 1% instances)

102 (100%) AUX nodes are leaves.

The highest child degree of a AUX node is 0.

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.


text:
"""Maximum loss reduction with Maximal Confidence (MMC)
"""
import copy

import numpy as np
from sklearn.svm import SVC

from libact.base.dataset import Dataset
from libact.base.interfaces import QueryStrategy, ContinuousModel
from libact.utils import inherit_docstring_from, seed_random_state, zip
from libact.models import LogisticRegression, SklearnProbaAdapter
from libact.models.multilabel import BinaryRelevance, DummyClf

class MaximumLossReductionMaximalConfidence(QueryStrategy):
    r"""Maximum loss reduction with Maximal Confidence (MMC)

    This algorithm is designed to use binary relavance with SVM as base model.

    Parameters
    ----------
    base_learner : :py:mod:`libact.query_strategies` object instance
        The base learner for binary relavance, should support predict_proba

    br_base : ProbabilisticModel object instance
        The base learner for the binary relevance in MMC.
        Should support predict_proba.

    logreg_param : dict, optional (default={})
        Setting the parameter for the logistic regression that are used to
        predict the number of labels for a given feature vector. Parameter
        detail please refer to:
        http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html

    random_state : {int, np.random.RandomState instance, None}, optional (default=None)
        If int or None, random_state is passed as parameter to generate
        np.random.RandomState instance. if np.random.RandomState instance,
        random_state is the random number generate.

    Attributes
    ----------
    logistic_regression\_ : :py:mod:`libact.models.LogisticRegression` object instance
        The model used to predict the number of label in each instance.
        Should support multi-class classification.

    Examples
    --------
    Here is an example of declaring a MMC query_strategy object:

    .. code-block:: python

       from libact.query_strategies.multilabel import MMC
       from sklearn.linear_model import LogisticRegression

       qs = MMC(
                dataset, # Dataset object
                br_base=LogisticRegression()
            )

    References
    ----------
    .. [1] Yang, Bishan, et al. "Effective multi-label active learning for text
		   classification." Proceedings of the 15th ACM SIGKDD international
		   conference on Knowledge discovery and data mining. ACM, 2009.
    """

    def __init__(self, *args, **kwargs):
        super(MaximumLossReductionMaximalConfidence, self).__init__(*args, **kwargs)

        # self.n_labels = len(self.dataset.get_labeled_entries()[0][1])
        self.n_labels = len(self.dataset.get_labeled_entries()[1][0])

        random_state = kwargs.pop('random_state', None)
        self.random_state_ = seed_random_state(random_state)

        self.logreg_param = kwargs.pop('logreg_param',
                                       {'multi_class': 'multinomial',
                                        'solver': 'newton-cg',
                                        'random_state': random_state})
        self.logistic_regression_ = LogisticRegression(**self.logreg_param)

        self.br_base = kwargs.pop('br_base',
              SklearnProbaAdapter(SVC(kernel='linear',
                                      probability=True,
                                      gamma="auto",
                                      random_state=random_state)))

    @inherit_docstring_from(QueryStrategy)
    def make_query(self):
        dataset = self.dataset
        labeled_pool, Y = dataset.get_labeled_entries()
        unlabeled_entry_ids, X_pool = dataset.get_unlabeled_entries()
        labeled_pool = np.array(labeled_pool)
        Y = np.array(Y)
        X_pool = np.array(X_pool)

        br = BinaryRelevance(self.br_base)
        br.train(Dataset(labeled_pool, Y))

        trnf = br.predict_proba(labeled_pool)
        poolf = br.predict_proba(X_pool)
        f = poolf * 2 - 1

        trnf = np.sort(trnf, axis=1)[:, ::-1]
        trnf /= np.tile(trnf.sum(axis=1).reshape(-1, 1), (1, trnf.shape[1]))
        if len(np.unique(Y.sum(axis=1))) == 1:
            lr = DummyClf()
        else:
            lr = self.logistic_regression_
        lr.train(Dataset(trnf, Y.sum(axis=1)))

        idx_poolf = np.argsort(poolf, axis=1)[:, ::-1]
        poolf = np.sort(poolf, axis=1)[:, ::-1]
        poolf /= np.tile(poolf.sum(axis=1).reshape(-1, 1), (1, poolf.shape[1]))
        pred_num_lbl = lr.predict(poolf).astype(int)

        yhat = -1 * np.ones((len(X_pool), self.n_labels), dtype=int)
        for i, p in enumerate(pred_num_lbl):
            yhat[i, idx_poolf[i, :p]] = 1

        score = ((1 - yhat * f) / 2).sum(axis=1)
        ask_id = self.random_state_.choice(np.where(score == np.max(score))[0])
        return unlabeled_entry_ids[ask_id]


text:
'use strict';

angular.module('jwtApp')
    .controller('LocationCtrl', function ($scope) {});


text:
task
=====
 "If you have $200 in your pocket, and you see a shelf with a long row of foobars priced at $1, $1.2, $1.44, $1.728 and so forth. Every foobar costs 20% more than the previous one. You buy one of each foobar, starting with the one that costs $1, until you can't afford the next foobar on the shelf (the foobars are ordered by price). How many foobars can you buy, and how much change will you get?"
run
====
php FooBarCalculator.php
You managed to buy 20 items
You are left with $13.312000377626
Done!

Hope it helps someone.


text:
package io.netty.channel;

import io.netty.buffer.ByteBufAllocator;
import io.netty.util.Attribute;
import io.netty.util.AttributeKey;
import io.netty.util.concurrent.EventExecutor;
import io.netty.util.internal.ThrowableUtil;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;

import java.net.SocketAddress;

/**
 *  Combines a {@link ChannelInboundHandler} and a {@link ChannelOutboundHandler} into one {@link ChannelHandler}.
 */
public class CombinedChannelDuplexHandler<I extends ChannelInboundHandler, O extends ChannelOutboundHandler>
        extends ChannelDuplexHandler {

    private static final InternalLogger logger = InternalLoggerFactory.getInstance(CombinedChannelDuplexHandler.class);

    private DelegatingChannelHandlerContext inboundCtx;
    private DelegatingChannelHandlerContext outboundCtx;
    private volatile boolean handlerAdded;

    private I inboundHandler;
    private O outboundHandler;

    /**
     * Creates a new uninitialized instance. A class that extends this handler must invoke
     * {@link #init(ChannelInboundHandler, ChannelOutboundHandler)} before adding this handler into a
     * {@link ChannelPipeline}.
     */
    protected CombinedChannelDuplexHandler() {
        ensureNotSharable();
    }

    /**
     * Creates a new instance that combines the specified two handlers into one.
     */
    public CombinedChannelDuplexHandler(I inboundHandler, O outboundHandler) {
        ensureNotSharable();
        init(inboundHandler, outboundHandler);
    }

    /**
     * Initialized this handler with the specified handlers.
     *
     * @throws IllegalStateException if this handler was not constructed via the default constructor or
     *                               if this handler does not implement all required handler interfaces
     * @throws IllegalArgumentException if the specified handlers cannot be combined into one due to a conflict
     *                                  in the type hierarchy
     */
    protected final void init(I inboundHandler, O outboundHandler) {
        validate(inboundHandler, outboundHandler);
        this.inboundHandler = inboundHandler;
        this.outboundHandler = outboundHandler;
    }

    private void validate(I inboundHandler, O outboundHandler) {
        if (this.inboundHandler != null) {
            throw new IllegalStateException(
                    "init() can not be invoked if " + CombinedChannelDuplexHandler.class.getSimpleName() +
                            " was constructed with non-default constructor.");
        }

        if (inboundHandler == null) {
            throw new NullPointerException("inboundHandler");
        }
        if (outboundHandler == null) {
            throw new NullPointerException("outboundHandler");
        }
        if (inboundHandler instanceof ChannelOutboundHandler) {
            throw new IllegalArgumentException(
                    "inboundHandler must not implement " +
                    ChannelOutboundHandler.class.getSimpleName() + " to get combined.");
        }
        if (outboundHandler instanceof ChannelInboundHandler) {
            throw new IllegalArgumentException(
                    "outboundHandler must not implement " +
                    ChannelInboundHandler.class.getSimpleName() + " to get combined.");
        }
    }

    protected final I inboundHandler() {
        return inboundHandler;
    }

    protected final O outboundHandler() {
        return outboundHandler;
    }

    private void checkAdded() {
        if (!handlerAdded) {
            throw new IllegalStateException("handler not added to pipeline yet");
        }
    }

    /**
     * Removes the {@link ChannelInboundHandler} that was combined in this {@link CombinedChannelDuplexHandler}.
     */
    public final void removeInboundHandler() {
        checkAdded();
        inboundCtx.remove();
    }

    /**
     * Removes the {@link ChannelOutboundHandler} that was combined in this {@link CombinedChannelDuplexHandler}.
     */
    public final void removeOutboundHandler() {
        checkAdded();
        outboundCtx.remove();
    }

    @Override
    public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
        if (inboundHandler == null) {
            throw new IllegalStateException(
                    "init() must be invoked before being added to a " + ChannelPipeline.class.getSimpleName() +
                            " if " +  CombinedChannelDuplexHandler.class.getSimpleName() +
                            " was constructed with the default constructor.");
        }

        outboundCtx = new DelegatingChannelHandlerContext(ctx, outboundHandler);
        inboundCtx = new DelegatingChannelHandlerContext(ctx, inboundHandler) {
            @SuppressWarnings("deprecation")
            @Override
            public ChannelHandlerContext fireExceptionCaught(Throwable cause) {
                if (!outboundCtx.removed) {
                    try {
                        // We directly delegate to the ChannelOutboundHandler as this may override exceptionCaught(...)
                        // as well
                        outboundHandler.exceptionCaught(outboundCtx, cause);
                    } catch (Throwable error) {
                        if (logger.isDebugEnabled()) {
                            logger.debug(
                                    "An exception {}" +
                                    "was thrown by a user handler's exceptionCaught() " +
                                    "method while handling the following exception:",
                                    ThrowableUtil.stackTraceToString(error), cause);
                        } else if (logger.isWarnEnabled()) {
                            logger.warn(
                                    "An exception '{}' [enable DEBUG level for full stacktrace] " +
                                    "was thrown by a user handler's exceptionCaught() " +
                                    "method while handling the following exception:", error, cause);
                        }
                    }
                } else {
                    super.fireExceptionCaught(cause);
                }
                return this;
            }
        };

        // The inboundCtx and outboundCtx were created and set now it's safe to call removeInboundHandler() and
        // removeOutboundHandler().
        handlerAdded = true;

        try {
            inboundHandler.handlerAdded(inboundCtx);
        } finally {
            outboundHandler.handlerAdded(outboundCtx);
        }
    }

    @Override
    public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
        try {
            inboundCtx.remove();
        } finally {
            outboundCtx.remove();
        }
    }

    @Override
    public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.channelRegistered(inboundCtx);
        } else {
            inboundCtx.fireChannelRegistered();
        }
    }

    @Override
    public void channelUnregistered(ChannelHandlerContext ctx) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.channelUnregistered(inboundCtx);
        } else {
            inboundCtx.fireChannelUnregistered();
        }
    }

    @Override
    public void channelActive(ChannelHandlerContext ctx) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.channelActive(inboundCtx);
        } else {
            inboundCtx.fireChannelActive();
        }
    }

    @Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.channelInactive(inboundCtx);
        } else {
            inboundCtx.fireChannelInactive();
        }
    }

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.exceptionCaught(inboundCtx, cause);
        } else {
            inboundCtx.fireExceptionCaught(cause);
        }
    }

    @Override
    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.userEventTriggered(inboundCtx, evt);
        } else {
            inboundCtx.fireUserEventTriggered(evt);
        }
    }

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.channelRead(inboundCtx, msg);
        } else {
            inboundCtx.fireChannelRead(msg);
        }
    }

    @Override
    public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.channelReadComplete(inboundCtx);
        } else {
            inboundCtx.fireChannelReadComplete();
        }
    }

    @Override
    public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception {
        assert ctx == inboundCtx.ctx;
        if (!inboundCtx.removed) {
            inboundHandler.channelWritabilityChanged(inboundCtx);
        } else {
            inboundCtx.fireChannelWritabilityChanged();
        }
    }

    @Override
    public void bind(
            ChannelHandlerContext ctx,
            SocketAddress localAddress, ChannelPromise promise) throws Exception {
        assert ctx == outboundCtx.ctx;
        if (!outboundCtx.removed) {
            outboundHandler.bind(outboundCtx, localAddress, promise);
        } else {
            outboundCtx.bind(localAddress, promise);
        }
    }

    @Override
    public void connect(
            ChannelHandlerContext ctx,
            SocketAddress remoteAddress, SocketAddress localAddress,
            ChannelPromise promise) throws Exception {
        assert ctx == outboundCtx.ctx;
        if (!outboundCtx.removed) {
            outboundHandler.connect(outboundCtx, remoteAddress, localAddress, promise);
        } else {
            outboundCtx.connect(localAddress, promise);
        }
    }

    @Override
    public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
        assert ctx == outboundCtx.ctx;
        if (!outboundCtx.removed) {
            outboundHandler.disconnect(outboundCtx, promise);
        } else {
            outboundCtx.disconnect(promise);
        }
    }

    @Override
    public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
        assert ctx == outboundCtx.ctx;
        if (!outboundCtx.removed) {
            outboundHandler.close(outboundCtx, promise);
        } else {
            outboundCtx.close(promise);
        }
    }

    @Override
    public void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
        assert ctx == outboundCtx.ctx;
        if (!outboundCtx.removed) {
            outboundHandler.deregister(outboundCtx, promise);
        } else {
            outboundCtx.deregister(promise);
        }
    }

    @Override
    public void read(ChannelHandlerContext ctx) throws Exception {
        assert ctx == outboundCtx.ctx;
        if (!outboundCtx.removed) {
            outboundHandler.read(outboundCtx);
        } else {
            outboundCtx.read();
        }
    }

    @Override
    public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
        assert ctx == outboundCtx.ctx;
        if (!outboundCtx.removed) {
            outboundHandler.write(outboundCtx, msg, promise);
        } else {
            outboundCtx.write(msg, promise);
        }
    }

    @Override
    public void flush(ChannelHandlerContext ctx) throws Exception {
        assert ctx == outboundCtx.ctx;
        if (!outboundCtx.removed) {
            outboundHandler.flush(outboundCtx);
        } else {
            outboundCtx.flush();
        }
    }

    private static class DelegatingChannelHandlerContext implements ChannelHandlerContext {

        private final ChannelHandlerContext ctx;
        private final ChannelHandler handler;
        boolean removed;

        DelegatingChannelHandlerContext(ChannelHandlerContext ctx, ChannelHandler handler) {
            this.ctx = ctx;
            this.handler = handler;
        }

        @Override
        public Channel channel() {
            return ctx.channel();
        }

        @Override
        public EventExecutor executor() {
            return ctx.executor();
        }

        @Override
        public String name() {
            return ctx.name();
        }

        @Override
        public ChannelHandler handler() {
            return ctx.handler();
        }

        @Override
        public boolean isRemoved() {
            return removed || ctx.isRemoved();
        }

        @Override
        public ChannelHandlerContext fireChannelRegistered() {
            ctx.fireChannelRegistered();
            return this;
        }

        @Override
        public ChannelHandlerContext fireChannelUnregistered() {
            ctx.fireChannelUnregistered();
            return this;
        }

        @Override
        public ChannelHandlerContext fireChannelActive() {
            ctx.fireChannelActive();
            return this;
        }

        @Override
        public ChannelHandlerContext fireChannelInactive() {
            ctx.fireChannelInactive();
            return this;
        }

        @Override
        public ChannelHandlerContext fireExceptionCaught(Throwable cause) {
            ctx.fireExceptionCaught(cause);
            return this;
        }

        @Override
        public ChannelHandlerContext fireUserEventTriggered(Object event) {
            ctx.fireUserEventTriggered(event);
            return this;
        }

        @Override
        public ChannelHandlerContext fireChannelRead(Object msg) {
            ctx.fireChannelRead(msg);
            return this;
        }

        @Override
        public ChannelHandlerContext fireChannelReadComplete() {
            ctx.fireChannelReadComplete();
            return this;
        }

        @Override
        public ChannelHandlerContext fireChannelWritabilityChanged() {
            ctx.fireChannelWritabilityChanged();
            return this;
        }

        @Override
        public ChannelFuture bind(SocketAddress localAddress) {
            return ctx.bind(localAddress);
        }

        @Override
        public ChannelFuture connect(SocketAddress remoteAddress) {
            return ctx.connect(remoteAddress);
        }

        @Override
        public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress) {
            return ctx.connect(remoteAddress, localAddress);
        }

        @Override
        public ChannelFuture disconnect() {
            return ctx.disconnect();
        }

        @Override
        public ChannelFuture close() {
            return ctx.close();
        }

        @Override
        public ChannelFuture deregister() {
            return ctx.deregister();
        }

        @Override
        public ChannelFuture bind(SocketAddress localAddress, ChannelPromise promise) {
            return ctx.bind(localAddress, promise);
        }

        @Override
        public ChannelFuture connect(SocketAddress remoteAddress, ChannelPromise promise) {
            return ctx.connect(remoteAddress, promise);
        }

        @Override
        public ChannelFuture connect(
                SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) {
            return ctx.connect(remoteAddress, localAddress, promise);
        }

        @Override
        public ChannelFuture disconnect(ChannelPromise promise) {
            return ctx.disconnect(promise);
        }

        @Override
        public ChannelFuture close(ChannelPromise promise) {
            return ctx.close(promise);
        }

        @Override
        public ChannelFuture deregister(ChannelPromise promise) {
            return ctx.deregister(promise);
        }

        @Override
        public ChannelHandlerContext read() {
            ctx.read();
            return this;
        }

        @Override
        public ChannelFuture write(Object msg) {
            return ctx.write(msg);
        }

        @Override
        public ChannelFuture write(Object msg, ChannelPromise promise) {
            return ctx.write(msg, promise);
        }

        @Override
        public ChannelHandlerContext flush() {
            ctx.flush();
            return this;
        }

        @Override
        public ChannelFuture writeAndFlush(Object msg, ChannelPromise promise) {
            return ctx.writeAndFlush(msg, promise);
        }

        @Override
        public ChannelFuture writeAndFlush(Object msg) {
            return ctx.writeAndFlush(msg);
        }

        @Override
        public ChannelPipeline pipeline() {
            return ctx.pipeline();
        }

        @Override
        public ByteBufAllocator alloc() {
            return ctx.alloc();
        }

        @Override
        public ChannelPromise newPromise() {
            return ctx.newPromise();
        }

        @Override
        public ChannelProgressivePromise newProgressivePromise() {
            return ctx.newProgressivePromise();
        }

        @Override
        public ChannelFuture newSucceededFuture() {
            return ctx.newSucceededFuture();
        }

        @Override
        public ChannelFuture newFailedFuture(Throwable cause) {
            return ctx.newFailedFuture(cause);
        }

        @Override
        public ChannelPromise voidPromise() {
            return ctx.voidPromise();
        }

        @Override
        public <T> Attribute<T> attr(AttributeKey<T> key) {
            return ctx.attr(key);
        }

        final void remove() {
            EventExecutor executor = executor();
            if (executor.inEventLoop()) {
                remove0();
            } else {
                executor.execute(new Runnable() {
                    @Override
                    public void run() {
                        remove0();
                    }
                });
            }
        }

        private void remove0() {
            if (!removed) {
                removed = true;
                try {
                    handler.handlerRemoved(this);
                } catch (Throwable cause) {
                    fireExceptionCaught(new ChannelPipelineException(
                            handler.getClass().getName() + ".handlerRemoved() has thrown an exception.", cause));
                }
            }
        }
    }
}


text:
namespace extensions {

// When prompting the user to install or approve permissions, we display
// messages describing the effects of the permissions rather than listing the
// permissions themselves. Each PermissionMessage represents one of the
// messages shown to the user.
class PermissionMessage {
 public:
  // Do not reorder this enumeration. If you need to add a new enum, add it just
  // prior to kEnumBoundary.
  enum ID {
    kUnknown,
    kNone,
    kBookmarks,
    kGeolocation,
    kBrowsingHistory,
    kTabs,
    kManagement,
    kDebugger,
    kHosts1,
    kHosts2,
    kHosts3,
    kHosts4OrMore,
    kHostsAll,
    kFullAccess,
    kClipboard,
    kTtsEngine,
    kContentSettings,
    kAllPageContent,
    kPrivacy,
    kManagedMode,
    kInput,
    kAudioCapture,
    kVideoCapture,
    kDownloads,
    kFileSystemWrite,
    kMediaGalleriesAllGalleries,
    kEnumBoundary
  };

  // Creates the corresponding permission message for a list of hosts. This is
  // simply a convenience method around the constructor, since the messages
  // change depending on what hosts are present.
  static PermissionMessage CreateFromHostList(
      const std::set<std::string>& hosts);

  // Creates the corresponding permission message.
  PermissionMessage(ID id, const string16& message);
  ~PermissionMessage();

  // Gets the id of the permission message, which can be used in UMA
  // histograms.
  ID id() const { return id_; }

  // Gets a localized message describing this permission. Please note that
  // the message will be empty for message types TYPE_NONE and TYPE_UNKNOWN.
  const string16& message() const { return message_; }

  // Comparator to work with std::set.
  bool operator<(const PermissionMessage& that) const {
    return id_ < that.id_;
  }

 private:
  ID id_;
  string16 message_;
};

typedef std::vector<PermissionMessage> PermissionMessages;

}  // namespace extensions

#endif  // CHROME_COMMON_EXTENSIONS_PERMISSIONS_PERMISSION_MESSAGE_H_


text:
using System.ComponentModel;
using System.Linq;

namespace FHtml
{
    public static class FHtml
    {
        public static string Tag(string tag, params string[] children)
        {
            return Tag(tag, null, IsVoid(tag), children);
        }

        public static string Tag(string tag, object htmlAttrs, params string[] children)
        {
            return Tag(tag, htmlAttrs, IsVoid(tag), children);
        }

        public static string Tag(string tag, bool selfClosing, params string[] children)
        {
            return Tag(tag, null, selfClosing, children);
        }

        public static string Tag(string tag, object htmlAttrs, bool selfClosing, params string[] children)
        {
            var html = "<" + tag + ObjectToHtmlAttrs(htmlAttrs) + (selfClosing ? "/>" : ">");
            foreach (var child in children)
            {
                html += child;
            }
            if (!selfClosing)
            {
                html += "</" + tag + ">";
            }
            return html;
        }

        private static string ObjectToHtmlAttrs(object htmlAttrs)
        {
            if (htmlAttrs == null) return null;
            var attrs = "";
            foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(htmlAttrs))
            {
                attrs += " " + property.Name.Replace('_', '-') + "=\"" + property.GetValue(htmlAttrs) + "\"";
            }
            return attrs;
        }

        private static readonly string[] VoidTags = new[] { "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" };
        private static bool IsVoid(string tag)
        {
            return VoidTags.Contains(tag);
        }
    }
}


text:
require 'spec_helper'

describe 'cinder::backend::quobyte' do

  shared_examples_for 'quobyte volume driver' do
    let(:title) {'myquobyte'}

    let :params do
      {
	:quobyte_volume_url      => 'quobyte://quobyte.cluster.example.com/volume-name',
        :quobyte_qcow2_volumes   => false,
        :quobyte_sparsed_volumes => true,
      }
    end

    it 'configures quobyte volume driver' do
      should contain_cinder_config('myquobyte/volume_driver').with_value(
        'cinder.volume.drivers.quobyte.QuobyteDriver')
      should contain_cinder_config('myquobyte/quobyte_volume_url').with_value(
        'quobyte://quobyte.cluster.example.com/volume-name')
      should contain_cinder_config('myquobyte/quobyte_qcow2_volumes').with_value(
        false)
      should contain_cinder_config('myquobyte/quobyte_sparsed_volumes').with_value(
        true)
    end

  end

  context 'on Debian platforms' do
    let :facts do
      { :osfamily => 'Debian' }
    end

    it_configures 'quobyte volume driver'
  end

  context 'on RedHat platforms' do
    let :facts do
      { :osfamily => 'RedHat' }
    end

    it_configures 'quobyte volume driver'
  end

end


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace Microsoft.CodeAnalysis.Debugging
{
    internal enum ImportTargetKind
    {
        /// <summary>
        /// C# or VB namespace import.
        /// </summary>
        Namespace,

        /// <summary>
        /// C# or VB type import.
        /// </summary>
        Type,

        /// <summary>
        /// VB namespace or type alias target (not specified).
        /// </summary>
        NamespaceOrType,

        /// <summary>
        /// C# extern alias.
        /// </summary>
        Assembly,

        /// <summary>
        /// VB XML import.
        /// </summary>
        XmlNamespace,

        /// <summary>
        /// VB forwarding information (i.e. another method has the imports for this one).
        /// </summary>
        MethodToken,

        /// <summary>
        /// VB containing namespace (not an import).
        /// </summary>
        CurrentNamespace,

        /// <summary>
        /// VB root namespace (not an import).
        /// </summary>
        DefaultNamespace,

        /// <summary>
        /// A kind that is no longer used.
        /// </summary>
        Defunct,
    }
}


text:
package org.apache.rya.mongodb;

import java.io.IOException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.mongodb.MongoClient;

/**
 * To be used for tests. Creates a singleton {@link MongoClient} to be used
 * throughout all of the MongoDB related tests. Without the singleton, the
 * embedded mongo factory ends up orphaning processes, consuming resources.
 */
public class MockMongoSingleton {
    public static MongoClient getInstance() {
        return InstanceHolder.SINGLETON.instance;
    }

    private MockMongoSingleton() {
        // hiding implicit default constructor
    }

    private enum InstanceHolder {

        SINGLETON;

        private final Logger log;
        private MongoClient instance;

        InstanceHolder() {
            log = LoggerFactory.getLogger(MockMongoSingleton.class);
            instance = null;
            try {
                instance = MockMongoFactory.newFactory().newMongoClient();
                // JUnit does not have an overall lifecycle event for tearing down
                // this kind of resource, but shutdown hooks work alright in practice
                // since this should only be used during testing

                // The only other alternative for lifecycle management is to use a
                // suite lifecycle to enclose the tests that need this resource.
                // In practice this becomes unwieldy.
                Runtime.getRuntime().addShutdownHook(new Thread() {
                    @Override
                    public void run() {
                        try {
                            instance.close();
                        } catch (final Throwable t) {
                            // logging frameworks will likely be shut down
                            t.printStackTrace(System.err);
                        }
                    }
                });

            } catch (final IOException e) {
                log.error("Unexpected error while starting mongo client", e);
            } catch (final Throwable e) {
                // catching throwable because failure to construct an enum
                // instance will lead to another error being thrown downstream
                log.error("Unexpected throwable while starting mongo client", e);
            }
        }
    }
}


text:
package com.gregorpurdy.xml.bsax;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;

import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;

import com.gregorpurdy.xml.bsax.SAXWriter;
import com.gregorpurdy.xml.sax.BSAXReader;

/**
 * @author gregor
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class BSAXTest {

  public static void main(String[] args) throws Exception {
    String[] files = {
      "com/gregorpurdy/xml/bsax/personnel.xml"
    };

    for (int i = 0; i < files.length; i++) {
      System.out.println("Reading XML file '" + files[i] +"' and converting to BSAX...");

      byte[] data = convertXmlToBsax(files[i]);

      System.out.println("Writing BSAX back out as XML...");

      convertBsaxToXml(data);
    }
  }

  /**
   * @param data
   * @throws UnsupportedEncodingException
   * @throws IOException
   * @throws SAXException
   */
  private static void convertBsaxToXml(byte[] data) throws UnsupportedEncodingException, IOException, SAXException {
    sax.Writer writer = new sax.Writer();
    writer.setOutput(System.out, "UTF-8");

    BSAXReader reader = new BSAXReader();
    reader.setContentHandler(writer);
    reader.parse(new ByteArrayInputStream(data));
  }

  /**
   * @return
   * @throws SAXException
   * @throws Exception
   * @throws IOException
   */
  private static byte[] convertXmlToBsax(String resourceName) throws SAXException, Exception, IOException {
    XMLReader xr = XMLReaderFactory.createXMLReader();
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    SAXWriter handler = new SAXWriter(output);

    xr.setContentHandler(handler);

    InputStream stream = ClassLoader.getSystemResourceAsStream(resourceName);

    if (stream == null) {
      throw new Exception("Could not locate the input file on the class path!");
    }

    InputSource source = new InputSource(stream);
    xr.parse(source);

    return output.toByteArray();
  }

}


text:
package org.neo4j.kernel.stresstests.transaction.checkpoint.workload;

import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Transaction;
import org.neo4j.kernel.DeadlockDetectedException;
import org.neo4j.kernel.stresstests.transaction.checkpoint.mutation.RandomMutation;

class Worker implements Runnable
{
    interface Monitor
    {
        void transactionCompleted();
        boolean stop();
        void done();
    }

    private final GraphDatabaseService db;
    private final RandomMutation randomMutation;
    private final Monitor monitor;
    private final int numOpsPerTx;

    public Worker( GraphDatabaseService db, RandomMutation randomMutation, Monitor monitor, int numOpsPerTx )
    {
        this.db = db;
        this.randomMutation = randomMutation;
        this.monitor = monitor;
        this.numOpsPerTx = numOpsPerTx;
    }

    @Override
    public void run()
    {
        do
        {
            try ( Transaction tx = db.beginTx() )
            {
                for ( int i = 0; i < numOpsPerTx; i++ )
                {
                    randomMutation.perform();
                }
                tx.success();
            }
            catch ( DeadlockDetectedException ignore )
            {
                // simply give up
            }
            catch ( Exception e )
            {
                // ignore and go on
                e.printStackTrace();
            }

            monitor.transactionCompleted();
        }
        while ( !monitor.stop() );

        monitor.done();
    }
}


text:
package jxl.write.biff;

import jxl.biff.Type;

/**
 * The settings for the left margin
 */
class BottomMarginRecord extends MarginRecord
{
  BottomMarginRecord(double v)
  {
    super(Type.BOTTOMMARGIN, v);
  }
}


text:
<?php

namespace spec\Extraload\Extractor;

use PhpSpec\ObjectBehavior;

class CsvExtractorSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith(new \SplFileObject(__DIR__.'/../../../fixtures/books.csv'));
    }

    function it_is_initializable()
    {
        $this->shouldHaveType('Extraload\Extractor\CsvExtractor');
    }

    function it_implements_extractor_interface()
    {
        $this->shouldImplement('Extraload\Extractor\ExtractorInterface');
    }

    function it_iterates_over_csv_rows()
    {
        $this->extract()->shouldReturn(['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri']);
        $this->extract()->shouldReturn(['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens']);
        $this->extract()->shouldReturn(['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien']);
        $this->extract()->shouldReturn(['80-902734-1-6', 'And Then There Were None', 'Agatha Christie']);
    }

    function it_moves_over_csv_rows()
    {
        $this->current()->shouldReturn(['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri']);
        $this->next();
        $this->current()->shouldReturn(['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens']);
        $this->next();
        $this->current()->shouldReturn(['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien']);
    }

    function it_rewinds()
    {
        $this->extract()->shouldReturn(['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri']);
        $this->rewind();
        $this->extract()->shouldReturn(['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri']);
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="HandheldFriendly" content="true" />
  <link rel="shortcut icon" href="https://www.epa.gov/sites/all/themes/epa/favicon.ico" type="image/vnd.microsoft.icon" />
  <meta name="MobileOptimized" content="width" />
  <meta http-equiv="cleartype" content="on" />
  <meta http-equiv="ImageToolbar" content="false" />
  <meta name="viewport" content="width=device-width" />
  <meta name="version" content="20161218" />

  <meta name="DC.description" content="" />
  <meta name="DC.title" content="" />
  <title>
  Adjustable Biopolymer Chelators for Cadmium, Lead and Mercury|

  Research Project Database | Grantee Research Project | ORD | US EPA</title>

  <meta name="keywords" content="" />
  <link rel="shortlink" href="" />
  <link rel="canonical" href="" />
  <meta name="DC.creator" content="" />
  <meta name="DC.language" content="en" />
  <meta name="DC.Subject.epachannel" content="" />
  <meta name="DC.type" content="" />
  <meta name="DC.date.created" content="" />
  <meta name="DC.date.modified" content="2003-04-01" />

  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/misc/ui/jquery.ui.autocomplete.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/themes/epa/css/lib/jquery.ui.theme.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/libraries/template2/s.css" media="all" />

	<link rel="alternate" type="application/atom+xml" title="EPA.gov All Press Releases" href="https://www.epa.gov/newsreleases/search/rss" />
	<link rel="alternate" type="application/atom+xml" title="EPA.gov Headquarters Press Releases" href="https://www.epa.gov/newsreleases/search/rss/field_press_office/headquarters" />
	<link rel="alternate" type="application/atom+xml" title="Greenversations, EPA's Blog" href="https://blog.epa.gov/blog/feed/" />

Jump to main content

  <hgroup class="site-name-and-slogan">

US EPA

United States Environmental Protection Agency

  </hgroup>
  <form class="epa-search" method="get" action="https://search.epa.gov/epasearch/epasearch">
    Search
    <input class="form-text" placeholder="Search EPA.gov" name="querytext" id="search-box" value=""/>
    <button class="epa-search-button" id="search-button" type="submit" title="Search">Search</button>
    <input type="hidden" name="fld" value="" />
    <input type="hidden" name="areaname" value="" />
    <input type="hidden" name="areacontacts" value="" />
    <input type="hidden" name="areasearchurl" value="" />
    <input type="hidden" name="typeofsearch" value="epa" />
    <input type="hidden" name="result_template" value="2col.ftl" />
    <input type="hidden" name="filter" value="sample4filt.hts" />
  </form>

Contact Us

Project Research Results

1999 Progress Report

                        16 publications for this subproject

                          4 journal articles for this subproject

                          Main Center: R828598

                        359 publications for this center

                          90 journal articles for this center

Related Information

Research Grants

P3: Student Design Competition

Research Fellowships

Small Business Innovation Research (SBIR)

Grantee Research Project Results Search

      Adjustable Biopolymer Chelators for Cadmium, Lead and Mercury

    EPA Grant Number: R822721C651

        Subproject: this is subproject number 651 , established and managed by the Center Director under

          grant R828598

        (EPA does not fund or establish subprojects; EPA awards and manages the overall grant for this center).

      Center:

        Gulf Coast HSRC (Lamar)

      Center Director:

         Ho, Tho C.

    Title: Adjustable Biopolymer Chelators for Cadmium, Lead and Mercury

    Investigators:
     Holcombe, James
        ,  Iverson, Brent L.

        Current Investigators:

             Holcombe, James
            ,
             Browning, Karen
            ,
             Iverson, Brent L.

      Institution:

      The University of Texas at Austin

    	EPA Project Officer:

           Lasat, Mitch

      Project Period:
      September 1, 1998 through
        September 1, 1999

      RFA:
      Gulf Coast Hazardous Substance Research Center (Lamar University) (1996)

        		RFA Text |
          Recipients Lists

      Research Category:

          Hazardous Waste/Remediation
          ,
          Targeted Research

Objective:

Environmental contamination by metals has increased, partly because metals
  represent a recirculating problem unlike many organic contaminants which are
  biodegradable or can be decomposed chemically or thermally. As a result, metal
  remediation should include not only extraction from the source but also reclamation.
  Ion exchangers present such an option if they can posses the apparently conflicting
  attributes: efficient binding or extraction and inefficient binding for metal
  release.

This project proposes to use the metal binding "philosophy" of nature
  through the novel used of polyamino acids immobilized on a stationary support
  to accomplish metal extraction. Initial studies will be directed at cadmium,
  lead and mercury remediation. These materials are relatively inexpensive plus
  have an extremely long lifetime and high capacity which make them a cost effective
  alternative to current technologies.

In general the goal was to obtain fundamental data and make preliminary evaluation
  on a totally novel metal chelation scheme in hopes of providing an alternative
  option for an ever growing problem of a recirculating problem (i.e., metal contamination)
  that has not had a satisfactory solution to date. Specifically, the goals for
  year two of this research proposal were to focus on the study of new materials
  for the development of ion-exchange systems for metal preconcentration and remediation.
  Specifically, several polyamino acid homopolymers and copolymers were to be
  characterized and evaluated for metal binding capability. Also, new methods
  of immobilization of the polymers as well as new substrates were to be investigated.

The specific tasks that were to be accomplished in year two were the following:

TASK 1: Evaluate and characterize various homopolymers with expectations of
  complete characterization of polycysteine, polyhistidine and polyaspartic acid.

TASK 2: Begin initial synthesis and characterization of copolymers for metal
  remediation.

TASK 3: Investigate the possibility of templating the homopolymer polycysteine
  and copolymers containing cysteine.

TASK 4: Initiate studies of more efficient methods of immobilization of the
  polymers as well as the evaluation of new substrates.

Approach:

We have shown a formation constant of 1013 for Cd on polycysteine (ca. 50 amino
  acid residues/chain) immobilized on a silica substrate with capacities of ca.
  4 g Cd/kg support. This binding strength, for example, makes extraction of the
  metal from solutions containing such strong complexing agents as EDTA possible.
  This particular polyamino acid also shows a high propensity for soft acid metals
  (such as Cd, Pb and Hg) and thus optimizes the effective binding capacity even
  in the presence of other transition metal cations and common salts. Additionally,
  the bound metal is easily released by dilute acid stripping. These features
  are due, in part, to the tertiary structure associated the peptide which forms
  a sterically correct cage around the target metal that can be reversibly removed
  by acid denaturation.

Additionally, by forming disulfide linkages through on-line oxidation of the
  material, a templated chelator can be formed around the target which further
  increases the selectivity and effective capacity. The chemistry associated with
  polyamino acid formation is straight forward and has been known for 40 years
  so the diversity of materials that can be made available is extremely flexible
  and straight forward. This project has long reaching implications since the
  binding functionalities available on amino acids is extremely variable while
  the formation of the chelating chain always involves the same procedure, i.e.,
  formation of peptide bonds.

Exchange rates for complexation are only limited by mass transport and not
  by binding kinetics. Thus, it functions as efficiently as any currently available
  exchanger. The material is also much more cost effective and selective than
  natural proteins, which are expensive to isolate or synthesize and appear to
  lose their selectivity when removed from the unique chemical environment within
  the cell. The robustness of the material can be attested to by the hundreds
  of cycles of harsh acid (e.g., 1M HNO3) and oxidation (e.g., H2O2) that we have
  subjected a column to over the past two and a half years. (This column still
  retains its initial binding characteristics and capacities!) In this study,
  evaluation and characterization will employ low pressure flow systems with micro-columns
  and either flame AA or ICP-MS detection. Evaluation of utility with "real
  world samples" will be conducted in cooperation with Dr. Ahmed (Radian,
  Corp.; Houston, TX).

Expected Results:

While a number of studies have used metal ions for chromatographic isolation
  of proteins, no one has yet attempted to immobilize a protein (yet alone the
  more rugged polyamino acid) in an effort to develop a useful metal chelator.
  Additionally, no one has yet devised an immobilized chelator whose selectivity
  can be "tuned" for a particular metal and whose selectivity can be
  altered on-line for another target metal.

The project combines the expertise of a bio-organic chemist and an analytical
  chemist with experience in trace metal analysis and metal extraction using biological-based
  systems. It further relies on the cooperation of an industrial partner involved
  in metal remediation and environmental research.

Publications and Presentations:

        Publications have been submitted on this subproject: View all 16 publications for this subproject

              | View all 359 publications for this center

Journal Articles:

          Journal Articles have been submitted on this subproject: View all 4 journal articles for this subproject

                | View all 90 journal articles for this center

Supplemental Keywords:

      RFA, Scientific Discipline, INTERNATIONAL COOPERATION, Waste, POLLUTANTS/TOXICS, Remediation, Environmental Chemistry, Chemicals, Hazardous Waste, Chemistry and Materials Science, Hazardous, mercury, lead, metal ion removal, metal recovery, reclamation, metal extraction, biopolymer chelators, cadmium, extraction of metals, heavy metals, ion exchange, metal removal, metal contamination, bioploymers

Progress and Final Reports:

                1999 Progress Report

Main Center Abstract and Reports:

        R828598

          Gulf Coast HSRC (Lamar)

 Subprojects under this Center: (EPA does not fund or establish subprojects; EPA awards and manages the overall grant for this center).

            R822721C529 Environmentally Acceptable Endpoints:  Risk Based Remediation Using Bioremediation

            R822721C552 Degradative Solidification/Stabilization Technology for Chlorinated Hydrocarbons

            R822721C569 Treatment and Product Recovery:  Supercritical Water Oxidation of Nylon Monomer Manufacturing Waste

            R822721C620 Colloidal Fouling of Membranes:  Implications in the Treatment of Textile Dye Wastes and Water Reuse

            R822721C626 Catalytic Hydroprocessing of Chlorinated Organics

            R822721C627 The Interaction of Microbial Activity and Zero Valent Iron Permeable Barrier Technology

            R822721C630 Microbial Cometabolism of Recalcitrant Chemicals in Contaminated Air Streams

            R822721C633 Catalyst Lifetime Studies for Chlorocarbon Steam Reforming

            R822721C635 Electrokinetic/Surfactant-Enhanced Remediation of Hydrophobic Pollutants in Low Permeability Subsurface Environments

            R822721C636 Transformation Reactions of Nitroaromatic and Nitrogen Heterocyclic Compounds on Granular Activated Carbon (GAC) Surfaces: Enhancement of GAC Adsorption in Natural and Engineered Environmental Systems

            R822721C640 Environmentally Friendly Organic Synthesis in Supercritical Fluids

            R822721C645 Development and Evaluation of an Integrated Model to Facilitate Risk-Based Corrective Action at Superfund Sites

            R822721C651 Adjustable Biopolymer Chelators for Cadmium, Lead and Mercury

            R822721C653 New Electrochemically Smart Catalysts for Hazardous Waste Management and Development of Capillary Electrophoresis for Analysis of their Products

            R822721C655 Soil Sampling in South Alabama Oil Fields

            R822721C659 Subsurface Contamination Site Characterization via a Computer-Aided Visual Tool

            R822721C661 New Insoluble supports for Protein Immobilization for Use in Metalloprotein Affinity Metal Chromatography

            R822721C663 Soil Remediation with Ultra-High-Efficiency Hydrocyclones

            R822721C669 Solid Acid Catalyzed Alkylation in Supercritical Fluids

            R822721C679 Regeneration/Reactivation of Carbon Adsorbents by Radio Frequency (RF) Induction Heating

            R822721C687 Improved Halogen Resistance of Catalytic Oxidation

            R822721C696 Phytoremediation and Bioremediation of Land Contaminated By PAHs, PCBs, and TNT

            R822721C697 Fundamental and Kinetic Investigation of Sorbent Technology for Optimum Mercury Emission Control

            R822721C700 Effects of Natural and Cyclic Variations on Contaminant Fate and Transport

            R822721C703 Enhancement of DNAPL Dissolution Rates by Dechlorinating Anaerobes

            R826694C620 Colloidal Fouling of Membranes:  Implications in the Treatment of Textile Dye Wastes and Water Reuse

            R826694C625 Enhanced Treatment of DNAPLs Contaminated Soils and Groundwater Using Biosurfactants: In-Situ Bioremediation

            R826694C626 Catalytic Hydroprocessing of Chlorinated Wastes

            R826694C627 The Interaction of Microbial Activity and Zero Valent Iron Permeable Barrier Technology

            R826694C629 Biofiltration of BTEX in Petroleum-Contaminated Soil Remediation Off-Gas

            R826694C630 Microbial Cometabolism of Recalcitrant Chemicals in Contaminated Air Streams

            R826694C633 Catalyst Lifetime Studies for Chlorocarbon Steam Reforming

            R826694C635 Electrokinetic/Surfactant-Enhanced Remediation of Hydrophobic Pollutants in Low Permeability Subsurface Environments

            R826694C636 Transformation Reactions of Nitroaromatic and Nitrogen Heterocyclic Compounds on Granular Activated Carbon (GAC) Surfaces: Enhancement of GAC Adsorption in Natural and Engineered Environmental Systems

            R826694C640 Environmentally Friendly Organic Synthesis in Supercritical Fluids

            R826694C645 Development and Evaluation of an Integrated Model to Facilitate Risk-Based Corrective Action at Superfund Sites

            R826694C651 Adjustable Biopolymer Chelators for Cadmium, Lead, and Mercury Remeidation

            R826694C659 Subsurface Contamination Site characterization Via a Computer-Aided Visual Tool

            R826694C661 New Insoluble supports for Protein Immobilization for Use in Metalloprotein Affinity Metal Chromatography

            R826694C669 Solid Acid Catalyzed Alkylation in Supercritical Reaction Media

            R826694C679 Regeneration and Reactivation of Carbon Adsorbents by Radio Frequency Induction Heating

            R826694C696 Phytoremediation and Bioremediation of Land Contaminated By PAHs, PCBs, and TNT

            R826694C697 Fundamental and Kinetic Investigation of Sorbent Technology for Optimum Mercury Emission Control

            R826694C700 Effects of Natural Cyclic Variations on Contaminated Fate and Transport

            R826694C703 Enhancement of DNAPL Dissolution Rates by Dechlorinating Anaerobes

            R826694C705 A Pilot Plant for Producing Mixed Ketones from Waste Biomass

            R826694C722 The Effects of an Oily-Phase on VOC Emissions from Industrial Wastewater

            R826694C724 Mercury Removal from Stack Gas by Aqueous Scrubbing

            R826694C725 Transport, Fate and Risk Implications of Environmentally Acceptable Endpoint Decisions

            R826694C731 Development and Application of a Real-Time Optical Sensor for Atmospheric Formaldehyde

            R826694C734 An Advanced System for Pollution Prevention in Chemical Complexes

            R828598C001 Field Study Abstract:  A Model of Ambient Air Pollution in Southeast Texas Using Artificial Neural Network Technology

            R828598C002 Hollow Fiber Membrane Bioreactors for Treating Water and Air Streams Contaminated with Chlorinated Solvents

            R828598C003 Fugitive Emissions of Hazardous Air Pollutants from On-Site Industrial Sewers

            R828598C004 Biofiltration Technology Development

            R828598C005 A Risk-Based Decision Analysis Approach for Aquifers Contaminated with DNAPLs

            R828598C006 In-Situ Remediation for Contaminated Soils Using Prefabricated Vertical Drains

            R828598C007 Membrane Technology Selection System for the Metal Finishing Industry

            R828598C008 Sequential Environments for Enhanced Bioremediation of Chlorinated Aliphatic Hydrocarbons

            R828598C009 Waste Minimization in the Magnetic Tape Industry:  Waterborne Coating Formulations for Magnetic Tape Manufacture

            R828598C010 Soil Remediation by Agglomeration with Petroleum Coke

            R828598C011 Recovery of Dilute Phosphoric Acid in Waste Streams Using Waste Gas Ammonia:  The Regenerative MAP/DAP Process

            R828598C012 Stochastic Risk Assessment for Bioremediation

            R828598C013 Selective Removal of Heavy Metals from Wastewater by Chelation in Supercritical Fluids

            R828598C014 Optimization of Treatment Technologies for Detoxification of PCB Contaminated Soils

            R828598C015 Wastewater Remediation by Catalytic Wet Oxidation

            R828598C016 Permanence of Metals Containment in Solidified and Stabilized Wastes

            R828598C017 Combustion Enhancement by Radial Jet Reattachment - Low Generation of Hazardous Gases and High Thermal Efficiency

            R828598C018 A Process To Convert Industrial Biosludge and Paper Fines to Mixed Alcohol Fuels

            R828598C019 Homogeneous Catalysis in Supercritical Carbon Dioxide

            R828598C020 Ultrasonic Enhancement of the Removal of Heavy Metals

            R828598C021 The Binding Chemistry and Leaching Mechanisms of Advanced Solidification/Stabilization Systems for Hazardous Waste Management

            R828598C022 Development of an Air-Stripping and UV/H2O2 Oxidation Integrated Process To Treat a Chloro-Hydrocarbon-Contaminated Ground Water

            R828598C023 A Comparative Study of Siting Opposition in Two Counties

            R828598C024 Sonochemical Treatment of Hazardous Organic Compounds II:  Process Optimization and Pathway Studies

            R828598C025 Laser Diagnostics of the Combustion Process within a Rotary Kiln Incinerator

            R828598C026 Use of Inorganic Ion Exchangers for Hazardous Waste Remediation

            R828598C027 Kaolinite Sorbent for the Removal of Heavy Metals from Incinerated Lubricating Oils

            R828598C028 Destruction of Chlorinated Hydrocarbons in Process Streams Using Catalytic Steam Reforming

            R828598C029 Integrated Process Treatment Train (Bioremediation {Aerobic/Anaerobic} and Immobilization) for Texas Soils Contaminated with Combined Hazardous Wastes

            R828598C030 Photo-Oxidation by H2O2/VisUV of Off-Gas Atmospheric Emissions from Industrial and Environmental Remediation Sources

            R828598C031 Concentrated Halide Extraction and Recovery of Lead from Soil

            R828598C032 Biodegradable Surfactant for Underground Chlorinated Solvent Remediation

            R828598C033 A Software Guidance System for Choosing Analytical Subsurface Fate and Transport Models Including a Library of Computer Solutions for the Analytical Models

            R828598C034 Hydrodynamic Modeling of Leachate Recirculating Landfill

            R828598C035 Measurement of Oxygen Transfer Rate in Soil Matrices

            R828598C036 Sorbent Technology for Multipollutant Control During Fluidized  Bed Incineration

            R828598C037 Pollution Prevention by Process Modification Using On-Line Optimization

            R828598C038 Pollution Prevention by Process Modification

            R828598C039 Water Solubility and Henry's Law Constant

            R828598C040 Transferring Technical Information on Hazardous Substance Research by Publishing on the World Wide Web

            R828598C041 Stress Protein Responses to Multiple Metal Exposure in Grass Shrimp

            R828598C042 Life-Cycle Environmental Costing for Managing Pollution Prevention in the Chemical and Petroleum Refining Industries:  A Cross-Border Approach

            R828598C687 Improved Halogen Resistance of Catalytic Oxidation Through Efficient Catalyst Testing

            R828598C696 Phytoremediation and Bioremediation of Land Contaminated By PAHs, PCBs, and TNT

            R828598C697 Fundamental and Kinetic Investigation of Sorbent Technology for Optimum Mercury Emission Control

            R828598C700 Effects of Natural Cyclic Variations on Contaminated Fate and Transport

            R828598C703 Enhancement of DNAPL Dissolution Rates by Dechlorinating Anaerobes

            R828598C705 A Pilot Plant for Producing Mixed Ketones from Waste Biomass

            R828598C722 The Effects of an Oily-Phase on VOC Emissions from Industrial Wastewater

            R828598C724 Mercury Removal from Stack Gas by Aqueous Scrubbing

            R828598C725 Transport, Fate and Risk Implications of Environmentally Acceptable Endpoint Decisions

            R828598C731 Development and Application of a Real Time Optical Sensor for Atmospheric Formaldehyde

            R828598C734 An Advanced System for Pollution Prevention in Chemical Complexes

            R828598C743 Field Demonstration of Ultrasound Enhancement of Permeable Treatment Walls

            R828598C744 Optical Fibers Coated With Titania Membrane/UV-Generating Crystal in a Distributed-Light Photoreactor for VOC Oxidation

            R828598C749 Characterization and Modeling of Indoor Particulate Contaminants In a Heavily Industrialized Community

            R828598C753 Adsolubilization and Photocatalysis in a Semiconducting Monolithic Reactor for Wastewater Treatment

            R828598C754 Remote Detection of Gas Emissions in Industrial Processes

            R828598C759 Searching for Optimum Composition of Phosphogypsum:  Fly ash:  Cement Composites for Oyster Culch Materials

            R828598C761 Development of a Phytologically-Based Biosorptive Water Treatment Process

            R828598C766 Chlorinated Solvent Impact and Remediation Strategies for the Dry Cleaning Industry

            R828598C769 Soil/Sediment Remediation by Hot Water Extraction Combined with In-Situ Wet Oxidation

            R828598C771 Fluoracrylate Polymer Supported Ligands as Catalysts for Environmentally Benign Synthesis in Supercritical Fluids

            R828598C774 The Feasibility of Electrophoretic Repair of Impoundment Leaks

            R828598C777 Surfactant Enhanced Photo-oxidation of Wastewaters

            R828598C778 Stationary Power Generation Via Solid Oxide Fuel Cells:  A Response to Pollution and Global Warming

            R828598C786 Photocatalytic Recovery of Sulfur and Hydrogen From Hydrogen Sulfide

            R828598C787 Biosurfactant Produced from Used Vegetable Oil for removal of Metals From Wastewaters and Soils

            R828598C789 Genetic Engineering of Enzymatic Cyanide Clearance

            R828598C791 Characterizing the Intrinsic Remediation of MTBE at Field Sites

            R828598C799 Simultaneous Water Conservation/Recycling/Reuse and Waste Reduction in Semiconductor Manufacturing

            R828598C801 Building Defined Mixed Cultures To Biodegrade Diverse Mixtures Of Chlorinated Solvents

            R828598C802 Engineering of Nanocrystal Based Catalytic Materials for Hydroprocessing of Halogenated Organics

            R828598C807 Commercial Demonstration of Hydrogen Peroxide Injection to Control NOx Emissions from Combustion Sources

            R828598C809 Evaluating Source Grouting and ORC for Remediating MTBE Sites

            R828598C810 Application of Total Cost Assessment To Process Design In the Chemical Industry

            R828598C846 Quantitative Demonstration of Source-Zone Bioremediation in A Field-Scale Experimental Controlled Release System

Top of Page

 The perspectives, information and conclusions conveyed in research project abstracts, progress reports, final reports, journal abstracts and journal publications convey the viewpoints of the principal investigator and may not represent the views and policies of ORD and EPA.  Conclusions drawn by the principal investigators have not been reviewed by the Agency.

Main menu

Environmental Topics

Laws & Regulations

About EPA

Discover.

Accessibility

EPA Administrator

Budget & Performance

Contracting

Grants

No FEAR Act Data

Privacy and Security

Connect.

Data.gov

Inspector General

Jobs

Newsroom

Open Government

Regulations.gov

Subscribe

USA.gov

White House

Ask.

Contact Us

Hotlines

FOIA Requests

Frequent Questions

Follow.

Facebook

Twitter

YouTube

Flickr

Instagram

Last updated on Tuesday, April 1, 2003


text:
<!doctype html>

	<title>Droppable Visual Test : Draggable option accept selector</title>
	<link rel="stylesheet" href="../visual.css" type="text/css" />
	<link rel="stylesheet" href="droppable.css" type="text/css" />
	<link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">

Draggable div

Draggable p

	Draggable span

 Droppable


text:
angular
  .module('app')
  .component('checkIn', {
    templateUrl: 'app/clients/checkIn.html',
    controller: makecheckIn,
    controllerAs: 'CheckIn'
  });

function makecheckIn($rootScope, clientsApi, reservationApi, agencyApi, $location) {
    let vm = this;

    vm.newCheckIn = {};

    clientsApi.all().then(function (response) {
      vm.clients = response.data;
    });

    vm.availableEthnicities = [
      {
        id: 'american_indian',
        title: 'American Indian'
      },
      {
        id: 'asian',
        title: 'Asian'
      },
      {
        id: 'black',
        title: 'Black'
      },
      {
        id: 'white',
        title: 'White'
      },
      {
        id: 'no_race',
        title: 'No Race'
      },
      {
        id: 'hi_or_pac_island',
        title: 'Hawaiian or Pacific Islander'
      }
    ];

    vm.checkInExistingClient = function () {
      vm.isCheckingIn = true;

      return agencyApi.getCurrent().then(agencyResponse => {
        return reservationApi.checkin(agencyResponse.id, vm.newCheckinClient.id, vm.newCheckIn.bedsNeeded).then(reservationResponse => {
          broadcastCheckinMade(vm.newCheckIn.bedsNeeded);
          $location.path('/manageReservations');
        });
      });
    };

    vm.createClient = function () {
      vm.isCheckingIn = true;

      if (vm.ethnicitySelections) {
        vm.ethnicitySelections.forEach(selctionTitle => {
          let target = _.find(vm.availableEthnicities, {title: selctionTitle});
          vm.newCheckIn[target.id] = true;
        });
      }

      return agencyApi.getCurrent().then(agencyResponse => {
        return clientsApi.create(vm.newCheckIn).then((clientResponse) => {
          return reservationApi.checkin(agencyResponse.id, clientResponse.data.id, vm.newCheckIn.bedsNeeded).then(reservationResponse => {
            broadcastCheckinMade(vm.newCheckIn.bedsNeeded);
          })
        })
      })
    };

    function broadcastCheckinMade(bedCount) {
      vm.isCheckingIn = false;
      vm.newCheckIn = '';
      vm.newCheckinClient = '';

      $rootScope.$broadcast('checkin-made', {bedCount: bedCount});
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Crocynia aveyronensis B. de Lesd.

### Remarks
null


text: - moving to puppet 4/5 syntax


text:
<?php

namespace Dwo\Ispec\Model;

/**
 * Interface IpInfoFindAllManager
 *
 * @author Dave Www <davewwwo@gmail.com>
 */
interface IpInfoFindAllManagerInterface
{
    /**
     * @return IpInfo[]
     */
    public function findAll();

    /**
     * @param string $ip
     *
     * @return IpInfo[]
     */
    public function findAllByIp($ip);

    /**
     * @param string $key
     *
     * @return IpInfo[]
     */
    public function findAllByKey($key);
}


text:
namespace Poco {

MutexImpl::MutexImpl()
{
	_mutex = CreateMutexW(NULL, FALSE, NULL);
	if (!_mutex) throw SystemException("cannot create mutex");
}

MutexImpl::~MutexImpl()
{
	CloseHandle(_mutex);
}

void MutexImpl::lockImpl()
{
	switch (WaitForSingleObject(_mutex, INFINITE))
	{
	case WAIT_OBJECT_0:
		return;
	default:
		throw SystemException("cannot lock mutex");
	}
}

bool MutexImpl::tryLockImpl()
{
	switch (WaitForSingleObject(_mutex, 0))
	{
	case WAIT_TIMEOUT:
		return false;
	case WAIT_OBJECT_0:
		return true;
	default:
		throw SystemException("cannot lock mutex");
	}
}

bool MutexImpl::tryLockImpl(long milliseconds)
{
	switch (WaitForSingleObject(_mutex, milliseconds + 1))
	{
	case WAIT_TIMEOUT:
		return false;
	case WAIT_OBJECT_0:
		return true;
	default:
		throw SystemException("cannot lock mutex");
	}
}

void MutexImpl::unlockImpl()
{
	ReleaseMutex(_mutex);
}

} // namespace Poco


text:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Sep 3, 2008 1:58:22 PM by Hibernate Tools 3.2.1.GA -->
<hibernate-mapping>
    <class name="org.gmod.gbol.simpleObject.generated.AbstractPhylogeneticNodeProperty" table="phylonodeprop">
        <meta attribute="chadoModule" inherit="false">phylogeny</meta>

        <meta attribute="scope-class" inherit="false">public abstract</meta>

        <id name="phylogeneticNodePropertyId" type="java.lang.Integer">
            <column name="phylonodeprop_id" />

            <generator class="sequence">
                <param name="sequence">phylonodeprop_phylonodeprop_id_seq</param>
            </generator>
        </id>

        <discriminator column="phylonodeprop_id" insert="false" />

        <many-to-one name="type" class="org.gmod.gbol.simpleObject.CVTerm" fetch="select">
            <meta attribute="use-in-equals" inherit="false">true</meta>

            <column name="type_id" not-null="true">
                <comment>type_id could designate phylonode hierarchy relationships, for example: species taxonomy (kingdom, order, family, genus, species), "ortholog/paralog",
                "fold/superfold", etc.</comment>
            </column>
        </many-to-one>

        <many-to-one name="phylogeneticNode" class="org.gmod.gbol.simpleObject.PhylogeneticNode" fetch="select">
            <meta attribute="use-in-equals" inherit="false">true</meta>

            <column name="phylonode_id" not-null="true" />
        </many-to-one>

        <property name="value" type="string">
            <meta attribute="use-in-equals" inherit="false">true</meta>

            <column name="value" not-null="true" />
        </property>

        <property name="rank" type="int">
            <meta attribute="use-in-equals" inherit="false">true</meta>

            <column name="rank" not-null="true" />
        </property>
    </class>
</hibernate-mapping>


text:
shared_examples_for 'PointTarget' do
  before :each do
    @dir = dir_class.new(100,200)
  end
  include Command
  it_behaves_like 'Direction'
  it 'should have a target' do
    @dir.respond_to?(:target).should == true
    @dir.target.class.should == Point
  end
  it 'should have an accessible target x, based on the constructor argument' do
    @dir.target.x.should == 100
  end
  it 'should have an accessible target y, based on the constructor argument' do
    @dir.target.y.should == 200
  end
  it 'should be constructed with at least an x and y parameter' do
    lambda { dir_class.new }.should raise_error
    lambda { dir_class.new 45 }.should raise_error
    lambda { dir_class.new 45, 50 }.should_not raise_error
  end
  it 'should be relative if constructed with a false third parameter' do
    direction = dir_class.new(45, 50, false)
    direction.absolute?.should == false
  end
  it 'should be absolute if constructed with a true third parameter' do
    direction = dir_class.new(45, 50, true)
    direction.absolute?.should == true
  end
  it 'should be absolute if constructed with only two parameters' do
    direction = dir_class.new(45, 45)
    direction.absolute?.should == true
  end
  describe '#to_command' do
    it 'should have exactly 2 numerical parameters' do
      extract_coordinates(@dir.to_command).length.should == 2
    end
    it 'should show the provided X value as the next parameter' do
      extract_coordinates(@dir.to_command)[0].should == 100
    end
    it 'should show the provided Y value as the final parameter' do
      extract_coordinates(@dir.to_command)[1].should == 200
    end
  end
end


text:
using System;
using System.Collections.Generic;
using TaskSchedulerProfiler.ReportGenerator.Exceptions;
using TaskSchedulerProfiler.ReportGenerator.Models;

namespace TaskSchedulerProfiler.ReportGenerator.Logic
{
    public class SessionStats
    {
        private readonly Guid _sessionId;
        private readonly DateTime _startTime;
        private int _samplingInterval;
        private int _numberOfPakages;
        private DateTime _lastPackageStartTime;
        private Dictionary<int, int> _tasksStats;
        private List<int> _queueLengthStats;
        private DateTime _sessionStartTime;

        public Guid SessionId => _sessionId;
        public DateTime SessionStartTime => _sessionStartTime;
        public Dictionary<int, int> TaskStats =>_tasksStats;
        public List<int> QueueLengthStats => _queueLengthStats;
        public int SamplingInterval => _samplingInterval;

        public SessionStats(Guid sessionId, DateTime startTime, int samplingInterval)
        {
            _sessionId = sessionId;
            _sessionStartTime = startTime;
            _samplingInterval = samplingInterval;
            _tasksStats = new Dictionary<int, int>();
            _lastPackageStartTime = DateTime.MinValue;
            _queueLengthStats = new List<int>();
        }

        public void Append(StatsPackage stats)
        {
            ValidateStats(stats);
            UpdateLastPackageStartTime(stats);
            MergeTasksStats(stats.TasksStats);
            MergeQueueLength(stats.QueueLengthStats);
        }

        private void UpdateLastPackageStartTime(StatsPackage stats)
        {
            _lastPackageStartTime = stats.StartTime;
        }

        private void MergeQueueLength(List<int> queueLengthStats)
        {
            _queueLengthStats.AddRange(queueLengthStats);
        }

        private void MergeTasksStats(Dictionary<int, int> tasksStats)
        {
            foreach (var task in tasksStats)
            {
                int numberOfTicks;
                _tasksStats.TryGetValue(task.Key, out numberOfTicks);
                _tasksStats[task.Key] = numberOfTicks + task.Value;
            }
        }

        private void ValidateStats(StatsPackage stats)
        {
            if(SessionId != stats.SessionId)
                throw new DifferentSessionException($"Could't append statisticion from session {stats.SessionId} to session {SessionId}");

            if(_samplingInterval != stats.SampleInterval)
                throw new IncompatibleSamplingIntervalException($"Session was configure to {_samplingInterval} interval, but statistics have {stats.SampleInterval} interval.");

            if (_lastPackageStartTime > stats.StartTime)
                throw new StatsSequenceException($"Invalid order of statistics in sequence. Trying to add stats from {stats.StartTime}, but session already processed stats from {_lastPackageStartTime}");
        }
    }
}


text:
<?php
/* @var $this CellarsController */
/* @var $model Cellars */
/* @var $form CActiveForm */
?>

<?php
    $form=$this->beginWidget('CActiveForm', array(
	'id'=>'cellars-form',
        'focus'=>'input[type="text"]:first',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
    ));
?>

Fields with * are required.

<?php echo $form->errorSummary($model); ?>

    <?php echo $form->labelEx($model,'cellar_name'); ?>
    <?php echo $form->textField($model,'cellar_name',array('size'=>45,'maxlength'=>45)); ?>
    <?php echo $form->error($model,'cellar_name'); ?>

<?php
    if ($this->getAction()->id == "update")
    {
        $dd_list = CHtml::listData(CellarLocation::model()->findAllByAttributes(array('cellar_id'=>$model->id)), 'cellar_loc_id', 'location');
        asort($dd_list);
        echo '
';
        echo $form->labelEx($model,'default_cellar_loc_id');
        echo $form->dropDownList($model, 'default_cellar_loc_id', $dd_list, array('empty'=>'(Select a Location)'));
	echo $form->error($model,'default_cellar_loc_id');
	echo '
';
    }
?>

		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>

<?php $this->endWidget(); ?>