text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:showIn="@layout/activity_main"
    app:layout_behavior="@string/appbar_scrolling_view_behavior">

    <androidx.appcompat.widget.AppCompatEditText
        android:id="@+id/edit_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Enter some text.."
        android:inputType="textMultiLine"
        android:layout_gravity="top"
        android:textSize="14sp"
        android:padding="10dp"
        android:gravity="top"
        android:lines="5"
        android:background="@android:color/transparent"/>

    <View
        android:layout_width="match_parent"
        android:layout_height="0.6dp"
        android:background="@color/colorPrimaryDark" />

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/toEmoji"
            android:clickable="true"
            android:foreground="?selectableItemBackground"
            android:padding="10dp"
            android:text="Emoji"
            android:textSize="12sp"
            android:textStyle="bold"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

        <Space
            android:layout_width="10dp"
            android:layout_height="match_parent" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/toHtml"
            android:clickable="true"
            android:foreground="?selectableItemBackground"
            android:padding="10dp"
            android:text="Html"
            android:textSize="12sp"
            android:textStyle="bold"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:focusable="true" />

        <Space
            android:layout_width="10dp"
            android:layout_height="match_parent" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/toHexHtml"
            android:clickable="true"
            android:foreground="?selectableItemBackground"
            android:padding="10dp"
            android:text="Hex"
            android:textSize="12sp"
            android:textStyle="bold"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:focusable="true" />

        <Space
            android:layout_width="10dp"
            android:layout_height="match_parent" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/toShortCode"
            android:clickable="true"
            android:foreground="?selectableItemBackground"
            android:padding="10dp"
            android:text="Short"
            android:textSize="12sp"
            android:textStyle="bold"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:focusable="true" />

    </LinearLayout>

    <View
        android:layout_width="match_parent"
        android:layout_height="0.6dp"
        android:background="@color/colorPrimaryDark" />

</LinearLayout>


text:
@interface BasicViewExperiment : BaseExperiment

@end

redpajama_set_name: RedPajamaGithub


text:
<p id="rice.timothy" data-toggle="tooltip" title="">
    Tim Rice
    has an Honours degree in Maths & Stats from University of
    Melbourne, focused on probability and applied maths. He writes
    open source software and presents on computational topics at
    Melbourne Linux Users Group.


text:
#import <CoreData/CoreData.h>
#import <CoreLocation/CoreLocation.h>
#import "SMGeoPoint.h"

/**
 `SMQuery` exposes an interface for defining a query against StackMob's Datastore API.

 `SMQuery` uses StackMob's terminology:
 - Queries are performed against a specific _schema_ (usually also the name of a model class or of an entity in a managed object model)
 - Queries may select or order based on the _values_ of the _fields_ of an object belonging to their _schema_.
 */
@interface SMQuery : NSObject

///-------------------------------
/// @name Properties
///-------------------------------

/**
 requestParameters holds the HTTP request parameters i.e. for a request that looks like `GET /something?key=value`, it holds a dictionary entry mapping `key` to `value`.

 @since Available in iOS SDK 1.0.0 and later.
 */
@property (nonatomic, strong) NSDictionary *requestParameters;

/**
 requestHeaders holds the HTTP headers, which affect things like sort order and pagination/limiting.

 @since Available in iOS SDK 1.0.0 and later.
 */
@property (nonatomic, strong) NSDictionary *requestHeaders;

/**
 schemaName is the name of the StackMob schema against which this query will be executed.

 @since Available in iOS SDK 1.0.0 and later.
 */
@property (readonly) NSString *schemaName;

/**
 entity is the Entity Description of the Core Data Entity provided when initialized using <initWithEntity:>.

 @return `nil` if <initWithSchema:> was used for initialization, otherwise the Entity Description.
 @since Available in iOS SDK 1.0.0 and later.
 */
@property (readonly) NSEntityDescription *entity;

#pragma mark - Creating queries
///-------------------------------
/// @name Initialize
///-------------------------------

/**
 Initializes an `SMQuery` object from the provided entity.

 @param entity A Core Data `NSEntityDescription` for which we assume a corresponding schema named [[entity name] lowercaseString].
 @since Available in iOS SDK 1.0.0 and later.
 */
- (id)initWithEntity:(NSEntityDescription *)entity;

/**
 Initializes an `SMQuery` object from the provided schema.

 @param schema The StackMob schema to run the query against.
 @since Available in iOS SDK 1.0.0 and later.
 */
- (id)initWithSchema:(NSString *)schema;

#pragma mark - Where clauses
///-------------------------------
/// @name Where Clauses
///-------------------------------

/**
 Add the query criteria: field == value.

 @param field The field in the StackMob schema that is to be compared.
 @param value A constant value to be compared.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isEqualTo:(id)value;

/**
 Add the query criteria: field != value.

 @param field The field in the StackMob schema that is to be compared.
 @param value A constant value to be compared.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isNotEqualTo:(id)value;

/**
 Add the query criteria: field < value.

 @param field The field in the StackMob schema that is to be compared.
 @param value A constant value to be compared.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isLessThan:(id)value;

/**
 Add the query criteria: field <= value.

 @param field The field in the StackMob schema that is to be compared.
 @param value A constant value to be compared.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isLessThanOrEqualTo:(id)value;

/**
 Add the query criteria: field > value.

 @param field The field in the StackMob schema that is to be compared.
 @param value A constant value to be compared.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isGreaterThan:(id)value;

/**
 Add the query criteria: field >= value.

 @param field The field in the StackMob schema that is to be compared.
 @param value A constant value to be compared.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isGreaterThanOrEqualTo:(id)value;

/**
 Add the query criteria: field is in the array valuesArray.

 @param field The field in the StackMob schema that is to be compared.
 @param valuesArray An array containing values with which to compare `field`.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isIn:(NSArray *)valuesArray;

/**
 Add the query criteria: field is not in the array valuesArray.

 @param field The field in the StackMob schema that is to be compared.
 @param valuesArray An array containing values with which to compare `field`.

 @since Available in iOS SDK 2.0.0 and later.
 */
- (void)where:(NSString *)field isNotIn:(NSArray *)valuesArray;

/**
 Add the query criteria: `field`'s location is within `miles` of `point`.

 @note StackMob will generate a field `distance` and insert it into the response. This field is the distance between the query `field`'s location and `point`.

 @param field The geo field in the StackMob schema that is to be compared.
 @param miles Distance in miles.
 @param point The point around which to search.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isWithin:(double)miles milesOf:(CLLocationCoordinate2D)point;

/**
 Add the query criteria: `field`'s location is within `miles` of `geoPoint`.

 @note StackMob will generate a field `distance` and insert it into the response. This field is the distance between the query `field`'s location and `geoPoint`.

 @param field The geo field in the StackMob schema that is to be compared.
 @param miles Distance in miles.
 @param geoPoint The SMGeoPoint around which to search.

 @since Available in iOS SDK 1.3.0 and later.
 */

- (void)where:(NSString *)field isWithin:(double)miles milesOfGeoPoint:(SMGeoPoint *)geoPoint;

/**
 Add the query criteria: `field`'s location is within `kilometers` of `point`.

 @note StackMob will generate a field `distance` and insert it into the response. This field is the distance between the query `field`'s location and `point`.

 @param field The geo field in the StackMob schema that is to be compared.
 @param kilometers Distance in kilometers.
 @param point The point around which to search.

 @since Available in iOS SDK 1.1.2 and later.
 */
- (void)where:(NSString *)field isWithin:(CLLocationDistance)kilometers kilometersOf:(CLLocationCoordinate2D)point;

/**
 Add the query criteria: `field`'s location is within `kilometers` of `geoPoint`.

 @note StackMob will generate a field `distance` and insert it into the response. This field is the distance between the query `field`'s location and `geoPoint`.

 @param field The geo field in the StackMob schema that is to be compared.
 @param kilometers Distance in kilometers.
 @param geoPoint The SMGeoPoint around which to search.

 @since Available in iOS SDK 1.3.0 and later.
 */
- (void)where:(NSString *)field isWithin:(CLLocationDistance)kilometers kilometersOfGeoPoint:(SMGeoPoint *)geoPoint;

/**
 Add the query criteria: `field`'s location falls within the bounding box with corners `sw` and `ne`.

 @param field The geo field in the StackMob schema that is to be compared.
 @param sw Location of the bounding box's southwest corner.
 @param ne Location of the bounding box's northeast corner.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field isWithinBoundsWithSWCorner:(CLLocationCoordinate2D)sw andNECorner:(CLLocationCoordinate2D)ne;

/**
 Add the query criteria: `field`'s location falls within the bounding box with geoPoints `sw` and `ne`.

 @param field The geo field in the StackMob schema that is to be compared.
 @param sw Location of the bounding box's southwest SMGeoPoint.
 @param ne Location of the bounding box's northeast SMGeoPoint.

 @since Available in iOS SDK 1.3.0 and later.
 */
- (void)where:(NSString *)field isWithinBoundsWithSWGeoPoint:(SMGeoPoint *)sw andNEGeoPoint:(SMGeoPoint *)ne;

/**
 StackMob will insert a field `distance` and insert it into the response. This field is the distance between the query `field`'s location and `location`.

 @note You probably want to apply a limit when including this clause or you may end up with more results than intended.

 @param field The geo field in the StackMob schema that is to be compared.
 @param location The reference location.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)where:(NSString *)field near:(CLLocationCoordinate2D)location;

/**
 StackMob will insert a field `distance` and insert it into the response. This field is the distance between the query `field`'s location and `geoPoint`.

 @note You probably want to apply a limit when including this clause or you may end up with more results than intended.

 @param field The geo field in the StackMob schema that is to be compared.
 @param geoPoint The reference SMGeoPoint.

 @since Available in iOS SDK 1.3.0 and later.
 */
- (void)where:(NSString *)field nearGeoPoint:(SMGeoPoint *)geoPoint;

#pragma mark - Pagination / Limiting
///-------------------------------
/// @name Pagination / Limiting
///-------------------------------

/**
 Return a subset of the result set.

 @param start Offset of the first result to return.
 @param end Offset of the last result to return.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)fromIndex:(NSUInteger)start toIndex:(NSUInteger)end;

/**
 Limit the result set.

 @param count The number of objects to return.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)limit:(NSUInteger)count;

#pragma mark - Order-by clause
///-------------------------------
/// @name Order By
///-------------------------------

/**
 Order the result set.
 Note: You can apply multiple ordering criteria by invoking this multiple times.

 @param field The field to order by.
 @param ascending `YES` for ascending, `NO` for descending.

 @since Available in iOS SDK 1.0.0 and later.
 */
- (void)orderByField:(NSString *)field ascending:(BOOL)ascending;

#pragma mark - And/Or
///-------------------------------
/// @name And/Or
///-------------------------------

/**
 Create an AND query.

 If you are not using OR, you do not need to use this method.  You can achieve a query with condition A & B & C by simply adding multiple where clauses to one `SMQuery` instance.

 This method is primarily used when chaining together a combination of ORs and ANDs.  See <or:> for usage examples.

 @param query The query to AND to the receiving query.
 @return An instance of `SMQuery` with parameters updated as a result of the AND.

 @since Available in iOS SDK 1.4.0 and later.
 */
- (SMQuery *)and:(SMQuery *)query;

