text:
package com.xeiam.xchange.bittrex.v1.dto.marketdata;

import com.fasterxml.jackson.annotation.JsonProperty;

public class BittrexSymbol {

  private String baseCurrency;
  private String baseCurrencyLong;
  private String created;
  private boolean isActive;
  private String marketCurrency;
  private String marketCurrencyLong;
  private String marketName;
  private Number minTradeSize;

  public BittrexSymbol(@JsonProperty("BaseCurrency") String baseCurrency, @JsonProperty("BaseCurrencyLong") String baseCurrencyLong, @JsonProperty("Created") String created,
      @JsonProperty("IsActive") boolean isActive, @JsonProperty("MarketCurrency") String marketCurrency, @JsonProperty("MarketCurrencyLong") String marketCurrencyLong,
      @JsonProperty("MarketName") String marketName, @JsonProperty("MinTradeSize") Number minTradeSize) {

    this.baseCurrency = baseCurrency;
    this.baseCurrencyLong = baseCurrencyLong;
    this.created = created;
    this.isActive = isActive;
    this.marketCurrency = marketCurrency;
    this.marketCurrencyLong = marketCurrencyLong;
    this.marketName = marketName;
    this.minTradeSize = minTradeSize;

  }

  public String getBaseCurrency() {

    return this.baseCurrency;
  }

  public void setBaseCurrency(String baseCurrency) {

    this.baseCurrency = baseCurrency;
  }

  public String getBaseCurrencyLong() {

    return this.baseCurrencyLong;
  }

  public void setBaseCurrencyLong(String baseCurrencyLong) {

    this.baseCurrencyLong = baseCurrencyLong;
  }

  public String getCreated() {

    return this.created;
  }

  public void setCreated(String created) {

    this.created = created;
  }

  public boolean getIsActive() {

    return this.isActive;
  }

  public void setIsActive(boolean isActive) {

    this.isActive = isActive;
  }

  public String getMarketCurrency() {

    return this.marketCurrency;
  }

  public void setMarketCurrency(String marketCurrency) {

    this.marketCurrency = marketCurrency;
  }

  public String getMarketCurrencyLong() {

    return this.marketCurrencyLong;
  }

  public void setMarketCurrencyLong(String marketCurrencyLong) {

    this.marketCurrencyLong = marketCurrencyLong;
  }

  public String getMarketName() {

    return this.marketName;
  }

  public void setMarketName(String marketName) {

    this.marketName = marketName;
  }

  public Number getMinTradeSize() {

    return this.minTradeSize;
  }

  public void setMinTradeSize(Number minTradeSize) {

    this.minTradeSize = minTradeSize;
  }

  @Override
  public String toString() {

    return "BittrexSymbol [baseCurrency=" + baseCurrency + ", baseCurrencyLong=" + baseCurrencyLong + ", created=" + created + ", isActive=" + isActive + ", marketCurrency=" + marketCurrency
        + ", marketCurrencyLong=" + marketCurrencyLong + ", marketName=" + marketName + ", minTradeSize=" + minTradeSize + "]";
  }

}

redpajama_set_name: RedPajamaGithub


text:
from unittest.mock import Mock

import pytest

from .. import create_app
from .data import retweet, tweet_1, tweet_no_full_text
from .utils import Tweepy

def mock_api(tweets):
    mock_response = Mock()
    mock_response.return_value = Tweepy(tweets)
    return mock_response

@pytest.fixture
def app(monkeypatch, tmpdir):
    test_dir = str(tmpdir)
    monkeypatch.setenv('TWOOTFEED_CONFIG', test_dir)
    monkeypatch.setenv('TWOOTFEED_CONFIG_FILE', test_dir + '/config.yml')
    app = create_app()
    return app

@pytest.fixture()
def fake_tweepy_ok():
    return mock_api(tweets=[tweet_1])

@pytest.fixture()
def fake_tweepy_retweet():
    return mock_api(tweets=[retweet])

@pytest.fixture()
def fake_tweepy_no_full_text():
    return mock_api(tweets=[tweet_no_full_text])

@pytest.fixture()
def fake_tweepy_no_tweets():
    return mock_api(tweets=[])

@pytest.fixture()
def fake_tweepy_200_ok():
    return mock_api(tweets=[tweet_1] * 200)

@pytest.fixture()
def fake_tweepy_220_ok():
    return mock_api(tweets=[tweet_1] * 200 +
                           [tweet_no_full_text] * 10 +
                           [retweet] * 10)


text:
<?php

/*
 * This file is part of Mongator.
 *
 * (c) Pablo Díez <pablodip@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Mongator\MongatorBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;

/**
 * MongatorBundle.
 *
 * @author Pablo Díez <pablodip@gmail.com>
 */
class MongatorMondatorPass implements CompilerPassInterface
{
    public function process(ContainerBuilder $container)
    {
        if (false === $container->hasDefinition('mongator.mondator')) {
            return;
        }

        $mondatorDefinition = $container->getDefinition('mongator.mondator');

        // core
        $definition = new Definition('Mongator\Extension\Core');
        $definition->addArgument(array(
            'metadata_factory_class'  => $container->getParameter('mongator.metadata_factory.class'),
            'metadata_factory_output' => $container->getParameter('mongator.metadata_factory.output'),
            'default_behaviors'       => $container->hasParameter('mongator.default_behaviors')
                                       ? $container->getParameter('mongator.default_behaviors')
                                       : array(),
        ));
        $container->setDefinition('mongator.extension.core', $definition);

        $mondatorDefinition->addMethodCall('addExtension', array(new Reference('mongator.extension.core')));

        // bundles
        $definition = new Definition('Mongator\MongatorBundle\Extension\Bundles');
        $container->setDefinition('mongator.extension.bundles', $definition);

        $mondatorDefinition->addMethodCall('addExtension', array(new Reference('mongator.extension.bundles')));

        // validation
        $definition = new Definition('Mongator\MongatorBundle\Extension\DocumentValidation');
        $container->setDefinition('mongator.extension.document_validation', $definition);

        $mondatorDefinition->addMethodCall('addExtension', array(new Reference('mongator.extension.document_validation')));

        // custom
        foreach ($container->findTaggedServiceIds('mongator.mondator.extension') as $id => $attributes) {
            $mondatorDefinition->addMethodCall('addExtension', array(new Reference($id)));
        }
    }
}


text:
cd /home/rbg/rel5-dev

/export/ws12/tduosn/software/matlab2011a/bin/matlab -nodesktop << EOF
matlabpool open 6;

anno = jarLoadAnno();
load /export/ws12/tduosn/data/rbg/rel5-dev/2007/aeroplane_final.mat;
[ap, recall, prec] = jar_test(model, anno, 'aeroplane-typical-test');
EOF

exit 0


text:
package main

import (
	"fmt"
	"encoding/json"
)

type person struct {
	First  string   `json:"First"`
	Last   string   `json:"Last"`
	Age    int      `json:"Age"`
	Saying []string `json:"Saying"`
}

func main() {
	s := `[{"First":"James","Last":"Bond","Age":32,"Sayings":["Shaken, not stirred","Youth is no guarantee of innovation","In his majesty's royal service"]},{"First":"Miss","Last":"Moneypenny","Age":27,"Sayings":["James, it is soo good to see you","Would you like me to take care of that for you, James?","I would really prefer to be a secret agent myself."]},{"First":"M","Last":"Hmmmm","Age":54,"Sayings":["Oh, James. You didn't.","Dear God, what has James done now?","Can someone please tell me where James Bond is?"]}]`
	// fmt.Println(s)
	var people []person
	json.Unmarshal([]byte(s), &people)
	fmt.Println(people)
}


text:
package com.tomash.androidcontacts.contactgetter.main.contactsUpdater;

class ContactsUpdater {

}


text:
// bin/acc-lda.cc

// Copyright 2009-2011  Microsoft Corporation, Go-Vivace Inc.
//                2014  Guoguo Chen

// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.

#include "base/kaldi-common.h"
#include "util/common-utils.h"
#include "hmm/transition-model.h"
#include "hmm/posterior.h"
#include "transform/lda-estimate.h"

