text:
Watch the videos demonstrating the project

Read about the project [here](https://dzone.com/articles/bootstrapping-microservices-your-microservice-arch)

The idea of this project is to provide you a bootstrap for your next microservice architecture using Java. we are addressing main challenges that everyone faces when is starting with microservices. This project will definitely help you get an understand about microservices world and save you a lot of time in setting your initial microservice architecture.

Basically, if you are interested in microservice, either study or want to implement microservice approach at your work, this project is for you!

Microservice principles addressed:

* Scalability
* Availability
* Resiliency
* Independent, autonomous
* Decentralized governance
* Failure isolation
* Auto-Provisioning
* Continuous delivery through DevOps

Microservice patterns:

* Circuit Breakers
* API Gateway
* Command Query Responsibility Segregation (CQRS)
* Saga Pattern
* Event Sourcing
* Log Aggregation
* Health Check
* Service Discovery
* External Configuration
* Distributed authentication

-----
## Free Advanced Java Course
I am the author of the [Advanced Java for adults course](https://www.udemy.com/course/advanced-java-for-adults/?referralCode=8014CCF0A5A931ADED5F). This course contains advanced and not conventional lessons. In this course, you will learn to think differently from those who have a limited view of software development. I will provoke you to reflect on decisions that you take in your day to day job, which might not be the best ones. This course is for middle to senior developers and we will not teach Java language features but how to lead complex Java projects.

This course's lectures are based on a Trading system, an opensource project hosted on my [Github](https://github.com/apssouza22/trading-system).

-----

Technologies that you will see in this system:

Spring Boot, Spring Data, Spring Cloud Eureka, Load Balancing with Ribbon,
Declarative REST Clients with Feign, Software Circuit Breakers with Hystrix,
Administrating using Spring admin,Log management with Elastic search, Logstash and Kibana (ELK),
Server load balancing with Nginx,
Infrastructure management with Docker-compose, JMX application monitoring,
Security with Spring Security OAuth, Oauth2 with JWT, Aspect Oriented Programing,
Distributed events with Kafka, Spring Stream Maven Multimodule project, Event Sourcing,
CQRS, REST, Web Sockets, Continuous deploy with Jenkins, and all developed using Java 8.

![Alt text](assets/microservices-arch.jpg?raw=true "microservices architecture")

## How to use

* run `package-projects.sh`
* run `docker-orchestrate.sh`
* `docker-compose -p todo up`

## Continuous deploy using Jenkins Pipeline
We have created a docker image in order to have continuous deploy in our project [here](https://github.com/apssouza22/build-deploy).

This image will contain all necessary to build our project, create the Docker images and
deploy on AWS using ECS containers.

To make this integration easy, we have added the `Jenkinsfile` with the steps necessary to have
the Docker image built. To use it, you will need just to configure a Job on Jenkins using Pipeline plugin
and paste the content of the Jenkinsfile in the Pipeline script box. Have a look at this
[video](https://www.youtube.com/watch?v=u3xLXEnlu2M&t=1023s&index=2&list=PLoO1q0-ZB3v6ZN6qvk0dsRRuxjiAQDuZx)
to check how to work with Jenkins pipeline

### Deploy on AWS
* Create your credentials on AWS
* Create your cluster on AWS console
* Have the build-deploy container running (Checkout in the project's README how to do it)
* Access Jenkins painal
* Create a pipeline job
* Run the Job

### Accessing the services
* Authenticate -> ```curl -X POST -vu todo-app:123456 http://localhost:8017/oauth/token -H "Accept: application/json" -d "password=1234&username=apssouza22@gmail.com&grant_type=password&scope=write&client_secret=123456&client_id=todo-app"```

* Get data using the access_token -> `localhost:8018/accounts?access_token={access_token}` or `curl -H "Authorization: Bearer $TOKEN" "localhost:8018/path"`

### Scaling
NGINX will  be configured for browser caching of the static content and Load balance. For that we will need to scale our App Gateway
and update manually the ports in `default.conf` file, in the upstream configuration section:

```
upstream backend {
  server gateway:8018;
  server gateway:DYNAMICPORT;
  server gateway:DYNAMICPORT;
}
```

And we will run the compose file with `--scale` parameter:

`docker-compose -f proxy-docker-compose.yml -p todo up --scale gateway=2`

### URLs
Monitoring stream - http://localhost:8022/turbine.stream

To-dos http://localhost:8015/todos

Users http://localhost:8016/accounts

Eureka server - http://localhost:8010/

Config server - http://localhost:8888/

Boot admin - http://localhost:8026

Kimbana - http://localhost:5601

Elasticsearch Info: http://localhost:9200

Elasticsearch Status: http://localhost:9200/_status?pretty

NGINX Status: localhost:8055/nginx_status

docker-compose -p todo up
docker-compose -p todo down

## OBS
* In order to make ELK work we need to reserve 3GB RAM to docker(docker settings - advanced - memory )
* Have a look at the Readme of each service/ module to see the explanation about it.
* On Kimbana create a filter called `filebeat-*` to see the logs

## Useful Commands

### Creating to-do via Curl
```
curl -d '{"userEmail":"alex@test.com", "caption":"post caption", "description":"desc", "priority": 1}' -H "Content-Type: application/json" -X POST http://localhost:8015/todos
```

### Stopping, Starting, Restarting...

```
# running separated container and link to the network infrastructure
docker run -d -p 8018:8018  --network todo_net --add-host eureka:172.19.0.5 --add-host config:172.19.0.2 todo/reminder-service

# orchestrate start-up of containers, tailing the logs...
docker-compose -p music up -d container-name && docker logs elk --follow # ^C to break

# stopping containers
docker-compose todo stop
docker-compose todo down

# starting containers
docker-compose -p todo up

# removing containers
docker-compose todo rm

```

### Application Startup Issues

```bash
# stop / start Tomcat
docker exec -it container-name sh /usr/local/tomcat/bin/startup.sh
docker exec -it container-name sh /usr/local/tomcat/bin/shutdown.sh

# check logs for start-up issues...
docker exec -it container-name cat /usr/local/tomcat/logs/catalina.out
docker logs container-name
```

### Kafka
Inside the Kafka container

```
# event consume
/opt/kafka/bin/kafka-console-consumer.sh --zookeeper zookeeper:2181 --topic todo-mail --from-beginning

# producer console
/opt/kafka/bin/kafka-console-producer.sh --broker-list kafka:9092 --topic todo-mail

# Listing topics
/opt/kafka/bin/kafka-topics.sh --list --zookeeper zookeeper:2181

# Create topic
/opt/kafka/bin/kafka-topics.sh --create --zookeeper zookeeper:2181 --replication-factor 1 --partitions 1 --topic pcs
```

### Data
```
#create a new To-Do
curl -H "Content-Type: application/json" -X POST -d '{"id":161,"caption":"Test caption 3","userEmail":"marcia@gmail.com","description":"description 3","createdat":null,"priority":2,"status":"PENDING","version":0,"valid":true}' http://localhost:8015/todos
```

## TODO
* Add private maven repository Artifactory
* Manager services integration through Spring Webflow
* Add Distributed Tracing

## That's all. Leave a star if it helped you!


text:
import { WebAPI } from './web-api';
export class App {
    constructor(api) {
        this.api = api;
    }
    configureRouter(config, router) {
        config.title = 'Contacts';
        config.map([
            { route: '', moduleId: 'no-selection', title: 'Select' },
            { route: 'contacts/:id', moduleId: 'contact-detail', name: 'contacts' }
        ]);
        this.router = router;
    }
}
App.inject = [WebAPI];

redpajama_set_name: RedPajamaGithub


text:
from django.views.generic import TemplateView

from pyconca2017.pycon_sponsors.services import SponsorsService

class SponsorsPageView(TemplateView):
    template_name = 'pages/sponsors.html'

    service = SponsorsService()

    def get_context_data(self, **kwargs):
        context_data = super().get_context_data(**kwargs)

        levels = self.service.get_levels()

        context_data['sponsor_levels'] = levels

        return context_data


text:
class CSpriteFactory
{
public:
	~CSpriteFactory();
	CSprite *Create(const std::string& img);
	void Tick(float dt){}
	void Release();

	static CSpriteFactory* GetInstancePtr()
	{
		static CSpriteFactory sf;
		return &sf;
	}

private:
	CSpriteFactory();
	CSpriteFactory(const CSpriteFactory&) = delete;
	CSpriteFactory* operator=(const CSpriteFactory&) = delete;

	//void update(float delta_time);

private:
	typedef std::unordered_map<std::string, CSprite*> SpriteUMap;
	SpriteUMap	m_Sprites;
};

#endif  //_SPRITE_FACTORY_


text:
using GSF.ComponentModel.DataAnnotations;
using GSF.Data.Model;
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace DeviceStatAdapters.Model
{
    [PrimaryLabel("Acronym")]
    public class Device
    {
        [PrimaryKey(true)]
        public int ID { get; set; }

        public Guid UniqueID { get; set; }

        [Required]
        [StringLength(200)]
        [AcronymValidation]
        public string Acronym { get; set; }

        [StringLength(200)]
        [AcronymValidation]
        public string Name { get; set; }

        [StringLength(200)]
        public string ParentAcronym { get; set; }

        public string Protocol { get; set; }

        public decimal? Longitude { get; set; }

        public decimal? Latitude { get; set; }

        [DefaultValue(30)]
        public int FramesPerSecond { get; set; }
    }
}


text:
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { setupComponentTest } from 'ember-mocha';
import hbs from 'htmlbars-inline-precompile';

describe('Integration | Component | show-twitter-feed', function() {
  setupComponentTest('show-twitter-feed', {
    integration: true
  });

  it('renders', function() {
    // Set any properties with this.set('myProperty', 'value');
    // Handle any actions with this.on('myAction', function(val) { ... });
    // Template block usage:
    // this.render(hbs`
    //   {{#show-twitter-feed}}
    //     template content
    //   {{/show-twitter-feed}}
    // `);

    this.render(hbs`{{show-twitter-feed}}`);
    expect(this.$()).to.have.length(1);
  });
});


text:
<?xml version="1.0" encoding="utf-8"?>

<com.codeitsuisse.team28.expensetracker.card.CardLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    style="@style/MainLayout"
    android:background="#ffffff">

    <android.support.v7.widget.CardView
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
        android:id="@+id/cardView"
        style="@style/MainCardView"
        card_view:cardCornerRadius="2dp"
        android:foreground="?android:attr/selectableItemBackground"
        android:clickable="true"
        android:layout_height="wrap_content"
        android:minHeight="150dp"
        card_view:cardUseCompatPadding="true"
        tools:targetApi="honeycomb">

        <!-- <LinearLayout
            android:orientation="horizontal"
            android:layout_width="fill_parent"

            android:layout_height="wrap_content">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:minWidth="125dp"
                android:contentDescription="@null"
                android:scaleType="fitStart"
                android:id="@+id/imageView" /> -->

            <LinearLayout
                android:weightSum="1"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="match_parent">

                <TextView
                    android:layout_weight="0.3"
                    android:layout_width="fill_parent"
                    android:layout_height="0dp"
                    android:id="@+id/titleTextView"
                    android:paddingTop="16dp"
                    android:paddingLeft="16dp"
                    android:paddingRight="16dp"
                    android:paddingBottom="8dp"
                    android:textStyle="bold"
                    android:background="@color/mySlidingAccentColor"
                    android:textSize="@dimen/title_size"
                    android:textColor="#ffffff"
                    tools:text="El Pooch"/>

                <View
                    android:id="@+id/cardDivider"
                    android:layout_width="fill_parent"
                    android:layout_marginTop="40dp"
                    android:layout_height="1dp"
                    android:background="@color/divider_grey"/>

                <LinearLayout
                    android:layout_marginTop="6dp"
                    android:layout_weight="0.5"
                    android:orientation="horizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="0dp">

                    <TextView
                        android:layout_width="fill_parent"
                        android:layout_height="match_parent"
                        android:textColor="@color/description_color"
                        android:textSize="@dimen/description_size"
                        android:id="@+id/descriptionTextView"
                        android:paddingLeft="@dimen/big_padding"
                        android:paddingBottom="@dimen/big_padding"
                        android:paddingRight="@dimen/big_padding"
                        tools:text="By Alex Nelson"/>
                </LinearLayout>

            </LinearLayout>
        <!-- </LinearLayout> -->

    </android.support.v7.widget.CardView>

</com.codeitsuisse.team28.expensetracker.card.CardLayout>


text:
import pytest

def test_blurhash_decode(api):
    fake_media_dict = {
        'width': 320,
        'height': 240,
        'blurhash': '=~NdOWof1PbIPUXSvgbI$f'
    }
    decoded_image = api.decode_blurhash(fake_media_dict)
    assert len(decoded_image) == 9 * 16
    assert len(decoded_image[0]) == 16

    decoded_image_2 = api.decode_blurhash(
        fake_media_dict,
        out_size = (fake_media_dict["width"], fake_media_dict["height"]),
        size_per_component = False,
        return_linear = False
    )
    assert len(decoded_image_2) == 240
    assert len(decoded_image_2[0]) == 320


text:
import {LitElement, html} from 'lit';
import {customElement} from 'lit/decorators.js';
import {getLocale, setLocaleFromUrl} from './localization.js';
import {allLocales} from './generated/locale-codes.js';
import {localized} from '@lit/localize';

const localeNames: {
  [L in typeof allLocales[number]]: string;
} = {
  en: 'English',
  'es-419': 'Español (Latinoamérica)',
  zh_CN: '中文 (简体)',
};

// Note we use updateWhenLocaleChanges here so that we're always up to date with
// the active locale (the result of getLocale()) when the locale changes via a
// history navigation.
@localized()
@customElement('locale-picker')
export class LocalePicker extends LitElement {
  render() {
    return html`
      <select @change=${this.localeChanged}>
        ${allLocales.map(
          (locale) =>
            html`<option value=${locale} ?selected=${locale === getLocale()}>
              ${localeNames[locale]}
            </option>`
        )}
      </select>
    `;
  }

  localeChanged(event: Event) {
    const newLocale = (event.target as HTMLSelectElement).value;
    if (newLocale !== getLocale()) {
      const url = new URL(window.location.href);
      url.searchParams.set('locale', newLocale);
      window.history.pushState(null, '', url.toString());
      setLocaleFromUrl();
    }
  }
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datastream/v1/datastream_resources.proto

namespace Google\Cloud\Datastream\V1\ValidationMessage;

use UnexpectedValueException;

/**
 * Validation message level.
 *
 * Protobuf type google.cloud.datastream.v1.ValidationMessage.Level
 */
class Level
{
    /**
     * Unspecified level.
     *
     * Generated from protobuf enum LEVEL_UNSPECIFIED = 0;
     */
    const LEVEL_UNSPECIFIED = 0;
    /**
     * Potentially cause issues with the Stream.
     *
     * Generated from protobuf enum WARNING = 1;
     */
    const WARNING = 1;
    /**
     * Definitely cause issues with the Stream.
     *
     * Generated from protobuf enum ERROR = 2;
     */
    const ERROR = 2;

    private static $valueToName = [
        self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED',
        self::WARNING => 'WARNING',
        self::ERROR => 'ERROR',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }

    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}


text:
package parser

import "strings"

type nonEmitingLexer struct {
	lexer  StatefulRubyLexer
	Tokens []token
}

func NewNonEmitingLexer(l StatefulRubyLexer) *nonEmitingLexer {
	return &nonEmitingLexer{lexer: l}
}

func (l *nonEmitingLexer) next() (r rune) {
	return l.lexer.next()
}

func (l *nonEmitingLexer) backup() {
	l.lexer.backup()
}

func (l *nonEmitingLexer) ignore() {
	l.lexer.ignore()
}

// peek returns but does not consume
// the next rune in the input.
func (l *nonEmitingLexer) peek() rune {
	rune := l.next()
	l.backup()
	return rune
}

// accepts a single rune from valid
func (l *nonEmitingLexer) accept(valid string) bool {
	if strings.IndexRune(valid, l.next()) >= 0 {
		return true
	}
	l.backup()
	return false
}

// acceptRun consumes a run of runes from the valid set.
func (l *nonEmitingLexer) acceptRun(valid string) {
	for strings.IndexRune(valid, l.next()) >= 0 {
	}
	l.backup()
}

func (l *nonEmitingLexer) CurrentLineNumber() int {
	return l.lexer.CurrentLineNumber()
}

func (l *nonEmitingLexer) parsedNewLine() {
	l.lexer.parsedNewLine()
}

func (l *nonEmitingLexer) emit(t tokenType) {
	l.Tokens = append(l.Tokens, token{
		typ:   t,
		value: l.lexer.currentSlice(),
		line:  l.lexer.CurrentLineNumber(),
	})
	l.lexer.ignore()
}

func (l *nonEmitingLexer) lastToken() token {
	return l.Tokens[len(l.Tokens)-1]
}

func (l *nonEmitingLexer) slice(start, end int) string {
	return l.lexer.slice(start, end)
}

func (l *nonEmitingLexer) currentSlice() string {
	return l.lexer.currentSlice()
}

func (l *nonEmitingLexer) moveCurrentTokenStartIndex(val int) {
	l.lexer.moveCurrentTokenStartIndex(val)
}

func (l *nonEmitingLexer) moveCurrentPositionIndex(val int) {
	l.lexer.moveCurrentPositionIndex(val)
}

func (l *nonEmitingLexer) setCurrentPositionIndex(val int) {
	l.lexer.setCurrentPositionIndex(val)
}

func (l *nonEmitingLexer) startIndex() int {
	return l.lexer.startIndex()
}

func (l *nonEmitingLexer) currentIndex() int {
	return l.lexer.currentIndex()
}

func (l *nonEmitingLexer) lengthOfInput() int {
	return l.lexer.lengthOfInput()
}

func (l *nonEmitingLexer) Error(error string) {
	l.lexer.Error(error)
}

func (l *nonEmitingLexer) Lex(lval *RubySymType) int {
	return l.lexer.Lex(lval)
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
      <module fileurl="file://$PROJECT_DIR$/waterfall-layout.iml" filepath="$PROJECT_DIR$/waterfall-layout.iml" />
      <module fileurl="file://$PROJECT_DIR$/waterfalllayoutview/waterfalllayoutview.iml" filepath="$PROJECT_DIR$/waterfalllayoutview/waterfalllayoutview.iml" />
    </modules>
  </component>
</project>


text:
package org.elasticsearch.cluster.coordination;

import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;

import java.util.Optional;

import org.elasticsearch.cluster.coordination.LinearizabilityChecker.History;
import org.elasticsearch.cluster.coordination.LinearizabilityChecker.KeyedSpec;
import org.elasticsearch.cluster.coordination.LinearizabilityChecker.SequentialSpec;
import org.elasticsearch.test.ESTestCase;

import io.crate.common.collections.Tuple;

public class LinearizabilityCheckerTests extends ESTestCase {

    final LinearizabilityChecker checker = new LinearizabilityChecker();

    /**
     * Simple specification of a lock that can be exactly locked once. There is no unlocking.
     * Input is always null (and represents lock acquisition), output is a boolean whether lock was acquired.
     */
    final SequentialSpec lockSpec = new SequentialSpec() {

        @Override
        public Object initialState() {
            return false;
        }

        @Override
        public Optional<Object> nextState(Object currentState, Object input, Object output) {
            if (input != null) {
                throw new AssertionError("invalid history: input must be null");
            }
            if (output instanceof Boolean == false) {
                throw new AssertionError("invalid history: output must be boolean");
            }
            if (false == (boolean) currentState) {
                if (false == (boolean) output) {
                    return Optional.empty();
                }
                return Optional.of(true);
            } else if (false == (boolean) output) {
                return Optional.of(currentState);
            }
            return Optional.empty();
        }
    };

    public void testLockConsistent() {
        assertThat(lockSpec.initialState(), equalTo(false));
        assertThat(lockSpec.nextState(false, null, true), equalTo(Optional.of(true)));
        assertThat(lockSpec.nextState(false, null, false), equalTo(Optional.empty()));
        assertThat(lockSpec.nextState(true, null, false), equalTo(Optional.of(true)));
        assertThat(lockSpec.nextState(true, null, true), equalTo(Optional.empty()));
    }

    public void testLockWithLinearizableHistory1() {
        final History history = new History();
        int call0 = history.invoke(null); // 0: acquire lock
        history.respond(call0, true); // 0: lock acquisition succeeded
        int call1 = history.invoke(null); // 1: acquire lock
        history.respond(call1, false); // 0: lock acquisition failed
        assertTrue(checker.isLinearizable(lockSpec, history));
    }

    public void testLockWithLinearizableHistory2() {
        final History history = new History();
        int call0 = history.invoke(null); // 0: acquire lock
        int call1 = history.invoke(null); // 1: acquire lock
        history.respond(call0, false); // 0: lock acquisition failed
        history.respond(call1, true); // 0: lock acquisition succeeded
        assertTrue(checker.isLinearizable(lockSpec, history));
    }

    public void testLockWithLinearizableHistory3() {
        final History history = new History();
        int call0 = history.invoke(null); // 0: acquire lock
        int call1 = history.invoke(null); // 1: acquire lock
        history.respond(call0, true); // 0: lock acquisition succeeded
        history.respond(call1, false); // 0: lock acquisition failed
        assertTrue(checker.isLinearizable(lockSpec, history));
    }

    public void testLockWithNonLinearizableHistory() {
        final History history = new History();
        int call0 = history.invoke(null); // 0: acquire lock
        history.respond(call0, false); // 0: lock acquisition failed
        int call1 = history.invoke(null); // 1: acquire lock
        history.respond(call1, true); // 0: lock acquisition succeeded
        assertFalse(checker.isLinearizable(lockSpec, history));
    }

    /**
     * Simple specification of a read/write register.
     * Writes are modeled as integer inputs (with corresponding null responses) and
     * reads are modeled as null inputs with integer outputs.
     */
    final SequentialSpec registerSpec = new SequentialSpec() {

        @Override
        public Object initialState() {
            return 0;
        }

        @Override
        public Optional<Object> nextState(Object currentState, Object input, Object output) {
            if ((input == null) == (output == null)) {
                throw new AssertionError("invalid history: exactly one of input or output must be null");
            }
            if (input != null) {
                return Optional.of(input);
            } else if (output.equals(currentState)) {
                return Optional.of(currentState);
            }
            return Optional.empty();
        }
    };

    public void testRegisterConsistent() {
        assertThat(registerSpec.initialState(), equalTo(0));
        assertThat(registerSpec.nextState(7, 42, null), equalTo(Optional.of(42)));
        assertThat(registerSpec.nextState(7, null, 7), equalTo(Optional.of(7)));
        assertThat(registerSpec.nextState(7, null, 42), equalTo(Optional.empty()));
    }

    public void testRegisterWithLinearizableHistory() {
        final History history = new History();
        int call0 = history.invoke(42); // 0: invoke write 42
        int call1 = history.invoke(null); // 1: invoke read
        int call2 = history.invoke(null); // 2: invoke read
        history.respond(call2, 0); // 2: read returns 0
        history.respond(call1, 42); // 1: read returns 42

        expectThrows(IllegalArgumentException.class, () -> checker.isLinearizable(registerSpec, history));
        assertTrue(checker.isLinearizable(registerSpec, history, i -> null));

        history.respond(call0, null); // 0: write returns
        assertTrue(checker.isLinearizable(registerSpec, history));
    }

    public void testRegisterWithNonLinearizableHistory() {
        final History history = new History();
        int call0 = history.invoke(42); // 0: invoke write 42
        int call1 = history.invoke(null); // 1: invoke read
        history.respond(call1, 42); // 1: read returns 42
        int call2 = history.invoke(null); // 2: invoke read
        history.respond(call2, 0); // 2: read returns 0, not allowed

        expectThrows(IllegalArgumentException.class, () -> checker.isLinearizable(registerSpec, history));
        assertFalse(checker.isLinearizable(registerSpec, history, i -> null));

        history.respond(call0, null); // 0: write returns
        assertFalse(checker.isLinearizable(registerSpec, history));
    }

    public void testRegisterObservedSequenceOfUpdatesWitLinearizableHistory() {
        final History history = new History();
        int call0 = history.invoke(42); // 0: invoke write 42
        int call1 = history.invoke(43); // 1: invoke write 43
        int call2 = history.invoke(null); // 2: invoke read
        history.respond(call2, 42); // 1: read returns 42
        int call3 = history.invoke(null); // 3: invoke read
        history.respond(call3, 43); // 3: read returns 43
        int call4 = history.invoke(null); // 4: invoke read
        history.respond(call4, 43); // 4: read returns 43

        history.respond(call0, null); // 0: write returns
        history.respond(call1, null); // 1: write returns

        assertTrue(checker.isLinearizable(registerSpec, history));
    }

    public void testRegisterObservedSequenceOfUpdatesWithNonLinearizableHistory() {
        final History history = new History();
        int call0 = history.invoke(42); // 0: invoke write 42
        int call1 = history.invoke(43); // 1: invoke write 43
        int call2 = history.invoke(null); // 2: invoke read
        history.respond(call2, 42); // 1: read returns 42
        int call3 = history.invoke(null); // 3: invoke read
        history.respond(call3, 43); // 3: read returns 43
        int call4 = history.invoke(null); // 4: invoke read
        history.respond(call4, 42); // 4: read returns 42, not allowed

        history.respond(call0, null); // 0: write returns
        history.respond(call1, null); // 1: write returns

        assertFalse(checker.isLinearizable(registerSpec, history));
    }

    final SequentialSpec multiRegisterSpec = new KeyedSpec() {

        @Override
        public Object getKey(Object value) {
            return ((Tuple) value).v1();
        }

        @Override
        public Object getValue(Object value) {
            return ((Tuple) value).v2();
        }

        @Override
        public Object initialState() {
            return registerSpec.initialState();
        }

        @Override
        public Optional<Object> nextState(Object currentState, Object input, Object output) {
            return registerSpec.nextState(currentState, input, output);
        }
    };

    public void testMultiRegisterWithLinearizableHistory() {
        final History history = new History();
        int callX0 = history.invoke(new Tuple<>("x", 42)); // 0: invoke write 42 on key x
        int callX1 = history.invoke(new Tuple<>("x", null)); // 1: invoke read on key x
        int callY0 = history.invoke(new Tuple<>("y", 42)); // 0: invoke write 42 on key y
        int callY1 = history.invoke(new Tuple<>("y", null)); // 1: invoke read on key y
        int callX2 = history.invoke(new Tuple<>("x", null)); // 2: invoke read on key x
        int callY2 = history.invoke(new Tuple<>("y", null)); // 2: invoke read on key y
        history.respond(callX2, 0); // 2: read returns 0 on key x
        history.respond(callY2, 0); // 2: read returns 0 on key y
        history.respond(callY1, 42); // 1: read returns 42 on key y
        history.respond(callX1, 42); // 1: read returns 42 on key x

        expectThrows(IllegalArgumentException.class, () -> checker.isLinearizable(multiRegisterSpec, history));
        assertTrue(checker.isLinearizable(multiRegisterSpec, history, i -> null));

        history.respond(callX0, null); // 0: write returns on key x
        history.respond(callY0, null); // 0: write returns on key y
        assertTrue(checker.isLinearizable(multiRegisterSpec, history));
    }

    public void testMultiRegisterWithNonLinearizableHistory() {
        final History history = new History();
        int callX0 = history.invoke(new Tuple<>("x", 42)); // 0: invoke write 42 on key x
        int callX1 = history.invoke(new Tuple<>("x", null)); // 1: invoke read on key x
        int callY0 = history.invoke(new Tuple<>("y", 42)); // 0: invoke write 42 on key y
        int callY1 = history.invoke(new Tuple<>("y", null)); // 1: invoke read on key y
        int callX2 = history.invoke(new Tuple<>("x", null)); // 2: invoke read on key x
        history.respond(callY1, 42); // 1: read returns 42 on key y
        int callY2 = history.invoke(new Tuple<>("y", null)); // 2: invoke read on key y
        history.respond(callX2, 0); // 2: read returns 0 on key x
        history.respond(callY2, 0); // 2: read returns 0 on key y, not allowed
        history.respond(callX1, 42); // 1: read returns 42 on key x

        expectThrows(IllegalArgumentException.class, () -> checker.isLinearizable(multiRegisterSpec, history));
        assertFalse(checker.isLinearizable(multiRegisterSpec, history, i -> null));

        history.respond(callX0, null); // 0: write returns on key x
        history.respond(callY0, null); // 0: write returns on key y
        assertFalse(checker.isLinearizable(multiRegisterSpec, history));
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright 2010-2016, Google Inc.
 All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:

     * Redistributions of source code must retain the above copyright
 notice, this list of conditions and the following disclaimer.
     * Redistributions in binary form must reproduce the above
 copyright notice, this list of conditions and the following disclaimer
 in the documentation and/or other materials provided with the
 distribution.
     * Neither the name of Google Inc. nor the names of its
 contributors may be used to endorse or promote products derived from
 this software without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!--
  The current keycode mapping to flick direction and tapping action is as follows;
  +===========+===========+===========+
  |    '<'    |    'q'    |    'f'    |
  |'$' 'a' '#'|    'k' 'g'|'p' 'h' 'b'|
  |    '1'    |    '2'    |    '3'    |
  +===========+===========+===========+
  |    '>'    |    'j'    |    'l'    |
  |'%' 'i' '+'|    's' 'z'|'/' 'm' '-'|
  |    '4'    |    '5'    |    '6'    |
  +===========+===========+===========+
  |    '{'    |    'c'    |    'x'    |
  |'&' 'u' '^'|    't' 'd'|'(' 'y' ')'|
  |    '7'    |    '8'    |    '9'    |
  +===========+===========+===========+
  |    '}'    |    '\\'   |    '?'    |
  |'=' 'e' '_'|':' 'n' ';'|'.' 'r' '!'|
  |           |    '0'    |    ','    |
  +===========+===========+===========+
  |    '~'    |    '`'    |    'v'    |
  |'@' 'o' '|'|'\'''*' '"'|'[' 'w' ']'|
  |           |           |           |
  +===========+===========+===========+
  -->
<Keyboard
    xmlns:mozc="http://schemas.android.com/apk/res-auto"
    mozc:keyboardContentDescription="@string/cd_keyboard_kana"
    mozc:flickThreshold="32dip"
    mozc:keyBackground="twelvekeysRegular"
    mozc:keyWidth="17.3%p" mozc:keyHeight="20%p" mozc:keyHorizontalLayoutWeight="1"
    mozc:horizontalGap="0dip" mozc:verticalGap="0dip"
    mozc:popUpHeight="@dimen/key_preview_height"
    mozc:popUpIconHeight="@dimen/key_preview_icon_height"
    mozc:popUpXOffset="0dip" mozc:popUpYOffset="@dimen/mini_keyboard_vertical_correction"
    mozc:defaultIconWidth="@dimen/unlimited" mozc:defaultIconHeight="@dimen/keyboard_godan_default_height">
  <Row>
    <Key mozc:keyBackground="twelvekeysFunction"
         mozc:keyHorizontalLayoutWeight="0" mozc:keyEdgeFlags="left">
      <KeyState mozc:contentDescription="@string/cd_key_undo">
        <Flick>
          <KeyEntity mozc:sourceId="101"
                     mozc:keyCode="@integer/key_undo"
                     mozc:keyIcon="@raw/twelvekeys__function__undo__icon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height" />
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorTop"/>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_a">
        <Flick>
          <KeyEntity mozc:sourceId="1"
                     mozc:keyCode="@integer/uchar_latin_small_letter_a"
                     mozc:keyIcon="@raw/godan__kana__support__01_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__01"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="2"
                     mozc:keyCode="@integer/uchar_dollar_sign"
                     mozc:keyIcon="@raw/godan__kana__support__01_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__axtu"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="3"
                     mozc:keyCode="@integer/uchar_less_than_sign"
                     mozc:keyIcon="@raw/godan__kana__support__01_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__an"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="4"
                     mozc:keyCode="@integer/uchar_number_sign"
                     mozc:keyIcon="@raw/godan__kana__support__01_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__xya"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="5"
                     mozc:keyCode="@integer/uchar_digit_one"
                     mozc:keyIcon="@raw/godan__kana__support__01_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__one"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_k">
        <Flick>
          <KeyEntity mozc:sourceId="6"
                     mozc:keyCode="@integer/uchar_latin_small_letter_k"
                     mozc:keyIcon="@raw/godan__kana__support__02_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__02"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="8"
                     mozc:keyCode="@integer/uchar_latin_small_letter_q"
                     mozc:keyIcon="@raw/godan__kana__support__02_up"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_q"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="9"
                     mozc:keyCode="@integer/uchar_latin_small_letter_g"
                     mozc:keyIcon="@raw/godan__kana__support__02_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_g"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="10"
                     mozc:keyCode="@integer/uchar_digit_two"
                     mozc:keyIcon="@raw/godan__kana__support__02_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__two"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_h">
        <Flick>
          <KeyEntity mozc:sourceId="11"
                     mozc:keyCode="@integer/uchar_latin_small_letter_h"
                     mozc:keyIcon="@raw/godan__kana__support__03_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__03"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="12"
                     mozc:keyCode="@integer/uchar_latin_small_letter_p"
                     mozc:keyIcon="@raw/godan__kana__support__03_left"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_p"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="13"
                     mozc:keyCode="@integer/uchar_latin_small_letter_f"
                     mozc:keyIcon="@raw/godan__kana__support__03_up"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_f"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="14"
                     mozc:keyCode="@integer/uchar_latin_small_letter_b"
                     mozc:keyIcon="@raw/godan__kana__support__03_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_b"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="15"
                     mozc:keyCode="@integer/uchar_digit_three"
                     mozc:keyIcon="@raw/godan__kana__support__03_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__three"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorTop"/>
    <Key mozc:keyBackground="twelvekeysFunction"
         mozc:keyHorizontalLayoutWeight="0" mozc:keyEdgeFlags="right" mozc:isRepeatable="true">
      <KeyState mozc:contentDescription="@string/cd_key_uchar_backspace">
        <Flick>
          <KeyEntity mozc:sourceId="102"
                     mozc:keyCode="@integer/uchar_backspace"
                     mozc:keyIcon="@raw/twelvekeys__function__delete__icon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height" />
        </Flick>
      </KeyState>
    </Key>
  </Row>
  <Row>
    <Key mozc:keyBackground="twelvekeysFunction"
         mozc:keyHorizontalLayoutWeight="0" mozc:keyEdgeFlags="left" mozc:isRepeatable="true">
      <KeyState mozc:contentDescription="@string/cd_key_left">
        <Flick>
          <KeyEntity mozc:sourceId="103"
                     mozc:keyCode="@integer/key_left"
                     mozc:keyIcon="@raw/twelvekeys__function__left_arrow__icon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height" />
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorCenter"/>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_i">
        <Flick>
          <KeyEntity mozc:sourceId="16"
                     mozc:keyCode="@integer/uchar_latin_small_letter_i"
                     mozc:keyIcon="@raw/godan__kana__support__04_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__04"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="17"
                     mozc:keyCode="@integer/uchar_percent_sign"
                     mozc:keyIcon="@raw/godan__kana__support__04_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__ixtu"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="18"
                     mozc:keyCode="@integer/uchar_greater_than_sign"
                     mozc:keyIcon="@raw/godan__kana__support__04_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__in"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="19"
                     mozc:keyCode="@integer/uchar_plus_sign"
                     mozc:keyIcon="@raw/godan__kana__support__04_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__xi"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="20"
                     mozc:keyCode="@integer/uchar_digit_four"
                     mozc:keyIcon="@raw/godan__kana__support__04_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__four"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_s">
        <Flick>
          <KeyEntity mozc:sourceId="21"
                     mozc:keyCode="@integer/uchar_latin_small_letter_s"
                     mozc:keyIcon="@raw/godan__kana__support__05_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__05"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="23"
                     mozc:keyCode="@integer/uchar_latin_small_letter_j"
                     mozc:keyIcon="@raw/godan__kana__support__05_up"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_j"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="24"
                     mozc:keyCode="@integer/uchar_latin_small_letter_z"
                     mozc:keyIcon="@raw/godan__kana__support__05_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_z"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="25"
                     mozc:keyCode="@integer/uchar_digit_five"
                     mozc:keyIcon="@raw/godan__kana__support__05_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__five"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_m">
        <Flick>
          <KeyEntity mozc:sourceId="26"
                     mozc:keyCode="@integer/uchar_latin_small_letter_m"
                     mozc:keyIcon="@raw/godan__kana__support__06_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__06"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="27"
                     mozc:keyCode="@integer/uchar_solidus"
                     mozc:keyIcon="@raw/godan__kana__support__06_left"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__fullwidth_solidus"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="28"
                     mozc:keyCode="@integer/uchar_latin_small_letter_l"
                     mozc:keyIcon="@raw/godan__kana__support__06_up"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_l"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="29"
                     mozc:keyCode="@integer/uchar_hyphen_minus"
                     mozc:keyIcon="@raw/godan__kana__support__06_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__prolonged_sound_mark"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="30"
                     mozc:keyCode="@integer/uchar_digit_six"
                     mozc:keyIcon="@raw/godan__kana__support__06_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__six"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorCenter"/>
    <Key mozc:keyBackground="twelvekeysFunction"
         mozc:keyHorizontalLayoutWeight="0" mozc:keyEdgeFlags="right" mozc:isRepeatable="true">
      <KeyState mozc:contentDescription="@string/cd_key_right">
        <Flick>
          <KeyEntity mozc:sourceId="104"
                     mozc:keyCode="@integer/key_right"
                     mozc:keyIcon="@raw/twelvekeys__function__right_arrow__icon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height" />
        </Flick>
      </KeyState>
    </Key>
  </Row>
  <Row>
    <Key mozc:keyBackground="twelvekeysFunction"
         mozc:keyHorizontalLayoutWeight="0" mozc:keyEdgeFlags="left">
      <KeyState mozc:contentDescription="@string/cd_key_symbol">
        <Flick>
          <KeyEntity mozc:sourceId="105"
                     mozc:keyCode="@integer/key_symbol"
                     mozc:keyIcon="@raw/twelvekeys__function__symbol__icon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height" />
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_symbol" mozc:metaState="handling_touch_event">
        <Flick>
          <KeyEntity mozc:sourceId="118"
                     mozc:keyIcon="@raw/twelvekeys__function__symbol__icon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height" />
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorCenter"/>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_u">
        <Flick>
          <KeyEntity mozc:sourceId="31"
                     mozc:keyCode="@integer/uchar_latin_small_letter_u"
                     mozc:keyIcon="@raw/godan__kana__support__07_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__07"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="32"
                     mozc:keyCode="@integer/uchar_ampersand"
                     mozc:keyIcon="@raw/godan__kana__support__07_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__uxtu"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="33"
                     mozc:keyCode="@integer/uchar_left_curly_bracket"
                     mozc:keyIcon="@raw/godan__kana__support__07_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__un"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="34"
                     mozc:keyCode="@integer/uchar_circumflex_accent"
                     mozc:keyIcon="@raw/godan__kana__support__07_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__xyu"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="35"
                     mozc:keyCode="@integer/uchar_digit_seven"
                     mozc:keyIcon="@raw/godan__kana__support__07_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__seven"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_t">
        <Flick>
          <KeyEntity mozc:sourceId="36"
                     mozc:keyCode="@integer/uchar_latin_small_letter_t"
                     mozc:keyIcon="@raw/godan__kana__support__08_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__08"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="38"
                     mozc:keyCode="@integer/uchar_latin_small_letter_c"
                     mozc:keyIcon="@raw/godan__kana__support__08_up"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_c"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="39"
                     mozc:keyCode="@integer/uchar_latin_small_letter_d"
                     mozc:keyIcon="@raw/godan__kana__support__08_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_d"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="40"
                     mozc:keyCode="@integer/uchar_digit_eight"
                     mozc:keyIcon="@raw/godan__kana__support__08_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__eight"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key mozc:keyEdgeFlags="right">
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_y">
        <Flick>
          <KeyEntity mozc:sourceId="41"
                     mozc:keyCode="@integer/uchar_latin_small_letter_y"
                     mozc:keyIcon="@raw/godan__kana__support__09_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__09"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="42"
                     mozc:keyCode="@integer/uchar_left_parenthesis"
                     mozc:keyIcon="@raw/godan__kana__support__09_left"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__left_parenthesis"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="43"
                     mozc:keyCode="@integer/uchar_latin_small_letter_x"
                     mozc:keyIcon="@raw/godan__kana__support__09_up"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_x"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="44"
                     mozc:keyCode="@integer/uchar_right_parenthesis"
                     mozc:keyIcon="@raw/godan__kana__support__09_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__right_parenthesis"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="45"
                     mozc:keyCode="@integer/uchar_digit_nine"
                     mozc:keyIcon="@raw/godan__kana__support__09_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__nine"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorCenter"/>
    <Key mozc:keyBackground="twelvekeysFunctionWithThreeDots"
         mozc:keyHorizontalLayoutWeight="0" mozc:keyEdgeFlags="right">
      <KeyState mozc:contentDescription="@string/cd_key_uchar_space">
        <Flick>
          <KeyEntity mozc:sourceId="106"
                     mozc:keyCode="@integer/uchar_space"
                     mozc:longPressKeyCode="@integer/key_ime_picker_dialog"
                     mozc:keyIcon="@raw/twelvekeys__function__space__icon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height" />
        </Flick>
      </KeyState>
    </Key>
  </Row>
  <Row>
    <Key mozc:keyBackground="twelvekeysFunctionWithThreeDots"
         mozc:keyHorizontalLayoutWeight="0" mozc:keyHeight="40%p"
         mozc:keyEdgeFlags="left">
      <KeyState mozc:contentDescription="@string/cd_key_chartype_to_abc">
        <Flick>
          <KeyEntity mozc:sourceId="107"
                     mozc:keyCode="@integer/key_chartype_to_abc"
                     mozc:longPressKeyCode="@integer/key_menu_dialog"
                     mozc:keyIcon="@raw/twelvekeys__function__kana__icon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height" />
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorCenter"/>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_e">
        <Flick>
          <KeyEntity mozc:sourceId="46"
                     mozc:keyCode="@integer/uchar_latin_small_letter_e"
                     mozc:keyIcon="@raw/godan__kana__support__10_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__10"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="47"
                     mozc:keyCode="@integer/uchar_equals_sign"
                     mozc:keyIcon="@raw/godan__kana__support__10_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__extu"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="48"
                     mozc:keyCode="@integer/uchar_right_curly_bracket"
                     mozc:keyIcon="@raw/godan__kana__support__10_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__en"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="49"
                     mozc:keyCode="@integer/uchar_low_line"
                     mozc:keyIcon="@raw/godan__kana__support__10_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__xe"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_n">
        <Flick>
          <KeyEntity mozc:sourceId="51"
                     mozc:keyCode="@integer/uchar_latin_small_letter_n"
                     mozc:keyIcon="@raw/godan__kana__support__11_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__11"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="52"
                     mozc:keyCode="@integer/uchar_colon"
                     mozc:keyIcon="@raw/godan__kana__support__11_left"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__fullwidth_colon"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="53"
                     mozc:keyCode="@integer/uchar_reverse_solidus"
                     mozc:keyIcon="@raw/godan__kana__support__11_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__nn"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="54"
                     mozc:keyCode="@integer/uchar_semicolon"
                     mozc:keyIcon="@raw/godan__kana__support__11_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__katakana_middle_dot"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="55"
                     mozc:keyCode="@integer/uchar_digit_zero"
                     mozc:keyIcon="@raw/godan__kana__support__11_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__zero"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_r">
        <Flick>
          <KeyEntity mozc:sourceId="56"
                     mozc:keyCode="@integer/uchar_latin_small_letter_r"
                     mozc:keyIcon="@raw/godan__kana__support__12_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__12"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="57"
                     mozc:keyCode="@integer/uchar_full_stop"
                     mozc:keyIcon="@raw/godan__kana__support__12_left"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__ideographic_full_stop"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="58"
                     mozc:keyCode="@integer/uchar_question_mark"
                     mozc:keyIcon="@raw/godan__kana__support__12_up"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__question_mark"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="59"
                     mozc:keyCode="@integer/uchar_exclamation_mark"
                     mozc:keyIcon="@raw/godan__kana__support__12_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__exclamation_mark"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="down">
          <KeyEntity mozc:sourceId="60"
                     mozc:keyCode="@integer/uchar_comma"
                     mozc:keyIcon="@raw/godan__kana__support__12_down"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__ideographic_comma"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorCenter"/>
    <Key mozc:keyBackground="twelvekeysFunctionWithThreeDots"
         mozc:keyHorizontalLayoutWeight="0" mozc:keyHeight="40%p"
         mozc:keyEdgeFlags="right"
         mozc:defaultIconWidth="@dimen/keyboard_enter_width"
         mozc:defaultIconHeight="@dimen/unlimited">
      <KeyState mozc:contentDescription="@string/cd_key_uchar_linefeed">
        <Flick>
          <KeyEntity mozc:sourceId="108"
                     mozc:keyCode="@integer/uchar_linefeed"
                     mozc:longPressKeyCode="@integer/key_symbol_emoji"
                     mozc:longPressTimeoutTrigger="false"
                     mozc:keyIcon="@raw/function__enter__icon">
            <PopUp mozc:popUpLongPressIcon="@raw/function__symbol__popup"
                   mozc:popUpIconHeight="@dimen/key_preview_emoji_icon_height" />
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_composing_done"
                mozc:metaState="composing">
        <Flick>
          <KeyEntity mozc:sourceId="109"
                     mozc:keyCode="@integer/uchar_linefeed"
                     mozc:longPressKeyCode="@integer/key_symbol_emoji"
                     mozc:longPressTimeoutTrigger="false"
                     mozc:keyIcon="@raw/function__enter__icon">
            <PopUp mozc:popUpLongPressIcon="@raw/function__symbol__popup"
                   mozc:popUpIconHeight="@dimen/key_preview_emoji_icon_height" />
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_action_done"
                mozc:metaState="action_done">
        <Flick>
          <KeyEntity mozc:sourceId="110"
                     mozc:keyCode="@integer/uchar_linefeed"
                     mozc:longPressKeyCode="@integer/key_symbol_emoji"
                     mozc:longPressTimeoutTrigger="false"
                     mozc:keyIcon="@raw/function__action_done__icon">
            <PopUp mozc:popUpLongPressIcon="@raw/function__symbol__popup"
                   mozc:popUpIconHeight="@dimen/key_preview_emoji_icon_height" />
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_action_go"
                mozc:metaState="action_go">
        <Flick>
          <KeyEntity mozc:sourceId="111"
                     mozc:keyCode="@integer/uchar_linefeed"
                     mozc:longPressKeyCode="@integer/key_symbol_emoji"
                     mozc:longPressTimeoutTrigger="false"
                     mozc:keyIcon="@raw/function__action_go__icon">
            <PopUp mozc:popUpLongPressIcon="@raw/function__symbol__popup"
                   mozc:popUpIconHeight="@dimen/key_preview_emoji_icon_height" />
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_action_next"
                mozc:metaState="action_next">
        <Flick>
          <KeyEntity mozc:sourceId="112"
                     mozc:keyCode="@integer/uchar_linefeed"
                     mozc:longPressKeyCode="@integer/key_symbol_emoji"
                     mozc:longPressTimeoutTrigger="false"
                     mozc:keyIcon="@raw/function__action_next__icon">
            <PopUp mozc:popUpLongPressIcon="@raw/function__symbol__popup"
                   mozc:popUpIconHeight="@dimen/key_preview_emoji_icon_height" />
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_action_previous"
                mozc:metaState="action_previous">
        <Flick>
          <KeyEntity mozc:sourceId="113"
                     mozc:keyCode="@integer/uchar_linefeed"
                     mozc:longPressKeyCode="@integer/key_symbol_emoji"
                     mozc:longPressTimeoutTrigger="false"
                     mozc:keyIcon="@raw/function__action_previous__icon">
            <PopUp mozc:popUpLongPressIcon="@raw/function__symbol__popup"
                   mozc:popUpIconHeight="@dimen/key_preview_emoji_icon_height" />
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_action_search"
                mozc:metaState="action_search">
        <Flick>
          <KeyEntity mozc:sourceId="114"
                     mozc:keyCode="@integer/uchar_linefeed"
                     mozc:longPressKeyCode="@integer/key_symbol_emoji"
                     mozc:longPressTimeoutTrigger="false"
                     mozc:keyIcon="@raw/function__action_search__icon">
            <PopUp mozc:popUpLongPressIcon="@raw/function__symbol__popup"
                   mozc:popUpIconHeight="@dimen/key_preview_emoji_icon_height" />
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_action_send"
                mozc:metaState="action_send">
        <Flick>
          <KeyEntity mozc:sourceId="115"
                     mozc:keyCode="@integer/uchar_linefeed"
                     mozc:longPressKeyCode="@integer/key_symbol_emoji"
                     mozc:longPressTimeoutTrigger="false"
                     mozc:keyIcon="@raw/function__action_send__icon">
            <PopUp mozc:popUpLongPressIcon="@raw/function__symbol__popup"
                   mozc:popUpIconHeight="@dimen/key_preview_emoji_icon_height" />
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
  </Row>
  <Row>
    <Spacer mozc:keyHorizontalLayoutWeight="0" mozc:keyBackground="transparent"/>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorBottom"/>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_o">
        <Flick>
          <KeyEntity mozc:sourceId="61"
                     mozc:keyCode="@integer/uchar_latin_small_letter_o"
                     mozc:keyIcon="@raw/godan__kana__support__13_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__13"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="62"
                     mozc:keyCode="@integer/uchar_commercial_at"
                     mozc:keyIcon="@raw/godan__kana__support__13_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__oxtu"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="63"
                     mozc:keyCode="@integer/uchar_tilde"
                     mozc:keyIcon="@raw/godan__kana__support__13_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__on"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="64"
                     mozc:keyCode="@integer/uchar_vertical_line"
                     mozc:keyIcon="@raw/godan__kana__support__13_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__keyicon__xyo"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_kana_modifier" mozc:metaState="fallback|composing|no_globe">
        <Flick>
          <KeyEntity mozc:sourceId="66"
                     mozc:keyCode="@integer/uchar_asterisk"
                     mozc:keyIcon="@raw/godan__kana__14">
            <PopUp mozc:popUpIcon="@raw/godan__kana__14"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="67"
                     mozc:keyCode="@integer/uchar_apostrophe"
                     mozc:keyIcon="@raw/godan__kana__14"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__popup__semi_voiced_mark"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="68"
                     mozc:keyCode="@integer/uchar_grave_accent"
                     mozc:keyIcon="@raw/godan__kana__14"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__popup__small"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="69"
                     mozc:keyCode="@integer/uchar_quotation_mark"
                     mozc:keyIcon="@raw/godan__kana__14"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__kana__popup__voiced_mark"/>
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_kana_modifier" mozc:metaState="handling_touch_event" >
        <Flick>
          <KeyEntity mozc:sourceId="117"
                     mozc:keyCode="@integer/uchar_asterisk"
                     mozc:keyIcon="@raw/globe_keyicon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height">
            <PopUp mozc:popUpIcon="@raw/godan__kana__14"/>
          </KeyEntity>
        </Flick>
      </KeyState>
      <KeyState mozc:contentDescription="@string/cd_key_globe" mozc:metaState="globe" >
        <Flick>
          <KeyEntity mozc:sourceId="116"
                     mozc:keyCode="@integer/key_globe"
                     mozc:keyIcon="@raw/globe_keyicon"
                     mozc:iconWidth="@dimen/unlimited"
                     mozc:iconHeight="@dimen/default_function_icon_height"
                     mozc:longPressKeyCode="@integer/key_ime_picker_dialog" />
        </Flick>
      </KeyState>
    </Key>
    <Key>
      <KeyState mozc:contentDescription="@string/cd_key_uchar_latin_small_letter_w">
        <Flick>
          <KeyEntity mozc:sourceId="71"
                     mozc:keyCode="@integer/uchar_latin_small_letter_w"
                     mozc:keyIcon="@raw/godan__kana__support__15_center"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/godan__kana__support__popup__15"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="left">
          <KeyEntity mozc:sourceId="72"
                     mozc:keyCode="@integer/uchar_left_square_bracket"
                     mozc:keyIcon="@raw/godan__kana__support__15_left"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__left_corner_bracket"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="up">
          <KeyEntity mozc:sourceId="73"
                     mozc:keyCode="@integer/uchar_latin_small_letter_v"
                     mozc:keyIcon="@raw/godan__kana__support__15_up"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__latin_v"/>
          </KeyEntity>
        </Flick>
        <Flick mozc:direction="right">
          <KeyEntity mozc:sourceId="74"
                     mozc:keyCode="@integer/uchar_right_square_bracket"
                     mozc:keyIcon="@raw/godan__kana__support__15_right"
                     mozc:flickHighlight="true">
            <PopUp mozc:popUpIcon="@raw/twelvekeys__popup__right_corner_bracket"/>
          </KeyEntity>
        </Flick>
      </KeyState>
    </Key>
    <Spacer mozc:keyWidth="@dimen/keyboard_separator_width" mozc:keyHorizontalLayoutWeight="0"
            mozc:keyBackground="keyboardSeparatorBottom"/>
    <Spacer mozc:keyHorizontalLayoutWeight="0" mozc:keyBackground="transparent"/>
  </Row>
  <!-- Next sourceId: 119 -->
</Keyboard>


text:
var gulp = require('gulp');
var compileCSS = require('./gulp.compileCSS.js');

gulp.task('default', [compileCSS('demo.less', 'demo.css')])


text:
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping     https://github.com/doctrine/phpcr-odm/raw/master/doctrine-phpcr-odm-mapping.xsd">
    <mapped-superclass name="Sonata\MediaBundle\PHPCR\BaseGallery" referenceable="true">
        <uuid name="uuid"/>
        <children name="galleryHasMedias"/>
        <field name="name" type="string"/>
        <field name="context" type="string"/>
        <field name="defaultFormat" type="string"/>
        <field name="enabled" type="boolean"/>
        <field name="updatedAt" type="date"/>
        <field name="createdAt" type="date"/>
        <lifecycle-callbacks>
            <lifecycle-callback type="prePersist" method="prePersist"/>
            <lifecycle-callback type="preUpdate" method="preUpdate"/>
        </lifecycle-callbacks>
    </mapped-superclass>
</doctrine-mapping>


text:
use warnings;
use FindBin;
use lib "$FindBin::Bin";
use centreon::script::centreon_vmware;

centreon::script::centreon_vmware->new()->run();

__END__

=head1 NAME

centreon_vmware.pl - a daemon to handle VMWare checks.

=head1 SYNOPSIS

centreon_vmware.pl [options]

=head1 OPTIONS

=over 8

=item B<--config-extra>

Specify the path to the centreon_vmware configuration file (default: /etc/centreon/centreon_vmware.pm).

=item B<--help>

Print a brief help message and exits.

=back

=head1 DESCRIPTION

B<centreon_vmware.pl> will connect to ESX and/or VirtualCenter.
Use the plugin 'apps::vmware::connector::plugin' from: https://github.com/centreon/centreon-plugins

=cut


text:
listen '/tmp/.lokka.sock'
worker_processes 1 # this should be >= nr_cpus
LOKKA_ROOT = File.expand_path('../../../../', __FILE__)
pid "#{LOKKA_ROOT}/tmp/pids/unicorn.pid"

stderr_path "#{LOKKA_ROOT}/log/unicorn.stderr.log"
stdout_path "#{LOKKA_ROOT}/log/unicorn.stdout.log"

timeout 200

preload_app true

before_fork do |server, worker|
  old_pid = "#{server.config[:pid]}.oldbin"
  if File.exists?(old_pid) && server.pid != old_pid
    begin
      Process.kill("QUIT", File.read(old_pid).to_i)
    rescue Errno::ENOENT, Errno::ESRCH
    end
  end
  # if defined?(ActiveRecord::Base)
  #   ActiveRecord::Base.connection.disconnect!
  # end
end

# datamapperだからいらない
# after_fork do |server, worker|
#   defined?(ActiveRecord::Base) and
#     ActiveRecord::Base.establish_connection
# end


text:
package semaphore

import (
	"context"
	"time"

	"github.com/go-kit/kit/metrics/discard"
	"github.com/xmidt-org/webpa-common/xmetrics"
)

const (
	MetricOpen   float64 = 1.0
	MetricClosed float64 = 0.0
)

type instrumentOptions struct {
	failures  xmetrics.Adder
	resources xmetrics.Adder
	closed    xmetrics.Setter
}

var defaultOptions = instrumentOptions{
	failures:  discard.NewCounter(),
	resources: discard.NewCounter(),
	closed:    discard.NewGauge(),
}

// InstrumentOption represents a configurable option for instrumenting a semaphore
type InstrumentOption func(*instrumentOptions)

// WithResources establishes a metric that tracks the resource count of the semaphore.
// If a nil counter is supplied, resource counts are discarded.
func WithResources(a xmetrics.Adder) InstrumentOption {
	return func(io *instrumentOptions) {
		if a != nil {
			io.resources = a
		} else {
			io.resources = discard.NewCounter()
		}
	}
}

// WithFailures establishes a metric that tracks how many times a resource was unable to
// be acquired, due to timeouts, context cancellations, etc.
func WithFailures(a xmetrics.Adder) InstrumentOption {
	return func(io *instrumentOptions) {
		if a != nil {
			io.failures = a
		} else {
			io.failures = discard.NewCounter()
		}
	}
}

// WithClosed sets a gauge that records the state of a Closeable semaphore, 1.0 for open and 0.0 for closed.
// This option is ignored for regular semaphores.
func WithClosed(s xmetrics.Setter) InstrumentOption {
	return func(io *instrumentOptions) {
		if s != nil {
			io.closed = s
		} else {
			io.closed = discard.NewGauge()
		}
	}
}

// Instrument decorates an existing semaphore with instrumentation.  The available options
// allow tracking the number of resources currently acquired and the total count of failures over time.
// The returned Interface object will not implement Closeable, even if the decorated semaphore does.
func Instrument(s Interface, o ...InstrumentOption) Interface {
	if s == nil {
		panic("A delegate semaphore is required")
	}

	io := defaultOptions

	for _, f := range o {
		f(&io)
	}

	return &instrumentedSemaphore{
		delegate:  s,
		failures:  io.failures,
		resources: io.resources,
	}
}

// InstrumentCloseable is similar to Instrument, but works with Closeable semaphores.  The WithClosed
// option is honored by this factory function.
func InstrumentCloseable(c Closeable, o ...InstrumentOption) Closeable {
	if c == nil {
		panic("A delegate semaphore is required")
	}

	io := defaultOptions

	for _, f := range o {
		f(&io)
	}

	ic := &instrumentedCloseable{
		instrumentedSemaphore: instrumentedSemaphore{
			delegate:  c,
			failures:  io.failures,
			resources: io.resources,
		},
		closed: io.closed,
	}

	ic.closed.Set(MetricOpen)
	return ic
}

// instrumentedSemaphore is the internal decorator around Interface that applies appropriate metrics.
type instrumentedSemaphore struct {
	delegate  Interface
	resources xmetrics.Adder
	failures  xmetrics.Adder
}

func (is *instrumentedSemaphore) Acquire() (err error) {
	err = is.delegate.Acquire()
	if err != nil {
		is.failures.Add(1.0)
	} else {
		is.resources.Add(1.0)
	}

	return
}

func (is *instrumentedSemaphore) AcquireWait(t <-chan time.Time) (err error) {
	err = is.delegate.AcquireWait(t)
	if err != nil {
		is.failures.Add(1.0)
	} else {
		is.resources.Add(1.0)
	}

	return
}

func (is *instrumentedSemaphore) AcquireCtx(ctx context.Context) (err error) {
	err = is.delegate.AcquireCtx(ctx)
	if err != nil {
		is.failures.Add(1.0)
	} else {
		is.resources.Add(1.0)
	}

	return
}

func (is *instrumentedSemaphore) TryAcquire() (acquired bool) {
	acquired = is.delegate.TryAcquire()
	if acquired {
		is.resources.Add(1.0)
	} else {
		is.failures.Add(1.0)
	}

	return
}

func (is *instrumentedSemaphore) Release() (err error) {
	err = is.delegate.Release()
	if err == nil {
		is.resources.Add(-1.0)
	}

	return
}

type instrumentedCloseable struct {
	instrumentedSemaphore
	closed xmetrics.Setter
}

func (ic *instrumentedCloseable) Close() (err error) {
	err = (ic.instrumentedSemaphore.delegate).(Closeable).Close()
	ic.closed.Set(MetricClosed)

	// NOTE: we don't set the resources metric to 0 as a way of preserving the state
	// for debugging.  Can change this if desired.

	return
}

func (ic *instrumentedCloseable) Closed() <-chan struct{} {
	return (ic.instrumentedSemaphore.delegate).(Closeable).Closed()
}


text:
namespace YAF.Types.Objects;

/// <summary>
/// Class for the Help Pages inside a Category
/// </summary>
public class HelpNavigationPage
{
    /// <summary>
    ///   Gets or sets The Help page Name
    /// </summary>
    public string HelpPage { get; set; }
}


text:
<!DOCTYPE html>
<title>doctools::changelog - Documentation tools</title>

 [
   Tcllib Home
| Main Table Of Contents
| Table Of Contents
| Keyword Index
| Categories
| Modules
| Applications
 ]

doctools::changelog(n) 1.1 tcllib "Documentation tools"

Name

doctools::changelog - Processing text in Emacs ChangeLog format

Table Of Contents

Table Of Contents

Synopsis

Description

API

Bugs, Ideas, Feedback

Keywords

Category

Copyright

Synopsis

package require Tcl 8.2

package require textutil

package require doctools::changelog ?1.1?

::doctools::changelog::scan text

::doctools::changelog::flatten entries

::doctools::changelog::toDoctools title module version entries

::doctools::changelog::merge entries...

Description

This package provides Tcl commands for the processing and reformatting
of text in the "ChangeLog" format generated by emacs.

API

::doctools::changelog::scan text

The command takes the text and parses it under the assumption
that it contains a ChangeLog as generated by emacs. It
returns a data structure describing the contents of this ChangeLog.

This data structure is a list where each element describes one entry
in the ChangeLog. Each element/entry is then a list of three elements
describing the date of the entry, its author, and the comments made,
in this order. The last item in each element/entry, the comments, is a
list of sections. Each section is described by a list containing two
elements, a list of file names, and a string containing the true
comment associated with the files of the section.

    {
	{
	    date
	    author
	    {
		{
		    {file ...}
		    commenttext
		}
		...
	    }
	}
	{...}
    }

::doctools::changelog::flatten entries

This command converts a list of entries as generated by
change::scan above into a simpler list of plain
text blocks each containing all the information of a
single entry.

::doctools::changelog::toDoctools title module version entries

This command converts the pre-parsed ChangeLog entries as
generated by the command ::doctools::changelog::scan into a
document in doctools format and returns it as the result of the
command.

The other three arguments supply the information for the header of
that document which is not available from the changelog itself.

::doctools::changelog::merge entries...

Each argument of the command is assumed to be a pre-parsed Changelog
as generated by the command ::doctools::changelog::scan. This
command merges all of them into a single structure, and collapses
multiple entries for the same date and author into a single entry. The
new structure is returned as the result of the command.

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category doctools of the
Tcllib Trackers.
Please also report any ideas for enhancements you may have for either
package and/or documentation.

When proposing code changes, please provide unified diffs,
i.e the output of diff -u.

Note further that attachments are strongly preferred over
inlined patches. Attachments can be made by going to the Edit
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.

Keywords

changelog, doctools, emacs

Category

Documentation tools

Copyright

Copyright © 2003-2013 Andreas Kupries <andreas_kupries@users.sourceforge.net>


text:
import unittest

from paddle.distributed.auto_parallel.tuner import tunable_space as ts

class TestTunableSpace(unittest.TestCase):
    def test_fixed(self):
        space = ts.TunableSpace()
        fixed = space.fixed("fixed", default=4)
        self.assertEqual(space.values["fixed"], 4)
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["fixed"].name, "fixed")

        space.values["fixed"] = 2
        self.assertEqual(space.get_value("fixed"), 2)
        self.assertEqual(space.values, {"fixed": 2})
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["fixed"].name, "fixed")

    def test_boolean(self):
        space = ts.TunableSpace()
        boolean = space.boolean("boolean")
        self.assertEqual(space.values["boolean"], False)
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["boolean"].name, "boolean")

        space.values["boolean"] = True
        self.assertEqual(space.get_value("boolean"), True)
        self.assertEqual(space.values, {"boolean": True})
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["boolean"].name, "boolean")

    def test_choice(self):
        space = ts.TunableSpace()
        choice = space.choice("choice", [1, 2, 3, 4], default=4)
        self.assertEqual(space.values["choice"], 4)
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["choice"].name, "choice")

        space.values["choice"] = 2
        self.assertEqual(space.get_value("choice"), 2)
        self.assertEqual(space.values, {"choice": 2})
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["choice"].name, "choice")

    def test_int_range(self):
        space = ts.TunableSpace()
        int_range = space.int_range("int_range", start=1, stop=4, default=2)
        self.assertEqual(space.values["int_range"], 2)
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["int_range"].name, "int_range")

        space.values["int_range"] = 3
        self.assertEqual(space.get_value("int_range"), 3)
        self.assertEqual(space.values, {"int_range": 3})
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["int_range"].name, "int_range")

    def test_float_range(self):
        space = ts.TunableSpace()
        float_range = space.float_range(
            "float_range", start=0.4, stop=4.4, default=2.0
        )
        self.assertEqual(space.values["float_range"], 2.0)
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["float_range"].name, "float_range")

        space.values["float_range"] = 3.0
        self.assertEqual(space.get_value("float_range"), 3.0)
        self.assertEqual(space.values, {"float_range": 3.0})
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["float_range"].name, "float_range")

    def test_varibles(self):
        space = ts.TunableSpace()
        choice = space.choice("choice", [1, 2, 3, 4], default=4)
        self.assertEqual(space.values["choice"], 4)
        self.assertEqual(len(space.variables), 1)
        self.assertEqual(space.variables["choice"].name, "choice")

        int_range = space.int_range("int_range", start=1, stop=4, default=2)
        self.assertEqual(space.values["int_range"], 2)
        self.assertEqual(len(space.variables), 2)
        self.assertEqual(space.variables["int_range"].name, "int_range")

    def test_not_populated_variable(self):
        space = ts.TunableSpace()
        choice = space.choice("choice", [1, 2, 3, 4], default=2)
        self.assertEqual(choice, 2)

    def test_populated_variable(self):
        space = ts.TunableSpace()
        space.values["choice"] = 2
        choice = space.choice("choice", [1, 2, 3, 4], default=4)
        self.assertEqual(choice, 2)

        space["choice"] = 3
        self.assertNotEqual(space.values["choice"], 2)
        self.assertEqual(space.values["choice"], 3)

    def test_state(self):
        space = ts.TunableSpace()
        choice = space.choice("choice", [1, 2, 3, 4], default=4)
        int_range = space.int_range("int_range", start=1, stop=4, default=2)

        new_space = space.from_state(space.get_state())
        self.assertEqual(new_space.get_value("choice"), 4)
        self.assertEqual(new_space.get_value("int_range"), 2)
        self.assertEqual(len(new_space.variables), 2)
        self.assertEqual(len(new_space.values), 2)

        self.assertEqual(new_space.variables["choice"].name, "choice")
        self.assertEqual(new_space.variables["choice"].default, 4)
        self.assertEqual(new_space.variables["choice"].values, [1, 2, 3, 4])

        self.assertEqual(new_space.variables["int_range"].name, "int_range")
        self.assertEqual(new_space.variables["int_range"].default, 2)
        self.assertEqual(new_space.variables["int_range"].start, 1)
        self.assertEqual(new_space.variables["int_range"].stop, 4)
        self.assertEqual(new_space.variables["int_range"].step, 1)
        self.assertEqual(new_space.variables["int_range"].endpoint, False)

    def test_expection(self):
        space = ts.TunableSpace()
        flag = True
        try:
            val = space.get_value("test")
            flag = False
        except:
            pass
        self.assertTrue(flag)

