text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
  <link rel="stylesheet" type="text/css" href="default.css" media="screen"/>
  <title>enunciate</title>
  <meta name="author" content="Steven Cummings" />

enunciate

articulate your web api.

@TOPNAV@

Introduction, Motivation

With the existence of the JAXB architecture and API, Enunciate is able to automatically detect and document XML-based models in your API with little or no extra
      assistance. Unfortunately, there is no such common architecture, model, nor declarative mechanisms (e.g. annotations) for JSON models in Java. There are various options,
      including Gson, json-lib, and jackson, but Enunciate could use a general way to know what your JSON model is. This is especially true when any of those options provide
      no declarative link between the model and serialization process. So, in the absence of serialization-specific Enunciate modules like gson, (which may appear in the
      future), the following annotations can be used to inform Enunciate of your JSON-serializable models.

All of these annotations are located in package org.codehaus.enunciate.json in artifact org.codehaus.enunciate:enunciate-core-annotations.

Enunciate JSON Annotations

@JsonRootType

This annotation causes Enunciate to add the type as a JSON root type. Root types are those that can be the primary type of a payload. If excludeUnreferencedClasses is
      true in the enunciate configuration, then the type must be used as a JAX-RS entity type to be added to the model. The default name of a root type is the simple name (i.e.
      unqualified class name) of the Java type. This can be overridden with @JsonName.

@JsonType

This annotation causes Enunciate to add the type as a JSON type. If excludeUnreferencedClasses is  true in the enunciate configuration, then the type must be
      referenced by a JAX-RS entity type to be added to the model. The default name of a type is the simple name (i.e. unqualified class name) of the Java type. This can be
      overridden with @JsonName.

@JsonProperty

Used to indicate a property on a JSON type. Currently this isn't required as properties are automatically detected on types (TODO add opt-in mode on per-type basis).
      The default name of a property is the JavaBean property name.

@JsonName

Used to override the default JSON type-name of the annotated Java type or property.

@JsonIgnore

This annotation causes Enunciate to ignore a property on an otherwise documented JSON type.

@JsonSchema

Used on a Java package to give a specific schema ID to any JSON types detected within it. If a specific schema ID is used on multiple Java packages, then they are
      composed into a larger schema. The default ID of a schema is the Java package name.

@JsonTypeMappings, @JsonTypeMapping

Package-level annotations used to directly specify mappings from Java to JSON types. This is normally used for (but not limited to) the following purposes.

Java type is being handled in custom adapter code or whose JSON structure is otherwise not exposed in a project-specific declaration.

Java type comes from a 3rd-party library and so annotations can not be applied to it.

Type/Property-level mapping annotations

Coming soon!

Arrays and Collections

When an array or collection is encountered, Enunciate will determine the component type and document it as a JSON list.

Maps

Coming soon!

Enunciate Jackson-JAXB Detection

Coming soon!

@SIDENAV@

© 2006-2010 Web Cohesion. Valid CSS & XHTML. Template design by Arcsin

@DONATIONS@


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">

    <module name="TreeWalker">
        <module name="MethodLength">
            <property name="tokens" value="METHOD_DEF"/>
            <property name="max" value="15"/>
        </module>
        <module name="NestedIfDepth"/>
        <module name="NestedForDepth">
            <property name="max" value="0"/>
        </module>
        <module name="Indentation">
            <property name="tabWidth" value="4"/>
        </module>
        <module name="LeftCurly"/>
        <module name="CyclomaticComplexity">
            <property name="max" value="3"/>
        </module>
        <module name="MagicNumber"/>
    </module>

</module>

redpajama_set_name: RedPajamaGithub


text:
package org.pplm.jfp.c4.e12;

import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.pplm.jfp.base.Artist;

public class E4123 {
	static class Artists {

		private List<Artist> artists;

		public Artists(List<Artist> artists) {
			this.artists = artists;
		}

		/*
		 * public Artist getArtist(int index) { if (index < 0 || index >=
		 * artists.size()) { indexException(index); } return artists.get(index);
		 * }
		 */

		public Optional<Artist> getArtist(int index) {
			if (index < 0 || index >= artists.size()) {
				//indexException(index);
				return Optional.empty();
			}

			return Optional.ofNullable(artists.get(index));
		}

/*		private void indexException(int index) {
			throw new IllegalArgumentException(index + " doesn't correspond to an Artist");
		}*/

		/*
		 * public String getArtistName(int index) { try { Artist artist =
		 * getArtist(index); return artist.getName(); } catch
		 * (IllegalArgumentException e) { return "unknown"; } }
		 */

		public String getArtistName(int index) {
			try {
				Optional<Artist> artist = getArtist(index);
				return artist.orElseThrow(IllegalArgumentException::new).getName();
			} catch (IllegalArgumentException e) {
				return "unknown";
			}
		}
	}

	public static void main(String[] args) {
		Artists artists = new Artists(Stream.<Artist>builder().add(new Artist("许嵩","中国")).add(new Artist("Jackson", "USA")).build().collect(Collectors.toList()));
		System.out.println(artists.getArtistName(-1));
		System.out.println(artists.getArtistName(0));
		System.out.println(artists.getArtist(1));
		System.out.println(artists.getArtist(3));
	}
}


text:
package abi44_0_0.expo.modules.notifications.notifications.presentation.builders;

import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Build;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.core.app.NotificationCompat;
import abi44_0_0.host.exp.expoview.R;
import abi44_0_0.expo.modules.notifications.notifications.channels.managers.AndroidXNotificationsChannelGroupManager;
import abi44_0_0.expo.modules.notifications.notifications.channels.managers.AndroidXNotificationsChannelManager;
import abi44_0_0.expo.modules.notifications.notifications.channels.managers.NotificationsChannelManager;
import expo.modules.notifications.notifications.interfaces.NotificationTrigger;
import expo.modules.notifications.notifications.model.NotificationRequest;

/**
 * A notification builder foundation capable of fetching and/or creating
 * a notification channel to which the notification request should be posted.
 */
public abstract class ChannelAwareNotificationBuilder extends BaseNotificationBuilder {
  private final static String FALLBACK_CHANNEL_ID = "expo_notifications_fallback_notification_channel";

  // Behaviors we will want to impose on received notifications include
  // being displayed as a heads-up notification. For that we will need
  // a channel of high importance.
  @RequiresApi(api = Build.VERSION_CODES.N)
  private final static int FALLBACK_CHANNEL_IMPORTANCE = NotificationManager.IMPORTANCE_HIGH;

  public ChannelAwareNotificationBuilder(Context context) {
    super(context);
  }

  protected NotificationCompat.Builder createBuilder() {
    return new NotificationCompat.Builder(getContext(), getChannelId());
  }

  /**
   * @return A {@link NotificationChannel}'s identifier to use for the notification.
   */
  protected String getChannelId() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
      // Returning null on incompatible platforms won't be an error.
      return null;
    }

    NotificationTrigger trigger = getTrigger();
    if (trigger == null) {
      Log.e("notifications", String.format("Couldn't get channel for the notifications - trigger is 'null'. Fallback to '%s' channel", FALLBACK_CHANNEL_ID));
      return getFallbackNotificationChannel().getId();
    }

    String channelId = trigger.getNotificationChannel();
    if (channelId == null) {
      return getFallbackNotificationChannel().getId();
    }

    NotificationsChannelManager manager = getNotificationsChannelManager();
    NotificationChannel channel = manager.getNotificationChannel(channelId);
    if (channel == null) {
      Log.e("notifications", String.format("Channel '%s' doesn't exists. Fallback to '%s' channel", channelId, FALLBACK_CHANNEL_ID));
      return getFallbackNotificationChannel().getId();
    }

    return channel.getId();
  }

  @NonNull
  protected NotificationsChannelManager getNotificationsChannelManager() {
    return new AndroidXNotificationsChannelManager(getContext(), new AndroidXNotificationsChannelGroupManager(getContext()));
  }

  /**
   * Fetches the fallback notification channel, and if it doesn't exist yet - creates it.
   * <p>
   * Returns null on {@link NotificationChannel}-incompatible platforms.
   *
   * @return Fallback {@link NotificationChannel} or null.
   */
  public NotificationChannel getFallbackNotificationChannel() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
      return null;
    }

    NotificationChannel channel = getNotificationManager().getNotificationChannel(FALLBACK_CHANNEL_ID);
    if (channel != null) {
      return channel;
    }

    return createFallbackChannel();
  }

  /**
   * Creates a fallback channel of {@link #FALLBACK_CHANNEL_ID} ID, name fetched
   * from Android resources ({@link #getFallbackChannelName()}
   * and importance set by {@link #FALLBACK_CHANNEL_IMPORTANCE}.
   *
   * @return Newly created channel.
   */
  @RequiresApi(api = Build.VERSION_CODES.O)
  protected NotificationChannel createFallbackChannel() {
    NotificationChannel channel = new NotificationChannel(FALLBACK_CHANNEL_ID, getFallbackChannelName(), FALLBACK_CHANNEL_IMPORTANCE);
    channel.setShowBadge(true);
    channel.enableVibration(true);
    getNotificationManager().createNotificationChannel(channel);
    return channel;
  }

  /**
   * Fetches fallback channel name from Android resources. Overridable by Android resources system
   * or subclassing.
   *
   * @return Name of the fallback channel
   */
  protected String getFallbackChannelName() {
    return getContext().getString(R.string.expo_notifications_fallback_channel_name);
  }

  private NotificationManager getNotificationManager() {
    return (NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);
  }

  @Nullable
  private NotificationTrigger getTrigger() {
    NotificationRequest request = getNotification().getNotificationRequest();
    if (request == null) {
      return null;
    }

    return request.getTrigger();
  }
}


text:
// TypeScript Version: 2.0

/// <reference types="node"/>

import { Buffer } from 'buffer';

/**
* Interface defining function options.
*/
interface Options {
	/**
	* Flag (default: 'r').
	*/
	flag?: string;
}

/**
* Callback invoked upon reading a file.
*
* @param err - error object
* @param file - file contents
*/
type Callback = ( err: Error | null, file: Uint8Array ) => void;

/**
* Interface for reading a file as WebAssembly.
*/
interface ReadWASM {
	/**
	* Reads the entire contents of a WebAssembly file.
	*
	* @param file - file path or file descriptor
	* @param options - options
	* @param options.flag - file status flag
	* @param clbk - callback to invoke after reading a file
	*
	* @example
	* var join = require( `path` ).join;
	* var instanceOf = require( `@stdlib/assert/instance-of` );
	*
	* var fpath = join( __dirname, 'foo.wasm' );
	* readWASM( fpath, onRead );
	*
	* function onRead( error, buf ) {
	*     if ( error ) {
	*         throw error;
	*     }
	*     console.log( buf );
	* }
	*/
	( file: string | Buffer | number, options: Options, clbk: Callback ): void;

	/**
	* Reads the entire contents of a WebAssembly file.
	*
	* @param file - file path or file descriptor
	* @param clbk - callback to invoke after reading a file
	*
	* @example
	* var join = require( `path` ).join;
	* var instanceOf = require( `@stdlib/assert/instance-of` );
	*
	* var fpath = join( __dirname, 'foo.wasm' );
	* readWASM( fpath, onRead );
	*
	* function onRead( error, buf ) {
	*     if ( error ) {
	*         throw error;
	*     }
	*     console.log( buf );
	* }
	*/
	( file: string | Buffer | number, clbk: Callback ): void;