/** @brief Accumulate LDA statistics based on pdf-ids. Inputs are the
source models, that serve as the input (and may potentially contain
the current transformation), the un-transformed features and state
posterior probabilities */
int main(int argc, char *argv[]) {
  using namespace kaldi;
  typedef kaldi::int32 int32;
  try {
    const char *usage =
        "Accumulate LDA statistics based on pdf-ids.\n"
        "Usage:  acc-lda [options] <transition-gmm/model> "
        "<features-rspecifier> <posteriors-rspecifier> <lda-acc-out>\n"
        "Typical usage:\n"
        " ali-to-post ark:1.ali ark:- | lda-acc 1.mdl \"ark:splice-feats "
        "scp:train.scp|\"  ark:- ldaacc.1\n";

    bool binary = true;
    BaseFloat rand_prune = 0.0;
    ParseOptions po(usage);
    po.Register("binary", &binary, "Write accumulators in binary mode.");
    po.Register("rand-prune", &rand_prune,
                "Randomized pruning threshold for posteriors");
    po.Read(argc, argv);

    if (po.NumArgs() != 4) {
      po.PrintUsage();
      exit(1);
    }

    std::string model_rxfilename = po.GetArg(1);
    std::string features_rspecifier = po.GetArg(2);
    std::string posteriors_rspecifier = po.GetArg(3);
    std::string acc_wxfilename = po.GetArg(4);

    TransitionModel trans_model;
    {
      bool binary_read;
      Input ki(model_rxfilename, &binary_read);
      trans_model.Read(ki.Stream(), binary_read);
      // discard rest of file.
    }

    LdaEstimate lda;

    SequentialBaseFloatMatrixReader feature_reader(features_rspecifier);
    RandomAccessPosteriorReader posterior_reader(posteriors_rspecifier);

    int32 num_done = 0, num_fail = 0;
    for (; !feature_reader.Done(); feature_reader.Next()) {
      std::string utt = feature_reader.Key();
      if (!posterior_reader.HasKey(utt)) {
        KALDI_WARN << "No posteriors for utterance " << utt;
        num_fail++;
        continue;
      }
      const Posterior &post(posterior_reader.Value(utt));
      const Matrix<BaseFloat> &feats(feature_reader.Value());

      if (lda.Dim() == 0) lda.Init(trans_model.NumPdfs(), feats.NumCols());

      if (feats.NumRows() != static_cast<int32>(post.size())) {
        KALDI_WARN << "Posterior vs. feats size mismatch " << feats.NumRows()
                   << " vs. " << post.size();
        num_fail++;
        continue;
      }
      if (lda.Dim() != 0 && lda.Dim() != feats.NumCols()) {
        KALDI_WARN << "Feature dimension mismatch " << lda.Dim() << " vs. "
                   << feats.NumCols();
        num_fail++;
        continue;
      }

      Posterior pdf_post;
      ConvertPosteriorToPdfs(trans_model, post, &pdf_post);
      for (int32 i = 0; i < feats.NumRows(); i++) {
        SubVector<BaseFloat> feat(feats, i);
        for (size_t j = 0; j < pdf_post[i].size(); j++) {
          int32 pdf_id = pdf_post[i][j].first;
          BaseFloat weight = RandPrune(pdf_post[i][j].second, rand_prune);
          if (weight != 0.0) {
            lda.Accumulate(feat, pdf_id, weight);
          }
        }
      }
      num_done++;
      if (num_done % 100 == 0)
        KALDI_LOG << "Done " << num_done << " utterances.";
    }

    KALDI_LOG << "Done " << num_done << " files, failed for " << num_fail;

    Output ko(acc_wxfilename, binary);
    lda.Write(ko.Stream(), binary);
    KALDI_LOG << "Written statistics.";
    return (num_done != 0 ? 0 : 1);
  } catch (const std::exception &e) {
    std::cerr << e.what();
    return -1;
  }
}


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

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
AbstractKeyValue (Commons Collections 3.2.1 API)
</TITLE>

<META NAME="keywords" CONTENT="org.apache.commons.collections.keyvalue.AbstractKeyValue class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.apache.commons.collections.keyvalue

Class AbstractKeyValue

java.lang.Object
  org.apache.commons.collections.keyvalue.AbstractKeyValue

All Implemented Interfaces:
KeyValue

Direct Known Subclasses:
AbstractMapEntry, DefaultKeyValue

public abstract class AbstractKeyValue
extends java.lang.Object
implements KeyValue

Abstract pair class to assist with creating KeyValue
 and Map.Entry implementations.

Since:

Commons Collections 3.0

Version:

$Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $

Author:

James Strachan, Michael A. Smith, Neil O'Toole, Stephen Colebourne

Field Summary

protected  java.lang.Object
key

          The key

protected  java.lang.Object
value

          The value

Constructor Summary

protected
AbstractKeyValue(java.lang.Object key,
                 java.lang.Object value)

          Constructs a new pair with the specified key and given value.

Method Summary

 java.lang.Object
getKey()

          Gets the key from the pair.

 java.lang.Object
getValue()

          Gets the value from the pair.

 java.lang.String
toString()

          Gets a debugging String view of the pair.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

key

protected java.lang.Object key

The key

value

protected java.lang.Object value

The value

Constructor Detail

AbstractKeyValue

protected AbstractKeyValue(java.lang.Object key,
                           java.lang.Object value)

Constructs a new pair with the specified key and given value.

Parameters:
key - the key for the entry, may be null
value - the value for the entry, may be null

Method Detail

getKey

public java.lang.Object getKey()

Gets the key from the pair.

Specified by:
getKey in interface KeyValue

Returns:
the key

getValue

public java.lang.Object getValue()

Gets the value from the pair.

Specified by:
getValue in interface KeyValue

Returns:
the value

toString

public java.lang.String toString()

Gets a debugging String view of the pair.

Overrides:
toString in class java.lang.Object

Returns:
a String view of the entry

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.


text:
//
//  eLongDebugMemoryModel.h
//  ElongClient
//
//  Created by Kirn on 15/3/22.
//  Copyright (c) 2015年 elong. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 *  free是空闲内存;
 *  active是已使用,但可被分页的(在iOS中,只有在磁盘上静态存在的才能被分页,例如文件的内存映射,而动态分配的内存是不能被分页的);
 *  inactive是不活跃的,实际上内存不足时,你的应用就可以抢占这部分内存,因此也可看作空闲内存;
 *  wire就是已使用,且不可被分页的。
 */
typedef struct elong_debug_memory{
    double free;
    double active;
    double inactive;
    double wire;
    double zero_fill;
    double reactivations;
    double pageins;
    double pageouts;
    double faults;
    double cow_faults;
    double lookups;
    double hits;
}elong_debug_memory;

@interface eLongDebugMemoryModel : NSObject
/**
 *  可使用内存
 */
@property (nonatomic,assign) double availableMemory;
/**
 *  已用内存
 */
@property (nonatomic,assign) double usedMemory;
/**
 *  内存详情
 */
@property (nonatomic,assign) elong_debug_memory memory;
@end


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>
  Microflora Involved in Phytoremediation of Polyaromatic Hydrocarbons|

  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="2017-01-26" />

  <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

Final Report

2001 Progress Report

                        20 publications for this subproject

                          Main Center: R827015

                        120 publications for this center

                          16 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

      Microflora Involved in Phytoremediation of Polyaromatic Hydrocarbons

    EPA Grant Number: R827015C005

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

          grant R827015

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

      Center:

        IPEC University of Tulsa (TU)

      Center Director:

         Sublette, Kerry L.

    Title: Microflora Involved in Phytoremediation of Polyaromatic Hydrocarbons

    Investigators:
     Nagle, David P.
        ,  Fletcher, John S.

    Institution:

      University of Oklahoma

    	EPA Project Officer:

           Lasat, Mitch

      Project Period:
      August 1, 2000 through
        July 31, 2001
          (Extended to July 31, 2002)

        Project Amount:

            Refer to

              main center abstract

            for funding details.

      RFA:
      Integrated Petroleum Environmental Consortium (IPEC) (1999)

        		RFA Text |
          Recipients Lists

      Research Category:

          Hazardous Waste/Remediation
          ,
          Targeted Research

Objective:

Polyaromatic hydrocarbons (PAHs) comprise a major class of recalcitrant
industrial pollutants and are a significant byproduct of coal, chemical, and
petroleum processing and refining. PAHs are concentrated in food chains, are
toxic, and some (e.g. benzo[a]pyrene) are recognized mutagens and carcinogens.
The EPA guidelines for containment and control of PAH compounds have become more
and more strict. Older disposal methods, such as lagooning, are no longer
acceptable in the long term. Phytoremediation has the potential to be applied m
a "living cap" of plants and associated microorganisms which will alleviate
pollution in the medium term (tens of years). The costs of such waste treatment
are far below those required for installation of an impermeable cap or
incineration of contaminated soil. In this project data from a Texas City Union
Carbide Corp. PAH site will be used in evaluating the potential for use of
phytoremediation of PAHs. It should be possible to predict what plants will be
favorable for stimulating microbial biodegradation of PAHs, and to design test
protocols for additional contaminated sites. The proposed research also
encompasses many basic questions, such as what influences the interactions
between roots and microorganisms. The answers to such questions may be exploited
in the long term in other bioremediation schemes.

Union Carbide Corporation is committed to environmentally-friendly
remediation of its plants. The Texas City PAH site is a remnant of old
containment practices. When it became apparent that the vegetation contributed
to improvement of the site (conversion of waste to soil and decrease in PAH
levels in the soil), Union Carbide began to support basic research into the
processes that had occurred. They provided historical data, aerial photographs,
and other information, such that the history of the site could be reconstructed
over the 20-year period in which the vegetation developed, and provided
unlimited access to the site for research purposes. Carbide has been very
pro-active in implementing bioremediation schemes for PAH contamination. In the
spring of 1997 they planted two 17-acre PAH-impacted sites at the Texas City
plant as a test of different plant species as potential phytoremediators. These
sites will also be very useful in studies of the microflora that develops in a
newly begun phytoremediation systems. In fact, they may be a model of the
original PAH-contaminated site during its early years of vegetation and
microflora development.

The proposed research is a two-year study of microorganisms from an
industrial research area which is contaminated with polyaromatic hydrocarbons
(PAHs). The site has been populated with native plants through a process of
natural succession over a period of 15 to 20 years. Chemical characterization of
samples shows that PAH concentrations increase with depth, and in areas of the
site which now contain mature trees the regions of lower concentration are
deeper than in nearby grassy areas. The results lead to a hypothesis that trees
and microflora have acted in concert to bioremediate soil contaminants in the
root region, suggesting that it is critical to study what has happened and what
is happening in to the pollutants in the field. This contrasts to the approach
of a pure laboratory study followed by attempts to introduce new technology to
the field. If it is true that the plant-microbe system has accelerated the
biodegradation of PAHs, then analysis of a field site should be the most rapid
route to planned implementation of phytoremediation.

Studies on the microflora from the PAH-impacted site and their relationship
to plants growing there will utilize both classical microbiology and molecular
biology methods. Plant and chemical analysis work is now being complemented by
an extensive quantitative and qualitative characterization of bacteria in
different vegetated regions and at different depths of the field site. To date,
counts of total bacteria, as well as of bacteria apparently capable of using
PAHs (naphthalene, phenanthrene, or pyrene) as carbon/energy source have been
performed. Analysis of the data is not yet complete, but it is already clear
that the number of bacteria decreases dramatically at the interface between soil
and PAH-containing sludge. In bulk samples of soil beneath grassy or
tree-containing regions there is no significant difference in bacterial numbers
between samples taken at corresponding depths. What has not been tested is the
local region around the roots themselves.