/**
 Create an OR query.

 Multiple `SMQuery` instances can be OR'ed together to create a query with conditions "A" OR "B" OR "C". Those conditions themselves can consist of ANDs, i.e. ("A1" AND "A2") OR "B" OR "C".  Finally, the entire OR query can be chained with another `SMQuery` instance containing multiple conditions to produce something that make look like "A" AND "B" AND ( ("C1" AND "C2") OR "D" OR "E" ).

 **Important:** Only one `SMQuery` instance containing ORs can be AND'ed with an `SMQuery` instance.  For example:

 Right: "A" AND "B" AND ( ("C1" AND "C2") OR "D" OR "E" )

 Wrong: "A" AND "B" AND ( ("C1" AND "C2") OR "D" OR "E" ) AND ( "F" OR "G" )  // The second OR containing F/G is not allowed.

 A Practical Example:

     // Person where:
     // armor_class < 17 AND ((first_name == "Jonah" AND last_name == "Williams) OR first_name == "Jon" OR company == "Carbon Five")

     SMQuery *rootQuery = [[SMQuery alloc] initWithSchema:@"People"];
     [rootQuery where:@"armor_class" isLessThan:[NSNumber numberWithInt:17]];

     SMQuery *subQuery = [[SMQuery alloc] initWithSchema:@"People"];
     [subQuery where:@"first_name" isEqualTo:@"Jonah"];
     [subQuery where:@"last_name" isEqualTo:@"Williams"];

     SMQuery *subQuery2 =[[SMQuery alloc] initWithSchema:@"People"];
     [subQuery2 where:@"first_name" isEqualTo:@"Jon"];

     SMQuery *subQuery3 =[[SMQuery alloc] initWithSchema:@"People"];
     [subQuery3 where:@"company" isEqualTo:@"Carbon Five"];

     [rootQuery and:[[subQuery or:subQuery2] or:subQuery3]];

     // Perform rootQuery on database

 @param query The query to OR to the receiving query.
 @return An instance of `SMQuery` with parameters updated as a result of the OR.
 @since Available in iOS SDK 1.4.0 and later.
 */
- (SMQuery *)or:(SMQuery *)query;

@end


text:
CSS Color Names
================

This is a showcase wrapping the different Color Names properties you can set via CSS for color.
All modern browsers support the following 140+ color names. ( and more )

http://css-colors.techstream.org/

Note : This is production version, it includes code & styles for analytics and Advert. Work on master branch.

Made with help from @nikhiljohn10

Add New Color
--------------

To add a missing color, insert an entry into colors array in script.js.

The colors are sorted in into 3 types based on hue value, hex value and alphabetic order, color is stored in three array
make sure to add entry to the three array.

example :

CSSColors.colors = {
	'hue' 	: [],
	'hex' 	: [],
	'alpha' : []
}

You can make use of the spreadsheets css-color.xls to find place for new color.

Credits
-------

Headings : Merriweather Sans for large text as they are legible themselves without the requirement of serifs, Merriweather is released in SIL Open Font License, 1.1

For body and content : Merriweather the serif version of Merriweather, its a font designed to be a text face that is pleasant to read on screens, its also released in SIL Open Font License, 1.1

Front-end Framework : Foundation from Zrub. MIT License

Click to Copy : clipboard.js : A modern approach to copy text to clipboard No Flash. No frameworks.


text:
package eprinttools

import (
	"fmt"
	"strings"

	// Caltech Library Packages
	"github.com/caltechlibrary/dataciteapi"
)

// normalizeDataCiteAuthorName takes a name literal and normalizes it to
// an EPrints creator or corp creator item's name attribute.
func normalizeDataCiteAuthorName(obj map[string]interface{}) *Name {
	name := new(Name)
	if s, ok := obj["literal"]; ok == true {
		literal := s.(string)
		if strings.Contains(literal, ",") {
			parts := strings.SplitN(literal, ",", 2)
			name.Family = strings.TrimSpace(parts[0])
			name.Given = strings.TrimSpace(parts[1])
			return name
		}
		if strings.Contains(literal, " ") {
			parts := strings.Split(literal, " ")
			switch {
			case len(parts) == 1:
				name.Value = strings.TrimSpace(literal)
				return name
			case len(parts) == 2:
				name.Family = strings.TrimSpace(parts[1])
				name.Given = strings.TrimSpace(parts[0])
				return name
			case len(parts) > 2:
				last, next_to_last := (len(parts) - 1), (len(parts) - 2)
				switch strings.ToLower(parts[next_to_last]) {
				case "de":
					name.Family = strings.Join(parts[next_to_last:last], " ")
					name.Given = strings.Join(parts[0:next_to_last-1], " ")
				case "van":
					name.Family = strings.Join(parts[next_to_last:last], " ")
					name.Given = strings.Join(parts[0:next_to_last-1], " ")
				default:
					name.Family = strings.TrimSpace(parts[last])
					name.Given = strings.Join(parts[0:next_to_last], " ")
				}
				return name
			}
		}
		// If no spaces or commas then assume a corp style name
		name.Value = literal
		return name
	}
	if given, ok := obj["given"]; ok == true {
		name.Given = given.(string)
	}
	if family, ok := obj["family"]; ok == true {
		name.Family = family.(string)
	}
	return name
}

// normalizeDataCiteToLocalGroup takes an affiliation from DataCite author
// and attempts to determine if it is a Caltech Group and returns
// the normalized name or an empty string.
func normalizeDataCiteToLocalGroup(s string) string {
	s = strings.ToLower(s)
	switch {
	case strings.Contains(s, "california institute of technology"):
		i := strings.Index(s, "california institute of technology")
		if i > -1 {
			s = strings.TrimSuffix(strings.TrimSpace(s[0:i-1]), ";")
		}
		return strings.TrimSpace(s)
	case strings.Contains(s, "california institution of technology"):
		i := strings.Index(s, "california institution of technology")
		if i > -1 {
			s = strings.TrimSuffix(strings.TrimSpace(s[0:i-1]), ";")
		}
		return strings.TrimSpace(s)
	case strings.Contains(s, "caltech"):
	case strings.Contains(s, "caltech"):
		i := strings.Index(s, "caltech")
		if i > -1 {
			s = strings.TrimSuffix(strings.TrimSpace(s[0:i-1]), ";")
		}
		return strings.TrimSpace(s)
	case strings.Contains(s, "ligo"):
		return "LIGO"
	}
	return ""
}

// normalizeDataCiteType converts content type from DataCite to Authors (e.g.
// "journal-article" to "article"
func normalizeDataCiteType(s string) string {
	switch strings.ToLower(s) {
	case "proceedings-article":
		//NOTE: This seems vary idiosyncratic to CaltechAUTHORS
		return "book_section"
	case "journal-article":
		return "article"
	default:
		return s
	}
}

// DataCiteWorksToEPrint takes a works object from the DataCite API
// and maps the fields into an EPrint struct return a new struct or
// error.
func DataCiteWorksToEPrint(obj dataciteapi.Object) (*EPrint, error) {
	if obj == nil {
		return nil, fmt.Errorf("Nothing to convert")
	}
	eprint := new(EPrint)
	// Type
	if s, ok := indexInto(obj, "data", "attributes", "resource-type-id"); ok == true {
		eprint.Type = s.(string)
		switch eprint.Type {
		case "text":
			if s2, ok := indexInto(obj, "data", "attributes", "resource-type-subtype"); ok == true {
				eprint.Type = s2.(string)
			}
		}
	}

	// Title
	if s, ok := indexInto(obj, "data", "attributes", "title"); ok == true {
		eprint.Title = fmt.Sprintf("%s", s)
	}

	// Publisher
	if s, ok := indexInto(obj, "data", "attributes", "publisher"); ok == true {
		eprint.Publisher = fmt.Sprintf("%s", s)
	}

	// Publication
	if s, ok := indexInto(obj, "data", "attributes", "container-title"); ok == true {
		eprint.Publication = s.(string)
	}

	// FIXME: Series

	// FIXME: Volume

	// FIXME: Number

	// FIXME: PlaceOfPub

	// FIXME: PageRange

	// FIXME: Pages

	// FIXME: ISBN

	// FIXME: ISSN

	// NOTE: This doesn't appear to be used by CaltechAUTHORS for full book
	// FIXME: BookTitle

	// FIXME: Funders

	// NOTE: Caltech Library puts the DOI in the related URL field rather than
	// in EPrint's default location. This code puts the DOI in the default
	// location. If you need Caltech Library's bahavior use clsrules.Apply()
	// to conform to that regime.
	if doi, ok := indexInto(obj, "message", "DOI"); ok == true {
		eprint.DOI = doi.(string)
	}
	// FIXME: RelatedURLs (links in message of DataCite works object)
	// NOTE: related URL type is NOT Mime-Type in CaltechAUTHORS, import URL without type being set.

	// NOTE: Assuming date is published given we're talking to DataCite
	// Date, DateType, IsPublished
	if s, ok := indexInto(obj, "data", "attributes", "published"); ok == true {
		eprint.Date = s.(string)
		eprint.DateType = "published"
		eprint.IsPublished = "pub"
	}

	// Creators/CorpCreators list
	if a, ok := indexInto(obj, "data", "attributes", "author"); ok == true {
		creators := new(CreatorItemList)
		corpCreators := new(CorpCreatorItemList)
		for _, o := range a.([]interface{}) {
			m := o.(map[string]interface{})
			name := normalizeDataCiteAuthorName(m)
			entry := new(Item)
			entry.Name = name
			if name.Value == "" {
				//NOTE: Assume a person name
				creators.AddItem(entry)
			} else {
				//NOTE: Assume a corporate name if we have only a single name
				corpCreators.AddItem(entry)
			}
		}
		if len(creators.Items) > 0 {
			eprint.Creators = creators
		}
		if len(corpCreators.Items) > 0 {
			eprint.CorpCreators = corpCreators
		}
	}

	// Edition
	//FIXME: Need to find value in DataCite works metadata for this

	// FullTextStatus
	//FIXME: Need to find value in DataCite works metadata for this

	// Keywords
	//FIXME: Need to find value in DataCite works metadata for this

	// Note
	//FIXME: Need to find value in DataCite works metadata for this

	// Abstract
	//FIXME: Need to find value in DataCite works metadata for this
	if s, ok := indexInto(obj, "data", "attributes", "description"); ok == true {
		eprint.Abstract = fmt.Sprintf("%s", s)
	}

	// Refereed
	//FIXME: Need to find value in DataCite works metadata for this

	// Editors (*EditorItemList)
	//FIXME: Need to find value in DataCite works metadata for this

	// Projects
	//FIXME: Need to find value in DataCite works metadata for this

	// Contributors (*ContriborItemList)
	//FIXME: Need to find value in DataCite works metadata for this

	// MonographType
	//FIXME: Need to find value in DataCite works metadata for this

	// Subjects
	//FIXME: Need to find value in DataCite works metadata for this

	// PresType (presentation type)
	//FIXME: Need to find value in DataCite works metadata for this

	return eprint, nil
}


text:
#include <Python.h>
#include <stdlib.h>

#include "renderdoc_replay.h"

template <>
std::string DoStringise(const uint32_t &el)
{
  static char tmp[16];
  memset(tmp, 0, sizeof(tmp));
  snprintf(tmp, 15, "%u", el);
  return tmp;
}

#include "renderdoc_tostr.inl"

extern "C" PyThreadState *GetExecutingThreadState(PyObject *global_handle)
{
  return NULL;
}

extern "C" void HandleException(PyObject *global_handle)
{
}

extern "C" bool IsThreadBlocking(PyObject *global_handle)
{
  return false;
}

extern "C" void SetThreadBlocking(PyObject *global_handle, bool block)
{
}

REPLAY_PROGRAM_MARKER()


text:
namespace syncer {

const unsigned int kMaxMessages = 10;
const unsigned int kMaxMessageSize = 5 * 1024;

SyncerCommandTestBase::SyncerCommandTestBase()
    : traffic_recorder_(kMaxMessages, kMaxMessageSize) {
}

SyncerCommandTestBase::~SyncerCommandTestBase() {
}

void SyncerCommandTestBase::SetUp() {
  // The session always expects there to be a passive worker.
  workers()->push_back(
      make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE)));
  ResetContext();
}