	/**
	* Synchronously reads the entire contents of a WebAssembly file.
	*
	* @param file - file path or file descriptor
	* @param options - options
	* @param options.flag - file status flag
	* @returns file contents or an error
	*
	* @example
	* var join = require( `path` ).join;
	* var instanceOf = require( `@stdlib/assert/instance-of` );
	*
	* var fpath = join( __dirname, 'foo.wasm' );
	* var out = readWASM.sync( fpath );
	* if ( instanceOf( out, Error ) ) {
	*     throw out;
	* }
	* console.log( out );
	*/
	sync( file: string | Buffer | number, options?: Options ): Uint8Array | Error; // tslint-disable-line max-line-length
}

/**
* Reads the entire contents of a WebAssembly file.
*
* @param file - file path or file descriptor
* @param options - options
* @param options.flag - file status flag
* @param clbk - callback to invoke after reading a file
*
* @example
* var join = require( `path` ).join;
* var instanceOf = require( `@stdlib/assert/instance-of` );
*
* var fpath = join( __dirname, 'foo.wasm' );
* readWASM( fpath, onRead );
*
* function onRead( error, buf ) {
*     if ( error ) {
*         throw error;
*     }
*     console.log( buf );
* }
*
* @example
* var join = require( `path` ).join;
* var instanceOf = require( `@stdlib/assert/instance-of` );
*
* var fpath = join( __dirname, 'foo.wasm' );
* var out = readWASM.sync( fpath );
* if ( instanceOf( out, Error ) ) {
*     throw out;
* }
* console.log( out );
*/
declare var readWASM: ReadWASM;

// EXPORTS //

export = readWASM;


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>colour.models.dataset.dci_p3 — Colour 0.3.5 documentation</title>

    <link rel="stylesheet" href="../../../../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../../../../_static/bootswatch-3.1.0/colour/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="../../../../_static/bootstrap-sphinx.css" type="text/css" />
    <link rel="stylesheet" href="../../../../_static/styles.css" type="text/css" />

    <link rel="top" title="Colour 0.3.5 documentation" href="../../../../index.html" />
    <link rel="up" title="colour.models.dataset" href="../dataset.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">

        </button>

          Colour 0.3

colour-science.org

                   Documentation

                           API Reference

                           IPython Notebooks

                           Features

                           Contributing

<form class="navbar-form navbar-right" action="../../../../search.html" method="get">

  <input type="text" name="q" class="form-control" placeholder="Search" />

  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>

Source code for colour.models.dataset.dci_p3

#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
DCI-P3 & DCI-P3+ Colourspaces
=============================

Defines the *DCI-P3* and *DCI-P3+* colourspaces:

-   :attr:`DCI_P3_COLOURSPACE`.
-   :attr:`DCI_P3_p_COLOURSPACE`.

See Also
--------
`RGB Colourspaces IPython Notebook
<http://nbviewer.ipython.org/github/colour-science/colour-ipython/blob/master/notebooks/models/rgb.ipynb>`_  # noqa

References
----------
.. [1]  Hewlett-Packard Development Company. (2009). Understanding the HP
        DreamColor LP2480zx DCI-P3 Emulation Color Space. Retrieved from
        http://www.hp.com/united-states/campaigns/workstations/pdfs/lp2480zx-dci--p3-emulation.pdf  # noqa
.. [2]  Digital Cinema Initiatives. (2007). Digital Cinema System
        Specification - Version 1.1. Retrieved from
        http://www.dcimovies.com/archives/spec_v1_1/DCI_DCinema_System_Spec_v1_1.pdf  # noqa
.. [3]  Canon. (2014). EOS C500 Firmware Update. Retrieved January 14, 2015,
        from http://www.usa.canon.com/cusa/professional/standard_display/cinema-firmware-c500  # noqa
"""

from __future__ import division, unicode_literals

import numpy as np

from colour.colorimetry import ILLUMINANTS
from colour.models import RGB_Colourspace, normalised_primary_matrix

__author__ = 'Colour Developers'
__copyright__ = 'Copyright (C) 2013 - 2015 - Colour Developers'
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause'
__maintainer__ = 'Colour Developers'
__email__ = 'colour-science@googlegroups.com'
__status__ = 'Production'

__all__ = ['DCI_P3_PRIMARIES',
           'DCI_P3_P_PRIMARIES',
           'DCI_P3_ILLUMINANT',
           'DCI_P3_WHITEPOINT',
           'DCI_P3_TO_XYZ_MATRIX',
           'XYZ_TO_DCI_P3_MATRIX',
           'DCI_P3_P_TO_XYZ_MATRIX',
           'XYZ_TO_DCI_P3_P_MATRIX',
           'DCI_P3_TRANSFER_FUNCTION',
           'DCI_P3_INVERSE_TRANSFER_FUNCTION',
           'DCI_P3_COLOURSPACE',
           'DCI_P3_P_COLOURSPACE']

DCI_P3_PRIMARIES = np.array(
    [[0.680, 0.320],
     [0.265, 0.690],
     [0.150, 0.060]])
"""
*DCI-P3* colourspace primaries.

DCI_P3_PRIMARIES : ndarray, (3, 2)
"""

DCI_P3_P_PRIMARIES = np.array(
    [[0.7400, 0.2700],
     [0.2200, 0.7800],
     [0.0900, -0.0900]])
"""
*DCI-P3+* colourspace primaries.

DCI_P3_P_PRIMARIES : ndarray, (3, 2)
"""

DCI_P3_ILLUMINANT = 'D63'
"""
*DCI-P3* colourspace whitepoint name as illuminant.

DCI_P3_ILLUMINANT : unicode

Notes
-----
*CIE Illuminant D Series* *D63* illuminant is used for *DCI-P3* whitepoint at
48 :math:`cd/m^2`.
"""

DCI_P3_WHITEPOINT = ILLUMINANTS.get(
    'CIE 1931 2 Degree Standard Observer').get(DCI_P3_ILLUMINANT)
"""
*DCI-P3* colourspace whitepoint.

DCI_P3_WHITEPOINT : tuple
"""

DCI_P3_TO_XYZ_MATRIX = normalised_primary_matrix(
    DCI_P3_PRIMARIES,
    DCI_P3_WHITEPOINT)
"""
*DCI-P3* colourspace to *CIE XYZ* tristimulus values matrix.

DCI_P3_TO_XYZ_MATRIX : array_like, (3, 3)
"""

XYZ_TO_DCI_P3_MATRIX = np.linalg.inv(DCI_P3_TO_XYZ_MATRIX)
"""
*CIE XYZ* tristimulus values to *DCI-P3* colourspace matrix.

XYZ_TO_DCI_P3_MATRIX : array_like, (3, 3)
"""

DCI_P3_P_TO_XYZ_MATRIX = normalised_primary_matrix(
    DCI_P3_P_PRIMARIES,
    DCI_P3_WHITEPOINT)
"""
*DCI-P3+* colourspace to *CIE XYZ* tristimulus values matrix.

DCI_P3_P_TO_XYZ_MATRIX : array_like, (3, 3)
"""

XYZ_TO_DCI_P3_P_MATRIX = np.linalg.inv(DCI_P3_P_TO_XYZ_MATRIX)
"""
*CIE XYZ* tristimulus values to *DCI-P3+* colourspace matrix.

XYZ_TO_DCI_P3_P_MATRIX : array_like, (3, 3)
"""

def _dci_p3_transfer_function(value):
    """
    Defines the *DCI-P3* colourspace transfer function.

    Parameters
    ----------
    value : numeric or array_like
        Value.

    Returns
    -------
    numeric or ndarray
        Companded value.
    """

    value = np.asarray(value)

    return 4095 * (value / 52.37) ** (1 / 2.6)

def _dci_p3_inverse_transfer_function(value):
    """
    Defines the *DCI-P3* colourspace inverse transfer function.

    Parameters
    ----------
    value : numeric or array_like
        Value.

    Returns
    -------
    numeric or ndarray
        Companded value.
    """

    value = np.asarray(value)

    return 52.37 * (value / 4095) ** 2.6

DCI_P3_TRANSFER_FUNCTION = _dci_p3_transfer_function
"""
Transfer function from linear to *DCI-P3* colourspace.

DCI_P3_TRANSFER_FUNCTION : object
"""

DCI_P3_INVERSE_TRANSFER_FUNCTION = _dci_p3_inverse_transfer_function
"""
Inverse transfer function from *DCI-P3* colourspace to linear.

DCI_P3_INVERSE_TRANSFER_FUNCTION : object
"""

DCI_P3_COLOURSPACE = RGB_Colourspace(
    'DCI-P3',
    DCI_P3_PRIMARIES,
    DCI_P3_WHITEPOINT,
    DCI_P3_ILLUMINANT,
    DCI_P3_TO_XYZ_MATRIX,
    XYZ_TO_DCI_P3_MATRIX,
    DCI_P3_TRANSFER_FUNCTION,
    DCI_P3_INVERSE_TRANSFER_FUNCTION)
"""
*DCI-P3* colourspace.

DCI_P3_COLOURSPACE : RGB_Colourspace
"""

DCI_P3_P_COLOURSPACE = RGB_Colourspace(
    'DCI-P3+',
    DCI_P3_P_PRIMARIES,
    DCI_P3_WHITEPOINT,
    DCI_P3_ILLUMINANT,
    DCI_P3_P_TO_XYZ_MATRIX,
    XYZ_TO_DCI_P3_P_MATRIX,
    DCI_P3_TRANSFER_FUNCTION,
    DCI_P3_INVERSE_TRANSFER_FUNCTION)
"""
*DCI-P3+* colourspace.