Two hundred bacterial strains were isolated, with PAH as sole carbon and
energy source. Partial characterization (staining, physiological tests)
indicates that these PAH-degraders are diverse: both Gram-negative and
Gram-positive bacteria, representing many genera were found. A subset of these
strains was tested for the presence of plasmids (extrachromosomal genetic
elements). Certain plasmids provide metabolic abilities on their hosts, and some
are known to permit metabolism of PAHs. of our strains, some but not all contain
plasmids, whose functions are not yet known. It is possible to conclude,
however, that PAH utilization is not exclusively plasmid-coded.

In the first year of this project, we propose to: 1) thoroughly characterize
the diversity of the PAH-degrading microorganisms isolated from the contaminated
soil (This will be done by classical microbiological tests as well as by
molecular biology techniques (quantitative polymerase chain reactions, PCR),
which can be a powerful test of diversity, including that of organisms that can
not be cultured. Probes will include ribosomal RNA genes. As more information is
obtained about metabolic plasmids and other biodegradation genes in organisms
from the site, probes will be developed for these genes as well.), 2) study the
spatial organization of PAH-degrading organisms (This requires microsampling of
soil adjacent to plant roots, to compare the numbers of PAH-degraders in close
proximity to growing roots to the numbers far removed from roots. Initial
studies will be carried out by counting colonies, but quantitative PCR and
plasmid characterizations will be done as well. In years two and beyond it is
hoped that fluorescence microscopy techniques can be used as a powerful test to
localize PAH degraders and their relationship to plant roots.), 3) begin to
characterize microflora found in a PAH phytoremediation site which has been
planted for only 10 months (Using techniques similar to those listed under aim
no. I, microorganisms found in soil of this new site will be studied. This may
be a functional equivalent to the early years of the Texas City site.), and 4)
study the interactions of organisms from the site with plant roots in normal and
PAH-contaminated soils (This requires information from aims 1 and 2, and is not
likely to be a major research area in the first year of the project.).

Publications and Presentations:

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

              | View all 120 publications for this center

Supplemental Keywords:

      RFA, Scientific Discipline, Toxics, INTERNATIONAL COOPERATION, Geographic Area, Waste, Water, National Recommended Water Quality, Contaminated Sediments, Remediation, Chemistry, Contaminant Candidate List, State, Microbiology, Environmental Microbiology, Hazardous Waste, Bioremediation, Molecular Biology/Genetics, Biology, Engineering, Hazardous, Environmental Engineering, hazardous waste treatment, petroleum, waste treatment, degradation, microbial degradation, contaminated sites, biodegradation, Naphthalene, Pyrene, field studies, decontamination of soil, microbes, PAH, soils, contaminated soil, microflora, contaminants in soil, soil, bioremediation of soils, Texas (TX), hydrocarbons, water quality, phytoremediation, soil microbes, plant-microbe system

Progress and Final Reports:

                2001 Progress Report

                Final Report

Main Center Abstract and Reports:

        R827015

          IPEC University of Tulsa (TU)

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

            R827015C001 Evaluation of Road Base Material Derived from Tank Bottom Sludges

            R827015C002 Passive Sampling Devices (PSDs) for Bioavailability Screening of Soils Containing Petrochemicals

            R827015C003 Demonstration of a Subsurface Drainage System for the Remediation of Brine-Impacted Soil

            R827015C004 Anaerobic Intrinsic Bioremediation of Whole Gasoline

            R827015C005 Microflora Involved in Phytoremediation of Polyaromatic Hydrocarbons

            R827015C006 Microbial Treatment of Naturally Occurring Radioactive Material (NORM)

            R827015C007 Using Plants to Remediate Petroleum-Contaminated Soil

            R827015C008 The Use of Nitrate for the Control of Sulfide Formation in Oklahoma Oil Fields

            R827015C009 Surfactant-Enhanced Treatment of Oil-Contaminated Soils and Oil-Based Drill Cuttings

            R827015C010 Novel Materials for Facile Separation of Petroleum Products from Aqueous Mixtures Via Magnetic Filtration

            R827015C011 Development of Relevant Ecological Screening Criteria (RESC) for Petroleum Hydrocarbon-Contaminated Exploration and Production Sites

            R827015C012 Humate-Induced Remediation of Petroleum Contaminated Surface Soils

            R827015C013 New Process for Plugging Abandoned Wells

            R827015C014 Enhancement of Microbial Sulfate Reduction for the Remediation of Hydrocarbon Contaminated Aquifers - A Laboratory and Field Scale Demonstration

            R827015C015 Locating Oil-Water Interfaces in Process Vessels

            R827015C016 Remediation of Brine Spills with Hay

            R827015C017 Continuation of an Investigation into the Anaerobic Intrinsic Bioremediation of Whole Gasoline

            R827015C018 Using Plants to Remediate Petroleum-Contaminated Soil

            R827015C019 Biodegradation of Petroleum Hydrocarbons in Salt-Impacted Soil by Native Halophiles or Halotolerants and Strategies for Enhanced Degradation

            R827015C020 Anaerobic Intrinsic Bioremediation of MTBE

            R827015C021 Evaluation of Commercial, Microbial-Based Products to Treat Paraffin Deposition in Tank Bottoms and Oil Production Equipment

            R827015C022 A Continuation: Humate-Induced Remediation of Petroleum Contaminated Surface Soils

            R827015C023 Data for Design of Vapor Recovery Units for Crude Oil Stock Tank Emissions

            R827015C024 Development of an Environmentally Friendly and Economical Process for Plugging Abandoned Wells

            R827015C025 A Continuation of Remediation of Brine Spills with Hay

            R827015C026 Identifying the Signature of the Natural Attenuation of MTBE in Goundwater Using Molecular Methods and "Bug Traps"

            R827015C027 Identifying the Signature of Natural Attenuation in the Microbial
  Ecology of Hydrocarbon Contaminated Groundwater Using Molecular Methods and
  "Bug Traps"

            R827015C028 Using Plants to Remediate Petroleum-Contaminated Soil: Project Continuation

            R827015C030 Effective Stormwater and Sediment Control During Pipeline Construction Using a New Filter Fence Concept

            R827015C031 Evaluation of Sub-micellar Synthetic Surfactants versus Biosurfactants for Enhanced LNAPL Recovery

            R827015C032 Utilization of the Carbon and Hydrogen Isotopic Composition of Individual Compounds in Refined Hydrocarbon Products To Monitor Their Fate in the Environment

            R830633 Integrated Petroleum Environmental Consortium (IPEC)

            R830633C001 Development of an Environmentally Friendly and Economical Process for Plugging Abandoned Wells (Phase II)

            R830633C002 A Continuation of Remediation of Brine Spills with Hay

            R830633C003 Effective Stormwater and Sediment Control During Pipeline Construction Using a New Filter Fence Concept

            R830633C004 Evaluation of Sub-micellar Synthetic Surfactants versus Biosurfactants for Enhanced LNAPL Recovery

            R830633C005 Utilization of the Carbon and Hydrogen Isotopic Composition of Individual Compounds in Refined Hydrocarbon Products To Monitor Their Fate in the Environment

            R830633C006 Evaluation of Commercial, Microbial-Based Products to Treat Paraffin Deposition in Tank Bottoms and Oil Production Equipment

            R830633C007 Identifying the Signature of the Natural Attenuation in the Microbial Ecology of Hydrocarbon Contaminated Groundwater Using Molecular Methods and “Bug Traps”

            R830633C008 Using Plants to Remediate Petroleum-Contaminated Soil: Project Continuation

            R830633C009 Use of Earthworms to Accelerate the Restoration of Oil and Brine Impacted Sites

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 Thursday, January 26, 2017


text:
ALTER TABLE llx_c_regions ADD INDEX idx_c_regions_fk_pays (fk_pays);
ALTER TABLE llx_c_regions ADD CONSTRAINT fk_c_regions_fk_pays	FOREIGN KEY (fk_pays)     REFERENCES llx_c_pays (rowid);


text:
import java.io.Serializable;
import java.util.ArrayList;

public class NumberRangeMessage implements Serializable
{
    private int startNumber;
    private int endNumber;
    private ArrayList<String> inputList;

    public NumberRangeMessage(ArrayList<String> inputList, int startNumber, int endNumber) {
        this.startNumber = startNumber;
        this.endNumber = endNumber;
        this.inputList = inputList;
    }

    public int getStartNumber() {
        return startNumber;
    }

    public void setStartNumber(int startNumber) {
        this.startNumber = startNumber;
    }

    public int getEndNumber() {
        return endNumber;
    }

    public void setEndNumber(int endNumber) {
        this.endNumber = endNumber;
    }

    public ArrayList<String> getInputList()
    {
    	return inputList;
    }
}


text:
/* dropotron v1.3 | (c) n33 | n33.co @n33co | MIT + GPLv2 */