void SyncerCommandTestBase::TearDown() {
}

syncable::Directory* SyncerCommandTest::directory() {
  return dir_maker_.directory();
}

void SyncerCommandTest::SetUp() {
  dir_maker_.SetUp();
  SyncerCommandTestBase::SetUp();
}

void SyncerCommandTest::TearDown() {
  dir_maker_.TearDown();
}

MockDebugInfoGetter::MockDebugInfoGetter() {
}

MockDebugInfoGetter::~MockDebugInfoGetter() {
}

MockDirectorySyncerCommandTest::MockDirectorySyncerCommandTest()
    :mock_directory_(&handler_) {
}

MockDirectorySyncerCommandTest::~MockDirectorySyncerCommandTest() {
}

void MockDirectorySyncerCommandTest::SetUp() {
  // The session always expects there to be a passive worker.
  workers()->push_back(
      make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE)));
  ResetContext();
}

syncable::Directory* MockDirectorySyncerCommandTest::directory() {
  return &mock_directory_;
}

}  // namespace syncer


text:
import com.lisb.msgpack.bind.Access;
import com.lisb.msgpack.bind.MsgpackBind;

@Access(Access.AccessType.PROPERTY)
@MsgpackBind
public class SubclassPropertySource extends AccessTypePropertySource {

    private String subFirst;
    private long subSecond;

    @Override
    public String getFirst() {
        return subFirst;
    }

    @Override
    public void setFirst(String first) {
        subFirst = first;
    }

    public long getSubSecond() {
        return subSecond;
    }

    public void setSubSecond(long subSecond) {
        this.subSecond = subSecond;
    }
}


text:
<html>
    <head>
        <title>React Ant.Design Admin UI</title>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
    </head>

    <body>
        <div id="root">
        </div>
    </body>
</html>


text:
package jline.internal;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.logging.LogRecord;
import java.util.logging.Logger;

import static jline.internal.Preconditions.checkNotNull;

/**
 * Internal logger.
 *
 * @author Jason Dillon
 * @author Guillaume Nodet
 * @since 2.0
 */
public final class Log
{
    ///CLOVER:OFF

    public static enum Level
    {
        TRACE,
        DEBUG,
        INFO,
        WARN,
        ERROR
    }

    public static final boolean TRACE = Configuration.getBoolean(Log.class.getName() + ".trace");

    public static final boolean DEBUG = TRACE || Configuration.getBoolean(Log.class.getName() + ".debug");

    private static PrintStream output = System.err;

    private static boolean useJul = Configuration.getBoolean("jline.log.jul");

    public static PrintStream getOutput() {
        return output;
    }

    public static void setOutput(final PrintStream out) {
        output = checkNotNull(out);
    }

    /**
     * Helper to support rendering messages.
     */
    @TestAccessible
    static void render(final PrintStream out, final Object message) {
        if (message.getClass().isArray()) {
            Object[] array = (Object[]) message;

            out.print("[");
            for (int i = 0; i < array.length; i++) {
                out.print(array[i]);
                if (i + 1 < array.length) {
                    out.print(",");
                }
            }
            out.print("]");
        }
        else {
            out.print(message);
        }
    }

    @TestAccessible
    static void log(final Level level, final Object... messages) {
        if (useJul) {
            logWithJul(level, messages);
            return;
        }
        //noinspection SynchronizeOnNonFinalField
        synchronized (output) {
            output.format("[%s] ", level);

            for (int i=0; i<messages.length; i++) {
                // Special handling for the last message if its a throwable, render its stack on the next line
                if (i + 1 == messages.length && messages[i] instanceof Throwable) {
                    output.println();
                    ((Throwable)messages[i]).printStackTrace(output);
                }
                else {
                    render(output, messages[i]);
                }
            }

            output.println();
            output.flush();
        }
    }

    static void logWithJul(Level level, Object... messages) {
        Logger logger = Logger.getLogger("jline");
        Throwable cause = null;
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        PrintStream ps = new PrintStream(baos);
        for (int i = 0; i < messages.length; i++) {
            // Special handling for the last message if its a throwable, render its stack on the next line
            if (i + 1 == messages.length && messages[i] instanceof Throwable) {
                cause = (Throwable) messages[i];
            }
            else {
                render(ps, messages[i]);
            }
        }
        ps.close();
        LogRecord r = new LogRecord(toJulLevel(level), baos.toString());
        r.setThrown(cause);
        logger.log(r);
    }

    private static java.util.logging.Level toJulLevel(Level level) {
        switch (level) {
            case TRACE:
                return java.util.logging.Level.FINEST;
            case DEBUG:
                return java.util.logging.Level.FINE;
            case INFO:
                return java.util.logging.Level.INFO;
            case WARN:
                return java.util.logging.Level.WARNING;
            case ERROR:
                return java.util.logging.Level.SEVERE;
            default:
                throw new IllegalArgumentException();
        }
    }

    public static void trace(final Object... messages) {
        if (TRACE) {
            log(Level.TRACE, messages);
        }
    }

    public static void debug(final Object... messages) {
        if (TRACE || DEBUG) {
            log(Level.DEBUG, messages);
        }
    }

    /**
     * @since 2.7
     */
    public static void info(final Object... messages) {
        log(Level.INFO, messages);
    }

    public static void warn(final Object... messages) {
        log(Level.WARN, messages);
    }

    public static void error(final Object... messages) {
        log(Level.ERROR, messages);
    }
}


text:
import { Directive, ElementRef, HostBinding, Input, Renderer } from '@angular/core';

import { isTrueProperty } from '../../util/util';
import { Config } from '../../config/config';
import { Ion } from '../ion';

/**
 * @name Icon
 * @description
 * Icons can be used on their own, or inside of a number of Ionic components.
 * For a full list of available icons, check out the
 * [Ionicons docs](../../../../ionicons).
 *
 * One feature of Ionicons in Ionic is when icon names are set, the actual icon
 * which is rendered can change slightly depending on the mode the app is
 * running from. For example, by setting the icon name of `alarm`, on iOS the
 * icon will automatically apply `ios-alarm`, and on Material Design it will
 * automatically apply `md-alarm`. This allows the developer to write the
 * markup once while Ionic applies the appropriate icon based on the mode.
 *
 * @usage
 * ```html
 * <!-- automatically uses the correct "star" icon depending on the mode -->
 * <ion-icon name="star"></ion-icon>
 *
 * <!-- explicity set the icon for each mode -->
 * <ion-icon ios="ios-home" md="md-home"></ion-icon>
 *
 * <!-- always use the same icon, no matter what the mode -->
 * <ion-icon name="ios-clock"></ion-icon>
 * <ion-icon name="logo-twitter"></ion-icon>
 * ```
 *
 * @demo /docs/v2/demos/src/icon/
 * @see {@link /docs/v2/components#icons Icon Component Docs}
 *
 */
@Directive({
  selector: 'ion-icon',
  host: {
    'role': 'img'
  }
})
export class Icon extends Ion {
  /** @private */
  _iconMode: string;
  /** @private */
  _isActive: boolean = true;
  /** @private */
  _name: string = '';
  /** @private */
  _ios: string = '';
  /** @private */
  _md: string = '';
  /** @private */
  _css: string = '';

  /**
   * @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`.
   */
  @Input()
  get color(): string {
    return this._color;
  }
  set color(value: string) {
    this._setColor('icon', value);
  }

  /**
   * @input {string} The mode to apply to this component.
   */
  @Input()
  set mode(val: string) {
    this._setMode('icon', val);
  }

  constructor(
    config: Config,
    elementRef: ElementRef,
    renderer: Renderer
  ) {
    super(config, elementRef, renderer);

    this.mode = config.get('mode');
    this._iconMode = config.get('iconMode');
  }

  /**
   * @private
   */
  ngOnDestroy() {
    if (this._css) {
      this.setElementClass(this._css, false);
    }
  }

  /**
   * @input {string} Icon to use. Will load the appropriate icon for each mode
   */
  @Input()
  get name(): string {
    return this._name;
  }

  set name(val: string) {
    if (!(/^md-|^ios-|^logo-/.test(val))) {
      // this does not have one of the defaults
      // so lets auto add in the mode prefix for them
      this._name = this._iconMode + '-' + val;
    } else {
      this._name = val;
    }
    this.update();
  }

  /**
   * @input {string} Explicitly set the icon to use on iOS
   */
  @Input()
  get ios(): string {
    return this._ios;
  }

  set ios(val: string) {
    this._ios = val;
    this.update();
  }

  /**
   * @input {string} Explicitly set the icon to use on MD
   */
  @Input()
  get md(): string {
    return this._md;
  }

  set md(val: string) {
    this._md = val;
    this.update();
  }

  /**
   * @input {bool} Whether or not the icon has an "active" appearance. On iOS an active icon is filled in or full appearance, and an inactive icon on iOS will use an outlined version of the icon same icon. Material Design icons do not change appearance depending if they're active or not. The `isActive` property is largely used by the tabbar.
   */
  @Input()
  get isActive(): boolean {
    return this._isActive;
  }

  set isActive(val: boolean) {
    this._isActive = isTrueProperty(val);
    this.update();
  }

  /**
   * @private
   */
  @HostBinding('class.hide') _hidden: boolean = false;

  /**
   * @private
   */
  update() {
    let name;
    if (this._ios && this._iconMode === 'ios') {
      name = this._ios;
    } else if (this._md && this._iconMode === 'md') {
      name = this._md;
    } else {
      name = this._name;
    }
    let hidden = this._hidden = (name === null);
    if (hidden) {
      return;
    }

    let iconMode = name.split('-', 2)[0];
    if (
      iconMode === 'ios' &&
      !this._isActive &&
      name.indexOf('logo-') < 0 &&
      name.indexOf('-outline') < 0) {
      name += '-outline';
    }

    let css = 'ion-' + name;
    if (this._css === css) {
      return;
    }
    if (this._css) {
      this.setElementClass(this._css, false);
    }
    this._css = css;
    this.setElementClass(css, true);

    let label = name
      .replace('ios-', '')
      .replace('md-', '')
      .replace('-', ' ');
    this.setElementAttribute('aria-label', label);
  }

}


text:
/* Welcome to Compass.
 * In this file you should write your main styles. (or centralize your imports)
 * Import this file using the following HTML or equivalent:
 * <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> */
/* line 17, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 100%;
  vertical-align: baseline;
}

/* line 22, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html {
  line-height: 1;
}

/* line 24, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
ol, ul {
  list-style: none;
}

/* line 26, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* line 28, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
caption, th, td {
  text-align: left;
  font-weight: normal;
  vertical-align: middle;
}

/* line 30, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q, blockquote {
  quotes: none;
}
/* line 103, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q:before, q:after, blockquote:before, blockquote:after {
  content: "";
  content: none;
}

/* line 32, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
a img {
  border: none;
}

/* line 116, ../../../../../../../../../Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
  display: block;
}

/**
 * Profound Grid
 *
 * Built in Sass (SCSS) this responsive/adaptive grid supports both fixed and fluid layouts,
 * relative and fixed gutters, as well as your choice of semantic markup or generic '.grid-x' classes.
 *
 * The biggest difference to other grid systems is the use of negative margins for column
 * placements, avoiding the subpixel rounding issues that usually break/uglify fluid layouts
 * in some browsers.
 *
 * Nested columns are supported too, without having to reset the grid on each level.
 *
 * Credits/Inspiration:
 * -------------------
 * Semantic Grid: http://www.semantic.gs
 * Susy: http://susy.oddbird.net
 * Negative Grid: http://chrisplaneta.com/freebies/negativegrid-fluid-css-grid-by-chris-planeta/
 *
 * @author Profound Creative Studio
 * @url http://www.profoundgrid.com
 * @url http://www.weareprofound.com
 */
/**
 * Clearfix
 */
/**
 * Legacy Clearfix
 */
