text:
package com.codeabovelab.dm.cluman.cluster.docker.model.swarm;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

/**
 * https://github.com/docker/docker/blob/a5da9f5cc911da603a41bb77ca1ccbb0848d6260/api/types/swarm/task.go#L70
 */
@Data
@AllArgsConstructor
@Builder(builderClassName = "Builder")
public class TaskResources {

    /**
     * CPU limit in units of 10^-9 CPU shares.
     */
    @JsonProperty("NanoCPUs")
    private final long nanoCPUs;

    @JsonProperty("MemoryBytes")
    private final long memory;
}

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Caloplaca cupreorufa Zahlbr.

### Remarks
null


text:
============
Installation
============

There are two ways to install Egison: installing with package manager or installing from Haskell Platform.
The former method is available for only Linux and Mac users, while the latter is available for every user.

+----------+-------------------------------+--------------------------------+
|          | Install with package manager  | Install from Haskell Platform  |
+----------+-------------------------------+--------------------------------+
| Linux    | O (:ref:`yum` or :ref:`dpkg`) | O                              |
+----------+-------------------------------+--------------------------------+
| MacOS    | O (:ref:`homebrew`)           | O                              |
+----------+-------------------------------+--------------------------------+
| Windows  | X                             | O                              |
+----------+-------------------------------+--------------------------------+

Install with Package Manager
============================

.. _yum:

``yum``
-------

::

   $ sudo yum install https://git.io/egison.x86_64.rpm https://git.io/egison-tutorial.x86_64.rpm

.. _dpkg:

``dpkg``
--------

::

   $ wget https://git.io/egison.x86_64.deb https://git.io/egison-tutorial.x86_64.deb
   $ sudo dpkg -i ./egison*.deb

.. _homebrew:

Homebrew
--------

::

   $ brew update
   $ brew tap egison/egison
   $ brew install egison egison-tutorial

Install from Haskell Platform
=============================

1. Install Haskell Platform
---------------------------

To install Egison, you need to install `Haskell Platform <https://www.haskell.org/platform/>`_.
This is because Egison is implemented in Haskell and distributed as a `Hackage <https://hackage.haskell.org/>`_ package.

If you use ``apt-get``, execute the following commands.

::

   $ sudo apt-get update
   $ sudo apt-get install haskell-platform libncurses5-dev

Otherwise, download an installer from `here <https://www.haskell.org/platform/>`_.

2. Install Egison via Hackage
-----------------------------

After you installed Haskell Platform, perform the following commands in the terminal.

::

   $ cabal update
   $ cabal install egison egison-tutorial
   ...
   Installing executable(s) in /home/xxx/.cabal/bin
   Registering egison-X.X.X...

When the installation is finished, there will be a message that tells the location of the installed binary.
Add the path to the ``$PATH`` vairable so that your shell can find the ``egison`` command.
For example, if you are using bash, run the following commands.

::

   $ echo "PATH=\$PATH:/home/xxx/.cabal/bin" >> ~/.bashrc
   $ source ~/.bashrc


text:
#include <stdio.h>
#include <highgui.h>

