text:
<?php

// Utilities that depend on WordPress code.

namespace WP_CLI\Utils;

function wp_not_installed() {
	global $wpdb, $table_prefix;
	if ( ! is_blog_installed() && ! defined( 'WP_INSTALLING' ) ) {
		$tables         = $wpdb->get_col( "SHOW TABLES LIKE '%_options'" );
		$found_prefixes = array();
		if ( count( $tables ) ) {
			foreach ( $tables as $table ) {
				$maybe_prefix = substr( $table, 0, - strlen( 'options' ) );
				if ( $maybe_prefix !== $table_prefix ) {
					$found_prefixes[] = $maybe_prefix;
				}
			}
		}
		if ( count( $found_prefixes ) ) {
			$prefix_list   = implode( ', ', $found_prefixes );
			$install_label = count( $found_prefixes ) > 1 ? 'installations' : 'installation';
			\WP_CLI::error(
				"The site you have requested is not installed.\n" .
				"Your table prefix is '{$table_prefix}'. Found {$install_label} with table prefix: {$prefix_list}.\n" .
				'Or, run `wp core install` to create database tables.'
			);
		} else {
			\WP_CLI::error(
				"The site you have requested is not installed.\n" .
				'Run `wp core install` to create database tables.'
			);
		}
	}
}

// phpcs:disable WordPress.PHP.IniSet -- Intentional & correct usage.
function wp_debug_mode() {
	if ( \WP_CLI::get_config( 'debug' ) ) {
		if ( ! defined( 'WP_DEBUG' ) ) {
			define( 'WP_DEBUG', true );
		}

		error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
	} else {
		if ( WP_DEBUG ) {
			error_reporting( E_ALL );

			if ( WP_DEBUG_DISPLAY ) {
				ini_set( 'display_errors', 1 );
			} elseif ( null !== WP_DEBUG_DISPLAY ) {
				ini_set( 'display_errors', 0 );
			}

			if ( WP_DEBUG_LOG ) {
				ini_set( 'log_errors', 1 );
				ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );
			}
		} else {
			error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
		}

		if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
			ini_set( 'display_errors', 0 );
		}
	}

	// XDebug already sends errors to STDERR.
	ini_set( 'display_errors', function_exists( 'xdebug_debug_zval' ) ? false : 'STDERR' );
}
// phpcs:enable

function replace_wp_die_handler() {
	\remove_filter( 'wp_die_handler', '_default_wp_die_handler' );
	\add_filter(
		'wp_die_handler',
		function() {
			return __NAMESPACE__ . '\\wp_die_handler';
		}
	);
}

function wp_die_handler( $message ) {
	if ( $message instanceof \WP_Error ) {
		$message = $message->get_error_message();
	}

	$message = wp_clean_error_message( $message );

	\WP_CLI::error( $message );
}

/**
 * Clean HTML error message so suitable for text display.
 */
function wp_clean_error_message( $message ) {
	$original_message = trim( $message );
	$message          = $original_message;
	if ( preg_match( '|^\
(.+?)
|', $original_message, $matches ) ) {
		$message = $matches[1] . '.';
	}
	if ( preg_match( '|\
(.+?)
|', $original_message, $matches ) ) {
		$message .= ' ' . $matches[1];
	}

	$search_replace = array(
		''  => '`',
		'' => '`',
	);
	$message        = str_replace( array_keys( $search_replace ), array_values( $search_replace ), $message );
	$message        = namespace\strip_tags( $message );
	$message        = html_entity_decode( $message, ENT_COMPAT, 'UTF-8' );

	return $message;
}

function wp_redirect_handler( $url ) {
	\WP_CLI::warning( 'Some code is trying to do a URL redirect. Backtrace:' );

	ob_start();
	debug_print_backtrace();
	fwrite( STDERR, ob_get_clean() );

	return $url;
}

function maybe_require( $since, $path ) {
	if ( wp_version_compare( $since, '>=' ) ) {
		require $path;
	}
}

function get_upgrader( $class ) {
	if ( ! class_exists( '\WP_Upgrader' ) ) {
		require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
	}

	return new $class( new \WP_CLI\UpgraderSkin() );
}

/**
 * Converts a plugin basename back into a friendly slug.
 */
function get_plugin_name( $basename ) {
	if ( false === strpos( $basename, '/' ) ) {
		$name = basename( $basename, '.php' );
	} else {
		$name = dirname( $basename );
	}

	return $name;
}

function is_plugin_skipped( $file ) {
	$name = get_plugin_name( str_replace( WP_PLUGIN_DIR . '/', '', $file ) );

	$skipped_plugins = \WP_CLI::get_runner()->config['skip-plugins'];
	if ( true === $skipped_plugins ) {
		return true;
	}

	if ( ! is_array( $skipped_plugins ) ) {
		$skipped_plugins = explode( ',', $skipped_plugins );
	}

	return in_array( $name, array_filter( $skipped_plugins ), true );
}

function get_theme_name( $path ) {
	return basename( $path );
}

function is_theme_skipped( $path ) {
	$name = get_theme_name( $path );

	$skipped_themes = \WP_CLI::get_runner()->config['skip-themes'];
	if ( true === $skipped_themes ) {
		return true;
	}

	if ( ! is_array( $skipped_themes ) ) {
		$skipped_themes = explode( ',', $skipped_themes );
	}

	return in_array( $name, array_filter( $skipped_themes ), true );
}

/**
 * Register the sidebar for unused widgets.
 * Core does this in /wp-admin/widgets.php, which isn't helpful.
 */
function wp_register_unused_sidebar() {

	register_sidebar(
		array(
			'name'          => __( 'Inactive Widgets' ),
			'id'            => 'wp_inactive_widgets',
			'class'         => 'inactive-sidebar',
			'description'   => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ),
			'before_widget' => '',
			'after_widget'  => '',
			'before_title'  => '',
			'after_title'   => '',
		)
	);

}

/**
 * Attempts to determine which object cache is being used.
 *
 * Note that the guesses made by this function are based on the WP_Object_Cache classes
 * that define the 3rd party object cache extension. Changes to those classes could render
 * problems with this function's ability to determine which object cache is being used.
 *
 * @return string
 */
function wp_get_cache_type() {
	global $_wp_using_ext_object_cache, $wp_object_cache;

	if ( ! empty( $_wp_using_ext_object_cache ) ) {
		// Test for Memcached PECL extension memcached object cache (https://github.com/tollmanz/wordpress-memcached-backend)
		if ( isset( $wp_object_cache->m ) && $wp_object_cache->m instanceof \Memcached ) {
			$message = 'Memcached';

			// Test for Memcache PECL extension memcached object cache (http://wordpress.org/extend/plugins/memcached/)
		} elseif ( isset( $wp_object_cache->mc ) ) {
			$is_memcache = true;
			foreach ( $wp_object_cache->mc as $bucket ) {
				if ( ! $bucket instanceof \Memcache && ! $bucket instanceof \Memcached ) {
					$is_memcache = false;
				}
			}

			if ( $is_memcache ) {
				$message = 'Memcache';
			}

			// Test for Xcache object cache (http://plugins.svn.wordpress.org/xcache/trunk/object-cache.php)
		} elseif ( $wp_object_cache instanceof \XCache_Object_Cache ) {
			$message = 'Xcache';

			// Test for WinCache object cache (http://wordpress.org/extend/plugins/wincache-object-cache-backend/)
		} elseif ( class_exists( 'WinCache_Object_Cache' ) ) {
			$message = 'WinCache';

			// Test for APC object cache (http://wordpress.org/extend/plugins/apc/)
		} elseif ( class_exists( 'APC_Object_Cache' ) ) {
			$message = 'APC';

			// Test for Redis Object Cache (https://github.com/alleyinteractive/wp-redis)
		} elseif ( isset( $wp_object_cache->redis ) && $wp_object_cache->redis instanceof \Redis ) {
			$message = 'Redis';

			// Test for WP LCache Object cache (https://github.com/lcache/wp-lcache)
		} elseif ( isset( $wp_object_cache->lcache ) && $wp_object_cache->lcache instanceof \LCache\Integrated ) {
			$message = 'WP LCache';

		} elseif ( function_exists( 'w3_instance' ) ) {
			$config  = w3_instance( 'W3_Config' );
			$message = 'Unknown';

			if ( $config->get_boolean( 'objectcache.enabled' ) ) {
				$message = 'W3TC ' . $config->get_string( 'objectcache.engine' );
			}
		} else {
			$message = 'Unknown';
		}
	} else {
		$message = 'Default';
	}
	return $message;
}

/**
 * Clear WordPress internal object caches.
 *
 * In long-running scripts, the internal caches on `$wp_object_cache` and `$wpdb`
 * can grow to consume gigabytes of memory. Periodically calling this utility
 * can help with memory management.
 *
 * @access public
 * @category System
 * @deprecated 1.5.0
 */
function wp_clear_object_cache() {
	global $wpdb, $wp_object_cache;

	$wpdb->queries = array();

	if ( ! is_object( $wp_object_cache ) ) {
		return;
	}

	// The following are Memcached (Redux) plugin specific (see https://core.trac.wordpress.org/ticket/31463).
	if ( isset( $wp_object_cache->group_ops ) ) {
		$wp_object_cache->group_ops = array();
	}
	if ( isset( $wp_object_cache->stats ) ) {
		$wp_object_cache->stats = array();
	}
	if ( isset( $wp_object_cache->memcache_debug ) ) {
		$wp_object_cache->memcache_debug = array();
	}
	// Used by `WP_Object_Cache` also.
	if ( isset( $wp_object_cache->cache ) ) {
		$wp_object_cache->cache = array();
	}
}

/**
 * Get a set of tables in the database.
 *
 * Interprets common command-line options into a resolved set of table names.
 *
 * @param array $args Provided table names, or tables with wildcards.
 * @param array $assoc_args Optional flags for groups of tables (e.g. --network)
 * @return array $tables
 */
function wp_get_table_names( $args, $assoc_args = array() ) {
	global $wpdb;

	$tables = array();

	// Abort if incompatible args supplied.
	if ( get_flag_value( $assoc_args, 'base-tables-only' ) && get_flag_value( $assoc_args, 'views-only' ) ) {
		\WP_CLI::error( 'You cannot supply --base-tables-only and --views-only at the same time.' );
	}

	// Pre-load tables SQL query with Views restriction if needed.
	if ( get_flag_value( $assoc_args, 'base-tables-only' ) ) {
		$tables_sql = 'SHOW FULL TABLES WHERE Table_Type = "BASE TABLE"';

	} elseif ( get_flag_value( $assoc_args, 'views-only' ) ) {
		$tables_sql = 'SHOW FULL TABLES WHERE Table_Type = "VIEW"';

	}

	if ( get_flag_value( $assoc_args, 'all-tables' ) ) {
		if ( empty( $tables_sql ) ) {
			$tables_sql = 'SHOW TABLES';
		}

		// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Query is safe, see above.
		$tables = $wpdb->get_col( $tables_sql, 0 );

	} elseif ( get_flag_value( $assoc_args, 'all-tables-with-prefix' ) ) {
		if ( empty( $tables_sql ) ) {
			$tables_sql = $wpdb->prepare( 'SHOW TABLES LIKE %s', esc_like( $wpdb->get_blog_prefix() ) . '%' );
		} else {
			$tables_sql .= sprintf( " AND %s LIKE '%s'", esc_sql_ident( 'Tables_in_' . $wpdb->dbname ), esc_like( $wpdb->get_blog_prefix() ) . '%' );
		}

		// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Query is prepared, see above.
		$tables = $wpdb->get_col( $tables_sql, 0 );

	} else {
		$scope = get_flag_value( $assoc_args, 'scope', 'all' );

		// Note: BC change 1.5.0, taking scope into consideration for network also.
		if ( get_flag_value( $assoc_args, 'network' ) && is_multisite() ) {
			$network_global_scope = in_array( $scope, array( 'all', 'global', 'ms_global' ), true ) ? ( 'all' === $scope ? 'global' : $scope ) : '';
			$wp_tables            = array_values( $wpdb->tables( $network_global_scope ) );
			if ( in_array( $scope, array( 'all', 'blog' ), true ) ) {
				// Do directly for compat with old WP versions. Note: private, deleted, archived sites are not excluded.
				$blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs WHERE site_id = $wpdb->siteid" );
				foreach ( $blog_ids as $blog_id ) {
					$wp_tables = array_merge( $wp_tables, array_values( $wpdb->tables( 'blog', true /*prefix*/, $blog_id ) ) );
				}
			}
		} else {
			$wp_tables = array_values( $wpdb->tables( $scope ) );
		}

		if ( ! global_terms_enabled() ) {
			// Only include sitecategories when it's actually enabled.
			$wp_tables = array_values( array_diff( $wp_tables, array( $wpdb->sitecategories ) ) );
		}

		// Note: BC change 1.5.0, tables are sorted (via TABLES view).
		// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- uses esc_sql_ident() and $wpdb->_escape().
		$tables = $wpdb->get_col( sprintf( "SHOW TABLES WHERE %s IN ('%s')", esc_sql_ident( 'Tables_in_' . $wpdb->dbname ), implode( "', '", $wpdb->_escape( $wp_tables ) ) ) );

		if ( get_flag_value( $assoc_args, 'base-tables-only' ) || get_flag_value( $assoc_args, 'views-only' ) ) {
			// Apply Views restriction args if needed.
			// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Query is prepared, see above.
			$views_query_tables = $wpdb->get_col( $tables_sql, 0 );
			$tables             = array_intersect( $tables, $views_query_tables );
		}
	}

	// Filter by `$args`.
	if ( $args ) {
		$args_tables = array();
		foreach ( $args as $arg ) {
			if ( false !== strpos( $arg, '*' ) || false !== strpos( $arg, '?' ) ) {
				$args_tables = array_merge(
					$args_tables,
					array_filter(
						$tables,
						function ( $v ) use ( $arg ) {
							return fnmatch( $arg, $v );
						}
					)
				);
			} else {
				$args_tables[] = $arg;
			}
		}
		$args_tables = array_values( array_unique( $args_tables ) );
		$tables      = array_values( array_intersect( $tables, $args_tables ) );
		if ( empty( $tables ) ) {
			\WP_CLI::error( sprintf( "Couldn't find any tables matching: %s", implode( ' ', $args ) ) );
		}
	}

	return $tables;
}

/**
 * Failsafe use of the WordPress wp_strip_all_tags() function.
 *
 * Automatically falls back to strip_tags() function if the WP function is not
 * available.
 *
 * @param string $string String to strip the tags from.
 * @return string String devoid of tags.
 */
function strip_tags( $string ) {
	if ( function_exists( 'wp_strip_all_tags' ) ) {
		return \wp_strip_all_tags( $string );
	}

	$string = preg_replace(
		'@<(script|style)[^>]*?>.*?</\\1>@si',
		'',
		$string
	);

	// phpcs:ignore WordPress.WP.AlternativeFunctions.strip_tags_strip_tags -- Fallback.
	$string = \strip_tags( $string );

	return trim( $string );
}


text:
<web-app>

  <servlet>
    <servlet-name>AsyncServlet</servlet-name>
    <servlet-class>AsyncServlet</servlet-class>
    <async-supported>true</async-supported>
  </servlet>

  <servlet-mapping>
    <servlet-name>AsyncServlet</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>

</web-app>

redpajama_set_name: RedPajamaGithub


text:
using Sif.Framework.Service.Compression;
using Sif.Framework.WebApi.Content;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;

namespace Sif.Framework.WebApi.Handlers
{
    /// <summary>
    /// Message handler for managing HTTP content compression. This handler is based on the solution provided in the
    /// article <see cref="http://www.ronaldrosier.net/blog/2013/07/16/implement_compression_in_aspnet_web_api">Implement compression in ASP.NET Web API</see>.
    /// </summary>
    public class CompressionHandler : DelegatingHandler
    {
        private readonly List<ICompressor> compressors = new List<ICompressor>();

        /// <summary>
        /// Create an instance of this handler based on the deflat and gzip compressors.
        /// </summary>
        public CompressionHandler() : this(new GZipCompressor(), new DeflateCompressor())
        {
        }

        /// <summary>
        /// Create an instance of this handler.
        /// </summary>
        /// <param name="compressors">Compressors used by this handler.</param>
        protected CompressionHandler(params ICompressor[] compressors) => this.compressors.AddRange(compressors);

        /// <summary>
        /// <see cref="DelegatingHandler.SendAsync(HttpRequestMessage, CancellationToken)"/>
        /// </summary>
        protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            // Handle compressed content.
            if (request.Content.Headers.ContentEncoding != null && request.Content.Headers.ContentEncoding.Any())
            {
                foreach (string encoding in request.Content.Headers.ContentEncoding)
                {
                    ICompressor compressor = compressors.SingleOrDefault(c => c.EncodingType.Equals(encoding, StringComparison.InvariantCultureIgnoreCase));

                    if (compressor != null)
                    {
                        request.Content = new DecompressedContent(request.Content, compressor);
                        break;
                    }
                }
            }

            // Handle decompressed content.
            if (request.Headers.AcceptEncoding != null && request.Headers.AcceptEncoding.Any())
            {
                HttpResponseMessage response = await base.SendAsync(request, cancellationToken);

                if (response.Content == null)
                {
                    return response;
                }

                foreach (StringWithQualityHeaderValue encoding in request.Headers.AcceptEncoding)
                {
                    ICompressor compressor = compressors.FirstOrDefault(c => c.EncodingType.Equals(encoding.Value, StringComparison.InvariantCultureIgnoreCase));

                    if (compressor != null)
                    {
                        response.Content = new CompressedContent(response.Content, compressor);
                        break;
                    }
                }

                return response;
            }

            return await base.SendAsync(request, cancellationToken);
        }
    }
}


