text:
<?php

defined('_JEXEC') or die;

/**
 * Routing class from com_contact
 *
 * @since  3.3
 */
class ContactRouter extends JComponentRouterBase
{
	/**
	 * Build the route for the com_contact component
	 *
	 * @param   array  &$query  An array of URL arguments
	 *
	 * @return  array  The URL arguments to use to assemble the subsequent URL.
	 *
	 * @since   3.3
	 */
	public function build(&$query)
	{
		$segments = array();

		// Get a menu item based on Itemid or currently active
		$params = JComponentHelper::getParams('com_contact');
		$advanced = $params->get('sef_advanced_link', 0);

		if (empty($query['Itemid']))
		{
			$menuItem = $this->menu->getActive();
		}
		else
		{
			$menuItem = $this->menu->getItem($query['Itemid']);
		}

		$mView = (empty($menuItem->query['view'])) ? null : $menuItem->query['view'];
		$mId = (empty($menuItem->query['id'])) ? null : $menuItem->query['id'];

		if (isset($query['view']))
		{
			$view = $query['view'];

			if (empty($query['Itemid']) || empty($menuItem) || $menuItem->component != 'com_contact')
			{
				$segments[] = $query['view'];
			}

			unset($query['view']);
		}

		// Are we dealing with a contact that is attached to a menu item?
		if (isset($view) && ($mView == $view) and (isset($query['id'])) and ($mId == (int) $query['id']))
		{
			unset($query['view']);
			unset($query['catid']);
			unset($query['id']);
			return $segments;
		}

		if (isset($view) and ($view == 'category' or $view == 'contact'))
		{
			if ($mId != (int) $query['id'] || $mView != $view)
			{
				if ($view == 'contact' && isset($query['catid']))
				{
					$catid = $query['catid'];
				}
				elseif (isset($query['id']))
				{
					$catid = $query['id'];
				}

				$menuCatid = $mId;
				$categories = JCategories::getInstance('Contact');
				$category = $categories->get($catid);

				if ($category)
				{
					// TODO Throw error that the category either not exists or is unpublished
					$path = array_reverse($category->getPath());

					$array = array();

					foreach ($path as $id)
					{
						if ((int) $id == (int) $menuCatid)
						{
							break;
						}

						if ($advanced)
						{
							list($tmp, $id) = explode(':', $id, 2);
						}

						$array[] = $id;
					}

					$segments = array_merge($segments, array_reverse($array));
				}

				if ($view == 'contact')
				{
					if ($advanced)
					{
						list($tmp, $id) = explode(':', $query['id'], 2);
					}
					else
					{
						$id = $query['id'];
					}

					$segments[] = $id;
				}
			}

			unset($query['id']);
			unset($query['catid']);
		}

		if (isset($query['layout']))
		{
			if (!empty($query['Itemid']) && isset($menuItem->query['layout']))
			{
				if ($query['layout'] == $menuItem->query['layout'])
				{

					unset($query['layout']);
				}
			}
			else
			{
				if ($query['layout'] == 'default')
				{
					unset($query['layout']);
				}
			}
		}

		$total = count($segments);

		for ($i = 0; $i < $total; $i++)
		{
			$segments[$i] = str_replace(':', '-', $segments[$i]);
		}

		return $segments;
	}

	/**
	 * Parse the segments of a URL.
	 *
	 * @param   array  &$segments  The segments of the URL to parse.
	 *
	 * @return  array  The URL attributes to be used by the application.
	 *
	 * @since   3.3
	 */
	public function parse(&$segments)
	{
		$total = count($segments);
		$vars = array();

		for ($i = 0; $i < $total; $i++)
		{
			$segments[$i] = preg_replace('/-/', ':', $segments[$i], 1);
		}

		// Get the active menu item.
		$item = $this->menu->getActive();
		$params = JComponentHelper::getParams('com_contact');
		$advanced = $params->get('sef_advanced_link', 0);

		// Count route segments
		$count = count($segments);

		// Standard routing for newsfeeds.
		if (!isset($item))
		{
			$vars['view'] = $segments[0];
			$vars['id'] = $segments[$count - 1];
			return $vars;
		}

		// From the categories view, we can only jump to a category.
		$id = (isset($item->query['id']) && $item->query['id'] > 1) ? $item->query['id'] : 'root';

		$contactCategory = JCategories::getInstance('Contact')->get($id);

		$categories = ($contactCategory) ? $contactCategory->getChildren() : array();
		$vars['catid'] = $id;
		$vars['id'] = $id;
		$found = 0;

		foreach ($segments as $segment)
		{
			$segment = $advanced ? str_replace(':', '-', $segment) : $segment;

			foreach ($categories as $category)
			{
				if ($category->slug == $segment || $category->alias == $segment)
				{
					$vars['id'] = $category->id;
					$vars['catid'] = $category->id;
					$vars['view'] = 'category';
					$categories = $category->getChildren();
					$found = 1;
					break;
				}
			}

			if ($found == 0)
			{
				if ($advanced)
				{
					$db = JFactory::getDbo();
					$query = $db->getQuery(true)
						->select($db->quoteName('id'))
						->from('#__contact_details')
						->where($db->quoteName('catid') . ' = ' . (int) $vars['catid'])
						->where($db->quoteName('alias') . ' = ' . $db->quote($segment));
					$db->setQuery($query);
					$nid = $db->loadResult();
				}
				else
				{
					$nid = $segment;
				}

				$vars['id'] = $nid;
				$vars['view'] = 'contact';
			}

			$found = 0;
		}

		return $vars;
	}
}

/**
 * Contact router functions
 *
 * These functions are proxys for the new router interface
 * for old SEF extensions.
 *
 * @param   array  &$query  An array of URL arguments
 *
 * @return  array  The URL arguments to use to assemble the subsequent URL.
 *
 * @deprecated  4.0  Use Class based routers instead
 */
function ContactBuildRoute(&$query)
{
	$router = new ContactRouter;

	return $router->build($query);
}

/**
 * Contact router functions
 *
 * These functions are proxys for the new router interface
 * for old SEF extensions.
 *
 * @param   array  &$segments  The segments of the URL to parse.
 *
 * @return  array  The URL attributes to be used by the application.
 *
 * @deprecated  4.0  Use Class based routers instead
 */
function ContactParseRoute($segments)
{
	$router = new ContactRouter;

	return $router->parse($segments);
}


text:
extern "C" {
    #[ffi_const] //~ ERROR the `#[ffi_const]` attribute is an experimental feature
    pub fn foo();
}

redpajama_set_name: RedPajamaGithub


text:
import datetime
from celery import shared_task
from django.utils import timezone
from .models import Diagnostic

@shared_task
def flush_diagnostics(days_to_keep=30):
    """
    Removes old diagnostics records.
    """
    flush_date = timezone.now()-datetime.timedelta(days_to_keep)
    Diagnostic.objects.filter(timestamp__lte=flush_date).delete()


text:
<?php
namespace WillFarrell\AlfredPkgMan;

require_once('Cache.php');
require_once('Repo.php');

class Pear extends Repo
{
	protected $id         = 'pear';
	protected $url        = 'http://pear.php.net';
	protected $search_url = 'http://pear.php.net/search.php?q=';

	public function search($query)
	{
		if (!$this->hasMinQueryLength($query)) {
			return $this->xml();
		}

		$this->pkgs = $this->cache->get_query_regex(
			$this->id,
			$query,
			"{$this->search_url}{$query}",
			'/<li>([\s\S]*?)<\/li>/i'
		);

		array_shift($this->pkgs); // remove register link

		foreach($this->pkgs as $pkg) {

			// make params
			// name
			preg_match('/<a(.*?)>(.*?)<\/a>/i', $pkg, $matches);
			$title = strip_tags($matches[0]);

			// url
			$details = strip_tags(substr($pkg, strpos($pkg, ":")+2));

			$this->cache->w->result(
				$title,
				$this->makeArg($title, "{$this->url}/package/{$title}"),
				$title,
				$details,
				"icon-cache/{$this->id}.png"
			);

			// only search till max return reached
			if ( count ( $this->cache->w->results() ) == $this->max_return ) {
				break;
			}
		}

		$this->noResults($query, "{$this->search_url}{$query}");

		return $this->xml();
	}
}

// Test code, uncomment to debug this script from the command-line
// $repo = new Pear();
// echo $repo->search('test');


text:
FROM alpine:latest
RUN BUILD_PKGS="py-pip" \
 && apk add --no-cache python py-setuptools $BUILD_PKGS \
 && pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz \
 && apk del --rdepends $BUILD_PKGS


text:
Introduction
============