int main(int argc, char *argv[])
{
    int camera_id = -1;

    if(argc == 2) {
        if(0 == strcmp(argv[1], "-h")) {
            fprintf(stderr, "Usage: %s [CAMERA_ID]\n", argv[0]);
            exit(0);
        } else {
            camera_id = atoi(argv[1]);
        }
    }

    CvCapture* capture = cvCreateCameraCapture(camera_id);  // camera id number (-1=any camera)

    if(capture == NULL) {
        fprintf(stderr, "Error: cannot find any camera.\n");
        exit(1);
    } else {
        fprintf(stdout, "Press Esc to close the window.\n");
    }

    cvNamedWindow("Capture video snippet", CV_WINDOW_AUTOSIZE);

    IplImage* frame;

    while(1) {
        frame = cvQueryFrame(capture);
        if(!frame) break;

        cvShowImage("Capture video snippet", frame);

        char c = cvWaitKey(40); // wait for 40ms (40ms -> 25fps)
        if(c==27) break;        // 27 = Esc key
    }

    cvReleaseCapture(&capture);
    cvDestroyWindow("Capture video snippet");

    return 0;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        tools:text="@string/page_chrome"
        style="@style/Base.TextAppearance.AppCompat.Medium.Inverse"
        android:id="@+id/text_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="312dp"
        android:maxWidth="300dp"
        android:padding="4dp" />

    <ImageView
        android:id="@+id/image_large"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="12dp"
        android:src="@drawable/ic_chrome_large" />

    <ImageView
        android:id="@+id/image_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right"
        android:layout_marginTop="148dp"
        android:layout_marginRight="48dp"
        android:src="@drawable/ic_chrome" />
</FrameLayout>


text:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>JavaScript on Nikola's Blog</title>
    <link>https://nshahpazov.github.io/tags/javascript/</link>
    <description>Recent content in JavaScript on Nikola's Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 04 Oct 2015 23:11:25 +0300</lastBuildDate>

	<atom:link href="https://nshahpazov.github.io/tags/javascript/index.xml" rel="self" type="application/rss+xml" />

    <item>
      <title>Functional Programming With Javascript. Part 1</title>
      <link>https://nshahpazov.github.io/posts/2015-10-04-functional-programming-with-javascript-part-1/</link>
      <pubDate>Sun, 04 Oct 2015 23:11:25 +0300</pubDate>

      <guid>https://nshahpazov.github.io/posts/2015-10-04-functional-programming-with-javascript-part-1/</guid>
      <description>In this series of articles we are going to go deeply into functional programming language concepts using the Javascript programming language.  What is Functional Programming  Functional Programming is not something new. We can track functional programming back to the 1930s with the introduction of Lambda Calculus by Alonzo Church, far before there was any computer programming language at all. You can read more about lambda calculus here. So what exactly is functional programming?</description>
    </item>

  </channel>
</rss>


text:
package org.pentaho.di.trans.steps.googleanalytics;

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

import org.pentaho.di.core.CheckResult;
import org.pentaho.di.core.CheckResultInterface;
import org.pentaho.di.core.Const;
import org.pentaho.di.core.database.DatabaseMeta;
import org.pentaho.di.core.encryption.Encr;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.exception.KettleValueException;
import org.pentaho.di.core.exception.KettleXMLException;
import org.pentaho.di.core.row.RowMetaInterface;
import org.pentaho.di.core.row.ValueMeta;
import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.di.core.variables.VariableSpace;
import org.pentaho.di.core.xml.XMLHandler;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.repository.ObjectId;
import org.pentaho.di.repository.Repository;
import org.pentaho.di.trans.Trans;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.BaseStepMeta;
import org.pentaho.di.trans.step.StepDataInterface;
import org.pentaho.di.trans.step.StepInterface;
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.StepMetaInterface;
import org.pentaho.metastore.api.IMetaStore;
import org.w3c.dom.Node;

public class GaInputStepMeta extends BaseStepMeta implements StepMetaInterface {

  private static Class<?> PKG = GaInputStepMeta.class; // for i18n purposes

  public static final String GA_MANAGEMENT_URL = "https://www.googleapis.com/analytics/v2.4/management";
  public static final String GA_DATA_URL = "https://www.googleapis.com/analytics/v2.4/data";

  public static final String FIELD_TYPE_CONFIDENCE_INTERVAL = "Confidence Interval for Metric";
  public static final String FIELD_TYPE_DIMENSION = "Dimension";
  public static final String FIELD_TYPE_METRIC = "Metric";
  public static final String FIELD_TYPE_DATA_SOURCE_PROPERTY = "Data Source Property";
  public static final String FIELD_TYPE_DATA_SOURCE_FIELD = "Data Source Field";
  public static final String FIELD_DATA_SOURCE_TABLE_ID = "dxp:tableId";
  public static final String FIELD_DATA_SOURCE_TABLE_NAME = "dxp:tableName";

  public static final String DEFAULT_GA_APPLICATION_NAME = "type-exit.org kettle plugin";

  private String gaAppName;
  private String gaEmail;
  private String gaPassword;
  private String gaProfileTableId;
  private String gaProfileName;
  private String gaApiKey;
  private boolean useCustomTableId;
  private String gaCustomTableId;
  private String startDate;
  private String endDate;
  private String dimensions;
  private String metrics;
  private String filters;
  private String sort;
  private boolean useSegment;

  private boolean useCustomSegment;
  private int rowLimit;

  private String customSegment;
  private String segmentName;
  private String segmentId;

  private String[] feedField;
  private String[] feedFieldType;
  private String[] outputField;
  private int[] outputType;
  private String[] conversionMask;

  public GaInputStepMeta() {
    super();
  }

  public int getRowLimit() {
    return rowLimit;
  }

  public void setRowLimit( int rowLimit ) {
    if ( rowLimit < 0 ) {
      rowLimit = 0;
    }
    this.rowLimit = rowLimit;
  }

  public String[] getConversionMask() {
    return conversionMask;
  }

  public String getGaAppName() {
    return gaAppName;
  }

  public void setGaAppName( String gaAppName ) {
    this.gaAppName = gaAppName;
  }

  public boolean isUseCustomTableId() {
    return useCustomTableId;
  }

  public void setUseCustomTableId( boolean useCustomTableId ) {
    this.useCustomTableId = useCustomTableId;
  }

  public String getGaCustomTableId() {
    return gaCustomTableId;
  }

  public void setGaCustomTableId( String gaCustomTableId ) {
    this.gaCustomTableId = gaCustomTableId;
  }

  public boolean isUseSegment() {
    return useSegment;
  }

  public void setUseSegment( boolean useSegment ) {
    this.useSegment = useSegment;
  }

  public String getSegmentName() {
    return segmentName;
  }

  public void setSegmentName( String segmentName ) {
    this.segmentName = segmentName;
  }

  public String getSegmentId() {
    return segmentId;
  }

  public void setSegmentId( String segmentId ) {
    this.segmentId = segmentId;
  }

  public boolean isUseCustomSegment() {
    return useCustomSegment;
  }

  public void setUseCustomSegment( boolean useCustomSegment ) {
    this.useCustomSegment = useCustomSegment;
  }

  public String getCustomSegment() {
    return customSegment;
  }

  public void setCustomSegment( String customSegment ) {
    this.customSegment = customSegment;
  }

  public String getDimensions() {
    return dimensions;
  }

  public void setDimensions( String dimensions ) {
    this.dimensions = dimensions;
  }

  public String getMetrics() {
    return metrics;
  }

  public void setMetrics( String metrics ) {
    this.metrics = metrics;
  }

  public String getFilters() {
    return filters;
  }

  public void setFilters( String filters ) {
    this.filters = filters;
  }

  public String getSort() {
    return sort;
  }

  public void setSort( String sort ) {
    this.sort = sort;
  }

  public String getStartDate() {
    return startDate;
  }

  public void setStartDate( String startDate ) {
    this.startDate = startDate;
  }

  public String getEndDate() {
    return endDate;
  }

  public void setEndDate( String endDate ) {
    this.endDate = endDate;
  }

  public String getGaEmail() {
    return gaEmail;
  }

  public void setGaEmail( String email ) {
    this.gaEmail = email;
  }

  public String getGaPassword() {
    return gaPassword;
  }

  public void setGaPassword( String gaPassword ) {
    this.gaPassword = gaPassword;
  }

  public String getGaProfileTableId() {
    return gaProfileTableId;
  }

  public void setGaProfileTableId( String gaProfile ) {
    this.gaProfileTableId = gaProfile;
  }

  public String getGaProfileName() {
    return gaProfileName;
  }

  public void setGaProfileName( String gaProfileName ) {
    this.gaProfileName = gaProfileName;
  }

  public String[] getFeedFieldType() {
    return feedFieldType;
  }

  public String[] getFeedField() {
    return feedField;
  }

  public String[] getOutputField() {
    return outputField;
  }

  public int[] getOutputType() {
    return outputType;
  }

  public String getGaApiKey() {
    return gaApiKey;
  }

  public void setGaApiKey( String gaApiKey ) {
    this.gaApiKey = gaApiKey;
  }

  // set sensible defaults for a new step
  public void setDefault() {
    gaEmail = "your.account@googlemail.com";
    useSegment = true;
    segmentId = "gaid::-1";
    segmentName = "All Visits";
    dimensions = "ga:browser";
    metrics = "ga:visits";
    startDate = new SimpleDateFormat( "yyyy-MM-dd" ).format( new Date() );
    endDate = new String( startDate );
    sort = "-ga:visits";
    gaAppName = DEFAULT_GA_APPLICATION_NAME;
    rowLimit = 0;
    gaApiKey = "";
    // default is to have no key lookup settings
    allocate( 0 );

  }

  // helper method to allocate the arrays
  public void allocate( int nrkeys ) {

    feedField = new String[nrkeys];
    outputField = new String[nrkeys];
    outputType = new int[nrkeys];
    feedFieldType = new String[nrkeys];
    conversionMask = new String[nrkeys];
  }

  public void getFields( RowMetaInterface r, String origin, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) {

    // clear the output
    r.clear();
    // append the outputFields to the output
    for ( int i = 0; i < outputField.length; i++ ) {
      ValueMetaInterface v = new ValueMeta( outputField[i], outputType[i] );
      // that would influence the output
      // v.setConversionMask(conversionMask[i]);
      v.setOrigin( origin );
      r.addValueMeta( v );
    }

  }

  public Object clone() {

    // field by field copy is default
    GaInputStepMeta retval = (GaInputStepMeta) super.clone();

    // add proper deep copy for the collections
    int nrKeys = feedField.length;

    retval.allocate( nrKeys );

    for ( int i = 0; i < nrKeys; i++ ) {
      retval.feedField[i] = feedField[i];
      retval.outputField[i] = outputField[i];
      retval.outputType[i] = outputType[i];
      retval.feedFieldType[i] = feedFieldType[i];
      retval.conversionMask[i] = conversionMask[i];
    }

    return retval;
  }

  private boolean getBooleanAttributeFromNode( Node node, String tag ) {
    String sValue = XMLHandler.getTagValue( node, tag );
    return ( sValue != null && sValue.equalsIgnoreCase( "Y" ) );

  }

  public String getXML() throws KettleValueException {

    StringBuffer retval = new StringBuffer( 800 );

    retval.append( "    " ).append( XMLHandler.addTagValue( "user", gaEmail ) );
    retval.append( "    " ).append(
      XMLHandler.addTagValue( "pass", "Encrypted " + Encr.encryptPassword( gaPassword ) ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "appName", gaAppName ) );
    retval.append( "    " ).append(
      XMLHandler.addTagValue( "apiKey", "Encrypted " + Encr.encryptPassword( gaApiKey ) ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "profileName", gaProfileName ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "profileTableId", gaProfileTableId ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "customTableId", gaCustomTableId ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "useCustomTableId", useCustomTableId ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "startDate", startDate ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "endDate", endDate ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "dimensions", dimensions ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "metrics", metrics ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "filters", filters ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "sort", sort ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "useSegment", useSegment ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "useCustomSegment", useCustomSegment ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "customSegment", customSegment ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "segmentId", segmentId ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "segmentName", segmentName ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( "rowLimit", rowLimit ) );

    for ( int i = 0; i < feedField.length; i++ ) {
      retval.append( "      <feedField>" ).append( Const.CR );
      retval.append( "        " ).append( XMLHandler.addTagValue( "feedFieldType", feedFieldType[i] ) );
      retval.append( "        " ).append( XMLHandler.addTagValue( "feedField", feedField[i] ) );
      retval.append( "        " ).append( XMLHandler.addTagValue( "outField", outputField[i] ) );
      retval
        .append( "        " ).append( XMLHandler.addTagValue( "type", ValueMeta.getTypeDesc( outputType[i] ) ) );
      retval.append( "        " ).append( XMLHandler.addTagValue( "conversionMask", conversionMask[i] ) );
      retval.append( "      </feedField>" ).append( Const.CR );
    }

    return retval.toString();
  }

  public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore )
    throws KettleXMLException {

    try {

      gaEmail = XMLHandler.getTagValue( stepnode, "user" );
      gaPassword = Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( stepnode, "pass" ) );
      gaAppName = XMLHandler.getTagValue( stepnode, "appName" );
      gaApiKey = Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( stepnode, "apiKey" ) );
      gaProfileName = XMLHandler.getTagValue( stepnode, "profileName" );
      gaProfileTableId = XMLHandler.getTagValue( stepnode, "profileTableId" );
      gaCustomTableId = XMLHandler.getTagValue( stepnode, "customTableId" );
      useCustomTableId = getBooleanAttributeFromNode( stepnode, "useCustomTableId" );
      startDate = XMLHandler.getTagValue( stepnode, "startDate" );
      endDate = XMLHandler.getTagValue( stepnode, "endDate" );
      dimensions = XMLHandler.getTagValue( stepnode, "dimensions" );
      metrics = XMLHandler.getTagValue( stepnode, "metrics" );
      filters = XMLHandler.getTagValue( stepnode, "filters" );
      sort = XMLHandler.getTagValue( stepnode, "sort" );
      useSegment =
        XMLHandler.getTagValue( stepnode, "useSegment" ) == null ? true : getBooleanAttributeFromNode(
          stepnode, "useSegment" ); // assume true for non-present
      useCustomSegment = getBooleanAttributeFromNode( stepnode, "useCustomSegment" );
      customSegment = XMLHandler.getTagValue( stepnode, "customSegment" );
      segmentId = XMLHandler.getTagValue( stepnode, "segmentId" );
      segmentName = XMLHandler.getTagValue( stepnode, "segmentName" );
      rowLimit = Const.toInt( XMLHandler.getTagValue( stepnode, "rowLimit" ), 0 );

      allocate( 0 );

      int nrFields = XMLHandler.countNodes( stepnode, "feedField" );
      allocate( nrFields );

      for ( int i = 0; i < nrFields; i++ ) {
        Node knode = XMLHandler.getSubNodeByNr( stepnode, "feedField", i );

        feedFieldType[i] = XMLHandler.getTagValue( knode, "feedFieldType" );
        feedField[i] = XMLHandler.getTagValue( knode, "feedField" );
        outputField[i] = XMLHandler.getTagValue( knode, "outField" );
        outputType[i] = ValueMeta.getType( XMLHandler.getTagValue( knode, "type" ) );
        conversionMask[i] = XMLHandler.getTagValue( knode, "conversionMask" );

        if ( outputType[i] < 0 ) {
          outputType[i] = ValueMetaInterface.TYPE_STRING;
        }

      }

    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString( PKG, "GoogleAnalytics.Error.UnableToReadFromXML" ), e );
    }

  }

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
    throws KettleException {
    try {

      gaEmail = rep.getStepAttributeString( id_step, "user" );
      gaPassword = Encr.decryptPasswordOptionallyEncrypted( rep.getStepAttributeString( id_step, "pass" ) );
      gaApiKey = Encr.decryptPasswordOptionallyEncrypted( rep.getStepAttributeString( id_step, "apiKey" ) );
      gaProfileName = rep.getStepAttributeString( id_step, "profileName" );
      gaAppName = rep.getStepAttributeString( id_step, "appName" );
      gaProfileTableId = rep.getStepAttributeString( id_step, "profileTableId" );
      gaCustomTableId = rep.getStepAttributeString( id_step, "customTableId" );
      useCustomTableId = rep.getStepAttributeBoolean( id_step, "useCustomTableId" );
      startDate = rep.getStepAttributeString( id_step, "startDate" );
      endDate = rep.getStepAttributeString( id_step, "endDate" );
      dimensions = rep.getStepAttributeString( id_step, "dimensions" );
      metrics = rep.getStepAttributeString( id_step, "metrics" );
      filters = rep.getStepAttributeString( id_step, "filters" );
      sort = rep.getStepAttributeString( id_step, "sort" );
      useSegment = rep.getStepAttributeBoolean( id_step, 0, "useSegment", true ); // assume default true, if not present
      useCustomSegment = rep.getStepAttributeBoolean( id_step, "useCustomSegment" );
      customSegment = rep.getStepAttributeString( id_step, "customSegment" );
      segmentId = rep.getStepAttributeString( id_step, "segmentId" );
      segmentName = rep.getStepAttributeString( id_step, "segmentName" );
      rowLimit = (int) rep.getStepAttributeInteger( id_step, "rowLimit" );

      int nrFields = rep.countNrStepAttributes( id_step, "feedField" );
      allocate( nrFields );

      for ( int i = 0; i < nrFields; i++ ) {

        feedFieldType[i] = rep.getStepAttributeString( id_step, i, "feedFieldType" );
        feedField[i] = rep.getStepAttributeString( id_step, i, "feedField" );
        outputField[i] = rep.getStepAttributeString( id_step, i, "outField" );
        outputType[i] = ValueMeta.getType( rep.getStepAttributeString( id_step, i, "type" ) );
        conversionMask[i] = rep.getStepAttributeString( id_step, i, "conversionMask" );

        if ( outputType[i] < 0 ) {
          outputType[i] = ValueMetaInterface.TYPE_STRING;
        }

      }

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "GoogleAnalytics.Error.UnableToReadFromRep" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )
    throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "user", gaEmail );
      rep
        .saveStepAttribute( id_transformation, id_step, "pass", "Encrypted " + Encr.encryptPassword( gaPassword ) );
      rep
        .saveStepAttribute( id_transformation, id_step, "apiKey", "Encrypted " + Encr.encryptPassword( gaApiKey ) );
      rep.saveStepAttribute( id_transformation, id_step, "appName", gaAppName );
      rep.saveStepAttribute( id_transformation, id_step, "profileName", gaProfileName );
      rep.saveStepAttribute( id_transformation, id_step, "profileTableId", gaProfileTableId );
      rep.saveStepAttribute( id_transformation, id_step, "customTableId", gaCustomTableId );
      rep.saveStepAttribute( id_transformation, id_step, "useCustomTableId", useCustomTableId );
      rep.saveStepAttribute( id_transformation, id_step, "startDate", startDate );
      rep.saveStepAttribute( id_transformation, id_step, "endDate", endDate );
      rep.saveStepAttribute( id_transformation, id_step, "dimensions", dimensions );
      rep.saveStepAttribute( id_transformation, id_step, "metrics", metrics );
      rep.saveStepAttribute( id_transformation, id_step, "filters", filters );
      rep.saveStepAttribute( id_transformation, id_step, "sort", sort );
      rep.saveStepAttribute( id_transformation, id_step, "useSegment", useSegment );
      rep.saveStepAttribute( id_transformation, id_step, "useCustomSegment", useCustomSegment );
      rep.saveStepAttribute( id_transformation, id_step, "customSegment", customSegment );
      rep.saveStepAttribute( id_transformation, id_step, "segmentId", segmentId );
      rep.saveStepAttribute( id_transformation, id_step, "segmentName", segmentName );
      rep.saveStepAttribute( id_transformation, id_step, "rowLimit", rowLimit );

      for ( int i = 0; i < feedField.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "feedFieldType", feedFieldType[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "feedField", feedField[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "outField", outputField[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "conversionMask", conversionMask[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "type", ValueMeta.getTypeDesc( outputType[i] ) );

      }

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "GoogleAnalytics.Error.UnableToSaveToRep" )
        + id_step, e );
    }
  }

  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ) {
    CheckResult cr;

    if ( prev == null || prev.size() == 0 ) {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "GoogleAnalytics.CheckResult.NotReceivingFields" ), stepMeta );
      remarks.add( cr );
    } else {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(
          PKG, "GoogleAnalytics.CheckResult.StepRecevingData", prev.size() + "" ), stepMeta );
      remarks.add( cr );
    }

    // See if we have input streams leading to this step!
    if ( input.length > 0 ) {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(
          PKG, "GoogleAnalytics.CheckResult.StepRecevingData2" ), stepMeta );
      remarks.add( cr );
    } else {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "GoogleAnalytics.CheckResult.NoInputReceivedFromOtherSteps" ), stepMeta );
      remarks.add( cr );
    }

  }

  public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
    TransMeta transMeta, Trans disp ) {
    return new GaInputStep( stepMeta, stepDataInterface, cnr, transMeta, disp );
  }

  public StepDataInterface getStepData() {
    return new GaInputStepData();
  }

}