if __name__ == "__main__":
    unittest.main()


text:
namespace gameboy {
namespace mbc {
class MBC3 : public MemoryBankController {
 public:
    MBC3(uint8_t **romBanks, uint8_t numBanks);
    virtual uint8_t* getCurrentROMBank();
    virtual void write(uint16_t address, uint8_t value);

 private:
    uint16_t currentROMBank;
};
}
}

#endif


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

<TITLE>
Uses of Package org.springframework.transaction.support (Spring Framework)
</TITLE>

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

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Package
org.springframework.transaction.support

Packages that use org.springframework.transaction.support

org.springframework.jdbc.datasource
Provides a utility class for easy DataSource access,
a PlatformTransactionManager for a single DataSource,
and various simple DataSource implementations.

org.springframework.jms.connection
Provides a PlatformTransactionManager implementation for a single
JMS ConnectionFactory, and a SingleConnectionFactory adapter.

org.springframework.orm.hibernate
Package providing integration of
Hibernate
with Spring concepts.

org.springframework.orm.jdo
Package providing integration of JDO with Spring concepts.

org.springframework.orm.ojb
Package providing integration of
Apache OJB
with Spring concepts.

org.springframework.transaction.interceptor
AOP-based solution for declarative transaction demarcation.

org.springframework.transaction.jta
Transaction SPI implementation for JTA.