text:
> NS_CLASS_DEPRECATED_IOS(3_2, 9_0, "UIPopoverController is deprecated. Popovers are now implemented as UIViewController presentations. Use a modal presentation style of UIModalPresentationPopover and UIPopoverPresentationController.")

`UIPopoverController` 在 iOS9 以上被弃用,建议把 `UIViewController` 的 style 设置为 `UIModalPresentationPopover` 就可以用 `UIPopoverPresentationController`

## UIPopoverPresentationController

### UIPopoverPresentationContriller 使用

```objc
UITableViewController tabCon = [[UITableViewController alloc]initWithStyle:UITableViewStylePlain];
//设置跳转模式为popover模式
tabCon.modalPresentationStyle = UIModalPresentationPopover;
//获取到UIPopoverPresentationController对象
UIPopoverPresentationController* con = tabCon.popoverPresentationController;
//设置弹出的基准视图
con.sourceView = self.view;
[self presentViewController:tabCon animated:YES completion:nil];
```

### 视图控制器类

```
@interface UIViewController

//设置内容控制器大小
@property (nonatomic) CGSize preferredContentSize

 //模态显示类型
 @property(nonatomic,assign) UIModalPresentationStyle modalPresentationStyle

 @end
```

### 视图控制器分类(适配显示)

```
@interface UIViewController (UIAdaptivePresentations)

//管理模态窗口的显示控制器(presentingViewController、presentedViewController)
@property (nonatomic,readonly) UIPresentationController *presentationController;

//模态弹出窗控制器
@property (nonatomic,readonly) UIPopoverPresentationController *popoverPresentationController ;

 @end
```

### UIPopoverPresentationController 的属性

```objc
//设置代理
@property (nullable, nonatomic, weak) id <UIPopoverPresentationControllerDelegate> delegate;
//设置允许的箭头方向
@property (nonatomic, assign) UIPopoverArrowDirection permittedArrowDirections;
//设置基准视图
@property (nullable, nonatomic, strong) UIView *sourceView;
//设置基准区域
@property (nonatomic, assign) CGRect sourceRect;
//设置是否覆盖基准视图区域
@property (nonatomic, assign) BOOL canOverlapSourceViewRect NS_AVAILABLE_IOS(9_0);
//设置基准BarButtonItem
@property (nullable, nonatomic, strong) UIBarButtonItem *barButtonItem;
//设置可以进行用户交互的视图
@property (nullable, nonatomic, copy) NSArray<UIView *> *passthroughViews;
//设置背景颜色
@property (nullable, nonatomic, copy) UIColor *backgroundColor;
//设置Margin,苹果 Bug,设置无效
@property (nonatomic, readwrite) UIEdgeInsets popoverLayoutMargins;
//设置自定义视图
@property (nullable, nonatomic, readwrite, strong) Class <UIPopoverBackgroundViewMethods> popoverBackgroundViewClass;
```

首先根据sourceView.在sourceView描绘出一块 sourceRect 的区域,然后箭头指向这块区域的中心点.

### UIPopoverPresentationControllerDelegate中的方法

```
//控制器将要弹出时调用
- (void)prepareForPopoverPresentation:(UIPopoverPresentationController *)popoverPresentationController;
//控制器将要消失时调用
- (BOOL)popoverPresentationControllerShouldDismissPopover:(UIPopoverPresentationController *)popoverPresentationController;
//控制器已经消失时调用
- (void)popoverPresentationControllerDidDismissPopover:(UIPopoverPresentationController *)popoverPresentationController;
//控制器接收到弹出消息时调用
- (void)popoverPresentationController:(UIPopoverPresentationController *)popoverPresentationController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView  * __nonnull * __nonnull)view;
```

### 使用

### References