text:
using UnityEngine;
using System.Collections;

public class GUIButton : MonoBehaviour
{
	public GameObject receiver;
	public string buttonText;

	private Rect buttonRect;
	GUIStyle buttonStyle;

	void Start()
	{
		Bounds bounds = renderer.bounds;

		Vector3 buttonPos = Camera.main.WorldToScreenPoint( new Vector3(bounds.min.x, bounds.max.y, bounds.min.z) );
		buttonPos.y = Screen.height - buttonPos.y;

		Vector3 buttonMax = Camera.main.WorldToScreenPoint( bounds.max );
		Vector3 buttonMin = Camera.main.WorldToScreenPoint( bounds.min );
		Vector3 buttonSize = buttonMax-buttonMin;

		buttonRect = new Rect(buttonPos.x, buttonPos.y, buttonSize.x, buttonSize.y);
		renderer.enabled = false;
	}

	private void SendMessage(object parameter)
	{
		if(receiver) receiver.SendMessage("OnButtonClicked", parameter, SendMessageOptions.DontRequireReceiver);
	}

	void OnGUI()
	{
		GUIStyle buttonStyle = new GUIStyle( GUI.skin.button );
		buttonStyle.wordWrap = true;
		buttonStyle.alignment = TextAnchor.UpperCenter;

		if( GUI.Button(buttonRect, "\n"+buttonText, buttonStyle) )
		{
			SendMessage(buttonText);
		}
	}
}


text:
/**
 * Office UI Fabric 2.0.1
 * The front-end framework for building experiences for Office 365.
 **/
/*Sasssssssss*/
/*
  Your use of the content in the files referenced here are subject to the terms of the license at http://aka.ms/fabric-font-license
*/
.ms-Button {
  color: #333333;
  font-family: 'Segoe UI Regular WestEuropean', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 14px;
  font-weight: normal;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  box-shadow: none;
  background-color: #f4f4f4;
  border: 1px solid #f4f4f4;
  cursor: pointer;
  display: inline-block;
  height: 32px;
  min-width: 80px;
  padding: 4px 20px 6px;
}

.ms-Button:hover {
  background-color: #eaeaea;
  border-color: #eaeaea;
  outline: 1px solid transparent;
}

.ms-Button:hover .ms-Button-label {
  color: #000000;
}

.ms-Button:focus {
  background-color: #eaeaea;
  border-color: #0078d7;
  outline: 1px solid transparent;
}

.ms-Button:focus .ms-Button-label {
  color: #000000;
}

.ms-Button:active {
  background-color: #0078d7;
  border-color: #0078d7;
}

.ms-Button:active .ms-Button-label {
  color: #ffffff;
}

.ms-Button:disabled,
.ms-Button.is-disabled {
  background-color: #f4f4f4;
  border-color: #f4f4f4;
  cursor: default;
}

.ms-Button:disabled .ms-Button-label,
.ms-Button.is-disabled .ms-Button-label {
  color: #a6a6a6;
}

.ms-Button:disabled:hover,
.ms-Button:disabled:focus,
.ms-Button.is-disabled:hover,
.ms-Button.is-disabled:focus {
  outline: 0;
}

.ms-Button + .ms-Button {
  margin-left: 6px;
}

.ms-Button-label {
  color: #333333;
  font-family: 'Segoe UI Semibold WestEuropean', 'Segoe UI Semibold', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 14px;
}

.ms-Button-icon,
.ms-Button-description {
  display: none;
}

.ms-Button.ms-Button--primary {
  background-color: #0078d7;
  border-color: #0078d7;
}

.ms-Button.ms-Button--primary .ms-Button-label {
  color: #ffffff;
}

.ms-Button.ms-Button--primary:hover {
  background-color: #005a9e;
  border-color: #005a9e;
}

.ms-Button.ms-Button--primary:focus {
  background-color: #005a9e;
  border-color: #004578;
}

.ms-Button.ms-Button--primary:active {
  background-color: #0078d7;
  border-color: #0078d7;
}

.ms-Button.ms-Button--primary:disabled,
.ms-Button.ms-Button--primary.is-disabled {
  background-color: #f4f4f4;
  border-color: #f4f4f4;
}

.ms-Button.ms-Button--primary:disabled .ms-Button-label,
.ms-Button.ms-Button--primary.is-disabled .ms-Button-label {
  color: #a6a6a6;
}

.ms-Button.ms-Button--hero {
  background-color: transparent;
  border: none;
  vertical-align: top;
  line-height: normal;
}

.ms-Button.ms-Button--hero .ms-Button-icon {
  color: #0078d7;
  display: inline-block;
  font-size: 12px;
  position: relative;
  top: -8px;
}

.ms-Button.ms-Button--hero .ms-Button-icon .ms-Icon {
  border-radius: 18px;
  border: 1px solid #0078d7;
  height: 18px;
  line-height: 18px;
  width: 18px;
  font-size: 12px;
  margin: 0;
}

.ms-Button.ms-Button--hero .ms-Button-label {
  color: #0078d7;
  font-family: 'Segoe UI Light WestEuropean', 'Segoe UI Light', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 21px;
  position: relative;
  top: -5px;
  text-decoration: none;
}

.ms-Button.ms-Button--hero:hover .ms-Button-icon .ms-Icon,
.ms-Button.ms-Button--hero:focus .ms-Button-icon .ms-Icon {
  color: #005a9e;
}

.ms-Button.ms-Button--hero:hover .ms-Button-label,
.ms-Button.ms-Button--hero:focus .ms-Button-label {
  color: #004578;
}

.ms-Button.ms-Button--hero:active .ms-Button-icon .ms-Icon {
  color: #0078d7;
}

.ms-Button.ms-Button--hero:active .ms-Button-label {
  color: #0078d7;
}

.ms-Button.ms-Button--hero:disabled .ms-Button-icon .ms-Icon,
.ms-Button.ms-Button--hero.is-disabled .ms-Button-icon .ms-Icon {
  color: #c8c8c8;
}

.ms-Button.ms-Button--hero:disabled .ms-Button-label,
.ms-Button.ms-Button--hero.is-disabled .ms-Button-label {
  color: #a6a6a6;
}

.ms-Button.ms-Button--compound {
  height: auto;
  min-height: 72px;
  max-width: 280px;
  padding: 20px;
}

.ms-Button.ms-Button--compound .ms-Button-label {
  display: block;
  font-family: 'Segoe UI Semibold WestEuropean', 'Segoe UI Semibold', 'Segoe UI', Tahoma, Arial, sans-serif;
  position: relative;
  text-align: left;
  margin-top: -5px;
}

.ms-Button.ms-Button--compound .ms-Button-description {
  color: #666666;
  display: block;
  font-family: 'Segoe UI Regular WestEuropean', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 12px;
  position: relative;
  text-align: left;
  top: 3px;
}

.ms-Button.ms-Button--compound:hover .ms-Button-description {
  color: #212121;
}

.ms-Button.ms-Button--compound:focus {
  border-color: #0078d7;
  background-color: #f4f4f4;
}

.ms-Button.ms-Button--compound:focus .ms-Button-label {
  color: #333333;
}

.ms-Button.ms-Button--compound:focus .ms-Button-description {
  color: #666666;
}

.ms-Button.ms-Button--compound:active {
  background-color: #0078d7;
}

.ms-Button.ms-Button--compound:active .ms-Button-description,
.ms-Button.ms-Button--compound:active .ms-Button-label {
  color: #ffffff;
}

.ms-Button.ms-Button--compound:disabled .ms-Button-label,
.ms-Button.ms-Button--compound:disabled .ms-Button-description,
.ms-Button.ms-Button--compound.is-disabled .ms-Button-label,
.ms-Button.ms-Button--compound.is-disabled .ms-Button-description {
  color: #a6a6a6;
}

.ms-Button.ms-Button--compound:disabled:focus,
.ms-Button.ms-Button--compound:disabled:active,
.ms-Button.ms-Button--compound.is-disabled:focus,
.ms-Button.ms-Button--compound.is-disabled:active {
  border-color: #f4f4f4;
  background-color: #f4f4f4;
}

.ms-Button.ms-Button--compound:disabled:focus .ms-Button-label,
.ms-Button.ms-Button--compound:disabled:focus .ms-Button-description,
.ms-Button.ms-Button--compound:disabled:active .ms-Button-label,
.ms-Button.ms-Button--compound:disabled:active .ms-Button-description,
.ms-Button.ms-Button--compound.is-disabled:focus .ms-Button-label,
.ms-Button.ms-Button--compound.is-disabled:focus .ms-Button-description,
.ms-Button.ms-Button--compound.is-disabled:active .ms-Button-label,
.ms-Button.ms-Button--compound.is-disabled:active .ms-Button-description {
  color: #a6a6a6;
}

.ms-Button.ms-Button--command {
  background-color: transparent;
  border: none;
  height: 32px;
  line-height: 32px;
  min-width: 0;
  padding: 0 8px;
  text-align: left;
  font-size: 14px;
}

.ms-Button.ms-Button--command .ms-Button-icon {
  color: #666666;
  display: inline-block;
  margin-right: 4px;
  position: relative;
}

.ms-Button.ms-Button--command .ms-Button-label {
  font-family: 'Segoe UI Regular WestEuropean', 'Segoe UI', Tahoma, Arial, sans-serif;
}

.ms-Button.ms-Button--command:hover .ms-Button-icon,
.ms-Button.ms-Button--command:focus .ms-Button-icon {
  color: #212121;
}

.ms-Button.ms-Button--command:hover .ms-Button-label,
.ms-Button.ms-Button--command:focus .ms-Button-label {
  color: #000000;
}

.ms-Button.ms-Button--command:active .ms-Button-icon,
.ms-Button.ms-Button--command:active .ms-Button-label {
  color: #0078d7;
}

.ms-Button.ms-Button--command:disabled .ms-Button-icon,
.ms-Button.ms-Button--command.is-disabled .ms-Button-icon {
  color: #c8c8c8;
}

.ms-Button.ms-Button--command:disabled .ms-Button-label,
.ms-Button.ms-Button--command.is-disabled .ms-Button-label {
  color: #a6a6a6;
}