org.springframework.transaction.support
Support classes for the org.springframework.transaction package.

Classes in org.springframework.transaction.support used by org.springframework.jdbc.datasource

AbstractPlatformTransactionManager

          Abstract base class that allows for easy implementation of concrete
 platform transaction managers like JtaTransactionManager and
 HibernateTransactionManager.

DefaultTransactionStatus

          Default implementation of the TransactionStatus interface,
 used by AbstractPlatformTransactionManager.

ResourceHolderSupport

          Convenient base class for resource holders.

SmartTransactionObject

          Interface to be implemented by transaction objects that are able to
 return an internal rollback-only marker, typically from a another
 transaction that has participated and marked it as rollback-only.

Classes in org.springframework.transaction.support used by org.springframework.jms.connection

AbstractPlatformTransactionManager

          Abstract base class that allows for easy implementation of concrete
 platform transaction managers like JtaTransactionManager and
 HibernateTransactionManager.

DefaultTransactionStatus

          Default implementation of the TransactionStatus interface,
 used by AbstractPlatformTransactionManager.

SmartTransactionObject

          Interface to be implemented by transaction objects that are able to
 return an internal rollback-only marker, typically from a another
 transaction that has participated and marked it as rollback-only.

Classes in org.springframework.transaction.support used by org.springframework.orm.hibernate