/**
 * Establish the grid-containing element.
 */
/**
 * Align an element to the grid.
 */
/**
 * Apply to any column to make it the last one of the current row.
 */
/* line 17, ../sass/screen copy.scss */
div, span, section, header, footer, article {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

/* line 19, ../sass/screen copy.scss */
.container img {
  width: 100%;
}

/* line 21, ../sass/screen copy.scss */
body {
  font-family: "arial";
}

/* line 25, ../sass/screen copy.scss */
.clear {
  overflow: hidden;
  *zoom: 1;
}

/* line 26, ../sass/screen copy.scss */
header {
  width: 100%;
  padding-top: 10px;
  position: fixed;
  top: 0px;
  background: white;
  z-index: 4;
  box-shadow: 0px 3px 5px #888888;
}
/* line 35, ../sass/screen copy.scss */
header .centered {
  width: 98%;
  margin: 0 1%;
  width: 100%;
  margin: 0px auto;
}
/* line 41, ../sass/screen copy.scss */
header .centered section {
  float: left;
  margin-right: -100%;
  width: 100%;
  text-align: center;
}
/* line 44, ../sass/screen copy.scss */
header .centered section img {
  width: auto;
}
/* line 189, ../sass/_grid.scss */
header .centered section:nth-child(1n+1) {
  margin-left: 0%;
  margin-bottom: 1%;
  clear: both;
  overflow: hidden;
  *zoom: 1;
}

/* line 50, ../sass/screen copy.scss */
.banner {
  margin-top: 113px;
  width: 100%;
  overflow: hidden;
  *zoom: 1;
}
/* line 54, ../sass/screen copy.scss */
.banner img {
  width: 100%;
}
/* line 55, ../sass/screen copy.scss */
.banner .banner_image {
  position: relative;
}
/* line 57, ../sass/screen copy.scss */
.banner .banner_image .banner_text {
  position: absolute;
  top: 35%;
  left: 0px;
  color: white;
  width: 100%;
}

/* line 67, ../sass/screen copy.scss */
.main-content {
  overflow: hidden;
  *zoom: 1;
  width: 100%;
  margin: 0px auto;
  background: white;
  min-height: 200px;
  z-index: 3;
  position: relative;
}

/* line 79, ../sass/screen copy.scss */
footer {
  width: 100%;
  background: white;
  min-height: 50px;
}

/* line 85, ../sass/screen copy.scss */
.full-width, .twocolumns, .threecolumns, .fourcolumn {
  overflow: hidden;
  *zoom: 1;
  padding: 0 2%;
}
/* line 86, ../sass/screen copy.scss */
.full-width section, .twocolumns section, .threecolumns section, .fourcolumn section {
  float: left;
  margin-right: -100%;
  width: 100%;
}
/* line 189, ../sass/_grid.scss */
.full-width section:nth-child(1n+1), .twocolumns section:nth-child(1n+1), .threecolumns section:nth-child(1n+1), .fourcolumn section:nth-child(1n+1) {
  margin-left: 0%;
  margin-bottom: 1%;
  clear: both;
  overflow: hidden;
  *zoom: 1;
}

/* line 92, ../sass/screen copy.scss */
.full-width {
  padding: 0;
}

/* line 96, ../sass/screen copy.scss */
.icon img {
  padding: 0px 0px 0px 0px;
}

/* line 97, ../sass/screen copy.scss */
.tagline {
  font-size: 11px;
  font-weight: bold;
}

@media screen and (min-device-width: 720px) and (min-width: 720px) {
  /* line 101, ../sass/screen copy.scss */
  .banner {
    margin-top: 50px;
  }

  /* line 103, ../sass/screen copy.scss */
  header .centered {
    width: 100%;
    padding: 0 2%;
  }
  /* line 106, ../sass/screen copy.scss */
  header .centered section {
    float: left;
    margin-right: -100%;
    width: 32.67%;
  }
  /* line 189, ../sass/_grid.scss */
  header .centered section:nth-child(3n+1) {
    margin-left: 0%;
    margin-bottom: 1%;
    clear: both;
    overflow: hidden;
    *zoom: 1;
  }
  /* line 189, ../sass/_grid.scss */
  header .centered section:nth-child(3n+2) {
    margin-left: 33.67%;
    margin-bottom: 1%;
    clear: none;
  }
  /* line 189, ../sass/_grid.scss */
  header .centered section:nth-child(3n+3) {
    margin-left: 67.33%;
    margin-bottom: 1%;
    clear: none;
  }
  /* line 111, ../sass/screen copy.scss */
  header .centered .tagline {
    text-align: right;
    padding: 20px 0px 0px 0px;
  }
  /* line 112, ../sass/screen copy.scss */
  header .centered .icon {
    text-align: left;
  }

  /* line 117, ../sass/screen copy.scss */
  .twocolumns {
    padding: 0 2%;
  }
  /* line 119, ../sass/screen copy.scss */
  .twocolumns section {
    float: left;
    margin-right: -100%;
    width: 49.5%;
  }
  /* line 189, ../sass/_grid.scss */
  .twocolumns section:nth-child(2n+1) {
    margin-left: 0%;
    margin-bottom: 1%;
    clear: both;
    overflow: hidden;
    *zoom: 1;
  }
  /* line 189, ../sass/_grid.scss */
  .twocolumns section:nth-child(2n+2) {
    margin-left: 50.5%;
    margin-bottom: 1%;
    clear: none;
  }

  /* line 123, ../sass/screen copy.scss */
  .fourcolumns {
    padding: 0 2%;
  }
  /* line 125, ../sass/screen copy.scss */
  .fourcolumns section {
    float: left;
    margin-right: -100%;
    width: 49.5%;
  }
  /* line 189, ../sass/_grid.scss */
  .fourcolumns section:nth-child(2n+1) {
    margin-left: 0%;
    margin-bottom: 1%;
    clear: both;
    overflow: hidden;
    *zoom: 1;
  }
  /* line 189, ../sass/_grid.scss */
  .fourcolumns section:nth-child(2n+2) {
    margin-left: 50.5%;
    margin-bottom: 1%;
    clear: none;
  }

  /* line 129, ../sass/screen copy.scss */
  .threecolumns {
    padding: 0 2%;
  }
}
@media screen and (min-device-width: 920px) and (min-width: 920px) {
  /* line 136, ../sass/screen copy.scss */
  .banner {
    margin-top: 50px;
  }

  /* line 139, ../sass/screen copy.scss */
  header .centered {
    width: 920px;
  }

  /* line 143, ../sass/screen copy.scss */
  .main-content {
    width: 920px;
    margin-top: -80px;
  }

  /* line 146, ../sass/screen copy.scss */
  .twocolumns section {
    float: left;
    margin-right: -100%;
    width: 49.5%;
  }
  /* line 189, ../sass/_grid.scss */
  .twocolumns section:nth-child(2n+1) {
    margin-left: 0%;
    margin-bottom: 1%;
    clear: both;
    overflow: hidden;
    *zoom: 1;
  }
  /* line 189, ../sass/_grid.scss */
  .twocolumns section:nth-child(2n+2) {
    margin-left: 50.5%;
    margin-bottom: 1%;
    clear: none;
  }

  /* line 151, ../sass/screen copy.scss */
  .threecolumns section {
    float: left;
    margin-right: -100%;
    width: 32.67%;
  }
  /* line 189, ../sass/_grid.scss */
  .threecolumns section:nth-child(3n+1) {
    margin-left: 0%;
    margin-bottom: 1%;
    clear: both;
    overflow: hidden;
    *zoom: 1;
  }
  /* line 189, ../sass/_grid.scss */
  .threecolumns section:nth-child(3n+2) {
    margin-left: 33.67%;
    margin-bottom: 1%;
    clear: none;
  }
  /* line 189, ../sass/_grid.scss */
  .threecolumns section:nth-child(3n+3) {
    margin-left: 67.33%;
    margin-bottom: 1%;
    clear: none;
  }

  /* line 155, ../sass/screen copy.scss */
  .fourcolumns section {
    float: left;
    margin-right: -100%;
    width: 24.25%;
  }
  /* line 189, ../sass/_grid.scss */
  .fourcolumns section:nth-child(4n+1) {
    margin-left: 0%;
    margin-bottom: 1%;
    clear: both;
    overflow: hidden;
    *zoom: 1;
  }
  /* line 189, ../sass/_grid.scss */
  .fourcolumns section:nth-child(4n+2) {
    margin-left: 25.25%;
    margin-bottom: 1%;
    clear: none;
  }
  /* line 189, ../sass/_grid.scss */
  .fourcolumns section:nth-child(4n+3) {
    margin-left: 50.5%;
    margin-bottom: 1%;
    clear: none;
  }
  /* line 189, ../sass/_grid.scss */
  .fourcolumns section:nth-child(4n+4) {
    margin-left: 75.75%;
    margin-bottom: 1%;
    clear: none;
  }
}
/* line 161, ../sass/screen copy.scss */
.editable {
  margin-top: 10px;
  position: relative;
}


text:
using System;
using XenAPI;

namespace XenAdmin.Wizards.GenericPages
{
    public abstract class ReasoningFilter
    {
        protected ReasoningFilter(IXenObject itemToFilterOn)
        {
            if (!(itemToFilterOn is Host) && !(itemToFilterOn is Pool))
                throw new ArgumentException("Target should be host or pool");

            baseItemToFilterOn = itemToFilterOn;
        }

        /// <summary>
        /// Base item that should be used to filter on
        /// </summary>
        private IXenObject baseItemToFilterOn { get; set; }
        //public abstract bool FailureFound { get; }
        public abstract string Reason { get; }

        public abstract bool FailureFoundFor(IXenObject xenObject);

        public bool FailureFound => FailureFoundFor(baseItemToFilterOn);

        public virtual void Cancel() { }
    }
}


text:
package org.milocontainer.staticresources;

import java.io.File;
import javax.servlet.Servlet;
import javax.servlet.ServletException;

import org.milocontainer.MiloServletContext;
import org.milocontainer.deployment.ServletHolder;

public class StaticResourcesHolder extends ServletHolder {
    private MiloServletContext servletContext;
    private Servlet servlet;

    public StaticResourcesHolder(MiloServletContext miloServletContext) {
        super(miloServletContext, "staticResources", null);
        this.servletContext = miloServletContext;
        servlet = new StaticResourcesServlet(miloServletContext.getDocRoot());
    }

    @Override
    public Servlet loadServlet() throws ServletException {
        return servlet;
    }

    public boolean matches(String uri) {
        final File docRoot = servletContext.getDocRoot();
        return new File(docRoot, uri).exists();
    }
}


text:
package fr.openwide.maven.artifact.notifier.web.application.artifact.component;

import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.spring.injection.annot.SpringBean;

import fr.openwide.core.wicket.markup.html.basic.HideableExternalLink;
import fr.openwide.core.wicket.markup.html.panel.GenericPanel;
import fr.openwide.core.wicket.more.model.BindingModel;
import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersion;
import fr.openwide.maven.artifact.notifier.core.business.artifact.service.IArtifactService;
import fr.openwide.maven.artifact.notifier.core.business.search.service.IMavenCentralSearchUrlService;
import fr.openwide.maven.artifact.notifier.core.util.binding.Binding;
import fr.openwide.maven.artifact.notifier.web.application.common.model.EitherModel;

public class ArtifactVersionLinksPanel extends GenericPanel<ArtifactVersion> {

	private static final long serialVersionUID = 6624055534980328744L;

	@SpringBean
	private IMavenCentralSearchUrlService mavenCentralSearchUrlService;

	@SpringBean
	private IArtifactService artifactService;

	public ArtifactVersionLinksPanel(String id, IModel<? extends ArtifactVersion> model) {
		super(id, model);

		// Changelog link
		IModel<String> versionChangelogUrlModel = new ArtifactVersionAdditionalInformationModel<String>(
				BindingModel.of(getModel(), Binding.artifactVersion().additionalInformation().changelogUrl().url()),
				BindingModel.of(getModel(), Binding.artifactVersion().projectVersion().additionalInformation().changelogUrl().url()));
		IModel<String> changelogUrlModel = new ArtifactVersionAdditionalInformationModel<String>(
				versionChangelogUrlModel,
				BindingModel.of(getModel(), Binding.artifactVersion().projectVersion().project().additionalInformation().changelogUrl().url()));
		add(new HideableExternalLink("changelogLink", changelogUrlModel));

		// Release notes link
		IModel<String> releaseNotesUrlModel = new ArtifactVersionAdditionalInformationModel<String>(
				BindingModel.of(getModel(), Binding.artifactVersion().additionalInformation().releaseNotesUrl().url()),
				BindingModel.of(getModel(), Binding.artifactVersion().projectVersion().additionalInformation().releaseNotesUrl().url()));
		add(new HideableExternalLink("releaseNotesLink", releaseNotesUrlModel));

		// Announce link
		IModel<String> announceUrlModel = new ArtifactVersionAdditionalInformationModel<String>(
				BindingModel.of(getModel(), Binding.artifactVersion().additionalInformation().announceUrl().url()),
				BindingModel.of(getModel(), Binding.artifactVersion().projectVersion().additionalInformation().announceUrl().url()));
		add(new HideableExternalLink("announceLink", announceUrlModel));

		// Maven central link
		add(new ExternalLink("mavenCentralLink", new LoadableDetachableModel<String>() {
			private static final long serialVersionUID = 1L;

			@Override
			protected String load() {
				ArtifactVersion artifactVersion = getModelObject();
				return artifactVersion != null ? mavenCentralSearchUrlService.getVersionUrl(artifactVersion) : null;
			}
		}));
	}

	private class ArtifactVersionAdditionalInformationModel<T> extends EitherModel<T> {

		private static final long serialVersionUID = 8116743900640164832L;

		private IModel<? extends T> artifactVersionAdditionalInformationModel;

		public ArtifactVersionAdditionalInformationModel(IModel<? extends T> artifactVersionAdditionalInformationModel,
				IModel<? extends T> projectVersionAdditionalInformationModel) {
			super(artifactVersionAdditionalInformationModel, projectVersionAdditionalInformationModel);
			this.artifactVersionAdditionalInformationModel = artifactVersionAdditionalInformationModel;
		}

		@Override
		protected boolean shouldGetFirstModel() {
			ArtifactVersion artifactVersion = ArtifactVersionLinksPanel.this.getModelObject();
			return artifactVersion != null ? !artifactService.hasProject(artifactVersion.getArtifact()) ||
					artifactVersionAdditionalInformationModel.getObject() != null : true;
		}
	}
}


text:
    <link rel="stylesheet" href="semantic/semantic.min.css" />

              {{$index + 1}}

              {{process.command}} {{process.args.join(' ')}}

              <button class="ui mini right floated yellow button" ng-click="process.viewTerm = !process.viewTerm">View</button>

                  {{op.message}}

              <form class="ui fluid form" ng-submit="process.write(process.userInput)" ng-if="process.processState === 1">

                  <button style="display: none" type="submit"></button>

                    {{process.command}} {{process.args.join(' ')}}

                    <button style="display: none" type="submit"></button>
                    <input style="font-family: consolas" type="text" ng-model="process.userInput">

              </form>

    <form class="ui fluid form" ng-submit="addTaskToQueue()">

        <button style="display: none" type="submit"></button>

          {{cwd}}

          <button style="display: none" type="submit"></button>
          <input style="font-family: consolas" type="text" ng-model="args">

    </form>


text:
from kafka import KafkaProducer
producer = KafkaProducer()

producer.send(
  'flight_delay_classification_request',
  '{"Hello": "Producer!"}'.encode()
)


text:
// -*- C++ -*-

/**
 *  @file   ECG_Reconnect_ConsumerEC_Control.h
 *
 *  $Id: ECG_Reconnect_ConsumerEC_Control.h 14 2007-02-01 15:49:12Z mitza $
 *
 *  @author Johnny Willemsen (jwillemsen@remedy.nl)
 *
 */

#ifndef TAO_ECG_RECONNECT_CONSUMEREC_CONTROL_H
#define TAO_ECG_RECONNECT_CONSUMEREC_CONTROL_H

#include /**/ "ace/pre.h"

#include "orbsvcs/Event/ECG_ConsumerEC_Control.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/ORB.h"
#include "tao/PolicyC.h"

#include "ace/Event_Handler.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

class TAO_ECG_Reconnect_ConsumerEC_Control;
class TAO_EC_Gateway_IIOP;

/**
 * @class TAO_ECG_Reconnect_ConsumerEC_Control_Adapter
 *
 * @brief Forwards timeout events to the Reconnect ConsumerControl
 *
 * The Reconnect ConsumerControl strategy uses the reactor to
 * periodically wakeup and verify the state of the consumers
 * registered with the Event Channel.
 */
class TAO_RTEvent_Serv_Export TAO_ECG_Reconnect_ConsumerEC_Control_Adapter
  : public ACE_Event_Handler
{
public:
  /// Constructor
  TAO_ECG_Reconnect_ConsumerEC_Control_Adapter (TAO_ECG_Reconnect_ConsumerEC_Control *adaptee);

  // = Documented in ACE_Event_Handler.
  virtual int handle_timeout (const ACE_Time_Value &tv,
                              const void *arg = 0);

private:
  /// The adapted object
  TAO_ECG_Reconnect_ConsumerEC_Control *adaptee_;
};

/**
 * @class TAO_ECG_Reconnect_ConsumerEC_Control
 *
 * @brief Consumer event channel control
 *
 * Defines the interface for the consumer event channel control strategy.
 * This strategy handles misbehaving or failing consumer event channels.
 *
 * This control tries to reconnect to the consumer ec incase of a connection
 * loss and then does a reconnect when the connection is back again. When also
 * a restart of the consumer ec must be handled correctly, then the consumer
 * ec must use a persistent IOR.
 */
class TAO_RTEvent_Serv_Export TAO_ECG_Reconnect_ConsumerEC_Control
  : public TAO_ECG_ConsumerEC_Control
{
public:
  /// Constructor.  It does not assume ownership of the @a event_channel
  /// parameter.
  TAO_ECG_Reconnect_ConsumerEC_Control (const ACE_Time_Value &rate,
                                        const ACE_Time_Value &timeout,
                                        TAO_EC_Gateway_IIOP* gateway,
                                        CORBA::ORB_ptr orb);

  /// Destructor.
  virtual ~TAO_ECG_Reconnect_ConsumerEC_Control (void);

  /// Receive the timeout from the adapter
  void handle_timeout (const ACE_Time_Value &tv,
                       const void* arg);

  // = Documented in TAO_EC_ConsumerControl
  virtual int activate (void);
  virtual int shutdown (void);
  virtual void event_channel_not_exist (TAO_EC_Gateway_IIOP *gateway);
  virtual void system_exception (TAO_EC_Gateway_IIOP *gateway,
                                 CORBA::SystemException &);

private:
  /// Check if the consumers still exists.  It is a helper method for
  /// handle_timeout() to isolate the exceptions.
  void query_eventchannel (void);

  /// Look if we can reconnect again.
  void try_reconnect (void);

  /// Reconnect to the consumer ec.
  void reconnect (void);

private:
  /// The polling rate
  ACE_Time_Value rate_;

  /// The polling timeout
  ACE_Time_Value timeout_;

  /// The Adapter for the reactor events
  TAO_ECG_Reconnect_ConsumerEC_Control_Adapter adapter_;

  /// The gateway
  TAO_EC_Gateway_IIOP* gateway_;

  /// The ORB
  CORBA::ORB_var orb_;

  /// To control the timeout policy in the thread
  CORBA::PolicyCurrent_var policy_current_;

  /// Precomputed policy list to the set timeout.
  CORBA::PolicyList policy_list_;

  /// The ORB reactor
  ACE_Reactor *reactor_;

  /// Do we have a connection to the consumer ec
  int is_consumer_ec_connected_;

#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
  /// The timer id
  long timer_id_;
#endif /* TAO_HAS_CORBA_MESSAGING */
};

TAO_END_VERSIONED_NAMESPACE_DECL

#include /**/ "ace/post.h"

#endif /* TAO_ECG_RECONNECT_CONSUMEREC_CONTROL_H */


text:
.icon-favorite:before           { content: "\f08d"; }
.icon-no-favorite:before        { content: "\f00d"; }
.icon-project:before            { content: "\f07c"; }
.icon-page:before               { content: "\f016"; }
.icon-project-active:before     { content: "\f005"; }
.icon-project-inactive:before   { content: "\f006"; }


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Terms of Service</title>

Terms of Service ("Terms")

 Please read these Terms of Service ("Terms", "Terms of Service") carefully before using the Still Friends app (the "Service") operated by BOBGOO S.L. ("us", "we", or "our").

Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who access or use the Service.

By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you may not access the Service.

Termination

We may terminate or suspend access to our Service immediately, without prior notice or liability, for any reason whatsoever, including without limitation if you breach the Terms.

All provisions of the Terms which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability.

Links To Other Web Sites

Our Service may contain links to thirdparty web sites or services that are not owned or controlled by us.

We have no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that we shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such web sites or services.

We strongly advise you to read the terms and conditions and privacy policies of any thirdparty web sites or services that you visit.

Changes

We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material we will try to provide at least 30 days notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion.

By continuing to access or use our Service after those revisions become effective, you agree to be bound by the revised terms. If you do not agree to the new terms, please stop using the Service.

Contact Us

If you have any questions or suggestions about our Terms of Service, do not hesitate to contact us.

Last Edited on 2020-06-16


text:
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <service id="twig.extension.tk.shop" class="Tecnokey\ShopBundle\Twig\Extension\ShopExtension" public="false">
            <tag name="twig.extension" />
            <argument type="service" id="service_container" />
            <argument type="service" id="router" />
            <argument type="service" id="view.utils" />
            <argument type="service" id="marketManager" />
        </service>

        <service id="twig.extension.tk.orderManager" class="Tecnokey\ShopBundle\Twig\Extension\OrderManagerExtension" public="false">
            <tag name="twig.extension" />
            <argument type="service" id="orderManager"/>
        </service>
    </services>

</container>


text:
package org.switchyard.validate.config.model;

import java.io.StringReader;

import javax.xml.namespace.QName;

import junit.framework.Assert;

import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
import org.junit.Before;
import org.junit.Test;
import org.switchyard.common.io.pull.StringPuller;
import org.switchyard.common.xml.XMLHelper;
import org.switchyard.config.model.Model;
import org.switchyard.config.model.ModelPuller;
import org.switchyard.config.model.switchyard.SwitchYardModel;
import org.switchyard.config.model.switchyard.SwitchYardNamespace;
import org.switchyard.config.model.switchyard.v1.V1SwitchYardModel;
import org.switchyard.config.model.validate.ValidateModel;
import org.switchyard.config.model.validate.ValidatesModel;
import org.switchyard.config.model.validate.v1.V1ValidatesModel;
import org.switchyard.validate.config.model.v1.V1FileEntryModel;
import org.switchyard.validate.config.model.v1.V1JavaValidateModel;
import org.switchyard.validate.config.model.v1.V1SchemaFilesModel;
import org.switchyard.validate.config.model.v1.V1XmlValidateModel;

/**
 * ValidateModelTests.
 *
 * @author Tomohisa Igarashi
 */
public class ValidateModelTests {

    private static final String XML = "/org/switchyard/validate/config/model/ValidateModelTests.xml";

    private ModelPuller<SwitchYardModel> _puller;

    @Before
    public void before() throws Exception {
        _puller = new ModelPuller<SwitchYardModel>();
    }

    @Test
    public void testCreateEmptyModel() throws Exception {
        String namespace = ValidateNamespace.DEFAULT.uri();
        String name = ValidateModel.VALIDATE + '.' + JavaValidateModel.JAVA;
        Model model = new ModelPuller<Model>().pull(XMLHelper.createQName(namespace, name));
        Assert.assertTrue(model instanceof JavaValidateModel);
        Assert.assertEquals(name, model.getModelConfiguration().getName());
        Assert.assertEquals(new QName(namespace, name), model.getModelConfiguration().getQName());
    }

    @Test
    public void testCreate() throws Exception {
        SwitchYardModel switchyard = new V1SwitchYardModel(SwitchYardNamespace.V_1_0.uri());
        ValidatesModel validates = new V1ValidatesModel(SwitchYardNamespace.V_1_0.uri());
        JavaValidateModel javaValidate = new V1JavaValidateModel(ValidateNamespace.V_1_0.uri());
        javaValidate.setName(new QName("msgA"));
        javaValidate.setClazz("org.examples.validate.AValidate");
        validates.addValidate(javaValidate);
        XmlValidateModel xmlValidate = new V1XmlValidateModel(ValidateNamespace.V_1_0.uri());
        xmlValidate.setName(new QName("msgB"));
        xmlValidate.setSchemaType(XmlSchemaType.XML_SCHEMA);
        FileEntryModel entry = new V1FileEntryModel(ValidateNamespace.V_1_0.uri()).setFile("/validates/xxx.xml");
        SchemaFilesModel schemaFiles = new V1SchemaFilesModel(ValidateNamespace.V_1_0.uri());
        schemaFiles.addEntry(entry);
        xmlValidate.setSchemaFiles(schemaFiles);
        xmlValidate.setFailOnWarning(true);
        validates.addValidate(xmlValidate);
        switchyard.setValidates(validates);
        String new_xml = switchyard.toString();
        String old_xml = new ModelPuller<SwitchYardModel>().pull(XML, getClass()).toString();
        XMLUnit.setIgnoreWhitespace(true);
        Diff diff = XMLUnit.compareXML(old_xml, new_xml);
        Assert.assertTrue(diff.toString(), diff.identical());
    }

    @Test
    public void testRead() throws Exception {
        SwitchYardModel switchyard = _puller.pull(XML, getClass());
        ValidatesModel validates = switchyard.getValidates();
        JavaValidateModel java_validate = (JavaValidateModel)validates.getValidates().get(0);
        Assert.assertEquals("msgA", java_validate.getName().getLocalPart());
        Assert.assertEquals("org.examples.validate.AValidate", java_validate.getClazz());
        XmlValidateModel xml_validate = (XmlValidateModel)validates.getValidates().get(1);
        Assert.assertEquals("msgB", xml_validate.getName().getLocalPart());
        Assert.assertEquals("/validates/xxx.xml", xml_validate.getSchemaFiles().getEntries().get(0).getFile());

    }

    @Test
    public void testWrite() throws Exception {
        String old_xml = new StringPuller().pull(XML, getClass());
        SwitchYardModel switchyard = _puller.pull(new StringReader(old_xml));
        String new_xml = switchyard.toString();
        XMLUnit.setIgnoreWhitespace(true);
        Diff diff = XMLUnit.compareXML(old_xml, new_xml);
        Assert.assertTrue(diff.toString(), diff.identical());
    }

    @Test
    public void testParenthood() throws Exception {
        SwitchYardModel switchyard_1 = _puller.pull(XML, getClass());
        ValidatesModel validates_1 = switchyard_1.getValidates();
        ValidateModel validate = validates_1.getValidates().get(0);
        ValidatesModel validates_2 = validate.getValidates();
        SwitchYardModel switchyard_2 = validates_2.getSwitchYard();
        Assert.assertEquals(validates_1, validates_2);
        Assert.assertEquals(switchyard_1, switchyard_2);
    }

    @Test
    public void testValidation() throws Exception {
        SwitchYardModel switchyard = _puller.pull(XML, getClass());
        switchyard.assertModelValid();
    }

}


text:
require "nexoos_socinal2/version"
require 'yaml'
require 'active_support/core_ext/hash'
require 'unicode_utils/upcase'
require 'savon'

require "nexoos_socinal2/configuration"

# Modules
require "nexoos_socinal2/modules/socinal_base"

  # Clients
  require "nexoos_socinal2/modules/clients/client"

  # Loans
  require "nexoos_socinal2/modules/loans/loan"
  require "nexoos_socinal2/modules/loans/loan_ccb_simulation"
  # require "nexoos_socinal2/modules/loans/loan_ccb_add_guarantors"
  require "nexoos_socinal2/modules/loans/loan_ccb_generation"
  require "nexoos_socinal2/modules/loans/loan_ccb_elimination"
  require "nexoos_socinal2/modules/loans/loan_ccb_statement"
  require "nexoos_socinal2/modules/loans/loan_ccb_balance"
  require "nexoos_socinal2/modules/loans/loan_ccb_terms"

  # RDBS
  require "nexoos_socinal2/modules/rdbs/rdb"
  require "nexoos_socinal2/modules/rdbs/rdb_include"
  require "nexoos_socinal2/modules/rdbs/rdb_withdraw"
  require "nexoos_socinal2/modules/rdbs/rdb_statement"

  # Fixed Application

module NexoosSocinal2

  # Configurations

  ###########################################
  # Methods to configure NexoosSocinal2 gem #
  ###########################################

  class << self
    attr_writer :configuration
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield(configuration)
  end

  def self.username
    configuration.username
  end

  def self.password
    configuration.password
  end

  def self.credit_agent
    configuration.credit_agent
  end

  def self.credit_line
    configuration.credit_line
  end

  def self.application_lines
    configuration.application_lines
  end

  def self.wsdl_loan_url
    configuration.wsdl_loan_url
  end
  def self.wsdl_registration_url
    configuration.wsdl_registration_url
  end

  def self.wsdl_faap_url
    configuration.wsdl_faap_url
  end

  def self.configured?
    !(username.nil? ||
      password.nil? ||
      credit_agent.nil? ||
      credit_line.nil? ||
      application_lines.blank? ||
      wsdl_loan_url.nil? ||
      wsdl_faap_url.nil? ||
      wsdl_registration_url.nil?)
  end

  # Get gem root path

  def self.root
    File.expand_path('../..', __FILE__)
  end

  ###############################
  # Client Registration methods #
  ###############################

  #########################################################################
  # Register client is used to register borrowers, lenders and guarantors #
  # ARGS: Hash - data                                                     #
  # Format found in lib/data_formats.rb                                   #
  # Returns Hash - Response with:                                         #
  # { :result => { :body => 'financial_institution_account number' } }    #
  #########################################################################

  def self.register_client(data = {})
    respond_with_object(Client.new(data))
  end

  ######################################
  # End of Client Registration methods #
  ######################################

  #################
  # Loans methods #
  #################

  #########################################################################
  # Insert loans into socinal                                             #
  # ARGS: Hash - data                                                     #
  # Format found in lib/data_formats.rb                                   #
  # Returns Hash - Response with:                                         #
  # { :result => { :body => 'financial_institution_ccb_id number' } }     #
  #########################################################################

  def self.insert_loan_ccb(data = {})
    respond_with_object(LoanCcbGeneration.new(data))
  end

  #########################################################################
  # Simulate loans into socinal                                           #
  # ARGS: Hash - data                                                     #
  # Format found in lib/data_formats.rb                                   #
  # Returns Hash - Response with:                                         #
  # { :result => { :body => 'financial_institution_ccb_id number' } }     #
  #########################################################################

  def self.simulate_loan(data = {})
    respond_with_object(LoanCcbSimulation.new(data))
  end

  #####################################################################
  # Get loans from socinal                                         #
  # ARGS: Hash - data                                                 #
  # Format found in lib/data_formats.rb                               #
  # Returns Hash - Response with:                                     #
  # { :result => { :body => 'financial_institution_ccb_id number' } } #
  #####################################################################

  def self.get_loan_ccb(data = {})
    respond_with_object(LoanCcbTerms.new(data))
  end

  #######################################################################
  # Get loan balance                                                    #
  # ARGS: Hash - data                                                   #
  # Format found in lib/data_formats.rb                                 #
  # Returns Hash - Response with:                                       #
  # { :result => { :body => { contract: 'financial_institution_ccb_jd', #
  #                           date: 'Consult date',                     #
  #                           balance: 'Balance of loan'} } }           #
  #######################################################################

  def self.get_ccb_balance(data = {})
    respond_with_object(LoanCcbBalance.new(data))
  end

  ###################################################
  # Get loan statement                              #
  # ARGS: Hash - data                               #
  # Format found in lib/data_formats.rb             #
  # Returns Hash - Response with: balances per date #
  ###################################################

  def self.get_ccb_statement(data = {})
    respond_with_object(LoanCcbStatement.new(data))
  end

  #######################################################
  # Exclude CCB                                         #
  # ARGS: Hash - data                                   #
  # Format found in lib/data_formats.rb                 #
  # Returns Hash - Response with: number of deleted CCB #
  #######################################################

  def self.exclude_ccb(data = {})
    respond_with_object(LoanCcbElimination.new(data))
  end

  #####################
  # End Loans Methods #
  #####################

  #################
  # RDB's methods #
  #################

  #######################################################
  # Include RBB                                         #
  # ARGS: Hash - data                                   #
  # Format found in lib/data_formats.rb                 #
  # Returns Hash - Response with: number included RDB   #
  #######################################################

  def self.include_rdb(data = {})
    respond_with_object(RdbInclude.new(data))
  end

  ##############################################################
  # Get RBB statements                                         #
  # ARGS: Hash - data                                          #
  # Format found in lib/data_formats.rb                        #
  # Returns Hash - Response with: transactions done in socinal #
  ##############################################################

  def self.get_rdb_statement(data = {})
    respond_with_object(RdbStatement.new(data))
  end

  ###############################################
  # Do RBB withdraw                             #
  # ARGS: Hash - data                           #
  # Format found in lib/data_formats.rb         #
  # Returns Hash - Response with: true or false #
  ###############################################

  def self.rdb_withdraw(data = {})
    respond_with_object(RdbWithdraw.new(data))
  end

  #####################
  # End RDB's methods #
  #####################

  ####################
  # Auxiliar methods #
  ####################

  ###########################################################################
  # Respond with object                                                     #
  # It normalise response of socinal using parsed response and socinal base #
  ###########################################################################

  def self.respond_with_object(obj)
    unless configured?
      return { status: 'error',
        errors: ["NexoosSocinal2 must be configured. Read the documentation."] }
    end

    response = obj.parsed_response
    if response.include? 'ERRO'
      return { status: 'error', errors: [response] }
    else
      return { status: 'success', result: response }
    end

  end

  ########################################################
  # Cnae table mapping                                   #
  # Mapping cnae table of socinal with data from receita #
  ########################################################

  def self.cnae_table
    return @cnae_hash unless @cnae_hash.nil?
    file_path = "#{ NexoosSocinal2.root }/data_files/cnae_socinal.yaml"
    @cnae_hash = YAML.load(File.read(file_path))
  end
end


text:
body {
    background-color: #9E9E9E;
    font-family: 'Roboto', sans-serif;
}
#wrapper {
    width: 60%;
    height: 50%;
    background-color: red;
    margin: auto;
}
#wrapper.blog {
    height: auto;
}
#wrapper.comic {
    height: auto;
    background-color: #E64A19;
	display: table;
}
p {
    text-align: center;
}
header {
    height: 20%;
    width: 100%;
    background-color: #BF360C;
    text-align: center;
    font-family: 'Source Code Pro', ;
    font-size: 42;
    display: table;
}
header h1 {
    text-align: center;
    display: table-cell;
    vertical-align: middle;
}
nav {
    width: 60%;
    height: 20%;
    background-color: #E64A19;
    display: table;
    margin: auto;
    border-bottom: solid #9E9E9E 30px;
    text-align: center;
}
nav.comic {
    height: 3em;
    border-bottom: none;
    width: 50%;
    text-align: center;
}
nav img {
    margin: auto;
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}
nav ul {
    padding: 0%;
    margin: auto;
    font-family: 'Source Code Pro', ;
    font-size: 36;
    display: table-cell;
	vertical-align: middle;
    text-align: center;
}
nav ul li {
    margin: 0 auto;
    list-style: none;
    padding: 0% 5% 0% 5%;
    line-height: 100%;
    display: table-cell;
    vertical-align: middle;
    margin: 0% auto;
    text-align: center;
}
nav a {
    margin: 0 auto;
    padding: 10%;
    border: solid 2px #263238;
    background-color: #388E3C;
    text-align: center;
	vertical-align: middle;
    text-align: center;
}
article {
	padding-top: 0.01%;
    height: 25em;
    background-color: #FB8C00;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}
article.half {
	width: 50%;
    float: right;
}
article.comic {
    height: auto;
}
article.comic img {
    width: 100%;
}
article p {
    padding-left: 6%;
    padding-right: 6%;
}
section {
	padding-top: 0.01%;
    font-family: 'Roboto', sans-serif;
    height: 25em;
    background-color: #FFA000;
    text-align: center;
}
section.half {
    width: 50%;
}
section.blog {
    height: auto;
    padding-left: 16%;
    padding-right: 16%;
}
section.padding {
    padding-left: 16%;
    padding-right: 16%;
}
footer {
    height: 12%;
    width: 100%;
    background-color: #757575;
    display: table;
}
footer p {
    text-align: center;
    display: table-cell;
    text-align: middle;
}


text:
package request_test

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"net/http"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/client"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/awstesting"
	"github.com/aws/aws-sdk-go/awstesting/unit"
	"github.com/aws/aws-sdk-go/service/s3"
)

