text:
<?php
/**
 * This component provides a checkbox which when checked enables drag-and-drop re-ordering of elements displayed in a {@link GridField}
 *
 * @package forms
 */
class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionProvider, GridField_DataManipulator {
	protected $sortColumn;

	/**
	 * @param String $sortColumn Column that should be used to update the sort information
	 */
	public function __construct($sortColumn) {
		$this->sortColumn = $sortColumn;
	}

	/**
	 * Returns a map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
	 * @param GridField $gridField Grid Field Reference
	 * @return Array Map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
	 */
	public function getHTMLFragments($gridField) {
		$state = $gridField->State->GridFieldSortableRows;
		if(!is_bool($state->sortableToggle)) {
			$state->sortableToggle = false;
		}

		//Ensure user can edit
		if(!singleton($gridField->getModelClass())->canEdit()){
			return array();
		}

		//Sort order toggle
		$sortOrderToggle = Object::create(
			'GridField_FormAction',
			$gridField,
			'sortablerows-toggle',
			_t('GridFieldSortableRows.ALLOW_DRAG_DROP', '_Allow drag and drop re-ordering'),
			'saveGridRowSort',
			null
		)->addExtraClass('sortablerows-toggle');

		//Disable Pagenator
		$disablePagenator = Object::create(
			'GridField_FormAction',
			$gridField,
			'sortablerows-disablepagenator',
			_t('GridFieldSortableRows.DISABLE_PAGINATOR', '_Disable Pagenator'),
			'sortableRowsDisablePaginator',
			null
		)->addExtraClass('sortablerows-disablepagenator');

		//Disable Pagenator
		$sortToPage = Object::create(
			'GridField_FormAction',
			$gridField,
			'sortablerows-sorttopage',
			_t('GridFieldSortableRows.SORT_TO_PAGE', '_Sort To Page'),
			'sortToPage',
			null
		)->addExtraClass('sortablerows-sorttopage');

		$data = array('SortableToggle' => $sortOrderToggle,
					'PagenatorToggle' => $disablePagenator,
					'SortToPage' => $sortToPage,
					'Checked' => ($state->sortableToggle == true ? ' checked = "checked"':''));

		$forTemplate = new ArrayData($data);

		//Inject Requirements
		Requirements::css('SortableGridField/css/GridFieldSortableRows.css');
		Requirements::javascript('SortableGridField/javascript/GridFieldSortableRows.js');

		$args = array('Colspan' => count($gridField->getColumns()), 'ID' => $gridField->ID());

		return array('header' => $forTemplate->renderWith('GridFieldSortableRows', $args));
	}

	/**
	 * Manipulate the datalist as needed by this grid modifier.
	 * @param GridField $gridField Grid Field Reference
	 * @param SS_List $dataList Data List to adjust
	 * @return DataList Modified Data List
	 */
	public function getManipulatedData(GridField $gridField, SS_List $dataList) {
		//Detect and correct items with a sort column value of 0 (push to bottom)
		$this->fixSortColumn($gridField, $dataList);

		$headerState = $gridField->State->GridFieldSortableHeader;
		$state = $gridField->State->GridFieldSortableRows;
		if ((!is_bool($state->sortableToggle) || $state->sortableToggle==false) && $headerState && !empty($headerState->SortColumn)) {
			return $dataList;
		}

		if ($state->sortableToggle == true) {
			$gridField->getConfig()->removeComponentsByType('GridFieldFilterHeader');
			$gridField->getConfig()->removeComponentsByType('GridFieldSortableHeader');
		}

		return $dataList->sort($this->sortColumn);
	}

	/**
	 * Detects and corrects items with a sort column value of 0, by appending them to the bottom of the list
	 * @param GridField $gridField Grid Field Reference
	 * @param SS_List $dataList Data List of items to be checked
	 */
	protected function fixSortColumn($gridField, SS_List $dataList) {
		$list=clone $dataList;
		$list->dataQuery()->limit(array());

		$many_many = ($list instanceof ManyManyList);
		if (!$many_many) {
			$sng=singleton($gridField->getModelClass());
			$fieldType=$sng->db($this->sortColumn);
			if(!$fieldType || !($fieldType=='Int' || is_subclass_of('Int', $fieldType))) {
				user_error('Sort column '.$this->sortColumn.' must be an Int, column is of type '.$fieldType, E_USER_ERROR);
				exit;
			}
		}

		$max = $list->Max($this->sortColumn);
		if($list->where('"'.$this->sortColumn.'"=0')->Count()>0) {
			//Start transaction if supported
			if(DB::getConn()->supportsTransactions()) {
				DB::getConn()->transactionStart();
			}

			$owner = $gridField->Form->getRecord();
			$sortColumn = $this->sortColumn;
			$i = 1;

			if ($many_many) {
				list($parentClass, $componentClass, $parentField, $componentField, $table) = $owner->many_many($gridField->getName());
				$extraFields=$owner->many_many_extraFields($gridField->getName());

				if(!$extraFields || !array_key_exists($this->sortColumn, $extraFields) || !($extraFields[$this->sortColumn]=='Int' || is_subclass_of('Int', $extraFields[$this->sortColumn]))) {
					user_error('Sort column '.$this->sortColumn.' must be an Int, column is of type '.$fieldType, E_USER_ERROR);
					exit;
				}
			}

			//@TODO Need to optimize this to eliminate some of the resource load could use raw queries to be more efficient
			foreach($list as $obj) {
				if($many_many) {
					DB::query('UPDATE "' . $table
							. '" SET "' . $sortColumn.'" = ' . ($max + $i)
							. ' WHERE "' . $componentField . '" = ' . $obj->ID . ' AND "' . $parentField . '" = ' . $owner->ID);
				}else {
					$obj->$sortColumn = ($max + $i);
					$obj->write();
				}

				$i++;
			}

			//End transaction if supported
			if(DB::getConn()->supportsTransactions()) {
				DB::getConn()->transactionEnd();
			}
		}
	}

	/**
	 * Return a list of the actions handled by this action provider.
	 * @param GridField $gridField Grid Field Reference
	 * @return Array Array with action identifier strings.
	 */
	public function getActions($gridField) {
		return array('saveGridRowSort', 'sortableRowsDisablePaginator', 'sortToPage');
	}

	/**
	 * Handle an action on the given grid field.
	 * @param GridField $gridField Grid Field Reference
	 * @param String $actionName Action identifier, see {@link getActions()}.
	 * @param Array $arguments Arguments relevant for this
	 * @param Array $data All form data
	 */
	public function handleAction(GridField $gridField, $actionName, $arguments, $data) {
		$state = $gridField->State->GridFieldSortableRows;
		if (!is_bool($state->sortableToggle)) {
			$state->sortableToggle = false;
		} else if ($state->sortableToggle == true) {
			$gridField->getConfig()->removeComponentsByType('GridFieldFilterHeader');
			$gridField->getConfig()->removeComponentsByType('GridFieldSortableHeader');
		}

		if ($actionName == 'savegridrowsort') {
			return $this->saveGridRowSort($gridField, $data);
		} else if ($actionName == 'sorttopage') {
			return $this->sortToPage($gridField, $data);
		}
	}

	/**
	 * Handles saving of the row sort order
	 * @param GridField $gridField Grid Field Reference
	 * @param Array $data Data submitted in the request
	 */
	protected function saveGridRowSort(GridField $gridField, $data) {
		if(!singleton($gridField->getModelClass())->canEdit()){
			throw new ValidationException(_t('GridFieldSortableRows.EditPermissionsFailure', "No edit permissions"),0);
		}

		if (empty($data['ItemIDs'])) {
			user_error('No items to sort', E_USER_ERROR);
		}

		$className = $gridField->getModelClass();
		$owner = $gridField->Form->getRecord();
		$items = clone $gridField->getList();
		$many_many = ($items instanceof ManyManyList);
		$sortColumn = $this->sortColumn;
		$pageOffset = 0;

		if ($paginator = $gridField->getConfig()->getComponentsByType('GridFieldPaginator')->First()) {
			$pageState = $gridField->State->GridFieldPaginator;

			if($pageState->currentPage && is_int($pageState->currentPage) && $pageState->currentPage>1) {
				$pageOffset = $paginator->getItemsPerPage() * ($pageState->currentPage - 1);
			}
		}

		if ($many_many) {
			list($parentClass, $componentClass, $parentField, $componentField, $table) = $owner->many_many($gridField->getName());
		}

		//Start transaction if supported
		if(DB::getConn()->supportsTransactions()) {
			DB::getConn()->transactionStart();
		}

		//@TODO Need to optimize this to eliminate some of the resource load could use raw queries to be more efficient
		$ids = explode(',', $data['ItemIDs']);
		for($sort = 0;$sort<count($ids);$sort++) {
			$id = intval($ids[$sort]);
			if ($many_many) {
				DB::query('UPDATE "' . $table
						. '" SET "' . $sortColumn.'" = ' . (($sort + 1) + $pageOffset)
						. ' WHERE "' . $componentField . '" = ' . $id . ' AND "' . $parentField . '" = ' . $owner->ID);
			} else {
				$obj = $items->byID($ids[$sort]);
				$obj->$sortColumn = ($sort + 1) + $pageOffset;
				$obj->write();
			}
		}

		//End transaction if supported
		if(DB::getConn()->supportsTransactions()) {
			DB::getConn()->transactionEnd();
		}
	}