DCI_P3_P_COLOURSPACE : RGB_Colourspace
"""

      Back to top

        © Copyright 2013 - 2015, Colour Developers.

      Created using Sphinx 1.2.2.


text:
This table tracks migration of tests from [test_build_system_cmake.sh](../ci/test_build_system_cmake.sh) and [test_build_system_spaces.py](../ci/test_build_system_spaces.py) to pytest.

When all tests are migrated to pytest, remove the original tests, corresponding CI jobs, and this file.

Legacy test name | New test name | Comments
-----------------|---------------|---------
Initial clean build | test_rebuild::test_rebuild_no_changes |
Updating component source file rebuilds component | test_rebuild::test_rebuild_source_files |
Bootloader source file rebuilds bootloader | test_rebuild::test_rebuild_source_files |
Partition CSV file rebuilds partitions | test_rebuild::test_rebuild_source_files |
Partial build doesn't compile anything by default | test_rebuild::test_rebuild_no_changes |
Rebuild when app version was changed | |
Change app version | |
Re-building does not change app.bin | |
Get the version of app from git describe. Project is not inside IDF and do not have a tag only a hash commit. | |
Get the version of app from Kconfig option | |
Use IDF version variables in component CMakeLists.txt file | |
Project is in ESP-IDF which has a custom tag | |
Moving BUILD_DIR_BASE out of tree | |
BUILD_DIR_BASE inside default build directory | |
Can still clean build if all text files are CRLFs | |
Updating rom ld file should re-link app and bootloader | test_rebuild::test_rebuild_linker |
Updating app-only ld file should only re-link app | test_rebuild::test_rebuild_linker |
Updating ld file should only re-link app | test_rebuild::test_rebuild_linker |
Updating fragment file should only re-link app | test_rebuild::test_rebuild_linker |
sdkconfig update triggers full recompile | test_rebuild::test_rebuild_source_files |
Updating project CMakeLists.txt triggers full recompile | test_rebuild::test_rebuild_source_files |
Can build with Ninja (no idf.py) | |
Can build with GNU Make (no idf.py) | |
idf.py can build with Ninja | |
idf.py can build with Unix Makefiles | |
Can build with IDF_PATH set via cmake cache not environment | |
Can build with IDF_PATH unset and inferred by build system | |
Can build with IDF_PATH unset and inferred by cmake when Kconfig needs it to be set | |
can build with phy_init_data | |
can build with ethernet component disabled | |
Compiler flags on build command line are taken into account | |
Compiler flags cannot be overwritten | |
Can override IDF_TARGET from environment | |
Can set target using idf.py -D | |
Can set target using -D as subcommand parameter for idf.py | |
Can set target using idf.py set-target | |
idf.py understands alternative target names | |
Can guess target from sdkconfig, if CMakeCache does not exist | |
Can set the default target using sdkconfig.defaults | |
IDF_TARGET takes precedence over the value of CONFIG_IDF_TARGET in sdkconfig.defaults | |
idf.py fails if IDF_TARGET settings don't match in sdkconfig, CMakeCache.txt, and the environment | |
Setting EXTRA_COMPONENT_DIRS works | |
Non-existent paths in EXTRA_COMPONENT_DIRS are not allowed | |
Component names may contain spaces | |
sdkconfig should have contents of all files: sdkconfig, sdkconfig.defaults, sdkconfig.defaults.IDF_TARGET | |
Test if it can build the example to run on host | |
Test build ESP-IDF as a library to a custom CMake projects for all targets | |
Building a project with CMake library imported and PSRAM workaround, all files compile with workaround | |
Test for external libraries in custom CMake projects with ESP-IDF components linked | |
Test for external libraries in custom CMake projects with PSRAM strategy $strat | |
Cleaning Python bytecode | |
Displays partition table when executing target partition_table | |
Make sure a full build never runs '/usr/bin/env python' or similar | |
Handling deprecated Kconfig options | |
Handling deprecated Kconfig options in sdkconfig.defaults | |
Confserver can be invoked by idf.py | |
Check ccache is used to build | |
Custom bootloader overrides original | |
Empty directory not treated as a component | |
If a component directory is added to COMPONENT_DIRS, its subdirectories are not added | |
If a component directory is added to COMPONENT_DIRS, its sibling directories are not added | |
toolchain prefix is set in project description file | |
Can set options to subcommands: print_filter for monitor | |
Fail on build time works | |
Component properties are set | |
should be able to specify multiple sdkconfig default files | |
Supports git worktree | |
idf.py fallback to build system target | |
Build fails if partitions don't fit in flash | |
Warning is given if smallest partition is nearly full | |
Flash size is correctly set in the bootloader image header | |
DFU build works | |
UF2 build works | |
Loadable ELF build works | |
Defaults set properly for unspecified idf_build_process args | |
Getting component overriden dir | |
Overriding Kconfig | |
Project components prioritized over EXTRA_COMPONENT_DIRS | |
Components in EXCLUDE_COMPONENTS not passed to idf_component_manager | |
Create project using idf.py and build it | |
Create component using idf.py, create project using idf.py. | |
Add the component to the created project and build the project. | |
Check that command for creating new project will fail if the target folder is not empty. | |
Check that command for creating new project will fail if the target path is file. | |
Check docs command | |
Deprecation warning check | |
Save-defconfig checks | |
test_build | |
test_build_ulp_fsm | |
test_build_ulp_riscv | |
test_spiffsgen | |
test_flash_encryption | |
test_secure_boot_v1 | |
test_secure_boot_v2 | |
test_app_signing | |
test_secure_boot_release_mode | |
test_x509_cert_bundle | |
test_dfu | |
test_uf2 | |


text:
static const crypto_stream_chacha20_implementation *implementation =
    &crypto_stream_chacha20_ref_implementation;

size_t
crypto_stream_chacha20_keybytes(void) {
    return crypto_stream_chacha20_KEYBYTES;
}

size_t
crypto_stream_chacha20_noncebytes(void) {
    return crypto_stream_chacha20_NONCEBYTES;
}

size_t
crypto_stream_chacha20_ietf_noncebytes(void) {
    return crypto_stream_chacha20_IETF_NONCEBYTES;
}

int
crypto_stream_chacha20(unsigned char *c, unsigned long long clen,
                       const unsigned char *n, const unsigned char *k)
{
    return implementation->stream(c, clen, n, k);
}

int
crypto_stream_chacha20_ietf(unsigned char *c, unsigned long long clen,
                            const unsigned char *n, const unsigned char *k)
{
    return implementation->stream_ietf(c, clen, n, k);
}

int
crypto_stream_chacha20_xor_ic(unsigned char *c, const unsigned char *m,
                              unsigned long long mlen,
                              const unsigned char *n, uint64_t ic,
                              const unsigned char *k)
{
    return implementation->stream_xor_ic(c, m, mlen, n, ic, k);
}

int
crypto_stream_chacha20_ietf_xor_ic(unsigned char *c, const unsigned char *m,
                                   unsigned long long mlen,
                                   const unsigned char *n, uint32_t ic,
                                   const unsigned char *k)
{
    return implementation->stream_ietf_xor_ic(c, m, mlen, n, ic, k);
}

int
crypto_stream_chacha20_xor(unsigned char *c, const unsigned char *m,
                           unsigned long long mlen, const unsigned char *n,
                           const unsigned char *k)
{
    return implementation->stream_xor_ic(c, m, mlen, n, 0U, k);
}

int
crypto_stream_chacha20_ietf_xor(unsigned char *c, const unsigned char *m,
                                unsigned long long mlen, const unsigned char *n,
                                const unsigned char *k)
{
    return implementation->stream_ietf_xor_ic(c, m, mlen, n, 0U, k);
}

int
_crypto_stream_chacha20_pick_best_implementation(void)
{
    implementation = &crypto_stream_chacha20_ref_implementation;
#if (defined(HAVE_EMMINTRIN_H) && defined(HAVE_TMMINTRIN_H) && defined(__GNUC__))
    if (sodium_runtime_has_ssse3()) {
        implementation = &crypto_stream_chacha20_vec_implementation;
    }
#endif
    return 0;
}


text:
**Place:** Skype

**Contributors:**

* Jacob Tardieu
* Thomas Pocreau
* Nicolas Joseph

## Notes
### What have been done since last time
**Thomas:**

  * Went poney riding

**Nicolas**

  * Finished the missing DAOs
  * Added email and username fields to the github profile retrieval process.

**Jacob**
  * Mounted the MySQL database on the test server.

### Next steps

**Jacob**

* Check automatic deploy with Docker

**Thomas**

* Simplify the actor model for the scoring.
* Move data from MySQL to Neo4J

**Nicolas**

* Update the README with all the information on what we have done up to now.
* Add the method `getContributors` to the repository DAO
* Check the Webhook available for users on Github.


text:
[Deep Dream in Docker - a Docker container for google/deepdream](https://github.com/NyaRuRu/deepdream-ipython-notebook)
===================================

This is a sample Docker file to run [google/deepdream](https://github.com/google/deepdream) in a portable Docker container with no dependency on GPU.  This work is based on [VISIONAI/clouddream](https://github.com/VISIONAI/clouddream).

![This ipython notebook is running in a Docker container](deepdream-ipython-notebook.png)

How to Run
------------

### Download the container
```
docker pull nyaruru/deepdream-ipython-notebook
```

### Run the container
```
git clone https://github.com/NyaRuRu/deepdream-ipython-notebook.git
cd deepdream-ipython-notebook
./run_deepdream.sh
```


text:
package org.pantsbuild.example.useproto;

import org.junit.Assert;
import org.junit.Test;

import org.pantsbuild.example.distance.Distances;

public class UseProtoTest {
  @Test
  public void checkDistanceExistence() {
    String value = Distances.Distance.newBuilder().setNumber(12).setUnit("parsecs").build()
        .toString();
    Assert.assertTrue("Distances string value (" + value + ")", value.contains("12"));
  }
}


text:
.. _correcting_for_beam:

*****************************
Accounting for the beam shape
*****************************

.. warning:: The beam size of an observation introduces artificial correlations into the data
    on scales near to and below the beam size. This affects the shape of various turbulence statistics that
    measure spatial properties (Spatial Power-Spectrum, MVC, VCA, Delta-Variance, Wavelets, SCF).

The beam size is typically expressed as the full-width-half-max (FWHM). However, it is
important to note that the data will still be correlated beyond the FWHM. For example,
consider a randomly-drawn image with a specified power-law index:

    >>> import matplotlib.pyplot as plt
    >>> from turbustat.simulator import make_extended
    >>> from turbustat.io.sim_tools import create_fits_hdu
    >>> from astropy import units as u
    >>> # Image drawn from red-noise
    >>> rnoise_img = make_extended(256, powerlaw=3.)
    >>> # Define properties to generate WCS information
    >>> pixel_scale = 3 * u.arcsec
    >>> beamfwhm = 3 * u.arcsec
    >>> imshape = rnoise_img.shape
    >>> restfreq = 1.4 * u.GHz
    >>> bunit = u.K
    >>> # Create a FITS HDU
    >>> plaw_hdu = create_fits_hdu(rnoise_img, pixel_scale, beamfwhm, imshape, restfreq, bunit)
    >>> plt.imshow(plaw_hdu.data)  # doctest: +SKIP

.. image:: images/rednoise_slope3_img.png

The power-spectrum of the image should give a slope of 3:

    >>> from turbustat.statistics import PowerSpectrum
    >>> pspec = PowerSpectrum(plaw_hdu)
    >>> pspec.run(verbose=True, radial_pspec_kwargs={'binsize': 1.0},
    ...           fit_kwargs={'weighted_fit': True}, fit_2D=False,
    ...           low_cut=1. / (60 * u.pix))  # doctest: +SKIP
                                OLS Regression Results
    ==============================================================================
    Dep. Variable:                      y   R-squared:                       1.000
    Model:                            OLS   Adj. R-squared:                  1.000
    Method:                 Least Squares   F-statistic:                 8.070e+06
    Date:                Thu, 21 Jun 2018   Prob (F-statistic):               0.00
    Time:                        11:43:47   Log-Likelihood:                 701.40
    No. Observations:                 177   AIC:                            -1399.
    Df Residuals:                     175   BIC:                            -1392.
    Df Model:                           1
    Covariance Type:            nonrobust
    ==============================================================================
                     coef    std err          t      P>|t|      [0.025      0.975]
    ------------------------------------------------------------------------------
    const          0.0032      0.001      3.952      0.000       0.002       0.005
    x1            -2.9946      0.001  -2840.850      0.000      -2.997      -2.992
    ==============================================================================
    Omnibus:                      252.943   Durbin-Watson:                   1.077
    Prob(Omnibus):                  0.000   Jarque-Bera (JB):            26797.433
    Skew:                          -5.963   Prob(JB):                         0.00
    Kurtosis:                      62.087   Cond. No.                         4.55
    ==============================================================================

.. image:: images/rednoise_pspec_slope3.png

Now we will smooth this image with a Gaussian beam. The easiest way to do this is to use the built-in
tools from the `spectral-cube <https://spectral-cube.readthedocs.io/en/latest/>`_ and
`radio_beam <https://github.com/radio-astro-tools/radio-beam/blob/master/docs/index.rst>`_ packages.
We will convert the FITS HDU to a spectral-cube `Projection`, and define a pencil beam for the
initial image:

    >>> from spectral_cube import Projection
    >>> from radio_beam import Beam
    >>> pencil_beam = Beam(0 * u.deg)
    >>> plaw_proj = Projection.from_hdu(plaw_hdu)
    >>> plaw_proj = plaw_proj.with_beam(pencil_beam)

Next we will define the beam to smooth to. A 3-pixel wide FWHM is reasonable:

    >>> new_beam = Beam(3 * plaw_hdu.header['CDELT2'] * u.deg)
    >>> plaw_conv = plaw_proj.convolve_to(new_beam)
    >>> plaw_conv.quicklook()  # doctest: +SKIP

.. image:: images/rednoise_slope3_img_smoothed.png

How has smoothing changed the shape of the power-spectrum?

    >>> # Change the colours and comment these lines if you don't use seaborn
    >>> import seaborn as sb  # doctest: +SKIP
    >>> col_pal = sb.color_palette()  # doctest: +SKIP
    >>> pspec2 = PowerSpectrum(plaw_conv)
    >>> pspec2.run(verbose=True, xunit=u.pix**-1, fit_2D=False,
    ...            low_cut=0.025 / u.pix, high_cut=0.1 / u.pix,
    ...            radial_pspec_kwargs={'binsize': 1.0},
    ...            apodize_kernel='tukey')  # doctest: +SKIP
    >>> plt.axvline(np.log10(1 / 3.), color=col_pal[3], linewidth=8, alpha=0.8,
    ...             zorder=1)  # doctest: +SKIP
                                OLS Regression Results
    ==============================================================================
    Dep. Variable:                      y   R-squared:                       0.988
    Model:                            OLS   Adj. R-squared:                  0.988
    Method:                 Least Squares   F-statistic:                     2059.
    Date:                Thu, 21 Jun 2018   Prob (F-statistic):           1.54e-25
    Time:                        14:23:19   Log-Likelihood:                 35.997
    No. Observations:                  27   AIC:                            -67.99
    Df Residuals:                      25   BIC:                            -65.40
    Df Model:                           1
    Covariance Type:            nonrobust
    ==============================================================================
                     coef    std err          t      P>|t|      [0.025      0.975]
    ------------------------------------------------------------------------------
    const         -1.0626      0.098    -10.848      0.000      -1.264      -0.861
    x1            -3.5767      0.079    -45.378      0.000      -3.739      -3.414
    ==============================================================================
    Omnibus:                        3.417   Durbin-Watson:                   0.840
    Prob(Omnibus):                  0.181   Jarque-Bera (JB):                2.072
    Skew:                          -0.650   Prob(JB):                        0.355
    Kurtosis:                       3.391   Cond. No.                         15.7
    ==============================================================================

.. image:: images/rednoise_pspec_slope3_smoothed.png

The slope of the power-spectrum is significantly steepened on small scales by the beam (see the reported result in variable ``x1`` above).
And this steepening occurs on scales much larger than the beam FWHM, which is indicated by
the thick purple vertical line in the left-hand side of the plot.  The fitting was restricted to scales much larger than three times the beam width. However, the recovered slope is still steeper than the original -3.

Also note that convolving the image with the beam causes some tapering at the edges of the
image, breaking the periodicity at the edges. The image was apodized with a Tukey window,
which causes some of the deviations at large scales (small frequencies). See the
:ref:`tutorial page on apodizing kernels for more <apodkerns>`.

The beam size must be corrected for in the image prior to fitting the power-spectrum. This can
be done by (1) including a Gaussian beam component in the model used to fit the power-spectrum,
or (2) divide the power-spectrum of the image by the power-spectrum of the beam response. The
former requires using a non-linear model, and is not currently implemented in TurbuStat (see `Martin et al. 2015 <https://ui.adsabs.harvard.edu/#abs/2015ApJ...809..153M/abstract>`_ for an example). The
latter method can be applied prior to fitting, allowing a linear model to still be used for
fitting.

The beam correction in TurbuStat requires the optional package `radio_beam <https://github.com/radio-astro-tools/radio-beam/blob/master/docs/index.rst>`_ to be installed. `radio_beam` allows the beam response for any 2D elliptical Gaussian to be returned. For statistics that create a power-spectrum (Spatial Power-Spectrum, VCA, MVC), the beam correction can be applied by specifying `beam_correct=True`:

    >>> pspec3 = PowerSpectrum(plaw_conv)
    >>> pspec3.run(verbose=True, xunit=u.pix**-1, fit_2D=False,
    ...            low_cut=0.025 / u.pix, high_cut=0.4 / u.pix,
    ...            apodize_kernel='tukey', beam_correct=True)  # doctest: +SKIP
    >>> plt.axvline(np.log10(1 / 3.), color=col_pal[3], linewidth=8, alpha=0.8,
    ...             zorder=1)  # doctest: +SKIP
                                OLS Regression Results
    ==============================================================================
    Dep. Variable:                      y   R-squared:                       0.998
    Model:                            OLS   Adj. R-squared:                  0.998
    Method:                 Least Squares   F-statistic:                 8.828e+04
    Date:                Thu, 21 Jun 2018   Prob (F-statistic):          5.55e-192
    Time:                        14:38:33   Log-Likelihood:                 268.87
    No. Observations:                 137   AIC:                            -533.7
    Df Residuals:                     135   BIC:                            -527.9
    Df Model:                           1
    Covariance Type:            nonrobust
    ==============================================================================
                     coef    std err          t      P>|t|      [0.025      0.975]
    ------------------------------------------------------------------------------
    const         -0.2247      0.008    -27.671      0.000      -0.241      -0.209
    x1            -2.9961      0.010   -297.116      0.000      -3.016      -2.976
    ==============================================================================
    Omnibus:                        7.089   Durbin-Watson:                   1.500
    Prob(Omnibus):                  0.029   Jarque-Bera (JB):                9.274
    Skew:                           0.285   Prob(JB):                      0.00969
    Kurtosis:                       4.140   Cond. No.                         5.50
    ==============================================================================

.. image:: images/rednoise_pspec_slope3_smoothed_beamcorr.png

The shape of the power-spectrum has been restored and we recover the correct slope. The deviation on small scales (large frequencies) occurs on scales smaller than about the FWHM of the beam where the information has been lost by the spatial smoothing applied to the image. If the beam is over-sampled by a larger factor --- say with a 6-pixel FWHM instead of 3 --- the increase in power on small scales will affect a larger region of the power-spectrum. This region should be excluded from the power-spectrum fit. A reasonable lower-limit to fit the power-spectrum to is the FWHM of the beam. Additional noise in the image will tend to flatten the power-spectrum to larger scales, so setting the lower fitting limit to a couple times the beam width may be necessary. **We recommend visually examining the quality of the fit.**

Here are the three power-spectra shown above overplotted to highlight the shape changes from spatial smoothing:

    >>> pspec.plot_fit(color=col_pal[0], label='Original')  # doctest: +SKIP
    >>> pspec2.plot_fit(color=col_pal[1], label='Smoothed')  # doctest: +SKIP
    >>> pspec3.plot_fit(color=col_pal[2], label='Beam-Corrected')  # doctest: +SKIP
    >>> plt.legend(frameon=True, loc='lower left')  # doctest: +SKIP
    >>> plt.axvline(np.log10(1 / 3.), color=col_pal[3], linewidth=8, alpha=0.8, zorder=-1)  # doctest: +SKIP
    >>> plt.ylim([-2, 7.5])  # doctest: +SKIP
    >>> plt.tight_layout()  # doctest: +SKIP

.. image:: images/rednoise_pspec_slope3_beam_comparisons.png

Similar fitting restrictions apply to the MVC and VCA, as well. The beam correction can be applied in the same manner as described above. For other spatial methods which do not use the power-spectrum, the scales of the beam should at least be excluded from any fitting. For example, lag scales smaller than the beam in the :ref:`Delta-Variance <delvar_tutorial>`, :ref:`Wavelets <wavelet_tutorial>`, and :ref:`SCF <scf_tutorial>` should not be fit. The spatial filtering used to measure :ref:`Statistical Moments <statmoments_tutorial>` should be set to a width of at least the beam size.


text:
#import <iWorkImport/TSCHChartDrawableInfo.h>

@interface TSCHChartDrawableInfo (PreUFF_Archiving)
- (id)initFromPreUFFArchiveWithUnarchiver:(id)arg1;
@end


text:
package com.brainy.context;

import com.brainy.Session;
import com.brainy.MessageObject;
import com.brainy.command.wakeup.WakeupCommandNode;
import com.brainy.net.Context;
import com.brainy.net.Hook;
import com.brainy.net.Node;
import org.junit.Test;

import java.io.File;
import java.util.Arrays;
import java.util.List;

import static org.junit.Assert.*;

/**
 * Created by eossth on 8/29/2017 AD.
 */
public class FileContextTest {

    @Test
    public void testSaveFileNodeDAO() throws Exception {

        String contextName = "filetest";
        File testFile = new File(contextName + Context.SUFFIX);
        if (testFile.exists())
            assertTrue(testFile.delete());

        Context context = new FileContext(contextName);
        Session session = new Session(context);

        new WakeupCommandNode(session).execute(null);

        Node node = Node.build(new String[]{"สวัสดี", "สบาย", "ดี", "ไหม"});
        node.setResponse("ครับ");

        node.addHook("เฮฮา", Hook.Match.Mode);

        context.add(node);
        context.save();

        context.clear();
        context.load();

        assertEquals("ครับ", session.parse(MessageObject.build("สวัสดี")));

        MessageObject messageObject = MessageObject.build();
        messageObject.attributes.put("mode", "เฮฮา");
        assertEquals("ครับ", session.parse(messageObject));

    }

    @Test
    public void testLoadFileNodeDAO() throws Exception {

        String contextName = "filetest";

        Context context = new FileContext(contextName);
        Session session = new Session(context);
        new WakeupCommandNode(session).execute(null);

        assertEquals("ครับ", session.parse(MessageObject.build("ดี")));
    }

}


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

    <title>Analytics.DataInfo</title>
    <meta name="date" content="2016-01-30">
    <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation
        links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.qualcomm.analytics

Class Analytics.DataInfo

java.lang.Object

com.qualcomm.analytics.Analytics.DataInfo

All Implemented Interfaces:

java.io.Serializable

Enclosing class:

Analytics

public static class Analytics.DataInfo
extends java.lang.Object
implements java.io.Serializable

See Also:

                        Serialized
                            Form

Field Summary

Fields

                                Modifier and Type
                                Field and Description

                                protected int
                                numUsages

Constructor Summary

Constructors

                                Constructor and Description

                                DataInfo(java.lang.String adate,
                                    int numUsages)

Method Summary

All Methods Instance Methods Concrete Methods

                                Modifier and Type
                                Method and Description

                                java.lang.String
                                date()

                                int
                                numUsages()

Methods inherited from class java.lang.Object

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

Field Detail

numUsages

protected int numUsages

Constructor Detail

DataInfo

public DataInfo(java.lang.String adate,
                int numUsages)

Method Detail

date

public java.lang.String date()

numUsages

public int numUsages()

Skip navigation
        links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
<?php

declare(strict_types=1);

namespace Churn\Tests\Integration\File;

use Churn\File\File;
use Churn\File\FileFinder;
use Churn\Tests\BaseTestCase;

class FileFinderTest extends BaseTestCase
{
    /** @var FileFinder */
    private $fileFinder;

    /** @return void */
    public function setUp()
    {
        parent::setUp();

        $this->fileFinder = new FileFinder(['php'], [], __DIR__);
    }

    /** @test */
    public function it_can_recursively_get_the_php_files_in_a_path(): void
    {
        $paths = [__DIR__];
        /** @var array<mixed> $results */
        $results = iterator_to_array($this->fileFinder->getPhpFiles($paths), false);
        self::assertCount(1, $results);
        self::assertInstanceOf(File::class, $results[0]);
    }
}


text:
namespace nHydrate.Generator.Models
{
    public class CellEntryCollection : BaseModelCollection<CellEntry>
    {
        public CellEntryCollection(INHydrateModelObject root)
            : base(root)
        {
        }

        protected override string NodeOldName => "cellEntry";
        protected override string NodeName => "ce";

        public CellEntry this[string columnName]
        {
            get
            {
                foreach (var item in _internalList)
                {
                    var c = item.ColumnRef.Object as Column;
                    if (string.Compare(c.Name, columnName, 0) == 0)
                        return item;
                }
                return null;
            }
        }

    }
}


text:
package com.sequenceiq.freeipa.api.v1.freeipa.stack.model.describe;

import java.util.List;
import java.util.Set;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.sequenceiq.common.api.cloudstorage.CloudStorageResponse;
import com.sequenceiq.common.api.telemetry.response.TelemetryResponse;
import com.sequenceiq.common.api.type.Tunnel;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.doc.FreeIpaModelDescriptions;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.FreeIpaServerResponse;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.AvailabilityStatus;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.Status;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.image.ImageSettingsResponse;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.instance.InstanceGroupResponse;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.network.NetworkResponse;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.region.PlacementResponse;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.security.StackAuthenticationResponse;
import com.sequenceiq.freeipa.api.v1.freeipa.stack.model.usersync.UserSyncStatusResponse;
import com.sequenceiq.service.api.doc.ModelDescriptions;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("DescribeFreeIpaV1Response")
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DescribeFreeIpaResponse {
    @NotNull
    @ApiModelProperty(value = ModelDescriptions.ENVIRONMENT_CRN, required = true)
    private String environmentCrn;

    @NotNull
    @ApiModelProperty(value = FreeIpaModelDescriptions.FREEIPA_NAME, required = true)
    private String name;

    @NotNull
    private String crn;

    @NotNull
    @ApiModelProperty(FreeIpaModelDescriptions.PLACEMENT_SETTINGS)
    private PlacementResponse placement;

    @ApiModelProperty(value = FreeIpaModelDescriptions.TUNNEL)
    private Tunnel tunnel;

    @NotNull
    @Valid
    @ApiModelProperty(value = FreeIpaModelDescriptions.INSTANCE_GROUPS, required = true)
    private List<InstanceGroupResponse> instanceGroups;

    @NotNull
    @ApiModelProperty(value = FreeIpaModelDescriptions.AUTHENTICATION, required = true)
    private StackAuthenticationResponse authentication;

    @Valid
    @ApiModelProperty(FreeIpaModelDescriptions.NETWORK)
    private NetworkResponse network;

    @ApiModelProperty(FreeIpaModelDescriptions.IMAGE_SETTINGS)
    private ImageSettingsResponse image;

    @NotNull
    @ApiModelProperty(value = FreeIpaModelDescriptions.FREEIPA_SERVER_SETTINGS, required = true)
    private FreeIpaServerResponse freeIpa;

    private Set<String> recipes;

    private AvailabilityStatus availabilityStatus;

    private Status status;

    private String statusString;

    private String statusReason;

    @ApiModelProperty(value = FreeIpaModelDescriptions.FREEIPA_APPLICATION_VERSION)
    private String appVersion;

    @ApiModelProperty(value = FreeIpaModelDescriptions.CLOUD_PLATFORM)
    private String cloudPlatform;

    @ApiModelProperty(value = FreeIpaModelDescriptions.VARIANT)
    private String variant;

    @ApiModelProperty(value = FreeIpaModelDescriptions.TELEMETRY)
    private TelemetryResponse telemetry;

    @ApiModelProperty(value = FreeIpaModelDescriptions.CLOUD_STORAGE)
    private CloudStorageResponse cloudStorage;

    @ApiModelProperty(value = FreeIpaModelDescriptions.USERSYNC_STATUS_DETAILS)
    private UserSyncStatusResponse userSyncStatus;

    public String getEnvironmentCrn() {
        return environmentCrn;
    }

    public void setEnvironmentCrn(String environmentCrn) {
        this.environmentCrn = environmentCrn;
    }

    public String getCrn() {
        return crn;
    }

    public void setCrn(String crn) {
        this.crn = crn;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public PlacementResponse getPlacement() {
        return placement;
    }

    public void setPlacement(PlacementResponse placement) {
        this.placement = placement;
    }

    public Tunnel getTunnel() {
        return tunnel;
    }

    public void setTunnel(Tunnel tunnel) {
        this.tunnel = tunnel;
    }

    public List<InstanceGroupResponse> getInstanceGroups() {
        return instanceGroups;
    }

    public void setInstanceGroups(List<InstanceGroupResponse> instanceGroups) {
        this.instanceGroups = instanceGroups;
    }

    public StackAuthenticationResponse getAuthentication() {
        return authentication;
    }

    public void setAuthentication(StackAuthenticationResponse authentication) {
        this.authentication = authentication;
    }

    public NetworkResponse getNetwork() {
        return network;
    }

    public void setNetwork(NetworkResponse network) {
        this.network = network;
    }

    public ImageSettingsResponse getImage() {
        return image;
    }

    public void setImage(ImageSettingsResponse image) {
        this.image = image;
    }

    public FreeIpaServerResponse getFreeIpa() {
        return freeIpa;
    }

    public void setFreeIpa(FreeIpaServerResponse freeIpa) {
        this.freeIpa = freeIpa;
    }

    public TelemetryResponse getTelemetry() {
        return telemetry;
    }

    public void setTelemetry(TelemetryResponse telemetry) {
        this.telemetry = telemetry;
    }

    public CloudStorageResponse getCloudStorage() {
        return cloudStorage;
    }

    public void setCloudStorage(CloudStorageResponse cloudStorage) {
        this.cloudStorage = cloudStorage;
    }

    public AvailabilityStatus getAvailabilityStatus() {
        return availabilityStatus;
    }

    public void setAvailabilityStatus(AvailabilityStatus availabilityStatus) {
        this.availabilityStatus = availabilityStatus;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public String getStatusReason() {
        return statusReason;
    }

    public void setStatusReason(String statusReason) {
        this.statusReason = statusReason;
    }

    public String getAppVersion() {
        return appVersion;
    }

    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion;
    }

    public String getStatusString() {
        return statusString;
    }

    public void setStatusString(String statusString) {
        this.statusString = statusString;
    }

    public String getCloudPlatform() {
        return cloudPlatform;
    }

    public void setCloudPlatform(String cloudPlatform) {
        this.cloudPlatform = cloudPlatform;
    }

    public UserSyncStatusResponse getUserSyncStatus() {
        return userSyncStatus;
    }

    public void setUserSyncStatus(UserSyncStatusResponse userSyncStatus) {
        this.userSyncStatus = userSyncStatus;
    }

    public String getVariant() {
        return variant;
    }

    public void setVariant(String variant) {
        this.variant = variant;
    }

    public Set<String> getRecipes() {
        return recipes;
    }

    public void setRecipes(Set<String> recipes) {
        this.recipes = recipes;
    }

    @Override
    public String toString() {
        return "DescribeFreeIpaResponse{" +
                "environmentCrn='" + environmentCrn + '\'' +
                ", name='" + name + '\'' +
                ", crn='" + crn + '\'' +
                ", placement=" + placement +
                ", instanceGroups=" + instanceGroups +
                ", authentication=" + authentication +
                ", network=" + network +
                ", image=" + image +
                ", freeIpa=" + freeIpa +
                ", availabilityStatus=" + availabilityStatus +
                ", status=" + status +
                ", statusString='" + statusString + '\'' +
                ", statusReason='" + statusReason + '\'' +
                ", appVersion='" + appVersion + '\'' +
                ", cloudPlatform='" + cloudPlatform + '\'' +
                ", variant='" + variant + '\'' +
                ", telemetry=" + telemetry +
                ", cloudStorage=" + cloudStorage +
                ", userSyncStatus=" + userSyncStatus +
                ", recipes=" + recipes +
                '}';
    }
}


text:
package microsofia.framework;

import java.util.List;

import com.google.inject.AbstractModule;

public interface Service {
	public enum Type{CLIENT, AGENT, REGISTRY};

	public Type getType();

	public List<AbstractModule> getGuiceModules();

	public List<Class<?>> getInjectedClasses();

	public void start() throws Exception;

	public void stop() throws Exception;
}


text:
<!doctype html>

<meta charset="utf-8">
<link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
<link rel="stylesheet" href="chrome://resources/css/apps/common.css"></link>
<link rel="stylesheet" href="chrome://resources/css/apps/topbutton_bar.css"></link>
<link rel="stylesheet" href="../css/feedback.css">

      <button class="minimize-button" id="minimize-button" tabindex="-1">
      </button>
      <button class="close-button" id="close-button" tabindex="-1">
      </button>

      <button id="srt-decline-button" class="white-button"
          i18n-content="srtPromptDeclineButton">
      </button>
      <button id="srt-accept-button" class="blue-button"
          i18n-content="srtPromptAcceptButton">
      </button>

    <textarea id="description-text" aria-labelledby="title-bar"></textarea>

      <input id="page-url-text" aria-labelledby="page-url-label" type="text">

      <input id="user-email-text" aria-labelledby="user-email-label" type="text">

      <input id="attach-file" type="file" aria-labelledby="attach-file-label">

        <button id="remove-attached-file" class="remove-file-button"></button>

      <input id="screenshot-checkbox" type="checkbox" aria-labelledby="screenshot-label">

      <input id="sys-info-checkbox" type="checkbox" aria-labelledby="sys-info-label" checked>

<if expr="chromeos">

      <input id="performance-info-checkbox" type="checkbox">

</if>

      <button id="cancel-button" type="submit"
          class="white-button" i18n-content="cancel">
      </button>
      <button id="send-report-button" type="submit"
          class="blue-button" i18n-content="send-report">
      </button>


text:
(function () {
    //@widgetWorkAround@
    //@widgetWorkAround2@
    let tableCard;
    let exportWidgetContainer;
    const interval = setInterval(() => {
        exportWidgetContainer = document.getElementById('exportWidgetContainer');
        if (exportWidgetContainer && exportWidgetContainer.childNodes.length === 0) {
            clearInterval(interval);
            tableCard = new RcdMaterialTableCard('Exports').init().
                addColumn('Export name').
                addIconArea(new RcdImageIconArea(config.assetsUrl + '/icons/export-icon.svg',
                    createExport).init().setTooltip('Export current content'), {max: 0}).
                addIconArea(new RcdImageIconArea(config.assetsUrl + '/icons/import-icon.svg',
                    loadExports).init().setTooltip('Import selected exports'), {min: 1}).
                addIconArea(new RcdGoogleMaterialIconArea('file_download',
                    dowloadExports).init().setTooltip('Archive and download selected exports', RcdMaterialTooltipAlignment.RIGHT), {min: 1}).
                addIconArea(new RcdGoogleMaterialIconArea('file_upload', uploadExports).init().setTooltip('Upload and unarchive exports',
                    RcdMaterialTooltipAlignment.RIGHT),
                {max: 0}).
                addIconArea(new RcdGoogleMaterialIconArea('delete', deleteExports).init().setTooltip('Delete selected exports'), {min: 1}).
                addIconArea(new RcdGoogleMaterialIconArea('help', displayHelp).init().setTooltip('Help'),
                {max: 0});

            retrieveExports();
            tableCard.setParent(exportWidgetContainer);
        }
    }, 200);

    function retrieveExports() {
        const infoDialog = showShortInfoDialog('Retrieving export list...', exportWidgetContainer);
        return $.ajax({
            url: config.servicesUrl + '/export-list'
        }).done(function (result) {
            tableCard.deleteRows();
            if (handleResultError(result)) {
                result.success.sort((export1, export2) => export2.timestamp - export1.timestamp).
                    forEach((anExport) => {
                        tableCard.createRow().
                            addCell(anExport.name).
                            setAttribute('export', anExport.name);
                    });
            }
        }).fail(handleAjaxError).always(() => {
            infoDialog.close();
        });
    }

    function createExport() {
        const defaultExportName = config.contentName + '-draft-' + toLocalDateTimeFormat(new Date(), '-', '-');
        showInputDialog({
            title: "Export content",
            confirmationLabel: "CREATE",
            label: "Export name",
            placeholder: defaultExportName,
            value: defaultExportName,
            callback: (value) => doCreateExport(value || defaultExportName)
        });
    }

    function doCreateExport(exportName) {
        const infoDialog = showLongInfoDialog("Exporting content...");
        return $.ajax({
            method: 'POST',
            url: config.servicesUrl + '/export-create',
            data: JSON.stringify({
                contentPath: config.contentPath,
                exportName: exportName
            }),
            contentType: 'application/json; charset=utf-8'
        }).done((result) => handleTaskCreation(result, {
            taskId: result.taskId,
            message: 'Exporting content...',
            doneCallback: (success) =>  new ExportResultDialog(success, 'content').init().open(),
            alwaysCallback: () => retrieveExports()
        })).fail(handleAjaxError).always(() => {
            infoDialog.close();
        });
    }

    function loadExports() {
        showInputDialog({
            title: "Import contents under",
            confirmationLabel: "Import",
            label: "Content path",
            placeholder: 'Target parent content path',
            value: config.contentPath,
            callback: (value) => doLoadExports(value || '/')
        });
    }

    function doLoadExports(contentPath) {
        const infoDialog = showLongInfoDialog("Importing contents...");
        const exportNames = tableCard.getSelectedRows().
            map((row) => row.attributes['export']);
        return $.ajax({
            method: 'POST',
            url: config.servicesUrl + '/export-load',
            data: JSON.stringify({
                contentPath: contentPath,
                exportNames: exportNames
            }),
            contentType: 'application/json; charset=utf-8'
        }).done((result) => handleTaskCreation(result, {
            taskId: result.taskId,
            message: 'Importing contents...',
            doneCallback: (success) =>  new ImportResultDialog(exportNames, success, 'content').init().open(),
            alwaysCallback: () => retrieveExports()
        })).fail(handleAjaxError).always(() => {
            infoDialog.close();
        });
    }

    function deleteExports() {
        showConfirmationDialog("Delete selected exports?", 'DELETE', doDeleteExports);
    }

    function doDeleteExports() {
        const infoDialog = showLongInfoDialog("Deleting exports...",);
        const exportNames = tableCard.getSelectedRows().map((row) => row.attributes['export']);
        $.ajax({
            method: 'POST',
            url: config.servicesUrl + '/export-delete',
            data: JSON.stringify({exportNames: exportNames}),
            contentType: 'application/json; charset=utf-8'
        }).done((result) => handleTaskCreation(result, {
            taskId: result.taskId,
            message: 'Deleting exports...',
            doneCallback: () => displaySnackbar('Export' + (exportNames.length > 1 ? 's' : '') + ' deleted'),
            alwaysCallback: () => retrieveExports()
        })).fail(handleAjaxError).always(() => {
            infoDialog.close();
        });
    }

    function dowloadExports() {
        const exportNames = tableCard.getSelectedRows().map((row) => row.attributes['export']);
        const infoDialog = showLongInfoDialog("Archiving exports...");
        $.ajax({
            method: 'POST',
            url: config.servicesUrl + '/export-archive',
            data: JSON.stringify({exportNames: exportNames}),
            contentType: 'application/json; charset=utf-8'
        }).done((result) => handleTaskCreation(result, {
            taskId: result.taskId,
            message: 'Archiving exports...',
            doneCallback: (success) => {
                const archiveNameInput = new RcdInputElement().init().
                setAttribute('type', 'hidden').
                setAttribute('name', 'archiveName').
                setAttribute('value', success);
                const fileNameInput = new RcdInputElement().init().
                setAttribute('type', 'hidden').
                setAttribute('name', 'fileName').
                setAttribute('value', (exportNames.length == 1 ? exportNames[0] : "export-download") + '.zip');
                const downloadForm = new RcdFormElement().init().
                setAttribute('action', config.servicesUrl + '/export-download').
                setAttribute('method', 'post').
                addChild(archiveNameInput).
                addChild(fileNameInput);
                document.body.appendChild(downloadForm.domElement);
                downloadForm.submit();
                document.body.removeChild(downloadForm.domElement);
            }
        })).fail(handleAjaxError).always(() => {
            infoDialog.close();
        });
    }

    var uploadForm;

    function uploadExports() {
        const uploadFileInput = new RcdInputElement().init().
            setAttribute('type', 'file').
            setAttribute('name', 'uploadFile').
            addChangeListener(doUploadExports);
        uploadForm = new RcdFormElement().init().
            addChild(uploadFileInput);
        uploadFileInput.click();
    }

    function doUploadExports() {
        const infoDialog = showLongInfoDialog("Uploading exports...");
        const formData = new FormData(uploadForm.domElement);
        $.ajax({
            method: 'POST',
            url: config.servicesUrl + '/export-upload',
            data: formData,
            contentType: false,
            processData: false
        }).done((result) => handleTaskCreation(result, {
            taskId: result.taskId,
            message: 'Uploading exports...',
            doneCallback: () => displaySnackbar('Export(s) uploaded'),
            alwaysCallback: () => retrieveExports()
        })).fail(handleAjaxError).always(() => {
            infoDialog.close();
        });
    }

    function displayHelp() {
        const definition = 'A content export is a serialization of a given content and its children. ' +
                           'This makes content exports well suited for transferring a specific content to another installation. ' +
                           'Warning: The export mechanism does not export old versions of your data. You will loose the version history of your contents. ' +
                           'See Export and Import for more information.';

        const viewDefinition = 'This widget lists in a table all the exports located in $XP_HOME/data/export. ' +
                               'You can export the current content or upload previously archived exports. ' +
                               'Importing exports will import them as children under the current content. ' +
                               'You can also delete or archive (ZIP) and download existing exports.';

        new HelpDialog('Content Exports', [definition, viewDefinition]).
            init().
            addActionDefinition({
                iconSrc: config.assetsUrl + '/icons/export-icon.svg',
                definition: 'Export the current content into $XP_HOME/data/export/[export-name].'
            }).
            addActionDefinition({iconName: 'file_upload', definition: 'Upload archived exports and unzip them into $XP_HOME/data/export'}).
            addActionDefinition({
                iconSrc: config.assetsUrl + '/icons/import-icon.svg',
                definition: 'Import the selected exports. Their contents will be imported as children under the specified content path ' +
                            '(at the root if no value is specified).'
            }).
            addActionDefinition({iconName: 'file_download', definition: 'Zip the selected exports and download the archive'}).
            addActionDefinition({iconName: 'delete', definition: 'Delete the selected exports.'}).
            open();
    }

    function handleResultError(result) {
        if (result.error) {
            console.log(result.error);
            new RcdMaterialSnackbar(result.error).init().open(exportWidgetContainer);
            return false;
        }
        return true;
    }

    function handleAjaxError(jqXHR) {
        let errorMessage;
        if (jqXHR.status) {
            errorMessage = 'Error ' + jqXHR.status + ': ' + jqXHR.statusText;
        } else {
            errorMessage = 'Connection refused';
        }
        console.log(errorMessage);
        new RcdMaterialSnackbar(errorMessage).
            init().open(exportWidgetContainer);
    }

    function showLongInfoDialog(text) {
        return new RcdMaterialInfoDialog({text: text, overlay: true}).
            init().
            open();
    }

    function showShortInfoDialog(text) {
        return new RcdMaterialInfoDialog({text: text}).
        init().
        open(exportWidgetContainer);
    }

    function showConfirmationDialog(text, confirmationLabel, callback) {
        return new RcdMaterialConfirmationDialog({text: text, confirmationLabel: confirmationLabel, callback: callback}).
            init().
            open();
    }

    function showInputDialog(params) {
        return new RcdMaterialInputDialog(params).
            init().
            open();
    }

    function showSelectionDialog(params) {
        return new RcdMaterialSelectionDialog(params).
            init().
            open();
    }

    function showDetailsDialog(title, text, callback) {
        return new RcdMaterialDetailsDialog({title: title, text: text, callback: callback}).
            init().
            open();
    }

    function displaySnackbar(text) {
        new RcdMaterialSnackbar(text).init().open(exportWidgetContainer);
    }
}());


text:
import { EntityId } from '@reduxjs/toolkit'
import { FunctionalComponent, h } from '@stencil/core'
import { Document } from 'stencila'
import { state } from '../../../../../store'
import {
  isEditable,
  isEditPaneOpen,
  isPreviewable,
  isPreviewPaneOpen,
  setEditorPaneVisibility,
  setPreviewPaneVisibility,
} from '../../../../../store/documentPane/documentPaneActions'
import { selectView } from '../../../../../store/documentPane/documentPaneSelectors'
import { PaneLayout } from '../../../../../store/documentPane/documentPaneTypes'

const cycleLayout = (view?: Document, layout?: PaneLayout) => (e: Event) => {
  e.preventDefault()
  if (!view || !layout) {
    return
  }

  const editable = isEditable(view)
  const previewable = isPreviewable(view)
  const isPreviewOpen = isPreviewPaneOpen(layout)
  const isEditorOpen = isEditPaneOpen(layout)

  if (previewable && isPreviewOpen && editable && isEditorOpen) {
    setPreviewPaneVisibility(layout.id, false)
  } else if (previewable && !isPreviewOpen && editable && isEditorOpen) {
    setEditorPaneVisibility(layout.id, false)
    setPreviewPaneVisibility(layout.id, true)
  } else if (previewable && editable) {
    setEditorPaneVisibility(layout.id, true)
    setPreviewPaneVisibility(layout.id, true)
  } else if (previewable) {
    setPreviewPaneVisibility(layout.id, true)
  } else if (editable) {
    setEditorPaneVisibility(layout.id, true)
  }
}

const hasNextLayout = (view: Document): boolean => {
  return !!(isPreviewable(view) && isEditable(view))
}

interface Props {
  paneId: EntityId
  viewId: EntityId
}

export const TogglePaneLayoutButton: FunctionalComponent<Props> = ({
  paneId,
  viewId,
}) => {
  const { view, layout } = selectView(state)(paneId)(viewId)
  const isDisabled = !(view && hasNextLayout(view)) ?? true

  return (
    <stencila-button
      iconOnly={true}
      icon="layout-5"
      color={isDisabled ? 'key' : 'neutral'}
      disabled={isDisabled}
      minimal={true}
      size="xsmall"
      tooltip="Toggle layout"
      onClick={cycleLayout(view, layout)}
    >
      Toggle layout
    </stencila-button>
  )
}


text:
namespace blink {

namespace {

class SampleInterpolation : public LegacyStyleInterpolation {
 public:
  static PassRefPtr<LegacyStyleInterpolation> create(
      std::unique_ptr<InterpolableValue> start,
      std::unique_ptr<InterpolableValue> end) {
    return adoptRef(new SampleInterpolation(std::move(start), std::move(end)));
  }

 private:
  SampleInterpolation(std::unique_ptr<InterpolableValue> start,
                      std::unique_ptr<InterpolableValue> end)
      : LegacyStyleInterpolation(std::move(start),
                                 std::move(end),
                                 CSSPropertyBackgroundColor) {}
};

const double duration = 1.0;

}  // namespace

class AnimationInterpolationEffectTest : public ::testing::Test {
 protected:
  InterpolableValue* interpolationValue(
      LegacyStyleInterpolation& interpolation) {
    return interpolation.getCachedValueForTesting();
  }

  double getInterpolableNumber(PassRefPtr<Interpolation> value) {
    LegacyStyleInterpolation& interpolation =
        toLegacyStyleInterpolation(*value.get());
    return toInterpolableNumber(interpolationValue(interpolation))->value();
  }
};

TEST_F(AnimationInterpolationEffectTest, SingleInterpolation) {
  InterpolationEffect interpolationEffect;
  interpolationEffect.addInterpolation(
      SampleInterpolation::create(InterpolableNumber::create(0),
                                  InterpolableNumber::create(10)),
      RefPtr<TimingFunction>(), 0, 1, -1, 2);

  Vector<RefPtr<Interpolation>> activeInterpolations;
  interpolationEffect.getActiveInterpolations(-2, duration,
                                              activeInterpolations);
  EXPECT_EQ(0ul, activeInterpolations.size());

  interpolationEffect.getActiveInterpolations(-0.5, duration,
                                              activeInterpolations);
  EXPECT_EQ(1ul, activeInterpolations.size());
  EXPECT_EQ(-5, getInterpolableNumber(activeInterpolations.at(0)));

  interpolationEffect.getActiveInterpolations(0.5, duration,
                                              activeInterpolations);
  EXPECT_EQ(1ul, activeInterpolations.size());
  EXPECT_FLOAT_EQ(5, getInterpolableNumber(activeInterpolations.at(0)));

  interpolationEffect.getActiveInterpolations(1.5, duration,
                                              activeInterpolations);
  EXPECT_EQ(1ul, activeInterpolations.size());
  EXPECT_FLOAT_EQ(15, getInterpolableNumber(activeInterpolations.at(0)));

  interpolationEffect.getActiveInterpolations(3, duration,
                                              activeInterpolations);
  EXPECT_EQ(0ul, activeInterpolations.size());
}

TEST_F(AnimationInterpolationEffectTest, MultipleInterpolations) {
  InterpolationEffect interpolationEffect;
  interpolationEffect.addInterpolation(
      SampleInterpolation::create(InterpolableNumber::create(10),
                                  InterpolableNumber::create(15)),
      RefPtr<TimingFunction>(), 1, 2, 1, 3);
  interpolationEffect.addInterpolation(
      SampleInterpolation::create(InterpolableNumber::create(0),
                                  InterpolableNumber::create(1)),
      LinearTimingFunction::shared(), 0, 1, 0, 1);
  interpolationEffect.addInterpolation(
      SampleInterpolation::create(InterpolableNumber::create(1),
                                  InterpolableNumber::create(6)),
      CubicBezierTimingFunction::preset(
          CubicBezierTimingFunction::EaseType::EASE),
      0.5, 1.5, 0.5, 1.5);

  Vector<RefPtr<Interpolation>> activeInterpolations;
  interpolationEffect.getActiveInterpolations(-0.5, duration,
                                              activeInterpolations);
  EXPECT_EQ(0ul, activeInterpolations.size());

  interpolationEffect.getActiveInterpolations(0, duration,
                                              activeInterpolations);
  EXPECT_EQ(1ul, activeInterpolations.size());
  EXPECT_FLOAT_EQ(0, getInterpolableNumber(activeInterpolations.at(0)));

  interpolationEffect.getActiveInterpolations(0.5, duration,
                                              activeInterpolations);
  EXPECT_EQ(2ul, activeInterpolations.size());
  EXPECT_FLOAT_EQ(0.5f, getInterpolableNumber(activeInterpolations.at(0)));
  EXPECT_FLOAT_EQ(1, getInterpolableNumber(activeInterpolations.at(1)));

  interpolationEffect.getActiveInterpolations(1, duration,
                                              activeInterpolations);
  EXPECT_EQ(2ul, activeInterpolations.size());
  EXPECT_FLOAT_EQ(10, getInterpolableNumber(activeInterpolations.at(0)));
  EXPECT_FLOAT_EQ(5.0282884f,
                  getInterpolableNumber(activeInterpolations.at(1)));

  interpolationEffect.getActiveInterpolations(1, duration * 1000,
                                              activeInterpolations);
  EXPECT_EQ(2ul, activeInterpolations.size());
  EXPECT_FLOAT_EQ(10, getInterpolableNumber(activeInterpolations.at(0)));
  EXPECT_FLOAT_EQ(5.0120168f,
                  getInterpolableNumber(activeInterpolations.at(1)));

  interpolationEffect.getActiveInterpolations(1.5, duration,
                                              activeInterpolations);
  EXPECT_EQ(1ul, activeInterpolations.size());
  EXPECT_FLOAT_EQ(12.5f, getInterpolableNumber(activeInterpolations.at(0)));

  interpolationEffect.getActiveInterpolations(2, duration,
                                              activeInterpolations);
  EXPECT_EQ(1ul, activeInterpolations.size());
  EXPECT_FLOAT_EQ(15, getInterpolableNumber(activeInterpolations.at(0)));
}

}  // namespace blink


text:
package batcher

import (
	"errors"
	"sync"
	"sync/atomic"
	"time"
)

const (
	batcherActive   = uint32(0)
	batcherDisposed = uint32(1)
)

// Batcher provides an API for accumulating items into a batch for processing.
type Batcher interface {
	// Put adds items to the batcher.
	Put(interface{}) error

	// Get retrieves a batch from the batcher. This call will block until
	// one of the conditions for a "complete" batch is reached.
	Get() ([]interface{}, error)

	// Flush forcibly completes the batch currently being built
	Flush() error

	// Dispose will dispose of the batcher. Any calls to Put or Flush
	// will return ErrDisposed, calls to Get will return an error iff
	// there are no more ready batches.
	Dispose()

	// IsDisposed will determine if the batcher is disposed
	IsDisposed() bool
}

// ErrDisposed is the error returned for a disposed Batcher
var ErrDisposed = errors.New("batcher: disposed")

// CalculateBytes evaluates the number of bytes in an item added to a Batcher.
type CalculateBytes func(interface{}) uint

type basicBatcher struct {
	maxTime        time.Duration
	maxItems       uint
	maxBytes       uint
	calculateBytes CalculateBytes
	disposed       uint32
	items          []interface{}
	lock           sync.RWMutex
	batchChan      chan []interface{}
	disposeChan    chan struct{}
	availableBytes uint
	waiting        int32
}

// New creates a new Batcher using the provided arguments.
// Batch readiness can be determined in three ways:
//   - Maximum number of bytes per batch
//   - Maximum number of items per batch
//   - Maximum amount of time waiting for a batch
// Values of zero for one of these fields indicate they should not be
// taken into account when evaluating the readiness of a batch.
func New(maxTime time.Duration, maxItems, maxBytes, queueLen uint, calculate CalculateBytes) (Batcher, error) {
	if maxBytes > 0 && calculate == nil {
		return nil, errors.New("batcher: must provide CalculateBytes function")
	}

	return &basicBatcher{
		maxTime:        maxTime,
		maxItems:       maxItems,
		maxBytes:       maxBytes,
		calculateBytes: calculate,
		items:          make([]interface{}, 0, maxItems),
		batchChan:      make(chan []interface{}, queueLen),
		disposeChan:    make(chan struct{}),
	}, nil
}

// Put adds items to the batcher. If Put is continually called without calls to
// Get, an unbounded number of go-routines will be generated.
// Note: there is no order guarantee for items entering/leaving the batcher.
func (b *basicBatcher) Put(item interface{}) error {
	// Check to see if disposed before putting
	if b.IsDisposed() {
		return ErrDisposed
	}
	b.lock.Lock()
	b.items = append(b.items, item)
	if b.calculateBytes != nil {
		b.availableBytes += b.calculateBytes(item)
	}
	if b.ready() {
		b.flush()
	}

	b.lock.Unlock()
	return nil
}

// Get retrieves a batch from the batcher. This call will block until
// one of the conditions for a "complete" batch is reached. If Put is
// continually called without calls to Get, an unbounded number of
// go-routines will be generated.
// Note: there is no order guarantee for items entering/leaving the batcher.
func (b *basicBatcher) Get() ([]interface{}, error) {
	// Don't check disposed yet so any items remaining in the queue
	// will be returned properly.

	var timeout <-chan time.Time
	if b.maxTime > 0 {
		timeout = time.After(b.maxTime)
	}

	// Check to see if disposed before blocking
	if b.IsDisposed() {
		return nil, ErrDisposed
	}

	select {
	case items := <-b.batchChan:
		return items, nil
	case _, ok := <-b.disposeChan:
		if !ok {
			return nil, ErrDisposed
		}
		return nil, nil
	case <-timeout:
		// Check to see if disposed before getting lock
		if b.IsDisposed() {
			return nil, ErrDisposed
		}
		b.lock.Lock()
		items := b.items
		b.items = make([]interface{}, 0, b.maxItems)
		b.availableBytes = 0
		b.lock.Unlock()
		return items, nil
	}
}

// Flush forcibly completes the batch currently being built
func (b *basicBatcher) Flush() error {
	if b.IsDisposed() {
		return ErrDisposed
	}
	b.lock.Lock()
	b.flush()
	b.lock.Unlock()
	return nil
}

// Dispose will dispose of the batcher. Any calls to Put or Flush
// will return ErrDisposed, calls to Get will return an error iff
// there are no more ready batches.
func (b *basicBatcher) Dispose() {
	// Check to see if disposed before attempting to dispose
	if atomic.CompareAndSwapUint32(&b.disposed, batcherActive, batcherDisposed) {
		return
	}
	b.lock.Lock()
	b.flush()
	b.items = nil
	close(b.disposeChan)

	// Drain the batch channel and all routines waiting to put on the channel
	for len(b.batchChan) > 0 || atomic.LoadInt32(&b.waiting) > 0 {
		<-b.batchChan
	}
	close(b.batchChan)
	b.lock.Unlock()
}

// IsDisposed will determine if the batcher is disposed
func (b *basicBatcher) IsDisposed() bool {
	return atomic.LoadUint32(&b.disposed) == batcherDisposed
}

// flush adds the batch currently being built to the queue of completed batches.
// flush is not threadsafe, so should be synchronized externally.
func (b *basicBatcher) flush() {
	// Note: This needs to be in a go-routine to avoid locking out gets when
	// the batch channel is full.
	cpItems := make([]interface{}, len(b.items))
	for i, val := range b.items {
		cpItems[i] = val
	}
	// Signal one more waiter for the batch channel
	atomic.AddInt32(&b.waiting, 1)
	// Don't block on the channel put
	go func() {
		b.batchChan <- cpItems
		atomic.AddInt32(&b.waiting, -1)
	}()
	b.items = make([]interface{}, 0, b.maxItems)
	b.availableBytes = 0
}

func (b *basicBatcher) ready() bool {
	if b.maxItems != 0 && uint(len(b.items)) >= b.maxItems {
		return true
	}
	if b.maxBytes != 0 && b.availableBytes >= b.maxBytes {
		return true
	}
	return false
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _05.Na_Baba_Mi_Smetalnika
{
    class NaBabaMiSmetalnika
    {
        static void Main(string[] args)
        {
        }
    }
}


text:
.class public final Lcom/google/android/gms/maps/model/MarkerOptions;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/google/android/gms/common/internal/safeparcel/SafeParcelable;

# static fields
.field public static final CREATOR:Lcom/google/android/gms/maps/model/MarkerOptionsCreator;

# instance fields
.field private CF:F

.field private CG:F

.field private CM:Lcom/google/android/gms/maps/model/LatLng;

.field private CN:Ljava/lang/String;

.field private CO:Lcom/google/android/gms/maps/model/BitmapDescriptor;

.field private CP:Z

.field private CQ:Z

.field private CR:F

.field private CS:F

.field private CT:F

.field private Cx:Z

.field private final kg:I

.field private mAlpha:F

.field private qL:Ljava/lang/String;

# direct methods
.method static constructor <clinit>()V
    .locals 1

    new-instance v0, Lcom/google/android/gms/maps/model/MarkerOptionsCreator;

    invoke-direct {v0}, Lcom/google/android/gms/maps/model/MarkerOptionsCreator;-><init>()V

    sput-object v0, Lcom/google/android/gms/maps/model/MarkerOptions;->CREATOR:Lcom/google/android/gms/maps/model/MarkerOptionsCreator;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

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

    const/high16 v0, 0x3f00

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CF:F

    const/high16 v0, 0x3f80

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CG:F

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->Cx:Z

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CQ:Z

    const/4 v0, 0x0

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CR:F

    const/high16 v0, 0x3f00

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CS:F

    const/4 v0, 0x0

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CT:F

    const/high16 v0, 0x3f80

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->mAlpha:F

    const/4 v0, 0x1

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->kg:I

    return-void
.end method

.method constructor <init>(ILcom/google/android/gms/maps/model/LatLng;Ljava/lang/String;Ljava/lang/String;Landroid/os/IBinder;FFZZZFFFF)V
    .locals 2

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

    const/high16 v0, 0x3f00

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CF:F

    const/high16 v0, 0x3f80

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CG:F

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->Cx:Z

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CQ:Z

    const/4 v0, 0x0

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CR:F

    const/high16 v0, 0x3f00

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CS:F

    const/4 v0, 0x0

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CT:F

    const/high16 v0, 0x3f80

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->mAlpha:F

    iput p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->kg:I

    iput-object p2, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CM:Lcom/google/android/gms/maps/model/LatLng;

    iput-object p3, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->qL:Ljava/lang/String;

    iput-object p4, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CN:Ljava/lang/String;

    if-nez p5, :cond_0

    const/4 v0, 0x0

    goto :goto_0

    :cond_0
    new-instance v0, Lcom/google/android/gms/maps/model/BitmapDescriptor;

    invoke-static {p5}, Lcom/google/android/gms/dynamic/b$a;->E(Landroid/os/IBinder;)Lcom/google/android/gms/dynamic/b;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/google/android/gms/maps/model/BitmapDescriptor;-><init>(Lcom/google/android/gms/dynamic/b;)V

    :goto_0
    iput-object v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CO:Lcom/google/android/gms/maps/model/BitmapDescriptor;

    iput p6, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CF:F

    iput p7, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CG:F

    iput-boolean p8, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CP:Z

    iput-boolean p9, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->Cx:Z

    iput-boolean p10, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CQ:Z

    iput p11, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CR:F

    iput p12, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CS:F

    iput p13, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CT:F

    move/from16 v0, p14

    iput v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->mAlpha:F

    return-void
.end method

# virtual methods
.method public final alpha(F)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->mAlpha:F

    return-object p0
.end method

.method public final anchor(FF)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CF:F

    iput p2, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CG:F

    return-object p0
.end method

.method public final describeContents()I
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public final draggable(Z)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput-boolean p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CP:Z

    return-object p0
.end method

.method final eG()Landroid/os/IBinder;
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CO:Lcom/google/android/gms/maps/model/BitmapDescriptor;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CO:Lcom/google/android/gms/maps/model/BitmapDescriptor;

    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/BitmapDescriptor;->el()Lcom/google/android/gms/dynamic/b;

    move-result-object v0

    invoke-interface {v0}, Lcom/google/android/gms/dynamic/b;->asBinder()Landroid/os/IBinder;

    move-result-object v0

    return-object v0
.end method

.method public final flat(Z)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput-boolean p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CQ:Z

    return-object p0
.end method

.method public final getAlpha()F
    .locals 1

    iget v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->mAlpha:F

    return v0
.end method

.method public final getAnchorU()F
    .locals 1

    iget v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CF:F

    return v0
.end method

.method public final getAnchorV()F
    .locals 1

    iget v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CG:F

    return v0
.end method

.method public final getIcon()Lcom/google/android/gms/maps/model/BitmapDescriptor;
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CO:Lcom/google/android/gms/maps/model/BitmapDescriptor;

    return-object v0
.end method

.method public final getInfoWindowAnchorU()F
    .locals 1

    iget v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CS:F

    return v0
.end method

.method public final getInfoWindowAnchorV()F
    .locals 1

    iget v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CT:F

    return v0
.end method

.method public final getPosition()Lcom/google/android/gms/maps/model/LatLng;
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CM:Lcom/google/android/gms/maps/model/LatLng;

    return-object v0
.end method

.method public final getRotation()F
    .locals 1

    iget v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CR:F

    return v0
.end method

.method public final getSnippet()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CN:Ljava/lang/String;

    return-object v0
.end method

.method public final getTitle()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->qL:Ljava/lang/String;

    return-object v0
.end method

.method final getVersionCode()I
    .locals 1

    iget v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->kg:I

    return v0
.end method

.method public final icon(Lcom/google/android/gms/maps/model/BitmapDescriptor;)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput-object p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CO:Lcom/google/android/gms/maps/model/BitmapDescriptor;

    return-object p0
.end method

.method public final infoWindowAnchor(FF)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CS:F

    iput p2, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CT:F

    return-object p0
.end method

.method public final isDraggable()Z
    .locals 1

    iget-boolean v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CP:Z

    return v0
.end method

.method public final isFlat()Z
    .locals 1

    iget-boolean v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CQ:Z

    return v0
.end method

.method public final isVisible()Z
    .locals 1

    iget-boolean v0, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->Cx:Z

    return v0
.end method

.method public final position(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput-object p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CM:Lcom/google/android/gms/maps/model/LatLng;

    return-object p0
.end method

.method public final rotation(F)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CR:F

    return-object p0
.end method

.method public final snippet(Ljava/lang/String;)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput-object p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->CN:Ljava/lang/String;

    return-object p0
.end method

.method public final title(Ljava/lang/String;)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput-object p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->qL:Ljava/lang/String;

    return-object p0
.end method

.method public final visible(Z)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    iput-boolean p1, p0, Lcom/google/android/gms/maps/model/MarkerOptions;->Cx:Z

    return-object p0
.end method

.method public final writeToParcel(Landroid/os/Parcel;I)V
    .locals 1

    invoke-static {}, Lcom/google/android/gms/maps/internal/r;->eD()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-static {p0, p1, p2}, Lcom/google/android/gms/maps/model/f;->a(Lcom/google/android/gms/maps/model/MarkerOptions;Landroid/os/Parcel;I)V

    return-void

    :cond_0
    invoke-static {p0, p1, p2}, Lcom/google/android/gms/maps/model/MarkerOptionsCreator;->a(Lcom/google/android/gms/maps/model/MarkerOptions;Landroid/os/Parcel;I)V

    return-void
.end method


text:
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Demo FileHTTP import</title>
</head>
<body>
	<script type="text/javascript" src="../zip.js"></script>
	<script type="text/javascript" src="../zip-fs.js"></script>
	<script type="text/javascript" src="../zip-ext.js"></script>
	<script type="text/javascript" src="dataview.js"></script>
	<script type="text/javascript" src="config.js"></script>
	<script type="text/javascript" src="test9.js"></script>
</body>
</html>


text:
if [ -z "$NODE_ENV" ]
then
  NODE_ENV="default"
  export $NODE_ENV
fi

GIT_HASH=`git log --format="%H" --max-count=1 less/*`;
GIT_HASH=z$GIT_HASH;
export $GIT_HASH;

rm public/css/client.css;
forever stop client-app.js; rm ~/.forever/dome-client.js.log; forever start -l dome-client.js.log client-app.js $GIT_HASH;