* [UIPopoverPresentationController](https://developer.apple.com/documentation/uikit/uipopoverpresentationcontroller)
* [iOS8新特性:UIPopoverPresentationController](http://www.jianshu.com/p/52dd6dec3e9b)
* [Customizing UIPopover with UIPopoverBackgroundView](http://www.scianski.com/customizing-uipopover-with-uipopoverbackgroundview/)
* [iOS中UIPopoverController使用详解](https://my.oschina.net/u/2340880/blog/711242)


text:
        <meta charset="UTF-8">

Query Results:


text:
class CreateRefinerycmsResourcesSchema < ActiveRecord::Migration
  def self.up
    create_table ::Refinery::Resource.table_name, :force => true do |t|
      t.string   "file_mime_type"
      t.string   "file_name"
      t.integer  "file_size"
      t.datetime "created_at"
      t.datetime "updated_at"
      t.string   "file_uid"
      t.string   "file_ext"
    end unless ::Refinery::Resource.table_exists?
  end

  def self.down
    [::Refinery::Resource].reject{|m|
      !(defined?(m) and m.respond_to?(:table_name))
    }.each do |model|
      drop_table model.table_name if model.table_exists?
    end
  end
end


text:
'use strict';

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
var dsapxsum = require( './dsapxsum.native.js' );
var ndarray = require( './ndarray.native.js' );

// MAIN //

setReadOnly( dsapxsum, 'ndarray', ndarray );

// EXPORTS //

module.exports = dsapxsum;


text:
#ifndef ART_RUNTIME_GC_COLLECTOR_SEMI_SPACE_H_
#define ART_RUNTIME_GC_COLLECTOR_SEMI_SPACE_H_

#include <memory>

#include "atomic.h"
#include "base/macros.h"
#include "base/mutex.h"
#include "garbage_collector.h"
#include "gc_root.h"
#include "gc/accounting/heap_bitmap.h"
#include "immune_region.h"
#include "mirror/object_reference.h"
#include "object_callbacks.h"
#include "offsets.h"

namespace art {

class Thread;

namespace mirror {
  class Class;
  class Object;
}  // namespace mirror

namespace gc {

class Heap;

namespace accounting {
  template <typename T> class AtomicStack;
  typedef AtomicStack<mirror::Object> ObjectStack;
}  // namespace accounting

namespace space {
  class ContinuousMemMapAllocSpace;
  class ContinuousSpace;
}  // namespace space

namespace collector {

class SemiSpace : public GarbageCollector {
 public:
  // If true, use remembered sets in the generational mode.
  static constexpr bool kUseRememberedSet = true;

  explicit SemiSpace(Heap* heap, bool generational = false, const std::string& name_prefix = "");

  ~SemiSpace() {}

  virtual void RunPhases() OVERRIDE NO_THREAD_SAFETY_ANALYSIS;
  virtual void InitializePhase();
  virtual void MarkingPhase() EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_)
      LOCKS_EXCLUDED(Locks::heap_bitmap_lock_);
  virtual void ReclaimPhase() EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_)
      LOCKS_EXCLUDED(Locks::heap_bitmap_lock_);
  virtual void FinishPhase() EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_);
  void MarkReachableObjects()
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
  virtual GcType GetGcType() const OVERRIDE {
    return kGcTypePartial;
  }
  virtual CollectorType GetCollectorType() const OVERRIDE {
    return generational_ ? kCollectorTypeGSS : kCollectorTypeSS;
  }

  // Sets which space we will be copying objects to.
  void SetToSpace(space::ContinuousMemMapAllocSpace* to_space);

  // Set the space where we copy objects from.
  void SetFromSpace(space::ContinuousMemMapAllocSpace* from_space);

  // Get from space.
  space::ContinuousMemMapAllocSpace* GetFromSpace();
  // Get to space.
  space::ContinuousMemMapAllocSpace* GetToSpace();
  // Get promote space.
  space::ContinuousMemMapAllocSpace* GetPromoSpace();
  // Used by parallel copying task to determine the promoted space.
  bool IsCollectFromSpaceOnly();
  // Set whether or not we swap the semi spaces in the heap. This needs to be done with mutators
  // suspended.
  void SetSwapSemiSpaces(bool swap_semi_spaces) {
    swap_semi_spaces_ = swap_semi_spaces;
  }

  // Initializes internal structures.
  void Init();

  // Find the default mark bitmap.
  void FindDefaultMarkBitmap();

  // Updates obj_ptr if the object has moved.
  template<bool kPoisonReferences>
  void MarkObject(mirror::ObjectReference<kPoisonReferences, mirror::Object>* obj_ptr)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);
  // Used to fill a memory block when updating the forwarding pointer fails.
  ALWAYS_INLINE void FillWithDummyObject(mirror::Object* dummy_obj, size_t byte_size)
      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);

  mirror::Object* TryInstallForwardingAddress(mirror::Object* obj,
                                              space::ContinuousMemMapAllocSpace* dest_space,
                                              size_t* bytes_allocated,
                                              bool* win) ALWAYS_INLINE
      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);

  template<bool kPoisonReference>
  void MarkParallel(mirror::ObjectReference<kPoisonReference,
                    mirror::Object>* obj_ptr,
                    void* task) ALWAYS_INLINE
      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);

  void ScanObject(mirror::Object* obj)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  void VerifyNoFromSpaceReferences(mirror::Object* obj)
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  // Marks the root set at the start of a garbage collection.
  void MarkRoots()
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  // Bind the live bits to the mark bits of bitmaps for spaces that are never collected, ie
  // the image. Mark that portion of the heap as immune.
  virtual void BindBitmaps() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
      LOCKS_EXCLUDED(Locks::heap_bitmap_lock_);

  void UnBindBitmaps()
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);

  void ProcessReferences(Thread* self) EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_);

  // Sweeps unmarked objects to complete the garbage collection.
  virtual void Sweep(bool swap_bitmaps) EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);

  // Sweeps unmarked objects to complete the garbage collection.
  void SweepLargeObjects(bool swap_bitmaps) EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);

  void SweepSystemWeaks()
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  virtual void VisitRoots(mirror::Object*** roots, size_t count, const RootInfo& info) OVERRIDE
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);

  virtual void VisitRoots(mirror::CompressedReference<mirror::Object>** roots, size_t count,
                          const RootInfo& info) OVERRIDE
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);

  static mirror::Object* MarkObjectCallback(mirror::Object* root, void* arg)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  static void MarkHeapReferenceCallback(mirror::HeapReference<mirror::Object>* obj_ptr, void* arg)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  static void ProcessMarkStackCallback(void* arg)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);

  static void DelayReferenceReferentCallback(mirror::Class* klass, mirror::Reference* ref,
                                             void* arg)
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  virtual mirror::Object* MarkNonForwardedObject(mirror::Object* obj)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  virtual mirror::Object* MarkNonForwardedObjectParallel(mirror::Object* obj,
                                                         bool* win,
                                                         void* task)
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  // Schedules an unmarked object for reference processing.
  void DelayReferenceReferent(mirror::Class* klass, mirror::Reference* reference)
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  template<typename MarkVisitor, typename ReferenceVisitor>
  ALWAYS_INLINE void ScanObjectVisit(mirror::Object* obj, const MarkVisitor& visitor,
                                    const ReferenceVisitor& ref_visitor)
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);

  AtomicInteger work_chunks_created_;
  AtomicInteger work_chunks_deleted_;

 protected:
  // Returns null if the object is not marked, otherwise returns the forwarding address (same as
  // object for non movable things).
  mirror::Object* GetMarkedForwardAddress(mirror::Object* object) const
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_)
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);

  static bool HeapReferenceMarkedCallback(mirror::HeapReference<mirror::Object>* object, void* arg)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_)
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);

  static mirror::Object* MarkedForwardingAddressCallback(mirror::Object* object, void* arg)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_)
      SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);

  // Marks or unmarks a large object based on whether or not set is true. If set is true, then we
  // mark, otherwise we unmark.
  bool MarkLargeObject(const mirror::Object* obj)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_)
      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);

  // Expand mark stack to 2x its current size.
  void ResizeMarkStack(size_t new_size) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);

  // Returns true if we should sweep the space.
  virtual bool ShouldSweepSpace(space::ContinuousSpace* space) const;

  // Push an object onto the mark stack.
  void MarkStackPush(mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);

  void UpdateAndMarkModUnion()
      EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_)
      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);

  // Recursively blackens objects on the mark stack.
  void ProcessMarkStack()
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);

  inline mirror::Object* GetForwardingAddressInFromSpace(mirror::Object* obj) const
      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);

  inline bool IsMarked(mirror::Object* obj)
      SHARED_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
  // Revoke all the thread-local buffers.
  void RevokeAllThreadLocalBuffers();
  // Get the first iteration copy task size.
  size_t GetFirstIterCopySize() const;
  // Get thread count for parallel copy.
  size_t GetThreadCount() const;

  // Process the mark stack parallel.
  void ProcessMarkStackParallel(size_t thread_count)
      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);

  // Current space, we check this space first to avoid searching for the appropriate space for an
  // object.
  accounting::ObjectStack* mark_stack_;

  // Immune region, every object inside the immune region is assumed to be marked.
  ImmuneRegion immune_region_;

  // If true, the large object space is immune.
  bool is_large_object_space_immune_;

  // Destination and source spaces (can be any type of ContinuousMemMapAllocSpace which either has
  // a live bitmap or doesn't).
  space::ContinuousMemMapAllocSpace* to_space_;
  // Cached live bitmap as an optimization.
  accounting::ContinuousSpaceBitmap* to_space_live_bitmap_;
  space::ContinuousMemMapAllocSpace* from_space_;
  // Cached mark bitmap as an optimization.
  accounting::HeapBitmap* mark_bitmap_;

  Thread* self_;

  // When true, the generational mode (promotion and the bump pointer
  // space only collection) is enabled. TODO: move these to a new file
  // as a new garbage collector?
  const bool generational_;

  // Used for the generational mode. the end/top of the bump
  // pointer space at the end of the last collection.
  uint8_t* last_gc_to_space_end_;

  // Used for the generational mode. During a collection, keeps track
  // of how many bytes of objects have been copied so far from the
  // bump pointer space to the non-moving space.
  uint64_t bytes_promoted_;
  uint64_t bytes_wasted_;

  // Used for the generational mode. Keeps track of how many bytes of
  // objects have been copied so far from the bump pointer space to
  // the non-moving space, since the last whole heap collection.
  uint64_t bytes_promoted_since_last_whole_heap_collection_;

  // Used for the generational mode. Keeps track of how many bytes of
  // large objects were allocated at the last whole heap collection.
  uint64_t large_object_bytes_allocated_at_last_whole_heap_collection_;

  // Used for generational mode. When true, we only collect the from_space_.
  bool collect_from_space_only_;

  // The space which we are promoting into, only used for GSS.
  space::ContinuousMemMapAllocSpace* promo_dest_space_;

  // The space which we copy to if the to_space_ is full.
  space::ContinuousMemMapAllocSpace* fallback_space_;

  // How many objects and bytes we moved, used so that we don't need to Get the size of the
  // to_space_ when calculating how many objects and bytes we freed.
  size_t bytes_moved_;
  size_t objects_moved_;

  // How many bytes we avoided dirtying.
  size_t saved_bytes_;

  // The name of the collector.
  std::string collector_name_;

  // Used for the generational mode. The default interval of the whole
  // heap collection. If N, the whole heap collection occurs every N
  // collections.
  static constexpr int kDefaultWholeHeapCollectionInterval = 5;

  // Whether or not we swap the semi spaces in the heap during the marking phase.
  bool swap_semi_spaces_;

  Atomic<size_t> bytes_promoted_parallel_;
  Atomic<size_t> bytes_wasted_promoted_parallel_;
  Atomic<size_t> objects_promoted_parallel_;
  Atomic<size_t> objects_moved_parallel_;
  Atomic<size_t> bytes_moved_parallel_;
  Atomic<size_t> dummy_bytes_;
  Atomic<size_t> dummy_objects_;
  Atomic<size_t> fallback_bytes_parallel_;
  Atomic<size_t> fallback_objects_parallel_;
  Atomic<size_t> wasted_bytes_;

 private:
  friend class BitmapSetSlowPathVisitor;
  friend class SSBitmapSetSlowPathVisitor;
  friend class MarkStackCopyTask;
  DISALLOW_IMPLICIT_CONSTRUCTORS(SemiSpace);
};

}  // namespace collector
}  // namespace gc
}  // namespace art

#endif  // ART_RUNTIME_GC_COLLECTOR_SEMI_SPACE_H_


text:
namespace WorkForce.Models
{
    using Interfaces;
    using System;
    using System.Collections.Generic;
    using System.Linq;

    public class JobsHandler
    {
        public JobsHandler(ICollection<IJob> jobs)
        {
            this.UnfinishedJobs = jobs;
        }

        private ICollection<IJob> UnfinishedJobs { get; set; }

        public void AddAndSubscribe(IJob job)
        {
            if (job == null)
            {
                throw new ArgumentNullException("Job can not be null");
            }
            this.SubscribeToJobDone(job);
            this.Add(job);
        }
        public void HandleJobDoneEvent(object sender, EventArgs e)
        {
            if (sender == null)
            {
                throw new ArgumentNullException("Event can not be null");
            }

            var job = (IJob)sender;
            this.Remove(job);
            this.PrintFinishedJob(job);
            this.UnsubscribeJobDone(job);
        }
        public void PassWeek()
        {
            var jobsCopy = this.UnfinishedJobs.ToArray();
            for (int i = 0; i < jobsCopy.Length; i++)
            {
                jobsCopy[i].UpdateWorkProgress();
            }
        }
        public void PrintStatus()
        {
            if (this.UnfinishedJobs.Count != 0)
            {
                foreach (var job in this.UnfinishedJobs)
                {
                    Console.WriteLine(job);
                }
            }
        }

        private void Add(IJob job)
        {
            this.UnfinishedJobs.Add(job);
        }
        private void SubscribeToJobDone(IJob job)
        {
            job.JobDone += this.HandleJobDoneEvent;
        }

        private void Remove(IJob job)
        {
            if (!this.UnfinishedJobs.Contains(job))
            {
                throw new ArgumentException($"{job.ToString()} does not exist in collection");
            }

            this.UnfinishedJobs.Remove(job);
        }
        private void PrintFinishedJob(IJob job)
        {
            Console.WriteLine($"Job {job.Name} done!");
        }
        private void UnsubscribeJobDone(IJob job)
        {
            job.JobDone -= this.HandleJobDoneEvent;
        }
    }
}


text:
var App = require('../lib/App').default;
var app = new App();
app.main();


text:
package org.onedatashare.server.model.core;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Model to hold response of queue and history pages.
 *
 * Holds list of jobs for the current page number (pagination) on queue page the user is viewing
 * and the total count of jobs related to the user to generate page numbers.
 * (totalCount holds the count of all jobs in the database for history page)
 */
@Data
public class JobDetails{

    private Long totalCount;
    private List<Job> jobs;

    public JobDetails(List<Job> jobs, Long totalCount) {
        this.jobs = jobs;
        this.totalCount = totalCount;
    }
}


text:
using System;

namespace Winston
{
    public class Progress : IProgress<double>
    {
        public Action<int> UpdateInstall { get; set; } = _ => { };

        public Action<int> UpdateDownload { get; set; } = _ => { };

        public Action CompletedDownload { get; set; } = () => { };

        public Action CompletedInstall { get; set; } = () => { };

        public int Row { get; set; }

        public string Name { get; set; }

        internal int? Last { get; set; }

        internal string ProgressPrefix { get; set; }

        public void Report(double value)
        {
            UpdateInstall?.Invoke((int)Math.Round(value));
        }
    }
}


text:
import pecan
from pecan import rest
import wsmeext.pecan as wsme_pecan

from solum.api.controllers.v1.datamodel import plan
from solum.api.handlers import plan_handler
from solum.common import exception