.ms-Button.ms-Button--command + .ms-Button.ms-Button--command {
  margin-left: 14px;
}

.ms-CommandBar {
  background-color: #eff6fc;
  height: 40px;
  white-space: nowrap;
  padding-left: 0;
  border: 0;
  position: relative;
}

.ms-CommandBar:focus {
  outline: none;
}

.ms-CommandBar-mainArea {
  overflow-x: hidden;
  display: block;
  padding-left: 58px;
}

@media only screen and (min-width: 1024px) {
  .ms-CommandBar-mainArea {
    padding-left: 24px;
  }
}

.ms-CommandBar-sideCommands {
  float: right;
  text-align: right;
  width: auto;
  padding-right: 8px;
}

.ms-CommandBar-sideCommands .ms-CommandBarItem:last-child {
  margin-right: 0;
}

@media only screen and (min-width: 640px) {
  .ms-CommandBar-sideCommands {
    min-width: 128px;
  }
}

@media only screen and (min-width: 640px) {
  .ms-CommandBar-sideCommands {
    padding-right: 12px;
  }
}

@media only screen and (min-width: 1024px) {
  .ms-CommandBar-sideCommands {
    padding-right: 16px;
  }
}

.ms-CommandBarItem {
  display: inline-block;
  color: #0078d7;
  height: 40px;
  outline: none;
  vertical-align: top;
  margin-right: -4px;
}

.ms-CommandBarItem .ms-CommandBarItem-chevronDown,
.ms-CommandBarItem .ms-CommandBarItem-commandText {
  display: none;
}

@media screen and (-ms-high-contrast: active) {
  .ms-CommandBarItem {
    border-left: 1px solid #000000;
    border-right: 1px solid #000000;
    height: 38px;
    outline: none;
  }
}

@media screen and (-ms-high-contrast: black-on-white) {
  .ms-CommandBarItem {
    border-left: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
    height: 38px;
    outline: none;
  }
}

.ms-CommandBarItem:hover {
  background-color: #c7e0f4;
  color: #0078d7;
}

@media screen and (-ms-high-contrast: active) {
  .ms-CommandBarItem:hover {
    border-left: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
  }
}

@media screen and (-ms-high-contrast: black-on-white) {
  .ms-CommandBarItem:hover {
    border-left: 1px solid #000000;
    border-right: 1px solid #000000;
  }
}

@media only screen and (min-width: 640px) {
  .ms-CommandBarItem {
    margin-right: 8px;
  }

  .ms-CommandBarItem .ms-CommandBarItem-chevronDown,
  .ms-CommandBarItem .ms-CommandBarItem-commandText {
    display: inline;
  }
}

.ms-CommandBarItem.is-hidden {
  width: 0;
  overflow: hidden;
}

.ms-CommandBarItem.icon-only .ms-CommandBarItem-chevronDown,
.ms-CommandBarItem.icon-only .ms-CommandBarItem-commandText,
.ms-CommandBarItem.ms-CommandBarItem--iconOnly .ms-CommandBarItem-chevronDown,
.ms-CommandBarItem.ms-CommandBarItem--iconOnly .ms-CommandBarItem-commandText {
  display: none;
}

.ms-CommandBarItem.ms-CommandBarItem--hasTextOnly .ms-CommandBarItem-commandText,
.ms-CommandBarItem.ms-CommandBarItem--hasTextOnly .ms-CommandBarItem-chevronDown {
  display: inline;
}

.ms-CommandBarItem-overflow {
  display: none;
}

.ms-CommandBarItem-overflow.is-visible {
  display: inline-block;
}

.ms-CommandBarItem-overflow .ms-Icon {
  font-size: 14px;
  color: #666666;
}

.ms-CommandBarItem-link {
  line-height: 39px;
  padding: 0 6px;
  cursor: pointer;
  height: 40px;
  min-width: 20px;
  text-align: center;
  position: relative;
  padding: 0 8px;
  display: block;
  height: 100%;
}

.ms-CommandBarItem-link:focus {
  outline: none;
}

.ms-CommandBarItem-link:focus:before {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  bottom: 2px;
  border: 1px solid #a6a6a6;
  content: '';
}

.ms-CommandBarItem-icon {
  font-size: 17px;
}

.ms-CommandBarItem-chevronDown {
  vertical-align: middle;
  padding-bottom: 3px;
  margin-top: 13px;
  font-size: 1.1em;
  line-height: 1em;
  color: #666666;
}

.ms-CommandBarItem-chevronDown:before {
  height: 10px;
  line-height: 16px;
}

.ms-CommandBarSearch {
  float: left;
  width: 208px;
  max-width: 208px;
  background-color: #deecf9;
  color: #333333;
  height: 40px;
  position: relative;
  box-sizing: border-box;
  border-color: transparent;
  transition: 0.167s cubic-bezier(0.1, 0.9, 0.2, 1);
  transition-property: width, background-color;
}

@media only screen and (max-width: 1023px) {
  .ms-CommandBarSearch {
    overflow: hidden;
    width: 50px;
    position: absolute;
  }
}

@media screen and (-ms-high-contrast: active) {
  .ms-CommandBarSearch {
    border-right: 1px solid #ffffff;
    z-index: 10;
  }
}

@media screen and (-ms-high-contrast: black-on-white) {
  .ms-CommandBarSearch {
    border-right: 1px solid #000000;
  }
}

.ms-CommandBarSearch:hover {
  background-color: #c7e0f4;
  color: #0078d7;
}

@media screen and (-ms-high-contrast: active) {
  .ms-CommandBarSearch:hover {
    border-left: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
  }
}

@media screen and (-ms-high-contrast: black-on-white) {
  .ms-CommandBarSearch:hover {
    border-left: 1px solid #000000;
    border-right: 1px solid #000000;
  }
}

.ms-CommandBarSearch .ms-Icon--search {
  margin-left: 2px;
  margin-top: 12px;
  vertical-align: top;
}

.ms-CommandBarSearch-input {
  height: 40px;
  padding: 8px 8px 8px 0;
  border: none;
  border-left: 42px solid transparent;
  background-color: transparent;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
  font-size: 14px;
  -webkit-appearance: none;
  -webkit-border-radius: 0;
}

@media screen and (-ms-high-contrast: active) {
  .ms-CommandBarSearch-input {
    border-left: 40px solid #000000;
  }
}

@media screen and (-ms-high-contrast: black-on-white) {
  .ms-CommandBarSearch-input {
    border-left: 40px solid #ffffff;
  }
}

.ms-CommandBarSearch-input::-ms-clear {
  display: none;
}

.ms-CommandBarSearch-input::-webkit-input-placeholder {
  color: #333333;
  opacity: 1;
  font-size: 14px;
}

.ms-CommandBarSearch-input::-moz-placeholder {
  color: #333333;
  opacity: 1;
  font-size: 14px;
}

.ms-CommandBarSearch-input:-ms-input-placeholder {
  color: #333333;
  opacity: 1;
  font-size: 14px;
}

.ms-CommandBarSearch-input::placeholder {
  color: #333333;
  opacity: 1;
  font-size: 14px;
}

.ms-CommandBarSearch-input:placeholder {
  color: #333333;
  opacity: 1;
  font-size: 14px;
}

.ms-CommandBarSearch-iconSearchWrapper {
  display: block;
  padding-left: 15px;
}

.ms-CommandBarSearch-iconArrowWrapper {
  display: none;
}

.ms-CommandBarSearch-iconSearchWrapper,
.ms-CommandBarSearch-iconArrowWrapper {
  top: 0;
  padding-left: 8px;
  padding-right: 8px;
}

.ms-CommandBarSearch-iconClearWrapper {
  display: none;
  top: 1px;
  right: 0px;
  z-index: 10;
}

.ms-CommandBarSearch.is-active {
  background-color: #c7e0f4;
  color: #000000;
}

@media only screen and (max-width: 1023px) {
  .ms-CommandBarSearch.is-active {
    width: 100%;
    position: absolute;
    z-index: 10;
    max-width: 100%;
  }
}

.ms-CommandBarSearch.is-active:hover {
  background-color: #c7e0f4;
  color: #000000;
}

.ms-CommandBarSearch.is-active .ms-CommandBarSearch-input {
  cursor: text;
  padding-right: 40px;
  border-left-width: 8px;
}

.ms-CommandBarSearch.is-active.ms-CommandBarSearch--hasBack .ms-CommandBarSearch-input {
  border-left-width: 40px;
}

.ms-CommandBarSearch.is-active .ms-CommandBarSearch-iconSearchWrapper {
  display: none;
}

.ms-CommandBarSearch.is-active.ms-CommandBarSearch--hasBack .ms-CommandBarSearch-iconArrowWrapper {
  display: block;
}

.ms-CommandBarSearch.is-active .ms-CommandBarSearch-input {
  padding-right: 40px;
}

.ms-CommandBarSearch.is-active .ms-CommandBarSearch-iconClearWrapper {
  display: block;
}

.ms-CommandBarSearch-iconWrapper {
  height: 40px;
  line-height: 40px;
  cursor: pointer;
  padding: 0px 8px;
  position: absolute;
  width: 34px;
  text-align: center;
}

.ms-CommandBarSearch .ms-Icon:before {
  font-size: 17px;
  color: #0078d7;
}

.ms-Label {
  color: #333333;
  font-family: 'Segoe UI Regular WestEuropean', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-weight: normal;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  box-shadow: none;
  box-sizing: border-box;
  display: block;
  padding: 5px 0;
}

.ms-Label.is-required:after {
  content: ' *';
  color: #a80000;
}

.ms-Label.is-disabled {
  color: #333333;
}

.ms-Overlay {
  background-color: rgba(255, 255, 255, 0.4);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  z-index: 200;
}

.ms-Overlay.ms-Overlay--dark {
  background-color: rgba(0, 0, 0, 0.4);
}

.ms-Overlay--none {
  visibility: hidden;
}

.ms-Panel {
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 300;
  display: none;
  pointer-events: none;
}

