text:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">

	<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<DriverPaths>
			<PathAndCredentials wcm:keyValue="1" wcm:action="add">
				<Path>A:\</Path>
			</PathAndCredentials>
		</DriverPaths>
	</component>

        <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
            <SetupUILanguage>
                <UILanguage>en-US</UILanguage>
            </SetupUILanguage>
            <InputLocale>en-US</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UILanguageFallback>en-US</UILanguageFallback>
            <UserLocale>en-US</UserLocale>
        </component>
        <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
            <DiskConfiguration>
                <Disk wcm:action="add">
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Type>Primary</Type>
                            <Order>1</Order>
                            <Size>350</Size>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>2</Order>
                            <Type>Primary</Type>
                            <Extend>true</Extend>
                        </CreatePartition>
                    </CreatePartitions>
                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <Active>true</Active>
                            <Format>NTFS</Format>
                            boot
                            <Order>1</Order>
                            <PartitionID>1</PartitionID>
                        </ModifyPartition>
                        <ModifyPartition wcm:action="add">
                            <Format>NTFS</Format>
                            Windows
                            <Letter>C</Letter>
                            <Order>2</Order>
                            <PartitionID>2</PartitionID>
                        </ModifyPartition>
                    </ModifyPartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>
            </DiskConfiguration>
            <ImageInstall>
                <OSImage>
                    <InstallFrom>
                        <MetaData wcm:action="add">
                            <Key>/IMAGE/NAME </Key>
                            <Value>111IMAGENAME</Value>
                        </MetaData>
                    </InstallFrom>
                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>2</PartitionID>
                    </InstallTo>
                </OSImage>
            </ImageInstall>
            <UserData>
                <ProductKey>
                    <Key>111PRODUCTKEY</Key>
                    <WillShowUI>OnError</WillShowUI>
                </ProductKey>
                <AcceptEula>true</AcceptEula>
            </UserData>
        </component>
    </settings>
  <settings pass="generalize">
    <component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SkipRearm>1</SkipRearm>
    </component>
    <component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <PersistAllDeviceInstalls>false</PersistAllDeviceInstalls>
      <DoNotCleanUpNonPresentDevices>false</DoNotCleanUpNonPresentDevices>
    </component>
  </settings>
  <settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <InputLocale>en-US</InputLocale>
      <SystemLocale>en-US</SystemLocale>
      <UILanguage>en-US</UILanguage>
      <UserLocale>en-US</UserLocale>
    </component>
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <HideLocalAccountScreen>true</HideLocalAccountScreen>
                <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>1</ProtectYourPC>
            </OOBE>
      <TimeZone>111TIMEZONE</TimeZone>
      <UserAccounts>
        <AdministratorPassword>
          <Value>111ADMINPASS</Value>
          <PlainText>true</PlainText>
        </AdministratorPassword>
        <LocalAccounts>
          <LocalAccount wcm:action="add">
            <Password>
              <Value>111PASSWORD</Value>
              <PlainText>true</PlainText>
            </Password>
            <Group>Administrators</Group>
            <DisplayName>111USERNAME</DisplayName>
            <Name>111USERNAME</Name>
            <Description>111USERNAME</Description>
          </LocalAccount>
        </LocalAccounts>
      </UserAccounts>
            <AutoLogon>
                <Password>
                    <Value>111PASSWORD</Value>
                    <PlainText>true</PlainText>
                </Password>
                <Enabled>true</Enabled>
                <Username>111USERNAME</Username>
            </AutoLogon>
      <FirstLogonCommands>
        <SynchronousCommand wcm:action="add">
           <CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\firstLogon.ps1</CommandLine>
           <Order>1</Order>
        </SynchronousCommand>
      </FirstLogonCommands>
    </component>
  </settings>
    <settings pass="specialize">
        <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
            <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
        </component>
        <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
            <IEHardenAdmin>false</IEHardenAdmin>
            <IEHardenUser>false</IEHardenUser>
        </component>
        <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
            <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon>
        </component>
    </settings>
</unattend>

redpajama_set_name: RedPajamaGithub


text:
package battlesys.exception;

/**
 * Thrown when the move file is bad e.g. do not have valid constructor
 * @author Peter
 */
public class BadMoveFileException extends BattleSysRuntimeException{

    public BadMoveFileException(String moveName, Exception cause){
        super("Move file for " + moveName + " is malformed.");
        if (cause != null){
            System.err.println("Caused by: ");
            cause.printStackTrace();
        }
    }

}


text:
<?php

/**
 * @method void setArticlesId(string[] $articlesId)
 * @method string[]|array[] getArticlesId()
 */
class Aplazame_Aplazame_Block_AdminHtml_ProductCampaigns extends Mage_Adminhtml_Block_Widget
{
    public function __construct()
    {
        parent::__construct();

        $this->setTemplate('aplazame/productCampaigns.phtml');
    }

    public function getArticles()
    {
        $articlesId = $this->getArticlesId();
        $products = Mage::getModel('catalog/product');

        $articles = array();
        foreach ($articlesId as $articleId) {
            /** @var Mage_Catalog_Model_Product $product */
            $product = $products->load($articleId);

            $articles[] = Aplazame_Aplazame_Api_BusinessModel_Article::createFromProduct($product);
        }

        return $articles;
    }
}


text:
'use strict';

var MessageProcessor = require('./../msg-processor');

module.exports = MessageProcessor.extend({

    if: function() {
        return this.toConfRoot &&
               this.ns['http://jabber.org/protocol/disco#items'];
    },

    then: function(cb) {
        this.core.rooms.list(null, function(err, rooms) {
            if (err) {
                return cb(err);
            }

            var stanza = this.Iq();

            var query = stanza.c('query', {
                xmlns: 'http://jabber.org/protocol/disco#items'
            });

            rooms.forEach(function(room) {
                query.c('item', {
                    jid: this.connection.getRoomJid(room.slug),
                    name: room.name
                });
            }, this);

            cb(null, stanza);

        }.bind(this));
    }

});


text:
<?php
/**
 * Created by PhpStorm.
 * User: Admin
 * Date: 26.05.2016
 * Time: 12:26
 */

namespace common\unit\test\models\content;

use yiicms\models\content\Page;
use yiicms\models\content\Tag;
use yiicms\tests\_data\fixtures\models\content\CategoryPermissionFixture;
use yiicms\tests\_data\fixtures\models\content\PageFixture;
use yiicms\tests\_data\fixtures\models\content\PageInCategoryFixture;
use yiicms\tests\_data\fixtures\models\content\PageInTagFixture;
use yiicms\tests\_data\fixtures\models\content\TagFixture;
use tests\unit\UnitCest;
use yii\db\Query;
use yii\helpers\Inflector;

/**
 * Class TagCest
 * @package tests\unit\test\models\web
 *
 */
class TagCest extends UnitCest
{
    public static function _cestFixtures()
    {
        return [
            'tags' => TagFixture::className(),
            'pit' => PageInTagFixture::className(),
            'pages' => PageFixture::className(),
            'pin' => PageInCategoryFixture::className(),
            'perm' => CategoryPermissionFixture::className(),
        ];
    }

    public function testStringToTags(\MyUnitTester $I)
    {
        $tags = Tag::stringToTags('Тег 3, Путин, Мюнхен');
        $I->assertCount(3, $tags);
        $I->assertEquals(5, Tag::find()->count());
        $I->seeRecord(Tag::className(), ['title' => 'Тег 3']);
        $I->seeRecord(Tag::className(), ['title' => 'Путин']);
        $I->seeRecord(Tag::className(), ['title' => 'Мюнхен']);
    }

    public function testPagesForUser(\MyUnitTester $I)
    {
        $tag = Tag::findOne(100);
        /** @var \yiicms\models\content\Page[] $pages */
        $pages = $tag->visiblePagesForUser()->all();

        $I->assertCount(2, $pages);
        foreach ($pages as $page) {
            $I->assertTrue(in_array($page->pageId, [100, 10100], false));
        }

        $tag = Tag::findOne(200);
        /** @var \yiicms\models\content\Page[] $pages */
        $pages = $tag->visiblePagesForUser()->all();

        $I->assertCount(1, $pages);
        foreach ($pages as $page) {
            $I->assertEquals(100, $page->pageId);
        }
    }

    public function testTagEdit(\MyUnitTester $I)
    {
        $tag = Tag::findOne(100);
        $tag->title = 'edit34';
        $tag->save();

        $tag = Tag::findOne(100);
        $I->assertEquals('edit34', $tag->slug);

        $pages = $tag->pages;
        $I->assertCount(3, $pages);

        foreach ($pages as $page) {
            foreach ($page->tags as $tag) {
                if ($tag->tagId === 100) {
                    $I->assertEquals('edit34', $tag->title);
                    $I->assertEquals('edit34', $tag->slug);
                }
            }
        }
    }

    public function testTagDelete(\MyUnitTester $I)
    {
        $tag = Tag::findOne(100);
        $tag->delete();
        $count = (new Query())
            ->from(Tag::tableName())
            ->count();

        $I->assertEquals(2, $count);

        $I->assertNull(Tag::findOne(100));
        /** @var \yiicms\models\content\Page[] $pages */
        $pages = Page::findAll([11100, 10100, 100]);

        $I->assertCount(3, $pages);

        foreach ($pages as $page) {
            $tags = $page->tags;
            $res = [];
            foreach ($tags as $tag) {
                $res[] = $tag->tagId;
            }

            $I->assertFalse(in_array(100, $res, false));
        }
    }

    public function testFindBySlug(\MyUnitTester $I)
    {
        $tag = Tag::findBySlug(Inflector::slug('Тег 1'));
        $I->assertNotNull($tag);
        $I->assertEquals(100, $tag->tagId);
    }

    /**
     * @param string $id
     * @return \yiicms\models\content\Page
     */
    public function _pages($id)
    {
        return $this->tester->grabFixture('pages', $id);
    }

    /**
     * @param string $id
     * @return Tag
     */
    public function _tags($id)
    {
        return $this->tester->grabFixture('tags', $id);
    }
}


text:
package edu.uci.ics.hyracks.control.nc.partitions;

import java.nio.ByteBuffer;

import edu.uci.ics.hyracks.api.comm.IFrameWriter;
import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
import edu.uci.ics.hyracks.api.dataflow.TaskAttemptId;
import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
import edu.uci.ics.hyracks.api.partitions.IPartition;
import edu.uci.ics.hyracks.api.partitions.PartitionId;
import edu.uci.ics.hyracks.control.common.job.PartitionState;

public class PipelinedPartition implements IFrameWriter, IPartition {
    private final IHyracksTaskContext ctx;

    private final PartitionManager manager;

    private final PartitionId pid;

    private final TaskAttemptId taId;

    private IFrameWriter delegate;

    private boolean pendingConnection;

    private boolean failed;

    public PipelinedPartition(IHyracksTaskContext ctx, PartitionManager manager, PartitionId pid, TaskAttemptId taId) {
        this.ctx = ctx;
        this.manager = manager;
        this.pid = pid;
        this.taId = taId;
    }

    @Override
    public IHyracksTaskContext getTaskContext() {
        return ctx;
    }

    @Override
    public boolean isReusable() {
        return false;
    }

    @Override
    public void deallocate() {
        // do nothing
    }

    @Override
    public synchronized void writeTo(IFrameWriter writer) {
        delegate = writer;
        notifyAll();
    }

    @Override
    public void open() throws HyracksDataException {
        manager.registerPartition(pid, taId, this, PartitionState.STARTED, false);
        failed = false;
        pendingConnection = true;
    }

    @Override
    public void nextFrame(ByteBuffer buffer) throws HyracksDataException {
        ensureConnected();
        delegate.nextFrame(buffer);
    }