(function(jQuery) {

	jQuery.fn.disableSelection_dropotron = function() { return jQuery(this).css('user-select', 'none').css('-khtml-user-select', 'none').css('-moz-user-select', 'none').css('-o-user-select', 'none').css('-webkit-user-select', 'none'); }

	jQuery.fn.dropotron = function(options) {
		var settings = jQuery.extend({
			selectorParent:		jQuery(this)
		}, options);
		return jQuery.dropotron(settings);
	}

	jQuery.dropotron = function(options) {

		// Settings
			var settings = jQuery.extend({
				selectorParent:			null,				// The parent jQuery object
				baseZIndex:				1000,				// Base Z-Index
				menuClass:				'dropotron',		// Menu class (assigned to every UL)
				expandMode:				'hover',			// Expansion mode ("hover" or "click")
				hoverDelay:				150,				// Hover delay (in ms)
				hideDelay:				250,				// Hide delay (in ms; 0 disables)
				openerClass:			'opener',			// Opener class
				openerActiveClass:		'active',			// Active opener class
				submenuClassPrefix:		'dropotron-level-',	// Submenu class prefix
				mode:					'slide',		    // Menu mode ("instant", "fade", "slide", "zoom")
				speed:					'fast',				// Menu speed ("fast", "slow", or ms)
				easing:					'swing',			// Easing mode ("swing", ???)
				alignment:				'left',				// Alignment ("left", "center", "right")
				offsetX:				0,					// Submenu offset X
				offsetY:				0,					// Submenu offset Y
				globalOffsetY:			0,					// Global offset Y
				IEOffsetX:				0,					// IE Offset X
				IEOffsetY:				0,					// IE Offset Y
				noOpenerFade:			false,				// If true, when in "fade" mode the top-level opener will not fade with the menu
				detach:					true				// Detach second level menus (to prevent parent styling from bleeding through)
			}, options);

		// Variables
			var _top = settings.selectorParent, _menus = _top.find('ul');
			var _window = jQuery('html');
			var isLocked = false, hoverTimeoutId = null, hideTimeoutId = null;
			var _isTouch = !!('ontouchstart' in window), _eventType = 'click';

		// Main
			_top
				.bind('doCollapseAll', function() {
					_menus
						.trigger('doCollapse');
				});

			_menus.each(function() {
				var menu = jQuery(this), opener = menu.parent();

				if (settings.hideDelay > 0)
					menu.add(opener)
						.mouseleave(function(e) {
							window.clearTimeout(hideTimeoutId);
							hideTimeoutId = window.setTimeout(function() {
								menu.trigger('doCollapse');
							}, settings.hideDelay);
						});

				menu
					.disableSelection_dropotron()
					.hide()
					.addClass(settings.menuClass)
					.css('position', 'absolute')
					.mouseenter(function(e) {
						window.clearTimeout(hideTimeoutId);
					})
					.bind('doExpand', function() {

						if (menu.is(':visible'))
							return false;

						window.clearTimeout(hideTimeoutId);

						_menus.each(function() {
							var t = jQuery(this);
							if (!jQuery.contains(t.get(0), opener.get(0)))
								t.trigger('doCollapse');
						});

						var x, left, top, isTL = (menu.css('z-index') == settings.baseZIndex), oo = opener.offset(), op = opener.position(), opp = opener.parent().position(), ow = opener.outerWidth(), mw = menu.outerWidth();

						if (isTL)
						{
							if (!settings.detach)
								x = op;
							else
								x = oo;

							top = x.top + opener.outerHeight() + settings.globalOffsetY;

							switch (settings.alignment)
							{
								case 'right':
									left = x.left - mw + ow;

									if (left < 0)
										left = x.left;

									break;

								case 'center':
									left = x.left - Math.floor((mw - ow) / 2);

									if (left < 0)
										left = x.left;
									else if (left + mw > _window.width())
										left = x.left - mw + ow;

									break;

								case 'left':
								default:
									left = x.left;

									if (left + mw > _window.width())
										left = x.left - mw + ow;

									break;
							}
						}
						else
						{
							// Non-static position fix
								if (opener.css('position') == 'relative'
								||	opener.css('position') == 'absolute')
								{
									top = settings.offsetY;
									left = (-1 * op.left);
								}
								else
								{
									top = op.top + settings.offsetY;
									left = 0;
								}

							switch (settings.alignment)
							{
								case 'right':
									left += (-1 * opener.parent().outerWidth()) + settings.offsetX;

									break;

								case 'center':
								case 'left':
								default:
									left += opener.parent().outerWidth() + settings.offsetX;

									break;
							}
						}

						if (navigator.userAgent.match(/MSIE ([0-9]+)\./) && RegExp.$1 < 8)
						{
							left += settings.IEOffsetX;
							top += settings.IEOffsetY;
						}

						menu
							.css('left', left + 'px')
							.css('top', top + 'px');

						menu.css('opacity', '0.01').show();

						// Kludge!
							var tmp = false;

							// Non-static position fix
								if (opener.css('position') == 'relative'
								||	opener.css('position') == 'absolute')
									left = (-1 * op.left);
								else
									left = 0;

							if (menu.offset().left < 0)
							{
								left += opener.parent().outerWidth() - settings.offsetX;
								tmp = true;
							}
							else if (menu.offset().left + mw > _window.width())
							{
								left += (-1 * opener.parent().outerWidth()) - settings.offsetX;
								tmp = true;
							}

							if (tmp)
								menu.css('left', left + 'px');

							menu.hide().css('opacity', '1');

						switch (settings.mode)
						{
							case 'zoom':

								isLocked = true;

								opener.addClass(settings.openerActiveClass);
								menu.animate({
									width: 'toggle',
									height: 'toggle'
								}, settings.speed, settings.easing, function() {
									isLocked = false;
								});

								break;

							case 'slide':

								isLocked = true;

								opener.addClass(settings.openerActiveClass);
								menu.animate({ height: 'toggle' }, settings.speed, settings.easing, function() {
									isLocked = false;
								});

								break;

							case 'fade':

								isLocked = true;

								if (isTL && !settings.noOpenerFade)
								{
									var tmp;

									if (settings.speed == 'slow')
										tmp = 80;
									else if (settings.speed == 'fast')
										tmp = 40;
									else
										tmp = Math.floor(settings.speed / 2);

									opener.fadeTo(tmp, 0.01, function() {
										opener.addClass(settings.openerActiveClass);
										opener.fadeTo(settings.speed, 1);
										menu.fadeIn(settings.speed, function() {
											isLocked = false;
										});
									});
								}
								else
								{
									opener.addClass(settings.openerActiveClass);
									opener.fadeTo(settings.speed, 1);
									menu.fadeIn(settings.speed, function() {
										isLocked = false;
									});
								}

								break;

							case 'instant':
							default:

								opener.addClass(settings.openerActiveClass);
								menu.show();

								break;
						}

						return false;
					})
					.bind('doCollapse', function() {

						if (!menu.is(':visible'))
							return false;

						menu.hide();
						opener.removeClass(settings.openerActiveClass);
						menu.find('.' + settings.openerActiveClass).removeClass(settings.openerActiveClass);
						menu.find('ul').hide();

						return false;

					})
					.bind('doToggle', function(e) {

						if (menu.is(':visible'))
							menu.trigger('doCollapse');
						else
							menu.trigger('doExpand');

						return false;

					});

				opener
					.disableSelection_dropotron()
					.addClass('opener')
					.css('cursor', 'pointer')
					.bind(_eventType, function(e) {

						if (isLocked)
							return;

						e.preventDefault();
						e.stopPropagation();
						menu.trigger('doToggle');

					});

				if (settings.expandMode == 'hover')
					opener.hover(function(e) {
							if (isLocked)
								return;
							hoverTimeoutId = window.setTimeout(function() {
								menu.trigger('doExpand');
							}, settings.hoverDelay);
						},
						function (e) {
							window.clearTimeout(hoverTimeoutId);
						}
					);
			});

			_menus.find('a')
				.css('display', 'block')
				.click(function(e) {

					if (isLocked)
						return;

					_top.trigger('doCollapseAll');

					e.stopPropagation();

					if (jQuery(this).attr('href').length < 1)
						e.preventDefault();

				});

			_top.find('li')
				.css('white-space', 'nowrap')
				.each(function() {
					var t = jQuery(this), a = t.children('a'), ul = t.children('ul');

					a.click(function(e) {
						if (jQuery(this).attr('href').length < 1)
							e.preventDefault();
						else
							e.stopPropagation();
					});

					if (a.length > 0 && ul.length == 0)
						t.click(function(e) {

							if (isLocked)
								return;

							_top.trigger('doCollapseAll');

							e.stopPropagation();

						});
				});

			_top.children('li').each(function() {

				var opener = jQuery(this), menu = opener.children('ul');

				if (menu.length > 0)
				{
					if (settings.detach)
						menu
							.detach()
							.appendTo('body');

					for(var z = settings.baseZIndex, i = 1, y = menu; y.length > 0; i++)
					{
						y.css('z-index', z++);

						if (settings.submenuClassPrefix)
							y.addClass(settings.submenuClassPrefix + (z - 1 - settings.baseZIndex));

						y = y.find('> li > ul');
					}
				}

			});

			_window
				.click(function() {
					if (!isLocked)
						_top.trigger('doCollapseAll');
				})
				.keypress(function(e) {
					if (!isLocked
					&&	e.keyCode == 27) {
						e.preventDefault();
						_top.trigger('doCollapseAll');
					}
				});
	};

})(jQuery);


text:
layout: archive
excerpt: "Ludante kun realaĵo, luktante pli bonan estontecon"
title: "Blog posts"
author_profile: true
header:
  overlay_image: header_blog-2.jpg
  overlay_filter: 0.4
  caption: ""
---