.ms-Panel .ms-Overlay {
  z-index: 0;
  display: none;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.367s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.ms-Panel-main {
  background-color: #ffffff;
  bottom: 0;
  position: fixed;
  right: 0;
  top: 0;
  display: none;
  z-index: 10;
  width: 100%;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem {
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:hover {
  background-color: #d7eaf9;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:active {
  background-color: #b5d8f4;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:active .ms-CommandBarItem-icon {
  color: #07288b;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:active .ms-CommandBarItem-commandText {
  color: #000000;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:first-child {
  background-color: #0078d7;
  box-shadow: inset 0 1px 0 0 #2488d8;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:first-child .ms-CommandBarItem-icon {
  color: #ffffff;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:first-child .ms-CommandBarItem-commandText {
  color: #ffffff;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:first-child .ms-CommandBarItem-linkWrapper {
  padding-left: 12px;
  padding-right: 12px;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:first-child:hover {
  background-color: #005a9e;
  box-shadow: none;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:first-child:hover .ms-CommandBarItem-icon {
  color: #ffffff;
}

.ms-Panel-main .ms-CommandBar .ms-CommandBarItem:first-child:hover .ms-CommandBarItem-commandText {
  color: #ffffff;
}

.ms-Panel-closeButton {
  background: none;
  border: 0;
  cursor: pointer;
  position: absolute;
  right: 12px;
  top: 12px;
  height: 24px;
  width: 24px;
  outline: 0;
  padding: 0;
  color: #666666;
}

.ms-Panel-closeButton:hover {
  color: #333333;
}

.ms-Panel-closeIcon {
  font-size: 14px;
}

.ms-Panel-contentInner {
  position: absolute;
  top: 40px;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 32px 20px 32px;
  overflow-y: auto;
}

.ms-Panel-headerText {
  font-family: 'Segoe UI Light WestEuropean', 'Segoe UI Light', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 21px;
  color: #333333;
  line-height: 82px;
  height: 70px;
}

.ms-Panel.is-open {
  display: block;
}

.ms-Panel.is-open .ms-CommandBar {
  -webkit-animation-name: fadeIn, slideDownIn20;
          animation-name: fadeIn, slideDownIn20;
  -webkit-animation-duration: 0.367s;
     -moz-animation-duration: 0.367s;
      -ms-animation-duration: 0.367s;
       -o-animation-duration: 0.367s;
  -webkit-animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
          animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
  -webkit-animation-fill-mode: both;
          animation-fill-mode: both;
  -webkit-animation-delay: 250ms;
          animation-delay: 250ms;
}

.ms-Panel.is-open .ms-Panel-main {
  opacity: 1;
  pointer-events: auto;
  display: block;
}

.ms-Panel.is-open .ms-Overlay {
  display: block;
  pointer-events: auto;
}

.ms-Panel.is-open.ms-Panel-animateOut .ms-Panel-main {
  -webkit-animation-duration: 0.367s;
  -webkit-animation-name: fadeOut;
  -webkit-animation-fill-mode: both;
  -webkit-animation-duration: 0.367s;
          animation-duration: 0.367s;
  -webkit-animation-name: fadeOut;
          animation-name: fadeOut;
  -webkit-animation-fill-mode: both;
          animation-fill-mode: both;
  -webkit-animation-duration: 0.1s;
          animation-duration: 0.1s;
}

.ms-Panel.is-open.ms-Panel-animateOut .ms-Overlay {
  display: none;
}

.ms-Panel .ms-CommandBarItem .ms-CommandBarItem-commandText {
  display: inline-block;
}

.ms-Panel .ms-CommandBar-mainArea {
  padding-left: 0;
  margin-left: -1px;
  overflow: hidden;
}

@media (min-width: 480px) {
  .ms-Panel.is-open.ms-Panel-animateIn .ms-Panel-main {
    -webkit-animation-name: fadeIn, slideLeftIn40;
            animation-name: fadeIn, slideLeftIn40;
    -webkit-animation-duration: 0.367s;
       -moz-animation-duration: 0.367s;
        -ms-animation-duration: 0.367s;
         -o-animation-duration: 0.367s;
    -webkit-animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
            animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
  }

  .ms-Panel.is-open.ms-Panel-animateIn .ms-Overlay {
    -webkit-animation-duration: 0.367s;
    -webkit-animation-name: fadeIn;
    -webkit-animation-fill-mode: both;
    -webkit-animation-duration: 0.367s;
            animation-duration: 0.367s;
    -webkit-animation-name: fadeIn;
            animation-name: fadeIn;
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
    -webkit-animation-duration: 0.267s;
            animation-duration: 0.267s;
  }

  .ms-Panel.is-open.ms-Panel-animateOut .ms-Panel-main {
    -webkit-animation-name: fadeOut, slideRightOut40;
            animation-name: fadeOut, slideRightOut40;
    -webkit-animation-duration: 0.167s;
       -moz-animation-duration: 0.167s;
        -ms-animation-duration: 0.167s;
         -o-animation-duration: 0.167s;
    -webkit-animation-timing-function: cubic-bezier(0.1, 0.25, 0.75, 0.9);
            animation-timing-function: cubic-bezier(0.1, 0.25, 0.75, 0.9);
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
  }

  .ms-Panel.is-open.ms-Panel-animateOut .ms-Overlay {
    -webkit-animation-duration: 0.367s;
    -webkit-animation-name: fadeOut;
    -webkit-animation-fill-mode: both;
    -webkit-animation-duration: 0.367s;
            animation-duration: 0.367s;
    -webkit-animation-name: fadeOut;
            animation-name: fadeOut;
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
    -webkit-animation-duration: 0.167s;
            animation-duration: 0.167s;
  }

  .ms-Panel.is-open.ms-Panel--left.ms-Panel-animateIn .ms-Panel-main {
    -webkit-animation-name: fadeIn, slideRightIn40;
            animation-name: fadeIn, slideRightIn40;
    -webkit-animation-duration: 0.367s;
       -moz-animation-duration: 0.367s;
        -ms-animation-duration: 0.367s;
         -o-animation-duration: 0.367s;
    -webkit-animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
            animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
  }

  .ms-Panel.is-open.ms-Panel--left.ms-Panel-animateIn .ms-Overlay {
    -webkit-animation-duration: 0.367s;
    -webkit-animation-name: fadeIn;
    -webkit-animation-fill-mode: both;
    -webkit-animation-duration: 0.367s;
            animation-duration: 0.367s;
    -webkit-animation-name: fadeIn;
            animation-name: fadeIn;
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
    -webkit-animation-duration: 0.267s;
            animation-duration: 0.267s;
  }

  .ms-Panel.is-open.ms-Panel--left.ms-Panel-animateOut .ms-Panel-main {
    -webkit-animation-name: fadeOut, slideLeftOut40;
            animation-name: fadeOut, slideLeftOut40;
    -webkit-animation-duration: 0.167s;
       -moz-animation-duration: 0.167s;
        -ms-animation-duration: 0.167s;
         -o-animation-duration: 0.167s;
    -webkit-animation-timing-function: cubic-bezier(0.1, 0.25, 0.75, 0.9);
            animation-timing-function: cubic-bezier(0.1, 0.25, 0.75, 0.9);
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
  }

  .ms-Panel.is-open.ms-Panel--left.ms-Panel-animateOut .ms-Overlay {
    -webkit-animation-duration: 0.367s;
    -webkit-animation-name: fadeOut;
    -webkit-animation-fill-mode: both;
    -webkit-animation-duration: 0.367s;
            animation-duration: 0.367s;
    -webkit-animation-name: fadeOut;
            animation-name: fadeOut;
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
    -webkit-animation-duration: 0.167s;
            animation-duration: 0.167s;
  }

  .ms-Panel.is-open .ms-CommandBar {
    -webkit-animation-delay: 500ms;
            animation-delay: 500ms;
  }

  .ms-Panel-main {
    border-left: 1px solid #eaeaea;
    border-right: 1px solid #eaeaea;
    pointer-events: auto;
    width: 340px;
  }

  .ms-Panel.is-open .ms-Panel-main {
    box-shadow: -30px 0px 30px -30px rgba(0, 0, 0, 0.2);
    left: auto;
  }

  .ms-Panel.ms-Panel--small.ms-Panel--left.is-open .ms-Panel-main {
    box-shadow: 30px 0px 30px -30px rgba(0, 0, 0, 0.2);
  }

  .ms-Panel.ms-Panel--small.ms-Panel--left .ms-Panel-main {
    left: 0;
    right: auto;
  }

  .ms-Panel.is-open .ms-Overlay {
    cursor: pointer;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (min-width: 640px) {
  .ms-Panel.ms-Panel--medium .ms-Panel-main,
  .ms-Panel.ms-Panel--large .ms-Panel-main,
  .ms-Panel.ms-Panel--extraLarge .ms-Panel-main {
    left: 47px;
    width: auto;
  }

  .ms-Panel.ms-Panel--medium.is-open .ms-Panel-main,
  .ms-Panel.ms-Panel--large.is-open .ms-Panel-main,
  .ms-Panel.ms-Panel--extraLarge.is-open .ms-Panel-main {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .ms-Panel.ms-Panel--medium .ms-Panel-main {
    left: auto;
    width: 644px;
  }

  .ms-Panel.ms-Panel--medium.is-open .ms-Panel-main {
    left: auto;
    right: 0;
    width: 644px;
  }
}

@media (min-width: 1366px) {
  .ms-Panel.ms-Panel--large .ms-Panel-main {
    left: 427px;
  }

  .ms-Panel.ms-Panel--extraLarge .ms-Panel-main {
    left: 175px;
  }

  .ms-Panel.ms-Panel--small.ms-Panel--left {
    display: none;
  }
}


text:
layout: default
title: AvaTax Certification
product: avaTax
doctype: certification
nav: apis
---

Certification for AvaTax Integrations

How do you know if you're compliant with our best practices?  To start, we recommend watching an overview of our API.

An integration can be issued for any of the following feature subsets in addition to a basic calculation certification:
To have your integration Certified by Avalara, we have outlined the areas of integration that are necessary to ensure a stable and robust customer experience using AvaTax with your application.  To be Certified for Avalara AvaTax, all of the items with an R beside them listed below are the required elements that must be present in your integration.

Note: Address validation is a requirement for certification, however we don't require you to use our address validation service.

There are several different certifications that can be achieved according to the functionality supported in your application.

Calculation with Avalara AvaTax and Address Validation

Calculation with Avalara AvaTax and Returns

Calculation with Avalara AvaTax for Global Calculations

Calculation with Avalara AvaTax for Use Tax

For more information about the benefits of certification, check out our Certification Guide.

Certified for Avalara AvaTax

Certification for Avalara AvaTax requires the delivery of all functional requirements shown below.

Key:  R – Functionality required for certification     N – Functionality not required, but noted

Avalara AvaTax Administration & Utilities Integration

The AvaTax Administration section provides the user with configuration, setup and utility functions necessary to administer the AvaTax sales tax calculation and address validation functions. Note that these items cannot be examined on a analysis of your data performed by AvaTax support staff.

Here's a video showing an example of one of our integrations to AvaTax and how a configuration screen should be designed:

Key:  R – Functionality required for certification     N – Functionality not required, but noted

Required

Function

Comment

R

AvaTax Configuration – dialog window

The AvaTax Configuration Dialog window must allow the user to specify the configuration/connection information.

Account Number

License Key

Service URL

Company Code

R

AvaTax Test Connection button

Tests the connection to the AvaTax service and verifies the AvaTax credentials. This is an important element to allow for successful troubleshooting of the AvaTax service. Optional – display license key expiration date upon successful connection response.

R

Control – Disable Document Committing

In order for this connector to be used in conjunction with other integration to AvaTax, the user must be able to control which connector is used for committing documents to AvaTax. From a technical standpoint, simply use DocType = SalesOrder on all calls and suppress any non-getTax calls (i.e. cancelTax, postTax).

R

Tax Calculation – Disable tax calculation option

The user must have an option to turn on or off the AvaTax Calculation service independent of any other Avalara product or service.

R

User Implementation Guide

The User Implementation Guide should contain screenshots and information allowing the end user to configure for AvaTax including where the company code is entered, where the credentials are entered and where tax codes can be mapped within the application.

R

Enable logging

Enables detailed AvaTax transaction logging within the application including capture of round-trip processing time.We need the complete xml request/response for each call made to Avalara services. It does not need to run all the time as we understand the DB will grow unnecessarily large – you are free to only log the last week, 30 days, custom, or have a control for the next N hours, etc.

The spirit of the requirement is to assist customers and support in troubleshooting exercises, so it needs to be retrievable by an end user (or an administrator) It should be specifically Avalara service calls.

N

Request time out definition

Define AvaTax request time out length, AvaTax best practices prescribes default setting of 300 ms.

N

AvaTax Admin Console link

Link to AvaTax production Admin Console.

Customer Record Integration

Here's a video showing an example of the required elements of the customer record integration to AvaTax:

Key:  R – Functionality required for certification     N – Functionality not required, but noted

Required

Function

Comment

R

Customer Code

Identify customer code (number, ID) to pass to the AvaTax service.

R

Exemption Number

Customer record field populating exemption number in an AvaTax transaction. This is used for tracking those customers who have tax exempt transactions.

R

Entity/Use Code

This is a group of codes that indicate the type of exemption.  See the standard codes, but be aware that users are able to create custom codes as well.It is best to manage this value in your application's Customer record and pass it to AvaTax as CustomerUsageType at either the document or line level, whichever is applicable.

Note that either Exemption Number or Entity/Use code is required (not both). Entity/Use Code is preferred.

Items/Charge Integration

Here's a video showing an example of the item record elements necessary for a successful integration to AvaTax:

Key:  R – Functionality required for certification     N – Functionality not required, but noted

Required

Function

Comment

R

Item Code

Identify item/service/charge code (number, ID) to pass to the AvaTax service. If the customer has access to UPC, they should be able to prepend UPC to the code and have it come across in the item code field. If there is no UPC, it should fall back to SKU.

R

Item Description

Identify item/service/charge description to pass to the AvaTax service with a human-readable description or item name.

R

AvaTax tax code mapping – Item Code/SKU

Association of an item or item group to an AvaTax Tax Code to describe the taxability   group (e.g. Clothing-Shirts – B-to-C). If possible, this should be assigned at the item category level as well as the item level.

Sales/Billing Document Integration

Integrating with the Sales and/or Billing process involves making tax calculation and/or modifying a transaction.  Here's a video showing an example of all necessary elements for a successful integration to AvaTax:

Key:  R – Functionality required for certification     N – Functionality not required, but noted

Required

Function

Comment

R

Send required header level data elements:

Document number

Customer code

Document date

Tax calculation date

Document type

Destination address

Origin address

Exemption number

Entity/Use code (aka CustomerUsageType)

Location Code

Note that Exemption number or Entity Use Code should be passed only if the customer is exempt.

R

Send required line (detail) level data elements:

Line number

Item code

Item description

Quantity

Amount (extended)

Tax Code

R

Freight Items must be transmitted separately

Freight Items must be sent to AvaTax as a separate line item with appropriate tax code.

R

GetTax call – Sales Order/Sales Invoices

Ensure that invoices are processed through a logical document lifecycle.

R

PostTax/CommitTax call – Invoices

Ensure that invoices are committed/posted for reporting appropriately.

R

PostTax/CommitTax call – Credit Memos

Ensure that returns are committed/posted for reporting appropriately. More details about handling returns.

R

CancelTax call – voided/deleted Invoices

When invoices are deleted/cancelled, this information must be transmitted to AvaTax.

R

CancelTax call – voided/deleted Credit Memos

When returns are deleted/cancelled, this information must be transmitted to AvaTax.

R

Send original invoice date as tax calculation date for return orders/credit memos

 More information on handling returns.

R

Send current transaction date as document date for return orders/credit memos

 More information on handling returns.

R

Send discounts appropriately – standard discounts included in line-level extended amount, manufacturer's coupons and hostess credits transmitted as additional line items.

 More information about handling discounts.

N

Send optional header level data elements – Purchase order number

N

Send optional line (detail) level data elements – Entity Use Code (aka CustomerUsageType)

Line level exempt triggers are required if line-level exemption can be managed in the application, and should be transmitted in a manner analogous to document-level exemption.

N

Send optional line (detail) level data elements – Destination address

Required if destination (ship-to) address can be managed at the item line level.

N

Send optional line (detail) level data elements – Origin address

Required if origin (ship-from, warehouse) address can be managed at the item line level

N

GetTaxHistory – Invoice inquiry/Reconciliation Tool

Any tool or utility that allows the user to query or retrieve already recorded   transaction records for the purpose of reconciling with the document records in the application. Should not trigger a recalculation of tax by default (although may do so on demand). No GetTaxHistory or document retrieval method is yet available in the REST API.

N

GetTaxHistory – Credit memo inquiry

No GetTaxHistory or document retrieval method is yet available in the REST API.

Server Audit Clarity and Installation Requirements

Tax calculation should display a clean audit to promote an error- and overage-free user experience. These properties are not visible from the Admin Console, and show up on an Avatax-side server audit of traffic on your account. Contact us if you would like an audit report run and emailed to you.

Key:  R – Functionality required for certification     N – Functionality not required, but noted

Required

Function

Comment

R

Pass connector identifier information via the TaxSvc.Profile.Client property

Integrations must include information about the connector, such as name, version, and   company name, as a signature to each transaction.  EXAMPLE: TaxSvc.Profile.Client = "Dynamics AX,9.0,MyApp for AX by ACME INC,1.0"

R

Reasonable errors on server-side analysis

There should be no errors except those that would result from normal (but invalid) user input (e.g. invalid address data). Such errors must be logged/displayed appropriately to the application.

R

Reasonable ratio of GetTax and address validation calls to committed documents

In a normal workflow, we expect to see (on average, including abandoned carts) up to 10 tax calculations per finalized document. In a straight-forward order entry process, the number of calls should be about three to five.

R

Demonstrate and document installation of software – Install Shield or equivalent where applicable

Customers should have an easy and trouble free installation of the software.


text:
package blue.lapis.pore.impl.scoreboard;

import static com.google.common.base.Preconditions.checkArgument;

import blue.lapis.pore.converter.wrapper.WrapperConverter;
import blue.lapis.pore.util.PoreText;
import blue.lapis.pore.util.PoreWrapper;

import com.google.common.base.Preconditions;
import org.apache.commons.lang3.NotImplementedException;
import org.bukkit.OfflinePlayer;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Score;
import org.bukkit.scoreboard.Scoreboard;
import org.spongepowered.api.scoreboard.critieria.Criteria;
import org.spongepowered.api.scoreboard.objective.Objective;

public class PoreObjective extends PoreWrapper<Objective> implements org.bukkit.scoreboard.Objective {

    public static PoreObjective of(Objective handle) {
        return WrapperConverter.of(PoreObjective.class, handle);
    }

    protected PoreObjective(Objective handle) {
        super(handle);
    }

    @Override
    public String getName() throws IllegalStateException {
        checkState();
        return getHandle().getName();
    }

    @Override
    @SuppressWarnings("deprecation")
    public String getDisplayName() throws IllegalStateException {
        checkState();
        return PoreText.convert(getHandle().getDisplayName());
    }

    @Override
    @SuppressWarnings("deprecation")
    public void setDisplayName(String displayName) throws IllegalStateException, IllegalArgumentException {
        checkState();
        checkArgument(displayName != null, "Display name must not be null");
        getHandle().setDisplayName(PoreText.convert(displayName));
    }

    @Override
    public String getCriteria() throws IllegalStateException {
        checkState();
        return getHandle().getCriterion().getName();
    }

    @Override
    public boolean isModifiable() throws IllegalStateException {
        checkState();
        // TODO: I might try to get a method into SpongeAPI, but this will do for now
        return getHandle().getCriterion() == Criteria.HEALTH;
    }

    @Override
    public Scoreboard getScoreboard() {
        //TODO: eh, this might be screwy because Bukkit doesn't account for multiple parents
        return PoreScoreboard.of(
                (org.spongepowered.api.scoreboard.Scoreboard) getHandle().getScoreboards().toArray()[0]
        );
    }

    @Override
    public void unregister() throws IllegalStateException {
        checkState();
        for (org.spongepowered.api.scoreboard.Scoreboard sb : getHandle().getScoreboards()) {
            sb.removeObjective(getHandle());
        }
    }

    @Override
    public DisplaySlot getDisplaySlot() throws IllegalStateException {
        // I genuinely have no idea why this isn't implemented in SpongeAPI
        checkState();
        throw new NotImplementedException("TODO");
    }

    @Override
    public void setDisplaySlot(DisplaySlot slot) throws IllegalStateException {
        // same goes for this one
        checkState();
        throw new NotImplementedException("TODO");
    }

    @SuppressWarnings("deprecation")
    @Override
    public Score getScore(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException {
        checkState();
        checkArgument(player != null, "Offline player cannot be null");
        //noinspection ConstantConditions
        return getScore(player.getName());
    }

    @SuppressWarnings("deprecation")
    @Override
    public Score getScore(String entry) throws IllegalArgumentException, IllegalStateException {
        checkState();
        checkArgument(entry != null, "Entry cannot be null");
        //noinspection ConstantConditions
        return PoreScore.of(getHandle().getOrCreateScore(PoreText.convert(entry)));
    }

    private void checkState() throws IllegalStateException {
        Preconditions.checkState(!getHandle().getScoreboards().isEmpty(), "Objective has been unregistered");
    }

}


text:
<?php

class ProductReverb
{
    /**
     * @var string
     */
    public $make;

    public $model;

    public $publish;

    public $categories;

    public $sold_as_is;

    public $photos;

    public $condition;

    public $has_inventory;

    public $inventory;

    public $description;

    public $finish;

    public $title;

    public $year;

    public $sku;

    public $upc;

    public $ean13;

    public $offers_enabled;

    public $shipping_profile_id;

    public $shipping;

    public $location;

    public $origin_country_code;

    public $seller;

    public $seller_cost;

    public $tax_exempt;

    public $price;
}


text:
/**
 */

package org.apache.harmony.test.func.reg.jit.btest3199;

import java.lang.reflect.Method;
import java.util.logging.Logger;

import org.apache.harmony.test.share.reg.RegressionTest;

public class Btest3199 extends RegressionTest {

    public static void main(String[] args) {
        System.exit(new Btest3199().test(Logger.global, args));
    }

    public int test(Logger logger, String [] args) {
        Method m = null;
        try {
            m = MyClass.class.getDeclaredMethod("test_ch", new Class[] {});
            int i5 = ((Character) m.invoke(
                    new MyClass(), new Object[] {})).charValue();
            System.err.println("i5: " + i5);
            System.err.println("i5==42: " + (i5 == 42) + "\n");

            int i6 = new MyClass().test_ch();
            System.err.println("i6: " + i6);
            System.err.println("i6==42: " + (i6 == 42));
            System.err.println("end of test");

            return (i5 == 42) && (i6 == 42) ? passed() : failed();
        } catch (Exception e) {
            System.err.println("Unexpected exception was thrown:");
            e.printStackTrace();
            return getError();
        }
    }
}

class MyClass
{
   public char test_ch(){
       return (char)42;
    }
}


text:
<?php
$title = 'Kwitansi';
$subtitle = "Form kwitansi";

$this->generate->generate_panel_content($title, $subtitle);
?>
<form method="post" action="<?php echo site_url('tuk/cetak_kwitansi/cetak'); ?>" class="form-horizontal">

                        Form Kwitansi

                        <?php $this->generate->input_hidden('NOMINAL', ''); ?>
                        <?php $this->generate->input_select2('Kelas', array('name' => 'KELAS', 'url' => site_url('akademik/kelas/auto_complete')), FALSE, 7, FALSE, NULL); ?>
                        <?php $this->generate->input_select2('Siswa', array('name' => 'SISWA', 'url' => site_url('akademik/siswa/auto_complete')), FALSE, 7, FALSE, NULL); ?>
                        <?php $this->generate->input_text('Nominal', array('name' => 'TEMP_NOMINAL', 'onblur' => 'display_nominal(this);', 'onclick' => 'show_nominal(this);'), TRUE, 3); ?>
                        <?php $this->generate->input_text('Untuk pembayaran', array('name' => 'KETERANGAN'), TRUE, 9); ?>
                        <?php $this->generate->input_select2('Penerima', array('name' => 'PENERIMA', 'url' => site_url('master_data/pegawai/auto_complete')), TRUE, 5, FALSE, NULL); ?>

                                <button type="submit" class="btn w-xs btn-primary" id="simpan">   Cetak Kwitansi</button>

</form>


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

    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>pymatgen.command_line.bader_caller module — pymatgen 2018.3.14 documentation</title>
    <link rel="stylesheet" href="_static/proBlue.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />

Navigation

          index

          modules |

pymatgen 2018.3.14 documentation »

pymatgen.command_line.bader_caller module¶

class BaderAnalysis(chgcar_filename, potcar_filename=None, chgref_filename=None, parse_atomic_densities=False)[source]¶

Bases: object

Bader analysis for a CHGCAR.

Initializes the Bader caller.

<col class="field-name" />
<col class="field-body" />

Parameters:

chgcar_filename (str) – The filename of the CHGCAR.

potcar_filename (str) – Optional: the filename of the corresponding
POTCAR file. Used for calculating the charge transfer. If
None, the get_charge_transfer method will raise a ValueError.

chgref_filename (str) – Optional. The filename of the reference
CHGCAR, which calculated by AECCAR0 + AECCAR2. (See
http://theory.cm.utexas.edu/henkelman/code/bader/ for details.)

parse_atomic_densities (bool) – Optional. turns on atomic partition of the charge density
charge densities are atom centered

classmethod from_path(path, suffix='')[source]¶

Convenient constructor that takes in the path name of VASP run
to perform Bader analysis.

<col class="field-name" />
<col class="field-body" />

Parameters:

path (str) – Name of directory where VASP output files are
stored.

suffix (str) – specific suffix to look for (e.g. '.relax1'
for 'CHGCAR.relax1.gz').

get_charge(atom_index)[source]¶

Convenience method to get the charge on a particular atom.

<col class="field-name" />
<col class="field-body" />

Parameters:	atom_index – Index of atom.

Returns:	Charge associated with atom from the Bader analysis.

get_charge_transfer(atom_index)[source]¶

Returns the charge transferred for a particular atom. Requires POTCAR
to be supplied.

<col class="field-name" />
<col class="field-body" />

Parameters:	atom_index – Index of atom.

Returns:	Charge transfer associated with atom from the Bader analysis.
Given by final charge on atom - nelectrons in POTCAR for
associated atom.

get_oxidation_state_decorated_structure()[source]¶

Returns an oxidation state decorated structure.

<col class="field-name" />
<col class="field-body" />

Returns:	Returns an oxidation state decorated structure. Requires POTCAR
to be supplied.

classmethod rebuild_chgcar(atomic_densities)[source]¶

summary¶

bader_analysis_from_objects(chgcar, potcar=None, aeccar0=None, aeccar2=None)[source]¶

Convenience method to run Bader analysis from a set
of pymatgen Chgcar and Potcar objects.

This method will:

1. If aeccar objects are present, constructs a temporary reference
file as AECCAR0 + AECCAR2
2. Runs Bader analysis twice: once for charge, and a second time
for the charge difference (magnetization density).

<col class="field-name" />
<col class="field-body" />

Parameters:

chgcar – Chgcar object

potcar – (optional) Potcar object

aeccar0 – (optional) Chgcar object from aeccar0 file

aeccar2 – (optional) Chgcar object from aeccar2 file

Returns:
summary dict

bader_analysis_from_path(path, suffix='')[source]¶

Convenience method to run Bader analysis on a folder containing
typical VASP output files.

This method will:

1. Look for files CHGCAR, AECAR0, AECAR2, POTCAR or their gzipped
counterparts.
2. If AECCAR* files are present, constructs a temporary reference
file as AECCAR0 + AECCAR2
3. Runs Bader analysis twice: once for charge, and a second time
for the charge difference (magnetization density).

<col class="field-name" />
<col class="field-body" />

Parameters:

path – path to folder to search in

suffix – specific suffix to look for (e.g. '.relax1' for 'CHGCAR.relax1.gz'

Returns:
summary dict

This Page

Show Source

Quick search

    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

Navigation

          index

          modules |

pymatgen 2018.3.14 documentation »

        © Copyright 2011, Pymatgen Development Team.
      Created using Sphinx 1.7.1.

This page uses
Google Analytics to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.


text:
AMRectangleMenu
===============

Dynamic menu

![Screenshots](/AppImg/Menu01.png)
![Screenshots](/AppImg/Menu02.png)
![Screenshots](/AppImg/Menu03.png)


text:
<!doctype html>

  {% include "headers.html" %}

    {% include "navbar.html" %}

          {% block body %}{% endblock %}

© Copyright 2015 Forecast Foundation

Contact

      ×

        <button id="modal-ok-button" class="button small">Ok</button>

    {% include "scripts.html" %}


text:
<?php

namespace CouchDB\Util;

use CouchDB\Database;
use CouchDB\Encoder\JSONEncoder;
use GuzzleHttp\ClientInterface;

/**
 * @author Markus Bachmann <markus.bachmann@bachi.biz>
 */
class BatchUpdater
{
    /**
     * @var ClientInterface
     */
    private $client;

    /**
     * @var Database
     */
    private $database;

    /**
     * @var array
     */
    private $data;

    /**
     * Constructor.
     *
     * @param ClientInterface $client
     * @param Database        $db
     */
    public function __construct(ClientInterface $client, Database $db)
    {
        $this->client = $client;
        $this->database = $db;

        $this->data = ['docs' => []];
    }

    /**
     * Enqueue the document for a update.
     *
     * @param array $doc
     *
     * @return BatchUpdater
     */
    public function update(array $doc)
    {
        $this->data['docs'][] = $doc;

        return $this;
    }

    /**
     * Enqueue a document for deletion.
     *
     * @param string $id
     * @param string $rev
     *
     * @return BatchUpdater
     */
    public function delete($id, $rev)
    {
        $this->data['docs'][] = ['_id' => $id, '_rev' => $rev, '_deleted' => true];

        return $this;
    }

    /**
     * Execute the queue.
     *
     * @return array
     */
    public function execute()
    {
        $response = $this->client->request('POST', "/{$this->database->getName()}/_bulk_docs", [
            'body'    => JSONEncoder::encode($this->data),
            'headers' => ['Content-Type' => 'application/json'],
        ]);

        return JSONEncoder::decode((string) $response->getBody());
    }
}


text:
module Outer {
    module Inner {
        export var m: typeof Inner;
    }

    export var f: typeof Inner;
}

//// [privacyCheckTypeOfInvisibleModuleError.js]
var Outer;
(function (Outer) {
    var Inner;
    (function (Inner) {
    })(Inner || (Inner = {}));
})(Outer || (Outer = {}));

//// [privacyCheckTypeOfInvisibleModuleError.d.ts]
declare module Outer {
    module Inner {
        var m: typeof Inner;
    }
    var f: typeof Inner;
}


text:
<?php

namespace Mcwork\Model\Save;

use ContentinumComponents\Mapper\Process;
use ContentinumComponents\Unique\Id;

/**
 * Save model provides method to prepae insert and update datas
 *
 * @author Michael Jochum, michael.jochum@jochum-mediaservices.de
 */
class Preferences extends Process
{

    /**
     * Prepare datas before save
     *
     * @see \ContentinumComponents\Mapper\Process::save()
     */
    public function save($datas, $entity = null, $stage = '', $id = null)
    {
        $entity = $this->handleEntity($entity);
        if (null === $entity->getPrimaryValue()) {
            $newHost = false;
            if ('createnewhost' == $datas['hostId']) {
                $datas['hostId'] = Id::get();
                $datas['standardDomain'] = 'yes';
                $newHost = true;
            } else {
                $datas['standardDomain'] = 'no';
                $newHost = false;
            }
            $msg = parent::save($datas, $entity, $stage, $id);
            if (true === $newHost) {
                $this->addDefaultPage($datas, $this->lastInsertId);
            }
            return $msg;
        } else {
            unset($datas['standardDomain']);
            if (1 === $entity->getPrimaryValue()){
                unset($datas['host']);
            }
            parent::save($datas, $entity, $stage, $id);
        }
    }

    /**
     * Prepare insert a new default page
     *
     * @param array $datas
     * @param int $id host ident
     * @return boolean
     */
    protected function addDefaultPage($datas, $id)
    {
        $insert['webPreferences'] = $this->find($id, true);
        $insert['scope'] = '_default';
        $insert['resource'] = 'index';
        $insert['label'] = '_default ' . $datas['host'];
        $insert['title'] = '';
        $insert['url'] = '_default';
        $insert['publish'] = 'no';
        $insert['onlylink'] = '9';
        $page = new Page($this->getStorage());
        $entity = $page::ENTITY_MODEL;
        $page->addDefaults($insert, new $entity());
        return true;
    }
}


text:
package cuchaz.enigma.convert;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;

import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;

import cuchaz.enigma.mapping.ClassEntry;

public class ClassMatching {

	private ClassForest m_sourceClasses;
	private ClassForest m_destClasses;
	private BiMap<ClassEntry,ClassEntry> m_knownMatches;

	public ClassMatching(ClassIdentifier sourceIdentifier, ClassIdentifier destIdentifier) {
		m_sourceClasses = new ClassForest(sourceIdentifier);
		m_destClasses = new ClassForest(destIdentifier);
		m_knownMatches = HashBiMap.create();
	}

	public void addKnownMatches(BiMap<ClassEntry,ClassEntry> knownMatches) {
		m_knownMatches.putAll(knownMatches);
	}

	public void match(Iterable<ClassEntry> sourceClasses, Iterable<ClassEntry> destClasses) {
		for (ClassEntry sourceClass : sourceClasses) {
			if (!m_knownMatches.containsKey(sourceClass)) {
				m_sourceClasses.add(sourceClass);
			}
		}
		for (ClassEntry destClass : destClasses) {
			if (!m_knownMatches.containsValue(destClass)) {
				m_destClasses.add(destClass);
			}
		}
	}

	public Collection<ClassMatch> matches() {
		List<ClassMatch> matches = Lists.newArrayList();
		for (Entry<ClassEntry,ClassEntry> entry : m_knownMatches.entrySet()) {
			matches.add(new ClassMatch(
				entry.getKey(),
				entry.getValue()
			));
		}
		for (ClassIdentity identity : m_sourceClasses.identities()) {
			matches.add(new ClassMatch(
				m_sourceClasses.getClasses(identity),
				m_destClasses.getClasses(identity)
			));
		}
		for (ClassIdentity identity : m_destClasses.identities()) {
			if (!m_sourceClasses.containsIdentity(identity)) {
				matches.add(new ClassMatch(
					new ArrayList<ClassEntry>(),
					m_destClasses.getClasses(identity)
				));
			}
		}
		return matches;
	}

	public Collection<ClassEntry> sourceClasses() {
		Set<ClassEntry> classes = Sets.newHashSet();
		for (ClassMatch match : matches()) {
			classes.addAll(match.sourceClasses);
		}
		return classes;
	}

	public Collection<ClassEntry> destClasses() {
		Set<ClassEntry> classes = Sets.newHashSet();
		for (ClassMatch match : matches()) {
			classes.addAll(match.destClasses);
		}
		return classes;
	}

	public BiMap<ClassEntry,ClassEntry> uniqueMatches() {
		BiMap<ClassEntry,ClassEntry> uniqueMatches = HashBiMap.create();
		for (ClassMatch match : matches()) {
			if (match.isMatched() && !match.isAmbiguous()) {
				uniqueMatches.put(match.getUniqueSource(), match.getUniqueDest());
			}
		}
		return uniqueMatches;
	}

	public Collection<ClassMatch> ambiguousMatches() {
		List<ClassMatch> ambiguousMatches = Lists.newArrayList();
		for (ClassMatch match : matches()) {
			if (match.isMatched() && match.isAmbiguous()) {
				ambiguousMatches.add(match);
			}
		}
		return ambiguousMatches;
	}

	public Collection<ClassEntry> unmatchedSourceClasses() {
		List<ClassEntry> classes = Lists.newArrayList();
		for (ClassMatch match : matches()) {
			if (!match.isMatched() && !match.sourceClasses.isEmpty()) {
				classes.addAll(match.sourceClasses);
			}
		}
		return classes;
	}

	public Collection<ClassEntry> unmatchedDestClasses() {
		List<ClassEntry> classes = Lists.newArrayList();
		for (ClassMatch match : matches()) {
			if (!match.isMatched() && !match.destClasses.isEmpty()) {
				classes.addAll(match.destClasses);
			}
		}
		return classes;
	}

	@Override
	public String toString() {

		// count the ambiguous classes
		int numAmbiguousSource = 0;
		int numAmbiguousDest = 0;
		for (ClassMatch match : ambiguousMatches()) {
			numAmbiguousSource += match.sourceClasses.size();
			numAmbiguousDest += match.destClasses.size();
		}

		StringBuilder buf = new StringBuilder();
		buf.append(String.format("%20s%8s%8s\n", "", "Source", "Dest"));
		buf.append(String.format("%20s%8d%8d\n", "Classes", sourceClasses().size(), destClasses().size()));
		buf.append(String.format("%20s%8d%8d\n", "Uniquely matched", uniqueMatches().size(), uniqueMatches().size()));
		buf.append(String.format("%20s%8d%8d\n", "Ambiguously matched", numAmbiguousSource, numAmbiguousDest));
		buf.append(String.format("%20s%8d%8d\n", "Unmatched", unmatchedSourceClasses().size(), unmatchedDestClasses().size()));
		return buf.toString();
	}
}


text:
import * as React from 'react';

import { BsPrefixComponent, TransitionCallbacks } from './helpers';

interface TabPaneProps extends TransitionCallbacks {
  eventKey?: unknown;
  active?: boolean;
  transition?: false | React.ReactType;
  bsClass?: string;
  mountOnEnter?: boolean;
  unmountOnExit?: boolean;
}

declare class TabPane<
  As extends React.ReactType = 'div'
> extends BsPrefixComponent<As, TabPaneProps> {}

export default TabPane;


text:
@interface ECViewController ()
@property (strong, nonatomic) TextSwitch* switch3;

@end

@implementation ECViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    CGRect frame = CGRectMake(50, 100, 0, 0);
    TextSwitch* textSwitch = [[TextSwitch alloc] initWithFrame:frame];
    textSwitch.onImage = [UIImage imageNamed:@"OffImage.png"];
    textSwitch.offImage = [UIImage imageNamed:@"OffImage.png"];
    textSwitch.thumbImage = [UIImage imageNamed:@"Thumb.png"];
    textSwitch.offText = @"OFF";
    textSwitch.onText = @"ON";
    textSwitch.padding = 20;
    [textSwitch addTarget:self action:@selector(onValueChanged:) forControlEvents:UIControlEventValueChanged];
    [self.view addSubview:textSwitch];

    CGRect frame2 = CGRectMake(50, 160, 0, 0);
    TextSwitch* textSwitch2 = [[TextSwitch alloc] initWithFrame:frame2];
    textSwitch2.onImage = [UIImage imageNamed:@"OffImage.png"];
    textSwitch2.offImage = [UIImage imageNamed:@"OffImage.png"];
    textSwitch2.thumbImage = [UIImage imageNamed:@"Thumb.png"];
    textSwitch2.padding = 20;
    textSwitch2.offText = @"关";
    textSwitch2.onText = @"开";
    textSwitch2.textLabel.font = [UIFont systemFontOfSize:20];
    textSwitch2.textLabel.textColor = [UIColor grayColor];
    textSwitch2.on = YES;
    [self.view addSubview:textSwitch2];

    TextSwitch* textSwitch3 = [[TextSwitch alloc] initWithFrame:CGRectZero];
    textSwitch3.onImage = [UIImage imageNamed:@"OffImage.png"];
    textSwitch3.offImage = [UIImage imageNamed:@"OffImage.png"];
    textSwitch3.thumbImage = [UIImage imageNamed:@"Thumb.png"];
    textSwitch3.padding = 20;
    [self.view addSubview:textSwitch3];
    self.switch3 = textSwitch3;
    self.switch3.translatesAutoresizingMaskIntoConstraints = NO;
    NSLog(@"%f", self.switch3.frame.size.height);

    TextSwitch* textSwitch4 = [[TextSwitch alloc] init];
    textSwitch4.onImage = [UIImage imageNamed:@"OffImage2.png"];
    textSwitch4.offImage = [UIImage imageNamed:@"OffImage2.png"];
    textSwitch4.thumbImage = [UIImage imageNamed:@"Thumb2.png"];
    textSwitch4.padding = 26;
    [self.view addSubview:textSwitch4];
    textSwitch4.translatesAutoresizingMaskIntoConstraints = NO;
    [textSwitch4 bottomTo:textSwitch3 distance:20];
//    [textSwitch4 constraintSize:textSwitch4.frame.size];
    [textSwitch4 centerXInSuperView];

    TextSwitch* textSwitch5 = [[TextSwitch alloc] init];
    textSwitch5.onImage = [UIImage imageNamed:@"OffImage3.png"];
    textSwitch5.offImage = [UIImage imageNamed:@"OffImage3.png"];
    textSwitch5.thumbImage = [UIImage imageNamed:@"Thumb3.png"];
    textSwitch5.padding = 23;
    textSwitch5.offText = @"关";
    textSwitch5.onText = @"开";
    textSwitch5.textLabel.font = [UIFont systemFontOfSize:20];
    textSwitch5.textLabel.textColor = [UIColor grayColor];
    [self.view addSubview:textSwitch5];
    textSwitch5.translatesAutoresizingMaskIntoConstraints = NO;
    [textSwitch5 bottomTo:textSwitch4 distance:20];
    //    [textSwitch4 constraintSize:textSwitch4.frame.size];
    [textSwitch5 centerXInSuperView];

}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void) viewDidLayoutSubviews
{
    [super viewDidLayoutSubviews];

    [self.view setNeedsUpdateConstraints];
    NSLog(@"%f", self.switch3.frame.size.height);
}

- (void) updateViewConstraints
{
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:self.switch3
                                                          attribute:NSLayoutAttributeCenterX
                                                          relatedBy:NSLayoutRelationEqual
                                                             toItem:self.view
                                                          attribute:NSLayoutAttributeCenterX
                                                         multiplier:1.0f
                                                           constant:0.0f]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:self.switch3
                                                          attribute:NSLayoutAttributeCenterY
                                                          relatedBy:NSLayoutRelationEqual
                                                             toItem:self.view
                                                          attribute:NSLayoutAttributeCenterY
                                                         multiplier:1.0f
                                                           constant:0.0f]];
    NSDictionary* views = @{@"switch": self.switch3};
    NSNumber* width = [NSNumber numberWithFloat:self.switch3.frame.size.width];
    NSNumber* height = [NSNumber numberWithFloat:self.switch3.frame.size.height];
    NSDictionary* metrics = @{@"width": width, @"height": height};
    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[switch(==width)]" options:0 metrics:metrics views:views]];
    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[switch(==height)]" options:0 metrics:metrics views:views]];

    [super updateViewConstraints];
}

- (void) onValueChanged: (TextSwitch*) sender
{
    NSLog(@"on %@", sender.on? @"yes": @"no");
}

@end


text:
package org.keycloak.adapters.servlet;

import org.keycloak.KeycloakPrincipal;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.adapters.AdapterTokenStore;
import org.keycloak.adapters.AdapterUtils;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.OAuthRequestAuthenticator;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.adapters.OidcKeycloakAccount;
import org.keycloak.adapters.RefreshableKeycloakSecurityContext;
import org.keycloak.adapters.RequestAuthenticator;
import org.keycloak.adapters.spi.KeycloakAccount;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.security.Principal;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * @author Davide Ungari
 * @version $Revision: 1 $
 */
public class FilterRequestAuthenticator extends RequestAuthenticator {
    private static final Logger log = Logger.getLogger(""+FilterRequestAuthenticator.class);
    protected HttpServletRequest request;

    public FilterRequestAuthenticator(KeycloakDeployment deployment,
                                      AdapterTokenStore tokenStore,
                                      OIDCHttpFacade facade,
                                      HttpServletRequest request,
                                      int sslRedirectPort) {
        super(facade, deployment, tokenStore, sslRedirectPort);
        this.request = request;
    }

    @Override
    protected OAuthRequestAuthenticator createOAuthAuthenticator() {
        return new OAuthRequestAuthenticator(this, facade, deployment, sslRedirectPort, tokenStore);
    }

    @Override
    protected void completeOAuthAuthentication(final KeycloakPrincipal<RefreshableKeycloakSecurityContext> skp) {
        final RefreshableKeycloakSecurityContext securityContext = skp.getKeycloakSecurityContext();
        final Set<String> roles = AdapterUtils.getRolesFromSecurityContext(securityContext);
        OidcKeycloakAccount account = new OidcKeycloakAccount() {

            @Override
            public Principal getPrincipal() {
                return skp;
            }

            @Override
            public Set<String> getRoles() {
                return roles;
            }

            @Override
            public KeycloakSecurityContext getKeycloakSecurityContext() {
                return securityContext;
            }

        };

        request.setAttribute(KeycloakSecurityContext.class.getName(), securityContext);
        this.tokenStore.saveAccountInfo(account);
    }

    @Override
    protected void completeBearerAuthentication(final KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal, String method) {
        final RefreshableKeycloakSecurityContext securityContext = principal.getKeycloakSecurityContext();
        final Set<String> roles = AdapterUtils.getRolesFromSecurityContext(securityContext);
        if (log.isLoggable(Level.FINE)) {
            log.fine("Completing bearer authentication. Bearer roles: " + roles);
        }
        request.setAttribute(KeycloakSecurityContext.class.getName(), securityContext);
        OidcKeycloakAccount account = new OidcKeycloakAccount() {

            @Override
            public Principal getPrincipal() {
                return principal;
            }

            @Override
            public Set<String> getRoles() {
                return roles;
            }

            @Override
            public KeycloakSecurityContext getKeycloakSecurityContext() {
                return securityContext;
            }

        };
        // need this here to obtain UserPrincipal
        request.setAttribute(KeycloakAccount.class.getName(), account);
    }

    @Override
    protected String changeHttpSessionId(boolean create) {
        HttpSession session = request.getSession(create);
        return session != null ? session.getId() : null;
    }

}


text:
package com.google.android.apps.exposurenotification.keydownload;

import androidx.annotation.VisibleForTesting;

/**
 * Some static constants for key file parsing.
 */
public final class KeyFileConstants {
  @VisibleForTesting public static final String SIG_FILENAME = "export.sig";
  @VisibleForTesting public static final String EXPORT_FILENAME = "export.bin";

  private KeyFileConstants() {
  }
}