AbstractPlatformTransactionManager

          Abstract base class that allows for easy implementation of concrete
 platform transaction managers like JtaTransactionManager and
 HibernateTransactionManager.

DefaultTransactionStatus

          Default implementation of the TransactionStatus interface,
 used by AbstractPlatformTransactionManager.

ResourceHolderSupport

          Convenient base class for resource holders.

SmartTransactionObject

          Interface to be implemented by transaction objects that are able to
 return an internal rollback-only marker, typically from a another
 transaction that has participated and marked it as rollback-only.

Classes in org.springframework.transaction.support used by org.springframework.orm.jdo

AbstractPlatformTransactionManager

          Abstract base class that allows for easy implementation of concrete
 platform transaction managers like JtaTransactionManager and
 HibernateTransactionManager.

DefaultTransactionStatus

          Default implementation of the TransactionStatus interface,
 used by AbstractPlatformTransactionManager.

ResourceHolderSupport

          Convenient base class for resource holders.

SmartTransactionObject

          Interface to be implemented by transaction objects that are able to
 return an internal rollback-only marker, typically from a another
 transaction that has participated and marked it as rollback-only.

Classes in org.springframework.transaction.support used by org.springframework.orm.ojb

AbstractPlatformTransactionManager

          Abstract base class that allows for easy implementation of concrete
 platform transaction managers like JtaTransactionManager and
 HibernateTransactionManager.