type mockClient struct {
	*client.Client
}
type MockInput struct{}
type MockOutput struct {
	States []*MockState
}
type MockState struct {
	State *string
}

func (c *mockClient) MockRequest(input *MockInput) (*request.Request, *MockOutput) {
	op := &request.Operation{
		Name:       "Mock",
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &MockInput{}
	}

	output := &MockOutput{}
	req := c.NewRequest(op, input, output)
	req.Data = output
	return req, output
}

func BuildNewMockRequest(c *mockClient, in *MockInput) func([]request.Option) (*request.Request, error) {
	return func(opts []request.Option) (*request.Request, error) {
		req, _ := c.MockRequest(in)
		req.ApplyOptions(opts...)
		return req, nil
	}
}

func TestWaiterPathAll(t *testing.T) {
	svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
		Region: aws.String("mock-region"),
	})}
	svc.Handlers.Send.Clear() // mock sending
	svc.Handlers.Unmarshal.Clear()
	svc.Handlers.UnmarshalMeta.Clear()
	svc.Handlers.ValidateResponse.Clear()

	reqNum := 0
	resps := []*MockOutput{
		{ // Request 1
			States: []*MockState{
				{State: aws.String("pending")},
				{State: aws.String("pending")},
			},
		},
		{ // Request 2
			States: []*MockState{
				{State: aws.String("running")},
				{State: aws.String("pending")},
			},
		},
		{ // Request 3
			States: []*MockState{
				{State: aws.String("running")},
				{State: aws.String("running")},
			},
		},
	}

	numBuiltReq := 0
	svc.Handlers.Build.PushBack(func(r *request.Request) {
		numBuiltReq++
	})
	svc.Handlers.Unmarshal.PushBack(func(r *request.Request) {
		if reqNum >= len(resps) {
			assert.Fail(t, "too many polling requests made")
			return
		}
		r.Data = resps[reqNum]
		reqNum++
	})

	w := request.Waiter{
		MaxAttempts:      10,
		Delay:            request.ConstantWaiterDelay(0),
		SleepWithContext: aws.SleepWithContext,
		Acceptors: []request.WaiterAcceptor{
			{
				State:    request.SuccessWaiterState,
				Matcher:  request.PathAllWaiterMatch,
				Argument: "States[].State",
				Expected: "running",
			},
		},
		NewRequest: BuildNewMockRequest(svc, &MockInput{}),
	}

	err := w.WaitWithContext(aws.BackgroundContext())
	assert.NoError(t, err)
	assert.Equal(t, 3, numBuiltReq)
	assert.Equal(t, 3, reqNum)
}