class PlanController(rest.RestController):
    """Manages operations on a single plan."""

    def __init__(self, plan_id):
        self._id = plan_id

    @exception.wrap_controller_exception
    @wsme_pecan.wsexpose(plan.Plan)
    def get(self):
        """Return this plan."""
        handler = plan_handler.PlanHandler()
        return handler.get(self._id)

    @exception.wrap_controller_exception
    @wsme_pecan.wsexpose(plan.Plan, body=plan.Plan)
    def put(self, data):
        """Modify this plan."""
        handler = plan_handler.PlanHandler()
        return handler.update(self._id, data)

    @exception.wrap_controller_exception
    @wsme_pecan.wsexpose(status_code=204)
    def delete(self):
        """Delete this plan."""
        handler = plan_handler.PlanHandler()
        return handler.delete(self._id)

class PlansController(rest.RestController):
    """Manages operations on the plans collection."""

    @pecan.expose()
    def _lookup(self, plan_id, *remainder):
        if remainder and not remainder[-1]:
            remainder = remainder[:-1]
        return PlanController(plan_id), remainder

    @exception.wrap_controller_exception
    @wsme_pecan.wsexpose(plan.Plan, body=plan.Plan, status_code=201)
    def post(self, data):
        """Create a new plan."""
        handler = plan_handler.PlanHandler()
        return handler.create(data)

    @exception.wrap_controller_exception
    @wsme_pecan.wsexpose([plan.Plan])
    def get_all(self):
        """Return all plans, based on the query provided."""
        handler = plan_handler.PlanHandler()
        return handler.get_all()


text:
using System;
using Microsoft.AspNetCore.Http;
using Reusable.OmniLog.Abstractions;

namespace Reusable.OmniLog
{
    public class LoggerMiddlewareConfiguration
    {
        public Action<ILogScope, HttpContext> ConfigureScope { get; set; }
    }
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityQuaternion
{
    [TaskCategory("Basic/Quaternion")]
    [TaskDescription("Stores the quaternion of a forward vector.")]
    public class LookRotation : Action
    {
        [Tooltip("The forward vector")]
        public SharedVector3 forwardVector;
        [Tooltip("The second Vector3")]
        public SharedVector3 secondVector3;
        [Tooltip("The stored quaternion")]
        [RequiredField]
        public SharedQuaternion storeResult;

        public override TaskStatus OnUpdate()
        {
            storeResult.Value = Quaternion.LookRotation(forwardVector.Value);
            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            forwardVector = Vector3.zero;
            storeResult = Quaternion.identity;
        }
    }
}


text:
package com.netflix.servo.publish;

import com.netflix.servo.Metric;
import com.netflix.servo.monitor.AbstractMonitor;
import com.netflix.servo.monitor.BasicCounter;
import com.netflix.servo.monitor.LongGauge;
import com.netflix.servo.monitor.MonitorConfig;
import com.netflix.servo.monitor.StepCounter;
import com.netflix.servo.util.Clock;
import com.netflix.servo.util.ManualClock;
import com.netflix.servo.util.UnmodifiableList;
import org.testng.annotations.Test;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

import static org.testng.Assert.assertEquals;

public class NormalizationTransformTest {
  Metric newMetric(long t, double v) {
    return new Metric(MonitorConfig.builder("test").build(), t, v);
  }

  static class TimeVal {
    final long t;
    final double v;

    static TimeVal from(long t, double v) {
      return new TimeVal(t, v);
    }

    static TimeVal from(Metric m) {
      return new TimeVal(m.getTimestamp(), m.getNumberValue().doubleValue());
    }

    TimeVal(long t, double v) {
      this.t = t;
      this.v = v;
    }

    @Override
    public String toString() {
      return "TimeVal{t=" + t + ", v=" + v + '}';
    }

    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (o == null || getClass() != o.getClass()) {
        return false;
      }
      TimeVal timeVal = (TimeVal) o;
      return t == timeVal.t && Double.compare(timeVal.v, v) == 0;
    }

    @Override
    public int hashCode() {
      int result;
      long temp;
      result = (int) (t ^ (t >>> 32));
      temp = Double.doubleToLongBits(v);
      result = 31 * result + (int) (temp ^ (temp >>> 32));
      return result;
    }
  }

  void assertMetrics(long step, long heartbeat, List<Metric> input, List<TimeVal> expected) {
    ManualClock clock = new ManualClock(0);
    MemoryMetricObserver mmo = new MemoryMetricObserver("m", 1);
    MetricObserver transform = new NormalizationTransform(mmo, step, heartbeat,
        TimeUnit.MILLISECONDS, clock);

    int i = 0;
    for (Metric m : input) {
      transform.update(UnmodifiableList.of(m));
      Metric result = mmo.getObservations().get(0).get(0);
      assertEquals(TimeVal.from(result), expected.get(i));
      i++;
    }
  }

  @Test
  public void testBasic() throws Exception {
    List<Metric> inputList = UnmodifiableList.of(
        newMetric(5, 1.0),
        newMetric(15, 2.0),
        newMetric(25, 2.0),
        newMetric(35, 1.0),
        newMetric(85, 1.0),
        newMetric(95, 2.0),
        newMetric(105, 2.0));
    List<TimeVal> expected = UnmodifiableList.of(
        TimeVal.from(0, 0.5),
        TimeVal.from(10, 1.5),
        TimeVal.from(20, 2.0),
        TimeVal.from(30, 1.5),
        TimeVal.from(80, 0.5),
        TimeVal.from(90, 1.5),
        TimeVal.from(100, 2.0)
    );

    assertMetrics(10, 20, inputList, expected);
  }

  @Test
  public void testAlreadyNormalized() throws Exception {
    List<Metric> inputList = UnmodifiableList.of(
        newMetric(0, 10.0),
        newMetric(10, 20.0),
        newMetric(20, 30.0),
        newMetric(30, 10.0));
    List<TimeVal> expected = UnmodifiableList.of(
        TimeVal.from(0, 10.0),
        TimeVal.from(10, 20.0),
        TimeVal.from(20, 30.0),
        TimeVal.from(30, 10.0));
    assertMetrics(10, 20, inputList, expected);
  }

  @Test
  public void testNormalizedMissedHeartbeat() throws Exception {
    List<Metric> inputList = UnmodifiableList.of(
        newMetric(0, 10.0),
        newMetric(10, 10.0),
        newMetric(30, 10.0));
    List<TimeVal> expected = UnmodifiableList.of(
        TimeVal.from(0, 10.0),
        TimeVal.from(10, 10.0),
        TimeVal.from(30, 10.0));
    assertMetrics(10, 20, inputList, expected);
  }

  long t(int m, int s) {
    return (m * 60 + s) * 1000L;
  }

  @Test
  public void testRandomOffset() throws Exception {
    List<Metric> inputList = UnmodifiableList.of(
        newMetric(t(1, 13), 1.0),
        newMetric(t(2, 13), 1.0),
        newMetric(t(3, 13), 1.0));

    List<TimeVal> expected = UnmodifiableList.of(
        TimeVal.from(t(1, 0), 47.0 / 60.0),
        TimeVal.from(t(2, 0), 1.0),
        TimeVal.from(t(3, 0), 1.0));

    assertMetrics(60000, 120000, inputList, expected);
  }

  private List<Metric> getValue(List<? extends AbstractMonitor<? extends Number>> monitors, Clock clock) {
    List<Metric> result = new ArrayList<>();
    for (AbstractMonitor<? extends Number> m : monitors) {
      Number n = m.getValue(0);
      Metric metric = new Metric(m.getConfig(), clock.now(), n);
      result.add(metric);
    }
    return result;
  }

  private static final double DELTA = 1e-6;

  @Test
  public void testUpdate() throws Exception {
    BasicCounter basicCounter = new BasicCounter(MonitorConfig.builder("basicCounter").build());
    ManualClock manualClock = new ManualClock(0);
    StepCounter stepCounter = new StepCounter(MonitorConfig.builder("stepCounter").build(),
        manualClock);
    LongGauge gauge = new LongGauge(MonitorConfig.builder("longGauge").build());

    List<? extends AbstractMonitor<? extends Number>> monitors = UnmodifiableList.of(basicCounter,
        stepCounter, gauge);

    MemoryMetricObserver observer = new MemoryMetricObserver("normalization-test", 1);
    NormalizationTransform normalizationTransform = new NormalizationTransform(observer, 60,
        120, TimeUnit.SECONDS, manualClock);
    CounterToRateMetricTransform toRateMetricTransform =
        new CounterToRateMetricTransform(normalizationTransform, 60,
            120, TimeUnit.SECONDS, manualClock);

    double[] rates = {0.5 / 60.0, 2 / 60.0, 3 / 60.0, 4 / 60.0};
    double[] expectedNormalized = {
        rates[0] * (2.0 / 3.0), // 20000L over stepBoundary
        rates[0] * (1.0 / 3.0) + rates[1] * (2.0 / 3.0),
        rates[1] * (1.0 / 3.0) + rates[2] * (2.0 / 3.0),
        rates[2] * (1.0 / 3.0) + rates[3] * (2.0 / 3.0)};

    for (int i = 1; i < 5; ++i) {
      long now = 20000L + i * 60000L;
      long stepBoundary = i * 60000L;
      manualClock.set(now);
      basicCounter.increment(i);
      stepCounter.increment(i);
      gauge.set((long) i);
      List<Metric> metrics = getValue(monitors, manualClock);
      toRateMetricTransform.update(metrics);

      List<Metric> o = observer.getObservations().get(0);
      assertEquals(o.size(), 3);
      double basicCounterVal = o.get(0).getNumberValue().doubleValue();
      double stepCounterVal = o.get(1).getNumberValue().doubleValue();
      double gaugeVal = o.get(2).getNumberValue().doubleValue();
      assertEquals(gaugeVal, (double) i, DELTA);
      // rate per second for the prev interval
      assertEquals(stepCounterVal, (i - 1) / 60.0, DELTA);
      assertEquals(basicCounterVal, expectedNormalized[i - 1], DELTA);

      for (Metric m : o) {
        assertEquals(m.getTimestamp(), stepBoundary);
      }
    }

    // no updates to anything, just clock forward
    int i = 5;
    manualClock.set(i * 60000L + 20000L);
    List<Metric> metrics = getValue(monitors, manualClock);
    toRateMetricTransform.update(metrics);
    List<Metric> o = observer.getObservations().get(0);
    assertEquals(o.size(), 3);

    double basicCounterVal = o.get(0).getNumberValue().doubleValue();
    double stepCounterVal = o.get(1).getNumberValue().doubleValue();
    double gaugeVal = o.get(2).getNumberValue().doubleValue();

    assertEquals(gaugeVal, (double) 4, DELTA); // last set value
    assertEquals(stepCounterVal, 4 / 60.0, DELTA);
    assertEquals(basicCounterVal, (1 / 3.0) * rates[3]);
  }

  @Test
  public void testExpiration() {
    BasicCounter c1 = new BasicCounter(MonitorConfig.builder("c1").build());
    BasicCounter c2 = new BasicCounter(MonitorConfig.builder("c2").build());
    BasicCounter c3 = new BasicCounter(MonitorConfig.builder("c3").build());
    ManualClock manualClock = new ManualClock(0);

    MemoryMetricObserver observer = new MemoryMetricObserver("normalization-test", 1);
    NormalizationTransform normalizationTransform = new NormalizationTransform(observer, 60,
        120, TimeUnit.SECONDS, manualClock);
    CounterToRateMetricTransform toRateMetricTransform =
        new CounterToRateMetricTransform(normalizationTransform, 60,
            120, TimeUnit.SECONDS, manualClock);

    manualClock.set(30000L);
    c1.increment();
    Metric m1 = new Metric(c1.getConfig(), manualClock.now(), c1.getValue(0));

    toRateMetricTransform.update(UnmodifiableList.of(m1));
    assertEquals(NormalizationTransform.HEARTBEAT_EXCEEDED.getValue(0).longValue(), 0);
    List<Metric> o = observer.getObservations().get(0);
    assertEquals(o.size(), 1);

    manualClock.set(100000L);
    Metric m2 = new Metric(c2.getConfig(), manualClock.now(), c2.getValue());
    toRateMetricTransform.update(UnmodifiableList.of(m2));
    assertEquals(NormalizationTransform.HEARTBEAT_EXCEEDED.getValue(0).longValue(), 0);

    manualClock.set(160000L);
    Metric m3 = new Metric(c3.getConfig(), manualClock.now(), c3.getValue());
    toRateMetricTransform.update(UnmodifiableList.of(m3));
    assertEquals(NormalizationTransform.HEARTBEAT_EXCEEDED.getValue(0).longValue(), 1);

  }
}