[![Build Status](https://secure.travis-ci.org/noodlefrenzy/node-sbus-amqp10.svg?branch=master)](https://travis-ci.org/noodlefrenzy/node-sbus-amqp10) [![Dependency Status](https://david-dm.org/noodlefrenzy/node-sbus-amqp10.svg)](https://david-dm.org/noodlefrenzy/node-sbus-amqp10) [![Code Climate](https://codeclimate.com/github/noodlefrenzy/node-sbus-amqp10/badges/gpa.svg)](https://codeclimate.com/github/noodlefrenzy/node-sbus-amqp10) [![Test Coverage](https://codeclimate.com/github/noodlefrenzy/node-sbus-amqp10/badges/coverage.svg)](https://codeclimate.com/github/noodlefrenzy/node-sbus-amqp10)
[![npm version](https://badge.fury.io/js/sbus-amqp10.svg)](http://badge.fury.io/js/sbus-amqp10)

`sbus-amqp10` is a simple adapter you can pass to `sbus` ([GitHub](https://github.com/jmspring/node-sbus) | [NPM](https://www.npmjs.com/package/sbus)) to have it use the `amqp10` ([GitHub](https://github.com/noodlefrenzy/node-amqp10) | [NPM](https://www.npmjs.com/package/amqp10))
module for all AMQP calls.  Since `amqp10`, unlike `node-qpid`, has no native code dependencies it can run on a variety of hardware platforms that are denied to Apache's Qpid Proton.

Usage
=====

This adapter is used internally by the `sbus` module, which it uses itself via the static `EventHubClient` and `ServiceBusClient` methods.
So to e.g. talk to Azure's EventHub, you would simply call `require('sbus-amqp10').EventHubClient()` and it would return a `sbus`
instance suitable for talking AMQP via `amqp10`.  That complicated implementation detail is meant to make it easy for you to use the library,
however, so let's see some code!

To receive messages from all partitions of `myEventHub` in `myServiceBus` *(you can leave off the .servicebus.windows.net - it's assumed)*, and store state in `myTableStore`:

    // Set up variables
    var serviceBus = 'myServiceBus',
        eventHubName = 'myEventHub',
        sasKeyName = ..., // A SAS Key Name for the Event Hub, with Receive privilege
        sasKey = ..., // The key value
        tableStorageName = 'myTableStore',
        tableStorageKey = ..., // The key for the above table store
        consumerGroup = '$Default';

    var Sbus = require('sbus-amqp10');
    var hub = Sbus.EventHubClient(serviceBus, eventHubName, sasKeyName, sasKey);
    hub.getEventProcessor(consumerGroup, function (conn_err, processor) {
      if (conn_err) { ... do something ... } else {
        processor.set_storage(tableStorageName, tableStorageKey);
        processor.init(function (rx_err, partition, payload) {
          if (rx_err) { ... do something ... } else {
            // Process the JSON payload
          }
        }, function (init_err) {
          if (init_err) { ... do something ... } else {
            processor.receive();
          }
        });
      }
    });

For sending messages, it's even easier:

    // Set up variables as above

    var Sbus = require('sbus-amqp10');
    var hub = Sbus.EventHubClient(serviceBus, eventHubName, sasKeyName, sasKey);
    hub.send({ 'myJSON': 'payload' }, 'partitionKey', function(tx_err) { });

Known Issues
============

Please see `amqp10` ([GitHub](https://github.com/noodlefrenzy/node-amqp10) | [NPM](https://www.npmjs.com/package/amqp10)) for open issues with the underlying AMQP library, and
`sbus` ([GitHub](https://github.com/jmspring/node-sbus) | [NPM](https://www.npmjs.com/package/sbus)) for issues with the ServiceBus/EventHub wrapper.  The issues for this adapter
will be managed in its [GitHub issues page](https://github.com/noodlefrenzy/node-sbus-amqp10/issues), but the primary issue at this time is:

* No support for ServiceBus queues and topics

Adapter Details
===============

`sbus` relies on five simple methods to provide AMQP support - two for service bus, two for event hub, one for teardown:

* `send(uri, payload, cb)`
  * The URI should be the full AMQPS address you want to deliver to with included SAS name and key,
    e.g. amqps://sasName:sasKey@sbhost.servicebus.windows.net/myqueue.
  * The payload is a JSON payload (which might get `JSON.stringify`'d), or a string.
  * The callback takes an error, and is called when the message is sent.
* `receive(uri, cb)`
  * The URI should be the full AMQP(S) address you want to receive from, e.g. amqps://sasName:sasKey@sbhost.servicebus.windows.net/mytopic/Subscriptions/mysub.
  * The callback takes an error, a message payload, and any annotations on the message, and is called every time a message
    is received.
* `eventHubSend(uri, payload, [partitionKey], cb)`
  * The URI should be the full AMQPS address of the hub with included SAS name and key,
    e.g. amqps://sasName:sasKey@sbhost.servicebus.windows.net/myeventhub
  * The payload is a JSON payload (which might get `JSON.stringify`'d), or a string.
  * The (optional) partition key is a string that gets set as the partition key for the message (delivered in the
    message annotations).
  * The callback takes an error, and is called when the message is sent.
* `eventHubReceive(uri, [offset], cb)`
  * The URI should be the AMQPS address of the hub with included SAS name and key, consumer group suffix and partition,
    e.g. amqps://sasName:sasKey@sbhost.servicebus.windows.net/myeventhub/ConsumerGroups/_groupname_/Partition/_partition_
  * The (optional) offset should be the string offset provided by the message annotations of received messages, allowing
    connections to pick up receipt from where they left off.
  * The callback takes an error, a partition ID, a message payload, and any annotations on the message, and is called every time a message
    is received.
* `disconnect(cb)`
  * Disconnect from all open links and tear down the connection.

Any class implementing these five methods is duck-type compatible with `sbus` and can be used.


text:
package org.support.project.ormapping.entity;

/**
 * 列定義情報
 *
 * java.sql.DatabaseMetaData#getColumnsの結果を格納するBeanクラスである
 *
 *
 */
public class ColumnDefinition {

	/**
getColumns
public ResultSet getColumns(String catalog,
                            String schemaPattern,
                            String tableNamePattern,
                            String columnNamePattern)
                     throws SQLException指定されたカタログで使用可能なテーブル列の記述を取得します。
カタログ、スキーマ、テーブル名、および列名の条件に一致する列の記述だけが返されます。それらは、TABLE_SCHEM、TABLE_NAME、ORDINAL_POSITION によって順序付けられます。

各列の説明を次にします。

 TABLE_CAT String => テーブルカタログ (null の可能性がある)
 TABLE_SCHEM String => テーブルスキーマ (null の可能性がある)
 TABLE_NAME String => テーブル名
 COLUMN_NAME String => 列名
 DATA_TYPE short => java.sql.Types からの SQL の型
 TYPE_NAME String => データソース依存の型名。UDT の場合、型名は完全指定
 COLUMN_SIZE int => 列サイズ。char や date の型については最大文字数、numeric や decimal の型については精度
BUFFER_LENGTH - 未使用
 DECIMAL_DIGITS int => 小数点以下の桁数
 NUM_PREC_RADIX int => 基数 (通常は、10 または 2 のどちらか)
 NULLABLE int => NULL は許されるか
    columnNoNulls - NULL 値を許さない可能性がある
    columnNullable - 必ず NULL 値を許す
    columnNullableUnknown - NULL 値を許すかどうかは不明
 REMARKS String => コメント記述列 (null の可能性がある)
 COLUMN_DEF String => デフォルト値 (null の可能性がある)
SQL_DATA_TYPE int => 未使用
SQL_DATETIME_SUB int => 未使用
 CHAR_OCTET_LENGTH int => char の型については列の最大バイト数
 ORDINAL_POSITION int => テーブル中の列のインデックス (1 から始まる)
 IS_NULLABLE String => "NO" は、列は決して NULL 値を許さないことを意味する。"YES" は NULL 値を許す可能性があることを意味する。空の文字列は不明であることを意味する
 SCOPE_CATLOG String => 参照属性のスコープであるテーブルのカタログ (DATA_TYPE が REF でない場合は null)
 SCOPE_SCHEMA String => 参照属性のスコープであるテーブルのスキーマ (DATA_TYPE が REF でない場合は null)
 SCOPE_TABLE String => 参照属性のスコープであるテーブル名 (DATA_TYPE が REF でない場合は null)
 SOURCE_DATA_TYPE short => 個別の型またはユーザ生成 Ref 型、java.sql.Types の SQL 型のソースの型 (DATA_TYPE が DISTINCT またはユーザ生成 REF でない場合は null)

パラメータ:
catalog - カタログ名。データベースに格納されたカタログ名と一致しなければならない。"" はカタログなしでカタログ名を検索する。null は、カタログ名を検索の限定に使用してはならないことを意味する
schemaPattern - スキーマ名パターン。データベースに格納されたスキーマ名と一致しなければならない。"" はスキーマなしでスキーマ名を検索する。null は、スキーマ名を検索の限定に使用してはならないことを意味する
tableNamePattern - テーブル名パターン。データベースに格納されたテーブル名と一致しなければならない
columnNamePattern - 列名パターン。データベースに格納された列名と一致しなければならない
戻り値:
ResultSet。各行は列の記述
例外:
SQLException - データベースアクセスエラーが発生した場合
関連項目:
getSearchStringEscape()
	 */

	private String table_cat;
	private String table_schem;
	private String table_name;
	private String column_name;
	private short data_type;
	private String type_name;
	private int column_size;
	private int decimal_digits;
	private int num_prec_radix;
	private int nullable;
	private String remarks;
	private String column_def;
	private int char_octet_length;
	private int ordinal_position;
	private String is_nullable;
	private String is_autoincrement;
	private String scope_catlog;
	private String scope_schema;
	private String scope_table;
	private short source_data_type;

	private boolean primary;
	private int primary_no;

	private int character_maximum_length;

	public boolean isPrimary() {
		return primary;
	}
	public void setPrimary(boolean primary) {
		this.primary = primary;
	}
	public int getPrimary_no() {
		return primary_no;
	}
	public void setPrimary_no(int primary_no) {
		this.primary_no = primary_no;
	}
	/**
	 * char_octet_length を取得します
	 * @return the char_octet_length
	 */
	public int getChar_octet_length() {
		return char_octet_length;
	}
	/**
	 * char_octet_lengthを設定します
	 * @param char_octet_length the char_octet_length to set
	 */
	public void setChar_octet_length(int char_octet_length) {
		this.char_octet_length = char_octet_length;
	}
	/**
	 * column_def を取得します
	 * @return the column_def
	 */
	public String getColumn_def() {
		return column_def;
	}
	/**
	 * column_defを設定します
	 * @param column_def the column_def to set
	 */
	public void setColumn_def(String column_def) {
		this.column_def = column_def;
	}
	/**
	 * column_name を取得します
	 * @return the column_name
	 */
	public String getColumn_name() {
		return column_name;
	}
	/**
	 * column_nameを設定します
	 * @param column_name the column_name to set
	 */
	public void setColumn_name(String column_name) {
		this.column_name = column_name;
	}
	/**
	 * column_size を取得します
	 * @return the column_size
	 */
	public int getColumn_size() {
		return column_size;
	}
	/**
	 * column_sizeを設定します
	 * @param column_size the column_size to set
	 */
	public void setColumn_size(int column_size) {
		this.column_size = column_size;
	}
	/**
	 * data_type を取得します
	 * @return the data_type
	 */
	public short getData_type() {
		return data_type;
	}
	/**
	 * data_typeを設定します
	 * @param data_type the data_type to set
	 */
	public void setData_type(short data_type) {
		this.data_type = data_type;
	}
	/**
	 * decimal_digits を取得します
	 * @return the decimal_digits
	 */
	public int getDecimal_digits() {
		return decimal_digits;
	}
	/**
	 * decimal_digitsを設定します
	 * @param decimal_digits the decimal_digits to set
	 */
	public void setDecimal_digits(int decimal_digits) {
		this.decimal_digits = decimal_digits;
	}
	/**
	 * is_nullable を取得します
	 * @return the is_nullable
	 */
	public String getIs_nullable() {
		return is_nullable;
	}
	/**
	 * is_nullableを設定します
	 * @param is_nullable the is_nullable to set
	 */
	public void setIs_nullable(String is_nullable) {
		this.is_nullable = is_nullable;
	}
	/**
	 * nullable を取得します
	 * @return the nullable
	 */
	public int getNullable() {
		return nullable;
	}
	/**
	 * nullableを設定します
	 * @param nullable the nullable to set
	 */
	public void setNullable(int nullable) {
		this.nullable = nullable;
	}
	/**
	 * num_prec_radix を取得します
	 * @return the num_prec_radix
	 */
	public int getNum_prec_radix() {
		return num_prec_radix;
	}
	/**
	 * num_prec_radixを設定します
	 * @param num_prec_radix the num_prec_radix to set
	 */
	public void setNum_prec_radix(int num_prec_radix) {
		this.num_prec_radix = num_prec_radix;
	}
	/**
	 * ordinal_position を取得します
	 * @return the ordinal_position
	 */
	public int getOrdinal_position() {
		return ordinal_position;
	}
	/**
	 * ordinal_positionを設定します
	 * @param ordinal_position the ordinal_position to set
	 */
	public void setOrdinal_position(int ordinal_position) {
		this.ordinal_position = ordinal_position;
	}
	/**
	 * remarks を取得します
	 * @return the remarks
	 */
	public String getRemarks() {
		return remarks;
	}
	/**
	 * remarksを設定します
	 * @param remarks the remarks to set
	 */
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	/**
	 * scope_catlog を取得します
	 * @return the scope_catlog
	 */
	public String getScope_catlog() {
		return scope_catlog;
	}
	/**
	 * scope_catlogを設定します
	 * @param scope_catlog the scope_catlog to set
	 */
	public void setScope_catlog(String scope_catlog) {
		this.scope_catlog = scope_catlog;
	}
	/**
	 * scope_schema を取得します
	 * @return the scope_schema
	 */
	public String getScope_schema() {
		return scope_schema;
	}
	/**
	 * scope_schemaを設定します
	 * @param scope_schema the scope_schema to set
	 */
	public void setScope_schema(String scope_schema) {
		this.scope_schema = scope_schema;
	}
	/**
	 * scope_table を取得します
	 * @return the scope_table
	 */
	public String getScope_table() {
		return scope_table;
	}
	/**
	 * scope_tableを設定します
	 * @param scope_table the scope_table to set
	 */
	public void setScope_table(String scope_table) {
		this.scope_table = scope_table;
	}
	/**
	 * source_data_type を取得します
	 * @return the source_data_type
	 */
	public short getSource_data_type() {
		return source_data_type;
	}
	/**
	 * source_data_typeを設定します
	 * @param source_data_type the source_data_type to set
	 */
	public void setSource_data_type(short source_data_type) {
		this.source_data_type = source_data_type;
	}
	/**
	 * table_cat を取得します
	 * @return the table_cat
	 */
	public String getTable_cat() {
		return table_cat;
	}
	/**
	 * table_catを設定します
	 * @param table_cat the table_cat to set
	 */
	public void setTable_cat(String table_cat) {
		this.table_cat = table_cat;
	}
	/**
	 * table_name を取得します
	 * @return the table_name
	 */
	public String getTable_name() {
		return table_name;
	}
	/**
	 * table_nameを設定します
	 * @param table_name the table_name to set
	 */
	public void setTable_name(String table_name) {
		this.table_name = table_name;
	}
	/**
	 * table_schem を取得します
	 * @return the table_schem
	 */
	public String getTable_schem() {
		return table_schem;
	}
	/**
	 * table_schemを設定します
	 * @param table_schem the table_schem to set
	 */
	public void setTable_schem(String table_schem) {
		this.table_schem = table_schem;
	}
	/**
	 * type_name を取得します
	 * @return the type_name
	 */
	public String getType_name() {
		return type_name;
	}
	/**
	 * type_nameを設定します
	 * @param type_name the type_name to set
	 */
	public void setType_name(String type_name) {
		this.type_name = type_name;
	}

	/**
	 * @return is_autoincrement
	 */
	public String getIs_autoincrement() {
		return is_autoincrement;
	}
	/**
	 * @param is_autoincrement セットする is_autoincrement
	 */
	public void setIs_autoincrement(String is_autoincrement) {
		this.is_autoincrement = is_autoincrement;
	}

	public int getCharacter_maximum_length() {
		return character_maximum_length;
	}
	public void setCharacter_maximum_length(int character_maximum_length) {
		this.character_maximum_length = character_maximum_length;
	}

	@Override
	public String toString() {
		return "ColumnDefinition [table_cat=" + table_cat + ", table_schem=" + table_schem + ", table_name=" + table_name + ", column_name="
				+ column_name + ", data_type=" + data_type + ", type_name=" + type_name + ", column_size=" + column_size + ", decimal_digits="
				+ decimal_digits + ", num_prec_radix=" + num_prec_radix + ", nullable=" + nullable + ", remarks=" + remarks + ", column_def="
				+ column_def + ", char_octet_length=" + char_octet_length + ", ordinal_position=" + ordinal_position + ", is_nullable=" + is_nullable
				+ ", scope_catlog=" + scope_catlog + ", scope_schema=" + scope_schema + ", scope_table=" + scope_table + ", source_data_type="
				+ source_data_type + ", is_autoincrement=" + is_autoincrement + ", character_maximum_length=" + character_maximum_length + "]";
	}

}


text:
import ConfigParser

def get_config(section):
    config = ConfigParser.RawConfigParser()
    config.read('./config.txt')
    options = config.options(section)
    dict = {}
    for option in options:
        try:
            dict[option] = config.get(section, option)
            if dict[option] == -1:
                print "skip: %s" % option
        except:
            print("exception on %s!" % option)
            dict[option] = None
    return dict


text:
package org.openapitools.model;

import java.util.Objects;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.HudsonMasterComputer;
import javax.validation.constraints.*;
import io.swagger.annotations.*;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen", date = "2022-06-04T08:09:08.274195Z[Etc/UTC]")
public class ComputerSet   {

  private String propertyClass;
  private Integer busyExecutors;
  private List<HudsonMasterComputer> computer = new ArrayList<>();
  private String displayName;
  private Integer totalExecutors;

  /**
   **/

  @ApiModelProperty(value = "")
  @JsonProperty("_class")
  public String getPropertyClass() {
    return propertyClass;
  }
  public void setPropertyClass(String propertyClass) {
    this.propertyClass = propertyClass;
  }

  /**
   **/

  @ApiModelProperty(value = "")
  @JsonProperty("busyExecutors")
  public Integer getBusyExecutors() {
    return busyExecutors;
  }
  public void setBusyExecutors(Integer busyExecutors) {
    this.busyExecutors = busyExecutors;
  }

  /**
   **/

  @ApiModelProperty(value = "")
  @JsonProperty("computer")
  public List<HudsonMasterComputer> getComputer() {
    return computer;
  }
  public void setComputer(List<HudsonMasterComputer> computer) {
    this.computer = computer;
  }

  /**
   **/

  @ApiModelProperty(value = "")
  @JsonProperty("displayName")
  public String getDisplayName() {
    return displayName;
  }
  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }

  /**
   **/

  @ApiModelProperty(value = "")
  @JsonProperty("totalExecutors")
  public Integer getTotalExecutors() {
    return totalExecutors;
  }
  public void setTotalExecutors(Integer totalExecutors) {
    this.totalExecutors = totalExecutors;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ComputerSet computerSet = (ComputerSet) o;
    return Objects.equals(propertyClass, computerSet.propertyClass) &&
        Objects.equals(busyExecutors, computerSet.busyExecutors) &&
        Objects.equals(computer, computerSet.computer) &&
        Objects.equals(displayName, computerSet.displayName) &&
        Objects.equals(totalExecutors, computerSet.totalExecutors);
  }

  @Override
  public int hashCode() {
    return Objects.hash(propertyClass, busyExecutors, computer, displayName, totalExecutors);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ComputerSet {\n");

    sb.append("    propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
    sb.append("    busyExecutors: ").append(toIndentedString(busyExecutors)).append("\n");
    sb.append("    computer: ").append(toIndentedString(computer)).append("\n");
    sb.append("    displayName: ").append(toIndentedString(displayName)).append("\n");
    sb.append("    totalExecutors: ").append(toIndentedString(totalExecutors)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}


text:
RETCODE=$(fw_exists $IROOT/mono.installed)
[ ! "$RETCODE" == 0 ] || { \
  # Load environment variables
  source $IROOT/mono.installed
  return 0; }

# what do we want? latest mono
# how do we want it? already compiled from packages but without sudo apt-get
# See https://github.com/TechEmpower/FrameworkBenchmarks/pull/1287

# Add source for prepackaged binaries
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://jenkins.mono-project.com/repo/debian sid main" | sudo tee /etc/apt/sources.list.d/mono-jenkins.list
sudo apt-get update

# Find the most recent snapshot
#SNAPSHOT=$(apt-cache search 'mono-snapshot-.*-assemblies' | cut -d'-' -f3 | tail -1)
SNAPSHOT="20150202010831"

# save environment

MONO_HOME=$IROOT/mono-snapshot-$SNAPSHOT
echo "export SNAPSHOT=$SNAPSHOT" > $IROOT/mono.installing
echo "export MONO_HOME=$MONO_HOME" >> $IROOT/mono.installing
echo "export MONO_PATH=$MONO_HOME/lib/mono/4.5" >> $IROOT/mono.installing
echo "export MONO_CFG_DIR=$MONO_HOME/etc" >> $IROOT/mono.installing
echo -e "export PATH=$MONO_HOME/bin:\$PATH" >> $IROOT/mono.installing
echo -e "export LD_LIBRARY_PATH=$MONO_HOME/lib:\$LD_LIBRARY_PATH" >> $IROOT/mono.installing
echo -e "export PKG_CONFIG_PATH=$MONO_HOME/lib/pkgconfig:\$PKG_CONFIG_PATH" >> $IROOT/mono.installing

# load environment
source $IROOT/mono.installing

# start fresh
rm -rf $MONO_HOME && mkdir -p $MONO_HOME

# Download and extract debs
fw_apt_to_iroot mono-snapshot-$SNAPSHOT
fw_apt_to_iroot mono-snapshot-$SNAPSHOT-assemblies mono-snapshot-$SNAPSHOT

# Simplify paths
mv $MONO_HOME/opt/mono-*/* $MONO_HOME
file $MONO_HOME/bin/* | grep "POSIX shell script" | awk -F: '{print $1}' | xargs sed -i "s|/opt/mono-$SNAPSHOT|$MONO_HOME|g"
sed -i "s|/opt/mono-$SNAPSHOT|$MONO_HOME|g" $MONO_HOME/lib/pkgconfig/*.pc $MONO_HOME/etc/mono/config

echo "mozroots --import --sync" >> $IROOT/mono.installing

mv $IROOT/mono.installing $IROOT/mono.installed

source $IROOT/mono.installed


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

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>amCharts examples</title>
        <link rel="stylesheet" href="style.css" type="text/css">


text:
// [!HeaderName] : Declaration of the [!ClassName]
[!crlf]
[!if=(FileExists, "FALSE")]
#ifndef __[!UpperShortName]_H_
#define __[!UpperShortName]_H_
[!crlf]
#include "resource.h"       // main symbols
#include "[!AcDbHeaderName]"
#include "axtempl.h"
[!else]
[!AddIncludeFile(TargetFile, "resource.h")]
[!AddIncludeFile(TargetFile, AcDbHeaderName)]
[!AddIncludeFile(TargetFile, "axtempl.h")]
[!endif]

[!crlf]
/////////////////////////////////////////////////////////////////////////////
// [!ClassName]

class ATL_NO_VTABLE [!ClassName] :
[!if=(ThreadingModel, "Single")]
	public CComObjectRootEx<CComSingleThreadModel>,
[!endif]
[!if=(ThreadingModel, "Apartment")]
	public CComObjectRootEx<CComSingleThreadModel>,
[!endif]
	public CComCoClass<[!ClassName], &CLSID_[!CoClassName]>,
	public ISupportErrorInfo,
[!if=(DerivedFrom,"AcDbEntity")]
    public IAcadEntityDispatchImpl<[!ClassName],&CLSID_[!CoClassName], [!InterfaceName], &IID_[!InterfaceName], &LIBID_[!LibName]>
[!else]
    public IAcadObjectDispatchImpl<[!ClassName],&CLSID_[!CoClassName],  [!InterfaceName], &IID_[!InterfaceName], &LIBID_[!LibName]>
[!endif]
[!if=(OpmPropExtImpl,"TRUE")]
    ,public IOPMPropertyExtensionImpl<[!ClassName]>
[!endif]
[!if=(OpmPropExpander,"TRUE")]
    ,public IOPMPropertyExpander
[!endif]
{
public:
	[!ClassName]()
	{
	}

[!crlf]
DECLARE_REGISTRY_RESOURCEID([!IDR_REGISTRYID])
[!if=(Aggregatable, "NO")]
DECLARE_NOT_AGGREGATABLE([!ClassName])
[!endif]
[!crlf]
DECLARE_PROTECT_FINAL_CONSTRUCT()

[!crlf]
BEGIN_COM_MAP([!ClassName])
	COM_INTERFACE_ENTRY([!InterfaceName])
	COM_INTERFACE_ENTRY(IDispatch)
[!if=(ErrorInfoEnabled, "TRUE")]
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
[!endif]
	COM_INTERFACE_ENTRY(IConnectionPointContainer)
    COM_INTERFACE_ENTRY(IAcadBaseObject)
	COM_INTERFACE_ENTRY(IAcadObject)
[!if=(DerivedFrom,"AcDbEntity")]
	COM_INTERFACE_ENTRY(IAcadEntity)
[!endif]
    COM_INTERFACE_ENTRY(IRetrieveApplication)
[!if=(OpmPropExtImpl,"TRUE")]
    COM_INTERFACE_ENTRY(IOPMPropertyExtension)
    COM_INTERFACE_ENTRY(ICategorizeProperties)
    COM_INTERFACE_ENTRY(IPerPropertyBrowsing)
[!endif]
[!if=(OpmPropExpander,"TRUE")]
    COM_INTERFACE_ENTRY(IOPMPropertyExpander)
[!endif]
END_COM_MAP()
[!crlf]

[!if=(ConnectionPointsEnabled, "TRUE")]
BEGIN_CONNECTION_POINT_MAP([!ClassName])
[!if=(IPROPERTYNOTIFYSINK, "TRUE")]
	CONNECTION_POINT_ENTRY(IID_IPropertyNotifySink)
[!endif]
END_CONNECTION_POINT_MAP()
[!crlf]
[!endif]

[!if=(ErrorInfoEnabled, "TRUE")]
[!crlf]
// ISupportsErrorInfo
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
[!endif]
// IAcadBaseObjectImpl
    virtual HRESULT CreateNewObject(AcDbObjectId& objId, AcDbObjectId& ownerId, TCHAR* keyName);
    virtual HINSTANCE GetResourceInstance()
    {
        return _Module.GetResourceInstance();
    }
[!if=(OpmPropExtImpl,"TRUE")]

// IOPMPropertyExtension
BEGIN_OPMPROP_MAP()
//TO DO: Use the OPMPROP_ENTRY macro for each of your properties
END_OPMPROP_MAP()
[!endif]
[!if=(OpmPropExpander,"TRUE")]

    //IOPMPropertyExpander
	STDMETHOD(GetElementValue)(
		/* [in] */ DISPID dispID,
		/* [in] */ DWORD dwCookie,
		/* [out] */ VARIANT * pVarOut) ;

    //IOPMPropertyExpander
	STDMETHOD(SetElementValue)(
		/* [in] */ DISPID dispID,
		/* [in] */ DWORD dwCookie,
		/* [in] */ VARIANT VarIn) ;

    //IOPMPropertyExpander
	STDMETHOD(GetElementStrings)(
		/* [in] */ DISPID dispID,
		/* [out] */ OPMLPOLESTR __RPC_FAR *pCaStringsOut,
		/* [out] */ OPMDWORD __RPC_FAR *pCaCookiesOut) ;

    //IOPMPropertyExpander
    STDMETHOD(GetElementGrouping)(
        /* [in] */ DISPID dispID,
		/* [out] */ short *groupingNumber) ;

    //IOPMPropertyExpander
    STDMETHOD(GetGroupCount)(
        /* [in] */ DISPID dispID,
		/* [out] */ long *nGroupCnt) ;
[!endif]
// [!InterfaceName]
public:

};

[!crlf]
[!if=(FileExists, "FALSE")]
#endif //__[!UpperShortName]_H_
[!endif]


text:
var _ = require('underscore');
var AuthzAPI = require('oae-authz');
var ContentConstants = require('oae-content/lib/constants').ContentConstants;
var OaeUtil = require('oae-util/lib/util');
var Telemetry = require('oae-telemetry').telemetry('search-general');
var TenantsUtil = require('oae-tenants/lib/util');

var SearchConstants = require('oae-search/lib/constants').SearchConstants;
var SearchUtil = require('oae-search/lib/util');

var RESOURCE_TYPES_ACCESS_SCOPED = [SearchConstants.general.RESOURCE_TYPE_ALL,
        SearchConstants.general.RESOURCE_TYPE_CONTENT, SearchConstants.general.RESOURCE_TYPE_GROUP];

/**
 * General search that searches a 'general' analyzed field on content, scoping it by user access.
 *
 * In addition to the specific `opts` parameters documented here, there are more generic options available that impact all
 * searches. @see SearchAPI#search for more information.
 *
 * @param  {Context}       ctx                     The context of the current request
 * @param  {Object}        [opts]                  General search options
 * @param  {String[]}      [opts.resourceTypes]    An array of resource types to search (e.g., content, user). If not specified, then the search will not filter on resource type at all. Possible resource types are those that have registered producers in SearchAPI#registerSearchDocumentProducer.
 * @param  {String}        [opts.includeExternal]  Whether or not to include content from other tenants ('true' or 'false') (Default: 'false')
 * @param  {String}        [opts.includeIndirect]  Whether or not to include private resources that the user has access to indirectly (Default: 'true');
 * @param  {Function}      callback                Invoked when the process completes
 * @param  {Object}        callback.err            An error that occurred, if any
 * @param  {SearchResult}  callback.results        An object that represents the results of the query
 */
module.exports = function(ctx, opts, callback) {
    // Sanitize custom search options
    opts = opts || {};
    opts.resourceTypes = opts.resourceTypes || [];
    opts.includeExternal = (opts.includeExternal === 'true');
    opts.includeIndirect = (opts.includeIndirect !== 'false');
    opts.limit = OaeUtil.getNumberParam(opts.limit, 10, 1, 25);

    // Sanitize the resourceTypes array
    if (!_.isArray(opts.resourceTypes)) {
        // Convert to an array if it's a single value
        opts.resourceTypes = [opts.resourceTypes];
    }

    // Remove any falsy values from the array
    opts.resourceTypes = _.compact(opts.resourceTypes);

    // If there were no valid values for resource type, we search everything
    opts.searchAll = (opts.resourceTypes.length === 0);

    // opts.q is required to determine _needsFilterByAccess
    opts.q = SearchUtil.getQueryParam(opts.q);

    var needsFilterByAccess = _needsFilterByAccess(ctx, opts);
    if (needsFilterByAccess && opts.includeIndirect) {
        // We'll need to know the group membership of this user to scope by resources they have access to directly or indirectly
        AuthzAPI.getPrincipalMemberships(ctx.user().id, null, 10000, function(err, groups) {
            if (err) {
                return callback(err);
            }

            // Bind the access array to the search options
            var access = groups || [];
            access.push(ctx.user().id);
            opts.access = access;

            _search(ctx, opts, callback);
        });
    } else if (needsFilterByAccess && !opts.includeIndirect) {
        // If we're not including indirect resources, only filter by direct user access
        opts.access = [ctx.user().id];
        _search(ctx, opts, callback);
    } else {
        _search(ctx, opts, callback);
    }
};

/**
 * Perform the search that searches a 'q' analyzed field on documents, scoping it by user access. This is delegated from the
 * `module.exports` function for convenience, as it will access the members array only if necessary.
 *
 * @param  {Context}       ctx                 The context of the current request
 * @param  {Object}        opts                General search options
 * @param  {Function}      callback            Invoked when the process completes
 * @param  {Object}        callback.err        An error that occurred, if any
 * @param  {SearchResult}  callback.results    An object that represents the results of the query
 */
var _search = function(ctx, opts, callback) {
    var data = {};

    // The query object for the Query DSL
    var query = SearchUtil.createQueryStringQuery(opts.q);

    // The filter object for the Query DSL
    var filter = null;
    var typeFilter = SearchUtil.filterTerm('_type', SearchConstants.resourceMappingName);

    // The resource type filter will filter by a particular document type (e.g., content, user, group)
    var resourceTypeFilter = (!opts.searchAll) ? SearchUtil.filterTerms('resourceType', opts.resourceTypes) : null;

    // The access filter will filter by the user's group membership, or the whole tenant if it is tenant admin
    var accessFilter = (ctx.user() && ctx.user().isTenantAdmin(ctx.tenant().alias)) ?
            SearchUtil.filterTerm('tenantAlias', ctx.tenant().alias) : SearchUtil.filterMembers(opts.access);

    // This base filter gets applied to the query unconditionally.
    var baseFilter = SearchUtil.filterAnd(typeFilter, resourceTypeFilter);

    // If external resources should be included, we need to know the tenants with which the current
    // tenant can interact, so we can properly filter out resources from non-permeable tenants
    // and private and loggedin resources from permeable tenants
    var interactingTenantAliases = TenantsUtil.getAllTenantsForInteraction(ctx.tenant().alias);

    if (ctx.user() && ctx.user().isGlobalAdmin()) {
        // If user is global admin, forget filtering by members and visibility, just query *everything*
        filter = baseFilter;
    } else if (ctx.user()) {
        // The user is authenticated

        filter = SearchUtil.filterAnd(
            baseFilter,
            SearchUtil.filterOr(

                // I can always see content that I have explicit access to, even if it belongs to another tenant and I haven't specified `includeExternal`
                accessFilter,

                SearchUtil.filterAnd(

                    // I will only get resources from my own tenant if I have not specified to include external
                    (!opts.includeExternal) ? SearchUtil.filterTerm('tenantAlias', ctx.tenant().alias) : null,

                    // This or statement applies visibility restrictions
                    SearchUtil.filterOr(

                        // Public resources from the current tenant should always be included. If external results should be included, resources from
                        // other permeable tenants should be included as well
                        SearchUtil.filterAnd(
                            SearchUtil.filterTerm('visibility', 'public'),
                            SearchUtil.filterOr(
                                SearchUtil.filterTerm('tenantAlias', ctx.tenant().alias),
                                (opts.includeExternal && interactingTenantAliases.length > 0) ? SearchUtil.filterTerms('tenantAlias', interactingTenantAliases) : null
                            )
                        ),

                        // I can see all joinable resources from my own tenant
                        // I can see joinable resources from other tenants that I can interact with (if any) if I have specified to view external resources
                        SearchUtil.filterAnd(
                            SearchUtil.filterOr(
                                SearchUtil.filterTerm('tenantAlias', ctx.tenant().alias),
                                (opts.includeExternal && interactingTenantAliases.length > 0) ? SearchUtil.filterTerms('tenantAlias', interactingTenantAliases) : null
                            ),
                            SearchUtil.filterTerm('resourceType', 'group'),
                            SearchUtil.filterTerms('joinable', ['yes', 'request'])
                        ),

                        // Logged in resources from the current tenant should also be included
                        SearchUtil.filterAnd(
                            SearchUtil.filterTerm('tenantAlias', ctx.tenant().alias),
                            SearchUtil.filterTerm('visibility', 'loggedin')
                        )
                    )
                )
            )
        );
    } else {
        // For anonymous users, only show public resources
        filter = SearchUtil.filterAnd(
            baseFilter,

            // Limit to the current tenant unless specified otherwise
            (!opts.includeExternal) ? SearchUtil.filterTerm('tenantAlias', ctx.tenant().alias) : null,

            // Public resources from the current tenant and other permeable tenants should be included
            SearchUtil.filterAnd(
                SearchUtil.filterTerm('visibility', 'public'),
                SearchUtil.filterOr(
                    SearchUtil.filterTerm('tenantAlias', ctx.tenant().alias),
                    (opts.includeExternal && interactingTenantAliases.length > 0) ? SearchUtil.filterTerms('tenantAlias', interactingTenantAliases) : null
                )
            )
        );
    }

    // wrap the query and filter into the top-level Query DSL "query" object
    return callback(null, SearchUtil.createQuery(query, filter, opts));
};

/**
 * Determines whether or not the search needs to be scoped by the user's access privileges. This is true when:
 *
 *  * The user is authenticated; and
 *  * The user is not a global administrator; and
 *  * The search includes content and groups (users are not filtered by access); and
 *  * The search is actually specifying a query (e.g., if the search is '*', then we only include content that is public / loggedin)
 *
 * @param  {Context}   ctx         The context of the current request performing the search
 * @param  {Object}    opts        The (sanitized) search options
 * @return {Boolean}               Whether or not the query specified by this user and options requires filtering by access privileges
 * @api private
 */
var _needsFilterByAccess = function(ctx, opts) {
    var isAuthenticated = (ctx.user()) ? true : false;
    var isNotGlobalAdmin = (!isAuthenticated || !ctx.user().isGlobalAdmin());
    var includesContentOrGroups = (opts.searchAll || _.intersection(RESOURCE_TYPES_ACCESS_SCOPED, opts.resourceTypes).length > 0);
    var hasTextQuery = (opts.q !== SearchConstants.query.ALL);
    return isAuthenticated && isNotGlobalAdmin && includesContentOrGroups && hasTextQuery;
};


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

<meta http-equiv="content-type" content="text/html;charset=UTF-8" />

<title>  What’s the best test for Acid3? - The Web Standards Project</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="The Web Standards Project is a grassroots coalition fighting for standards which ensure simple, affordable access to web technologies for all." />
<meta name="MSSmartTagsPreventParsing" content="true" />

<link rel="stylesheet" type="text/css" media="screen, projection" href="/wp/wp-content/themes/web-standards-project/styles.css" />
<link rel="stylesheet" type="text/css" media="print" href="/wp/wp-content/themes/web-standards-project/print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/feed/index.html" />
<link rel="alternate" type="text/xml" title="RSS .92" href="/feed/rss/index.html" />
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="/feed/atom/index.html" />
<link rel="pingback" href="/wp/xmlrpc.php" />
<link rel="Shortcut Icon" type="image/ico" href="/files/theme/wasp.ico" />
<link rel="home" title="Web Standards Project Home" href="/index.html" />
	<link rel='archives' title='March 2013' href='/2013/03/index.html' />
	<link rel='archives' title='February 2012' href='/2012/02/index.html' />
	<link rel='archives' title='December 2011' href='/2011/12/index.html' />
	<link rel='archives' title='November 2011' href='/2011/11/index.html' />
	<link rel='archives' title='March 2011' href='/2011/03/index.html' />
	<link rel='archives' title='February 2011' href='/2011/02/index.html' />
	<link rel='archives' title='January 2011' href='/2011/01/index.html' />
	<link rel='archives' title='August 2010' href='/2010/08/index.html' />
	<link rel='archives' title='June 2010' href='/2010/06/index.html' />
	<link rel='archives' title='March 2010' href='/2010/03/index.html' />
	<link rel='archives' title='February 2010' href='/2010/02/index.html' />
	<link rel='archives' title='January 2010' href='/2010/01/index.html' />
	<link rel='archives' title='November 2009' href='/2009/11/index.html' />
	<link rel='archives' title='June 2009' href='/2009/06/index.html' />
	<link rel='archives' title='May 2009' href='/2009/05/index.html' />
	<link rel='archives' title='April 2009' href='/2009/04/index.html' />
	<link rel='archives' title='March 2009' href='/2009/03/index.html' />
	<link rel='archives' title='February 2009' href='/2009/02/index.html' />
	<link rel='archives' title='January 2009' href='/2009/01/index.html' />
	<link rel='archives' title='December 2008' href='../../../12/index.html' />
	<link rel='archives' title='November 2008' href='../../../11/index.html' />
	<link rel='archives' title='October 2008' href='../../../10/index.html' />
	<link rel='archives' title='September 2008' href='../../../09/index.html' />
	<link rel='archives' title='August 2008' href='../../../08/index.html' />
	<link rel='archives' title='July 2008' href='../../../07/index.html' />
	<link rel='archives' title='June 2008' href='../../../06/index.html' />
	<link rel='archives' title='May 2008' href='../../../05/index.html' />
	<link rel='archives' title='April 2008' href='../../../04/index.html' />
	<link rel='archives' title='March 2008' href='../../../03/index.html' />
	<link rel='archives' title='February 2008' href='../../../02/index.html' />
	<link rel='archives' title='January 2008' href='../../index.html' />
	<link rel='archives' title='December 2007' href='/2007/12/index.html' />
	<link rel='archives' title='November 2007' href='/2007/11/index.html' />
	<link rel='archives' title='October 2007' href='/2007/10/index.html' />
	<link rel='archives' title='September 2007' href='/2007/09/index.html' />
	<link rel='archives' title='August 2007' href='/2007/08/index.html' />
	<link rel='archives' title='June 2007' href='/2007/06/index.html' />
	<link rel='archives' title='May 2007' href='/2007/05/index.html' />
	<link rel='archives' title='April 2007' href='/2007/04/index.html' />
	<link rel='archives' title='March 2007' href='/2007/03/index.html' />
	<link rel='archives' title='February 2007' href='/2007/02/index.html' />
	<link rel='archives' title='January 2007' href='/2007/01/index.html' />
	<link rel='archives' title='December 2006' href='/2006/12/index.html' />
	<link rel='archives' title='November 2006' href='/2006/11/index.html' />
	<link rel='archives' title='October 2006' href='/2006/10/index.html' />
	<link rel='archives' title='September 2006' href='/2006/09/index.html' />
	<link rel='archives' title='August 2006' href='/2006/08/index.html' />
	<link rel='archives' title='July 2006' href='/2006/07/index.html' />
	<link rel='archives' title='June 2006' href='/2006/06/index.html' />
	<link rel='archives' title='May 2006' href='/2006/05/index.html' />
	<link rel='archives' title='April 2006' href='/2006/04/index.html' />
	<link rel='archives' title='March 2006' href='/2006/03/index.html' />
	<link rel='archives' title='February 2006' href='/2006/02/index.html' />
	<link rel='archives' title='January 2006' href='/2006/01/index.html' />
	<link rel='archives' title='December 2005' href='/2005/12/index.html' />
	<link rel='archives' title='November 2005' href='/2005/11/index.html' />
	<link rel='archives' title='October 2005' href='/2005/10/index.html' />
	<link rel='archives' title='September 2005' href='/2005/09/index.html' />
	<link rel='archives' title='August 2005' href='/2005/08/index.html' />
	<link rel='archives' title='July 2005' href='/2005/07/index.html' />
	<link rel='archives' title='June 2005' href='/2005/06/index.html' />
	<link rel='archives' title='May 2005' href='/2005/05/index.html' />
	<link rel='archives' title='April 2005' href='/2005/04/index.html' />
	<link rel='archives' title='March 2005' href='/2005/03/index.html' />
	<link rel='archives' title='February 2005' href='/2005/02/index.html' />
	<link rel='archives' title='January 2005' href='/2005/01/index.html' />
	<link rel='archives' title='December 2004' href='/2004/12/index.html' />
	<link rel='archives' title='November 2004' href='/2004/11/index.html' />
	<link rel='archives' title='October 2004' href='/2004/10/index.html' />
	<link rel='archives' title='September 2004' href='/2004/09/index.html' />
	<link rel='archives' title='August 2004' href='/2004/08/index.html' />
	<link rel='archives' title='July 2004' href='/2004/07/index.html' />
	<link rel='archives' title='June 2004' href='/2004/06/index.html' />
	<link rel='archives' title='May 2004' href='/2004/05/index.html' />
	<link rel='archives' title='April 2004' href='/2004/04/index.html' />
	<link rel='archives' title='March 2004' href='/2004/03/index.html' />
	<link rel='archives' title='February 2004' href='/2004/02/index.html' />
	<link rel='archives' title='January 2004' href='/2004/01/index.html' />
	<link rel='archives' title='December 2003' href='/2003/12/index.html' />
	<link rel='archives' title='November 2003' href='/2003/11/index.html' />
	<link rel='archives' title='October 2003' href='/2003/10/index.html' />
	<link rel='archives' title='September 2003' href='/2003/09/index.html' />
	<link rel='archives' title='August 2003' href='/2003/08/index.html' />
	<link rel='archives' title='July 2003' href='/2003/07/index.html' />
	<link rel='archives' title='June 2003' href='/2003/06/index.html' />
	<link rel='archives' title='May 2003' href='/2003/05/index.html' />
	<link rel='archives' title='April 2003' href='/2003/04/index.html' />
	<link rel='archives' title='March 2003' href='/2003/03/index.html' />
	<link rel='archives' title='February 2003' href='/2003/02/index.html' />
	<link rel='archives' title='January 2003' href='/2003/01/index.html' />
	<link rel='archives' title='December 2002' href='/2002/12/index.html' />
	<link rel='archives' title='November 2002' href='/2002/11/index.html' />
	<link rel='archives' title='October 2002' href='/2002/10/index.html' />
	<link rel='archives' title='September 2002' href='/2002/09/index.html' />
	<link rel='archives' title='August 2002' href='/2002/08/index.html' />
	<link rel='archives' title='July 2002' href='/2002/07/index.html' />
	<link rel='archives' title='June 2002' href='/2002/06/index.html' />
	<link rel='archives' title='April 2002' href='/2002/04/index.html' />
	<link rel='archives' title='March 2002' href='/2002/03/index.html' />
	<link rel='archives' title='December 2001' href='/2001/12/index.html' />
	<link rel='archives' title='September 2001' href='/2001/09/index.html' />
	<link rel='archives' title='November 2000' href='/2000/11/index.html' />
	<link rel='archives' title='July 2000' href='/2000/07/index.html' />
	<link rel='archives' title='April 2000' href='/2000/04/index.html' />
	<link rel='archives' title='March 1999' href='/1999/03/index.html' />
	<link rel='archives' title='October 1998' href='/1998/10/index.html' />
	<link rel='archives' title='August 1998' href='/1998/08/index.html' />
<link rel="alternate" type="application/rss+xml" title="The Web Standards Project » What’s the best test for Acid3? Comments Feed" href="feed/index.html" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="/wp/xmlrpc0db0.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="/wp/wp-includes/wlwmanifest.xml" />
<link rel='prev' title='Farewell Netscape' href='/2007/12/28/farewell-netscape/index.html' />
<link rel='next' title='Tell the CSS WG what you want from CSS3' href='../../18/tell-the-css-wg-what-you-want-from-css3/index.html' />
<meta name="generator" content="WordPress 3.3.1" />
<link rel='canonical' href='index.html' />
<link rel='shortlink' href='../../../../index8973.html?p=1059' />

Working together for standards  The Web Standards Project

		Skip to content

				<form id="fm-search" method="get" action="http://www.webstandards.org/index.php">
			<fieldset>
				<legend>Search</legend>
				Search WaSP
				<input id="s" name="s" class="search" value="" />
				<input type="submit" class="submit" name="submit" value="Go!" />
			</fieldset>
		</form>

Home

About

Learn

Action

Buzz

Press

What’s the best test for Acid3?

By Kimberly Blessing | January 16th, 2008 | Filed in Acid2, Acid3, Browsers, Web Standards (general)

Now that all the major browsers (and many minor ones) have pledged support for Acid2, Ian Hickson has moved on to preparing Acid3 — and you can help!

				Skip to comment form

Perhaps you expected this announcement, given the news that IE8 passes Acid2. Or maybe it already seems like old news, if you caught the recent Slashdot post. In either case, the news is true — Acid3 will be coming soon!

Whereas Acid2 tested static HTML and CSS, Acid3 will focus on ECMAScript and DOM — the dynamic side of the Web. While it will include a few rendering tests to make things look interesting, the core of the test will be 100 scripting subtests.

And that is where you can contribute! Ian has compiled 84 of the 100 scripts but is seeking 16 additional tests. If you’re up to the challenge, read the criteria, create your test, and submit it — within the next five days!

As with Acid2, the Web Standards Project will play host to Acid3… so stay tuned for the final test, and the play-by-play on the browsers’ progress!

Your Replies

#1 On January 16th, 2008 7:19 am Vectorpedia (Rick) replied:

I applaud Ian for taking on the completion of the Acid3 project. I’m looking forward to seeing the final results – and the competitive heat that’s been applied to CSS-spec implementors being applied to ECMAScript implementors. This new test will put more pressure on the browsers to attempt to adhere to further standards with JavaScript. Hopefully they will all pass it soon with their push towards adopting web standards as they are written.

#2 On January 16th, 2008 7:25 am Leyton Jay replied:

I can’t wait to Acid3, it will be very interesting.

Its a shame that Acid2 does not yet work in more browsers though. I had heard that Firefox 3 beta and IE 8 beta have passed it – not sure if I truly believe that though. Maybe on a programmers desk it works in theory, but it’s not official in my mind until it works on every PC with every version of Windows at every screen res.

#3 On January 16th, 2008 7:53 am bruce replied:

It’s still not completely certain whether IE8 passes Acid 2 yet; although it does an excellent job of rendering the smiley face, the test requires that “you should use the default settings of the browser”.

#4 On January 16th, 2008 9:44 am The Web Standards Project prepara el Acid3 : Planeta Reixa replied:

[...] La nueva versión del test de compatibilidad con los estándares de los navegadores, se centrará en ECMAScript y DOM. Tienen listos 84 de los 100 tests que usará, pero piden ayuda para los 16 restantes. [...]

#5 On January 16th, 2008 11:40 am Gérard Talbot replied:

Bruce,

My guess is that IE8 (in its alpha and – eventually in its final releases) passes acid2 test but only with a special -tag which will trigger IE8 into pure/full or complete standards compliant rendering mode. Something like

or

or

or

or …

In which case that would mean that IE8 does not pass acid2 test without such

Regards,

Gérard

#6 On January 16th, 2008 11:41 am Gérard Talbot replied:

Bruce,

My guess is that IE8 (in its alpha and – eventually in its final releases) passes acid2 test but only with a special <meta>-tag which will trigger IE8 into pure/full or complete standards compliant rendering mode. Something like

<meta name=”full-standards-mode” content=”true”>

or

<meta name=”full-standards-mode” content=”yes”>

or

<meta name=”standards-mode” content=”full”>

or

<meta name=”rendering-mode” content=”web-standards”>

or …

In which case that would mean that IE8 does not pass acid2 test without such

Regards,

Gérard

#7 On January 16th, 2008 3:36 pm Rick replied:

@leyton

You can test Firefox beta2 yourself and see that it does pass the Acid2 test.  It is available for download.  I did, tried it, removed it, and got my firefox 2 back with no problems, no data loss.

As for IE8,  I won’t believe anyone from the evil empire.  Let me try it myself.  Which will never happen.

@gerard

IE already has the hack you’re looking for.  Remember doctype switching??

#8 On January 16th, 2008 6:52 pm Gérard Talbot replied:

@Rick,

I do not trust Microsoft a lot either; I, too, want to be able to test this myself.

Just about a couple of days ago, a well known web developer testing IE7 told me that he had doubts about IE8 fixing all the bugs in IE7 because there were just so many of them. My exact thought too.

> Remember doctype switching??

According to persistent rumors and several sources, including Opera’s CTO, it may be more than just doctype switching but another opt-in method on top of the doctype switching, which could be a <meta>-tag, something like

<meta name="standards-mode" content="full">

or

<meta name="rendering-mode" content="web-standards">

or

…

Regards, Gérard

#9 On January 16th, 2008 7:23 pm Gérard Talbot replied:

Rick,

“It seems that IE8 will not display Acid2 correctly by default. Instead of following established conventions for how to switch between quirks and standards mode, it seems that Microsoft plans to introduce a new opt-in scheme based on the <meta> tag.”

taken from Acid2 in IE8!

and that assumption/deduction would be consistent with other sources and also with how IE8 can/will render webpages with document.compatMode == “CSS1Compat” differently than with IE7.

In my opinion, there are now well over 750 known bugs in Internet Explorer 7 when triggered into standards rendering mode with specific doctype declarations, all reproducible, all with testcase-ed. And about 500 properties, attributes and methods in HTML 4, CSS 2.1, DOM 1 & 2 currently not supported in IE7. If IE dev. team implements all these and correct all the bugs, then the rendering of webpages would be immensely different between IE7 and IE8. Thus the need for another specific opt-in method.. for full compliance or to trigger document.compatMode == “CSS2Compat”.

Regards, Gérard

#10 On January 16th, 2008 8:01 pm Neal replied:

It is obvious that JavaScript has a long way to go for compliance amongst various browsers but I feel that Acid3 shouldn’t focus solely on JavaScript alone. Perhaps two separate test should be created, one for JavaScript and one for CSS.

The fact that a test even exists is a small amount of motivation for a browser vendor to make their browser more compliant. If we do not continue to push browsers to be more compliant they may loose sight of our goal.

Perhaps a similar test can be created for the upcoming versions of HTML as well.

#11 On January 17th, 2008 10:50 am Lars Gunther replied:

I have been in a conversation with Ian H about the possibility of including E4X in the test. However, major browsers vendors besides MS, I was told, do not want E4X at all, and it won’t go into the test. Shame on you webkit! (And everyone else with this attitude.)

E4X is also too new, as the standard must be from 2004 or more.

It would be easy to write test where current implementations of ECMAScript 3 fail, but where this has been rectified by the upcoming ES 4 spec. I trust Ian won’t consider such entries, though.

Now I will get working on my contribution: media queries!

Lars Gunther

#12 On January 17th, 2008 10:52 am Lars Gunther replied:

@neal

(X)HTML 5 will have something better: A formal testsuite.

BTW, there are many test for CSS 3 as well, both formal and informal.

#13 On January 17th, 2008 1:58 pm Lars Gunther replied:

Aargh! Reread Ian’s tests carefully. Media queries are in! Which is a good thing, BTW, but I’ve got to find another niche.

This will put some pressure on Mozilla to fix bug156716

https://bugzilla.mozilla.org/show_bug.cgi?id=156716

Mozillas progress on ACID 3 can be seen at

https://bugzilla.mozilla.org/show_bug.cgi?id=410460 and

http://spreadsheets.google.com/pub?key=pNgBCwWdyRTT2JeiZn4B2Yw

Lars Gunther

#14 On January 18th, 2008 10:47 am Daniel replied:

@Gérard Talbot: According to Chris Wilson, the new trigger for full standards mode will probably a meta-tag. However it is not yet finalized.

So we’ll have to wait before we know what they’re up to. But I’m pretty sure it’ll be some standrd conformant way.

Besides. This could be a way into a really great web.

#15 On January 18th, 2008 12:06 pm Dominic Shiells replied:

It would be smart if it tested all the current W3C recommendations such as

CSS 2.1 or CSS 3 (Font Embedding), this would change the face of the web

SVG

XHMTL

XML

ECMA script (javascript)

SVG would be good in all browsers as it would add much more room for creativity.

To me the basic aim of the Acid3 test would be to test current W3 recommendations. So that we can program.

Also it would be smart to specify an aim for the acid test is it just to test css or is it to test more widely than that.

To me all I care about is as a web developer is not to worry about different browsers when typing in the same code

#16 On January 19th, 2008 6:21 pm Jeff Walden replied:

Lars Gunther:

A little knowledge is a dangerous thing.

In truth, E4X is a horrible specification which breaks JavaScript in numerous ways not immediately obvious if you aren’t very familiar with the specification.  If you are familiar with it, you know that it’s horribly buggy.  No attempt seems to have been made to prove important properties about it, such as that you can only produce well-formed XML or that serializations will always be valid XML.  It has had type errors which have shown up only during actual implementation testing and which have been security problems in Mozilla.  The spec is a buggy copy of a buggy implementation in Rhino, and it shows.  If we knew what we know now, we would not have implemented E4X in SpiderMonkey (the Mozilla JS engine).

I’m not Brendan; I didn’t write the E4X implementation in Mozilla.  However, I hacked on it a fair amount for awhile fixing bugs in it, and after fixing bugs, reading the spec, and watching incoming reported bugs, I agree.  It’s all too common that when an E4X bug is filed, it’s a bug in the specification (I’d guess upwards of 60-70%).

I would not encourage other browsers or JS engines to implement E4X.  It’s too buggy and incorrect to be usable.

#17 On January 20th, 2008 4:41 pm La domo de karotoj » Acidotesto tria replied:

[...] En 1997 oni kreis la skatolan acidoteston por konstati, ĉu TTT-legiloj ĝuste faris skatolojn laŭ la normo HTML4. En 2005 WaSP (projekto pri TTT-normoj) proponis novan teston (acidoteston duan) por testi pli novajn trajtojn, kiujn TTT-legiloj ne tute regis (precipe CSS, sed ankaŭ PNG-bildoj, datum-URL-oj k.t.p.). Nun, ĉiuj grandaj kaj multaj malgrandaj TTT-legiloj subtenas (aŭ subtenos) acidoteston duan (eĉ Esplorilo oka kondiĉe subtenos acidoteston duan), do WaSP volas, ke ni donu proponojn por novaj testoj por ke oni povu krei acidoteston trian. [...]

#18 On January 21st, 2008 4:45 pm En preparación el test Acid3 para navegadores replied:

[...] En preparación el test Acid3 para navegadoreswww.webstandards.org/2008/01/16/whats-the-best-test-for-acid3/ por fgmunoz hace pocos segundos [...]

#19 On January 23rd, 2008 5:54 am tomek-k replied:

Hello,

My proposal for Acid3 test is a rendering test for pages served as XHTML. I’ve noticed that some browsers may render XHTML pages differently depending on if they are served as XHTML or as HTML. For example, Firefox (up till version 3b2):

if a web site’s body has a non-zero margin and some non-white background color, then the margin is colored using the bg color in “HTML mode” and it stays white in “XHTML mode”.

In any other browser that accepts XHTML, the margin is always colored using the bg color (either in “HTML mode” or in “XHTML mode”)

I don’t know if there are any other similar inconsistencies, but I think that it would be good to test browsers for such behavior.

The other thing worth considering is, I think, testing for SVG support – all in all it is a W3C recomendation.

#20 On January 25th, 2008 2:02 am Wielkimi krokami nadchodzi test ACID 3! | Ptaszor i jego blog! Lol... replied:

[...] Rozpoczęto prace nad przygotowaniem testu ACID 3, który już wkrótce będzie siał spustoszenie :). ACID 2 opierał się na statycznym języku HTML oraz CSS, natomiast wersja trzecia opierała się będzie głownie na ECMAScript oraz DOM – dynamicznej stronie. Silnikiem testu będzie 100 skryptów, które będą zawierały ‘pod testy’. [...]

#21 On January 26th, 2008 1:03 am Come_one_Micro replied:

All I have to say is:

SVG!!! (in IE)

#22 On January 27th, 2008 5:41 am Freyjkell replied:

I hope so much that Acid3 will be testing application/xhtml+xml (in some  or in the main document) and SVG. Also it would be nice to have MathML and XMLHtttpRequest (without fallback to MS ActiveX) test.

#23 On January 27th, 2008 5:42 am Freyjkell replied:

I hope so much that Acid3 will be testing application/xhtml+xml (in some <object src=”data:application/xhtml+xml,…”> or in the main document) and SVG. Also it would be nice to have MathML and XMLHtttpRequest (without fallback to MS ActiveX) test.

#24 On February 5th, 2008 7:24 am Wczasy replied:

Some browsers didn’t pass Acid2 tests but I count on my favorite IE8 will pass Acid3. I’m loking for tools who tests CMS aplications too

#25 On February 9th, 2008 5:22 am ethana2 replied:

SVG++

Lay on the heat!  For Open Standards!

…let’s try to push page embedded .odt ^_^

#26 On February 21st, 2008 7:08 am Helem23487 replied:

FjzYXJ qpoertwyr534nn

#27 On February 27th, 2008 4:17 am Richard Sherman replied:

I can say from experience that the Firefox3 Beta passes Acid2 without any problems. I can also say that at the current stage of Acid3 FF3 Beta gets 59/100, which is good considering it’s still i the beta stage. FF2 gets 50/100, which is very impressive considering that IE7 only gets 12/100, very disappointing. I’ve tested many browsers including Opera9, and FireFox is the one that passes the Acid test most convincingly. I recommend getting FF3 as soon as the full version is released. There are some minor bugs in the beta but none that damage your computer. Mozilla beats Microsoft in my books any day.

Regards,

Richard

#28 On February 29th, 2008 8:54 pm Carlos replied:

Opera 9.5 gets 65/100 which is in beta stage too, and ie7 just gets 5/100.

#29 On March 4th, 2008 3:08 am Les replied:

Looks like IE8 decided on “standard by default”, so when a Beta finally appears, it will be Acid2 compliant.  Yeay!  Now if they would only fix the zillion things missing with their ECMAScript support.

#30 On March 5th, 2008 9:25 pm Geoff Crook replied:

Q: I removed IE8 Beta – now the problem is how do I get IE7 to function?

I reinstalled IE7 and it will still not reload.

All help is very much appreciated…/gc

#31 On March 6th, 2008 3:22 pm Eraserhead replied:

@ Richard, clearly you haven’t tried the latest builds of Webkit, they get near 90%.

#32 On March 6th, 2008 3:25 pm Alexander Maier replied:

Mac OS X 10.5 / Leopard under Safari / Webkit r30790 does 90/100 – I think that’s the record so far! Is there anything better?

#33 On March 10th, 2008 9:17 pm Josh replied:

IE 8– 17/100 Acid 3 (*sort of* after clicking a few pop-ups & freezing up a few times) & it does pass the Acid 2 test (as far as I could tell) (tested on Windows XP SP2)

Firefox 3 Beta 3– 61/100 Acid 3 & it does pass the Acid 2 test (tested on Windows XP SP2 & Linux)

Opera 9.5 Beta 1– 60/100 Acid 3 (sometimes crashes browser) & it does pass the Acid 2 test (tested on Linux)

Webkit Development– 90/100 Acid 3 & it does pass the Acid 2 test (tested on OS X)

Safari 3.04 (latest shipping version)– 39/100 Acid 3 & it does pass the Acid 2 Test (tested on Windows XP SP2 & OS X)

#34 On March 11th, 2008 9:30 am Josh replied:

Firefox 3 Beta 4- 67/100 Acid 3 & it does pass the Acid 2 test

#35 On March 11th, 2008 7:40 pm Kyle replied:

Yup Firefox 3 is quickly improving everything that was wrong with FF2

#36 On March 14th, 2008 4:31 pm James C. replied:

Firefox 3 Pre-beta 5 was 69/100 and then with an update today it became 70/100.

#37 On March 18th, 2008 11:10 am Josh replied:

Safari 3.1 (latest shipping version)- 75/100 Acid 3 & it does pass the Acid 2 test (tested on Windows XP SP2)

#38 On March 18th, 2008 11:33 am Alex replied:

Webkit on Leopard now does 91%

#39 On March 18th, 2008 6:16 pm Roger D. Parish replied:

Safari 3.1 passes the Acid2 test only on initial load; it fails on a reload of the page.

#40 On March 26th, 2008 12:22 am alcatholic replied:

Latest Webkit Nightly Build (r31307) now gets 96/100

They’ve also just introduced an optimization for pageloading that is very sweet on script heavy pages.

http://webkit.org/blog/166/optimizing-page-loading-in-web-browser/

“The latest WebKit nightlies contain some new optimizations to reduce the impact of network latency. When script loading halts the main parser, we start up a side parser that goes through the rest of the HTML source to find more resources to load. We also prioritize resources so that scripts and stylesheets load before images. The overall effect is that we are now able to load more resources in parallel with scripts, including other scripts.”

#41 On March 26th, 2008 12:29 pm Someone replied:

Firefox 3 beta 5 pre i currently am using is getting 71/100 solidly.

#42 On April 2nd, 2008 10:08 pm Josh replied:

Firefox 3 beta 5- 71/100 Acid 3 & it does pass the Acid 2 test (tested on Ubuntu Linux)

			Return to top

Post a Reply

Comments are closed.

Back to Top

All of the entries posted in WaSP Buzz express the opinions of their individual authors. They do not necessarily reflect the plans or positions of the Web Standards Project as a group.

This site is valid XHTML 1.0 Strict, CSS | Get Buzz via RSS or Atom | Colophon | Legal


text:
<?php

namespace rich\test;

use rich\collections\Arrays;
use rich\collections\Variables;

class ArraysTest extends \PHPUnit_Framework_TestCase
{
    public function columnProvider()
    {
        $source = [
            ['foo' => 12, 'bar' => 34],
            ['foo' => 56, 'bar' => 78],
        ];

        return [
            [$source, 'bar', null, [34, 78]],
            [$source, 'bar', 'foo', [12 => 34, 56 => 78]],
        ];
    }

    /**
     * @dataProvider columnProvider
     */
    public function testColumn($source, $columnKey, $indexKey, $expected)
    {
        $collection = Arrays::from($source);
        $properties = $collection->column($columnKey, $indexKey);
        $this->assertInstanceOf(Variables::className(), $properties);
        $this->assertEquals($expected, $properties->value());
    }

    public function indexByColumnProvider()
    {
        $v1 = ['foo' => 12, 'bar' => 34];
        $v2 = ['foo' => 56, 'bar' => 78];

        return [
            [[$v1, $v2], 'foo', [12 => $v1, 56 => $v2]],
            [['a' => $v1, 10 => $v2], 'foo', [12 => $v1, 56 => $v2]],
        ];
    }

    /**
     * @dataProvider indexByColumnProvider
     */
    public function testIndexByColumn($source, $columnKey, $expected)
    {
        $collection = Arrays::from($source)->indexByColumn($columnKey);
        $this->assertEquals($expected, $collection->value());
    }
}


text:
<!doctype html>

		<title>Zabuun - Learn Egyptian Arabic for English speakers</title>
		<meta name="description" content="">
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/header.php';?>

			<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/side.php';?>

Essays > An Orange and Black Butterfly

						Expand All | Collapse All

An Orange and Black Butterfly

  He sees a butterfly. It is near a flower. It leaves the flower. It goes to another flower. He watches the butterfly. It is pretty. It has orange and black wings. It has little white spots on the wings. Its wings are thin. He tries to grab the butterfly. But it flies away.

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/footer.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/scripts.php';?>


text:
'use strict';

angular.module('unifi-jenkins.statusView', ['ngRoute'])

.config(['$routeProvider', function($routeProvider) {
	$routeProvider.when('/status', {
		templateUrl: 'statusView/statusView.html',
		controller: 'StatusViewCtrl'
	});
}])

.controller('StatusViewCtrl', ['$scope', 'jobsFactory', 'teamFactory', function($scope, jobsFactory, teamFactory) {

	jobsFactory.getAllJobs().then(function(data) {
		var jobsList = data.data.jobs;
		$scope.allJobs = jobsList;
	});

	$scope.jobs = [
		{
			name: 'prod-unifi',
			repository: 'Discover',
			branch: 'default'
		},
		{
			name: 'prod-licensing',
			repository: 'licensing',
			branch: 'default'
		},
		{
			name: 'beta-unifi',
			repository: 'Discover',
			branch: 'develop'
		},
		{
			name: 'beta-portal',
			repository: 'unifi-webapp',
			branch: 'develop'
		},
		{
			name: 'beta-licensing',
			repository: 'licensing',
			branch: 'develop'
		},
		{
			name: 'dev-unifi',
			repository: 'Discover',
			branch: 'develop'
		},
		{
			name: 'dev-licensing',
			repository: 'licensing',
			branch: 'develop'
		},
		{
			name: 'prod-marketing',
			repository: 'unifi-marketing',
			branch: 'default'
		}
	];

	teamFactory.getTeam('inviewlabs').then(function(result) {
		console.log('- get team ', result.data);
		$scope.team = result.data;
	});
}]);


text:
package com.huawei.esdk.fusionmanager.local.impl.autogen.net;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for anonymous complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="return" type="{http://response.model.firewall.soap.business.net.north.galaxmanager.com/xsd}QueryNetAclResp" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "_return"
})
@XmlRootElement(name = "queryNetAclResponse")
public class QueryNetAclResponse {

    @XmlElement(name = "return")
    protected QueryNetAclResp _return;

    /**
     * Gets the value of the return property.
     *
     * @return
     *     possible object is
     *     {@link QueryNetAclResp }
     *
     */
    public QueryNetAclResp getReturn() {
        return _return;
    }

    /**
     * Sets the value of the return property.
     *
     * @param value
     *     allowed object is
     *     {@link QueryNetAclResp }
     *
     */
    public void setReturn(QueryNetAclResp value) {
        this._return = value;
    }

}


text:
'use strict';

var React = require('react');
var assign = require('object-assign');
var _normalize = require('react-style-normalizer');
var moment = require('moment');

var toUpperFirst = require('./toUpperFirst');

var getFormat = require('./getFormat');
var getFormatInfo = require('./getFormatInfo');

var hasTouch = require('has-touch');

var EVENT_NAMES = require('react-event-names');

var WHITESPACE = ' ';

function emptyFn() {}

var twoDigits = require('./twoDigits');
var _format = require('./format');
var formatTime = require('./formatTime');

function identity(v) {
	return v;
}

module.exports = React.createClass({

	displayName: 'ReactTimePicker',

	componentWillUnmount: function componentWillUnmount() {
		this.stopInterval();
	},

	getInitialState: function getInitialState() {
		return {
			defaultValue: this.props.defaultValue,
			focused: {
				hour: null,
				minute: null,
				second: null,
				meridian: null
			},
			overArrow: {
				hour: null,
				minute: null,
				second: null,
				meridian: null
			}
		};
	},

	getDefaultProps: function getDefaultProps() {
		return {
			normalizeStyle: true,
			stopChangePropagation: true,
			useArrowKeys: true,

			//makes 15:78 be converted to 15:00, and not to 16:18
			strict: true,
			overflowHourToMeridian: true,

			step: 1,
			hourStep: null,
			minuteStep: null,
			secondStep: null,

			stepDelay: 60,
			showArrows: true,

			defaultStyle: {
				border: '1px solid gray',
				padding: 10,
				display: 'inline-flex',
				alignItems: 'center',
				boxSizing: 'border-box',
				flexFlow: 'row',
				width: 200
			},

			defaultArrowStyle: {
				cursor: 'pointer',
				userSelect: 'none',
				display: 'inline-block',
				alignSelf: 'stretch',
				textAlign: 'center'
			},

			defaultArrowOverStyle: {
				background: 'rgb(229, 229, 229)'
			},

			defaultArrowUpOverStyle: null,
			defaultArrowDownOverStyle: null,

			defaultArrowUpStyle: {
				marginBottom: 5
			},

			defaultArrowDownStyle: {
				marginTop: 5
			},

			defaultBoxStyle: {
				boxSizing: 'border-box',
				display: 'flex',
				flexFlow: 'column',
				alignItems: 'center'
			},

			defaultInputStyle: {
				boxSizing: 'border-box',
				width: '100%',
				textAlign: 'center'
			},

			defaultSeparatorStyle: {
				flex: 'none'
			},

			defaultMeridianInputStyle: {
				cursor: 'pointer'
			},

			defaultMeridianInputProps: {},

			// format: 'HHmmssa',
			renderHour: null,
			renderMinute: null,
			renderSecond: null,
			renderMeridian: null,

			defaultArrowFactory: React.DOM.span,

			arrowFactory: null,
			arrowUpFactory: null,
			arrowDownFactory: null,

			defaultInputFactory: React.DOM.input,
			inputFactory: null,

			hourInputFactory: null,
			minuteInputFactory: null,
			secondInputFactory: null,
			meridianInputFactory: null,

			timeToString: formatTime
		};
	},

	normalize: function normalize(style) {
		return _normalize(style);
	},

	render: function render() {
		var props = this.prepareProps(this.props, this.state);

		if (!props.normalizeStyle) {
			this.normalize = identity;
		}

		var hour = this.renderHour(props);
		var minute = this.renderMinute(props);
		var second = this.renderSecond(props);
		var meridian = this.renderMeridian(props);

		var separator = props.separator || React.createElement(
			'span',
			{ style: props.separatorStyle },
			WHITESPACE + ':' + WHITESPACE
		);
		var hourSeparator = hour && (minute || second || meridian) ? props.hourSeparator || separator : null;
		var minuteSeparator = minute && (second || meridian) ? props.minuteSeparator || separator : null;
		var secondSeparator = second && meridian ? props.secondSeparator || separator : null;

		return React.createElement(
			'div',
			props,
			hour,
			hourSeparator,
			minute,
			minuteSeparator,
			second,
			secondSeparator,
			meridian
		);
	},

	onArrowMouseEnter: function onArrowMouseEnter(props, dir, name, event) {
		var overArrow = this.state.overArrow;

		Object.keys(overArrow).forEach(function (key) {
			overArrow[key] = null;
		});

		overArrow[name] = dir;

		this.setState({});
	},

	onArrowMouseLeave: function onArrowMouseLeave(props, dir, name, event) {
		this.state.overArrow[name] = null;

		this.setState({});
	},

	onArrowMouseDown: function onArrowMouseDown(props, dir, name, event) {

		event.preventDefault();

		if (name == 'meridian') {
			this.onArrowMeridianAction(props, dir, name);
			return;
		}

		var target = hasTouch ? event.target : window;
		var eventName = hasTouch ? 'touchend' : 'click';

		target.addEventListener(eventName, this.onWindowClick);

		this.onArrowAction(props, dir, name);

		this.timeoutId = setTimeout((function () {
			this.startInterval(props, dir, name);
		}).bind(this), props.stepDelay);
	},

	onWindowClick: function onWindowClick() {
		this.stopInterval();
	},

	stopInterval: function stopInterval() {
		clearTimeout(this.timeoutId);
		clearInterval(this.intervalId);
	},

	startInterval: function startInterval(props, dir, name) {
		this.intervalId = setInterval((function () {
			this.onArrowAction(props, dir, name);
		}).bind(this), props.stepDelay);
	},

	onMeridianInputMouseDown: function onMeridianInputMouseDown(props, event) {
		//prevent focus on mouse down on meridian input
		event.preventDefault();
		//the input can still be focused by tab navigation, we're okay with that

		this.onArrowMeridianAction(props, 1, 'meridian');
	},

	onArrowMeridianAction: function onArrowMeridianAction(props, dir, name) {
		this.addTime('hour', dir * 12);
	},

	onArrowAction: function onArrowAction(props, dir, name) {

		var dirName = dir == 1 ? 'Up' : 'Down';
		var methodName = 'onArrow' + dirName + toUpperFirst(name) + 'Action';

		if (typeof this[methodName] == 'function') {
			this[methodName](props);
		}

		methodName = 'onArrow' + toUpperFirst(name) + 'Action';

		if (typeof this[methodName] == 'function') {
			this[methodName](props, dir);
		}

		this.incValue(props, name, dir);
	},

	incValue: function incValue(props, name, dir) {

		var fieldFocused = this.state.focused[name];

		if (!fieldFocused || this.lastStateChange != name) {
			dir = dir || 0;

			var step = props[name + 'Step'] || props.step;
			var amount = dir * step;

			this.addTime(name, amount);
		} else {

			var value = parseInt(fieldFocused.value, 10);

			value += dir;

			if (name == 'hour') {
				if (props.time.meridian == 'PM') {
					value += value < 12 ? 12 : 0;
				}
			}

			this.setTime(name, value);
		}

		this.lastStateChange = null;
	},

	addTime: function addTime(name, amount) {
		this.setValue(moment(this.moment).add(amount, name));
	},

	setTime: function setTime(name, value) {
		var clone = moment(this.moment);
		clone.set(name, value);

		this.setValue(clone);
	},

	setValue: function setValue(moment) {

		var props = this.p;
		var time = this.getTime(moment);

		var focused = this.state.focused;
		var newState = {};

		if (focused) {
			Object.keys(focused).forEach(function (key) {
				if (focused[key]) {
					focused[key].value = this.format(props, key, time[key]);
				}
			}, this);
		}

		var timeString = moment.format(props.format);

		if (this.props.value == null) {
			this.setState({
				defaultValue: timeString
			});
		}

		;(this.props.onChange || emptyFn)(timeString, moment, assign({}, time));
	},

	format: function format(props, name, value) {
		var renderFn;

		if (arguments.length < 3) {
			value = props.time[name];
		}

		if (name != 'meridian') {
			renderFn = props['render' + toUpperFirst(name)];
		} else {
			renderFn = props.renderMeridian;
		}

		if (!renderFn && typeof props.format == 'string') {
			var formatInfo = props.formatInfo;
			renderFn = function (value, name) {
				return _format(name, value, formatInfo);
			};
		}

		if (!renderFn) {
			renderFn = twoDigits;
		}

		if (typeof renderFn == 'function') {
			value = renderFn(value, name, props);
		}

		return value;
	},

	renderBox: function renderBox(props, name) {
		var state = this.state;
		var style = props[name + 'Style'];
		var inputStyle = props[name + 'InputStyle'];
		var upperName = toUpperFirst(name);

		var value;

		if (!state.focused[name]) {
			value = this.format(props, name);
		} else {
			value = state.focused[name].value;
		}

		var arrowUp;
		var arrowDown;

		if (props.showArrows) {
			var overArrow = this.state.overArrow[name];

			var arrowUpStyle = props.arrowUpStyle;

			if (overArrow == 1) {
				arrowUpStyle = assign({}, props.arrowUpStyle, props.defaultArrowOverStyle, props.defaultArrowUpOverStyle, props.arrowOverStyle, props.arrowUpOverStyle);
			}

			var arrowUpProps = {
				mouseOver: overArrow == 1,
				style: arrowUpStyle,
				children: '▲'
			};

			arrowUpProps[EVENT_NAMES.onMouseDown] = this.onArrowMouseDown.bind(this, props, 1, name);
			arrowUpProps.onMouseEnter = this.onArrowMouseEnter.bind(this, props, 1, name);
			arrowUpProps.onMouseLeave = this.onArrowMouseLeave.bind(this, props, 1, name);

			var arrowDownStyle = props.arrowDownStyle;

			if (overArrow == -1) {
				arrowDownStyle = assign({}, props.arrowDownStyle, props.defaultArrowOverStyle, props.defaultArrowDownOverStyle, props.arrowOverStyle, props.arrowDownOverStyle);
			}

			var arrowDownProps = {
				mouseOver: overArrow == -1,
				style: arrowDownStyle,
				children: '▼'
			};

			arrowDownProps[EVENT_NAMES.onMouseDown] = this.onArrowMouseDown.bind(this, props, -1, name);
			arrowDownProps.onMouseEnter = this.onArrowMouseEnter.bind(this, props, -1, name);
			arrowDownProps.onMouseLeave = this.onArrowMouseLeave.bind(this, props, -1, name);

			var defaultArrowFactory = props.defaultArrowFactory;
			var arrowUpFactory = props.arrowUpFactory || props.arrowFactory || defaultArrowFactory;
			var arrowDownFactory = props.arrowDownFactory || props.arrowFactory || defaultArrowFactory;

			arrowUp = arrowUpFactory(arrowUpProps);

			if (arrowUp === undefined) {
				arrowUp = defaultArrowFactory(arrowUpProps);
			}

			arrowDown = arrowDownFactory(arrowDownProps);
			if (arrowDown === undefined) {
				arrowDown = defaultArrowFactory(arrowDownProps);
			}
		}

		var defaultInputFactory = props.defaultInputFactory;
		var inputFactory = props[name + 'InputFactory'] || props.inputFactory || defaultInputFactory;

		var defaultInputProps = props['default' + upperName + 'InputProps'];
		var inputProps = props[name + 'InputProps'];

		var inputProps = assign({}, props.inputProps, defaultInputProps, inputProps, {
			timeName: name,
			style: inputStyle,
			value: value,
			onBlur: this.handleInputBlur.bind(this, props, name),
			onChange: this.handleInputChange.bind(this, props, name),
			onFocus: this.handleInputFocus.bind(this, props, name) });

		if (props.useArrowKeys) {
			inputProps.onKeyDown = this.handleInputKeyDown.bind(this, props, name);
		}

		if (name == 'meridian') {
			inputProps.onMouseDown = this.onMeridianInputMouseDown.bind(this, props);
		}

		var input = inputFactory(inputProps);

		if (input === undefined) {
			input = defaultInputFactory(inputProps);
		}

		return React.createElement(
			'div',
			{ style: style },
			arrowUp,
			input,
			arrowDown
		);
	},

	handleInputFocus: function handleInputFocus(props, name, event) {
		var focused = this.state.focused;

		focused[name] = {
			value: this.format(props, name)
		};

		this.stopInterval();

		this.setState({});
	},

	handleInputBlur: function handleInputBlur(props, name, event) {

		this.incValue(props, name, 0);

		this.state.focused[name] = null;
		this.setState({});
	},

	handleInputChange: function handleInputChange(props, name, event) {
		if (this.state.focused[name]) {
			this.state.focused[name].value = event.target.value;
		}

		this.lastStateChange = name;

		this.setState({});
		props.stopChangePropagation && event.stopPropagation();
	},

	/**
  * Called on keydown on all inputs, including meridian
  *
  * @param  {Object} props
  * @param  {String} name
  * @param  {Event} event
  */
	handleInputKeyDown: function handleInputKeyDown(props, name, event) {

		if (name == 'meridian') {
			var letter = String.fromCharCode(event.keyCode);
			var isMeridianLetter = letter == 'A' || letter == 'P';

			if (isMeridianLetter || event.key == ' ' //space
			 || event.key == 'Enter' || event.key == 'ArrowUp' || event.key == 'ArrowDown' || event.key == 'ArrowLeft' || event.key == 'ArrowRight') {

				event.preventDefault();

				if (isMeridianLetter && letter + 'M' == this.time.meridian) {
					return;
				}

				this.addTime('hour', 12);
				return;
			}
		}

		if (event.key === 'ArrowDown') {
			this.incValue(props, name, -1);
		}

		if (event.key === 'ArrowUp') {
			this.incValue(props, name, 1);
		}
	},

	renderHour: function renderHour(props) {
		return this.renderBox(props, 'hour');
	},

	renderMinute: function renderMinute(props) {
		if (props.showMinute) {
			return this.renderBox(props, 'minute');
		}
	},

	renderSecond: function renderSecond(props) {
		if (props.showSecond) {
			return this.renderBox(props, 'second');
		}
	},

	renderMeridian: function renderMeridian(props) {
		if (props.withMeridian) {
			return this.renderBox(props, 'meridian');
		}
	},

	toMoment: function toMoment(value, format) {
		format = format || this.prepareFormat(this.props);

		return moment(value, format);
	},

	getTime: function getTime(moment) {

		var formatInfo = this.p.formatInfo;
		var time = {};

		if (formatInfo.hour.specified) {
			time.hour = formatInfo.meridian.specified ? moment.format('h') * 1 : moment.hour();
		}

		if (formatInfo.minute.specified) {
			time.minute = moment.minute();
		}

		if (formatInfo.second.specified) {
			time.second = moment.second();
		}

		if (formatInfo.meridian.specified) {
			time.meridian = moment.format('A');
		}

		return time;
	},

	prepareFormat: function prepareFormat(props) {
		var value = props.value;
		var format = props.format || getFormat(value) || 'HH:mm:ss';

		return format;
	},

	prepareBoxes: function prepareBoxes(props) {
		var formatInfo = props.formatInfo;

		props.showSecond = formatInfo.second.specified;
		props.showMinute = formatInfo.minute.specified;
		props.withMeridian = formatInfo.meridian.specified;
	},

	getValue: function getValue() {
		var value = this.props.value == null ? this.state.defaultValue : this.props.value;

		return value;
	},

	prepareProps: function prepareProps(thisProps, state) {
		var props = this.p = assign({}, thisProps);

		props.value = this.getValue();
		props.format = this.prepareFormat(props);
		props.formatInfo = getFormatInfo(props.format);

		this.moment = props.moment = this.toMoment(props.value, props.format);
		this.time = props.time = this.getTime(props.moment);

		this.prepareBoxes(props, state);
		this.prepareStyles(props, state);

		return props;
	},

	prepareStyles: function prepareStyles(props, state) {

		props.style = this.prepareStyle(props, state);
		props.separatorStyle = this.prepareSeparatorStyle(props, state);
		this.prepareArrowStyles(props, state);

		this.prepareHourStyles(props, state);
		this.prepareMinuteStyles(props, state);
		this.prepareSecondStyles(props, state);
		this.prepareMeridianStyles(props, state);
	},

	prepareStyle: function prepareStyle(props, state) {
		return this.normalize(assign({}, props.defaultStyle, props.style));
	},

	prepareSeparatorStyle: function prepareSeparatorStyle(props, state) {
		return this.normalize(assign({}, props.defaultSeparatorStyle, props.separatorStyle));
	},

	prepareArrowStyles: function prepareArrowStyles(props, state) {
		props.arrowUpStyle = this.normalize(assign({}, props.defaultArrowStyle, props.defaultArrowUpStyle, props.arrowStyle, props.arrowUpStyle));
		props.arrowDownStyle = this.normalize(assign({}, props.defaultArrowStyle, props.defaultArrowDownStyle, props.arrowStyle, props.arrowDownStyle));
	},

	prepareHourStyles: function prepareHourStyles(props, state) {
		props.hourStyle = this.prepareHourStyle(props, state);
		props.hourInputStyle = this.prepareHourInputStyle(props, state);
	},

	prepareHourStyle: function prepareHourStyle(props, state) {
		return this.normalize(assign({}, props.defaultBoxStyle, props.defaultHourStyle, props.boxStyle, props.hourStyle));
	},

	prepareHourInputStyle: function prepareHourInputStyle(props, state) {
		return this.normalize(assign({}, props.defaultInputStyle, props.defaultHourInputStyle, props.inputStyle, props.hourInputStyle));
	},

	prepareMinuteStyles: function prepareMinuteStyles(props, state) {
		props.minuteStyle = this.prepareMinuteStyle(props, state);
		props.minuteInputStyle = this.prepareMinuteInputStyle(props, state);
	},

	prepareMinuteStyle: function prepareMinuteStyle(props, state) {
		return this.normalize(assign({}, props.defaultBoxStyle, props.defaultMinuteStyle, props.boxStyle, props.minuteStyle));
	},

	prepareMinuteInputStyle: function prepareMinuteInputStyle(props, state) {
		return this.normalize(assign({}, props.defaultInputStyle, props.defaultMinuteInputStyle, props.inputStyle, props.minuteInputStyle));
	},

	prepareSecondStyles: function prepareSecondStyles(props, state) {
		if (props.showSecond) {
			props.secondStyle = this.prepareSecondStyle(props, state);
			props.secondInputStyle = this.prepareSecondInputStyle(props, state);
		}
	},

	prepareSecondStyle: function prepareSecondStyle(props, state) {
		return this.normalize(assign({}, props.defaultBoxStyle, props.defaultSecondStyle, props.boxStyle, props.secondStyle));
	},

	prepareSecondInputStyle: function prepareSecondInputStyle(props, state) {
		return this.normalize(assign({}, props.defaultInputStyle, props.defaultSecondInputStyle, props.inputStyle, props.secondInputStyle));
	},

	prepareMeridianStyles: function prepareMeridianStyles(props, state) {
		if (props.withMeridian) {
			props.meridianStyle = this.prepareMeridianStyle(props, state);
			props.meridianInputStyle = this.prepareMeridianInputStyle(props, state);
		}
	},

	prepareMeridianStyle: function prepareMeridianStyle(props, state) {
		return this.normalize(assign({}, props.defaultBoxStyle, props.defaultMeridianStyle, props.boxStyle, props.meridianStyle));
	},

	prepareMeridianInputStyle: function prepareMeridianInputStyle(props, state) {
		return this.normalize(assign({}, props.defaultInputStyle, props.defaultMeridianInputStyle, props.inputStyle, props.meridianInputStyle));
	}
});

// readOnly: true


text:
package org.spongepowered.api.data.type;

import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(PhantomPhases.class)
public interface PhantomPhase extends DefaultedRegistryValue {

}


text:
package chapter20

import java.util.concurrent.TimeUnit
import akka.actor.{ActorRef, Props, ActorSystem, Actor}
import scala.util.Random

/*
Write a program that generates an array of n random numbers
(where n is a large value, such as 1,000,000), and then computes the average of those numbers
by distributing the work over multiple actors, each of which computes the sum of a subrange of the
values, sending the result to an actor that combines the results.

If you run your program on a dual-core or quad-core processor,
what is the speedup over a single-threaded solution?
 */
object Exercise1 extends App {

  class SumActor(consumer: ActorRef) extends Actor {

    override def receive = {
      case items: Seq[Int @unchecked] =>
        consumer ! items.sum
        context.stop(self)
    }
  }

  class MedianActor(val workersCount: Int, val elements: Int) extends Actor {

    private val start = System.nanoTime()

    private var workersDone = 0
    private var currState   = 0

    override def receive = {
      case sum: Int =>
        workersDone += 1
        currState += sum

        if (workersDone == workersCount) {
          val time = System.nanoTime() - start

          println("The actors result is: ≈ " + currState / elements)
          println("Time: " + TimeUnit.MILLISECONDS.convert(time, TimeUnit.NANOSECONDS) + " ms")

          // Shutdown the program
          context.system.shutdown()
        }
    }
  }

  def generateArray(): Stream[Int] = {
    Random.nextInt() #:: generateArray()
  }

  def runActors(size: Int) {
    val workers = 4
    val workPerWorker = size / workers

    val system = ActorSystem("exercise1")
    val medianActor = system.actorOf(Props(new MedianActor(workers, size)), "median")
    val sumActors = for (i <- 1 to workers)
      yield system.actorOf(Props(new SumActor(medianActor)), s"worker$i")

    sumActors.foreach(_ ! generateArray().take(workPerWorker).toList)
  }

  def runDefault(size: Int) {
    val start = System.nanoTime()

    val result = generateArray().take(size).sum / size
    val time = System.nanoTime() - start

    println("The default result is: ≈ " + result)
    println("Time: " + TimeUnit.MILLISECONDS.convert(time, TimeUnit.NANOSECONDS) + " ms")
  }

  val size = math.pow(10, 6).toInt
  runActors(size)
  //runDefault(size)
}