func TestWaiterPath(t *testing.T) {
	svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
		Region: aws.String("mock-region"),
	})}
	svc.Handlers.Send.Clear() // mock sending
	svc.Handlers.Unmarshal.Clear()
	svc.Handlers.UnmarshalMeta.Clear()
	svc.Handlers.ValidateResponse.Clear()

	reqNum := 0
	resps := []*MockOutput{
		{ // Request 1
			States: []*MockState{
				{State: aws.String("pending")},
				{State: aws.String("pending")},
			},
		},
		{ // Request 2
			States: []*MockState{
				{State: aws.String("running")},
				{State: aws.String("pending")},
			},
		},
		{ // Request 3
			States: []*MockState{
				{State: aws.String("running")},
				{State: aws.String("running")},
			},
		},
	}

	numBuiltReq := 0
	svc.Handlers.Build.PushBack(func(r *request.Request) {
		numBuiltReq++
	})
	svc.Handlers.Unmarshal.PushBack(func(r *request.Request) {
		if reqNum >= len(resps) {
			assert.Fail(t, "too many polling requests made")
			return
		}
		r.Data = resps[reqNum]
		reqNum++
	})

	w := request.Waiter{
		MaxAttempts:      10,
		Delay:            request.ConstantWaiterDelay(0),
		SleepWithContext: aws.SleepWithContext,
		Acceptors: []request.WaiterAcceptor{
			{
				State:    request.SuccessWaiterState,
				Matcher:  request.PathWaiterMatch,
				Argument: "States[].State",
				Expected: "running",
			},
		},
		NewRequest: BuildNewMockRequest(svc, &MockInput{}),
	}

	err := w.WaitWithContext(aws.BackgroundContext())
	assert.NoError(t, err)
	assert.Equal(t, 3, numBuiltReq)
	assert.Equal(t, 3, reqNum)
}