{% include base_path %}
{% capture written_year %}'None'{% endcapture %}
{% for post in paginator.posts %}
  {% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
  {% if year != written_year %}

    {% capture written_year %}{{ year }}{% endcapture %}
  {% endif %}
  {% include archive-single.html %}
{% endfor %}

{% include paginator.html %}


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

<title>Cogges Parish newsletter April 2002</title>
<link rel="stylesheet" href="../cogges.css">
<link rev=made href="mailto:cogges.pcc@comlab.ox.ac.uk">

From the newsletter ...

Death -> New Life

The word "EASTER" for most people associates automatically with
"EGGS" - foil wrapped chocolate, cream filled or sugar coated - but
all symbols of new life.  During the half-term the children of
Blake School have enjoyed seeing the new life of baby chicks,
hatching from eggs and growing fast.  Spring is a time when we
enjoy the new life so evident all around us.

But at Easter we are not just celebrating the new life of Spring,
but the new life given by our Father God - first to his Son, Jesus,
by raising him from the dead, and then to those who are his
people.  For Jesus, that new life had to be preceded by an
excruciatingly painful death.  There was the physical pain of
crucifixion, but even more significant, the pain of being separated
from his Father as he took the punishment for our sin.

Death -> New Life.

As a family we have experienced the mixed emotions of death and new
life deeply in the last few weeks.  On the day of the funeral for
my mother-in-law, the last of our parents, the death of that
generation, our first grandchild was born - new life for our
family.  In the funeral we read from the Psalms "from everlasting
to everlasting the Lord's love is with those who fear him, and his
righteousness with their children's children - with those who keep
his covenant and remember to obey his precepts."

Death -> New Life.

As the church in Cogges and South Leigh we are also experiencing
the gift of new life.  Last summer we said goodbye to Stephen
Bessent and his family as they moved from Witney.  Many of us have
mourned their loss as we have missed the joy of our friendship with
them, but with the induction of Andrew Sweeney as our new vicar, we
anticipate the opportunities of new life and growth.

Death -> New Life.

But what about you?  Have you experienced the joy of a real
personal relationship with God, through the salvation from sin that
Jesus made possible by his death that first Easter?  Have you put
to death the sinful life and embraced new life in Jesus?  It's the
most important life-changing thing you can do.

Death -> New Life ....... in JESUS.

Pauline Page

Cogges Parish |
Other articles |
Previous issue |

Feedback

© 2002;
Published in Cogges Parish monthly newsletter,
April 2002


text:
package com.digiarea.closure.model;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;

import com.digiarea.closure.model.visitor.GenericVisitor;
import com.digiarea.closure.model.visitor.VoidVisitor;
import com.digiarea.zippy.ZippyBuffer;

public class GssNonStandardFunctions extends Node {

    private ListProperty<GssNonStandardFunction> gssNonStandardFunction = new SimpleListProperty<GssNonStandardFunction>(this, "gssNonStandardFunction", FXCollections.observableList(new ArrayList<GssNonStandardFunction>()));

    public boolean addGssNonStandardFunction(GssNonStandardFunction gssNonStandardFunction) {
        boolean res = getGssNonStandardFunction().add(gssNonStandardFunction);
        if (res) {
            if (gssNonStandardFunction != null) {
                gssNonStandardFunction.parent = this;
            }
        }
        return res;
    }

    public boolean removeGssNonStandardFunction(GssNonStandardFunction gssNonStandardFunction) {
        boolean res = getGssNonStandardFunction().remove(gssNonStandardFunction);
        if (res) {
            if (gssNonStandardFunction != null) {
                gssNonStandardFunction.parent = this;
            }
        }
        return res;
    }

    public final List<GssNonStandardFunction> getGssNonStandardFunction() {
        return gssNonStandardFunction.get();
    }

    public final void setGssNonStandardFunction(List<GssNonStandardFunction> gssNonStandardFunction) {
        if (gssNonStandardFunction != null) {
            for (GssNonStandardFunction item : gssNonStandardFunction) {
                item.parent = this;
            }
        }
        this.gssNonStandardFunction.addAll(gssNonStandardFunction);
    }

    public GssNonStandardFunctions() {
        super();
    }

    public GssNonStandardFunctions(List<GssNonStandardFunction> gssNonStandardFunction) {
        super();
        this.gssNonStandardFunction.addAll(gssNonStandardFunction);
    }

    public ListProperty<GssNonStandardFunction> gssNonStandardFunctionProperty() {
        return gssNonStandardFunction;
    }

    @Override
    public <C> void accept(VoidVisitor<C> v, C ctx) throws Exception {
        v.visit(this, ctx);
    }

    @Override
    public <R, C> R accept(GenericVisitor<R, C> v, C ctx) throws Exception {
        return v.visit(this, ctx);
    }

    public final int sizeOfGssNonStandardFunctions(final boolean isExternal) {
        int size = isExternal ? 1 : 0;
        if (this.getGssNonStandardFunction() != null) {
            size += 1;
            final List<GssNonStandardFunction> gssNonStandardFunction = this.getGssNonStandardFunction();
            size += ZippyBuffer.sizeOfRawVarInt(gssNonStandardFunction.size());
            for (GssNonStandardFunction entry : gssNonStandardFunction) {
                if (entry != null) {
                    size += entry.sizeOfGssNonStandardFunction(false);
                } else {
                    size += 1;
                }
            }
        }
        size += 1;
        return size;
    }

    public final void writeGssNonStandardFunctions(final ZippyBuffer writer, final boolean isExternal) throws IOException {
        if (isExternal) {
            writer.writeRawVarInt(20);
        }
        if (this.getGssNonStandardFunction() != null) {
            writer.writeRawVarInt(1);
            final List<GssNonStandardFunction> gssNonStandardFunction = this.getGssNonStandardFunction();
            writer.writeRawVarInt(gssNonStandardFunction.size());
            for (GssNonStandardFunction entry : gssNonStandardFunction) {
                if (entry != null) {
                    entry.writeGssNonStandardFunction(writer, false);
                } else {
                    writer.writeRawVarInt(0);
                }
            }
        }
        writer.writeRawVarInt(0);
    }

    public static GssNonStandardFunctions readGssNonStandardFunctions(final ZippyBuffer reader) throws IOException {
        final GssNonStandardFunctions packet = new GssNonStandardFunctions();
        int sector;
        while ((sector = reader.readSector()) != 0) {
            switch(sector) {
                case 1:
                    int gssNonStandardFunctionI = reader.readRawVarInt();
                    final List<GssNonStandardFunction> gssNonStandardFunction = new ArrayList<GssNonStandardFunction>(gssNonStandardFunctionI);
                    for (int i = 0; i < gssNonStandardFunctionI; i++) {
                        gssNonStandardFunction.add(GssNonStandardFunction.readGssNonStandardFunction(reader));
                    }
                    packet.setGssNonStandardFunction(gssNonStandardFunction);
                    break;
            }
        }
        return packet;
    }

}


text:
<ui-select multiple ng-model="$ctrl.gids" ng-disabled="$ctrl.readonly">
    <ui-select-match placeholder="Select groups who can access this resource">
        {{$item.name}}
        ({{$item.Members.length}} users)
    </ui-select-match>
    <ui-select-choices repeat="group in $ctrl.groups | propsFilter: {name: $select.search}">
        {{group.name}} {{group.desc}}
        ({{group.Members.length}} users)
    </ui-select-choices>
</ui-select>


text:
/*
 * RegisterProgramm.cpp
 *
 *  Created on: 23.12.2014
 *      Author: Maximilian Wuttke (mwuttke97@gmail.com)
 */

#include <map>
#include <string>
#include "MVariant/MVariant.h"
#include "RTypes.h"
#include "RCmd.h"
#include "RegisterProgramm.h"

namespace registerMachine {

RegisterCmd * RegisterProgramm::get(RPointer pointer) const {
	auto it = m_prog.find(pointer);
	if (it == m_prog.end())
		return 0;
	return it->second;
}

void RegisterProgramm::write(RPointer pointer, RegisterCmd * data) {
	m_prog[pointer] = data;
}

const std::map<RPointer, RegisterCmd*>& RegisterProgramm::getMap() const {
	return m_prog;
}

void RegisterProgramm::clear() {
	m_prog.clear();
}

} /* namespace registerMachine */


text:
author: slowe
comments: true
date: 2017-03-10
layout: post
title: "The Linux Migration: Other Users' Stories, Part 3"
categories: Information
tags:
- Linux
- Productivity
- Macintosh
- Ubuntu
---

Over the last few weeks, I've been sharing various users' stories about their own personal migration to Linux. If you've not read them already, I encourage you to check out [part 1][xref-1] and [part 2][xref-2] of this multi-part series to get a feel for why folks are deciding to switch to Linux, the challenges they faced, and the benefits they've seen (so far). Obviously, Linux isn't the right fit for everyone, but at least by sharing these stories you'll get a better feel whether it's a right fit for you.

This is Brian Hall's story of switching to Linux.

**Q: Why did you switch to Linux?**

I've been an OS X user since 2010. It was a huge change coming from Windows, especially since the laptop I bought had the first SSD that I've had in my primary machine. I didn't think it could get any better. Over the years that feeling started to wear off.

OS X started to feel bloated. It seemed like OS X started to get in my way more and more often. I ended up formatting and reinstalling OSX like I used to do with Windows (maybe not quite as often). Setting up Mail to work the way I wanted it to was a pain. I had apps for everything. That started out fun, but when it came to getting my data out of each of them it was a tough job.

I wanted this to change. It seemed like getting my personal machine set up the way I was using it was entirely too complex. If my machine were to die, it would take me weeks to get it back to the way it was. I wanted to simplify as much as possible.

**Q: Which Linux distribution are you using?**

I switched from OS X to Ubuntu GNOME.

**Q: What sort of challenges did you face, and how did you work around these challenges?**

For me, there was one challenge. When I first started "evaluating" (evaluating is probably too formal a word) different distributions I was trying to make them work exactly like my Mac, which always failed. I realized that I changed just about everything about the way I was working when I switched from Windows to OS X. I had to be willing to change the way I was doing some things for me to complete the move. I don't think this is a requirement for everyone who wants to switch to Linux. The point is this: you will likely need to be willing to change a few things.

My first step in my migration was to simplify the way I was working on my Mac first, then try to move again. This made everything a lot easier. I did away with a lot of the dedicated apps I was using (writing apps, GTD apps, note taking, etc). I started using open data formats for everything I was doing (basically, plain text for everything). I started using web-based email and the web interfaces for Twitter, cross-platform apps, etc.

**Q: What benefits have you seen after the switch?**

Since I made the switch I can say for certain that my setup has gotten a lot simpler. It would take me less than a day to rebuild my machine to the point where it is now. Another benefit has been performance (I reduced how much my machine swaps by reducing the "vm.swappiness" value to 10 in `/etc/sysctl.conf`). I still own a MacBook, which is the only laptop I have, and I never thought I would say that it felt slow. I spend a **lot** less time tweaking my machine to behave the way I want.

**Q: Is there anything else you'd like readers to know?**

I still own and use an iPhone and an Apple TV, so I haven't completely removed Apple from my computing landscape. I mention this because a lot of people think that it has to be "all or none," and I haven't found that to be the case.

I also wanted to mention a couple of very useful applications I've found along the way:

* [Enpass][link-3] is a great password manager (a reasonable replacement for 1Password on OS X, if you use that)
* [odrive][link-2] is a good cloud storage client that supports Linux
* [Netdata][link-1] is awesome for local performance monitoring

[link-1]: https://github.com/firehol/netdata
[link-2]: https://www.odrive.com
[link-3]: https://enpass.io
[xref-1]: {% post_url 2017-03-01-linux-migration-other-users-stories-pt1 %}
[xref-2]: {% post_url 2017-03-06-linux-migration-other-users-stories-pt2 %}


text:
module Seahorse
  module Client
    class BlockIO

      def initialize(&block)
        @block = block
        @size = 0
      end

      # @param [String] chunk
      # @return [Integer]
      def write(chunk)
        @block.call(chunk)
        chunk.bytesize.tap { |chunk_size| @size += chunk_size }
      end

      # @param [Integer] bytes (nil)
      # @param [String] output_buffer (nil)
      # @return [String, nil]
      def read(bytes = nil, output_buffer = nil)
        data = bytes ? nil : ''
        output_buffer ? output_buffer.replace(data || '') : data
      end

      # @return [Integer]
      def size
        @size
      end

    end
  end
end


text:
import { expect } from 'chai';
import fs from 'fs-extra';
import path from 'path';
import { transform } from 'babel-core';
import importLocale from './';
import exportLocale from '../exportLocale';
import defaultConfig from '../../defaultConfig';

const {
  supportedLocales,
  sourceLocale,
} = defaultConfig;

const babelOptions = {
  presets: ['es2015', 'stage-0'],
  plugins: [
    'transform-runtime'
  ],
};

/* global describe it before after beforeEach afterEach */
/* eslint { no-eval: 0} */

const testFolder = './testData';
const localizationFolder = './localization';

async function clean() {
  await fs.emptyDir(testFolder);
  await fs.emptyDir(localizationFolder);
}

function encodeValue(str) {
  return `@#@${JSON.stringify(str)}@#@`;
}

async function generateSource() {
  await fs.writeFile(path.resolve(testFolder, 'loadLocale.js'), '/* loadLocale */');
  await fs.writeFile(path.resolve(testFolder, 'en-US.js'), `
    const obj = {
      key: 'testKey',
    };

    export default {
      modern: 'rogue',
      whisky: 'Vault',
      [obj.key]: 'testValue',
      newline: 'containes\\nnewline',
      'single-quote': 'Single Quote',
      "double-'quote'": "Double Quote",
    };
  `);
}

describe('importLocale', () => {
  const config = {
    sourceFolder: testFolder,
    supportedLocales: ['en-US', 'en-GB']
  };
  beforeEach(async () => {
    await clean();
    await generateSource();
    await exportLocale(config);
  });
  afterEach(clean);
  it('should import generated xlf files', async () => {
    const xlfPath = path.resolve(localizationFolder, 'en-GB.xlf');
    const xlfContent = await fs.readFile(xlfPath, 'utf8');
    await fs.writeFile(xlfPath, xlfContent.replace(
      '<target>Vault</target',
      '<target>Changed</target>'
    ).replace(
      '<target>testValue</target',
      '<target>testValueChanged</target>'
      ));
    await importLocale(config);
    const filePath = path.resolve(testFolder, 'en-GB.js');
    expect(await fs.exists(filePath)).to.equal(true);
    const content = await fs.readFile(filePath, 'utf8');
    let json;
    expect(() => {
      json = eval(transform(content, babelOptions).code);
    }).to.not.throw();
    expect(json.modern).to.equal('rogue');
    expect(json.whisky).to.equal('Changed');
    expect(json.testKey).to.equal('testValueChanged');
  });
  it('should generate annotations', async () => {
    await importLocale(config);
    const filePath = path.resolve(testFolder, 'en-GB.js');
    expect(await fs.exists(filePath)).to.equal(true);
    const content = await fs.readFile(filePath, 'utf8');
    expect(content.indexOf(`// @key: ${encodeValue('modern')} @source: ${encodeValue('rogue')}`) > -1).to.equal(true);
    expect(content.indexOf(`// @key: ${encodeValue('whisky')} @source: ${encodeValue('Vault')}`) > -1).to.equal(true);
    expect(content.indexOf(`// @key: ${encodeValue('[obj.key]')} @source: ${encodeValue('testValue')}`) > -1).to.equal(true);
    expect(content.indexOf(`// @key: ${encodeValue('newline')} @source: ${encodeValue('containes\nnewline')}`) > -1).to.equal(true);
  });
  it('should only import keys that exist in current source', async () => {
    await fs.writeFile(path.resolve(testFolder, 'en-US.js'), `
      const obj = {
        key: 'testKey',
      };

      export default {
        modern: 'rogue',
      };
    `);
    await importLocale(config);
    const filePath = path.resolve(testFolder, 'en-GB.js');
    expect(await fs.exists(filePath)).to.equal(true);
    const content = await fs.readFile(filePath, 'utf8');
    let json;
    expect(() => {
      json = eval(transform(content, babelOptions).code);
    }).to.not.throw();
    expect(json.modern).to.equal('rogue');
    expect(json.whisky).to.equal(undefined);
    expect(json.testKey).to.equal(undefined);
  });
  it('should only import keys where its source value is identical to current source', async () => {
    const xlfPath = path.resolve(localizationFolder, 'en-GB.xlf');
    const xlfContent = await fs.readFile(xlfPath, 'utf8');
    await fs.writeFile(xlfPath, xlfContent.replace(
      '<source>Vault</source',
      '<source>Changed</source>'
    ).replace(
      '<source>testValue</source',
      '<source>testValueChanged</source>'
      ));
    await importLocale(config);
    const filePath = path.resolve(testFolder, 'en-GB.js');
    expect(await fs.exists(filePath)).to.equal(true);
    const content = await fs.readFile(filePath, 'utf8');
    let json;
    expect(() => {
      json = eval(transform(content, babelOptions).code);
    }).to.not.throw();
    expect(json.modern).to.equal('rogue');
    expect(json.whisky).to.equal(undefined);
    expect(json.testKey).to.equal(undefined);
  });
  it('it should work for files without trailing comma', async () => {
    await fs.writeFile(path.resolve(testFolder, 'en-US.js'), `
      const obj = {
        key: 'testKey',
      };

      export default {
        modern: 'rogue',
        whisky: 'Vault',
        [obj.key]: 'testValue',
        newline: 'containes\\nnewline',
        'single-quote': 'Single Quote',
        "double-'quote'": "Double Quote",
        newKey: 'newKey'
      };
    `);
    await exportLocale(config);
    await importLocale(config);
    const filePath = path.resolve(testFolder, 'en-GB.js');
    expect(await fs.exists(filePath)).to.equal(true);
    const content = await fs.readFile(filePath, 'utf8');
    expect(() => {
      const json = eval(transform(content, babelOptions).code);
    }).to.not.throw();
  });
});


text:
using System.IO;
using System.Windows.Input;
using Newtonsoft.Json;

namespace PoE_TradeUI.Core {
    public static class Config {

        public static UserCfg UserConfig;

        static Config() {
            UserConfig = JsonConvert.DeserializeObject<UserCfg>(File.ReadAllText("Data/config.json"));
        }

        public class UserCfg {
            public Key Hotkey { get; set; }
        }
    }
}


text:
using Microsoft.Extensions.Logging;
using Maw.Cache.Abstractions;
using Maw.Data.Abstractions;
using Maw.Domain.Models;
using Maw.Domain.Models.Photos;

namespace Maw.Domain.Photos;

public class PhotoService
    : BaseService, IPhotoService
{
    readonly IPhotoRepository _repo;
    readonly IPhotoCache _cache;

    public PhotoService(
        IPhotoRepository photoRepository,
        IPhotoCache cache,
        ILogger<PhotoService> log)
        : base(log)
    {
        _repo = photoRepository ?? throw new ArgumentNullException(nameof(photoRepository));
        _cache = cache ?? throw new ArgumentNullException(nameof(cache));
    }

    public async Task<Photo?> GetRandomAsync(string[] roles)
    {
        var result = await GetRandomAsync(1, roles);

        return result.Any() ? result.First() : null;
    }

    public async Task<IEnumerable<Photo>> GetRandomAsync(byte count, string[] roles)
    {
        var photos = await GetCachedValueAsync(
            () => _cache.GetRandomPhotosAsync(roles, count),
            () => _repo.GetRandomAsync(count, roles)
        );

        return photos ?? new List<Photo>();
    }

    public async Task<IEnumerable<short>> GetYearsAsync(string[] roles)
    {
        var years = await GetCachedValueAsync(
            () => _cache.GetYearsAsync(roles),
            () => _repo.GetYearsAsync(roles)
        );

        return years ?? new List<short>();
    }

    public async Task<IEnumerable<Category>> GetAllCategoriesAsync(string[] roles)
    {
        var categories = await GetCachedValueAsync(
            () => _cache.GetCategoriesAsync(roles),
            () => _repo.GetAllCategoriesAsync(roles)
        );

        return categories ?? new List<Category>();
    }

    public async Task<IEnumerable<Category>> GetCategoriesForYearAsync(short year, string[] roles)
    {
        var categories = await GetCachedValueAsync(
            () => _cache.GetCategoriesAsync(roles, year),
            () => _repo.GetCategoriesForYearAsync(year, roles)
        );

        return categories ?? new List<Category>();
    }

    public async Task<IEnumerable<Category>> GetRecentCategoriesAsync(short sinceId, string[] roles)
    {
        return await GetCachedValueAsync(
            () => _cache.GetRecentCategoriesAsync(roles, sinceId),
            () => _repo.GetRecentCategoriesAsync(sinceId, roles)
        ) ;
    }

    public async Task<IEnumerable<Photo>> GetPhotosForCategoryAsync(short categoryId, string[] roles)
    {
        var photos = await GetCachedValueAsync(
            () => _cache.GetPhotosAsync(roles, categoryId),
            () => _repo.GetPhotosForCategoryAsync(categoryId, roles)
        );

        return photos ?? new List<Photo>();
    }

    public Task<Category?> GetCategoryAsync(short categoryId, string[] roles)
    {
        return GetNullableCachedValueAsync(
            () => _cache.GetCategoryAsync(roles, categoryId),
            () => _repo.GetCategoryAsync(categoryId, roles)
        );
    }

    public Task<Photo?> GetPhotoAsync(int photoId, string[] roles)
    {
        return GetNullableCachedValueAsync(
            () => _cache.GetPhotoAsync(roles, photoId),
            () => _repo.GetPhotoAsync(photoId, roles)
        );
    }

    public async Task<Detail?> GetDetailAsync(int photoId, string[] roles)
    {
        return await GetOrSetCachedValueAsync(
            () => _cache.GetPhotoDetailsAsync(roles, photoId),
            () => _repo.GetDetailAsync(photoId, roles),
            detail => _cache.AddPhotoDetailsAsync(photoId, detail)
        );
    }

    public Task<IEnumerable<Comment>> GetCommentsAsync(int photoId, string[] roles)
    {
        return _repo.GetCommentsAsync(photoId, roles);
    }

    public Task<Rating?> GetRatingsAsync(int photoId, string username, string[] roles)
    {
        return _repo.GetRatingsAsync(photoId, username, roles);
    }

    public Task<GpsDetail?> GetGpsDetailAsync(int photoId, string[] roles)
    {
        return _repo.GetGpsDetailAsync(photoId, roles);
    }

    public Task InsertCommentAsync(int photoId, string username, string comment, string[] roles)
    {
        return _repo.InsertCommentAsync(photoId, username, comment, roles);
    }

    public Task<float?> SaveRatingAsync(int photoId, string username, short rating, string[] roles)
    {
        return _repo.SaveRatingAsync(photoId, username, rating, roles);
    }

    public Task<float?> RemoveRatingAsync(int photoId, string username, string[] roles)
    {
        return _repo.RemoveRatingAsync(photoId, username, roles);
    }

    public Task SetGpsOverrideAsync(int photoId, GpsCoordinate gps, string username)
    {
        return _repo.SetGpsOverrideAsync(photoId, gps, username);
    }

    public async Task SetCategoryTeaserAsync(short categoryId, int photoId)
    {
        var count = await _repo.SetCategoryTeaserAsync(categoryId, photoId);

        if (count != 1)
        {
            throw new ApplicationException("Did not update category teaser!");
        }

        var cat = await _repo.GetCategoryAsync(categoryId, null);

        if(cat != null)
        {
            await _cache.AddCategoryAsync(new SecuredResource<Category>(cat, Array.Empty<string>()));
        }
    }

    public Task<IEnumerable<CategoryAndRoles>> GetCategoriesAndRolesAsync()
    {
        return _repo.GetCategoriesAndRolesAsync();
    }
}


text:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <gst/check/gstcheck.h>
#include <gst/check/gstbufferstraw.h>

#include <theora/theora.h>

#ifndef GST_DISABLE_PARSE

#define TIMESTAMP_OFFSET G_GINT64_CONSTANT(3249870963)
#define FRAMERATE 10

/* I know all of these have a shift of 6 bits */
#define GRANULEPOS_SHIFT 6

#define check_buffer_is_header(buffer,is_header) \
  fail_unless (GST_BUFFER_FLAG_IS_SET (buffer,   \
          GST_BUFFER_FLAG_HEADER) == is_header, \
      "GST_BUFFER_IN_CAPS is set to %d but expected %d", \
      GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_HEADER), is_header)