DefaultTransactionStatus

          Default implementation of the TransactionStatus interface,
 used by AbstractPlatformTransactionManager.

ResourceHolderSupport

          Convenient base class for resource holders.

SmartTransactionObject

          Interface to be implemented by transaction objects that are able to
 return an internal rollback-only marker, typically from a another
 transaction that has participated and marked it as rollback-only.

Classes in org.springframework.transaction.support used by org.springframework.transaction.interceptor

DefaultTransactionDefinition

          Default implementation of the TransactionDefinition interface,
 offering bean-style configuration and sensible default values
 (PROPAGATION_REQUIRED, ISOLATION_DEFAULT, TIMEOUT_DEFAULT, readOnly=false).

Classes in org.springframework.transaction.support used by org.springframework.transaction.jta

AbstractPlatformTransactionManager

          Abstract base class that allows for easy implementation of concrete
 platform transaction managers like JtaTransactionManager and
 HibernateTransactionManager.

DefaultTransactionStatus

          Default implementation of the TransactionStatus interface,
 used by AbstractPlatformTransactionManager.

SmartTransactionObject

          Interface to be implemented by transaction objects that are able to
 return an internal rollback-only marker, typically from a another
 transaction that has participated and marked it as rollback-only.

Classes in org.springframework.transaction.support used by org.springframework.transaction.support