func TestWaiterFailure(t *testing.T) {
	svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
		Region: aws.String("mock-region"),
	})}
	svc.Handlers.Send.Clear() // mock sending
	svc.Handlers.Unmarshal.Clear()
	svc.Handlers.UnmarshalMeta.Clear()
	svc.Handlers.ValidateResponse.Clear()

	reqNum := 0
	resps := []*MockOutput{
		{ // Request 1
			States: []*MockState{
				{State: aws.String("pending")},
				{State: aws.String("pending")},
			},
		},
		{ // Request 2
			States: []*MockState{
				{State: aws.String("running")},
				{State: aws.String("pending")},
			},
		},
		{ // Request 3
			States: []*MockState{
				{State: aws.String("running")},
				{State: aws.String("stopping")},
			},
		},
	}

	numBuiltReq := 0
	svc.Handlers.Build.PushBack(func(r *request.Request) {
		numBuiltReq++
	})
	svc.Handlers.Unmarshal.PushBack(func(r *request.Request) {
		if reqNum >= len(resps) {
			assert.Fail(t, "too many polling requests made")
			return
		}
		r.Data = resps[reqNum]
		reqNum++
	})

	w := request.Waiter{
		MaxAttempts:      10,
		Delay:            request.ConstantWaiterDelay(0),
		SleepWithContext: aws.SleepWithContext,
		Acceptors: []request.WaiterAcceptor{
			{
				State:    request.SuccessWaiterState,
				Matcher:  request.PathAllWaiterMatch,
				Argument: "States[].State",
				Expected: "running",
			},
			{
				State:    request.FailureWaiterState,
				Matcher:  request.PathAnyWaiterMatch,
				Argument: "States[].State",
				Expected: "stopping",
			},
		},
		NewRequest: BuildNewMockRequest(svc, &MockInput{}),
	}

	err := w.WaitWithContext(aws.BackgroundContext()).(awserr.Error)
	assert.Error(t, err)
	assert.Equal(t, request.WaiterResourceNotReadyErrorCode, err.Code())
	assert.Equal(t, "failed waiting for successful resource state", err.Message())
	assert.Equal(t, 3, numBuiltReq)
	assert.Equal(t, 3, reqNum)
}

func TestWaiterError(t *testing.T) {
	svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
		Region: aws.String("mock-region"),
	})}
	svc.Handlers.Send.Clear() // mock sending
	svc.Handlers.Unmarshal.Clear()
	svc.Handlers.UnmarshalMeta.Clear()
	svc.Handlers.UnmarshalError.Clear()
	svc.Handlers.ValidateResponse.Clear()

	reqNum := 0
	resps := []*MockOutput{
		{ // Request 1
			States: []*MockState{
				{State: aws.String("pending")},
				{State: aws.String("pending")},
			},
		},
		{ // Request 1, error case retry
		},
		{ // Request 2, error case failure
		},
		{ // Request 3
			States: []*MockState{
				{State: aws.String("running")},
				{State: aws.String("running")},
			},
		},
	}
	reqErrs := make([]error, len(resps))
	reqErrs[1] = awserr.New("MockException", "mock exception message", nil)
	reqErrs[2] = awserr.New("FailureException", "mock failure exception message", nil)

	numBuiltReq := 0
	svc.Handlers.Build.PushBack(func(r *request.Request) {
		numBuiltReq++
	})
	svc.Handlers.Send.PushBack(func(r *request.Request) {
		code := 200
		if reqNum == 1 {
			code = 400
		}
		r.HTTPResponse = &http.Response{
			StatusCode: code,
			Status:     http.StatusText(code),
			Body:       ioutil.NopCloser(bytes.NewReader([]byte{})),
		}
	})
	svc.Handlers.Unmarshal.PushBack(func(r *request.Request) {
		if reqNum >= len(resps) {
			assert.Fail(t, "too many polling requests made")
			return
		}
		r.Data = resps[reqNum]
		reqNum++
	})
	svc.Handlers.UnmarshalMeta.PushBack(func(r *request.Request) {
		// If there was an error unmarshal error will be called instead of unmarshal
		// need to increment count here also
		if err := reqErrs[reqNum]; err != nil {
			r.Error = err
			reqNum++
		}
	})

	w := request.Waiter{
		MaxAttempts:      10,
		Delay:            request.ConstantWaiterDelay(0),
		SleepWithContext: aws.SleepWithContext,
		Acceptors: []request.WaiterAcceptor{
			{
				State:    request.SuccessWaiterState,
				Matcher:  request.PathAllWaiterMatch,
				Argument: "States[].State",
				Expected: "running",
			},
			{
				State:    request.RetryWaiterState,
				Matcher:  request.ErrorWaiterMatch,
				Argument: "",
				Expected: "MockException",
			},
			{
				State:    request.FailureWaiterState,
				Matcher:  request.ErrorWaiterMatch,
				Argument: "",
				Expected: "FailureException",
			},
		},
		NewRequest: BuildNewMockRequest(svc, &MockInput{}),
	}

	err := w.WaitWithContext(aws.BackgroundContext())
	if err == nil {
		t.Fatalf("expected error, but did not get one")
	}
	aerr := err.(awserr.Error)
	if e, a := request.WaiterResourceNotReadyErrorCode, aerr.Code(); e != a {
		t.Errorf("expect %q error code, got %q", e, a)
	}
	if e, a := 3, numBuiltReq; e != a {
		t.Errorf("expect %d built requests got %d", e, a)
	}
	if e, a := 3, reqNum; e != a {
		t.Errorf("expect %d reqNum got %d", e, a)
	}
}