#define check_buffer_timestamp(buffer,timestamp) \
  fail_unless (GST_BUFFER_TIMESTAMP (buffer) == timestamp, \
      "expected timestamp %" GST_TIME_FORMAT \
      ", but got timestamp %" GST_TIME_FORMAT, \
      GST_TIME_ARGS (timestamp), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)))

#define check_buffer_duration(buffer,duration) \
  fail_unless (GST_BUFFER_DURATION (buffer) == duration, \
      "expected duration %" GST_TIME_FORMAT \
      ", but got duration %" GST_TIME_FORMAT, \
      GST_TIME_ARGS (duration), GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)))

static gboolean old_libtheora;

static void
check_libtheora (void)
{
  old_libtheora = (theora_version_number () <= 0x00030200);
}

static void
check_buffer_granulepos (GstBuffer * buffer, gint64 granulepos)
{
  GstClockTime clocktime;
  int framecount;

  /* With old versions of libtheora, the granulepos represented the
   * start time, not end time. Adapt for that. */
  if (old_libtheora) {
    if (granulepos >> GRANULEPOS_SHIFT)
      granulepos -= 1 << GRANULEPOS_SHIFT;
    else if (granulepos)
      granulepos -= 1;
  }

  fail_unless (GST_BUFFER_OFFSET_END (buffer) == granulepos,
      "expected granulepos %" G_GUINT64_FORMAT
      ", but got granulepos %" G_GUINT64_FORMAT,
      granulepos, GST_BUFFER_OFFSET_END (buffer));

  /* contrary to what we record as TIMESTAMP, we can use OFFSET to check
   * the granulepos correctly here */
  framecount = GST_BUFFER_OFFSET_END (buffer);
  framecount = granulepos >> GRANULEPOS_SHIFT;
  framecount += granulepos & ((1 << GRANULEPOS_SHIFT) - 1);
  clocktime = gst_util_uint64_scale (framecount, GST_SECOND, FRAMERATE);

  fail_unless (clocktime == GST_BUFFER_OFFSET (buffer),
      "expected OFFSET set to clocktime %" GST_TIME_FORMAT
      ", but got %" GST_TIME_FORMAT,
      GST_TIME_ARGS (clocktime), GST_TIME_ARGS (GST_BUFFER_OFFSET (buffer)));
}