	/**
	 * Handles sorting across pages
	 * @param GridField $gridField Grid Field Reference
	 * @param Array $data Data submitted in the request
	 */
	protected function sortToPage(GridField $gridField, $data) {
		if (!$paginator = $gridField->getConfig()->getComponentsByType('GridFieldPaginator')->First()) {
			user_error('Paginator not detected', E_USER_ERROR);
		}

		if (empty($data['ItemID'])) {
			user_error('No item to sort', E_USER_ERROR);
		}

		if (empty($data['Target'])) {
			user_error('No target page', E_USER_ERROR);
		}

		$className = $gridField->getModelClass();
		$owner = $gridField->Form->getRecord();
		$items = clone $gridField->getList();
		$many_many = ($items instanceof ManyManyList);
		$sortColumn = $this->sortColumn;
		$targetItem = $items->byID(intval($data['ItemID']));

		if (!$targetItem) {
			user_error('Target item not found', E_USER_ERROR);
		}

		$currentPage = 1;

		$pageState = $gridField->State->GridFieldPaginator;
		if($pageState->currentPage && $pageState->currentPage>1) {
			$currentPage = $pageState->currentPage;
		}

		if ($many_many) {
			list($parentClass, $componentClass, $parentField, $componentField, $table) = $owner->many_many($gridField->getName());
		}

		if ($data['Target'] == 'previouspage') {
			$sortPositions = $items->limit($paginator->getItemsPerPage() + 1, ($paginator->getItemsPerPage() * ($currentPage - 1)) - 1)->column($sortColumn);
		} else if ($data['Target'] == 'nextpage') {
			$sortPositions = $items->limit($paginator->getItemsPerPage() + 1, $paginator->getItemsPerPage() * ($currentPage - 1))->column($sortColumn);
		} else {
			user_error('Not implemented: '.$data['Target'], E_USER_ERROR);
		}

		//Start transaction if supported
		if(DB::getConn()->supportsTransactions()) {
			DB::getConn()->transactionStart();
		}

		if($data['Target']=='previouspage') {
			if ($many_many) {
				DB::query('UPDATE "' . $table
						. '" SET "' . $sortColumn.'" = ' . $sortPositions[0]
						. ' WHERE "' . $componentField . '" = ' . $targetItem->ID . ' AND "' . $parentField . '" = ' . $owner->ID);
			} else {
				$targetItem->$sortColumn = $sortPositions[0];
				$targetItem->write();
			}

			$i = 1;
			foreach ($items as $obj) {
				if ($obj->ID == $targetItem->ID) {
					continue;
				}

				if ($many_many) {
					DB::query('UPDATE "' . $table
							. '" SET "' . $sortColumn.'" = ' . $sortPositions[$i]
							. ' WHERE "' . $componentField . '" = ' . $obj->ID . ' AND "' . $parentField . '" = ' . $owner->ID);
				} else {
					$obj->$sortColumn = $sortPositions[$i];
					$obj->write();
				}

				$i++;
			}
		} else {
			if ($many_many) {
				DB::query('UPDATE "' . $table
						. '" SET "' . $sortColumn.'" = ' . $sortPositions[count($sortPositions) - 1]
						. ' WHERE "' . $componentField . '" = ' . $targetItem->ID . ' AND "' . $parentField . '" = ' . $owner->ID);
			} else {
				$targetItem->$sortColumn = $sortPositions[count($sortPositions) - 1];
				$targetItem->write();
			}

			$i = 0;
			foreach ($items as $obj) {
				if ($obj->ID == $targetItem->ID) {
					continue;
				}

				if ($many_many) {
					DB::query('UPDATE "' . $table
							. '" SET "' . $sortColumn.'" = ' . $sortPositions[$i]
							. ' WHERE "' . $componentField . '" = ' . $obj->ID . ' AND "' . $parentField . '" = ' . $owner->ID);
				} else {
					$obj->$sortColumn = $sortPositions[$i];
					$obj->write();
				}

				$i++;
			}
		}

		//End transaction if supported
		if(DB::getConn()->supportsTransactions()) {
			DB::getConn()->transactionEnd();
		}
	}
}
?>


text:
package de.iritgo.aktario.agent;

import de.iritgo.aktario.agent.container.AgentContainer;
import de.iritgo.aktario.agent.transfer.AgentTransferAction;
import de.iritgo.aktario.agent.transfer.Dispatcher;
import de.iritgo.aktario.core.Engine;
import de.iritgo.aktario.core.iobject.AbstractIObjectFactory;
import de.iritgo.aktario.framework.IritgoEngine;
import de.iritgo.aktario.framework.base.DataObject;
import de.iritgo.aktario.framework.base.shutdown.ShutdownManager;
import de.iritgo.aktario.framework.base.shutdown.ShutdownObserver;
import de.iritgo.aktario.framework.user.User;
import de.iritgo.aktario.framework.user.UserEvent;
import de.iritgo.aktario.framework.user.UserListener;

/**
 * This is the main startup class of the Iritgo agent system.
 * The IritgoClient or IritgoServer classes create a single instance
 * of the Iritgo agent system class which initializes the whole system.
 * The agent manager adds dispatchers and holds the agent container.
 */
public class AgentManager implements UserListener, ShutdownObserver
{
	/** Singleton manager instance. */
	private static AgentManager agentManager;

	/** Server operation mode. */
	public static int AGENT_SERVER = 1;

	/** Client operation mode. */
	public static int AGENTE_CLIENT = 2;

	/** The manager mode (AGENT_SERVER or AGENT_CLIENT). */
	@SuppressWarnings("unused")
	private int mode;

	/** The agent container. */
	private AgentContainer container;

	/**
	 * Since the manager is a singleton, this constructor is private.
	 *
	 * @param mode The manager startup mode (SPHERE_SERVER or SPHERE_CLIENT).
	 */
	private AgentManager(int mode)
	{
		this.mode = mode;
		container = new AgentContainer(this);
		init(mode);
	}

	/**
	 * Initialize the agent manager.
	 *
	 * @param mode The agent manager mode.
	 */
	private void init(int mode)
	{
		Engine.instance().getEventRegistry().addListener("User", this);
		((ShutdownManager) Engine.instance().getManagerRegistry().getManager("shutdown")).addObserver(this);

		AbstractIObjectFactory iObjectFactory = (AbstractIObjectFactory) Engine.instance().getIObjectFactory();

		iObjectFactory.register(new AgentTransferAction());
	}

	/**
	 * This method is only used for testing purposes. It add some simple
	 * agents to the system.
	 *
	 * @param mode The agent manager mode.
	 */
	@SuppressWarnings("unused")
	private void initTestAgents(int mode)
	{
		AbstractIObjectFactory iObjectFactory = (AbstractIObjectFactory) Engine.instance().getIObjectFactory();
		SimpleAgent simpleAgent = new SimpleAgent();

		iObjectFactory.register(simpleAgent);

		ScriptAgent scriptAgent = new ScriptAgent();

		iObjectFactory.register(scriptAgent);

		simpleAgent.init(this);
		simpleAgent.setUniqueId(1);

		scriptAgent.init(this);
		scriptAgent.setUniqueId(2);

		System.out.println("Awake simple entity");

		if (mode == AGENT_SERVER)
		{
			simpleAgent.awake(container);
			scriptAgent.awake(container);
		}
	}

	/**
	 * Start a agent
	 *
	 * @param agent The agent to start.
	 */
	public void bringAgentToLife(Agent agent)
	{
		((DataObject) agent).setUniqueId(Engine.instance().getPersistentIDGenerator().createId());
		agent.init(this);
		container.simpleThreadAwake((DataObject) agent);
		agent.awake(container);
	}

	/**
	 * Get the agent container.
	 *
	 * @return The agent container.
	 */
	public AgentContainer getContainer()
	{
		return container;
	}

	public boolean onServer()
	{
		return IritgoEngine.instance().isServer();
	}

	/**
	 * This method is called when user has logged in.
	 *
	 * @param event The user event.
	 */
	public void userEvent(UserEvent event)
	{
		if (event.isLoggedIn())
		{
			Dispatcher dispatcher = new Dispatcher(event.getUser());

			dispatcher.setUniqueId(event.getUser().getName());
			container.addDispatcher(dispatcher);
		}
		else
		{
			container.removeDispatcher(event.getUser().getName());
		}
	}

	/**
	 * Called when the system shuts down.
	 */
	public void onShutdown()
	{
		container.close();
	}

	/**
	 * This method is called when a user has logged of.
	 *
	 * @param user The leaving user.
	 */
	public void onUserLogoff(User user)
	{
	}

	/**
	 * Return the singleton agent manager instance.
	 *
	 * @return AgentManager The agent manager.
	 */
	public static AgentManager instance()
	{
		return agentManager;
	}

	/**
	 * Create a singeleton agent manager.
	 *
	 * @param mode The manager mode, client or server (SPHERE_SERVER, SPHERE_CLIENT)
	 */
	public static void createAgentManager(int mode)
	{
		if (agentManager != null)
		{
			return;
		}

		agentManager = new AgentManager(mode);
	}

	/**
	 * Get the object type id.
	 *
	 * @return The type id.
	 */
	public String getTypeId()
	{
		return "AgentManager";
	}
}

redpajama_set_name: RedPajamaGithub


text:
package core

import (
	"github.com/trivago/tgo/tlog"
	"io"
	"sync"
)

// WriterAssembly is a helper struct for io.Writer compatible classes that use
// messagebatch.
type WriterAssembly struct {
	writer      io.Writer
	flush       func(*Message)
	modulator   Modulator
	buffer      []byte
	validate    func() bool
	handleError func(error) bool
	writerGuard *sync.Mutex
}

// NewWriterAssembly creates a new adapter between io.Writer and the MessageBatch
// AssemblyFunc function signature
func NewWriterAssembly(writer io.Writer, flush func(*Message), modulator Modulator) WriterAssembly {
	return WriterAssembly{
		writer:      writer,
		modulator:   modulator,
		flush:       flush,
		writerGuard: new(sync.Mutex),
	}
}

// SetValidator sets a callback that is called if a write was successful.
// Validate needs to return true to prevent messages to be flushed.
func (asm *WriterAssembly) SetValidator(validate func() bool) {
	asm.validate = validate
}

// SetErrorHandler sets a callback that is called if an error occurred.
// HandleError needs to return true to prevent messages to be flushed.
func (asm *WriterAssembly) SetErrorHandler(handleError func(error) bool) {
	asm.handleError = handleError
}

// SetWriter changes the writer interface used during Assemble
func (asm *WriterAssembly) SetWriter(writer io.Writer) {
	asm.writerGuard.Lock()
	defer asm.writerGuard.Unlock()
	asm.writer = writer
}

// SetFlush changes the bound flush function
func (asm *WriterAssembly) SetFlush(flush func(*Message)) {
	asm.flush = flush
}

func (asm *WriterAssembly) getWriter() io.Writer {
	asm.writerGuard.Lock()
	defer asm.writerGuard.Unlock()
	return asm.writer
}

// Write is an AssemblyFunc compatible implementation to pass all messages from
// a MessageBatch to an io.Writer.
// Messages are formatted using a given formatter. If the io.Writer fails to
// write the assembled buffer all messages are passed to the FLush() method.
func (asm *WriterAssembly) Write(messages []*Message) {
	writer := asm.getWriter()

	if writer == nil {
		tlog.Warning.Print("No writer assigned to writer assembly")
		asm.Flush(messages)
		return // ### return, cannot write ###
	}

	// Format all messages
	contentLen := 0
	for _, msg := range messages {
		msgCopy := msg.Clone()

		if contentLen+len(msgCopy.GetPayload()) > len(asm.buffer) {
			asm.buffer = append(asm.buffer[:contentLen], msgCopy.GetPayload()...)
		} else {
			copy(asm.buffer[contentLen:], msgCopy.GetPayload())
		}
		contentLen += len(msgCopy.GetPayload())
	}

	// Route all messages if they could not be written
	if _, err := writer.Write(asm.buffer[:contentLen]); err != nil {
		if asm.handleError != nil {
			if !asm.handleError(err) {
				asm.Flush(messages)
			}
		} else {
			tlog.Error.Print("Stream write error:", err)
		}
		return // ### return, error handled ###
	}

	// Data sent, flush if validation is required and fails
	if asm.validate != nil && !asm.validate() {
		asm.Flush(messages)
	}
}