    private void ensureConnected() throws HyracksDataException {
        if (pendingConnection) {
            synchronized (this) {
                while (delegate == null) {
                    try {
                        wait();
                    } catch (InterruptedException e) {
                        throw new HyracksDataException(e);
                    }
                }
            }
            delegate.open();
        }
        pendingConnection = false;
    }

    @Override
    public void fail() throws HyracksDataException {
        failed = true;
        if (delegate != null) {
            delegate.fail();
        }
    }

    @Override
    public void close() throws HyracksDataException {
        if (!failed) {
            ensureConnected();
            delegate.close();
        }
    }
}


text:
using UnityEngine;
using System.Collections;

public class ClearAllPlayerPrefData : MonoBehaviour {

	// Use this for initialization
	void Start () {
        PlayerPrefs.DeleteAll();
	}

	// Update is called once per frame
	void Update () {

	}
}


text:
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Behaviors;
public class LoggingBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : IRequest<TResponse>
{
    private readonly ILogger<LoggingBehavior<TRequest, TResponse>> _logger;
    public LoggingBehavior(ILogger<LoggingBehavior<TRequest, TResponse>> logger) => _logger = logger;

    public async Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
    {
        _logger.LogInformation("----- Handling command {CommandName} ({@Command})", request.GetGenericTypeName(), request);
        var response = await next();
        _logger.LogInformation("----- Command {CommandName} handled - response: {@Response}", request.GetGenericTypeName(), response);

        return response;
    }
}