/* this check is here to check that the granulepos we derive from the
   timestamp is about correct. This is "about correct" because you can't
   precisely go from timestamp to granulepos due to the downward-rounding
   characteristics of gst_util_uint64_scale, so you check if granulepos is
   equal to the number, or the number plus one. */
/* should be from_endtime, but theora's granulepos mapping is "special" */
static void
check_buffer_granulepos_from_starttime (GstBuffer * buffer,
    GstClockTime starttime)
{
  gint64 granulepos, expected, framecount;

  granulepos = GST_BUFFER_OFFSET_END (buffer);
  /* Now convert to 'granulepos for start time', depending on libtheora
   * version */
  if (!old_libtheora) {
    if (granulepos & ((1 << GRANULEPOS_SHIFT) - 1))
      granulepos -= 1;
    else if (granulepos)
      granulepos -= 1 << GRANULEPOS_SHIFT;
  }

  framecount = granulepos >> GRANULEPOS_SHIFT;
  framecount += granulepos & ((1 << GRANULEPOS_SHIFT) - 1);
  expected = gst_util_uint64_scale (starttime, FRAMERATE, GST_SECOND);

  fail_unless (framecount == expected || framecount == expected + 1,
      "expected frame count %" G_GUINT64_FORMAT
      " or %" G_GUINT64_FORMAT
      ", but got frame count %" G_GUINT64_FORMAT,
      expected, expected + 1, framecount);
}

GST_START_TEST (test_granulepos_offset)
{
  GstElement *bin;
  GstPad *pad;
  gchar *pipe_str;
  GstBuffer *buffer;
  GError *error = NULL;

  pipe_str = g_strdup_printf ("videotestsrc timestamp-offset=%" G_GUINT64_FORMAT
      " num-buffers=10 ! video/x-raw,format=(string)I420,framerate=10/1"
      " ! theoraenc ! fakesink name=fs0", TIMESTAMP_OFFSET);

  bin = gst_parse_launch (pipe_str, &error);
  fail_unless (bin != NULL, "Error parsing pipeline: %s",
      error ? error->message : "(invalid error)");
  g_free (pipe_str);

  /* get the pad */
  {
    GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fs0");

    fail_unless (sink != NULL, "Could not get fakesink out of bin");
    pad = gst_element_get_static_pad (sink, "sink");
    fail_unless (pad != NULL, "Could not get pad out of fakesink");
    gst_object_unref (sink);
  }

  gst_buffer_straw_start_pipeline (bin, pad);

  /* header packets should have timestamp == NONE, granulepos 0, IN_CAPS */
  buffer = gst_buffer_straw_get_buffer (bin, pad);
  check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_granulepos (buffer, 0);
  check_buffer_is_header (buffer, TRUE);
  gst_buffer_unref (buffer);

  buffer = gst_buffer_straw_get_buffer (bin, pad);
  check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_granulepos (buffer, 0);
  check_buffer_is_header (buffer, TRUE);
  gst_buffer_unref (buffer);

  buffer = gst_buffer_straw_get_buffer (bin, pad);
  check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_granulepos (buffer, 0);
  check_buffer_is_header (buffer, TRUE);
  gst_buffer_unref (buffer);

  {
    GstClockTime next_timestamp;
    gint64 last_granulepos;

    /* first buffer should have timestamp of TIMESTAMP_OFFSET, granulepos to
     * match the timestamp of the end of the last sample in the output buffer.
     * Note that one cannot go timestamp->granulepos->timestamp and get the
     * same value due to loss of precision with granulepos. theoraenc does
     * take care to timestamp correctly based on the offset of the input data
     * however, so it does do sub-granulepos timestamping. */
    buffer = gst_buffer_straw_get_buffer (bin, pad);
    last_granulepos = GST_BUFFER_OFFSET_END (buffer);
    check_buffer_timestamp (buffer, TIMESTAMP_OFFSET);
    /* don't really have a good way of checking duration... */
    check_buffer_granulepos_from_starttime (buffer, TIMESTAMP_OFFSET);
    check_buffer_is_header (buffer, FALSE);

    next_timestamp = TIMESTAMP_OFFSET + GST_BUFFER_DURATION (buffer);

    gst_buffer_unref (buffer);

    /* check continuity with the next buffer */
    buffer = gst_buffer_straw_get_buffer (bin, pad);
    check_buffer_timestamp (buffer, next_timestamp);
    check_buffer_duration (buffer,
        gst_util_uint64_scale (GST_BUFFER_OFFSET_END (buffer), GST_SECOND,
            FRAMERATE)
        - gst_util_uint64_scale (last_granulepos, GST_SECOND, FRAMERATE));
    check_buffer_granulepos_from_starttime (buffer, next_timestamp);
    check_buffer_is_header (buffer, FALSE);

    gst_buffer_unref (buffer);
  }

  gst_buffer_straw_stop_pipeline (bin, pad);

  gst_object_unref (pad);
  gst_object_unref (bin);
}