text:
<colgroup>
<col>
<col>
</colgroup>

NUTS areas operative from Jan 2012	NUTS areas operative from Jan 2015

Inner London	Inner London – East

 	Inner London – West

Outer London	Outer London - East and North East

 	Outer London – South

 	Outer London – West and North West


text:
@import './styles/foo';

body {
  /* @import 'resources.scss';
  color: $color1; */

  font-weight: bold;
  background-image: url('./assets/logo.png');
}
:local(.continueButton) {
  color: green;
}


text:
#include <core/collection_types.h>
#include "bytecodes.h"

namespace fry_script
{
	struct Interpreter
	{
		///
		Interpreter( foundation::Allocator& Alloc ) :
			_Stack( Alloc )
		{
		}

		foundation::Array<u8> _Stack;
	};
}

#endif


text:
package autodiff.reasoning.expressions;

import java.util.ArrayList;
import java.util.List;

/**
 * @author codistmonk (creation 2015-04-19)
 */
public abstract interface ExpressionCombiner extends ExpressionZipper<Object> {

	@Override
	public default Object visit(final List<?> expression1, final List<?> expression2) {
		final int n = expression1.size();

		if (n != expression2.size()) {
			return null;
		}

		final List<Object> result = new ArrayList<>(n);

		for (int i = 0; i < n; ++i) {
			final Object element = this.apply(expression1.get(i), expression2.get(i));

			if (element == null) {
				return null;
			}

			result.add(element);
		}

		return result;
	}

}


text:
package me.Bleuzen.RPGHealthPlus;

import com.gmail.filoghost.holographicdisplays.api.Hologram;
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI;
import org.bukkit.Bukkit;
import org.bukkit.Location;

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Locale;

public class Utils {

    private static DecimalFormat doubleFormat = new DecimalFormat("#.##", new DecimalFormatSymbols(Locale.ENGLISH));

    static void showHologram(Location loc, String txt) {
        final Hologram holo = HologramsAPI.createHologram(Main.getInstance(), loc);
        holo.appendTextLine(txt);
        Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), new Runnable() {
            @Override
            public void run() {
                holo.delete();
            }
        }, Main.getInstance().cfg.getInt("configuration.xp-holograms-time"));
    }

    static double evaluate(String input) {
        return formatDouble(eval(input));
    }

    // Source: http://stackoverflow.com/a/26227947/6627190
    private static double eval(final String str) {
        return new Object() {
            int pos = -1, ch;

            void nextChar() {
                ch = (++pos < str.length()) ? str.charAt(pos) : -1;
            }

            boolean eat(int charToEat) {
                while (ch == ' ') {
                    nextChar();
                }
                if (ch == charToEat) {
                    nextChar();
                    return true;
                }
                return false;
            }

            double parse() {
                nextChar();
                double x = parseExpression();
                if (pos < str.length()) {
                    throw new RuntimeException("Unexpected: " + (char) ch);
                }
                return x;
            }

            // Grammar:
            // expression = term | expression `+` term | expression `-` term
            // term = factor | term `*` factor | term `/` factor
            // factor = `+` factor | `-` factor | `(` expression `)`
            //        | number | functionName factor | factor `^` factor

            double parseExpression() {
                double x = parseTerm();
                for (; ; ) {
                    if (eat('+')) {
                        x += parseTerm(); // addition
                    } else if (eat('-')) {
                        x -= parseTerm(); // subtraction
                    } else {
                        return x;
                    }
                }
            }

            double parseTerm() {
                double x = parseFactor();
                for (; ; ) {
                    if (eat('*')) {
                        x *= parseFactor(); // multiplication
                    } else if (eat('/')) {
                        x /= parseFactor(); // division
                    } else {
                        return x;
                    }
                }
            }

            double parseFactor() {
                if (eat('+')) {
                    return parseFactor(); // unary plus
                }
                if (eat('-')) {
                    return -parseFactor(); // unary minus
                }

                double x;
                int startPos = this.pos;
                if (eat('(')) { // parentheses
                    x = parseExpression();
                    eat(')');
                } else if ((ch >= '0' && ch <= '9') || ch == '.') { // numbers
                    while ((ch >= '0' && ch <= '9') || ch == '.') {
                        nextChar();
                    }
                    x = Double.parseDouble(str.substring(startPos, this.pos));
                } else if (ch >= 'a' && ch <= 'z') { // functions
                    while (ch >= 'a' && ch <= 'z') {
                        nextChar();
                    }
                    String func = str.substring(startPos, this.pos);
                    x = parseFactor();
                    if (func.equals("sqrt")) {
                        x = Math.sqrt(x);
                    } else if (func.equals("sin")) {
                        x = Math.sin(Math.toRadians(x));
                    } else if (func.equals("cos")) {
                        x = Math.cos(Math.toRadians(x));
                    } else if (func.equals("tan")) {
                        x = Math.tan(Math.toRadians(x));
                    } else {
                        throw new RuntimeException("Unknown function: " + func);
                    }
                } else {
                    throw new RuntimeException("Unexpected: " + (char) ch);
                }

                if (eat('^')) {
                    x = Math.pow(x, parseFactor()); // exponentiation
                }

                return x;
            }
        }.parse();
    }

    static Double formatDouble(double in) {
        return Double.parseDouble(formatDoubleToString(in));
    }

    static String formatDoubleToString(double in) {
        return doubleFormat.format(in);
    }

    static int toInt(double in) {
        return (int) Math.round(in);
    }

}


text:
/**** Official looking Shadowrun Anarchy Sheet ****/
	/**** Colors:
		Blue headers - #4f7da7;
		Yellow -  #e9b230;
		TanRows - #8c9180;
	****/

button {
	background-color: transparent;
	background-image: none;
	border-color: transparent;
	border: none;
	box-shadow: none;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 0.8em;
	font-weight: bold;
	text-shadow: none;
}

button:hover,
button:focus {
	background-color: transparent;
}

.ui-dialog .charsheet button[type=roll] {
	margin: 0px 0px 0px 0px;
	padding: 2px 0px;
}

button:before {
	display: none;
}

h1 {
	text-align: center;
	text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;;
}

h2 {
	text-align: center;
}

h1, h3 {
	color: #ffffff;
}

h1, h2, h3, h4 {
	font-family: monospace;
	text-transform: uppercase;
}

img {
	margin-bottom: -4px;
}

input {
	-webkit-box-shadow: none;
	border-bottom: 1px solid;
	border-radius: 0px;
	font-size: 0.8em;
}

input[type="checkbox"],
input[type="radio"] {
	opacity: 0;
	z-index: 1;
    position: relative;
}

input[type="number"],
input[type="text"] {
	font-size: 1em;
	font-weight: bold;
	text-align: center;
}

textarea,
textarea::-webkit-input-placeholder {
	background: transparent;
	resize: vertical;
	border: 0px;
	height: inherit;
	font-size: 0.8em;
	overflow-wrap: break-word;
	white-space: pre-line;
}

/**** emoves the arrows for increase numbers ****/

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button,
select {
  -webkit-appearance: none;
  margin: 0;
}

.charsheet {
	margin-left: -10px;
}

img.sheet-header {
	width: 850px;
}

/**** Repeating Sections Styled ****/

.repcontrol {
	display: inline-block;
	width: 100%;
    border-radius: 25px;
    margin-bottom: 5px;
}

.repcontainer {
	vertical-align: top;
}

.repcontainer .repitem {
	width: 32.5%;
	display: inline-block;
	margin: 0px 3px 0px 3px;
}

.sheet-bubblerow .repcontainer {
	margin-bottom: -20px;
}

.sheet-bubblerow .repcontainer .repitem {
	height: auto;
	margin-bottom: 5px;
	vertical-align: top;
	width: 32%;
}

.sheet-bubblerow .repcontrol {
	margin-top: 25px;
}

.sheet-weaponsection .repcontainer {
	margin-top: -25px;
	margin-bottom: 20px;
}

.repcontrol .repcontrol_add, .repcontrol .repcontrol_edit {
	font-family: Helvetica, Arial, sans-serif;
	font-size: 10px;
    color: white;
    letter-spacing: .12em;
    background: #59595b;
    border: none;
}

.repcontrol .repcontrol_add:hover,
.repcontrol .repcontrol_edit:hover {
	background: #4f7da7;
}

.repcontrol .repcontrol_add {
    border-radius: 0px 20px 20px 0px;
    border-left: 10px solid #001323;
}

.repcontrol .repcontrol_edit {
    border-radius: 20px 0px 0px 20px;
    border-right: 10px solid #001323 ;
}

.itemcontrol {
    z-index: 10;
}

.itemcontrol .repcontrol_del,
.itemcontrol .repcontrol_move {
    margin-top: 5px;
    padding: 0px;
    height: 20px;
    width: 20px;
}

.itemcontrol .repcontrol_del {
	color: #4f7da7;
	font-family: pictos;
    font-size: 15px;
}

.itemcontrol .repcontrol_move {
    font-size: 10px;
}

/**** Sheet Page ****/

.sheet-container {
	width: 850px;
	font-family: sans-serif;
	font-weight: bolder;
	align-content: center;
}

/**** PC Page ****/

.sheet-pc {
	background-color: #ffffff;
	border: 1px solid #000;
}

.sheet-row-name {
	display: inline-block;
	border: 1px solid #000000;
	border-radius: 0em 0em 1em 1em;
}

.sheet-tan {
	background-color: #8c9180;
}

.sheet-tan h2 {
	color: #ffffff;
}

.sheet-col-name {
    width: 80%;
}

.sheet-col-name input {
    width: 90%;
    background: none;
    height: 35px;
    border: none;
    text-transform: uppercase;
    font-size: 2em;
    margin-left: 120px;
    box-shadow: none;
    color: #000000;
}

.sheet-special input[type="checkbox"] {
	left: 56px;
}

.sheet-special input[type="checkbox"],
.sheet-special input[type="checkbox"] + span {
	height: 15px;
	width: 55px;
}

.sheet-special input[type="checkbox"]:hover + span,
.sheet-special input[type="checkbox"]:checked + span {
	color: #4f7da7;
}

/**** Format the Attribute area ****/

.sheet-attribute {
	height: 9em;
}

.sheet-attribute .sheet-col {
	text-align: center;
	width: 15.5%;
}

.sheet-attribute .sheet-col:nth-child(1) {
	margin-left: -5px;
	margin-right: -5px;
}

.sheet-attribute h1 {
	font-size: 1.5em;
}