DefaultTransactionDefinition

          Default implementation of the TransactionDefinition interface,
 offering bean-style configuration and sensible default values
 (PROPAGATION_REQUIRED, ISOLATION_DEFAULT, TIMEOUT_DEFAULT, readOnly=false).

DefaultTransactionStatus

          Default implementation of the TransactionStatus interface,
 used by AbstractPlatformTransactionManager.

TransactionCallback

          Callback interface for transactional code.

TransactionSynchronization

          Interface for transaction synchronization callbacks.

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Copyright (C) 2003-2004 The Spring Framework Project.


text: require 'active_admin/umeditor'


text:
/* $Header: /cvsup/minix/src/lib/ack/fphook/FP_bias.h,v 1.1 2005/10/10 15:27:43 beng Exp $ */

/*
	include file for floating point package
*/

		/*	FLOAT FORMAT EXPONENT BIAS	*/

#define	SGL_BIAS	 127	/* excess  128 notation used	*/
#define	DBL_BIAS	1023	/* excess 1024 notation used	*/
#define	EXT_BIAS	   0	/* 2s-complement notation used	*/
				/* this is possible because the	*/
				/* sign is in a seperate word	*/

		/*	VARIOUS MAX AND MIN VALUES	*/
		/*	1) FOR THE DIFFERENT FORMATS	*/

#define	SGL_MAX		   254	/*	standard definition	*/
#define	SGL_MIN		     1	/*	standard definition	*/
#define	DBL_MAX		  2046	/*	standard definition	*/
#define	DBL_MIN		     1	/*	standard definition	*/
#define EXT_MAX		 16383	/*	standard minimum	*/
#define EXT_MIN		-16382	/*	standard minimum	*/