text:
(function( $, as3cfModal ) {

	var savedSettings = {};
	var bucketNamePattern = /[^a-z0-9.-]/;

	var $tabs = $( '.as3cf-tab' );
	var $activeTab;

	/**
	 * Return the serialized string of the settings form
	 * excluding the bucket and region inputs as they get saved via AJAX
	 *
	 * @param string tab
	 *
	 * @returns {string}
	 */
	function serializedForm( tab ) {
		return $( '#' + tab + ' .as3cf-main-settings form' ).find( 'input:not(.no-compare)' ).serialize();
	}

	/**
	 * Set checkbox
	 *
	 * @param string checkbox_wrap
	 */
	function setCheckbox( checkbox_wrap ) {
		var $switch = $( '#' + checkbox_wrap );
		var $checkbox = $switch.find( 'input[type=checkbox]' );

		$switch.toggleClass( 'on' ).find( 'span' ).toggleClass( 'checked' );
		var switchOn = $switch.find( 'span.on' ).hasClass( 'checked' );
		$checkbox.attr( 'checked', switchOn ).trigger( 'change' );
	}

	/**
	 * Validate custom domain
	 *
	 * @param {object} $input
	 */
	function validateCustomDomain( $input ) {
		var $error  = $input.next( '.as3cf-validation-error' );
		var $submit = $( '#' + $activeTab.attr( 'id' ) + ' form button[type="submit"]' );
		var pattern = /[^a-zA-Z0-9\.\-]/;

		if ( pattern.test( $input.val() ) ) {
			$error.show();
			$submit.attr( 'disabled', true );
		} else {
			$error.hide();
			$submit.attr( 'disabled', false );
		}
	}

	as3cf.tabs = {
		defaultTab: 'media',
		/**
		 * Toggle settings tab
		 *
		 * @param string hash
		 * @param bool   persist_updated_notice
		 */
		toggle: function( hash, persist_updated_notice ) {
			$tabs.hide();
			$activeTab = $( '#tab-' + hash );
			$activeTab.show();
			$( '.nav-tab' ).removeClass( 'nav-tab-active' );
			$( 'a.nav-tab[data-tab="' + hash + '"]' ).addClass( 'nav-tab-active' );
			$( '.aws-main' ).attr( 'data-tab', hash );
			if ( $activeTab.attr( 'data-prefix' ) ) {
				as3cfModal.prefix = $activeTab.attr( 'data-prefix' );
			}
			if ( !persist_updated_notice ) {
				$( '.as3cf-updated' ).removeClass( 'show' );
			}
		}
	};

	/**
	 * Handle the bucket selection, either inline or in a modal
	 */
	as3cf.buckets = {

		/**
		 * Buckets must be at least this many characters
		 */
		validLength: 3,

		/**
		 * Process lock for setting a bucket
		 */
		bucketSelectLock: false,

		/**
		 * Load bucket list
		 *
		 * @param {bool} [forceUpdate]
		 */
		loadList: function( forceUpdate ) {
			if ( 'undefined' === typeof forceUpdate ) {
				forceUpdate = false;
			}

			var $bucketList = $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-bucket-list' );
			var selectedBucket = $( '#' + as3cfModal.prefix + '-bucket' ).val();

			if ( false === forceUpdate && $bucketList.find( 'li' ).length > 1 ) {
				$( '.as3cf-bucket-list a' ).removeClass( 'selected' );
				$( '.as3cf-bucket-list a[data-bucket="' + selectedBucket + '"]' ).addClass( 'selected' );

				this.scrollToSelected();
				return;
			}

			$bucketList.html( '
' + $bucketList.attr( 'data-working' ) + '
' );

			var data = {
				action: as3cfModal.prefix + '-get-buckets',
				_nonce: window[ as3cfModal.prefix.replace( /-/g, '_' ) ].nonces.get_buckets
			};

			var that = this;

			$.ajax( {
				url     : ajaxurl,
				type    : 'POST',
				dataType: 'JSON',
				data    : data,
				error   : function( jqXHR, textStatus, errorThrown ) {
					$bucketList.html( '' );
					that.showError( as3cf.strings.get_buckets_error, errorThrown, 'as3cf-bucket-select' );
				},
				success : function( data, textStatus, jqXHR ) {
					$bucketList.html( '' );

					if ( typeof data[ 'success' ] !== 'undefined' ) {
						$( '.as3cf-bucket-error' ).hide();

						$( data[ 'buckets' ] ).each( function( idx, bucket ) {
							var bucketClass = bucket.Name === selectedBucket ? 'selected' : '';
							$bucketList.append( '
 ' + bucket.Name + '
' );
						} );

						that.scrollToSelected();
					} else {
						that.showError( as3cf.strings.get_buckets_error, data[ 'error' ], 'as3cf-bucket-select' );
					}
				}
			} );
		},

		/**
		 * Scroll to selected bucket
		 */
		scrollToSelected: function() {
			if ( ! $( '.as3cf-bucket-list a.selected' ).length ) {
				return;
			}

			var offset = $( 'ul.as3cf-bucket-list li' ).first().position().top + 150;

			$( '.as3cf-bucket-list' ).animate( {
				scrollTop: $( 'ul.as3cf-bucket-list li a.selected' ).position().top - offset
			} );
		},

		/**
		 * Reset bucket modal
		 */
		resetModal: function() {
			var $bucketContainer = $( '.as3cf-bucket-container.' + as3cfModal.prefix );

			if ( false === $activeTab.hasClass( 'as3cf-has-bucket' ) || 'manual' === $( '#' + as3cfModal.prefix + '-bucket-select' ).val() ) {
				$bucketContainer.find( '.as3cf-bucket-manual' ).show().siblings().hide();
				$bucketContainer.find( '.bucket-actions.manual' ).show().siblings( '.bucket-actions' ).hide();
			} else {
				$bucketContainer.find( '.as3cf-bucket-select' ).show().siblings().hide();
				$bucketContainer.find( '.bucket-actions.select' ).show().siblings( '.bucket-actions' ).hide();

				this.loadList();
			}

			$bucketContainer.find( '.as3cf-bucket-error' ).hide();

			// Reset manual select value
			var bucket = $( '#' + as3cfModal.prefix + '-bucket' ).val();
			$bucketContainer.find( '.as3cf-bucket-manual .as3cf-bucket-name' ).val( bucket );

			// Unlock setting the bucket
			this.bucketSelectLock = false;
		},

		/**
		 * Save manual bucket
		 */
		saveManual: function() {
			var $manualBucketForm = $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-manual-save-bucket-form' );
			var $manualBucketInput = $manualBucketForm.find( '.as3cf-bucket-name' );
			var $manualBucketButton = $manualBucketForm.find( 'button[type=submit]' );
			var bucketName = $manualBucketInput.val();
			var originalBucketText = $manualBucketButton.first().text();

			if ( bucketName === $( '#' + as3cfModal.prefix + '-active-bucket' ).text() ) {
				$( '.as3cf-bucket-error' ).hide();
				$activeTab.addClass( 'as3cf-has-bucket' );
				as3cfModal.close();
				return;
			}
			$( '.as3cf-bucket-error' ).hide();
			$manualBucketButton.text( $manualBucketButton.attr( 'data-working' ) );
			$manualBucketButton.prop( 'disabled', true );

			var data = {
				action     : as3cfModal.prefix + '-manual-save-bucket',
				bucket_name: bucketName,
				_nonce     : window[ as3cfModal.prefix.replace( /-/g, '_' ) ].nonces.manual_bucket
			};

			var that = this;

			$.ajax( {
				url     : ajaxurl,
				type    : 'POST',
				dataType: 'JSON',
				data    : data,
				error   : function( jqXHR, textStatus, errorThrown ) {
					$manualBucketButton.text( originalBucketText );
					that.showError( as3cf.strings.save_bucket_error, errorThrown, 'as3cf-bucket-manual' );
				},
				success : function( data, textStatus, jqXHR ) {
					$manualBucketButton.text( originalBucketText );
					$manualBucketButton.prop( 'disabled', false );
					if ( typeof data[ 'success' ] !== 'undefined' ) {
						that.set( bucketName, data[ 'region' ], data[ 'can_write' ] );
						$( '#' + as3cfModal.prefix + '-bucket-select' ).val( 'manual' );
						$( '.as3cf-bucket-list a' ).removeClass( 'selected' ).filter( '[data-bucket="' + bucketName + '"]' ).addClass( 'selected' );
					} else {
						that.showError( as3cf.strings.save_bucket_error, data[ 'error' ], 'as3cf-bucket-manual' );
					}
				}
			} );
		},

		/**
		 * Save select bucket
		 *
		 * @param {object} $link
		 */
		saveSelected: function( $link ) {
			var $bucketList = $( '.as3cf-bucket-list' );

			if ( this.bucketSelectLock ) {
				// Bail if a bucket has already been clicked
				return;
			}

			// Lock the bucket selection
			this.bucketSelectLock = true;

			if ( $link.hasClass( 'selected' ) ) {
				$activeTab.addClass( 'as3cf-has-bucket' );
				as3cfModal.close();
				return;
			}

			var previousBucket = $( '.as3cf-bucket-list a.selected' ).attr( 'data-bucket' );

			$( '.as3cf-bucket-list a' ).removeClass( 'selected' );
			$link.addClass( 'selected' );

			$bucketList.addClass( 'saving' );
			$link.find( '.spinner' ).show().css( 'visibility', 'visible' );
			var bucketName = $link.attr( 'data-bucket' );

			var data = {
				action     : as3cfModal.prefix + '-save-bucket',
				bucket_name: bucketName,
				_nonce     : window[ as3cfModal.prefix.replace( /-/g, '_' ) ].nonces.save_bucket
			};

			var that = this;

			$.ajax( {
				url     : ajaxurl,
				type    : 'POST',
				dataType: 'JSON',
				data    : data,
				error   : function( jqXHR, textStatus, errorThrown ) {
					$bucketList.removeClass( 'saving' );
					that.showError( as3cf.strings.save_bucket_error, errorThrown, 'as3cf-bucket-select' );
					$( '.as3cf-bucket-list a' ).removeClass( 'selected' );
					$( '.as3cf-bucket-list a[data-bucket="' + previousBucket + '"]' ).addClass( 'selected' );
				},
				success : function( data, textStatus, jqXHR ) {
					$link.find( '.spinner' ).hide().css( 'visibility', 'hidden' );
					$bucketList.removeClass( 'saving' );
					if ( typeof data[ 'success' ] !== 'undefined' ) {
						that.set( bucketName, data[ 'region' ], data[ 'can_write' ] );
						$( '#' + as3cfModal.prefix + '-bucket-select' ).val( '' );
					} else {
						that.showError( as3cf.strings.save_bucket_error, data[ 'error' ], 'as3cf-bucket-select' );
						$( '.as3cf-bucket-list a' ).removeClass( 'selected' );
						$( '.as3cf-bucket-list a[data-bucket="' + previousBucket + '"]' ).addClass( 'selected' );
					}
				}
			} );
		},

		/**
		 * Disable bucket buttons
		 */
		disabledButtons: function() {
			if ( 0 === $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-create-bucket-form' ).length ) {
				return;
			}

			var $createBucketForm = $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-create-bucket-form' );
			var $manualBucketForm = $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-manual-save-bucket-form' );

			if ( $createBucketForm.find( '.as3cf-bucket-name' ).val().length < 3 ) {
				$createBucketForm.find( 'button[type=submit]' ).attr( 'disabled', true );
			}
			else {
				$createBucketForm.find( 'button[type=submit]' ).attr( 'disabled', false );
			}

			if ( $manualBucketForm.find( '.as3cf-bucket-name' ).val().length < 3 ) {
				$manualBucketForm.find( 'button[type=submit]' ).attr( 'disabled', true );
			}
			else {
				$manualBucketForm.find( 'button[type=submit]' ).attr( 'disabled', false );
			}
		},

		/**
		 * Show bucket error
		 *
		 * @param {string} title
		 * @param {string} error
		 * @param {string} [context]
		 */
		showError: function( title, error, context ) {
			var $activeView = $( '.as3cf-bucket-container' ).children( ':visible' );
			var $bucketError = $activeView.find( '.as3cf-bucket-error' );

			context = ('undefined' === typeof context) ? null : context;

			if ( context && ! $activeView.hasClass( context ) ) {
				return;
			}

			$bucketError.find( 'span.title' ).html( title + ' —' );
			$bucketError.find( 'span.message' ).html( error );
			$bucketError.show();

			// Unlock setting the bucket
			this.bucketSelectLock = false;
		},

		/**
		 * Set the selected bucket in the UI
		 *
		 * @param {string} bucket
		 * @param {string} region
		 * @param {bool}   canWrite
		 */
		set: function( bucket, region, canWrite ) {
			var $manualBucketForm = $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-manual-save-bucket-form' );
			var $activeBucket = $( '#' + as3cfModal.prefix + '-active-bucket' );

			if ( 'as3cf' === as3cfModal.prefix && 0 === $activeBucket.text().trim().length ) {
				// first time bucket select - enable main options by default
				setCheckbox( 'copy-to-s3-wrap' );
				setCheckbox( 'serve-from-s3-wrap' );

				// update the saved settings string so we don't trigger the navigation alert
				var id = $activeTab.attr( 'id' );
				savedSettings[ id ] = serializedForm( id );
			}

			// Remove previous permission errors
			$( '.as3cf-error.fatal' ).hide();

			$activeBucket.text( bucket );
			$manualBucketForm.find( '.as3cf-bucket-name' ).val( bucket );
			$( '#' + as3cfModal.prefix + '-bucket' ).val( bucket );
			$( '#' + as3cfModal.prefix + '-region' ).val( region );
			$( '.updated' ).not( '.as3cf-notice' ).show();

			$activeTab.addClass( 'as3cf-has-bucket' );
			// check permission on bucket
			$activeTab.find( '.as3cf-can-write-error' ).toggle( ! canWrite );
			$activeTab.find( '.as3cf-bucket-error' ).hide();

			if ( 'as3cf' === as3cfModal.prefix ) {
				generateUrlPreview();
			}

			setBucketLink();

			as3cfModal.close( unlockBucketSelect );
		},

		/**
		 * Save create bucket
		 */
		create: function() {
			var $createBucketForm = $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-create-bucket-form' );
			var $createBucketInput = $createBucketForm.find( '.as3cf-bucket-name' );
			var $createBucketSelect = $createBucketForm.find( '.bucket-create-region' );
			var $createBucketButton = $createBucketForm.find( 'button[type=submit]' );

			var bucketName = $createBucketInput.val();
			var origButtonText = $createBucketButton.text();

			$( '.as3cf-bucket-error' ).hide();
			$createBucketButton.text( $createBucketButton.attr( 'data-working' ) );
			$createBucketButton.prop( 'disabled', true );

			var data = {
				action     : as3cfModal.prefix + '-create-bucket',
				bucket_name: bucketName,
				_nonce     : window[ as3cfModal.prefix.replace( /-/g, '_' ) ].nonces.create_bucket
			};

			if ( $createBucketSelect.val() ) {
				data[ 'region' ] = $createBucketSelect.val();
			}

			var that = this;

			$.ajax( {
				url     : ajaxurl,
				type    : 'POST',
				dataType: 'JSON',
				data    : data,
				error   : function( jqXHR, textStatus, errorThrown ) {
					$createBucketButton.text( origButtonText );
					that.showError( as3cf.strings.create_bucket_error, errorThrown, 'as3cf-bucket-create' );
				},
				success : function( data, textStatus, jqXHR ) {
					$createBucketButton.text( origButtonText );
					$createBucketButton.prop( 'disabled', false );
					if ( typeof data[ 'success' ] !== 'undefined' ) {
						that.set( bucketName, data[ 'region' ], data[ 'can_write' ] );
						// tidy up create bucket form
						$( '.as3cf-bucket-select-region' ).hide();
						$( '.as3cf-bucket-select-region' ).removeAttr( 'selected' );
						$createBucketInput.val( '' );
						$createBucketButton.attr( 'disabled', true );
					} else {
						that.showError( as3cf.strings.create_bucket_error, data[ 'error' ], 'as3cf-bucket-create' );
					}
				}
			} );
		},

		/**
		 * Check for a valid bucket name
		 *
		 * Bucket names must be at least 3 and no more than 63 characters long.
		 * They can contain lowercase letters, numbers, periods and hyphens.
		 *
		 * @param {string} bucketName
		 *
		 * @return bool
		 */
		isValidName: function( bucketName ) {
			if ( bucketName.length < 3 || bucketName.length > 63 ) {
				return false;
			}
			if ( true === bucketNamePattern.test( bucketName ) ) {
				return false;
			}

			return true;
		},

		/**
		 * Update invalid bucket name notice
		 *
		 * @param {string} bucketName
		 */
		updateNameNotice: function( bucketName ) {
			var message = null;

			if ( true === bucketNamePattern.test( bucketName ) ) {
				message = as3cf.strings.create_bucket_invalid_chars;
			} else if ( bucketName.length < 3 ) {
				message = as3cf.strings.create_bucket_name_short;
			} else if ( bucketName.length > 63 ) {
				message = as3cf.strings.create_bucket_name_long;
			}

			if ( message && bucketName.length > 0 ) {
				$( '.as3cf-invalid-bucket-name' ).html( message );
			} else {
				$( '.as3cf-invalid-bucket-name' ).html( '' );
			}
		}

	};

	/**
	 * Get the link to the bucket on the AWS Console and update the DOM
	 *
	 * @returns {string}
	 */
	function setBucketLink() {
		var bucket = $( '#' + as3cfModal.prefix + '-bucket' ).val();
		var $objectPrefix = $activeTab.find( 'input[name="object-prefix"]' );
		var prefix = $objectPrefix.val();

		if ( '' !== prefix ) {
			prefix = '&prefix=' + encodeURIComponent( prefix );
		}

		var url = as3cf.aws_bucket_link + bucket + prefix;

		$( '#' + as3cfModal.prefix + '-view-bucket' ).attr( 'href', url );
	}

	/**
	 * Generate URL preview
	 */
	function generateUrlPreview() {
		$( '.as3cf-url-preview' ).html( 'Generating...' );

		var data = {
			_nonce: as3cf.nonces.get_url_preview
		};

		$.each( $( '#tab-' + as3cf.tabs.defaultTab + ' .as3cf-main-settings form' ).serializeArray(), function( i, o ) {
			var n = o.name,
				v = o.value;
			n = n.replace( '[]', '' );
			data[ n ] = data[ n ] === undefined ? v : $.isArray( data[ n ] ) ? data[ n ].concat( v ) : [ data[ n ], v ];
		} );

		// overwrite the save action stored in the form
		data[ 'action' ] = 'as3cf-get-url-preview';

		$.ajax( {
			url: ajaxurl,
			type: 'POST',
			dataType: 'JSON',
			data: data,
			error: function( jqXHR, textStatus, errorThrown ) {
				alert( as3cf.strings.get_url_preview_error + errorThrown );
			},
			success: function( data, textStatus, jqXHR ) {
				if ( typeof data[ 'success' ] !== 'undefined' ) {
					$( '.as3cf-url-preview' ).html( data[ 'url' ] );
				} else {
					alert( as3cf.strings.get_url_preview_error + data[ 'error' ] );
				}
			}
		} );
	}

	/**
	 * Reset the bucket select lock
	 */
	function unlockBucketSelect( target ) {
		// Unlock setting the bucket
		as3cf.buckets.bucketSelectLock = false;
	}

	/*
	 * Toggle the lost files notice
	 */
	function toggleLostFilesNotice() {
		if ( $( '#remove-local-file' ).is( ':checked' ) && $( '#serve-from-s3' ).is( ':not(:checked)' ) ) {
			$( '#as3cf-lost-files-notice' ).show();
		} else {
			$( '#as3cf-lost-files-notice' ).hide();
		}
	}

	/*
	 * Toggle the remove local files notice
	 */
	function toggleRemoveLocalNotice() {
		if ( $( '#remove-local-file' ).is( ':checked' ) ) {
			$( '#as3cf-remove-local-notice' ).show();
		} else {
			$( '#as3cf-remove-local-notice' ).hide();
		}
	}

	$( document ).ready( function() {

		// Tabs
		// --------------------

		// Move any compatibility errors below the nav tabs
		var $navTabs = $( '.wrap.aws-main .nav-tab-wrapper' );
		$( '.aws-compatibility-notice, div.updated, div.error, div.notice' ).not( '.below-h2, .inline' ).insertAfter( $navTabs );

		// check for hash in url and switch tabs accordingly
		if ( window.location.hash ) {
			var hash = window.location.hash.substring( 1 );
			as3cf.tabs.toggle( hash, true );
		} else {
			// default settings tab
			$activeTab = $( '#tab-' + as3cf.tabs.defaultTab );
			$( '.aws-main' ).attr( 'data-tab', as3cf.tabs.defaultTab );
		}

		$( '.aws-main' ).on( 'click', '.nav-tab', function( e ) {
			e.preventDefault();
			if ( $( this ).hasClass( 'nav-tab-active' ) ) {
				return;
			}
			var nextTab = $( this ).attr( 'data-tab' );
			as3cf.tabs.toggle( nextTab );
			if ( 'media' === nextTab ) {
				// As it's the default remove the hash
				window.location.hash = '';
				if ( typeof window.history.replaceState === 'function' && '#' === window.location.href.slice( -1 ) ) {
					// Strip the # if still on the end of the URL
					history.replaceState( {}, '', window.location.href.slice( 0, -1 ) );
				}
			} else {
				window.location.hash = nextTab;
			}
		} );

		// Settings
		// --------------------

		// save the original state of the forms for comparison later
		if ( $tabs.length ) {
			$tabs.each( function( i, tab ) {
				savedSettings[ tab.id ] = serializedForm( tab.id );
			} );
		}

		// prompt user with dialog if leaving the settings page with unsaved changes
		$( window ).on( 'beforeunload.as3cf-settings', function() {
			if ( $.isEmptyObject( savedSettings ) ) {
				return;
			}

			var tab = $activeTab.attr( 'id' );

			if ( serializedForm( tab ) !== savedSettings[ tab ] ) {
				return as3cf.strings.save_alert;
			}
		} );

		// let the save settings submit happen as normal
		$( document ).on( 'submit', '.as3cf-main-settings form', function( e ) {
			// disable unload warning
			$( window ).off( 'beforeunload.as3cf-settings' );
		} );

		$( '.as3cf-switch' ).on( 'click', function( e ) {
			if ( !$( this ).hasClass( 'disabled' ) ) {
				setCheckbox( $( this ).attr( 'id' ) );
			}
		} );

		$tabs.on( 'change', '.sub-toggle', function( e ) {
			var setting = $( this ).attr( 'id' );
			$( '.as3cf-setting.' + setting ).toggleClass( 'hide' );
		} );

		$( '.as3cf-domain' ).on( 'change', 'input[type="radio"]', function( e ) {
			var $selected = $( this ).closest( 'input:radio[name="domain"]:checked' );
			var domain = $selected.val();
			var $cloudfront = $( this ).parents( '.as3cf-domain' ).find( '.as3cf-setting.cloudfront' );
			var cloudfrontSelected = ( 'cloudfront' === domain );
			$cloudfront.toggleClass( 'hide', !cloudfrontSelected );
		} );

		$( '.as3cf-ssl' ).on( 'change', 'input[type="radio"]', function( e ) {
			var ssl = $( 'input:radio[name="ssl"]:checked' ).val();
			if ( 'https' === ssl ) {
				var domain = $( 'input:radio[name="domain"]:checked' ).val();
				if ( 'subdomain' === domain ) {
					$( 'input[name="domain"][value="path"]' ).attr( "checked", true );
				}
				$( '.subdomain-wrap input' ).attr( 'disabled', true );
				$( '.subdomain-wrap' ).addClass( 'disabled' );
			} else {
				$( '.subdomain-wrap input' ).removeAttr( 'disabled' );
				$( '.subdomain-wrap' ).removeClass( 'disabled' );
			}
		} );

		$( '.url-preview' ).on( 'change', 'input', function( e ) {
			generateUrlPreview();
		} );

		toggleLostFilesNotice();
		$( '#serve-from-s3,#remove-local-file' ).on( 'change', function( e ) {
			toggleLostFilesNotice();
		} );

		toggleRemoveLocalNotice();
		$( '#remove-local-file' ).on( 'change', function( e ) {
			toggleRemoveLocalNotice();
		} );

		// Don't allow 'enter' key to submit form on text input settings
		$( '.as3cf-setting input[type="text"]' ).keypress( function( event ) {
			if ( 13 === event.which ) {
				event.preventDefault();

				return false;
			}

		} );

		// Validate custom domain
		$( 'input[name="cloudfront"]' ).on( 'keyup', function( e ) {
			validateCustomDomain( $( this ) );
		} );

		// Re-enable submit button on domain change
		$( 'input[name="domain"]' ).on( 'change', function( e ) {
			var $input = $( this );
			var $submit = $( '#' + $activeTab.attr( 'id' ) + ' form button[type="submit"]' );

			if ( 'cloudfront' !== $input.val() ) {
				$submit.attr( 'disabled', false );
			} else {
				validateCustomDomain( $input.next( '.as3cf-setting' ).find( 'input[name="cloudfront"]' ) );
			}
		} );

		// Change bucket link when custom path changes
		$( 'input[name="object-prefix"]' ).on( 'change', function( e ) {
			setBucketLink();
		} );

		// Bucket select
		// --------------------

		// Move bucket errors
		$( '#tab-media > .as3cf-bucket-error' ).detach().insertAfter( '.as3cf-bucket-container h3' );

		// Action click handlers
		$( 'body' ).on( 'click', '.bucket-action-manual', function( e ) {
			e.preventDefault();
			$( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-bucket-manual' ).show().siblings().hide();
		} );
		$( 'body' ).on( 'click', '.bucket-action-browse', function( e ) {
			e.preventDefault();
			$( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-bucket-select' ).show().siblings().hide();
			as3cf.buckets.loadList();
		} );
		$( 'body' ).on( 'click', '.bucket-action-create', function( e ) {
			e.preventDefault();

			// Reset create bucket modal
			$( '.as3cf-bucket-name' ).val( '' );
			$( '.as3cf-invalid-bucket-name' ).html( '' );

			$( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-bucket-create' ).show().siblings().hide();
		} );
		$( 'body' ).on( 'click', '.bucket-action-cancel', function( e ) {
			e.preventDefault();
			as3cf.buckets.resetModal();
		} );
		$( 'body' ).on( 'click', '.bucket-action-save', function( e ) {
			e.preventDefault();
			as3cf.buckets.saveManual();
		} );
		$( 'body' ).on( 'click', '.as3cf-create-bucket-form button[type="submit"]', function( e ) {
			e.preventDefault();
			as3cf.buckets.create();
		} );

		// Bucket list refresh handler
		$( 'body' ).on( 'click', '.bucket-action-refresh', function( e ) {
			e.preventDefault();
			as3cf.buckets.loadList( true );
		} );

		// Bucket list click handler
		$( 'body' ).on( 'click', '.as3cf-bucket-list a', function( e ) {
			e.preventDefault();
			as3cf.buckets.saveSelected( $( this ) );
		} );

		// External links click handler
		$( '.as3cf-bucket-container' ).on( 'click', 'a.js-link', function( e ) {
			e.preventDefault();
			window.open( $( this ).attr( 'href' ) );

			return false;
		} );

		// Modal open
		$( 'body' ).on( 'as3cf-modal-open', function( e, target ) {
			if ( '.as3cf-bucket-container.' + as3cfModal.prefix === target ) {
				// Reset modal
				as3cf.buckets.resetModal();
				// Change manual title text
				var title = $( '.as3cf-bucket-manual h3' ).data( 'modal-title' );
				$( '.as3cf-bucket-manual h3' ).text( title );
				// Hide buttons
				as3cf.buckets.disabledButtons();
			}
		} );

		as3cf.buckets.disabledButtons();

		// Validate bucket name on create
		$( 'body' ).on( 'input keyup', '.as3cf-create-bucket-form .as3cf-bucket-name', function( e ) {
			var bucketName = $( this ).val();
			var $createBucketForm = $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-create-bucket-form' );

			if ( as3cf.buckets.isValidName( bucketName ) ) {
				$createBucketForm.find( 'button[type=submit]' ).removeAttr( 'disabled' );
			} else {
				$createBucketForm.find( 'button[type=submit]' ).attr( 'disabled', true );
			}
			as3cf.buckets.updateNameNotice( bucketName );
		} );

		// Check bucket name length on manual
		$( 'body' ).on( 'input keyup', '.as3cf-manual-save-bucket-form .as3cf-bucket-name', function( e ) {
			var $manualBucketForm = $( '.as3cf-bucket-container.' + as3cfModal.prefix + ' .as3cf-manual-save-bucket-form' );

			if ( $manualBucketForm.find( '.as3cf-bucket-name' ).val().length < as3cf.buckets.validLength ) {
				$manualBucketForm.find( 'button[type=submit]' ).attr( 'disabled', true );
			} else {
				$manualBucketForm.find( 'button[type=submit]' ).removeAttr( 'disabled' );
			}
		} );

	} );

})( jQuery, as3cfModal );


text:
PREFIX ?= /usr/local
MANPREFIX ?= "${PREFIX}/share/man/man1"

help:
	@echo "Please use \`make <target>' where <target> is one of"
	@echo "  test     to perform unit tests."
	@echo "  man      to build the man file from README.rst"
	@echo "  install  to install the hook runner"

# We use bats for testing: https://github.com/sstephenson/bats
test:
	test/bats/bin/bats test/

# The man page is completely derived from README.rst. Edits to
# README.rst require a rebuild of the man page.
man:
	rst2man.py README.rst > git-rook.1

# Install the git-rook subcommand
install:
	@mkdir -p ${DESTDIR}${MANPREFIX}
	@mkdir -p ${DESTDIR}${PREFIX}/bin
	@cp -f git-rook ${DESTDIR}${PREFIX}/bin
	@cp -f git-rook.1 ${DESTDIR}${MANPREFIX}

.PHONY: help test man


text:
/*
 * LZMA_Alone stream format:
 *
 * uchar   Properties[5]
 * uint64  Uncompressed size
 * uchar   data[*]
 *
 */

#include <config.h>
#include <common.h>
#include <watchdog.h>

#ifdef CONFIG_LZMA

#define LZMA_PROPERTIES_OFFSET 0
#define LZMA_SIZE_OFFSET       LZMA_PROPS_SIZE
#define LZMA_DATA_OFFSET       LZMA_SIZE_OFFSET+sizeof(uint64_t)

#include "LzmaTools.h"
#include "LzmaDec.h"

#include <linux/string.h>
#include <malloc.h>

static void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); }
static void SzFree(void *p, void *address) { p = p; free(address); }

int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize,
                  unsigned char *inStream,  SizeT  length)
{
    int res = SZ_ERROR_DATA;
    int i;
    ISzAlloc g_Alloc;

    SizeT outSizeFull = 0xFFFFFFFF; /* 4GBytes limit */
    SizeT outProcessed;
    SizeT outSize;
    SizeT outSizeHigh;
    ELzmaStatus state;
    SizeT compressedSize = (SizeT)(length - LZMA_PROPS_SIZE);

    debug ("LZMA: Image address............... 0x%lx\n", inStream);
    debug ("LZMA: Properties address.......... 0x%lx\n", inStream + LZMA_PROPERTIES_OFFSET);
    debug ("LZMA: Uncompressed size address... 0x%lx\n", inStream + LZMA_SIZE_OFFSET);
    debug ("LZMA: Compressed data address..... 0x%lx\n", inStream + LZMA_DATA_OFFSET);
    debug ("LZMA: Destination address......... 0x%lx\n", outStream);

    memset(&state, 0, sizeof(state));

    outSize = 0;
    outSizeHigh = 0;
    /* Read the uncompressed size */
    for (i = 0; i < 8; i++) {
        unsigned char b = inStream[LZMA_SIZE_OFFSET + i];
            if (i < 4) {
                outSize     += (UInt32)(b) << (i * 8);
        } else {
                outSizeHigh += (UInt32)(b) << ((i - 4) * 8);
        }
    }

    outSizeFull = (SizeT)outSize;
    if (sizeof(SizeT) >= 8) {
        /*
         * SizeT is a 64 bit uint => We can manage files larger than 4GB!
         *
         */
            outSizeFull |= (((SizeT)outSizeHigh << 16) << 16);
    } else if (outSizeHigh != 0 || (UInt32)(SizeT)outSize != outSize) {
        /*
         * SizeT is a 32 bit uint => We cannot manage files larger than
         * 4GB!  Assume however that all 0xf values is "unknown size" and
         * not actually a file of 2^64 bits.
         *
         */
        if (outSizeHigh != (SizeT)-1 || outSize != (SizeT)-1) {
            debug ("LZMA: 64bit support not enabled.\n");
            return SZ_ERROR_DATA;
        }
    }

    debug ("LZMA: Uncompresed size............ 0x%lx\n", outSizeFull);
    debug ("LZMA: Compresed size.............. 0x%lx\n", compressedSize);

    g_Alloc.Alloc = SzAlloc;
    g_Alloc.Free = SzFree;

    /* Decompress */
    outProcessed = outSizeFull;

    WATCHDOG_RESET();

    res = LzmaDecode(
        outStream, &outProcessed,
        inStream + LZMA_DATA_OFFSET, &compressedSize,
        inStream, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &state, &g_Alloc);
    *uncompressedSize = outProcessed;
    if (res != SZ_OK)  {
        return res;
    }

    return res;
}

#endif


text:
package com.gluonapplication;

import com.gluonhq.charm.glisten.application.MobileApplication;
import com.gluonhq.charm.glisten.control.AppBar;
import com.gluonhq.charm.glisten.mvc.View;
import javafx.animation.FadeTransition;
import javafx.geometry.Side;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.input.RotateEvent;
import javafx.scene.input.ScrollEvent;
import javafx.scene.input.TouchPoint;
import javafx.scene.input.ZoomEvent;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Line;
import javafx.scene.shape.Rectangle;
import javafx.stage.Screen;
import javafx.util.Duration;

import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;

public class BasicView extends View {
    HashMap<Integer, TouchNode> touches = new HashMap<>();
    Pane pane = new Pane();

    public BasicView(String name) {
        super(name);

        setCenter(pane);

        //hide app bar
        this.showingProperty().addListener((obs, oldValue, newValue) -> {
            if (newValue) {
                AppBar appBar = MobileApplication.getInstance().getAppBar();
                appBar.setVisible(false);
            }
        });

        zoomCircle.setStrokeWidth(5);
        zoomCircle.setStroke(Color.GAINSBORO);
        longline.setStrokeWidth(5);

        //correct position for touch events on HIDPI screens
        final double HIDPI = Screen.getPrimary().getBounds().getHeight()/Screen.getPrimary().getVisualBounds().getHeight();

        pane.setOnTouchPressed(event -> {
            TouchPoint p = event.getTouchPoint();
            TouchNode n = new TouchNode(p.getId(), p.getSceneX() * HIDPI - pane.getLayoutX(), p.getSceneY() * HIDPI - pane.getLayoutY());
            //didn't work with our Gluon version: returned wrong position (without using DPI factor)
            //TouchNode n = new TouchNode(p.getId(), p.getX(), p.getY());

            touches.put(p.getId(), n);
            pane.getChildren().add(n);

            System.out.println("touch press started");
            event.consume();
        });
        pane.setOnTouchMoved(event -> {
            TouchPoint p = event.getTouchPoint();
            TouchNode n = touches.get(p.getId());
            n.setLayoutX(p.getSceneX() * HIDPI - this.getLayoutX());
            //didn't work with our Gluon version: returned wrong position (without using DPI factor)
            //n.setLayoutX(p.getX());
            n.setLayoutY(p.getSceneY() * HIDPI - this.getLayoutY());
            //didn't work with our Gluon version: returned wrong position (without using DPI factor)
            //n.setLayoutY(p.getY());
            n.getCircle().setStroke(Color.VIOLET);

            System.out.println("touch moved");
            event.consume();
        });
        pane.setOnTouchStationary(event -> {
            TouchPoint p = event.getTouchPoint();
            TouchNode n = touches.get(p.getId());
            n.getCircle().setStroke(Color.AQUA);

            System.out.println("touch stationary");
            event.consume();
        });

        pane.setOnTouchReleased(event -> {
            for(Node n:pane.getChildren()) {
                if(n instanceof TouchNode && ((TouchNode)n).getTouchID() == event.getTouchPoint().getId()) {
                    pane.getChildren().remove(n);
                    break;
                }
            }
            System.out.println("touch released");
            event.consume();
        });

        //swipe
        pane.setOnSwipeUp(event -> {paintSwipeUI(event.getSceneX(), event.getSceneY(), Side.TOP, 100);
            System.out.println("swipe up"); event.consume();});
        pane.setOnSwipeLeft(event -> {paintSwipeUI(event.getSceneX(), event.getSceneY(), Side.LEFT, 100);
            System.out.println("swipe left"); event.consume();});
        pane.setOnSwipeRight(event -> {paintSwipeUI(event.getSceneX(), event.getSceneY(), Side.RIGHT, 100);
            System.out.println("swipe right"); event.consume();});
        pane.setOnSwipeDown(event -> {paintSwipeUI(event.getSceneX(), event.getSceneY(), Side.BOTTOM, 100);
            System.out.println("swipe down"); event.consume();});

        //rotation
        pane.setOnRotationStarted(event -> {
            if (!(pane.getChildren().contains(rec)))
                pane.getChildren().add(rec);
            System.out.println("rotation started");
            event.consume();
        });
        pane.setOnRotationFinished(event -> {
            if (pane.getChildren().contains(rec))
                pane.getChildren().remove(rec);
            System.out.println("rotation finished");
            event.consume();
        });
        pane.setOnRotate(event -> {
            RotateUI(event);
            System.out.println("rotating");
            event.consume();
        });

        //zoom
        pane.setOnZoomStarted(event -> {
            if (!(pane.getChildren().contains(zoomCircle)))
                pane.getChildren().add(zoomCircle);
            System.out.println("zoom started");
            event.consume();
        });
        pane.setOnZoomFinished(event -> {
            if (pane.getChildren().contains(zoomCircle))
                pane.getChildren().remove(zoomCircle);
            System.out.println("zoom finished");
            event.consume();
        });
        pane.setOnZoom(event -> {
            ZoomUI(event);
            System.out.println("zooming");
            event.consume();
        });

        //scrolling
        pane.setOnScrollStarted(event -> {
            pane.getChildren().removeAll(lines);
            pane.getChildren().remove(longline);
            lines.clear();
            longline.setStartX(event.getX());
            longline.setStartY(event.getY());
            pane.getChildren().add(longline);

            System.out.println("scroll started");
            event.consume();
        });
        pane.setOnScrollFinished(event -> {
            longline.setEndX(event.getX() + event.getDeltaX());
            longline.setEndY(event.getY() + event.getDeltaY());
            System.out.println("scroll finished");
            event.consume();
        });
        pane.setOnScroll(event -> {
            paintScrollUI(event);
            System.out.println("scrolling");
            event.consume();
        });

        //MOUSE
        pane.setOnMousePressed(event -> {
            Circle c = new Circle(10, Color.CORNFLOWERBLUE);
            c.setCenterX(event.getX());
            c.setCenterY(event.getY());
            pane.getChildren().add(c);
            FadeTransition ft = new FadeTransition(new Duration(1000), c);
            ft.setOnFinished(event1 -> {
                if (pane.getChildren().contains(c)) {
                    pane.getChildren().remove(c);
                    c.setDisable(true);
                }
            });
            ft.play();
            System.out.println("mouse pressed");
            event.consume();
        });
    }

    int size_rec = 50;
    Rectangle rec = new Rectangle(size_rec, size_rec, Color.ORANGE);

    public void RotateUI(RotateEvent e) {
        rec.setX(e.getSceneX() - this.getLayoutX() - size_rec / 2);
        rec.setY(e.getSceneY() - this.getLayoutY() - size_rec / 2);
        rec.setRotate(e.getTotalAngle());
    }

    Line longline = new Line();
    Collection<Line> lines = new LinkedList<>();

    private void paintScrollUI(ScrollEvent e) {
        Line line = new Line(e.getX(), e.getY(), e.getX() + e.getDeltaX(), e.getY() + e.getDeltaY());
        lines.add(line);
        pane.getChildren().add(line);

        //set position of long line
        longline.setEndX(e.getX());
        longline.setEndY(e.getY());
    }

    public void paintSwipeUI(double x, double y, Side side, double length) {
        double xnew = x;
        double ynew = y;
        switch (side) {
            case TOP:
                ynew -= length;
                break;
            case BOTTOM:
                ynew += length;
                break;
            case LEFT:
                xnew -= length;
                break;
            case RIGHT:
                xnew += length;
                break;
        }
        Line line = new Line(x, y, xnew, ynew);
        line.setStrokeWidth(5);
        line.setStroke(Color.ORANGE);
        pane.getChildren().add(line);
        Circle c = new Circle(x, y, 10, Color.ORANGE);
        pane.getChildren().add(c);
        FadeTransition ft = new FadeTransition(new Duration(1000), line);
        ft.setOnFinished(event1 -> {
            if (pane.getChildren().contains(line)) {
                pane.getChildren().remove(line);
            }
            if (pane.getChildren().contains(c)) {
                pane.getChildren().remove(c);
            }
        });
        ft.play();
    }

    Circle zoomCircle = new Circle(80, Color.TRANSPARENT);

    public void ZoomUI(ZoomEvent e) {
        zoomCircle.setScaleX(e.getTotalZoomFactor());
        zoomCircle.setScaleY(e.getTotalZoomFactor());
        zoomCircle.setCenterX(e.getX());
        zoomCircle.setCenterY(e.getY());
    }

}

/*
    UI component to display touches
 */
class TouchNode extends Group {
    public Circle getCircle() {
        return circle;
    }

    private final Circle circle;

    public Label getLabel() {
        return label;
    }

    private final Label label;
    private final int touchID;

    public TouchNode(int id, double x, double y) {
        super();
        this.touchID = id;
        circle = new Circle(40, Color.TRANSPARENT);
        circle.setStroke(Color.VIOLET);
        circle.setStrokeWidth(10);
        label = new Label("ID: " + id);
        label.setTranslateX(40);
        label.setTranslateY(40);
        super.getChildren().add(circle);
        super.getChildren().add(label);
        super.setLayoutX(x);
        super.setLayoutY(y);
    }

    public int getTouchID() {
        return touchID;
    }
}


text:
'use strict';

/**
 * Describes an available API Management SKU.
 *
 */
class ResourceSku {
  /**
   * Create a ResourceSku.
   * @property {string} [name] Name of the Sku. Possible values include:
   * 'Developer', 'Standard', 'Premium', 'Basic', 'Consumption'
   */
  constructor() {
  }

  /**
   * Defines the metadata of ResourceSku
   *
   * @returns {object} metadata of ResourceSku
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ResourceSku',
      type: {
        name: 'Composite',
        className: 'ResourceSku',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ResourceSku;


text:
describe('.roundGeo', function() {
  it('rounds numbers to 3 decimal places', function() {
    expect(UI._globalHelpers.roundGeo(1.00005)).toEqual(1.0001);
  });
});


text:
<?php

namespace tests\Dudulina\CodeGeneration\Command\WriteSideEventHandlerDetectorTest;

use Dudulina\CodeGeneration\Command\WriteSideEventHandlerDetector;
use Dudulina\Event;

class WriteSideEventHandlerDetectorTest extends \PHPUnit_Framework_TestCase
{
    public function testAccepted()
    {
        $commandClass = new \ReflectionClass(Event1::class);
        $validatorClass = new \ReflectionClass(SomeValidReadModel::class);

        $sut = new WriteSideEventHandlerDetector();

        $this->assertTrue($sut->isMessageClass($commandClass));

        $this->assertTrue($sut->isMethodAccepted($validatorClass->getMethods()[0]));
    }

    public function testNotAccepted()
    {
        $commandClass = new \ReflectionClass(\stdClass::class);
        $validatorClass = new \ReflectionClass(SomeInvalidReadModel::class);

        $sut = new WriteSideEventHandlerDetector();

        $this->assertFalse($sut->isMessageClass($commandClass));

        $this->assertFalse($sut->isMethodAccepted($validatorClass->getMethods()[0]));
    }
}

class SomeValidReadModel
{
    public function processEvent1(Event1 $command)
    {

    }
}

class Event1 implements Event
{
}

class SomeInvalidReadModel
{
    public function doEvent1(Event1 $command)
    {

    }
}


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="latest_ob.xsl" type="text/xsl"?>
<current_observation version="1.0"
	 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	 xsi:noNamespaceSchemaLocation="http://www.weather.gov/view/current_observation.xsd">
	<credit>NOAA's National Weather Service</credit>
	<credit_URL>http://weather.gov/</credit_URL>
	<image>
		<url>http://weather.gov/images/xml_logo.gif</url>
		<title>NOAA's National Weather Service</title>
		<link>http://weather.gov</link>
	</image>
	<suggested_pickup>15 minutes after the hour</suggested_pickup>
	<suggested_pickup_period>60</suggested_pickup_period>
	<location>Unknown Station</location>
	<station_id>MNPC</station_id>
	<observation_time>Last Updated on Jan 4 2016, 6:00 pm EST</observation_time>
        <observation_time_rfc822>Mon, 04 Jan 2016 18:00:00 -0500</observation_time_rfc822>
	<weather>Partly Cloudy with Haze</weather>
	<temperature_string>79.0 F (26.0 C)</temperature_string>
	<temp_f>79.0</temp_f>
	<temp_c>26.0</temp_c>
	<relative_humidity>94</relative_humidity>
	<wind_string>North at 9.2 MPH (8 KT)</wind_string>
	<wind_dir>North</wind_dir>
	<wind_degrees>360</wind_degrees>
	<wind_mph>9.2</wind_mph>
	<wind_kt>8</wind_kt>
	<dewpoint_string>77.0 F (25.0 C)</dewpoint_string>
	<dewpoint_f>77.0</dewpoint_f>
	<dewpoint_c>25.0</dewpoint_c>
 	<icon_url_base>http://forecast.weather.gov/images/wtf/small/</icon_url_base>
	<two_day_history_url>http://www.weather.gov/data/obhistory/MNPC.html</two_day_history_url>
	<icon_url_name>sct.png</icon_url_name>
	<ob_url>http://www.weather.gov/data/METAR/MNPC.1.txt</ob_url>
	<disclaimer_url>http://weather.gov/disclaimer.html</disclaimer_url>
	<copyright_url>http://weather.gov/disclaimer.html</copyright_url>
	<privacy_policy_url>http://weather.gov/notice.html</privacy_policy_url>
</current_observation>


text:
require 'rexml/parsers/pullparser'
require 'fileutils'
module DocBook

  class Epub
    CHECKER = "epubcheck"
    STYLESHEET = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', "docbook.xsl"))
    CALLOUT_PATH = File.join('images', 'callouts')
    CALLOUT_FULL_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', CALLOUT_PATH))
    CALLOUT_LIMIT = 15
    CALLOUT_EXT = ".png"
    XSLT_PROCESSOR = "xsltproc"
    OUTPUT_DIR = ".epubtmp#{Time.now.to_f.to_s}"
    MIMETYPE = "application/epub+zip"
    META_DIR = "META-INF"
    OEBPS_DIR = "OEBPS"
    ZIPPER = "zip"

    attr_reader :output_dir

    def initialize(docbook_file, output_dir=OUTPUT_DIR)
      @docbook_file = docbook_file
      @output_dir = output_dir
      @meta_dir  = File.join(@output_dir, META_DIR)
      @oebps_dir = File.join(@output_dir, OEBPS_DIR)
      @to_delete = []

      unless File.exist?(@docbook_file)
        raise ArgumentError.new("File #{@docbook_file} does not exist")
      end
    end

    def render_to_file(output_file, verbose=false)
      render_to_epub(output_file, verbose)
      bundle_epub(output_file, verbose)
      cleanup_files(@to_delete)
    end

    def self.invalid?(file)
      # Obnoxiously, we can't just check for a non-zero output...
      cmd = "#{CHECKER} #{file}"
      output = `#{cmd} 2>&1`

      if output == "No errors or warnings detected\n" # TODO wow.. this isn't fragile
        return false
      else
        STDERR.puts output if $DEBUG
        return output
      end
    end

    private
    def render_to_epub(output_file, verbose)
      chunk_quietly = "--stringparam chunk.quietly " + (verbose ? '0' : '1')
      callout_path =  "--stringparam callout.graphics.path #{CALLOUT_PATH}/"
      callout_limit = "--stringparam callout.graphics.number.limit #{CALLOUT_LIMIT}"
      callout_ext =   "--stringparam callout.graphics.extension #{CALLOUT_EXT}"
      base =          "--stringparam base.dir #{@oebps_dir}/"
      meta =          "--stringparam epub.metainf.dir #{@meta_dir}/"
      oebps =         "--stringparam epub.oebps.dir #{@oebps_dir}/"
      options = "--xinclude #{chunk_quietly} #{callout_path} #{callout_limit} #{callout_ext} #{base} #{meta} #{oebps}"
      # Double-quote stylesheet & file to help Windows cmd.exe
      db2epub_cmd = "#{XSLT_PROCESSOR} #{options} \"#{STYLESHEET}\" \"#{@docbook_file}\""
      STDERR.puts db2epub_cmd if $DEBUG
      success = system(db2epub_cmd)
      raise "Could not render as .epub to #{output_file} (#{db2epub_cmd})" unless success
      @to_delete << Dir["#{@meta_dir}/*"]
      @to_delete << Dir["#{@oebps_dir}/*"]
    end

    def bundle_epub(output_file, verbose)
      quiet = verbose ? "" : "-q"
      mimetype_filename = write_mimetype()
      meta  = File.basename(@meta_dir)
      oebps  = File.basename(@oebps_dir)
      images = copy_images()
      callouts = copy_callouts()
      # zip -X -r ../book.epub mimetype META-INF OEBPS
      # Double-quote stylesheet & file to help Windows cmd.exe
      zip_cmd = "cd \"#{@output_dir}\" &&  #{ZIPPER} #{quiet} -X -r  \"#{File.expand_path(output_file)}\" \"#{mimetype_filename}\" \"#{meta}\" \"#{oebps}\""
      puts zip_cmd if $DEBUG
      success = system(zip_cmd)
      raise "Could not bundle into .epub file to #{output_file}" unless success
    end

    def copy_callouts
      new_callout_images = []
      if has_callouts?
        calloutglob = "#{CALLOUT_FULL_PATH}/*#{CALLOUT_EXT}"
        Dir.glob(calloutglob).each {|img|
          img_new_filename = File.join(@oebps_dir, CALLOUT_PATH, File.basename(img))

          # TODO: What to rescue for these two?
          FileUtils.mkdir_p(File.dirname(img_new_filename))
          FileUtils.cp(img, img_new_filename)
          @to_delete << img_new_filename
          new_callout_images << img
        }
      end
      return new_callout_images
    end

    def copy_images
      image_references = get_image_refs()
      new_images = []
      image_references.each {|img|
        # TODO: It'd be cooler if we had a filetype lookup rather than just
        # extension
        if img =~ /\.(svg|png|gif|jpe?g|xml)/i
          img_new_filename = File.join(@oebps_dir, img)
          img_full = File.join(File.expand_path(File.dirname(@docbook_file)), img)

          # TODO: What to rescue for these two?
          FileUtils.mkdir_p(File.dirname(img_new_filename))
          puts(img_full + ": " + img_new_filename) if $DEBUG
          FileUtils.cp(img_full, img_new_filename)
          @to_delete << img_new_filename
          new_images << img_full
        end
      }
      return new_images
    end

    def write_mimetype
      mimetype_filename = File.join(@output_dir, "mimetype")
      File.open(mimetype_filename, "w") {|f| f.print MIMETYPE}
      @to_delete << mimetype_filename
      return File.basename(mimetype_filename)
    end

    def cleanup_files(file_list)
      file_list.flatten.each {|f|
        # Yikes
        FileUtils.rm_r(f, :force => true )
      }
    end

    # Returns an Array of all of the (image) @filerefs in a document
    def get_image_refs
      parser = REXML::Parsers::PullParser.new(File.new(@docbook_file))
      image_refs = []
      while parser.has_next?
        el = parser.pull
        if el.start_element? and (el[0] == "imagedata" or el[0] == "graphic")
          image_refs << el[1]['fileref']
        end
      end
      return image_refs
    end

    # Returns true if the document has code callouts
    def has_callouts?
      parser = REXML::Parsers::PullParser.new(File.new(@docbook_file))
      while parser.has_next?
        el = parser.pull
        if el.start_element? and (el[0] == "calloutlist" or el[0] == "co")
          return true
        end
      end
      return false
    end
  end
end


text:
<!doctype html>

<meta charset="utf-8">
<title>无标题文档</title>

<input id="checkAll" type="checkbox">全选

	<input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox">


text:
@implementation SSNCountdownButton

- (void)beginCountdownWithTime:(NSInteger)time
                   normalTitle:(NSString *)normalTitle
                      timeUnit:(NSString *)timeUnit
                   normalColor:(UIColor *)normalColor
                       inColor:(UIColor *)inColor
                      animated:(BOOL)animated{
    if (timeUnit == nil) {
        timeUnit = @"";
    }
    __block NSInteger number = time;
    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
    //创建一个定时起源
    dispatch_source_t source = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);

    //设置回调时间间隔
    int64_t interval = (int64_t)(1 * NSEC_PER_SEC);
    //设置定时器开始时间
    dispatch_time_t start = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC));

    //启动计时器
    //参数1:timer
    //参数2:开始时间
    //参数3:时间间隔
    //参数4:0
    dispatch_source_set_timer(source, start, interval, 0);

    //设置回调事件,即每次定时器触发的处理时间
    dispatch_source_set_event_handler(source, ^{
        number--;
        dispatch_async(dispatch_get_main_queue(), ^{
            self.enabled = NO;
            self.userInteractionEnabled = NO;
            [self setTitle:[NSString stringWithFormat:@"%zi%@",number,timeUnit] forState:UIControlStateDisabled];
            [self setBackgroundColor:inColor];
        });
        //运行到第0秒则取消计时器
        if (number == 0) {
            dispatch_source_cancel(source);
            NSLog(@"Cancle timer.");
            dispatch_async(dispatch_get_main_queue(), ^{
                self.enabled = YES;
                self.userInteractionEnabled = YES;
                [self setBackgroundColor:normalColor];
            });
        }else{
            if (animated) {
                [self scaleAnimationWithLayer:self.titleLabel.layer andScale:@[[NSNumber numberWithFloat:0],[NSNumber numberWithFloat:0.5],[NSNumber numberWithFloat:1.0],[NSNumber numberWithFloat:1.5],[NSNumber numberWithFloat:2.0]]];
            }
        }
    });

    //启动定时器
    dispatch_resume(source);
}
- (void)scaleAnimationWithLayer:(CALayer *)layer andScale:(NSArray *)scales{
    CFTimeInterval beginTime = CACurrentMediaTime();
    CAKeyframeAnimation *scaleAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform.scale"];
    scaleAnimation.keyTimes = @[scales[0], scales[1], scales[2]];
    scaleAnimation.values = @[scales[2], scales[3], scales[4]];
    scaleAnimation.duration = 1.0;

    CAKeyframeAnimation *opacityAnimaton = [CAKeyframeAnimation animationWithKeyPath:@"opacity"];
    opacityAnimaton.keyTimes = @[scales[0], scales[1], scales[2]];
    opacityAnimaton.values = @[scales[2], scales[3], scales[4]];
    opacityAnimaton.duration = 1.0;

    CAAnimationGroup *animation = [CAAnimationGroup animation];

    animation.animations = @[scaleAnimation, opacityAnimaton];
    animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
    animation.duration = 1.0;
    animation.removedOnCompletion = false;

    animation.beginTime = beginTime;
    [layer addAnimation:animation forKey:@"animation"];
}
@end


text:
module A
{

    declare class MyRoot { }

    export module B
    {
        declare class MyClass{ }
    }
}


text:
//========================================================================
//
//File:      $RCSfile: GraphicsActionBarContributor.java,v $
//Version:   $Revision: 1.10 $
//Modified:  $Date: 2013/01/10 23:05:58 $
//
//(c) Copyright 2005-2014 by Mentor Graphics Corp. All rights reserved.
//
//========================================================================
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License.  You may obtain a copy
// of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the
// License for the specific language governing permissions and limitations under
// the License.
//========================================================================
//
package com.mentor.nucleus.bp.ui.graphics.actions;

import org.eclipse.draw2d.PositionConstants;
import org.eclipse.gef.editparts.ZoomManager;
import org.eclipse.gef.ui.actions.ActionBarContributor;
import org.eclipse.gef.ui.actions.AlignmentRetargetAction;
import org.eclipse.gef.ui.actions.GEFActionConstants;
import org.eclipse.gef.ui.actions.MatchHeightRetargetAction;
import org.eclipse.gef.ui.actions.MatchWidthRetargetAction;
import org.eclipse.gef.ui.actions.ZoomInRetargetAction;
import org.eclipse.gef.ui.actions.ZoomOutRetargetAction;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.RetargetAction;

import com.mentor.nucleus.bp.ui.graphics.editor.ModelEditor;

public class GraphicsActionBarContributor extends ActionBarContributor {

	/**
	 * @see org.eclipse.gef.ui.actions.ActionBarContributor#buildActions()
	 */
	protected void buildActions() {
		addRetargetAction(new AlignmentRetargetAction(PositionConstants.LEFT));
		addRetargetAction(new AlignmentRetargetAction(PositionConstants.CENTER));
		addRetargetAction(new AlignmentRetargetAction(PositionConstants.RIGHT));
		addRetargetAction(new AlignmentRetargetAction(PositionConstants.TOP));
		addRetargetAction(new AlignmentRetargetAction(PositionConstants.MIDDLE));
		addRetargetAction(new AlignmentRetargetAction(PositionConstants.BOTTOM));

		addRetargetAction(new ZoomInRetargetAction());
		addRetargetAction(new ZoomOutRetargetAction());
		addRetargetAction(new ZoomPageRetargetAction());
		addRetargetAction(new ZoomSelectionRetargetAction());

		addRetargetAction(new MatchWidthRetargetAction());
		addRetargetAction(new MatchHeightRetargetAction());

		addRetargetAction(new RetargetAction(
				ToggleGridViewAction.TOGGLE_GRID,
				"Show Grid", IAction.AS_CHECK_BOX));
		addRetargetAction(new RetargetAction(
				ToggleGridSnapAction.TOGGLE_GRID_SNAP,
				"Enable Grid Snapping", IAction.AS_CHECK_BOX));
	}

	/**
	 * @see org.eclipse.gef.ui.actions.ActionBarContributor#declareGlobalActionKeys()
	 */
	protected void declareGlobalActionKeys() {
		addGlobalActionKey(ActionFactory.PRINT.getId());
		addGlobalActionKey(ActionFactory.SELECT_ALL.getId());
		addGlobalActionKey(ActionFactory.COPY.getId());
		addGlobalActionKey(ActionFactory.CUT.getId());
		addGlobalActionKey(ActionFactory.RENAME.getId());
		addGlobalActionKey(ActionFactory.PASTE.getId());
		addGlobalActionKey(ActionFactory.DELETE.getId());
		addGlobalActionKey(ActionFactory.UNDO.getId());
		addGlobalActionKey(ActionFactory.REDO.getId());
	}

	/**
	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToToolBar(IToolBarManager)
	 */
	public void contributeToToolBar(IToolBarManager tbm) {
		tbm.add(new Separator());
		tbm.add(getAction(GEFActionConstants.ALIGN_LEFT));
		tbm.add(getAction(GEFActionConstants.ALIGN_CENTER));
		tbm.add(getAction(GEFActionConstants.ALIGN_RIGHT));
		tbm.add(new Separator());
		tbm.add(getAction(GEFActionConstants.ALIGN_TOP));
		tbm.add(getAction(GEFActionConstants.ALIGN_MIDDLE));
		tbm.add(getAction(GEFActionConstants.ALIGN_BOTTOM));

		tbm.add(new Separator());
		tbm.add(getAction(GEFActionConstants.MATCH_WIDTH));
		tbm.add(getAction(GEFActionConstants.MATCH_HEIGHT));

		tbm.add(new Separator());
		tbm.add(getAction(GEFActionConstants.ZOOM_IN));
		tbm.add(getAction(GEFActionConstants.ZOOM_OUT));
		tbm.add(getAction(GraphicalActionConstants.ZOOM_PAGE));
		tbm.add(getAction(GraphicalActionConstants.ZOOM_SEL));

		tbm.add(new Separator());
		String[] zoomStrings = new String[] { ZoomManager.FIT_ALL,
				ZoomManager.FIT_HEIGHT, ZoomManager.FIT_WIDTH };
		tbm.add(new GraphicsZoomComboContributionItem(getPage(), zoomStrings));
	}

	/**
	 * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToMenu(IMenuManager)
	 */
	public void contributeToMenu(IMenuManager menubar) {
		super.contributeToMenu(menubar);
	}

	@Override
	public void setActiveEditor(IEditorPart editor) {
		ModelEditor mEditor = (ModelEditor) editor;
		if(mEditor.getGraphicalEditor() == null) {
			return;
		}
		if(mEditor.getActivePart() == null)
			return;
		super.setActiveEditor(editor);
	}

}


text:
class CreateServicesAccommodations < ActiveRecord::Migration[5.0]
  def change
    create_join_table :services, :accommodations do |t|
      t.index :service_id
      t.index :accommodation_id
    end
  end
end


text:
package threads;

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

import sql.DataParser;
import sql.InfoPackage;

public class SendData implements Runnable {
	private DataParser dbInfo;

	public SendData(InfoPackage d) {
		dbInfo = new DataParser(d);
	}

	public void run() {
		send();
	}

	private boolean send() {
		String contentType = "text/xml";
		String charset = "UTF-8";
		String request = null;

		request = dbInfo.getData();

		URL url = null;
		URLConnection connection = null;
		OutputStreamWriter output = null;
		InputStreamReader response = null;

		// Make URL to receiving PHP file
		try {
		    url = new URL("http://teamtyro.com/game/recieve.php");
		} catch (MalformedURLException e) {
		    e.printStackTrace();
		}

		// Set properties and send data
		try {
		    connection = url.openConnection();
		    connection.setDoOutput(true);
		    connection.setUseCaches(false);
		    connection.setDefaultUseCaches(false);
		    connection.setRequestProperty("Accept-Charset", charset);
		    connection.setRequestProperty("Content-Type", contentType);
		    connection.addRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");

		    output = new OutputStreamWriter(connection.getOutputStream());
		    output.write(request);
		    if(output != null) {
		    	try {
		    		output.flush();
		    		output.close();
		    	} catch (IOException e) {
		    		System.out.printf("ERROR: Could not close output connection!\n");
		    	}
		    }
		} catch (IOException e) {
		    e.printStackTrace();
		}

		// Get server response
		try {
			response = new InputStreamReader(connection.getInputStream());
			StringBuilder buf = new StringBuilder();
		    char[] cbuf = new char[ 2048 ];
		    int num;

		    while ( -1 != (num=response.read( cbuf )))
		    {
		        buf.append( cbuf, 0, num );
		    }

		    String result = buf.toString();
		    System.err.println( "\nResponse from server after POST:\n" + result );
		} catch(IOException e) {
			e.printStackTrace();
		}

		return true;
	}
}


text:
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------

namespace GameFramework.UI
{
    /// <summary>
    /// 界面辅助器接口。
    /// </summary>
    public interface IUIFormHelper
    {
        /// <summary>
        /// 实例化界面。
        /// </summary>
        /// <param name="uiFormAsset">要实例化的界面资源。</param>
        /// <returns>实例化后的界面。</returns>
        object InstantiateUIForm(object uiFormAsset);

        /// <summary>
        /// 创建界面。
        /// </summary>
        /// <param name="uiFormInstance">界面实例。</param>
        /// <param name="uiGroup">界面所属的界面组。</param>
        /// <param name="userData">用户自定义数据。</param>
        /// <returns>界面。</returns>
        IUIForm CreateUIForm(object uiFormInstance, IUIGroup uiGroup, object userData);

        /// <summary>
        /// 释放界面。
        /// </summary>
        /// <param name="uiFormAsset">要释放的界面资源。</param>
        /// <param name="uiFormInstance">要释放的界面实例。</param>
        void ReleaseUIForm(object uiFormAsset, object uiFormInstance);
    }
}


text:
package model

type ProcessInfo struct {
	Id          int
	Name        string
	Cmdline     string
	RealPath    string
	State       string
	MemRealSize int64
	MemVmSize   int64
	CPURate     float64
	MemRate     float64
}

type ServerProcessInfo struct {
	ServerInfo
	ProcessInfo
}


text:
package ru.noties.parcelable;

import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.Spannable;
import android.text.Spanned;
import android.text.style.StrikethroughSpan;
import android.text.style.SuperscriptSpan;
import android.text.style.UnderlineSpan;

import junit.framework.TestCase;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

import ru.noties.parcelable.obj.SomeAnnotatedParcelable;
import ru.noties.parcelable.obj.SomeEnum;
import ru.noties.parcelable.obj.SomeOtherAnnotatedParcelable;
import ru.noties.parcelable.obj.SomeParcelable;
import ru.noties.parcelable.obj.SomeParcelableSibling;
import ru.noties.parcelable.obj.SomeParcelableSibling2;

/**
 * Created by Dimitry Ivanov on 12.10.2015.
 */
@RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE)
public class ParcelGenTest extends TestCase {

    SomeAnnotatedParcelable mParcelable;

    @Before
    @Override
    public void setUp() throws Exception {
        super.setUp();

        mParcelable = new SomeAnnotatedParcelable();
    }

    @Test
    public void testBytes() {
        mParcelable
                .setSomeByte((byte) 2)
                .setSomeByteArray(new byte[]{3, 4, 1});
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testInts() {
        mParcelable
                .setSomeInt(33)
                .setSomeIntArray(new int[]{11, 99, 101, 0, -19});
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testLongs() {
        mParcelable
                .setSomeLong(4L)
                .setSomeLongArray(new long[]{13, -7, Long.MAX_VALUE});
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testFloats() {
        mParcelable
                .setSomeFloat(66.F)
                .setSomeFloatArray(new float[]{33.3F, .0F, -16.F, 77.1F});
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testDoubles() {
        mParcelable
                .setSomeDouble(10.4D)
                .setSomeDoubleArray(new double[]{12.D, .99D, 99.9999D, -100.D});
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testBools() {
        mParcelable
                .setSomeBool(true)
                .setSomeBoolArray(new boolean[]{true, false, false, false, true});
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testStrings() {
        mParcelable
                .setSomeString("someString it is")
                .setSomeStringArray(new String[]{"one", "eleven", "fifty five", "zero", "HEllo!"});
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testEnums() {
        mParcelable
                .setSomeEnum(SomeEnum.DUNNO);
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testEnums2() {
        mParcelable
                .setSomeEnum(SomeEnum.FALSE)
                .setSomeOtherEnum(SomeEnum.TRUE);
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testParcelables() {
        mParcelable
                .setRealParcelable(new SomeParcelable().setSomeInt(Integer.MAX_VALUE))
                .setRealParcelableArray(new SomeParcelable[]{
                        new SomeParcelable().setSomeInt(11),
                        new SomeParcelable().setSomeInt(-99),
                        new SomeParcelable().setSomeInt(19999)
                });
        assertParcelable(mParcelable, false);
    }

    @Test
    public void testParcelables2() {
        mParcelable
                .setSomeOtherAnnotatedParcelable(new SomeOtherAnnotatedParcelable().setSomeLong(66L))
                .setSomeOtherAnnotatedParcelableArray(new SomeOtherAnnotatedParcelable[]{
                        new SomeOtherAnnotatedParcelable().setSomeLong(11),
                        new SomeOtherAnnotatedParcelable().setSomeLong(-8),
                        new SomeOtherAnnotatedParcelable().setSomeLong(Long.MIN_VALUE)
                });
        assertParcelable(mParcelable, false);
    }

    // this test is failing & I'm not sure why...
    // Seems that SpannableString.equals() is not returning true as expected
    @Test
    public void testCharSequence() {

        final Spannable.Factory factory = Spannable.Factory.getInstance();

        final Spannable single = factory.newSpannable("Hello Single Spannable");
        single.setSpan(new UnderlineSpan(), 0, single.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

        final Spannable s1 = factory.newSpannable("S1");
        s1.setSpan(new SuperscriptSpan(), 0, s1.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

        final Spannable s2 = factory.newSpannable("S@_dskfjsjdhfkjf");
        s2.setSpan(new StrikethroughSpan(), 0, s2.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

        final SomeParcelableSibling sibling = new SomeParcelableSibling()
                .setCharSequence(single)
                .setCharSequenceArray(new CharSequence[]{s1, s2});

        assertParcelable(sibling, false);
    }

    @Test
    public void testBundle() {

        // no support for arrays..
        final Bundle bundle = new Bundle();
        bundle.putString("string", "some string");
        bundle.putInt("int", 123);
        bundle.putLong("long", 999L);
        bundle.putFloat("asddd", .000001F);

        final SomeParcelableSibling sibling = new SomeParcelableSibling()
                .setBundle(bundle);

        assertParcelable(sibling, false);
    }

    @Test
    public void testTransient() {
        final SomeParcelableSibling2 parcelable = new SomeParcelableSibling2()
                .setSomeLong(33L);
        assertParcelable(parcelable, true);
    }

    @Test
    public void testSuperCall() {
        final SomeParcelableSibling2 parcelable = new SomeParcelableSibling2();
        parcelable.setSomeBool(true);
        parcelable.setSomeString("string");
        assertParcelable(parcelable, false);
    }

    private void assertParcelable(Object p, boolean shouldFail) {

        final Parcel in = Parcel.obtain();
        ((Parcelable) p).writeToParcel(in, 0);
        final byte[] bytes = in.marshall();

        final Parcel out = Parcel.obtain();
        out.unmarshall(bytes, 0, bytes.length);
        out.setDataPosition(0);

        final Object unparcelled = callCreator(p, out);

        try {
            final boolean toCheck = p.equals(unparcelled);
            final String messageStart = shouldFail ? "equals" : "not equals";
            final String messagePattern = messageStart + ", in: %s, out: %s";
            final String message = String.format(messagePattern, p, unparcelled);
            if (shouldFail) {
                assertFalse(message, toCheck);
            } else {
                assertTrue(message, toCheck);
            }
        } finally {
            in.recycle();
            out.recycle();
        }
    }

    private <T> T callCreator(T object, Parcel parcel) {
        try {
            final Field creatorField = object.getClass().getField("CREATOR");
            final Method createFromParcel = creatorField.getType().getMethod("createFromParcel", Parcel.class);
            //noinspection unchecked
            return (T) createFromParcel.invoke(creatorField.get(object), parcel);
        } catch (Throwable t) {
            t.printStackTrace();
        }
        return null;
    }
}


text:
package org.locationtech.geowave.core.store.cli.index;

import org.locationtech.geowave.core.cli.annotations.GeowaveOperation;
import org.locationtech.geowave.core.cli.api.DefaultOperation;
import org.locationtech.geowave.core.cli.operations.GeoWaveTopLevelSection;
import com.beust.jcommander.Parameters;

@GeowaveOperation(name = "index", parentOperation = GeoWaveTopLevelSection.class)
@Parameters(commandDescription = "Commands to manage indices")
public class IndexSection extends DefaultOperation {
}


text:
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file is autogenerated by
//     java_cpp_enum.py
// From
//     ../../components/sync/base/model_type.h

package org.chromium.components.sync;

import android.support.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@IntDef({
    ModelType.UNSPECIFIED, ModelType.TOP_LEVEL_FOLDER, ModelType.BOOKMARKS,
    ModelType.FIRST_USER_MODEL_TYPE, ModelType.FIRST_REAL_MODEL_TYPE, ModelType.PREFERENCES,
    ModelType.PASSWORDS, ModelType.AUTOFILL_PROFILE, ModelType.AUTOFILL,
    ModelType.AUTOFILL_WALLET_DATA, ModelType.AUTOFILL_WALLET_METADATA, ModelType.THEMES,
    ModelType.TYPED_URLS, ModelType.EXTENSIONS, ModelType.SEARCH_ENGINES, ModelType.SESSIONS,
    ModelType.APPS, ModelType.APP_SETTINGS, ModelType.EXTENSION_SETTINGS,
    ModelType.APP_NOTIFICATIONS, ModelType.HISTORY_DELETE_DIRECTIVES,
    ModelType.SYNCED_NOTIFICATIONS, ModelType.SYNCED_NOTIFICATION_APP_INFO, ModelType.DICTIONARY,
    ModelType.FAVICON_IMAGES, ModelType.FAVICON_TRACKING, ModelType.DEVICE_INFO,
    ModelType.PRIORITY_PREFERENCES, ModelType.SUPERVISED_USER_SETTINGS, ModelType.SUPERVISED_USERS,
    ModelType.SUPERVISED_USER_SHARED_SETTINGS, ModelType.ARTICLES, ModelType.APP_LIST,
    ModelType.WIFI_CREDENTIALS, ModelType.SUPERVISED_USER_WHITELISTS, ModelType.ARC_PACKAGE,
    ModelType.PRINTERS, ModelType.READING_LIST, ModelType.USER_EVENTS, ModelType.PROXY_TABS,
    ModelType.FIRST_PROXY_TYPE, ModelType.LAST_PROXY_TYPE, ModelType.LAST_USER_MODEL_TYPE,
    ModelType.NIGORI, ModelType.FIRST_CONTROL_MODEL_TYPE, ModelType.EXPERIMENTS,
    ModelType.LAST_CONTROL_MODEL_TYPE, ModelType.LAST_REAL_MODEL_TYPE, ModelType.MODEL_TYPE_COUNT
})
@Retention(RetentionPolicy.SOURCE)
public @interface ModelType {
  /**
   * Object type unknown.  Objects may transition through the unknown state during their initial
   * creation, before their properties are set.  After deletion, object types are generally
   * preserved.
   */
  int UNSPECIFIED = 0;
  /**
   * A permanent folder whose children may be of mixed datatypes (e.g. the "Google Chrome" folder).
   */
  int TOP_LEVEL_FOLDER = 1;
  /**
   * ------------------------------------ Start of "real" model types. The model types declared
   * before here are somewhat special, as they they do not correspond to any browser data model.
   * The remaining types are bona fide model types; all have a related browser data model and can be
   * represented in the protocol using a specific Message type in the EntitySpecifics protocol
   * buffer. A bookmark folder or a bookmark URL object.
   */
  int BOOKMARKS = 2;
  int FIRST_USER_MODEL_TYPE = 2;
  int FIRST_REAL_MODEL_TYPE = 2;
  /**
   * A preference object.
   */
  int PREFERENCES = 3;
  /**
   * A password object.
   */
  int PASSWORDS = 4;
  /**
   * An AutofillProfile Object
   */
  int AUTOFILL_PROFILE = 5;
  /**
   * An autofill object.
   */
  int AUTOFILL = 6;
  /**
   * Credit cards and addresses synced from the user's account. These are read-only on the client.
   */
  int AUTOFILL_WALLET_DATA = 7;
  /**
   * Usage counts and last use dates for Wallet cards and addresses. This data is both readable and
   * writable.
   */
  int AUTOFILL_WALLET_METADATA = 8;
  /**
   * A themes object.
   */
  int THEMES = 9;
  /**
   * A typed_url object.
   */
  int TYPED_URLS = 10;
  /**
   * An extension object.
   */
  int EXTENSIONS = 11;
  /**
   * An object representing a custom search engine.
   */
  int SEARCH_ENGINES = 12;
  /**
   * An object representing a browser session.
   */
  int SESSIONS = 13;
  /**
   * An app object.
   */
  int APPS = 14;
  /**
   * An app setting from the extension settings API.
   */
  int APP_SETTINGS = 15;
  /**
   * An extension setting from the extension settings API.
   */
  int EXTENSION_SETTINGS = 16;
  /**
   * App notifications. Deprecated.
   */
  int APP_NOTIFICATIONS = 17;
  /**
   * History delete directives.
   */
  int HISTORY_DELETE_DIRECTIVES = 18;
  /**
   * Synced push notifications. Deprecated.
   */
  int SYNCED_NOTIFICATIONS = 19;
  /**
   * Synced Notification app info. Deprecated.
   */
  int SYNCED_NOTIFICATION_APP_INFO = 20;
  /**
   * Custom spelling dictionary.
   */
  int DICTIONARY = 21;
  /**
   * Favicon images.
   */
  int FAVICON_IMAGES = 22;
  /**
   * Favicon tracking information.
   */
  int FAVICON_TRACKING = 23;
  /**
   * Client-specific metadata, synced before other user types.
   */
  int DEVICE_INFO = 24;
  /**
   * These preferences are synced before other user types and are never encrypted.
   */
  int PRIORITY_PREFERENCES = 25;
  /**
   * Supervised user settings.
   */
  int SUPERVISED_USER_SETTINGS = 26;
  /**
   * Supervised users. Every supervised user is a profile that is configured remotely by this user
   * and can have restrictions applied. SUPERVISED_USERS and SUPERVISED_USER_SETTINGS can not be
   * encrypted.
   */
  int SUPERVISED_USERS = 27;
  /**
   * Supervised user shared settings. Shared settings can be modified both by the manager and the
   * supervised user.
   */
  int SUPERVISED_USER_SHARED_SETTINGS = 28;
  /**
   * Distilled articles.
   */
  int ARTICLES = 29;
  /**
   * App List items
   */
  int APP_LIST = 30;
  /**
   * WiFi credentials. Each item contains the information for connecting to one WiFi network. This
   * includes, e.g., network name and password.
   */
  int WIFI_CREDENTIALS = 31;
  /**
   * Supervised user whitelists. Each item contains a CRX ID (like an extension ID) and a name.
   */
  int SUPERVISED_USER_WHITELISTS = 32;
  /**
   * ARC Package items.
   */
  int ARC_PACKAGE = 33;
  /**
   * Printer device information.
   */
  int PRINTERS = 34;
  /**
   * Reading list items.
   */
  int READING_LIST = 35;
  /**
   * Commit only user events.
   */
  int USER_EVENTS = 36;
  /**
   * ---- Proxy types ---- Proxy types are excluded from the sync protocol, but are still considered
   * real user types. By convention, we prefix them with 'PROXY_' to distinguish them from normal
   * protocol types. Tab sync. This is a placeholder type, so that Sessions can be implicitly
   * enabled for history sync and tabs sync.
   */
  int PROXY_TABS = 37;
  int FIRST_PROXY_TYPE = 37;
  int LAST_PROXY_TYPE = 37;
  int LAST_USER_MODEL_TYPE = 37;
  /**
   * ---- Control Types ---- An object representing a set of Nigori keys.
   */
  int NIGORI = 38;
  int FIRST_CONTROL_MODEL_TYPE = 38;
  /**
   * Flags to enable experimental features.
   */
  int EXPERIMENTS = 39;
  int LAST_CONTROL_MODEL_TYPE = 39;
  int LAST_REAL_MODEL_TYPE = 39;
  /**
   * If you are adding a new sync datatype that is exposed to the user via the sync preferences UI,
   * be sure to update the list in components/sync/driver/user_selectable_sync_type.h so that the
   * UMA histograms for sync include your new type.  In this case, be sure to also update the
   * UserSelectableTypes() definition in sync/syncable/model_type.cc. Additionally, enum
   * SyncModelTypes and suffix SyncModelType need to be updated in histograms.xml for all new types.
   */
  int MODEL_TYPE_COUNT = 40;
}


text:
@class MMDBRecoverContext, NSString;

@interface MMDBRSceneStatus : NSObject
{
    NSString *m_sceneName;
    MMDBRecoverContext *m_recoverContext;
}

@property(retain, nonatomic) MMDBRecoverContext *m_recoverContext; // @synthesize m_recoverContext;
@property(retain, nonatomic) NSString *m_sceneName; // @synthesize m_sceneName;
- (void).cxx_destruct;
- (void)clearRecoverContext;
- (_Bool)hasAutoRecoverDB;

@end