// Flush is an AssemblyFunc compatible implementation to pass all messages from
// a MessageBatch to e.g. the Drop function of a producer.
// Flush will also be called by Write if the io.Writer reported an error.
func (asm *WriterAssembly) Flush(messages []*Message) {
	for _, msg := range messages {
		asm.flush(msg)
	}
}


text:
class Command
{
public:
    Command(ExtExtension* ext) :_verbose(false), _ext(ext) {}
    virtual ~Command() {};

    virtual void Execute() = 0;

    void SetVerbose(bool verbose) { _verbose = verbose; }
    bool IsVerbose() const { return _verbose; }

protected:
    void Err(PCSTR format, ...);
    void Out(PCSTR format, ...);

    ExtExtension* Ext() const { return _ext; }
private:
    bool _verbose;
    ExtExtension* _ext;
};

// Inline functions...
inline void Command::Err(PCSTR format, ...)
{
        va_list Args;

        va_start(Args, format);
        _ext->m_Control->OutputVaList(DEBUG_OUTPUT_ERROR, format, Args);
        va_end(Args);
}

inline void Command::Out(PCSTR format, ...)
{
    va_list Args;

    va_start(Args, format);
    _ext->m_Control->OutputVaList(_ext->m_OutMask, format, Args);
    va_end(Args);
}