func TestWaiterStatus(t *testing.T) {
	svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
		Region: aws.String("mock-region"),
	})}
	svc.Handlers.Send.Clear() // mock sending
	svc.Handlers.Unmarshal.Clear()
	svc.Handlers.UnmarshalMeta.Clear()
	svc.Handlers.ValidateResponse.Clear()

	reqNum := 0
	svc.Handlers.Build.PushBack(func(r *request.Request) {
		reqNum++
	})
	svc.Handlers.Send.PushBack(func(r *request.Request) {
		code := 200
		if reqNum == 3 {
			code = 404
			r.Error = awserr.New("NotFound", "Not Found", nil)
		}
		r.HTTPResponse = &http.Response{
			StatusCode: code,
			Status:     http.StatusText(code),
			Body:       ioutil.NopCloser(bytes.NewReader([]byte{})),
		}
	})

	w := request.Waiter{
		MaxAttempts:      10,
		Delay:            request.ConstantWaiterDelay(0),
		SleepWithContext: aws.SleepWithContext,
		Acceptors: []request.WaiterAcceptor{
			{
				State:    request.SuccessWaiterState,
				Matcher:  request.StatusWaiterMatch,
				Argument: "",
				Expected: 404,
			},
		},
		NewRequest: BuildNewMockRequest(svc, &MockInput{}),
	}

	err := w.WaitWithContext(aws.BackgroundContext())
	assert.NoError(t, err)
	assert.Equal(t, 3, reqNum)
}

func TestWaiter_ApplyOptions(t *testing.T) {
	w := request.Waiter{}

	logger := aws.NewDefaultLogger()

	w.ApplyOptions(
		request.WithWaiterLogger(logger),
		request.WithWaiterRequestOptions(request.WithLogLevel(aws.LogDebug)),
		request.WithWaiterMaxAttempts(2),
		request.WithWaiterDelay(request.ConstantWaiterDelay(5*time.Second)),
	)

	if e, a := logger, w.Logger; e != a {
		t.Errorf("expect logger to be set, and match, was not, %v, %v", e, a)
	}

	if len(w.RequestOptions) != 1 {
		t.Fatalf("expect request options to be set to only a single option, %v", w.RequestOptions)
	}
	r := request.Request{}
	r.ApplyOptions(w.RequestOptions...)
	if e, a := aws.LogDebug, r.Config.LogLevel.Value(); e != a {
		t.Errorf("expect %v loglevel got %v", e, a)
	}

	if e, a := 2, w.MaxAttempts; e != a {
		t.Errorf("expect %d retryer max attempts, got %d", e, a)
	}
	if e, a := 5*time.Second, w.Delay(0); e != a {
		t.Errorf("expect %d retryer delay, got %d", e, a)
	}
}

func TestWaiter_WithContextCanceled(t *testing.T) {
	c := awstesting.NewClient()

	ctx := &awstesting.FakeContext{DoneCh: make(chan struct{})}
	reqCount := 0

	w := request.Waiter{
		Name:             "TestWaiter",
		MaxAttempts:      10,
		Delay:            request.ConstantWaiterDelay(1 * time.Millisecond),
		SleepWithContext: aws.SleepWithContext,
		Acceptors: []request.WaiterAcceptor{
			{
				State:    request.SuccessWaiterState,
				Matcher:  request.StatusWaiterMatch,
				Expected: 200,
			},
		},
		Logger: aws.NewDefaultLogger(),
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			req := c.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
			req.HTTPResponse = &http.Response{StatusCode: http.StatusNotFound}
			req.Handlers.Clear()
			req.Data = struct{}{}
			req.Handlers.Send.PushBack(func(r *request.Request) {
				if reqCount == 1 {
					ctx.Error = fmt.Errorf("context canceled")
					close(ctx.DoneCh)
				}
				reqCount++
			})

			return req, nil
		},
	}

	w.SleepWithContext = func(c aws.Context, delay time.Duration) error {
		context := c.(*awstesting.FakeContext)
		select {
		case <-context.DoneCh:
			return context.Err()
		default:
			return nil
		}
	}

	err := w.WaitWithContext(ctx)

	if err == nil {
		t.Fatalf("expect waiter to be canceled.")
	}
	aerr := err.(awserr.Error)
	if e, a := request.CanceledErrorCode, aerr.Code(); e != a {
		t.Errorf("expect %q error code, got %q", e, a)
	}
	if e, a := 2, reqCount; e != a {
		t.Errorf("expect %d requests, got %d", e, a)
	}
}

func TestWaiter_WithContext(t *testing.T) {
	c := awstesting.NewClient()

	ctx := &awstesting.FakeContext{DoneCh: make(chan struct{})}
	reqCount := 0

	statuses := []int{http.StatusNotFound, http.StatusOK}

	w := request.Waiter{
		Name:             "TestWaiter",
		MaxAttempts:      10,
		Delay:            request.ConstantWaiterDelay(1 * time.Millisecond),
		SleepWithContext: aws.SleepWithContext,
		Acceptors: []request.WaiterAcceptor{
			{
				State:    request.SuccessWaiterState,
				Matcher:  request.StatusWaiterMatch,
				Expected: 200,
			},
		},
		Logger: aws.NewDefaultLogger(),
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			req := c.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
			req.HTTPResponse = &http.Response{StatusCode: statuses[reqCount]}
			req.Handlers.Clear()
			req.Data = struct{}{}
			req.Handlers.Send.PushBack(func(r *request.Request) {
				if reqCount == 1 {
					ctx.Error = fmt.Errorf("context canceled")
					close(ctx.DoneCh)
				}
				reqCount++
			})

			return req, nil
		},
	}

	err := w.WaitWithContext(ctx)

	if err != nil {
		t.Fatalf("expect no error, got %v", err)
	}
	if e, a := 2, reqCount; e != a {
		t.Errorf("expect %d requests, got %d", e, a)
	}
}

func TestWaiter_AttemptsExpires(t *testing.T) {
	c := awstesting.NewClient()

	ctx := &awstesting.FakeContext{DoneCh: make(chan struct{})}
	reqCount := 0

	w := request.Waiter{
		Name:             "TestWaiter",
		MaxAttempts:      2,
		Delay:            request.ConstantWaiterDelay(1 * time.Millisecond),
		SleepWithContext: aws.SleepWithContext,
		Acceptors: []request.WaiterAcceptor{
			{
				State:    request.SuccessWaiterState,
				Matcher:  request.StatusWaiterMatch,
				Expected: 200,
			},
		},
		Logger: aws.NewDefaultLogger(),
		NewRequest: func(opts []request.Option) (*request.Request, error) {
			req := c.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
			req.HTTPResponse = &http.Response{StatusCode: http.StatusNotFound}
			req.Handlers.Clear()
			req.Data = struct{}{}
			req.Handlers.Send.PushBack(func(r *request.Request) {
				reqCount++
			})

			return req, nil
		},
	}

	err := w.WaitWithContext(ctx)

	if err == nil {
		t.Fatalf("expect error did not get one")
	}
	aerr := err.(awserr.Error)
	if e, a := request.WaiterResourceNotReadyErrorCode, aerr.Code(); e != a {
		t.Errorf("expect %q error code, got %q", e, a)
	}
	if e, a := 2, reqCount; e != a {
		t.Errorf("expect %d requests, got %d", e, a)
	}
}

func TestWaiterNilInput(t *testing.T) {
	// Code generation doesn't have a great way to verify the code is correct
	// other than being run via unit tests in the SDK. This should be fixed
	// So code generation can be validated independently.

	client := s3.New(unit.Session)
	client.Handlers.Validate.Clear()
	client.Handlers.Send.Clear() // mock sending
	client.Handlers.Send.PushBack(func(r *request.Request) {
		r.HTTPResponse = &http.Response{
			StatusCode: http.StatusOK,
		}
	})
	client.Handlers.Unmarshal.Clear()
	client.Handlers.UnmarshalMeta.Clear()
	client.Handlers.ValidateResponse.Clear()
	client.Config.SleepDelay = func(dur time.Duration) {}

	// Ensure waiters do not panic on nil input. It doesn't make sense to
	// call a waiter without an input, Validation will
	err := client.WaitUntilBucketExists(nil)
	if err != nil {
		t.Fatalf("expect no error, but got %v", err)
	}
}

func TestWaiterWithContextNilInput(t *testing.T) {
	// Code generation doesn't have a great way to verify the code is correct
	// other than being run via unit tests in the SDK. This should be fixed
	// So code generation can be validated independently.

	client := s3.New(unit.Session)
	client.Handlers.Validate.Clear()
	client.Handlers.Send.Clear() // mock sending
	client.Handlers.Send.PushBack(func(r *request.Request) {
		r.HTTPResponse = &http.Response{
			StatusCode: http.StatusOK,
		}
	})
	client.Handlers.Unmarshal.Clear()
	client.Handlers.UnmarshalMeta.Clear()
	client.Handlers.ValidateResponse.Clear()

	// Ensure waiters do not panic on nil input
	ctx := &awstesting.FakeContext{DoneCh: make(chan struct{})}
	err := client.WaitUntilBucketExistsWithContext(ctx, nil,
		request.WithWaiterDelay(request.ConstantWaiterDelay(0)),
		request.WithWaiterMaxAttempts(1),
	)
	if err != nil {
		t.Fatalf("expect no error, but got %v", err)
	}
}


text:
<?php

/*
 * Made under PHPOps Open-Source Non-proprietary Project
 *
 * Pinoy Programmers League
 *
 * -----------------------------------------------------------------------------
 * The Main Deck
 *
 * Mostly system-related helpers for launching current framework
 *
 */

/**
 * Launch this whole system/application
 */
function coresys_deck_LaunchApp()
{
    // Run derived controller callable
    coresys_deck_RunController(coresys_deck_DeriveCallable());
}

/**
 * Derive the ControllerCallable command
 *
 * @param string $uri
 *
 * @return type
 */
function coresys_deck_DeriveCallable($uri=NULL)
{
    print_r(core_deck_ReadURI(core_uri_Get()));

    $router = new \Phroute\RouteCollector();
    $router->addRoute(Phroute\Route::ANY, "/{name:[a-zA-Z0-9_]+}/{anything}", function($name) {
        return "Hello $name";
    });

    $dispatcher = new \Phroute\Dispatcher($router);
    $response = $dispatcher->dispatch($_SERVER['REQUEST_METHOD'], core_uri_Get(true));
    echo $response;
}

/**
 * Read current URI into a URI commands array
 *
 * @param string    $uricmd {=null} The URI command to be read, otherwise, current URI will be read
 *
 * @return array Chunked URIs in array, otherwise, blank array if provided URI has no commands
 */
function core_deck_ReadURI($uricmd = null)
{
    if ($uricmd == null) {
        $uricmd = core_uri_Get();
    }
    echo $uricmd.'<br>';
    $filterGroup = new \POPS\Types\FilterCharGroup("/", 'l');
    $uricmd = $filterGroup->filter(new POPS\Types\String(trim(ltrim(rtrim($uricmd,'/'), '/'))))->getValue();
//    $uricmd = core_str_RemoveConsecutive(trim(ltrim(rtrim($uricmd,'/'), '/')), new POPS\Types\Character('/'));
    if (strlen($uricmd) > 0 ) {
        RETURN explode('/', $uricmd);
    }
    RETURN array();
}

/**
 * Run a controller through a callable controller name
 *
 * @param string $controllerCallable Callable controller name
 */
function coresys_deck_RunController($controllerCallable) {

}