.sheet-attribute h1:hover {
	color: #4f7da7;
	text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.sheet-attribute input[type="number"] {
	background: transparent;
	border: none;
	box-shadow: none;
	color: white;
	font-size: 4em;
	margin: 0em 0em .2em 0em;
	text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
	width: 1.5em;
}

/**** Format the Toggle Gears ****/

.sheet-toggle input[type="checkbox"] {
	height: 20px;
    width: 30px;
}

.sheet-toggle input[type="checkbox"] + span {
	font-family: pictos;
	font-size: 16px;
	position: relative;
}

/**** Inputs for Karma ****/

.sheet-karma {
	display: inline-flex;
	margin: -1em 0em -4em 40em;
	float: right;
}

.sheet-karma-bubbles {
	background: white;
	color: black;
	width: 115px;
	height: 35px;
	text-shadow: none;
	text-align: center;
	font-weight: bold;
	border: 1px solid black;
	border-radius: 10px 10px 10px 10px;
	margin: 0em 1em 0em 0em;
}

.sheet-karma-bubbles input[type="number"] {
	border: none;
	height: 1.5em;
	margin-top: -1.8em;
	width: 5em;
}

.sheet-karma label {
	font-size: 0.9em;
	text-align: center;
}

/**** Dispositions Customizations ****/

.sheet-dispositionsrow {
	border-top: 2px solid #000;
	box-shadow: 0px -5px 5px -5px;
}

.sheet-dispositionsrow h2 {
	left: 37%;
	margin-bottom: 10px;
	margin-top: -15px;
	position: relative;
	width: 30%;
}

.sheet-dispositionsrow .sheet-textbox,
.sheet-cuerow .sheet-textbox {
	margin: -20px 0px 0px 0px !important;
}

.sheet-dispositions input {
	width: 45%;
	display: inline-block;
	border: none;
	border-bottom: 1px solid black;
	border-radius: 0px 0px 0px 0px;
	margin: 0em 0em 0em 1.5em;
}

/**** Format the Skill Capsules ****/

.sheet-skillrow {
	border-top: 3px solid #000;
}

.sheet-skillrow h2 {
	left: 34.5%;
	position: relative;
	top: -40px;
	width: 30%;
}

.sheet-skillbox {
	min-height: 40px;
	display: inline-block;
	width: 95%;
	background: #ffffff;
	resize: none;
	margin: 10px 0px 10px 15px;
	box-shadow: none;
	border: 1.4px solid #000000;
	border-radius: 15px 15px 15px 15px;
	box-shadow: none;
	text-align: center;
}

.sheet-skillbox input {
	border: none;
	border-bottom: 1px solid black;
	border-radius: 0px 0px 0px 0px;
}

.sheet-skillbox input[type="text"] {width: 75%;}

.sheet-skillbox input[type="text"]:last-child {width: 85%;}

.sheet-skillbox input[type="number"],
.sheet-ampbox input[type="number"] {width: 10%;}

.sheet-skillname {
	color: black;
	font-size: 0.65em;
	font-weight: bold;
	line-height: 35px;
	text-shadow: none;
	text-transform: uppercase;
}

span.sheet-skillname:hover {
	color: #4f7da7;
	background-color: none;
}

.sheet-skillheader {
	display: inline-block;
	width: 80%;
}

.sheet-skillheader button[type="roll"] {
	padding: 0px;
	margin: 0px;
}

.sheet-skillcontainer {
	width: 20%;
	margin-top: 0.5em;
	float: right;
}

.sheet-skillcontainer,
.sheet-skillbox select {
	color:#ffffff;
	text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.sheet-skillcontainer span {font-size: 1.5em;}

.sheet-skillbox select {
	background-color: transparent;
	border: none;
	box-shadow: none;
	font-size: 1.5em;
	height: inherit;
	margin-left: -5px;
	margin-top: -8px;
	text-align: center;
	width: 76%;
}

.sheet-option {color: black;}

/****Start of AMP area ****/

.sheet-essence-box {
	display: inline-block;
	width: 80%;
	z-index: 1;
	position: relative;
	margin-top: -15px;
	margin-left: 42px;
}

.sheet-essence-box h2,
.sheet-essence-box h3,
.sheet-essence-box input[type="text"] {
	display: inherit;
	text-align: center;
}

.sheet-essence-box h2 {margin-left: 22.5%;}

.sheet-essence-box h3 {margin-left: 2%;}

.sheet-essence-input {
	background: none;
	border: 1px solid #ffffff2b;
	color: #ffffff;
	font-size: 1em;
	margin-bottom: 3px;
	margin-right: 5px;
	width: 2em !important;
}

.sheet-essence-note {
	width: 14em;
	background: #ffffff;
	border: 1px solid #000000;
	border-radius: 5px 5px 5px 5px;
	margin-right: 2%;
	text-align: left;
}

/**** Amps ****/

.sheet-amprow {
	border-top: 1px solid #000;
	box-shadow: 0px -5px 5px -5px;
}

.sheet-ampbox input[type="text"] {width: 80%; margin-top: 2px;}

.sheet-ampbox textarea {
	width: 90%;
	margin-top: 5px;
	border: none;
}

.sheet-amprating {
	border-radius: 50%;
    width: 25px;
    height: 25px;
	background: white;
	border: 1px solid;
	margin-left: -14px;
	margin-top: 10px;
	float: left;
	font-size: 0.8em;
}

.sheet-amprating span {
	position: relative;
	top: 4px;
}

.sheet-ampheader {width: 100%;}

.sheet-ampheader button {
	margin-top: -8px !important;
}

.sheet-textcontainer {
	margin-top: -12px;
	font-weight: normal;
	font-style: italic;
	font-size: 0.9em;
	overflow: hidden;
	overflow-wrap: break-word;
	white-space: pre-line;
	padding: 0px 3px;
}

/**** Formating the Cues inputs ****/

.sheet-cues,
.sheet-gear {
	-webkit-box-shadow: none;
	background-color: #ffffff;
	background-image: repeating-linear-gradient(transparent, transparent 29px, #000000 30px, #000000 20px, white 31px);
	display: inline-block;
	margin: 0px 10px 10px 15px;
	min-height: 35px;
	resize: none;
	text-align: left;
	vertical-align: top;
	width: 46%;
}

.sheet-gear {
	margin-bottom: 20px;
}

.sheet-textbox textarea,
.sheet-cues span,
.sheet-gear span {
	font-size: 1em;
	line-height: 2.45em;
	font-weight: normal;
	padding: 8px 5px;
	white-space: pre-line;
}

/**** Customize all the inputs & their spans ****/

.sheet-toggle input[type="checkbox"] + span  {
	display: none;
}

.sheet-toggle input[type="checkbox"]:hover + span,
.sheet-toggle input[type="checkbox"]:checked + span {
	display: inline-block;
	color: #e9b230;
	text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.sheet-options-flag ~ .sheet-options,
.sheet-options-flag:checked ~ .sheet-display {
	display: none;
}

.sheet-options-flag:checked ~ .sheet-options,
.sheet-options-flag ~ .sheet-display {
	display: block;
}

.sheet-dispositionsrow input[type="checkbox"],
.sheet-dispositionsrow input[type="checkbox"] + span {
	left: 61%;
	top: -20px;
}

.sheet-dispositionsrow input[type="checkbox"] + span {
	left: 58%;
}

.sheet-cuerow input[type="checkbox"] {
	left: 53%;
	top: -23px;
}

.sheet-cuerow input[type="checkbox"] + span {
	left: 50%;
	top: -23px;
}

.sheet-bubblerow .sheet-toggle input[type="checkbox"],
.sheet-bubblerow .sheet-toggle input[type="checkbox"] + span  {
	position: absolute;
	left: 95%;
	top: 5px;
}

.sheet-bubblerow .sheet-toggle input[type="checkbox"] + span {
	left: 97%;
}

.sheet-unarmedbox input[type="checkbox"],
.sheet-unarmedbox input[type="checkbox"] + span {
	left: 50%;
	top: -35px;
}

.sheet-unarmedbox input[type="checkbox"] + span {
	left: 41%;
}

.sheet-weaponbox input[type="checkbox"] {
	left: 78%;
	top: 0px;
}

.sheet-weaponbox input[type="checkbox"] + span {
	left: 69%;
	top: 0px;
}

.sheet-armorsection .sheet-toggle input[type="checkbox"],
.sheet-armorsection .sheet-toggle input[type="checkbox"] + span {
	left: 155px;
	top: -25px;
}

.sheet-armorsection .sheet-toggle input[type="checkbox"] + span {
	left: 130px;
}

.sheet-geartoggle input[type="checkbox"],
.sheet-geartoggle input[type="checkbox"] + span,
.sheet-contacttoggle input[type="checkbox"],
.sheet-contacttoggle input[type="checkbox"] + span {
	left: 27%;
	top: -7px;
}

.sheet-geartoggle input[type="checkbox"] + span {
	left: 18%;
}

.sheet-contacttoggle input[type="checkbox"] {
	left: 47%;
}

.sheet-contacttoggle input[type="checkbox"] + span {
	left: 38%;
}

/**** Cues customizations ****/

.sheet-cuerow {
	border-bottom: none;
	border-top: 1px solid #000;
}

.sheet-cuerow h2 {
	position: relative;
	top: -15px;
	width: 10%;
	left: 45%;
}

/**** Qualities ****/

.sheet-ampbox {
	background: #ffffff;
	border-radius: 15px 15px 15px 15px;
	border: 1.4px solid #000000;
	box-shadow: none;
	display: inline-block;
	margin: 0px 0px 5px 8px;
	min-height: 35px;
	resize: none;
	text-align: center;
	width: 95%;
}

.sheet-ampbox input  {
	border: none;
	border-bottom: 1px solid black;
	border-radius: 0px 0px 0px 0px;
}

.sheet-quality-pos + span,
.sheet-quality-neg + span {
	font-family: pictos;
	position: relative;
}

.sheet-quality-pos,
.sheet-quality-neg  {
	left: 5%;
	top: 25px;
}

.sheet-quality-neg {
	left: 82%;
}

.sheet-quality-pos + span,
.sheet-quality-neg + span  {
	left: 0%;
	top: 23px;
}

.sheet-quality-neg + span {
	left: 77.5%;
}

.sheet-quality-neg:checked ~ .sheet-ampbox,
.sheet-quality-neg[value="negative"] ~ .sheet-skillbox {
	border: 2px dashed;
}

.sheet-quality-pos:checked ~ .sheet-ampbox,
.sheet-quality-pos[value="positive"] ~ .sheet-skillbox {
	border: 1px solid;
}

.sheet-quality-neg:hover + span,
.sheet-quality-pos:hover + span,
.sheet-quality-neg:checked + span,
.sheet-quality-pos:checked + span  {
	color: #4f7da7;
}

.sheet-qualityrow {
	border-top: none;
}

/**** Weapons ****/

.sheet-weaponrow {
	border-top: 1px solid #000;
}

.sheet-weaponrow h2 {
	position: relative;
	width: 30%;
	top: -17px;
	left: 19%;
}

.sheet-unarmedbox,
.sheet-weaponsection,
.sheet-weaponbox,
.sheet-armorsection {
	display: inline-block;
	background: #ffffff;
}

.sheet-unarmedbox,
.sheet-weaponsection {
	border: 1.4px solid #000000;
}

.sheet-unarmedbox,
.sheet-weaponbox {
	min-height: 35px;
	width: 33%;
	resize: none;
	box-shadow: none;
	text-align: center;
	border-radius: 15px 15px 15px 15px;
}

.sheet-weaponsection {
	width: 98%;
	min-height: 150px;
	border-radius: 5px 5px 0px 0px;
	border-bottom: none;
	margin: -20px 0px 0px 8px;
}

.sheet-unarmedbox {
	width: 29%;
	height: 45px;
	position: relative;
	top: -25px;
	left: 40%;
}

.sheet-unarmedheader {
	width: 28%;
	margin-top: 15px;
	margin-left: 5px;
}

.sheet-unarmedheader h4 {font-size: 1em;}

.sheet-unarmeddamagebox {
	width: 66%;
	margin: -35px 0px 0px 75px;
}

.sheet-weaponsubtitlesbox label {
	display: inline-block;
	padding: 0px;
	width: 22%;
}

.sheet-weaponlabels {
	display: inline-block;
	width: 21%;
}

.sheet-weaponsubtitlesbox label,
.sheet-weaponlabels label {
	color: #59595b;
	font-size: 0.7em;
	text-align: center;
	margin-bottom: 15px;
	margin-top: 2px;
	text-transform: uppercase;
}

.sheet-weaponbox {
	display: inline-block;
	width: 98%;
	margin: 5px 0px 5px 2px;
}

.sheet-weapondamagebox {
	display: inline-block;
	margin: 0px 0px 0px 0px;
}

.sheet-options-flag:checked ~ div.sheet-options.sheet-weapondamagebox {
	display: inline-block;
	margin-top: -10px;
}

.sheet-unarmeddamagebox input[type="text"],
.sheet-weapondamagebox input[type="text"] {
	font-size: 1em;
	margin-right: 2px;
	padding: 0px;
	text-transform: uppercase;
	width: 20%;
}

.sheet-weapondamagebox input[type="text"] {
	width: 21%;
}

.sheet-weaponsubtitlesbox .sheet-weaponslabel label {
	font-size: 0.7em;
	margin-bottom: 0px;
}

.sheet-weaponsubtitlesbox {
	width: 51%;
	float: right;
}

.sheet-weaponheader {
	width: 50%;
	float: left;
}

.sheet-weaponheader input[type="text"] {
	float: left;
	margin-bottom: 5px;
	text-transform: none;
	width: 100%;
}

.sheet-display .sheet-weaponheader div.sheet-weaponslabel {
	width: 100%;
}

.sheet-weaponheader span:last-child {
	font-size: 0.7em;
	font-weight: normal;
}

.sheet-weaponbody {
	width: 50%;
	display: inline-block;
	vertical-align: top;
}

/**** Condition Monitor ****/

.sheet-conrow {
	display: inline-block;
	border-top: 1px solid #000;
	border-bottom: 1px solid #000;
}

.sheet-conrow h1 {
	width: 40%;
	font-size: 25px;
	position: relative;
	top: -30px;
	left: 31%;
}

.sheet-conrow img {
	position: relative;
	vertical-align: top;
}

img.sheet-conmiddec {
	width: 12%;
	transform: rotate(12deg);
	top: 5px;
	left: 50px;
}

img.sheet-conrightdec {
	width: 5%;
	top: -35px;
	left: 130px;
}

img.sheet-conleftdec {
	width: 5%;
	top: -35px;
	left: -28px;
}

img.sheet-conrightdec {
	-webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}

/**** Indent the rows of circles ****/

.sheet-circles5 {margin-left: 5px;}

.sheet-circles15 {margin-left: 15px;}

.sheet-circles25 {margin-left: 25px;}

.sheet-circles35 {margin-left: 35px;}

/**** Armor Section ****/

.sheet-armorbox {
	display: inline-block;
	width: 32%;
	vertical-align: top;
	margin-top: -5px;
}

.sheet-armorbox h1 {
	margin: 0px 0px -55px 160px;
	position: relative;
	top: -85px;
	left: 0px;
}

.sheet-armorsection {
	width: 99%;
	min-height: 180px;
	border: 1.5px solid #000;
	border-radius: 0px 15px 0px 0px;
}

.sheet-armorsection img {
	position: relative;
	left: 1%;
}

.sheet-armorsection input[type="text"] {
	border: none;
	border-bottom: 1px solid;
	font-weight: bold;
	margin-left: 5px;
	margin-top: 5px;
	text-align: right;
	vertical-align: top;
	width: 70%;
}

.sheet-armorsection input[type="number"] {
	margin-top: 5px;
}

.sheet-armorsection .sheet-toggle .sheet-options {
	margin: -18px 2px 0px 2px;
	text-align: right;
}

.sheet-armorsection .sheet-toggle .sheet-display {
	margin-top: -10px;
	margin-bottom: 5px;
}

.sheet-armorcircles {
	width: 60%;
	margin: -85px 0px 0px 100px;
}

.sheet-armorcircles input[type="radio"] {
	height: 25px;
	left: 1px;
	margin-right: -3px;
	top: -7px;
	width: 25px;
}

.sheet-armor {
	width: 70%;
	display: inline-block;
	margin: -18px 0px 0px 75px;
	box-shadow: none;
	border-bottom: 1.4px solid #000000;
	border-radius: 0px 0px 0px 0px;
	text-align: right;
}

/**** Physiocal & Stun Damage track areas****/

.sheet-conditionbox {
	width: 37%;
	display: inline-block;
	vertical-align: top;
	color: #fff;
	margin: -45px 2px 0px -205px;
}

.sheet-conditionsection {
	display: inline-block;
	width: 41%;
	vertical-align: top;
	margin: -10px 5px 0px 15px;
}

.sheet-conditionsection h2,
.sheet-edgesection h2 {
	font-size: 18px;
	text-align: center;
}

.sheet-edgesection {
	width: 40%;
	display: inline-block;
	margin-top: -30px;
	margin-left: 25px;
}

.sheet-edgesection h2 {
	margin-bottom: -5px;
}

.sheet-conditioncircles input[type="radio"],
.sheet-edgecircles input[type="radio"] {
	height: 20px;
	left: 2px;
	top: -7px;
	width: 20px;
}

.sheet-edgecircles input[type="radio"] {
	top: -5px;
}

.sheet-armorcircles input[type="radio"] + span,
.sheet-conditioncircles input[type="radio"] + span,
.sheet-edgecircles input[type="radio"] + span {
	background: #ffffff;
	border-radius: 50%;
	border: 1px solid #000;
	display: inline-block;
	height: 20px;
	margin-left: -20px;
	width: 20px;
}

.sheet-armorcircles input[type="radio"] + span {
	font-size: 0.8em;
}

.sheet-edgecircles input[type="radio"],
.sheet-edgecircles input[type="radio"] + span {
	height: 15px;
	width: 15px;
}

.sheet-edgecircles input[type="radio"] + span {
	margin-left: -15px;
}

.sheet-condigit {
	margin-left: 5px;
	vertical-align: top;
}

	/* Hiding Physical & Stun bubbles */
input[type="hidden"][value="false"] + input[type="radio"],
input[type="hidden"][value="false"] + input[type="radio"] + span,
input[type="hidden"][value="false"] + input[type="radio"] + span + div,
input[type="hidden"][value="false"] + input[type="radio"] + span + span {
	display: none;
}

/**** Color fill for Armor, Condition tracks, Edge, and plot ****/

.sheet-conditioncircles input[type="radio"] + span,
.sheet-armorcircles input[type="radio"] + span,
.sheet-edgecircles input[type="radio"] + span {
	content: "";
	background-color: #4f7da7;
}

.sheet-armorcircles input[type="radio"]:checked ~ input[type="radio"] + span,
.sheet-conditioncircles input[type="radio"]:checked ~ input[type="radio"] + span,
.sheet-edgecircles input[type="radio"]:checked ~ input[type="radio"] + span,
input.sheet-radio-header-armor:checked ~ .sheet-armorcircles input[type="radio"] + span,
input.sheet-radio-header-physical:checked ~ .sheet-conditioncircles input[type="radio"] + span,
input.sheet-radio-header-small:checked ~ .sheet-conditioncircles input[type="radio"] + span,
input.sheet-radio-header-small:checked ~ .sheet-edgecircles input[type="radio"] + span   {
	content: "";
	background-color: #fff;
}

input.sheet-radio-header-armor {
	height: 20px;
	left: 65%;
	top: -60px;
	width: 80px;
}

input.sheet-radio-header-physical,
input.sheet-radio-header-small {
	height: 15px;
	left: 17%;
	top: 24px;
	width: 80px;
}

input.sheet-radio-header-small {
	left: 30%;
	width: 50px;
}

input.sheet-radio-header-armor:hover + h1,
input.sheet-radio-header-physical:hover + h2,
input.sheet-radio-header-small:hover + h2  {
	color: #4f7da7;
	text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

/**** Gear & Contact Section ****/

.sheet-gearbox,
.sheet-gear {
	display: inline-block;
	resize: none;
	-webkit-box-shadow: none;
	text-align: left;
}

.sheet-gearbox {
	min-height: 40px;
	width: 32%;
	vertical-align: top;
	margin-left: -13px;
	margin-top: -30px;
}

.sheet-gearbox h1 {
	text-align: left;
	margin-left: 20px;
	position: inherit;
}

.sheet-gearbox textarea {
	padding: 0px;
	min-height: 50px;
}

.sheet-gear {
	width: 100%;
	min-height: 50px;
	vertical-align: top;
	border: 1.5px solid #000000;
	border-radius: 15px 0px 0px 15px;
	margin: -5px 0px 0px 0px;
}

div.sheet-textbox.sheet-toggle.sheet-geartoggle,
div.sheet-textbox.sheet-toggle.sheet-contacttoggle {
	margin-top: -23px;
}

div.sheet-gear.sheet-contact,
div.sheet-gearback.sheet-contact  {
	border-bottom-left-radius: 0px;
}

/**** Roll Toggles in the Skills section ****/

.sheet-roll-toggles {
	color: #000;
	font-family: "pictos";
	font-size: 18px;
	position: relative;
	top: 35px;
	width: 42%;
}

.sheet-roll-toggles input {
	height: 20px;
	width: 20px;
}

.sheet-toggle-buttons {
	display: inline-block;
	width: 54%;
}

.sheet-toggle-toggles {
	display: inline-block;
	font-size: 23px;
	left: -10px;
	letter-spacing: -12px;
	position: relative;
	top: -4px;
	width: 40%;
}

span.sheet-pictosC {
	font-family: "Pictos Custom";
}

span.sheet-lightening {
	color: #8c9180;
	font-family: "pictos";
	font-size: 0.7em;
	left: -15px;
	position: relative;
	top: -4px;
}

span.sheet-glitch {
	position: relative;
	left: -10px;
	top: -2px;
}

span.sheet-d6 {
	font-family: "dicefontd6";
	position: relative;
	left: -10px;
	top: -1px;
}

span.sheet-pictos3 {
	font-family: "Pictos Three";
}

span.sheet-wound-flag,
span.sheet-wound-line,
span.sheet-modifier-flag {
	position: relative;
}

span.sheet-wound-flag {
}

span.sheet-wound-line {
	color: #8c9180;
	font-size: 0.8em;
	left: -5%;
	top: -2px;
}

input.sheet-whisper-flag {
	left: 16%;
}

input.sheet-edge-flag {
	left: 15%;
}

input.sheet-wound-flag {
	left: 16%;
}

input.sheet-modifier-flag {
	left: 16%;
}

.sheet-whisper-flag:checked ~ span.sheet-whisper-flag,
.sheet-edge-flag:checked ~ span.sheet-edge-flag,
.sheet-wound-flag:checked ~ span.sheet-wound-flag,
.sheet-modifier-flag:checked ~ span.sheet-modifier-flag,
.sheet-whisper-flag:hover ~ span.sheet-whisper-flag,
.sheet-edge-flag:hover ~ span.sheet-edge-flag,
.sheet-wound-flag:hover ~ span.sheet-wound-flag,
.sheet-modifier-flag:hover ~ span.sheet-modifier-flag,
.sheet-roll-toggles button:hover {
	color: #e9b230;
	text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.sheet-roll-toggles button[type="roll"] {
	color: #000;
	font-family: "pictos";
	font-size: 1.5em;
	margin: 0px;
}

.sheet-roll-toggles button:hover {
	color: #4f7da7;
}

/**** Decorations for the page ****/

.sheet-vertdeco {
	display: inline-block;
	background: #ffffff;
	height: 70px;
	margin: 10px 2px 1px 2px;
	border-right: 1px solid #fff;
	border-left: 1px solid #fff;
}

.sheet-trapezoid,
.sheet-trapezoid-white,
.sheet-trapezoid-tan {
	border-bottom: 20px solid #000;
	border-left: 15px solid transparent;
	border-right: 15px solid transparent;
	position: relative;
}

.sheet-amprow .sheet-trapezoid,
.sheet-amprow .sheet-trapezoid-tan,
.sheet-cuerow .sheet-trapezoid,
.sheet-cuerow .sheet-trapezoid-white,
.sheet-weaponrow .sheet-trapezoid,
.sheet-weaponrow .sheet-trapezoid-tan,
.sheet-conrow .sheet-trapezoid,
.sheet-conrow .sheet-trapezoid-tan   {
	border-bottom: 15px solid #000;
	border-left: 25px solid transparent;
	border-right: 25px solid transparent;
	position: relative;
}

.sheet-dispositionsrow .sheet-trapezoid,
.sheet-dispositionsrow .sheet-trapezoid-white {
	left: 37%;
	margin-top: -20px;
	width: 25%;
}

.sheet-trapezoid-white {
	border-bottom-color: #fff;
	top: 2px;
}

.sheet-skillrow .sheet-trapezoid,
.sheet-skillrow .sheet-trapezoid-tan {
	left: 40%;
	top: -23px;
	width: 15%;
}

.sheet-skillrow .sheet-trapezoid-tan {
	border-bottom-color: #8c9180;
	margin-top: -20px;
	top: -20px;
}

.sheet-amprow .sheet-trapezoid,
.sheet-amprow .sheet-trapezoid-tan,
.sheet-cuerow .sheet-trapezoid,
.sheet-cuerow  .sheet-trapezoid-white  {
	width: 60%;
	top: 0px;
	left: 20%;
	margin-top: -15px;
}

.sheet-amprow .sheet-trapezoid-tan,
.sheet-weaponrow .sheet-trapezoid-tan  {
	border-bottom-color: #8c9180;
	top: 2px;
}

.sheet-cuerow  .sheet-trapezoid-white {
	border-bottom-color: #fff;
	top: 2px;
}

.sheet-weaponrow .sheet-trapezoid,
.sheet-weaponrow .sheet-trapezoid-tan {
	width: 40%;
	top: 1px;
	left: 25%;
	margin-top: -15px;
}

.sheet-weaponrow  .sheet-trapezoid-tan {
	border-bottom-color: #8c9180;
	top: 2px;
}

.sheet-conrow .sheet-trapezoid,
.sheet-conrow .sheet-trapezoid-tan {
	width: 30%;
	left: 33%;
	margin-top: -12px;
}

.sheet-conrow .sheet-trapezoid {
	top: -8px;
}

.sheet-conrow .sheet-trapezoid-tan {
	border-bottom-color: #8c9180;
	top: -10px;
}

.sheet-conrow .sheet-trapezoid:nth-child(1),
.sheet-conrow .sheet-trapezoid-tan:nth-child(2) {
	border-bottom: 10px solid #000;
	border-left: 25px solid transparent;
	border-right: 25px solid transparent;
	left: 15%;
	position: relative;
	top: 2px;
	width: 65%;
}

.sheet-conrow .sheet-trapezoid:nth-child(2) {
	top: 5px;
}

.sheet-conrow .sheet-trapezoid-tan:nth-child(2) {
	border-bottom-color: #8c9180;
	top: 5px;
}

.sheet-arrow-left {
 	display: inline-block;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 10px solid #000;
	position: relative;
	top: -6px;
	left: -1px;
	margin-right: -10px;
}

/**** NPC Sheet ****/

div.sheet-col.sheet-toggle {
	width: 5%;
}

div.sheet-col.sheet-toggle input {
	top: 5px;
	left: 5px;
}

div.sheet-col.sheet-toggle span {
	display: inline;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 9px;
	font-weight: bolder;
	top: -15px;
	left: 10px;
}

.sheet-npc {
	width: 600px;
	margin-left: 10px;
	display: none;
}

.sheet-npc-toggle[value="npc"] ~ .sheet-npc {
	display: inline-block;
	margin-bottom: 20px;
}

.sheet-npc-toggle[value="npc"] ~ .sheet-pc {
	display: none;
}

.sheet-npc-toggle[value="npc"] ~ img.sheet-header {
	width: 72% !important;
}

.sheet-indent-row {
	padding-left: 1.5em;
	text-indent: -1.5em;
}

.sheet-npc button:hover {
	color: #4f7da7;
}

.sheet-npc .repcontrol button:hover {
	color: #fff;
}

.sheet-npc .sheet-npc-toggle {
	opacity: 1;
}

.sheet-npc input.sheet-options-flag {
	left: 95%;
}

.sheet-npc .sheet-toggle input[type="checkbox"] + span {
	left: 91%;
}

.sheet-npc .sheet-npc-ampbox input[type="checkbox"] + span {
	left: 97%;
}

.sheet-npc .sheet-weaponbox input.sheet-options-flag {
	left: 92%;
	position: absolute;
}

.sheet-npc .sheet-weaponbox input.sheet-options-flag + span {
	left: 93%;
	position: absolute;
}

.sheet-npc .sheet-options {
	border-top: 1px dashed #e4bc34;
}

.sheet-npc .sheet-options .sheet-col {
	width: 30%;
}

.sheet-npc .sheet-options span {
	display: inline-block;
	text-transform: uppercase;
	font-size: 10px;
	font-weight: bold;
	text-align: left;
}

.sheet-npc .sheet-options label {
	text-transform: uppercase;
	font-size: 15px;
	margin-top: 10px;
	margin-bottom: 5px;
}

.sheet-npc .sheet-options input {
	border: none;
	border-bottom: 1px #8c9180 solid;
	margin-left: 5px;
	padding: 0px;
}

.sheet-npc .sheet-options input[type="number"] {
	width: 20px;
	text-align: center;
}

.sheet-npc .sheet-options .repcontainer .repitem {
	width: 100%;
	padding: 0px 5px;
	border: 1px dashed #e4bc34;
}

input.sheet-npc-desc {
	margin-left: 0px !important;
	width: 100%;
}

.sheet-npc .sheet-weaponsubtitlesbox {
	width: 50%;
	position: relative;
	left: 5%;
}

.sheet-npc-name {
	width: 50%;
	max-width: 500;
	margin-bottom: -10px;
	margin-left: -5px;
}

.sheet-npc-name span {
	color: #000;
	background-color: #e4bc34;
	text-transform: uppercase;
	font-weight: bolder;
	font-size: 1.3em;
	padding: 5px 8px 5px 8px;
}

.sheet-npc-name label {
	text-align: center;
	padding-top: 5px;
}

.sheet-npc-name input {
	margin-bottom: 5px;
	margin-left: 25%;
}

.sheet-npc-attribute {
	background-color: #3f4144;
	height: 70px;
	width: 100%;
}

.sheet-npc-attribute label,
.sheet-npc-attribute button {
	display: inline-block;
	width: 14%;
	color: #fff;
	text-align: center;
	text-transform: uppercase;
	padding-top: 5px;
	margin-bottom: 3px !important;
	margin-left: 2px !important;
}

.sheet-npc-attribute label:hover {
	color: #589cda;
}

.sheet-npc-attr-row {
	background-color: #fff;
	width: 100%;
	height: 35px;
	display: inline-flex;
}

.sheet-npc-attr-num {
	margin-left: 50px;
	margin-right: 39px;
	padding-top: 10px;
	font-weight: bolder;
	font-size: 16px;
}

.sheet-npc-body {
	margin-top: 10px;
}

.sheet-npc-body span {
	font-size: 13px;
}

.sheet-npc-amps {
	padding-left: 3.7em;
	text-indent: -2.5em;
}

.sheet-npc-amps button[type="roll"] {
	font-size: 0.9em !important;
}

.sheet-npc-ampbox input[type="checkbox"] {
	position: absolute;
	left: 96%;
}

.sheet-npc-ampbox input[type="checkbox"] + span {
	position: absolute;
	left: 101%;
}

.sheet-npc-amps button[type=roll] {
	font-weight: bolder;
	padding-bottom: 6px !important;
}

.sheet-npc-long {
	width: 63%;
}

.sheet-caps {
	text-transform: uppercase;
}

.sheet-npc .sheet-npc-ampname {
	text-transform: capitalize;
}

.sheet-npc-weapons h2 {
	font-size: 1.5em;
	margin-top: 5px;
	text-align: left;
}

.sheet-npc .sheet-weaponheader {
	text-align: left;
}

.sheet-npc .sheet-weaponheader span {
	font-size: 1em;
	font-weight: bolder;
	margin-right: 8px;
	text-align: left;
	width: 20%;
}

.sheet-npc .sheet-weaponbox {
	min-height: 0px;
	margin: 0px 0px 0px 0px;
}

.sheet-npc .repcontainer .repitem {
	width: 100%;
	margin-bottom: 5px;
	height: 20px;
}

.sheet-indent {
	text-indent: 1.5em;
}

.sheet-npc .sheet-conditioncircles {
	display: inline;
	padding-left: 15px;
}

.sheet-npc .sheet-armorcircles,
.sheet-npc .sheet-edgecircles {
	display: inline;
	margin: 0px 5px 0px 15px;
}

.sheet-npc .sheet-armorcircles input[type="radio"],
.sheet-npc .sheet-conditioncircles input[type="radio"],
.sheet-npc .sheet-edgecircles input[type="radio"] {
	height: 15px;
	width: 15px;
	top: -2px;
	left: 0px;
	margin-right: 5px;
}

.sheet-npc .sheet-armorcircles input[type="radio"] + span,
.sheet-npc .sheet-conditioncircles input[type="radio"] + span,
.sheet-npc .sheet-edgecircles input[type="radio"] + span {
	height: 10px;
	width: 10px;
}

.sheet-npc .sheet-edgecircles input[type="radio"] {
	margin-right: 0px;
}

.sheet-npc .sheet-arrow-left {
	top: -1px;
	left: -2px;
	border-left: 8px solid #000;
	margin-right: -8px;
}

.sheet-npc .sheet-roll-toggles {
	display: inline;
	position: relative;
	top: 0px;
	left: 48%;
}

.sheet-npc .sheet-toggle-toggles {
	width: auto;
	left: -3%;
	letter-spacing: -20px;
}

.sheet-npc .sheet-toggle-toggles input[type="checkbox"] + span {
	display: inline;
	left: -17%;
	font-size: 1em;
}

.sheet-npc .sheet-roll-toggles button {
	margin-left: 0px !important;
}

.sheet-npc input.sheet-whisper-flag,
.sheet-npc input.sheet-wound-flag,
.sheet-npc input.sheet-modifier-flag,
.sheet-npc input.sheet-edge-flag  {
	left: 3%;
}

.sheet-npc span.sheet-lightening {
	color: #fff;
}

.sheet-npc span.sheet-wound-line {
	color: #fff;
	font-size: 1em;
	left: -18%;
}

.sheet-npc .sheet-radio-header-armor {
	height: 10px;
	width: 40px;
	margin-right: -44px;
	left: 0%;
	top: 0px;
}

.sheet-npc .sheet-radio-header-physical,
.sheet-npc .sheet-radio-header-small {
	top: 0px;
	left: 0%;
}

.sheet-npc .sheet-radio-header-physical {
	width: 60px;
	height: 15px;
	margin-right: -35px;
	left: 5%;
}

.sheet-npc .sheet-radio-header-small {
	margin-right: -53px;
}

.sheet-npc .sheet-npc-consection .sheet-radio-header-small {
	width: 50px;
	margin-right: -25px;
	left: 4%;
}

.sheet-npc .sheet-npc-consection span:first-child {
  font-weight: bolder;
}

.sheet-npc .sheet-radio-header-armor:hover + span,
.sheet-npc .sheet-radio-header-physical:hover + span,
.sheet-npc .sheet-radio-header-small:hover + span {
	color: #e9b230;
	text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.sheet-npc .sheet-essence-input,
.sheet-npc .sheet-essence-note {
	border: none;
	border-bottom: 1px solid #3f4144;
	border-radius: 0px;
	font-size: 0.8em;
}

.sheet-npc .sheet-essence-input {
	margin-left: 5px;
	color: #000;
	text-align: center;
}

.sheet-npc .sheet-essence-note {
	margin-bottom: 1px;
}

/**** Hide NPC Skills that are not used ****/

.sheet-optional-flag0[value="1"] + .sheet-optional {
	display: inline;
}

.sheet-optional-flag0[value="0"] + .sheet-optional {
	display: none;
}

/**** Footer ****/

.sheet-footer {
	width: 850px;
	text-align: left;
	font-size: 0.55em;
	line-height: 15px;
	border: none;
}

.sheet-npc-toggle[value="npc"] ~ div.sheet-footer {
	width: 72%;
}

/****  Roll Templates ****/

.sheet-rolltemplate-sAnarchy .sheet-template-body {
	border-radius: 3px 3px 3px 3px;
}

.sheet-rolltemplate-sAnarchy .sheet-template-header {
	font-family: "contrail one";
	font-size: 18px;
	font-weight: normal;
	font-variant: normal;
	text-transform: capitalize;
	letter-spacing: 2px;
	text-align: center;
	margin: 0px;
	padding: 5px 2px 3px 2px;
	color: #fff;
	background-color: #4f7da7;
	border: 1px solid #000;
	border-bottom: 2px solid #000;
}

.sheet-rolltemplate-sAnarchy .sheet-template-header span {
	font-family: "tahoma";
	font-size: 11px;
	font-weight: normal;
	font-variant: normal;
	letter-spacing: 1px;
}

.sheet-rolltemplate-sAnarchy .sheet-template-row {
	color: #fff;
	text-align: center;
	font-size: 18px;
	background-color: #5c5658;
	line-height: 1.1em;
	vertical-align: middle;
	font-family: "helvetica";
	font-weight: normal;
	padding: 5px 5px 3px 5px;
	border-radius: 0px;
	border: 1px solid #000;
}

.sheet-rolltemplate-sAnarchy .sheet-template-row:last-child {
	background-color: #373438;
}

.sheet-rolltemplate-sAnarchy .inlinerollresult {
	display:inline-block;
	color: #fff;
	font-size: 25px;
	background-color: transparent;
	border: none;
}

.sheet-rolltemplate-sAnarchy .inlinerollresult.fullfail,
.sheet-rolltemplate-sAnarchy .inlinerollresult.fullcrit,
.sheet-rolltemplate-sAnarchy .inlinerollresult.importantroll {
	border: none;
}

.sheet-rolltemplate-sAnarchy .inlinerollresult.fullfail {
	color:  #589cda;
}

.sheet-rolltemplate-sAnarchy .inlinerollresult.fullcrit {
	color: #e9b230;
}

.sheet-rolltemplate-sAnarchy .sheet-template-desc {
	font-size: 1em;
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
  <title page-title>Angular</title>
  <meta name="description" content="angular example app">
  <meta name="fragment" content="!">

  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">

  <link href="/public/img/brand/favicon.ico" rel="shortcut icon" type="image/x-icon">

  <ui-view></ui-view>

      This page requires JavaScript. Please enable it in your browser.


text:
//
//  CategoriesItemCell.h
//  ShopFoneDemo
//

#import "Three20/Three20.h"

@interface CategoriesItemCell : TTTableSubtitleItemCell {
	UIImageView *_dottedPattern;
	UIImageView *_whiteArrow;
	UIImageView *_categoryIconCircle;
	UIImageView *_categoryIcon;
	UIImageView *_plusCircle;
	UIImageView *_plusIcon;
	UIImageView *_newIcon;
	UIImageView *_blackCircle_small;
	UIImageView *_shirtIcon;
	UIImageView *_blackArrow;
}

@end