GST_END_TEST;

GST_START_TEST (test_continuity)
{
  GstElement *bin;
  GstPad *pad;
  gchar *pipe_str;
  GstBuffer *buffer;
  GError *error = NULL;

  pipe_str = g_strdup_printf ("videotestsrc num-buffers=10"
      " ! video/x-raw,format=(string)I420,framerate=10/1"
      " ! theoraenc ! fakesink name=fs0");

  bin = gst_parse_launch (pipe_str, &error);
  fail_unless (bin != NULL, "Error parsing pipeline: %s",
      error ? error->message : "(invalid error)");
  g_free (pipe_str);

  /* get the pad */
  {
    GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fs0");

    fail_unless (sink != NULL, "Could not get fakesink out of bin");
    pad = gst_element_get_static_pad (sink, "sink");
    fail_unless (pad != NULL, "Could not get pad out of fakesink");
    gst_object_unref (sink);
  }

  gst_buffer_straw_start_pipeline (bin, pad);

  /* header packets should have timestamp == NONE, granulepos 0 */
  buffer = gst_buffer_straw_get_buffer (bin, pad);
  check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_granulepos (buffer, 0);
  check_buffer_is_header (buffer, TRUE);
  gst_buffer_unref (buffer);

  buffer = gst_buffer_straw_get_buffer (bin, pad);
  check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_granulepos (buffer, 0);
  check_buffer_is_header (buffer, TRUE);
  gst_buffer_unref (buffer);

  buffer = gst_buffer_straw_get_buffer (bin, pad);
  check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
  check_buffer_granulepos (buffer, 0);
  check_buffer_is_header (buffer, TRUE);
  gst_buffer_unref (buffer);

  {
    GstClockTime next_timestamp;

    /* first buffer should have timestamp of TIMESTAMP_OFFSET, granulepos to
     * match the timestamp of the end of the last sample in the output buffer.
     * Note that one cannot go timestamp->granulepos->timestamp and get the
     * same value due to loss of precision with granulepos. theoraenc does
     * take care to timestamp correctly based on the offset of the input data
     * however, so it does do sub-granulepos timestamping. */
    buffer = gst_buffer_straw_get_buffer (bin, pad);
    check_buffer_timestamp (buffer, 0);
    /* plain division because I know the answer is exact */
    check_buffer_duration (buffer, GST_SECOND / 10);
    check_buffer_granulepos (buffer, 1 << GRANULEPOS_SHIFT);
    check_buffer_is_header (buffer, FALSE);

    next_timestamp = GST_BUFFER_DURATION (buffer);

    gst_buffer_unref (buffer);

    /* check continuity with the next buffer */
    buffer = gst_buffer_straw_get_buffer (bin, pad);
    check_buffer_timestamp (buffer, next_timestamp);
    check_buffer_duration (buffer, GST_SECOND / 10);
    check_buffer_granulepos (buffer, (1 << GRANULEPOS_SHIFT) | 1);
    check_buffer_is_header (buffer, FALSE);

    gst_buffer_unref (buffer);
  }

  gst_buffer_straw_stop_pipeline (bin, pad);

  gst_object_unref (pad);
  gst_object_unref (bin);
}

GST_END_TEST;

#endif /* #ifndef GST_DISABLE_PARSE */

static Suite *
theoraenc_suite (void)
{
  Suite *s = suite_create ("theoraenc");
  TCase *tc_chain = tcase_create ("general");

  suite_add_tcase (s, tc_chain);

  check_libtheora ();

#ifndef GST_DISABLE_PARSE
  tcase_add_test (tc_chain, test_granulepos_offset);
  tcase_add_test (tc_chain, test_continuity);
#endif

  return s;
}

GST_CHECK_MAIN (theoraenc);


text:
docker login -u $DOCKER_LOGIN -p $DOCKER_PASS
docker build -t $TRAVIS_REPO_SLUG:latest .
docker push $TRAVIS_REPO_SLUG


text:
import { ShellString, test, mkdir, cd, sed, exit, exec } from 'shelljs'
import { join } from 'path'

function pascalToDash (str) {
  return str.split(/(?=[A-Z])/).join('-').toLowerCase()
}

function toCamelCase (str) {
  return str.charAt(0).toLowerCase() + str.substr(1)
}

function getVueComponent (name) {
  return `<template>

    <slot />

</template>

`.trim()
}

function getTestFile (name) {
  const compName = pascalToDash(name)
  const singleName = name.replace('Md', '').toLowerCase()

  return `import mountTemplate from 'test/utils/mountTemplate'
import ${name} from './${name}.vue'

test('should render the ${singleName}', async () => {
  const template = '<${compName}>Lorem ipsum</${compName}>'
  const wrapper = await mountTemplate(${name}, template)

  expect(wrapper.hasClass('${compName}')).toBe(true)
  expect(wrapper.text()).toBe('Lorem ipsum')
})

test('should render the theme class', async () => {
  const template = '<${compName} md-theme="alt">Lorem ipsum</${compName}>'
  const wrapper = await mountTemplate(${name}, template)

  expect(wrapper.hasClass('md-theme-alt')).toBe(true)
})
`.trim()
}

function getThemeFile (name) {
  return `.${pascalToDash(name)} {
  @include md-theme-component() {

  }
}
`.trim()
}

function getIndexFile (name) {
  return `import material from 'vue-material/material'
import ${name} from './${name}'

export default Vue => {
  material(Vue)
  Vue.component(${name}.name, ${name})
}
`.trim()
}

function getDocsFile (name) {
  const singleName = name.replace('Md', '')
  const docName = name.replace('Md', 'Doc')

  return `<example src="./examples/Example.vue" />

<template>
  <page-container centered :title="$t('pages.${toCamelCase(singleName)}.title')">

Lorem ipsum

${singleName}

      <api-item title="API - ${pascalToDash(name)}">

This component do not have any extra option.

      </api-item>

  </page-container>
</template>

`.trim()
}

function getExampleFile (name) {
  const compName = pascalToDash(name)

  return `<template>

    <${compName}>Lorem ipsum</${compName}>

</template>

`.trim()
}

const writeToFile = (contents, file) => {
  new ShellString(contents).to(file)
}

const writeToEndOfFile = (contents, file) => {
  new ShellString(contents).toEnd(file)
}

const [name] = process.argv.slice(2)

if (!name) {
  exit('Please provide the file name. Example: npm new-component \'MdComponent\'')
}

const singleName = name.replace('Md', '')
const camelCasedName = toCamelCase(singleName.replace('Md', ''))
const rootDir = join(__dirname, '..')
const componentsPath = 'src/components/' + name
const componentIndex = 'src/components/index.js'
const themePath = 'src/theme/all.scss'
const docsPath = 'docs/app/pages/Components/' + singleName
const docsRoutePath = 'docs/app/routes.js'
const navPath = 'docs/app/template/MainNavContent.vue'

if (!test('-e', componentsPath)) {
  mkdir('-p', componentsPath)
  cd(componentsPath)
  writeToFile(getVueComponent(name), name + '.vue')
  writeToFile(getTestFile(name), name + '.test.js')
  writeToFile(getThemeFile(name), 'theme.scss')
  writeToFile(getIndexFile(name), 'index.js')

  cd(rootDir)
  sed('-i', 'MdApp,', `${name},\n  MdApp,`, componentIndex)
  sed('-i', `import MdApp from './MdApp'`, `import MdApp from './MdApp'\nimport ${name} from './${name}'`, componentIndex)

  cd(rootDir)
  writeToEndOfFile(`@import "../components/${name}/theme";`, themePath)
  cd(rootDir)
} else {
  exit(`echo 'This component already exists'`)
}

if (!test('-e', docsPath)) {
  const compName = pascalToDash(name.replace('Md', ''))

  mkdir('-p', docsPath + '/examples')
  cd(docsPath)
  writeToFile(getDocsFile(name), singleName + '.vue')
  cd('examples')
  writeToFile(getExampleFile(name), 'Example.vue')

  cd(rootDir)
  sed('-i', 'export const routes = \\[', `export const routes = [
  {
    path: '/components/${compName}',
    name: 'components/${compName}',
    page: 'Components/${singleName}/${singleName}.vue'
  },`, docsRoutePath)

  sed('-i', '<router-link to="/components/app">', `<router-link to="/components/${compName}">{{ $t('pages.${camelCasedName}.title') }}</router-link>\n      <router-link to="/components/app">`, navPath)
} else {
  exit(`echo 'This component already exists'`)
}

exec('yarn lint --fix')


text:
package net.sansa_stack.owl.spark.dataset

import com.esotericsoftware.kryo.Kryo
import de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer
import org.apache.spark.serializer.KryoRegistrator

class UnmodifiableCollectionKryoRegistrator extends KryoRegistrator {
  override def registerClasses(kryo: Kryo): Unit = {
    // scalastyle:off classforname
    val cls = Class.forName("java.util.Collections$UnmodifiableCollection")
    // scalastyle:on classforname

    kryo.addDefaultSerializer(cls, new UnmodifiableCollectionsSerializer)
  }
}


text:
package io.mewbase.eventsource;

import io.mewbase.bson.BsonObject;

import java.util.stream.LongStream;

public class EventSinkUtils {

    final EventSink sink;

    public EventSinkUtils(final EventSink eventSink)  {
       sink = eventSink;
    }

    public void sendNumberedEvents(final String channelName, final Long startInclusive,final Long endInclusive) throws Exception {
        LongStream.rangeClosed(startInclusive,endInclusive).forEach( l -> {
            final BsonObject bsonEvent = new BsonObject().put("num", l);
            try {
                sink.publishSync(channelName, bsonEvent);
            } catch(Exception exp) {
                // wrap and rethrow
                throw new RuntimeException(exp);
            }
        } );
    }

}