text:
* [Overview](#overview)
* [Configuration](#configuration)
* [Styles](#styles)
* [Rendering](#rendering)

## Overview

### Quick Look

```jsx
<Heading>Heading</Heading>
```

### Modifiers

> [Learn more](https://github.com/esr360/One-Nexus/wiki/Modifiers) about modifiers

            Modifier
            Description

            [...Global modifiers]
            Modifiers that can be applied to any module

            [...heading.sizes]
            The different size modifiers for headings

            heavy
            Heading with bolder text

            light
            Heading with lighter/thinner text

            uppercase
            Heading with uppercase text

            flush
            Heading with no top/bottom margin

## Configuration

> [Learn more](https://github.com/esr360/One-Nexus/wiki/Module-Configuration) about module configutation

```json
{
    "heading": {
        "name": "heading",
        "group_heading-lineHeight": 0.8,
        "sizes": ["#TYPOGRAPHY-CONFIG", "sizes"]
    }
}
```

> Certain values from the above configuration are excluded from the below table ([learn more](https://github.com/esr360/One-Nexus/tree/master/src/ui/modules#documenting-configuration-properties))

            Option
            Description

            group_heading-lineHeight
            Line-height for heading inside a group component

            sizes
            Object of font sizes to use to generate modifiers (learn more)

Pass custom options to the `heading` object in your theme's config file (e.g. [ui/themes/One-Nexus/theme.json](../../../themes/One-Nexus/theme.json)):

```js
{
    "theme": {
        "heading": {
            "sizes": {
                "small": "8px",
                "large": "20px"
            }
        }
    }
}
```

#### Sizes

This option accepts an object and will create a modifier for each key using the key's value for the modifier's font-size:

```js
"sizes": {
    "size-1": "0.67em",
    "size-2": "0.83em",
    "size-3": "1.17em",
    "size-4": "1.25em",
    "size-5": "1.5em",
    "size-6": "2em",
    "size-7": "2.4em",
    "size-8": "3em",
    "size-9": "3.4em"
}
```

```jsx
<Heading size-8>Heading</Heading>
```

By default, a value of ["#TYPOGRAPHY-CONFIG", "sizes"] is passed to the "sizes" option, which will fetch the font sizes from the [Typography module](https://github.com/esr360/One-Nexus/tree/master/src/ui/modules/utilities/typography).

## Styles

> [Learn more](https://github.com/esr360/One-Nexus/wiki/Styling-a-module) about module styles

## Rendering

> [Learn more](https://github.com/esr360/One-Nexus/wiki/Rendering-a-module) about rendering modules

* [Examples](#examples)
* [API](#api)

### Examples

* [Basic Example](#basic-example)

#### Basic Example

```jsx
<Heading>Heading</Heading>
```

#### Heading Group

```jsx
<Group>
    <Heading heading={2}>Primary Heading</Heading>
    <Heading heading={3}>Secondary heading</Heading>
</Group>
```

##### Output

```html
<div class="heading_group">
    <h2 class="heading">Primary heading</h2>
    <h3 class="heading">Secondary heading</h3>
</Group>
```

#### Flushed Headings (no margin)

```css
margin-top: 0 !important;
margin-bottom: 0 !important;
```

```jsx
<Heading flush>Flushed Heading</Heading>
```

##### Output

```html
<h3 class="heading-flush">Flushed Heading</h3>
```

### API

* [[...Global props]](https://github.com/esr360/One-Nexus/wiki/Rendering-a-module#global-props)
* [DefaultProps](#defaultprops)

#### DefaultProps

```js
{
    fluid: true,
    heading: 3
}
```


text:
package hk.bds.ibeaconlocator;

import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.RemoteException;
import android.speech.tts.TextToSpeech;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.TextView;

import org.altbeacon.beacon.Beacon;
import org.altbeacon.beacon.BeaconConsumer;
import org.altbeacon.beacon.BeaconManager;
import org.altbeacon.beacon.BeaconParser;
import org.altbeacon.beacon.RangeNotifier;
import org.altbeacon.beacon.Region;
import org.altbeacon.beacon.service.RangedBeacon;
import org.w3c.dom.Text;

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

public class MainActivity extends AppCompatActivity implements BeaconConsumer {

    protected static final String TAG = "MainActivity"; // This is used for debug
    private MyBeacon b1, b2, b3, theNear;
    private TextView displayName1,
            displayName2,
            displayName3,
            displayDistance1,
            displayDistance2,
            displayDistance3,
            displayLocation;
    private BeaconManager beaconManager;
    private TextToSpeech ttobj;
    private MyBeacon previousLocation = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Init displays
        setContentView(R.layout.activity_main);
        displayName1 = (TextView) findViewById(R.id.beacon1);
        displayName2 = (TextView) findViewById(R.id.beacon2);
        displayName3 = (TextView) findViewById(R.id.beacon3);
        displayDistance1 = (TextView) findViewById(R.id.distance1);
        displayDistance2 = (TextView) findViewById(R.id.distance2);
        displayDistance3 = (TextView) findViewById(R.id.distance3);
        displayLocation = (TextView) findViewById(R.id.location);

        // Init Beacon
        beaconManager = BeaconManager.getInstanceForApplication(this);
        beaconManager.getBeaconParsers().add(new BeaconParser().setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24")); // Set the beacon brand
        //beaconManager.setRssiFilterImplClass(ArmaRssiFilter.class);
        RangedBeacon.setSampleExpirationMilliseconds(5000);    // The refresh interval
        beaconManager.setBackgroundScanPeriod(20);
        beaconManager.setBackgroundBetweenScanPeriod(10);
        beaconManager.setForegroundBetweenScanPeriod(10);
        beaconManager.bind(this);

        // Init beacon devices
        b1 = new MyBeacon("Room S505", "BC:6A:29:25:0F:52", displayName1, displayDistance1);
        b2 = new MyBeacon("Room S506", "BC:6A:29:27:A4:2D", displayName2, displayDistance2);
        b3 = new MyBeacon("Room S507", "BC:6A:29:28:01:BD", displayName3, displayDistance3);

        // Create Google TextToSpeech Object
        ttobj = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {
            @Override
            public void onInit(int status) {
                if(status != TextToSpeech.ERROR) {
                    ttobj.setLanguage(Locale.UK); // Set to "UK" language
                }
            }
        });
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        beaconManager.unbind(this);
    }

    @Override
    public void onBeaconServiceConnect() {
        //This method will be called when the Beacon Manager is binded.
        beaconManager.setRangeNotifier( new RangeNotifier() {
            @Override
            public void didRangeBeaconsInRegion(Collection<Beacon> beacons, Region region) {
                // This method will be executed many times according to the size of the refresh interval.
                // Try to update the distance of the devices
                if (beacons.size() > 0) {
                    for (Beacon theBeacon : beacons) {
                        b1.updateDistance(theBeacon);
                        b2.updateDistance(theBeacon);
                        b3.updateDistance(theBeacon);
                    }
                    theNear = getMinOne(getMinOne(b1, b2), b3);

                    // Update Displays
                    updateDisplay();
                }
                //Log.d(TAG, beacons.toString());
                //Log.d(TAG,this.toString());
            }
        });

        try {
            // Tells the BeaconService to start looking for beacons that match the passed Region object,
            // and providing updates on the estimated mDistance every seconds while beacons in the Region are visible.
            beaconManager.startRangingBeaconsInRegion(new Region("myRangingUniqueId", null, null, null));
        } catch (RemoteException e) {  /* Error is detected. */  }

    }

    private void updateDisplay() {
        MainActivity.this.runOnUiThread(new Runnable() {
            public void run() {
                if (theNear != null && theNear.distance < 0.30) {
                    // If the near beacon is inside the range, do this action
                    displayLocation.setText(theNear.name); // Update the largest text.

                    if (theNear != previousLocation) {
                        // If you just enter the area
                        String toSpeak = "" + theNear.name;
                        ttobj.speak(toSpeak, TextToSpeech.QUEUE_FLUSH, null); // Speak
                    }

                } else {
                    // You are not close enough to the near one.
                    displayLocation.setText("UNCERTAIN");
                    previousLocation = null;
                }
                previousLocation = theNear; // Store the previous location
                // Update the distance display
                b1.updateDisplayDistance();
                b2.updateDisplayDistance();
                b3.updateDisplayDistance();
            }
        });
    }

    public String toString() {
        String str = "";
        str += b1.toString();
        str += b2.toString();
        str += b3.toString();
        return str;
    }

    // This method is used to compare which one is the nearest to you and return that object back.
    // "null" means that cannot detect any device or can detect them but do not know the answer.
    private MyBeacon getMinOne(MyBeacon a, MyBeacon b) {
        if (a != null && b != null) {
            if ((a.distance > 0d && b.distance > 0d) && !(a.distance == b.distance)) {
                if (b.distance < a.distance)
                    return b;
                else
                    return a;
            } else if ((a.distance <= 0d && b.distance <= 0d) || (a.distance == b.distance)) {
                return null;
            } else {
                if (a.distance == 0d)
                    return b;
                else
                    return a;
            }
        } else if ((a == null && b == null) || (a == null && b.distance <= 0d) || (b == null && a.distance <= 0d)){
            return null;
        } else {
            if (a != null)
                return a;
            else
                return b;
        }
    }

}

class MyBeacon {
    public String name;
    public String macAddress;
    public double distance = 0d; // initially the distance is 0.
    //public double predistance = 0d;

    // Display reference pointers.
    public TextView displayName;
    public TextView displayDistance;

    public MyBeacon(String _name, String _macAddress, TextView _displayName, TextView _displayDistance) {
        name = _name;
        macAddress = _macAddress;
        displayName = _displayName;
        displayDistance = _displayDistance;
        displayName.setText(name + " :  ");
    }

    public void updateDistance(Beacon _beacon) {
        if (_beacon.getBluetoothAddress().equals(this.macAddress)) {
            distance = _beacon.getDistance(); // Calculate the distance based on RSSI.
        }
    }

    /*
    public boolean updateDistance(Beacon _beacon) {
        if (_beacon.getBluetoothAddress().equals(this.macAddress)) {
            distance = _beacon.getDistance(); // Calculate the distance based on RSSI.
            return true;
        } else
            return false;
    }
    */

    /*
    public void updateDistance(Collection<Beacon> beacons) {
        for (Beacon theBeacon : beacons) {
            if (updateDistance(theBeacon))
                return;
        }
        distance = 0d;

    }
    */

    public void updateDisplayDistance() {
        String str;
        if (distance == 0d)
            str = "UNDETECTED";
        else
            str = String.format("%.4f", distance);
        displayDistance.setText(str);
    }

    public String toString() {
        String str = "";
        str += "\n===================================";
        str += "\nBeacon Name: " + this.name;
        str += "\nMac Address: " + this.macAddress;
        str += "\nDistance   : " + this.distance;
        str += "\n===================================";
        return str;
    }
}


text:
import Ember from 'ember';
import ApplicationException from 'klondike/application-exception';
import describePromise from 'klondike/util/describe-promise';

var RestApi = Ember.Service.extend({
    apiKeyRequestHeaderName: 'X-NuGet-ApiKey',

    apiURLBinding: 'application.apiURL',
    apiKeyBinding: 'application.apiKey',

    apiInfo: {},
    packageSourceUri: null,

    simulateRequestLatency: 0,

    _promise: null,

    init: function() {
        var url = this.get('apiURL') + '?nocache=' + new Date().getTime();

        var deferred = Ember.RSVP.defer(describePromise(this, 'init', [url]));
        this.set('_promise', deferred.promise);

        var self = this;

        var data = {
            type: 'GET',
            success: function (data) {
                self.set('apiInfo', self._buildApiDictionary(data));
                self._setPackageSource();
                deferred.resolve(self);
            }
        };

        Ember.$.ajax(url, data).fail(function(xhr, status) {
            deferred.reject('ajax call to ' + url + ' failed: ' + status + '(' + xhr.status + ')');
        });
    },

    getApi: function (apiName, method) {
        var self = this;

        return self.get('_promise').then(function() {
            return self._lookupApi(apiName, method);
        }, null, describePromise(this, 'getApi', arguments));
    },

    ajax: function (apiName, options) {
        options = options || {};
        var method;
        if ('type' in options) {
            method = options.type;
        }

        var self = this;

        var timeout = self.get('simulateRequestLatency') || 0;

        var invoke = function() {
            return self.getApi(apiName, method).then(function(api) {
                return self._invokeAjaxApi(apiName, api, options);
            }, null, describePromise(self, 'ajax', [apiName]));
        };

        if (timeout) {
            var deferred = Ember.RSVP.defer(describePromise(this, 'ajax') + ': Simulate Request Latency');

            setTimeout(function() { deferred.resolve(); }, timeout);

            return deferred.promise.then(invoke, null, describePromise(this, 'ajax', [apiName]) + ': Invoke');
        } else {
            return invoke();
        }
    },

    _invokeAjaxApi: function(apiName, api, options) {
        if (!api) {
            throw new ApplicationException('Rest API method not found: ' + apiName);
        }

        var self = this;

        options.type = api.method;

        var apiKey = this.get('apiKey');

        if (!Ember.isEmpty(apiKey)) {
            var origBeforeSend = options.beforeSend;
            options.beforeSend = function(xhr) {
                xhr.setRequestHeader(self.get('apiKeyRequestHeaderName'), apiKey);
                if (origBeforeSend) {
                    origBeforeSend(xhr);
                }
            };
        }

        var href = this._replaceParameters(api, options);

        return new Ember.RSVP.Promise(function(resolve, reject) {
            options.success = function(data) {
                resolve(data);
            };

            Ember.$.ajax(href, options).fail(function(request, textStatus, errorThrown) {
                var error = {
                  request: request,
                  textStatus: textStatus,
                  errorThrown: errorThrown };

                if (request && request.status) {
                  error.status = request.status;
                }

                if (request && request.responseJSON) {
                  error.response = request.responseJSON;
                }

                reject(error);
            });
        }, describePromise(this, '_invokeAjaxApi', [apiName]));
    },

    _lookupApi: function(apiName, method) {
        var apiInfo = this.get('apiInfo');
        apiName = apiName.toLowerCase();

        if (method) {
            var fullKey = method + '.' + apiName;
            return apiInfo[fullKey];
        }

        var pattern = new RegExp('^\\w+\\.' + apiName.replace('.', '\\.') + '$');
        var matches = [];
        for (var key in apiInfo) {
            if (key.match(pattern)) {
                matches.push(apiInfo[key]);
            }
        }

        if (matches.length === 0) {
            throw new ApplicationException('no method matching ' + pattern);
        } else if (matches.length > 1) {
            throw new ApplicationException('multiple APIs matched ' + apiName + '; must specify HTTP method');
        }

        return matches[0];
    },

    _replaceParameters: function (api, options) {
        // replace {foo} with options.data.foo
        return api.href.replace(/\{[^\}]+\}/g, function (param) {
            // {foo} -> foo
            param = param.substring(1, param.length - 1);

            if (!(param in options.data)) {
                throw new ApplicationException('Must specify required parameter "' + param + '" for REST method "' + api.name + '"');
            }

            var value = options.data[param];
            delete options.data[param];
            return value;
        });
    },

    _setPackageSource: function () {
        var href = this.get('apiURL');

        if (href[href.length - 1] !== '/') {
            href += '/';
        }

        if (href.indexOf('//') === -1) {
            href = window.location.protocol + '//' + window.location.host + href;
        }

        this.set('packageSourceUri', href);
    },

    _hrefToAbsolute: function(href) {
        if (href.indexOf('://') !== -1) {
            return href;
        }

        var dataUrl = this.get('_fullBaseDataUrl');

        if (href[0] !== '/') {
            return dataUrl + href;
        }

        return dataUrl.replace(/(.+:\/\/[^/]+).*/, '$1' + href);
    },

    _fullBaseDataUrl: function() {
        var base = this.get('apiURL');

        if (base.indexOf('://') === -1) {
            base = window.location.protocol + '//' + window.location.host + base;
        }

        if (base[base.length - 1] !== '/') {
            base += '/';
        }

        return base;
    }.property('apiURL'),

    _buildApiDictionary: function(data) {
        var apiInfo = {};
        for (var i = 0; i < data.resources.length; i++) {
            var res = data.resources[i];
            var name = res.name.toLowerCase();
            for (var j = 0; j < res.actions.length; j++) {
                var action = res.actions[j];
                var key = action.method + '.' + name.toLowerCase() + '.' + action.name.toLowerCase();
                if (key in apiInfo) {
                    console.warn('Duplicate api method: ' + key);
                }

                action.href = this._hrefToAbsolute(action.href);
                apiInfo[key] = action;
            }
        }
        return apiInfo;
    }
});

export default RestApi;


text:
from typing import TYPE_CHECKING, Optional, Sequence

from airflow.models import BaseOperator
from airflow.providers.mysql.hooks.mysql import MySqlHook
from airflow.providers.presto.hooks.presto import PrestoHook

if TYPE_CHECKING:
    from airflow.utils.context import Context

class PrestoToMySqlOperator(BaseOperator):
    """
    Moves data from Presto to MySQL, note that for now the data is loaded
    into memory before being pushed to MySQL, so this operator should
    be used for smallish amount of data.

    :param sql: SQL query to execute against Presto. (templated)
    :type sql: str
    :param mysql_table: target MySQL table, use dot notation to target a
        specific database. (templated)
    :type mysql_table: str
    :param mysql_conn_id: Reference to :ref:`mysql connection id <howto/connection:mysql>`.
    :type mysql_conn_id: str
    :param presto_conn_id: source presto connection
    :type presto_conn_id: str
    :param mysql_preoperator: sql statement to run against mysql prior to
        import, typically use to truncate of delete in place
        of the data coming in, allowing the task to be idempotent (running
        the task twice won't double load data). (templated)
    :type mysql_preoperator: str
    """

    template_fields: Sequence[str] = ('sql', 'mysql_table', 'mysql_preoperator')
    template_ext: Sequence[str] = ('.sql',)
    template_fields_renderers = {"sql": "sql", "mysql_preoperator": "sql"}
    ui_color = '#a0e08c'

    def __init__(
        self,
        *,
        sql: str,
        mysql_table: str,
        presto_conn_id: str = 'presto_default',
        mysql_conn_id: str = 'mysql_default',
        mysql_preoperator: Optional[str] = None,
        **kwargs,
    ) -> None:
        super().__init__(**kwargs)
        self.sql = sql
        self.mysql_table = mysql_table
        self.mysql_conn_id = mysql_conn_id
        self.mysql_preoperator = mysql_preoperator
        self.presto_conn_id = presto_conn_id

    def execute(self, context: 'Context') -> None:
        presto = PrestoHook(presto_conn_id=self.presto_conn_id)
        self.log.info("Extracting data from Presto: %s", self.sql)
        results = presto.get_records(self.sql)

        mysql = MySqlHook(mysql_conn_id=self.mysql_conn_id)
        if self.mysql_preoperator:
            self.log.info("Running MySQL preoperator")
            self.log.info(self.mysql_preoperator)
            mysql.run(self.mysql_preoperator)

        self.log.info("Inserting rows into MySQL")
        mysql.insert_rows(table=self.mysql_table, rows=results)


text:
<?php
namespace Platformsh\Cli\Command\Activity;

use Platformsh\Cli\Command\PlatformCommand;
use Platformsh\Client\Model\Activity;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class ActivityLogCommand extends PlatformCommand
{
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this
          ->setName('activity:log')
          ->addArgument('id', InputArgument::OPTIONAL, 'The activity ID. Defaults to the most recent activity.')
          ->addOption(
            'refresh',
            null,
            InputOption::VALUE_OPTIONAL,
            'Log refresh interval (seconds). Set to 0 to disable refreshing.',
            1
          )
          ->addOption('type', null, InputOption::VALUE_OPTIONAL, 'Filter activities by type')
          ->setDescription('Display the log for an environment activity');
        $this->addProjectOption()
             ->addEnvironmentOption();
        $this->addExample('Display the log for the last push', '--type environment.push');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->validateInput($input);

        $id = $input->getArgument('id');
        if ($id) {
            $activity = $this->getSelectedEnvironment()
                             ->getActivity($id);
            if (!$activity) {
                $this->stdErr->writeln("Activity not found: <error>$id</error>");

                return 1;
            }
        } else {
            $activities = $this->getSelectedEnvironment()
                               ->getActivities(1, $input->getOption('type'));
            /** @var Activity $activity */
            $activity = reset($activities);
            if (!$activity) {
                $this->stdErr->writeln('No activities found');

                return 1;
            }
        }

        $this->stdErr->writeln(
          "Log for activity <info>" . $activity['id'] . "</info> (" . $activity->getDescription() . "):"
        );

        $refresh = $input->getOption('refresh');
        $poll = $refresh > 0 && $this->isTerminal($output);
        $this->displayLog($activity, $output, $poll, $refresh);

        return 0;
    }

    /**
     * @param Activity $activity
     * @param OutputInterface $output
     * @param bool $poll
     * @param float|int $interval A refresh interval (in seconds).
     */
    protected function displayLog(Activity $activity, OutputInterface $output, $poll = true, $interval = 1)
    {
        $logger = function ($log) use ($output) {
            $output->write($log);
        };
        if (!$poll) {
            $logger($activity['log']);

            return;
        }
        $activity->wait(null, $logger, $interval);
    }

}


text:
require File.expand_path(File.dirname(__FILE__) + '/../utilities')

Capistrano::Configuration.instance(true).load do
  #https://github.com/jnstq/munin-nginx-ubuntu

  # defaults:
  # dbdir /var/lib/munin
  # htmldir /var/cache/munin/www
  # logdir /var/log/munin
  # rundir  /var/run/munin

  namespace :munin do
    task :install, :roles => :munin do
      utilities.apt_install "munin"
      install_node
    end
    task :install_node do
      utilities.apt_install "munin-node"
      #munin node plugins, cpu, df, if_eth0, if_eth1, load, iostat, swap
    end
  end
end


text:
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/*
 *
 * Date:    16 September 2002
 * SUMMARY: Testing propertyIsEnumerable() on nonexistent property
 * See http://bugzilla.mozilla.org/show_bug.cgi?id=156354
 *
 */
//-----------------------------------------------------------------------------
var UBound = 0;
var BUGNUMBER = 156354;
var summary = 'Testing propertyIsEnumerable() on nonexistent property';
var status = '';
var statusitems = [];
var actual = '';
var actualvalues = [];
var expect= '';
var expectedvalues = [];

status = inSection(1);
actual = this.propertyIsEnumerable('XYZ');
expect = false;
addThis();

status = inSection(2);
actual = this.propertyIsEnumerable('');
expect = false;
addThis();

status = inSection(3);
actual = this.propertyIsEnumerable(undefined);
expect = false;
addThis();

status = inSection(4);
actual = this.propertyIsEnumerable(null);
expect = false;
addThis();

status = inSection(5);
actual = this.propertyIsEnumerable('\u02b1');
expect = false;
addThis();

var obj = {prop1:null};

status = inSection(6);
actual = obj.propertyIsEnumerable('prop1');
expect = true;
addThis();

status = inSection(7);
actual = obj.propertyIsEnumerable('prop2');
expect = false;
addThis();

// let's try one via eval(), too -
status = inSection(8);
eval("actual = obj.propertyIsEnumerable('prop2')");
expect = false;
addThis();

//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------

function addThis()
{
  statusitems[UBound] = status;
  actualvalues[UBound] = actual;
  expectedvalues[UBound] = expect;
  UBound++;
}

function test()
{
  enterFunc('test');
  printBugNumber(BUGNUMBER);
  printStatus(summary);

  for (var i=0; i<UBound; i++)
  {
    reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
  }

  exitFunc ('test');
}


text:
namespace Test
{
    internal class Class
    {
        public static string operator{caret} +(Class x, Class y)
        {
            return "";
        }
    }
}


text:
/* @migen@ */
#ifdef _PREFAST_
#pragma prefast (push)
#pragma prefast (disable: 26061 26071  26036) //public strsafe.h is giving errors about some of the methods hence disabling it
#endif /* _PREFAST_ */

#include <strsafe.h>
#ifdef _PREFAST_
#pragma prefast (pop)
#endif /* _PREFAST_ */

#include <MI.h>
#include "MSFT_DSCLocalConfigManager.h"

#ifdef _PREFAST_
#pragma prefast (push)
#pragma prefast (disable: 26061 26071  26036) //public strsafe.h is giving errors about some of the methods hence disabling it
#endif /* _PREFAST_ */

#include <strsafe.h>
#ifdef _PREFAST_
#pragma prefast (pop)
#endif /* _PREFAST_ */

#include <EngineHelper.h>
#include "LocalConfigManagerHelper.h"
#include "ModuleHandlerInternal.h"
#if defined(_MSC_VER)
#pragma warning(disable:4100 6031) /*systemcalls.h for nits has this warning*/
#endif
#include "common\SystemCalls.h"
#include "Resources_LCM.h"

void MI_CALL MSFT_DSCLocalConfigManager_Load(
    _Outptr_result_maybenull_ MSFT_DSCLocalConfigManager_Self** self,
    _In_opt_ MI_Module_Self* selfModule,
    _In_ MI_Context* context)
{
    MI_Result miResult;
    MI_Instance *cimErrorDetails = NULL;
    MI_UNREFERENCED_PARAMETER(selfModule);

    *self = NULL;

    //load will not be called by multiple threads
    miResult = InitHandler(&cimErrorDetails);

    if(miResult != MI_RESULT_OK)
    {
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    MI_Context_PostResult(context, MI_RESULT_OK);
}

void MI_CALL MSFT_DSCLocalConfigManager_Unload(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context)
{
    MI_Result miResult;
    MI_Instance *cimErrorDetails = NULL;
    MI_UNREFERENCED_PARAMETER(self);

    miResult = UnInitHandler(&cimErrorDetails);
    if(miResult != MI_RESULT_OK)
    {
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    MI_Context_PostResult(context, MI_RESULT_OK);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_SendConfiguration(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_SendConfiguration* in)
{
    MI_Result miResult;
    MI_Instance *cimErrorDetails = NULL;
    MI_Uint32 bufferIndex = 0;
    HANDLE m_clientThreadToken;
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    if(!in->ConfigurationData.exists)
    {
        MI_Context_PostResult(context, MI_RESULT_INVALID_PARAMETER);
        return;
    }

    if(!OpenThreadToken(GetCurrentThread(), TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_DUPLICATE, TRUE, &m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_THREADIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    if (!SetThreadToken(NULL, NULL))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_REVERTSELF_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    GetRealBufferIndex( &(in->ConfigurationData.value), &bufferIndex);

    miResult = CallSetConfiguration(in->ConfigurationData.value.data + bufferIndex,
                            in->ConfigurationData.value.size - bufferIndex, LCM_SETFLAGS_SAVETOPENDINGONLY, context, &cimErrorDetails);

    if (!SetThreadToken(NULL, m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails,ID_LCMHELPER_RESUMEIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    CloseHandle(m_clientThreadToken);
    if(miResult != MI_RESULT_OK)
    {
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    MI_Context_PostResult(context, MI_RESULT_OK);

}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_SendConfigurationApply(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_SendConfigurationApply* in)
{
    MI_Result miResult;
    MI_Instance *cimErrorDetails = NULL;
    MI_Uint32 bufferIndex = 0;
    HANDLE m_clientThreadToken;
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    if(!in->ConfigurationData.exists)
    {
        MI_Context_PostResult(context, MI_RESULT_INVALID_PARAMETER);
        return;
    }

    if(!OpenThreadToken(GetCurrentThread(), TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_DUPLICATE, TRUE, &m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_THREADIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    if (!SetThreadToken(NULL, NULL))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_REVERTSELF_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    GetRealBufferIndex( &(in->ConfigurationData.value), &bufferIndex);

    miResult = CallSetConfiguration(in->ConfigurationData.value.data + bufferIndex,
                            in->ConfigurationData.value.size - bufferIndex, LCM_SETFLAGS_DEFAULT, context, &cimErrorDetails);

    if (!SetThreadToken(NULL, m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_RESUMEIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    CloseHandle(m_clientThreadToken);

    if(miResult != MI_RESULT_OK)
    {
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    MI_Context_PostResult(context, MI_RESULT_OK);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_SendConfigurationWhatIf(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_SendConfigurationWhatIf* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_SendConfigurationApplyQuick(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_SendConfigurationApplyQuick* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_GetConfiguration(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_GetConfiguration* in)
{
    MI_Result miResult;
    MI_Instance *cimErrorDetails = NULL;
    MI_InstanceA outInstances = {0};
    MI_Value val;
    MI_Uint32 bufferIndex = 0;
    MSFT_DSCLocalConfigManager_GetConfiguration outputObject;
    HANDLE m_clientThreadToken;

    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    if(!in->configurationData.exists)
    {
        MI_Context_PostResult(context, MI_RESULT_INVALID_PARAMETER);
        return;
    }

    if(!OpenThreadToken(GetCurrentThread(), TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_DUPLICATE, TRUE, &m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_THREADIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    if (!SetThreadToken(NULL, NULL))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_REVERTSELF_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    miResult = MSFT_DSCLocalConfigManager_GetConfiguration_Construct(&outputObject, context);
    if(miResult != MI_RESULT_OK)
    {
        GetCimMIError(miResult, &cimErrorDetails, ID_LCMHELPER_CONSTRUCTGET_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    GetRealBufferIndex( &(in->configurationData.value), &bufferIndex);
    miResult = CallGetConfiguration(in->configurationData.value.data + bufferIndex,
                                in->configurationData.value.size - bufferIndex, &outInstances,
                                context, &cimErrorDetails);
    if(miResult != MI_RESULT_OK)
    {
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        MSFT_DSCLocalConfigManager_GetConfiguration_Destruct(&outputObject);
        SetThreadToken(NULL, m_clientThreadToken);
        CloseHandle(m_clientThreadToken);
        return;
    }

    val.instancea.data = outInstances.data;
    val.instancea.size = outInstances.size;
    miResult = MI_Context_WriteStreamParameter(context, L"configurations", &val, MI_INSTANCEA, 0);
    CleanUpInstanceCache(&outInstances);
    if(miResult != MI_RESULT_OK)
    {
        GetCimMIError(miResult, &cimErrorDetails, ID_LCMHELPER_WRITEGET_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        MSFT_DSCLocalConfigManager_GetConfiguration_Destruct(&outputObject);
        SetThreadToken(NULL, m_clientThreadToken);
        CloseHandle(m_clientThreadToken);
        return;
    }

    miResult = MSFT_DSCLocalConfigManager_GetConfiguration_Set_MIReturn(&outputObject, 0);
    if(miResult != MI_RESULT_OK)
    {
        GetCimMIError(miResult, &cimErrorDetails, ID_LCMHELPER_SETGET_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        MSFT_DSCLocalConfigManager_GetConfiguration_Destruct(&outputObject);
        SetThreadToken(NULL, m_clientThreadToken);
        CloseHandle(m_clientThreadToken);
        return;
    }

    miResult = MSFT_DSCLocalConfigManager_GetConfiguration_Post(&outputObject, context);
    MSFT_DSCLocalConfigManager_GetConfiguration_Destruct(&outputObject);

    if (!SetThreadToken(NULL, m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_RESUMEIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    CloseHandle(m_clientThreadToken);

    if(miResult != MI_RESULT_OK)
    {
        GetCimMIError(miResult, &cimErrorDetails, ID_LCMHELPER_POSTGET_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    MI_Context_PostResult(context, MI_RESULT_OK);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_GetConfigurationHistory(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_GetConfigurationHistory* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_ApplyConfiguration(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_ApplyConfiguration* in)
{
    MI_Result miResult;
    MI_Instance *cimErrorDetails = NULL;
    MSFT_DSCLocalConfigManager_ApplyConfiguration outputObject;
    HANDLE m_clientThreadToken;
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    if(!OpenThreadToken(GetCurrentThread(), TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_DUPLICATE, TRUE, &m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_THREADIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    if (!SetThreadToken(NULL, NULL))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_REVERTSELF_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    miResult = MSFT_DSCLocalConfigManager_ApplyConfiguration_Construct(&outputObject, context);
    if(miResult != MI_RESULT_OK)
    {
        GetCimMIError(miResult, &cimErrorDetails, ID_LCMHELPER_CONSTRUCTAPPLY_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        SetThreadToken(NULL, m_clientThreadToken);
        CloseHandle(m_clientThreadToken);
        return;
    }

    miResult = CallConsistencyEngine(context, &cimErrorDetails);

    if(miResult != MI_RESULT_OK)
    {
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        SetThreadToken(NULL, m_clientThreadToken);
        CloseHandle(m_clientThreadToken);
        return;
    }

    miResult = MSFT_DSCLocalConfigManager_ApplyConfiguration_Set_MIReturn(&outputObject, 0);
    if(miResult != MI_RESULT_OK)
    {
        GetCimMIError(miResult, &cimErrorDetails, ID_LCMHELPER_SETAPPLY_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        SetThreadToken(NULL, m_clientThreadToken);
        CloseHandle(m_clientThreadToken);
        return;
    }

    miResult = MSFT_DSCLocalConfigManager_ApplyConfiguration_Post(&outputObject, context);
    MSFT_DSCLocalConfigManager_ApplyConfiguration_Destruct(&outputObject);

    if (!SetThreadToken(NULL, m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_RESUMEIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    CloseHandle(m_clientThreadToken);

    if(miResult != MI_RESULT_OK)
    {
        GetCimMIError(miResult, &cimErrorDetails, ID_LCMHELPER_POSTAPPLY_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    MI_Context_PostResult(context, MI_RESULT_OK);

}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_PullConfigurationNow(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_PullConfigurationNow* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_SendMetaConfiguration(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_SendMetaConfiguration* in)
{
    MI_Result miResult;
    MI_Instance *cimErrorDetails = NULL;
    HANDLE m_clientThreadToken;
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    if(!in->MetaConfiguration.exists)
    {
        MI_Context_PostResult(context, MI_RESULT_INVALID_PARAMETER);
        return;
    }

    if(!OpenThreadToken(GetCurrentThread(), TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_DUPLICATE, TRUE, &m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_THREADIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    if (!SetThreadToken(NULL, NULL))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_REVERTSELF_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    miResult = SetMetaConfig(in->MetaConfiguration.value, &cimErrorDetails);

    if (!SetThreadToken(NULL, m_clientThreadToken))
    {
        GetCimWin32Error(GetLastError(), &cimErrorDetails, ID_LCMHELPER_RESUMEIMPERSONATION_FAILED);
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        CloseHandle(m_clientThreadToken);
        return;
    }

    CloseHandle(m_clientThreadToken);

    if(miResult != MI_RESULT_OK)
    {
        MI_PostCimError(context, cimErrorDetails);
        MI_Instance_Delete(cimErrorDetails);
        return;
    }

    MI_Context_PostResult(context, MI_RESULT_OK);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_GetMetaConfiguration(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_GetMetaConfiguration* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_RollBack(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_RollBack* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_Cancel(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_Cancel* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_Suspend(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_Suspend* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}

void MI_CALL MSFT_DSCLocalConfigManager_Invoke_Resume(
    _In_opt_ MSFT_DSCLocalConfigManager_Self* self,
    _In_ MI_Context* context,
    _In_opt_z_ const MI_Char* nameSpace,
    _In_opt_z_ const MI_Char* className,
    _In_opt_z_ const MI_Char* methodName,
    _In_ const MSFT_DSCLocalConfigManager* instanceName,
    _In_opt_ const MSFT_DSCLocalConfigManager_Resume* in)
{
    MI_UNREFERENCED_PARAMETER(self);
    MI_UNREFERENCED_PARAMETER(nameSpace);
    MI_UNREFERENCED_PARAMETER(className);
    MI_UNREFERENCED_PARAMETER(methodName);
    MI_UNREFERENCED_PARAMETER(instanceName);
    MI_UNREFERENCED_PARAMETER(in);

    MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);
}


text:
@interface MSTextLayerSection : MSLayerSection <NSMenuDelegate, BCPopoverDelegate, MSColorInspectorDelegate>
{
NSView *_basicView;	// 112 = 0x70
NSView *_symbolExclusionView;	// 120 = 0x78
NSButton *_fontFamilyButton;	// 128 = 0x80
NSPopUpButton *_fontWeightPopUpButton;	// 136 = 0x88
NSTextField *_fontSizeField;	// 144 = 0x90
MSColorPreviewButton *_colorPickerButton;	// 152 = 0x98
NSTextField *_kerningField;	// 160 = 0xa0
NSTextField *_lineHeightField;	// 168 = 0xa8
MSLineHeightTextFieldCell *_lineHeightCell;	// 176 = 0xb0
NSTextField *_paragraphHeightField;	// 184 = 0xb8
NSSegmentedControl *_alignmentButton;	// 192 = 0xc0
BCPopover *_popover;	// 200 = 0xc8
}
@property(retain, nonatomic) BCPopover *popover; // @synthesize popover=_popover;
@property(retain, nonatomic) NSSegmentedControl *alignmentButton; // @synthesize alignmentButton=_alignmentButton;
@property(retain, nonatomic) NSTextField *paragraphHeightField; // @synthesize paragraphHeightField=_paragraphHeightField;
@property(retain, nonatomic) MSLineHeightTextFieldCell *lineHeightCell; // @synthesize lineHeightCell=_lineHeightCell;
@property(retain, nonatomic) NSTextField *lineHeightField; // @synthesize lineHeightField=_lineHeightField;
@property(retain, nonatomic) NSTextField *kerningField; // @synthesize kerningField=_kerningField;
@property(retain, nonatomic) MSColorPreviewButton *colorPickerButton; // @synthesize colorPickerButton=_colorPickerButton;
@property(retain, nonatomic) NSTextField *fontSizeField; // @synthesize fontSizeField=_fontSizeField;
@property(retain, nonatomic) NSPopUpButton *fontWeightPopUpButton; // @synthesize fontWeightPopUpButton=_fontWeightPopUpButton;
@property(retain, nonatomic) NSButton *fontFamilyButton; // @synthesize fontFamilyButton=_fontFamilyButton;
@property(retain, nonatomic) NSView *symbolExclusionView; // @synthesize symbolExclusionView=_symbolExclusionView;
@property(retain, nonatomic) NSView *basicView; // @synthesize basicView=_basicView;
- (void).cxx_destruct;
- (void)colorMagnifierAction:(id)arg1;
- (BOOL)canHandleColorMagnifierAction;
- (id)views;
- (id)textStorages;
- (BOOL)textLayerContainedInSymbol;
- (id)firstOccurrenceOfAttributeWithName:(id)arg1;
- (void)updateKerningForFontChangeTo:(id)arg1 string:(id)arg2 range:(struct _NSRange)arg3 effectiveRange:(struct _NSRange)arg4 oldPointSize:(double)arg5;
- (void)changeFontPropertiesInBlock:(CDUnknownBlockType)arg1;
- (void)changeFontPropertiesOfTextObjectsInBlock:(CDUnknownBlockType)arg1;
- (void)popoverWillClose:(id)arg1;
- (void)reloadFontWeightPopUp;
- (id)firstColor;
- (id)currentFontFamilyName;
- (void)changeFontFamilyTo:(id)arg1;
- (void)changeParagraphStyleInBlock:(CDUnknownBlockType)arg1;
- (id)textView;
- (void)alignmentButtonAction:(id)arg1;
- (id)currentView;
- (void)paragraphHeightAction:(id)arg1;
- (void)lineHeightAction:(id)arg1;
- (void)kerningAction:(id)arg1;
- (void)colorInspector:(id)arg1 didChangeToColor:(id)arg2;
- (void)changeTextLayerFont:(id)arg1;
- (void)showColorPickerAction:(id)arg1;
- (void)showParagraphStylingAction:(id)arg1;
- (void)fontSizeAction:(id)arg1;
- (void)fontWeightAction:(id)arg1;
- (void)fontFamilyAction:(id)arg1;
- (void)viewControllerWillDisappear;
- (void)dealloc;
- (double)defaultLineHeight;
- (double)lineHeight;
- (void)reloadLineHeightField;
- (void)reloadData;
- (void)textViewDidChange:(id)arg1;
- (void)awakeFromNib;
@end


text:
/**
 * The package for the old tasks from previous version of course.
 *
 * @author Alex Proshak (olexandr_proshak@ukr.net)
 */
package ru.job4j.oldtask;


text:
namespace std
{
	template <>
	struct hash<irr::video::COpenGLVAOSpec::HashAttribs>
	{
		std::size_t operator()(const irr::video::COpenGLVAOSpec::HashAttribs& x) const noexcept
		{
			size_t retval = hash<uint64_t>()(x.hashVal[0]);

			for (size_t i = 1; i<irr::video::COpenGLVAOSpec::HashAttribs::getHashLength(); i++)
				retval ^= hash<uint64_t>()(x.hashVal[i]);

			return retval;
		}
	};
}

namespace irr
{
namespace video
{

COpenGLVAOSpec::COpenGLVAOSpec(core::CLeakDebugger* dbgr) :  leakDebugger(dbgr)
{
    if (leakDebugger)
        leakDebugger->registerObj(this);

    for (size_t i=0; i<asset::EVAI_COUNT; i++)
        individualHashFields.setAttrFmt(static_cast<asset::E_VERTEX_ATTRIBUTE_ID>(i),attrFormat[i]);
}

COpenGLVAOSpec::~COpenGLVAOSpec()
{
    if (leakDebugger)
        leakDebugger->deregisterObj(this);
}

void COpenGLVAOSpec::setVertexAttrBuffer(core::smart_refctd_ptr<IGPUBuffer>&& attrBuf, asset::E_VERTEX_ATTRIBUTE_ID attrId, asset::E_FORMAT format, size_t stride, size_t offset, uint32_t divisor)
{
    if (attrId>= asset::EVAI_COUNT)
#ifdef _IRR_DEBUG
    {
        os::Printer::log("MeshBuffer setVertexAttrBuffer attribute ID out of range!\n",ELL_ERROR);
        return;
    }
#else
        return;
#endif // _IRR_DEBUG

    uint16_t mask = 0x1u<<attrId;
    uint16_t invMask = ~mask;

    size_t newStride;

    if (attrBuf)
    {
		individualHashFields.enabledAttribs |= mask;
        newStride = stride!=0u ? stride : getTexelOrBlockBytesize(format);
    }
    else
    {
		individualHashFields.enabledAttribs &= invMask;
        format = asset::EF_R32G32B32A32_SFLOAT;
        newStride = 16u;
        offset = 0u;
        divisor = 0u;
    }

    individualHashFields.setAttrFmt(attrId, format);

    const uint32_t maxDivisor = 1u;
    if (divisor>maxDivisor)
        divisor = maxDivisor;

    if (divisor!=getAttribDivisor(attrId))
    {
        if (divisor)
            attrDivisor |= (divisor<<attrId);
        else
            attrDivisor &= ~(divisor<<attrId);
        individualHashFields.attributeDivisors = attrDivisor;
    }

    attrFormat[attrId] = format;
    attrStride[attrId] = newStride;
    attrOffset[attrId] = offset;

    mappedAttrBuf[attrId] = std::move(attrBuf);
}

}
}

#endif // _IRR_COMPILE_WITH_OPENGL_


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.test.mycompany.chooseavechile.view.MainActivity">

    <TextView
        android:id="@+id/pageTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="18sp"
        android:textStyle="bold"
        android:layout_centerHorizontal="true"
        android:layout_margin="10dp"
        android:text="@string/app_name" />

    <TableLayout
        android:id="@+id/userInputs"
        android:layout_below="@+id/pageTitle"
        android:layout_width="match_parent"
        android:orientation="vertical"
        android:layout_height="wrap_content">
        <TableRow>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="right"
            android:textSize="16sp"
            android:textStyle="bold"
            android:text="@string/manufacturer" />
            <TextView
                android:id="@+id/manufacturer"
                android:layout_width="match_parent"
                android:padding="10dp"
                android:layout_marginLeft="10dp"
                android:layout_height="@dimen/header_height"
                android:layout_marginTop="@dimen/layout_margin_top"
                android:textColorHint="#9B9B9B"
                android:gravity="center_horizontal"
                android:background="@drawable/round_border_edittext"
                android:hint="@string/manufacturer_select" />

        </TableRow>

        <TableRow>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="16sp"
                android:textStyle="bold"
                android:gravity="right"
                android:text="@string/model" />
            <TextView
                android:id="@+id/model"
                android:layout_width="match_parent"
                android:layout_height="@dimen/header_height"
                android:padding="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginTop="@dimen/layout_margin_top"
                android:textColorHint="#9B9B9B"
                android:gravity="center_horizontal"
                android:background="@drawable/round_border_edittext"
                android:hint="@string/model_select" />

        </TableRow>

        <TableRow>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="16sp"
                android:textStyle="bold"
                android:gravity="right"
                android:text="@string/year" />
            <TextView
                android:id="@+id/year"
                android:layout_width="match_parent"
                android:layout_height="@dimen/header_height"
                android:padding="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginTop="@dimen/layout_margin_top"
                android:gravity="center_horizontal"
                android:background="@drawable/round_border_edittext"
                android:textColorHint="#9B9B9B"
                android:hint="@string/year_select" />

        </TableRow>

    </TableLayout>

    <Button
        android:layout_below="@+id/userInputs"
        android:layout_width="wrap_content"
        android:id="@+id/submitButton"
        android:textSize="16sp"
        android:layout_marginTop="20dp"
        android:textStyle="bold"
        android:clickable="true"
        android:layout_height="wrap_content"
        android:text="@string/submit"
        android:layout_centerHorizontal="true"/>

</RelativeLayout>


text:
const sectionAnalyzerBase = require('./sectionAnalysis.service');
const config = require('./../config/profileAnalysisConfig');

const analyzer = function(msgObj) {
    let promise = new Promise(function(resolve, reject) {
        const analyzerModule = require(
            '../server/profileAnalyzer/qualificationsection/qualification.analyzer');

        let data = JSON.parse(msgObj.value);

        analyzerModule
            .analyze(data.userName, data.payload,
                function(err, result) {
                    if (err) {
                        reject(err);
                        return;
                    }

                    resolve(result);
                    return;
                });
    });

    return promise;
}

const execute = function() {
    let subscribeTopic = config.SECTION_TO_TOPIC_MAP['QUALIFICATION'];
    let consumerGroup = config.CONSUMER_GROUP.QUALIFICATION;
    const processor = {
        name: config.PROCESSOR_NAME['QUALIFICATION'],
        process: analyzer
    }

    // sectionAnalyzerBase.execute(subscribeTopic, consumerGroup, processor);
    sectionAnalyzerBase.execute(subscribeTopic, consumerGroup, processor);
}

execute();
module.exports = analyzer;


text:
var datatable_search_timeout = new Array();

function createRowsArray (table) {
  var rows = new Array();
  var r = 0;
  if (table.tHead == null && table.tFoot == null)
    for (var r1 = 0; r1 < table.rows.length; r1++, r++)
      rows[r] = table.rows[r1];
  else
    for (var t = 0; t < table.tBodies.length; t++)
      for (var r1 = 0; r1 < table.tBodies[t].rows.length; r1++, r++)
        rows[r] = table.tBodies[t].rows[r1];
  return rows;
}

function visibleRows( rows )
{
  var n = 0;
  var vrows = new Array( );
  for( var i in rows )
  {
    if( rows[i].style.display != 'none' )
      vrows[vrows.length] = rows[i];
  }
  return vrows;
}

function insertSortedRows(table, rows)
{
  var cycle = parseInt( table.getAttribute('pp_cycle') );

  if (document.all) var rowsCopy = new Array(rows.length)
  for (var r = 0; r < rows.length; r++) {
    if (document.all) rowsCopy[r] = rows[r].cloneNode(true);
    table.deleteRow(rows[r].rowIndex);
  }

  if( document.all )
    rowsCopy = tableSearch( table, rowsCopy );
  else
    rows = tableSearch( table, rows );

  var tableSection = table.tBodies[table.tBodies.length - 1];
  for (var r = 0; r < rows.length; r++)
  {
    var row = document.all ? rowsCopy[r] : rows[r];
    if( cycle )
      row.className = (r % 2 != 0 ? 'h' : 'n')
    tableSection.appendChild(row);
  }
}

function tableSearch( table, rows )
{
  var srch = document.getElementsByName( 'txt_'+table.id );
  if( srch && srch.length && srch[0].value.length )
  {
    var processed=0;
    srch = srch[0].value.toLowerCase();
    for( var i=0; i<rows.length; i++ )
    {
      var is_in = 0;
      for( j=0; j<rows[i].childNodes.length; j++ )
      {
        if( !rows[i].childNodes[j].firstChild )
          continue;
        val = rows[i].childNodes[j].firstChild.nodeValue;
//        is_in |= ( val.toLowerCase().search( srch ) != -1 );
        is_in |= ( val.toLowerCase().indexOf( srch ) != -1 );
        processed++;
      }
      if( !is_in )
        rows[i].style.display = 'none';
      else
        rows[i].style.display = '';
    }
//    alert( processed);
  }
  else
  {
    for( var i=0; i<rows.length; i++ )
    {
        rows[i].style.display = '';
    }
  }
  return rows;
}

function sortRowsAlpha (row1 , row2) {
  var column = sortRowsAlpha.col;
  var cell1 = row1.cells[column].firstChild.nodeValue;
  var cell2 = row2.cells[column].firstChild.nodeValue;
  return cell1 < cell2 ? - 1 : (cell1 == cell2 ? 0 : 1);
}
function sortRowsNumber (row1 , row2) {
  var column = sortRowsNumber.col;
  var cell1 = parseFloat(row1.cells[column].firstChild.nodeValue);
  var cell2 = parseFloat(row2.cells[column].firstChild.nodeValue);
  return cell1 < cell2 ? - 1 : (cell1 == cell2 ? 0 : 1);
}
function findFirstLinkChild (el) {
  var child = el.firstChild;
  while (child.tagName != 'A')
    child = child.nextSibling;
  return child;
}
function testSortTableAlpha(table, col) {
  sortRowsAlpha.col = col;
  sortTable(table, sortRowsAlpha);
  table.setAttribute( 'last_sortCol', col );
  table.setAttribute( 'last_sortFun', 'Alpha' );
}
function testSortTableNumerical (table, col) {
  sortRowsNumber.col = col;
  sortTable(table, sortRowsNumber);
  table.setAttribute( 'last_sortCol', col );
  table.setAttribute( 'last_sortFun', 'Numerical' );
}

function sortTable (table, sortFun)
{
  var rows = createRowsArray(table);
  if (rows.length > 0)
  {
    rows.sort(sortFun);
    insertSortedRows(table, rows);
  }
}

function do_searchTable( table_id )
{
  var table = document.getElementById( table_id );
  var sortCol = parseInt( table.getAttribute('last_sortCol') );
  var sortFun = table.getAttribute('last_sortFun');
  if( sortFun == 'Numerical' )
    testSortTableNumerical( table, sortCol );
  else if( sortFun == 'Alpha' )
    testSortTableAlpha( table, sortCol );
  else if( sortFun == '' )
  {
    var rows = createRowsArray( table );
    insertSortedRows( table, rows );
  }
}

function searchTable( table_id, event )
{
  if( event && event.keyCode == 13 )
  {
    var vrows;
    var table = document.getElementById( table_id );
    do_searchTable( table_id );
    vrows = visibleRows( createRowsArray(table) );
    if( vrows.length == 1 )
    {
      if( vrows[0].getAttribute('onClick').length )
      {
        eval( vrows[0].getAttribute('onClick') );
        return false;
      }
    }
    return false;
  }
  if( datatable_search_timeout[table_id] )
  {
    window.clearTimeout( datatable_search_timeout[table_id] );
    datatable_search_timeout[table_id] = undefined;
  }
  datatable_search_timeout[table_id] = window.setTimeout( 'do_searchTable("'+table_id+'")', 500 );
  return true;
}

function row_hl( table, row )
{
  if( row.className.match(/sel/) )
    return;
  row.className = row.getAttribute('dflt_class') + '_hl';
}

function row_ll( table, row )
{
  if( row.className.match(/sel/) )
    return;
  row.className = row.getAttribute('dflt_class');
}

function row_sel( table, row )
{
  var selectable = parseInt( table.getAttribute('pp_selectable') );
  if( !selectable )
    return;
  else if( selectable == 2 )
  {
    if( row.className.match(/sel/) )
      row.className = row.getAttribute('dflt_class');
    else
      row.className = row.getAttribute('dflt_class') + '_sel';
  }
  else
  {
    for (var t = 0; t < table.tBodies.length; t++)
      for (var r1 = 0; r1 < table.tBodies[t].rows.length; r1++)
        table.tBodies[t].rows[r1].className = table.tBodies[t].rows[r1].getAttribute('dflt_class');

    row.className = row.getAttribute('dflt_class') + '_sel';
  }
}

function datatable_get_selected( table )
{
  var sel = new Array();
  var r=0;
  for (var t = 0; t < table.tBodies.length; t++)
    for (var r1 = 0; r1 < table.tBodies[t].rows.length; r1++, r++)
    {
      if( table.tBodies[t].rows[r1].className.match(/sel/) )
        sel[sel.length] = r;
    }
  return sel;
}


text:
  <background-banner></background-banner>

      {{ 'I18N_COLLECTION_PLAYER_PAGE_NO_EXPLORATION' | translate }}

            {{ 'I18N_COLLECTION_PLAYER_PAGE_BEGIN' | translate }} {{ collection.getTitle() }}:

            {{ 'I18N_COLLECTION_PLAYER_PAGE_CONTINUE' | translate }} {{ collection.getTitle() }}:

        {{ 'I18N_COLLECTION_PLAYER_PAGE_FINISHED' | translate }}

      <svg width="540px"
           [ngStyle]="{'margin-left': '10px'}"
           [attr.height]="svgHeight + 'px'"
           xmlns="http://www.w3.org/2000/svg">
        <path fill="none"
              stroke="#296E5F"
              stroke-dasharray="15,28"
              stroke-linecap="round"
              stroke-width="12"
              d="M80 80 L220 80"/>
        <path fill="none"
              stroke="#296E5F"
              stroke-dasharray="15,28"
              stroke-linecap="round"
              stroke-width="12"
              [attr.d]="pathSvgParameters"/>
        <image *ngIf="!collectionPlaythrough?.hasStartedCollection()"
               x="175"
               y="100"
               height="100"
               width="100"
               [attr.xlink:href]="getStaticImageUrl('/general/collection_start_here_arrow.svg')"
               xlink:href="">
        </image>
        <text *ngIf="!collectionPlaythrough?.hasStartedCollection()"
              x="210"
              y="170"
              alignment-baseline="middle"
              font-family="Capriola, Roboto, Arial, sans-serif"
              font-size="15"
              fill="#E14738"
              text-anchor="middle"
              [innerHTML]="'I18N_START_HERE' | translate">
        </text>
      </svg>

            {{ node.getExplorationTitle() }}

        <svg class="oppia-collection-exploration protractor-test-collection-exploration"
             width="100"
             height="125"
             xmlns="http://www.w3.org/2000/svg"
             xmlns:xlink="http://www.w3.org/1999/xlink"
             version="1.1">
          <defs>
            <pattern id="image{{index}}"
                     patternUnits="userSpaceOnUse"
                     height="150"
                     width="100">
              <circle cx="50"
                      cy="70"
                      r="50"
                      [attr.fill]="pathIconParameters[index]?.thumbnailBgColor"/>
              <image *ngIf="isCompletedExploration(node?.getExplorationId())"
                     x="0"
                     y="20"
                     height="100"
                     width="100"
                     [attr.xlink:href]="getStaticImageUrl('/general/collection_paw.svg')"
                     xlink:href="">
              </image>
              <image *ngIf="!isCompletedExploration(node?.getExplorationId())"
                     x="10"
                     y="30"
                     height="80"
                     width="80"
                     [attr.xlink:href]="getStaticImageUrl(pathIconParameters[index]?.thumbnailIconUrl)"
                     xlink:href="">
              </image>
            </pattern>
          </defs>

            <circle cx="50"
                    cy="70"
                    r="42"
                    attr.fill="url(#image{{index}})"
                    stroke="#006553"
                    stroke-width="2"/>

        </svg>

          <svg class="protractor-mobile-test-collection-exploration"
               width="100"
               height="150"
               xmlns="http://www.w3.org/2000/svg"
               xmlns:xlink="http://www.w3.org/1999/xlink"
               version="1.1"
               (click)="scrollToLocation('mobile-path-anchor-' + index); updateExplorationPreview(node.getExplorationId());">
            <image *ngIf="!collectionPlaythrough?.hasStartedCollection() && index===0"
                   x="0"
                   y="83"
                   height="80"
                   width="100"
                   [attr.xlink:href]="getStaticImageUrl('/general/collection_start_here_arrow.svg')"
                   xlink:href="">
            </image>
            <text *ngIf="!collectionPlaythrough?.hasStartedCollection() && index===0"
                  x="50"
                  y="140"
                  alignment-baseline="middle"
                  font-family="Capriola, Roboto, Arial, sans-serif"
                  font-size="11"
                  fill="#E14738"
                  text-anchor="middle"
                  [innerHTML]="'I18N_START_HERE' | translate">
            </text>
            <defs>
              <pattern id="image0{{index}}"
                       patternUnits="userSpaceOnUse"
                       height="150"
                       width="100">
                <circle cx="50"
                        cy="70"
                        r="50"
                        [attr.fill]="pathIconParameters[index]?.thumbnailBgColor"/>
                <image *ngIf="isCompletedExploration(node?.getExplorationId())"
                       x="0"
                       y="20"
                       height="100"
                       width="100"
                       [attr.xlink:href]="getStaticImageUrl('/general/collection_paw.svg')"
                       xlink:href="">
                </image>
                <image *ngIf="!isCompletedExploration(node?.getExplorationId())"
                       x="10"
                       y="30"
                       height="80"
                       width="80"
                       [attr.xlink:href]="getStaticImageUrl(pathIconParameters[index]?.thumbnailIconUrl)"
                       xlink:href="">
                </image>
              </pattern>
              <filter id="circle-shadow">
                <feDropShadow dx="5" dy="5" stdDeviation="0.5" flood-opacity="0.5"/>
              </filter>
            </defs>
            <circle [hidden]="!((node.getExplorationId() === nextExplorationId) && (index !== activeHighlightedIconIndex))"
                    cx="50"
                    cy="70"
                    r="50"
                    attr.id="{{'highlight' + index}}"
                    fill="#FF8C00"
                    fill-opacity="0.5"/>
            <circle cx="50"
                    cy="70"
                    r="42"
                    attr.fill="url(#image0{{index}})"
                    stroke="#006553"
                    stroke-width="2"
                    filter="url(#circle-shadow)"/>
          </svg>

            <oppia-exploration-summary-tile *ngIf="explorationCardIsShown"
                                            (click)="onClickStopPropagation($event)"
                                            [collectionId]="collectionId"
                                            [explorationId]="currentExplorationId"
                                            [explorationTitle]="summaryToPreview.title"
                                            [lastUpdatedMsec]="summaryToPreview.last_updated_msec"
                                            [objective]="summaryToPreview.objective"
                                            [category]="summaryToPreview.category"
                                            [ratings]="summaryToPreview.ratings"
                                            [numViews]="summaryToPreview.num_views"
                                            [thumbnailIconUrl]="summaryToPreview.thumbnail_icon_url"
                                            [thumbnailBgColor]="summaryToPreview.thumbnail_bg_color"
                                            [isCommunityOwned]="summaryToPreview.community_owned"
                                            [isCollectionPreviewTile]="true"
                                            class="oppia-exploration-summary-tile">
            </oppia-exploration-summary-tile>

      <mat-card class="oppia-activity-summary-tile md-default-theme">

            {{ 'I18N_COLLECTION_PLAYER_PAGE_HOVER_MESSAGE' | translate }}

      </mat-card>
      <oppia-exploration-summary-tile *ngIf="explorationCardIsShown"
                                      [collectionId]="collectionId"
                                      [explorationId]="currentExplorationId"
                                      [explorationTitle]="summaryToPreview.title"
                                      [lastUpdatedMsec]="summaryToPreview.last_updated_msec"
                                      [objective]="summaryToPreview.objective"
                                      [category]="summaryToPreview.category"
                                      [ratings]="summaryToPreview.ratings"
                                      [numViews]="summaryToPreview.num_views"
                                      [thumbnailIconUrl]="summaryToPreview.thumbnail_icon_url"
                                      [thumbnailBgColor]="summaryToPreview.thumbnail_bg_color"
                                      [isCommunityOwned]="summaryToPreview.community_owned"
                                      class="oppia-exploration-preview-summary-tile">
      </oppia-exploration-summary-tile>

<attribution-guide></attribution-guide>