text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * 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.
 */
-->

<beans xmlns:cdi="http://www.osgi.org/xmlns/cdi/v1.0.0">
	<cdi:bean class="com.foo.FooImpl" />
	<cdi:bean class="com.foo.BarImpl" />
	<cdi:reference beanClass="java.util.concurrent.Callable" target="(objectClass=java.util.concurrent.Callable)" />
	<cdi:reference beanClass="java.util.Map" target="(objectClass=java.util.Map)" />
</beans>


text:
use strict;
use warnings;
use feature qw(say);
use Bio::EnsEMBL::Funcgen::DBSQL::DBAdaptor;
use Data::Dumper;

my $registry = 'Bio::EnsEMBL::Registry';

$registry->load_registry_from_db(
  -host => 'mysql-ens-var-prod-3',
  -user => 'ensro',
  -port => 4606,
);

my $regulatory_build_adaptor = $registry->get_adaptor('human', 'funcgen', 'regulatorybuild');

print $regulatory_build_adaptor, "\n";

my $regulatory_build = $regulatory_build_adaptor->fetch_current_regulatory_build;

foreach my $cell_type (@{$regulatory_build->get_all_Epigenomes}) {
  print $cell_type->display_label, "\n";

}

#    my $cell_types = [
#      sort
#      map {{ value => $_->production_name, caption => $_->display_label }}
#      @{$regulatory_build->get_all_Epigenomes}
#    ];

redpajama_set_name: RedPajamaGithub


text:
{-|
Module:      Data.Ix.Deriving
Copyright:   (C) 2015-2017 Ryan Scott
License:     BSD-style (see the file LICENSE)
Maintainer:  Ryan Scott
Portability: Template Haskell

Exports functions to mechanically derive 'Ix' instances.
-}
module Data.Ix.Deriving (
      -- * 'Ix'
      deriveIx
    , makeRange
    , makeUnsafeIndex
    , makeInRange
      -- * 'deriveIx' limitations
      -- $constraints
    ) where

import Data.Ix.Deriving.Internal

{- $constraints

Be aware of the following potential gotchas:

* Type variables of kind @*@ are assumed to have 'Ix' constraints.
  If this is not desirable, use 'makeRange' or one of its cousins.

* Generated 'Ix' instances for poly-kinded data family instances are likely
  to require the use of the @TypeInType@ extension on GHC 8.0, 8.2, or 8.4.
-}


text:
<?php
/*------------------------------------------------------------------------------
	generic error 404, the page/controller is not found
------------------------------------------------------------------------------*/

// set a default error message
if (!isset($e)) {
	// errors before index.php kicks in
	if ($_SERVER['REDIRECT_STATUS'] != 200 && $_SERVER['SCRIPT_NAME'] == '/error404.php') {
		$e = 'htaccess catched '.$_SERVER['REDIRECT_STATUS'].' for '.$_SERVER['REQUEST_URI'];
	}
	else {
		$e = 'unknown error';
	}
}

// get variables if we're not loaded from index.php directly
// .. or because the controller was not launched
if (!defined('REQUEST') && isset($url_vars['request'])) {
	define('REQUEST', $url_vars['request']);
}
if (!defined('CONTROLLER') && isset($url_vars['controller'])) {
	define('CONTROLLER', $url_vars['controller']);
}
if (!defined('ARGUMENTS') && isset($url_vars['arguments'])) {
	if (!empty($url_vars['arguments'])) {
		$url_vars['arguments'] = array();
	}
	define('ARGUMENTS', json_encode($url_vars['arguments']));
}

// make sure places is known
if (!isset($places) && defined('PLACES')) {
	$places = json_decode(PLACES, true);
}
if (!isset($places)) {
	$public = dirname(__FILE__);
	$private = (file_exists($public.'-backend')) ? $public.'-backend' : realpath($public.'/..');
	include_once($private.'/backend/bootstrap.php');
}

// get the loader
include_once($places['backend'].'load.php');

/*------------------------------------------------------------------------------
	show a message
------------------------------------------------------------------------------*/
header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');

$message = '<!DOCTYPE html>';
$message .= '<meta http-equiv="Content-Type" content="text/html; charset='.DEFAULT_CHARSET.'">';
$message .= '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">';
$message .= '<meta name="viewport" content="width=device-width,initial-scale=1">';
$message .= '<title>Foutje, bedankt! - L3D tools</title>';
$message .= '<title>Niet gevonden - L3D tools</title>';
$message .= '<link rel="shortcut icon" href="'.$places['www'].'favicon.ico" type="image/x-icon">';
$message .= '';
$message .= '
Niet gevonden
';
$message .= '
Hmm, die pagina kunnen we niet vinden.
';
$message .= '
Als je denkt dat hier wel iets zou moeten staan, ';
$message .= 'laat het ons weten en ';
$message .= 'neem contact op.
';
$message .= '
Wil je terug? Of naar de homepage?
';
$message .= '';

echo $message;

if (ENVIRONMENT != 'development' && defined('SKIP_404_EMAIL') == false && CONTROLLER != '404') {
	try {
		load::helper('error');
		error::mail($e, $message, $type=404);
	}
	catch (Exception $e) {
		// skip silently
	}
}

if (ENVIRONMENT == 'development') {
	if (is_object($e)) {
		echo '
';
		if (is_callable(array($e, 'getSeverity'))) {
			$severity_code = $e->getSeverity();
			$severity_names = array(
				E_WARNING => 'Warning',
				E_NOTICE => 'Notice',
				E_STRICT => 'Strict',
				E_RECOVERABLE_ERROR => 'Catchable',
			);
			$severity_name = (isset($severity_names[$severity_code])) ? $severity_names[$severity_code] : 'Unknown';
			echo $severity_name;
		}
		else {
			echo '#'.$e->getCode();
		}
		echo ': '.$e->getMessage().'
in '.$e->getFile().' @ '.$e->getLine().'
';
		echo '
trace: '.NL.$e->getTraceAsString().'
';
		echo '
previous: ';
		echo ($e->getPrevious()) ? $e->getPrevious() : '-';
		echo '
';
	}
	elseif (is_string($e)) {
		echo '
error message: '.$e.'
';
	}

	echo '
mysql: ';
	if (class_exists('mysql', $autoload=false) && mysql::$connection) {
		foreach (mysql::$all_queries as $query) {
			echo NL.'- '.$query;
		}
	}
	else {
		echo '-';
	}
	echo NL.'
';
}

exit;
?>


text:
namespace fs = boost::filesystem;

namespace aliceVision {
namespace sfmDataIO {

///Check that each pose have a valid intrinsic and pose id in the existing View ids
bool ValidIds(const sfmData::SfMData& sfmData, ESfMData partFlag)
{
  const bool bCheck_Intrinsic = (partFlag & INTRINSICS);
  const bool bCheck_Extrinsic = (partFlag & EXTRINSICS);

  std::set<IndexT> intrinsicIdsDeclared;
  transform(sfmData.getIntrinsics().begin(), sfmData.getIntrinsics().end(),
    std::inserter(intrinsicIdsDeclared, intrinsicIdsDeclared.begin()), stl::RetrieveKey());

  std::set<IndexT> extrinsicIdsDeclared; //unique so can use a set
  transform(sfmData.getPoses().begin(), sfmData.getPoses().end(),
    std::inserter(extrinsicIdsDeclared, extrinsicIdsDeclared.begin()), stl::RetrieveKey());

  // Collect id_intrinsic and id_extrinsic referenced from views
  std::set<IndexT> intrinsicIdsReferenced;
  std::set<IndexT> extrinsicIdsReferenced;
  for(const auto& v: sfmData.getViews())
  {
    const IndexT id_intrinsic = v.second.get()->getIntrinsicId();
    intrinsicIdsReferenced.insert(id_intrinsic);

    const IndexT id_pose = v.second.get()->getPoseId();
    extrinsicIdsReferenced.insert(id_pose);
  }

  // We may have some views with undefined Intrinsics,
  // so erase the UndefinedIndex value if exist.
  intrinsicIdsReferenced.erase(UndefinedIndexT);
  extrinsicIdsReferenced.erase(UndefinedIndexT);

  // Check if defined intrinsic & extrinsic are at least connected to views
  bool bRet = true;
  if(bCheck_Intrinsic && intrinsicIdsDeclared != intrinsicIdsReferenced)
  {
    ALICEVISION_LOG_WARNING("The number of intrinsics is incoherent:");
    ALICEVISION_LOG_WARNING(intrinsicIdsDeclared.size() << " intrinsics declared and " << intrinsicIdsReferenced.size() << " intrinsics used.");
    std::set<IndexT> undefinedIntrinsicIds;
    // undefinedIntrinsicIds = intrinsicIdsReferenced - intrinsicIdsDeclared
    std::set_difference(intrinsicIdsReferenced.begin(), intrinsicIdsReferenced.end(),
                        intrinsicIdsDeclared.begin(), intrinsicIdsDeclared.end(),
                        std::inserter(undefinedIntrinsicIds, undefinedIntrinsicIds.begin()));
    // If undefinedIntrinsicIds is not empty,
    // some intrinsics are used in Views but never declared.
    // So the file structure is invalid and may create troubles.
    if(!undefinedIntrinsicIds.empty())
      bRet = false; // error
  }

  if (bCheck_Extrinsic && extrinsicIdsDeclared != extrinsicIdsReferenced)
  {
    ALICEVISION_LOG_TRACE(extrinsicIdsDeclared.size() << " extrinsics declared and " << extrinsicIdsReferenced.size() << " extrinsics used.");
    std::set<IndexT> undefinedExtrinsicIds;
    // undefinedExtrinsicIds = extrinsicIdsReferenced - extrinsicIdsDeclared
    std::set_difference(extrinsicIdsDeclared.begin(), extrinsicIdsDeclared.end(),
                        extrinsicIdsReferenced.begin(), extrinsicIdsReferenced.end(),
                        std::inserter(undefinedExtrinsicIds, undefinedExtrinsicIds.begin()));
    // If undefinedExtrinsicIds is not empty,
    // some extrinsics are used in Views but never declared.
    // So the file structure is invalid and may create troubles.
    if(!undefinedExtrinsicIds.empty())
      bRet = false; // error
  }

  return bRet;
}

bool Load(sfmData::SfMData& sfmData, const std::string& filename, ESfMData partFlag)
{
  const std::string extension = fs::extension(filename);
  bool status = false;

  if(extension == ".sfm" || extension == ".json") // JSON File
  {
    status = loadJSON(sfmData, filename, partFlag);
  }
#if ALICEVISION_IS_DEFINED(ALICEVISION_HAVE_ALEMBIC)
  else if(extension == ".abc") // Alembic
  {
    AlembicImporter(filename).populateSfM(sfmData, partFlag);
    status = true;
  }
#endif // ALICEVISION_HAVE_ALEMBIC
  else if(fs::is_directory(filename))
  {
    status = readGt(filename, sfmData);
  }
  else // It is not a folder or known format, return false
  {
    ALICEVISION_LOG_ERROR("Unknown input SfM data format: '" << extension << "'");
    return false;
  }

  if(status)
    sfmData.setAbsolutePath(filename);

  // Assert that loaded intrinsics | extrinsics are linked to valid view
  if(status && (partFlag & VIEWS) && ((partFlag & INTRINSICS) || (partFlag & EXTRINSICS)))
    return ValidIds(sfmData, partFlag);

  return status;
}

bool Save(const sfmData::SfMData& sfmData, const std::string& filename, ESfMData partFlag)
{
  const fs::path bPath = fs::path(filename);
  const std::string extension = bPath.extension().string();
  const std::string tmpPath = (bPath.parent_path() / bPath.stem()).string() + "." + fs::unique_path().string() + extension;
  bool status = false;

  if(extension == ".sfm" || extension == ".json") // JSON File
  {
    status = saveJSON(sfmData, tmpPath, partFlag);
  }
  else if(extension == ".ply") // Polygon File
  {
    status = savePLY(sfmData, tmpPath, partFlag);
  }
  else if (extension == ".baf") // Bundle Adjustment File
  {
    status = saveBAF(sfmData, tmpPath, partFlag);
  }
#if ALICEVISION_IS_DEFINED(ALICEVISION_HAVE_ALEMBIC)
  else if (extension == ".abc") // Alembic
  {
    AlembicExporter(tmpPath).addSfM(sfmData, partFlag);
    status = true;
  }
#endif // ALICEVISION_HAVE_ALEMBIC
  else
  {
    ALICEVISION_LOG_ERROR("Cannot save the SfM data file: '" << filename << "'."
                          << std::endl << "The file extension is not recognized.");
    return false;
  }

  // rename temporay filename
  if(status)
    fs::rename(tmpPath, filename);

  return status;
}

} // namespace sfmDataIO
} // namespace aliceVision


text:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Sessions on Prasanna's blog</title>
    <link>/tags/sessions/</link>
    <description>Recent content in Sessions on Prasanna's blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sat, 06 May 2017 10:00:58 +0530</lastBuildDate>

	<atom:link href="/tags/sessions/index.xml" rel="self" type="application/rss+xml" />

    <item>
      <title>Pitfalls in session management</title>
      <link>/2017/05/pitfalls-in-session-management/</link>
      <pubDate>Sat, 06 May 2017 10:00:58 +0530</pubDate>

      <guid>/2017/05/pitfalls-in-session-management/</guid>
      <description>This is a quick post that talks about the usage of sessions in web applications. Sessions is not a new topic for those who&rsquo;ve used the basic web applications that require a login. Sessions are necessary to overcome the stateless nature of HTTP. They do this by utilising the cookie mechanism of most modern web browsers.
A Sessions Analogy In simple terms, a session is used to identify and resume conversation with the service where one left off previously.</description>
    </item>

  </channel>
</rss>


text:
package com.baidu.aip.bodyanalysis;

public class BodyAnalysisConsts {

    static final String BODY_ANALYSIS = "https://aip.baidubce.com/rest/2.0/image-classify/v1/body_analysis";

    static final String BODY_ATTR = "https://aip.baidubce.com/rest/2.0/image-classify/v1/body_attr";

    static final String BODY_NUM = "https://aip.baidubce.com/rest/2.0/image-classify/v1/body_num";

    static final String GESTURE = "https://aip.baidubce.com/rest/2.0/image-classify/v1/gesture";

    static final String BODY_SEG = "https://aip.baidubce.com/rest/2.0/image-classify/v1/body_seg";

    static final String DRIVER_BEHAVIOR = "https://aip.baidubce.com/rest/2.0/image-classify/v1/driver_behavior";

    static final String BODY_TRACKING = "https://aip.baidubce.com/rest/2.0/image-classify/v1/body_tracking";

}


text:
module DropboxApi::Errors
  class ListFolderError < BasicError
    ErrorSubtypes = {
      :path => LookupError
    }.freeze
  end
end


text:
// Copyright 2015 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.

package org.chromium.chrome.browser.sync;

import android.accounts.Account;
import android.content.Context;

import org.chromium.base.ThreadUtils;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.identity.UniqueIdentificationGenerator;
import org.chromium.chrome.browser.identity.UniqueIdentificationGeneratorFactory;
import org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator;
import org.chromium.chrome.browser.signin.SigninManager;
import org.chromium.chrome.test.ChromeActivityTestCaseBase;
import org.chromium.chrome.test.util.browser.signin.SigninTestUtil;
import org.chromium.chrome.test.util.browser.sync.SyncTestUtil;
import org.chromium.sync.AndroidSyncSettings;
import org.chromium.sync.ModelType;
import org.chromium.sync.test.util.MockSyncContentResolverDelegate;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * Base class for common functionality between sync tests.
 */
public class SyncTestBase extends ChromeActivityTestCaseBase<ChromeActivity> {
    private static final String TAG = "SyncTestBase";

    private static final String CLIENT_ID = "Client_ID";

    private static final Set<Integer> USER_SELECTABLE_TYPES =
            new HashSet<Integer>(Arrays.asList(new Integer[] {
                ModelType.AUTOFILL,
                ModelType.BOOKMARKS,
                ModelType.PASSWORDS,
                ModelType.PREFERENCES,
                ModelType.PROXY_TABS,
                ModelType.TYPED_URLS,
            }));

    protected Context mContext;
    protected SyncController mSyncController;
    protected FakeServerHelper mFakeServerHelper;
    protected ProfileSyncService mProfileSyncService;
    protected MockSyncContentResolverDelegate mSyncContentResolver;

    public SyncTestBase() {
      super(ChromeActivity.class);
    }

    @Override
    public void startMainActivity() throws InterruptedException {
        // Start the activity by opening about:blank. This URL is ideal because it is not synced as
        // a typed URL. If another URL is used, it could interfere with test data.
        startMainActivityOnBlankPage();
    }

    @Override
    protected void setUp() throws Exception {
        // This must be called before super.setUp() in order for test authentication to work.
        SigninTestUtil.setUpAuthForTest(getInstrumentation());

        super.setUp();
        mContext = getInstrumentation().getTargetContext();

        setUpMockAndroidSyncSettings();

        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                mSyncController = SyncController.get(mContext);
                // Ensure SyncController is registered with the new AndroidSyncSettings.
                AndroidSyncSettings.registerObserver(mContext, mSyncController);
                mFakeServerHelper = FakeServerHelper.get();
            }
        });
        FakeServerHelper.useFakeServer(mContext);
        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                mProfileSyncService = ProfileSyncService.get();
            }
        });

        UniqueIdentificationGeneratorFactory.registerGenerator(
                UuidBasedUniqueIdentificationGenerator.GENERATOR_ID,
                new UniqueIdentificationGenerator() {
                    @Override
                    public String getUniqueId(String salt) {
                        return CLIENT_ID;
                    }
                }, true);
    }

    @Override
    protected void tearDown() throws Exception {
        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                mSyncController.stop();
                FakeServerHelper.deleteFakeServer();
            }
        });
        SigninTestUtil.get().resetSigninState();

        super.tearDown();
    }

    private void setUpMockAndroidSyncSettings() {
        mSyncContentResolver = new MockSyncContentResolverDelegate();
        mSyncContentResolver.setMasterSyncAutomatically(true);
        AndroidSyncSettings.overrideForTests(mContext, mSyncContentResolver);
    }

    protected Account setUpTestAccount() throws InterruptedException {
        Account account = SigninTestUtil.get().addAndSignInTestAccount();
        SyncTestUtil.verifySyncIsSignedOut(getActivity());
        return account;
    }

    protected Account setUpTestAccountAndSignInToSync() throws InterruptedException {
        Account account = setUpTestAccount();
        signIn(account);
        SyncTestUtil.verifySyncIsActiveForAccount(mContext, account);
        assertTrue("Sync everything should be enabled",
                SyncTestUtil.isSyncEverythingEnabled(mContext));
        return account;
    }

    protected void startSync() throws InterruptedException {
        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                SyncController.get(mContext).start();
            }
        });
        SyncTestUtil.waitForSyncActive(mContext);
    }

    protected void stopSync() {
        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                SyncController.get(mContext).stop();
            }
        });
        getInstrumentation().waitForIdleSync();
    }

    protected void signIn(final Account account) {
        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                mSyncController.signIn(getActivity(), account.name);
            }
        });
    }

    protected void signOut() throws InterruptedException {
        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                SigninManager.get(mContext).signOut(getActivity(), null);
            }
        });
    }

    protected void disableDataType(final int modelType) {
        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                Set<Integer> preferredTypes = mProfileSyncService.getPreferredDataTypes();
                preferredTypes.retainAll(USER_SELECTABLE_TYPES);
                preferredTypes.remove(modelType);
                mProfileSyncService.setPreferredDataTypes(false, preferredTypes);
            }
        });
    }
}


text:
/*globals qq*/
/**
 * Defines the public API for non-traditional FineUploaderBasic mode.
 */
(function(){
    "use strict";

    qq.nonTraditionalBasePublicApi = {
        setUploadSuccessParams: function(params, id) {
            this._uploadSuccessParamsStore.set(params, id);
        }
    };

    qq.nonTraditionalBasePrivateApi = {
        /**
         * When the upload has completed, if it is successful, send a request to the `successEndpoint` (if defined).
         * This will hold up the call to the `onComplete` callback until we have determined success of the upload
         * according to the local server, if a `successEndpoint` has been defined by the integrator.
         *
         * @param id ID of the completed upload
         * @param name Name of the associated item
         * @param result Object created from the server's parsed JSON response.
         * @param xhr Associated XmlHttpRequest, if this was used to send the request.
         * @returns {boolean || qq.Promise} true/false if success can be determined immediately, otherwise a `qq.Promise`
         * if we need to ask the server.
         * @private
         */
        _onComplete: function(id, name, result, xhr) {
            var success = result.success ? true : false,
                self = this,
                onCompleteArgs = arguments,
                successEndpoint = this._options.uploadSuccess.endpoint,
                successCustomHeaders = this._options.uploadSuccess.customHeaders,
                cors = this._options.cors,
                promise = new qq.Promise(),
                uploadSuccessParams = this._uploadSuccessParamsStore.get(id),

                // If we are waiting for confirmation from the local server, and have received it,
                // include properties from the local server response in the `response` parameter
                // sent to the `onComplete` callback, delegate to the parent `_onComplete`, and
                // fulfill the associated promise.
                onSuccessFromServer = function(successRequestResult) {
                    delete self._failedSuccessRequestCallbacks[id];
                    qq.extend(result, successRequestResult);
                    qq.FineUploaderBasic.prototype._onComplete.apply(self, onCompleteArgs);
                    promise.success(successRequestResult);
                },

                // If the upload success request fails, attempt to re-send the success request (via the core retry code).
                // The entire upload may be restarted if the server returns a "reset" property with a value of true as well.
                onFailureFromServer = function(successRequestResult) {
                    var callback = submitSuccessRequest;

                    qq.extend(result, successRequestResult);

                    if (result && result.reset) {
                        callback = null;
                    }

                    if (!callback) {
                        delete self._failedSuccessRequestCallbacks[id];
                    }
                    else {
                        self._failedSuccessRequestCallbacks[id] = callback;
                    }

                    if (!self._onAutoRetry(id, name, result, xhr, callback)) {
                        qq.FineUploaderBasic.prototype._onComplete.apply(self, onCompleteArgs);
                        promise.failure(successRequestResult);
                    }
                },
                submitSuccessRequest,
                successAjaxRequester;

            // Ask the local server if the file sent is ok.
            if (success && successEndpoint) {
                successAjaxRequester = new qq.UploadSuccessAjaxRequester({
                    endpoint: successEndpoint,
                    customHeaders: successCustomHeaders,
                    cors: cors,
                    log: qq.bind(this.log, this)
                });

                // combine custom params and default params
                qq.extend(uploadSuccessParams, self._getEndpointSpecificParams(id, result, xhr), true);

                submitSuccessRequest = qq.bind(function() {
                    successAjaxRequester.sendSuccessRequest(id, uploadSuccessParams)
                        .then(onSuccessFromServer, onFailureFromServer);
                }, self);

                submitSuccessRequest();

                return promise;
            }

            // If we are not asking the local server about the file, just delegate to the parent `_onComplete`.
            return qq.FineUploaderBasic.prototype._onComplete.apply(this, arguments);
        },

        // If the failure occurred on an upload success request (and a reset was not ordered), try to resend that instead.
        _manualRetry: function(id) {
            var successRequestCallback = this._failedSuccessRequestCallbacks[id];

            return qq.FineUploaderBasic.prototype._manualRetry.call(this, id, successRequestCallback);
        }
    };
}());


text:
<?php

require_once 'PHPUnit2/Framework/Test.php';
require_once 'PHPUnit2/Util/Filter.php';

require_once 'phing/tasks/ext/phpunit2/PHPUnit2ResultFormatter.php';

/**
 * Prints plain text output of the test to a specified Writer.
 *
 * @author Michiel Rook <michiel.rook@gmail.com>
 * @version $Id$
 * @package phing.tasks.ext.phpunit2
 * @since 2.1.0
 */
class PlainPHPUnit2ResultFormatter extends PHPUnit2ResultFormatter
{
	private $inner = "";

	function getExtension()
	{
		return ".txt";
	}

	function getPreferredOutfile()
	{
		return "testresults";
	}

	function startTestSuite(PHPUnit2_Framework_TestSuite $suite)
	{
		parent::startTestSuite($suite);

		$this->inner = "";
	}

	function endTestSuite(PHPUnit2_Framework_TestSuite $suite)
	{
		parent::endTestSuite($suite);

		$sb = "Testsuite: " . $suite->getName() . "\n";
		$sb.= "Tests run: " . $this->getRunCount();
		$sb.= ", Failures: " . $this->getFailureCount();
		$sb.= ", Errors: " . $this->getErrorCount();
		$sb.= ", Time elapsed: " . $this->getElapsedTime();
		$sb.= " sec\n";

		if ($this->out != NULL)
		{
			$this->out->write($sb);
			$this->out->write($this->inner);
		}
	}

	function addError(PHPUnit2_Framework_Test $test, Exception $e)
	{
		parent::addError($test, $e);

		$this->formatError("ERROR", $test, $e);
	}

	function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $t)
	{
		parent::addFailure($test, $t);

		$this->formatError("FAILED", $test, $t);
	}

	function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e)
	{
		parent::addIncompleteTest($test, $e);

		$this->formatError("INCOMPLETE", $test, $e);
	}

	private function formatError($type, PHPUnit2_Framework_Test $test, Exception $e)
	{
		if ($test != null)
		{
			$this->endTest($test);
		}

		$this->inner.= $test->getName() . " " . $type . "\n";
		$this->inner.= $e->getMessage() . "\n";
		$this->inner.= PHPUnit2_Util_Filter::getFilteredStackTrace($e) . "\n";
	}

	function endTestRun()
	{
		parent::endTestRun();

		if ($this->out != NULL)
		{
			$this->out->close();
		}
	}
}
?>


text:
package controller

import (
	"errors"
	"fmt"
	"strconv"
	"time"

	"github.com/golang/glog"

	"k8s.io/api/core/v1"
	kapierrors "k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
	"k8s.io/apimachinery/pkg/util/sets"
	informers "k8s.io/client-go/informers/core/v1"
	kcoreclient "k8s.io/client-go/kubernetes/typed/core/v1"
	listers "k8s.io/client-go/listers/core/v1"

	ocontroller "github.com/openshift/library-go/pkg/controller"
	"github.com/openshift/library-go/pkg/crypto"
	"github.com/openshift/service-serving-cert-signer/pkg/boilerplate/controller"
	"github.com/openshift/service-serving-cert-signer/pkg/controller/api"
	"github.com/openshift/service-serving-cert-signer/pkg/controller/servingcert/cryptoextensions"
)

type serviceServingCertController struct {
	serviceClient kcoreclient.ServicesGetter
	secretClient  kcoreclient.SecretsGetter

	serviceLister listers.ServiceLister
	secretLister  listers.SecretLister

	ca         *crypto.CA
	dnsSuffix  string
	maxRetries int

	// standard controller loop
	// services that need to be checked
	controller.Runner

	// syncHandler does the work. It's factored out for unit testing
	syncHandler controller.SyncFunc
}

func NewServiceServingCertController(services informers.ServiceInformer, secrets informers.SecretInformer, serviceClient kcoreclient.ServicesGetter, secretClient kcoreclient.SecretsGetter, ca *crypto.CA, dnsSuffix string) controller.Runner {
	sc := &serviceServingCertController{
		serviceClient: serviceClient,
		secretClient:  secretClient,

		serviceLister: services.Lister(),
		secretLister:  secrets.Lister(),

		ca:         ca,
		dnsSuffix:  dnsSuffix,
		maxRetries: 10,
	}

	sc.syncHandler = sc.syncService

	sc.Runner = controller.New("ServiceServingCertController", sc,
		controller.WithInformer(services, controller.FilterFuncs{
			AddFunc: func(obj metav1.Object) bool {
				return true // TODO we should filter these based on annotations
			},
			UpdateFunc: func(oldObj, newObj metav1.Object) bool {
				return true // TODO we should filter these based on annotations
			},
			// TODO we may want to best effort handle deletes and clean up the secrets
		}),
		controller.WithInformer(secrets, controller.FilterFuncs{
			ParentFunc: func(obj metav1.Object) (namespace, name string) {
				secret := obj.(*v1.Secret)
				serviceName, _ := toServiceName(secret)
				return secret.Namespace, serviceName
			},
			DeleteFunc: sc.deleteSecret,
		}),
	)

	return sc
}

// deleteSecret handles the case when the service certificate secret is manually removed.
// In that case the secret will be automatically recreated.
func (sc *serviceServingCertController) deleteSecret(obj metav1.Object) bool {
	secret := obj.(*v1.Secret)
	serviceName, ok := toServiceName(secret)
	if !ok {
		return false
	}
	service, err := sc.serviceLister.Services(secret.Namespace).Get(serviceName)
	if kapierrors.IsNotFound(err) {
		return false
	}
	if err != nil {
		utilruntime.HandleError(fmt.Errorf("unable to get service %s/%s: %v", secret.Namespace, serviceName, err))
		return false
	}
	glog.V(4).Infof("recreating secret for service %s/%s", service.Namespace, service.Name)
	return true
}

func (sc *serviceServingCertController) Key(namespace, name string) (metav1.Object, error) {
	return sc.serviceLister.Services(namespace).Get(name)
}

func (sc *serviceServingCertController) Sync(obj metav1.Object) error {
	// need another layer of indirection so that tests can stub out syncHandler
	return sc.syncHandler(obj)
}

func (sc *serviceServingCertController) syncService(obj metav1.Object) error {
	sharedService := obj.(*v1.Service)

	if !sc.requiresCertGeneration(sharedService) {
		return nil
	}

	// make a copy to avoid mutating cache state
	serviceCopy := sharedService.DeepCopy()
	return sc.generateCert(serviceCopy)
}

func (sc *serviceServingCertController) generateCert(serviceCopy *v1.Service) error {
	if serviceCopy.Annotations == nil {
		serviceCopy.Annotations = map[string]string{}
	}

	secret := toBaseSecret(serviceCopy)
	if err := toRequiredSecret(sc.dnsSuffix, sc.ca, serviceCopy, secret); err != nil {
		return err
	}

	_, err := sc.secretClient.Secrets(serviceCopy.Namespace).Create(secret)
	if err != nil && !kapierrors.IsAlreadyExists(err) {
		// if we have an error creating the secret, then try to update the service with that information.  If it fails,
		// then we'll just try again later on re-list or because the service had already been updated and we'll get triggered again.
		serviceCopy.Annotations[api.ServingCertErrorAnnotation] = err.Error()
		serviceCopy.Annotations[api.ServingCertErrorNumAnnotation] = strconv.Itoa(getNumFailures(serviceCopy) + 1)
		_, updateErr := sc.serviceClient.Services(serviceCopy.Namespace).Update(serviceCopy)

		// if we're past the max retries and we successfully updated, then the sync loop successfully handled this service and we want to forget it
		if updateErr == nil && getNumFailures(serviceCopy) >= sc.maxRetries {
			return nil
		}
		return err
	}
	if kapierrors.IsAlreadyExists(err) {
		actualSecret, err := sc.secretClient.Secrets(serviceCopy.Namespace).Get(secret.Name, metav1.GetOptions{})
		if err != nil {
			// if we have an error creating the secret, then try to update the service with that information.  If it fails,
			// then we'll just try again later on  re-list or because the service had already been updated and we'll get triggered again.
			serviceCopy.Annotations[api.ServingCertErrorAnnotation] = err.Error()
			serviceCopy.Annotations[api.ServingCertErrorNumAnnotation] = strconv.Itoa(getNumFailures(serviceCopy) + 1)
			_, updateErr := sc.serviceClient.Services(serviceCopy.Namespace).Update(serviceCopy)

			// if we're past the max retries and we successfully updated, then the sync loop successfully handled this service and we want to forget it
			if updateErr == nil && getNumFailures(serviceCopy) >= sc.maxRetries {
				return nil
			}
			return err
		}

		if actualSecret.Annotations[api.ServiceUIDAnnotation] != string(serviceCopy.UID) {
			serviceCopy.Annotations[api.ServingCertErrorAnnotation] = fmt.Sprintf("secret/%v references serviceUID %v, which does not match %v", actualSecret.Name, actualSecret.Annotations[api.ServiceUIDAnnotation], serviceCopy.UID)
			serviceCopy.Annotations[api.ServingCertErrorNumAnnotation] = strconv.Itoa(getNumFailures(serviceCopy) + 1)
			_, updateErr := sc.serviceClient.Services(serviceCopy.Namespace).Update(serviceCopy)

			// if we're past the max retries and we successfully updated, then the sync loop successfully handled this service and we want to forget it
			if updateErr == nil && getNumFailures(serviceCopy) >= sc.maxRetries {
				return nil
			}
			return errors.New(serviceCopy.Annotations[api.ServingCertErrorAnnotation])
		}
	}

	serviceCopy.Annotations[api.ServingCertCreatedByAnnotation] = sc.commonName()
	delete(serviceCopy.Annotations, api.ServingCertErrorAnnotation)
	delete(serviceCopy.Annotations, api.ServingCertErrorNumAnnotation)
	_, err = sc.serviceClient.Services(serviceCopy.Namespace).Update(serviceCopy)

	return err
}

func getNumFailures(service *v1.Service) int {
	numFailuresString := service.Annotations[api.ServingCertErrorNumAnnotation]
	if len(numFailuresString) == 0 {
		return 0
	}

	numFailures, err := strconv.Atoi(numFailuresString)
	if err != nil {
		return 0
	}

	return numFailures
}

func (sc *serviceServingCertController) requiresCertGeneration(service *v1.Service) bool {
	// check the secret since it could not have been created yet
	secretName := service.Annotations[api.ServingCertSecretAnnotation]
	if len(secretName) == 0 {
		return false
	}
	_, err := sc.secretLister.Secrets(service.Namespace).Get(secretName)
	if kapierrors.IsNotFound(err) {
		// we have not created the secret yet
		return true
	}
	if err != nil {
		utilruntime.HandleError(fmt.Errorf("unable to get the secret %s/%s: %v", service.Namespace, secretName, err))
		return false
	}

	// check to see if the service was updated by us
	if service.Annotations[api.ServingCertCreatedByAnnotation] == sc.commonName() {
		return false
	}
	// we have failed too many times on this service, give up
	if getNumFailures(service) >= sc.maxRetries {
		return false
	}

	// the secret exists but the service was either not updated to include the correct created
	// by annotation or it does not match what we expect (i.e. the certificate has been rotated)
	return true
}

func (sc *serviceServingCertController) commonName() string {
	return sc.ca.Config.Certs[0].Subject.CommonName
}

func ownerRef(service *v1.Service) metav1.OwnerReference {
	return metav1.OwnerReference{
		APIVersion: "v1",
		Kind:       "Service",
		Name:       service.Name,
		UID:        service.UID,
	}
}

func toBaseSecret(service *v1.Service) *v1.Secret {
	return &v1.Secret{
		ObjectMeta: metav1.ObjectMeta{
			Name:      service.Annotations[api.ServingCertSecretAnnotation],
			Namespace: service.Namespace,
			Annotations: map[string]string{
				api.ServiceUIDAnnotation:  string(service.UID),
				api.ServiceNameAnnotation: service.Name,
			},
		},
		Type: v1.SecretTypeTLS,
	}
}

func toRequiredSecret(dnsSuffix string, ca *crypto.CA, service *v1.Service, secretCopy *v1.Secret) error {
	dnsName := service.Name + "." + service.Namespace + ".svc"
	fqDNSName := dnsName + "." + dnsSuffix
	certificateLifetime := 365 * 2 // 2 years
	servingCert, err := ca.MakeServerCert(
		sets.NewString(dnsName, fqDNSName),
		certificateLifetime,
		cryptoextensions.ServiceServerCertificateExtensionV1(service),
	)
	if err != nil {
		return err
	}
	certBytes, keyBytes, err := servingCert.GetPEMBytes()
	if err != nil {
		return err
	}

	if secretCopy.Annotations == nil {
		secretCopy.Annotations = map[string]string{}
	}
	if secretCopy.Data == nil {
		secretCopy.Data = map[string][]byte{}
	}

	secretCopy.Annotations[api.ServingCertExpiryAnnotation] = servingCert.Certs[0].NotAfter.Format(time.RFC3339)
	secretCopy.Data[v1.TLSCertKey] = certBytes
	secretCopy.Data[v1.TLSPrivateKeyKey] = keyBytes

	ocontroller.EnsureOwnerRef(secretCopy, ownerRef(service))

	return nil
}


text:
import Ember from 'ember';
import ResetScroll from '../../mixins/reset-scroll';

export default Ember.Route.extend(ResetScroll, {

  actions: {
    removeMember: function(problem, member) {
      var adapter = this.store.adapterFor('problem');
      var data = {};
      data[member] = {"__op":"Delete"};
      adapter.ajax("https://api.parse.com/1/classes/Problem/" + problem.id, 'PUT', {
        data: data
      }).then(function(){
        problem.set(member, null);
      });
    },

    updateProgress: function(problem) {
      problem.save();
      this.transitionTo('problems.show', problem.id);
    },

    markComplete: function(problem) {
      problem.set('isComplete', true);
      problem.set('progress', 100);
      problem.save();
      this.transitionTo('problems.show', problem.id);
    }
  }

});


text:
require_relative 'lib/pig/latin.rb'

class TerminalClient
  def start
    puts "Hello, I speak igpay atinlay!"
    puts "Type any english sentence to translate to Pig Latin:"
    keep_going = true

    while keep_going
      print ">> "
      userInput = gets.chomp
      puts Pig::Latin.translate(userInput)
    end

  end
end


text:
/* Blue Colors Stylesheet */

/*-------------------------------------------------------------------------------------------*/
/* 1. SETUP */
/*-------------------------------------------------------------------------------------------*/

/* 1.1 Defaults */

body  { background: #fff url(blue/bodytile.jpg) repeat left top; }

/* 1.2 Hyperlinks */

a:link, a:visited  { color: #17517b; }
a:hover  {}

/*-------------------------------------------------------------------------------------------*/
/* 2. SITE STRUCTURE & APPEARANCE */
/*-------------------------------------------------------------------------------------------*/

/* 2.1 Containers & Columns */

/* 2.2 Navigation */

/* 2.2.1 Drop-down menus */

/* CATEGORY NAVIGATION */

/* PAGES NAVIGATION */
#pagenav a  { border-bottom: 4px solid #9fcef1; }
#pagenav li.current_page_item a, #pagenav li.current-menu-item a, #pagenav li.current-menu-ancestor a, #pagenav li a:hover  { border-color: #17517b;  }
#pagenav li ul  { border-top: 1px solid #9fcef1; }
#pagenav li ul li  { border-color: #9fcef1; }
#pagenav li ul a:hover  { color: #fff!important; background: #17517b;  }
#pagenav li.rss a  { color: #17517b; background: url(blue/ico-rss.png) no-repeat right 4px; }

/* 2.3 Header */

/* 2.4 Content */

/* 2.5 Sidebar */

/* 2.6 Extended Footer */
#extended-footer  { background-color: #9fcef1; }
.one, .two  { border-color: #7ebdec; }

/* 2.7 Footer */

/*-------------------------------------------------------------------------------------------*/
/* 3. POSTS */
/*-------------------------------------------------------------------------------------------*/

.post .date  { background: url(blue/date.png) no-repeat left top; }

.post-meta li .body a:hover, .navigation a:hover  { color: #17517b; }

/* 3.1 Typographic Elements */

/* 3.2 Images */
.post img.attachment-post-thumbnail  { border: 5px solid #9fcef1; }
.entry img  { border: 5px solid #9fcef1; }

/* 3.3 Pagination / WP-Pagenavi */

.more_entries .wp-pagenavi a:link,
.more_entries .wp-pagenavi a:visited { color: #17517b; }
.more_entries .wp-pagenavi .current,
.more_entries .wp-pagenavi .on,
.more_entries .wp-pagenavi a:hover { background: #9fcef1 !important; color: #17517b; }

/*-------------------------------------------------------------------------------------------*/
/* 4. WIDGETS */
/*-------------------------------------------------------------------------------------------*/

/* 4.1 Generic Widgets */
.widget h3  { border-bottom: 1px solid #17517b; }

.widget ul li a:link, .widget ul li a:visited { background: url(blue/bullet.png) no-repeat 10px 12px; border-bottom: 1px solid #9fcef1; }
.widget ul li a:hover  { color: #17517b; background: url(blue/bullet_hover.png) no-repeat 10px 12px; font-weight: bold; }

.widget_recent_comments li, .widget_twitter li  { border-bottom: 1px solid #9fcef1; } /* RESET LI STYLING FOR RECENT COMMENT & TWITTER */
.widget_recent_comments li a, .widget_twitter a  { color: #17517b!important; } /* RESET <A> STYLING FOR RECENT COMMENT & TWITTER */

/* RESET FOR CATEGORIES WITH COUNT and HEIRARCHY */
#container .widget_categories li  { background: url(blue/bullet.png) no-repeat 10px 12px; border-bottom: 1px solid #9fcef1; }
#container .widget_categories li:hover  { background: url(blue/bullet_hover.png) no-repeat 10px 12px; }

/* 4.2 Specific Widgets */

/* FEATURED POSTS */

.widget-bueno-featured li  { border-bottom: 1px solid #9fcef1; }
.widget-bueno-featured span.thumb img  { border: 5px solid #9fcef1; }
.widget-bueno-featured span.thumb img:hover  { border-color: #17517b; }

/* WIDGET FORMS */
input#s, input.field  { border: 1px solid #9fcef1; }
input#s:focus, input.field:focus  { border: 1px solid #17517b; }
input.submit  { background-color: #17517b; }

/* FLICKR */
#flickr a img  { border: #9fcef1 3px solid;}
#flickr a:hover img  { border:#17517b 3px solid; }

/* LIFESTREAM */
.widget_lifestream ul li  { border-bottom: 1px solid #9fcef1; }

/* TEXT WIDGET */

/* CALENDAR */
#wp-calendar th,#wp-calendar td{background:#9fcef1;}
#wp-calendar th  { color: #17517b; }

/* ADS */
#sidebar .ads125 { border: 1px solid #9fcef1; }

/* 4.3 Extended Footer Widgets */

/*-------------------------------------------------------------------------------------------*/
/* 5. COMMENTS */
/*-------------------------------------------------------------------------------------------*/

/* 5.1 Comments */

/* 5.2 Pingbacks / Trackbacks */

/* 5.3 Comments Form */
#commentform #submit  { background-color: #17517b; }


text:
#import "WXEditComponent.h"
#import "WXConvert.h"
#import "WXUtility.h"
#import "WXSDKInstance.h"
#import "WXSDKInstance_private.h"
#import "WXDefine.h"
#import "WXAssert.h"
#import "WXComponent_internal.h"
#import "WXComponent+PseudoClassManagement.h"

@interface WXEditComponent()

//@property (nonatomic, strong) WXTextInputView *inputView;
@property (nonatomic, strong) WXDatePickerManager *datePickerManager;
@property (nonatomic, strong) NSDictionary *attr;
//attribute
@property (nonatomic) NSNumber *maxLength;
@property (nonatomic) NSString * value;
@property (nonatomic) BOOL autofocus;
@property(nonatomic) UIReturnKeyType returnKeyType;
@property (nonatomic) BOOL disabled;
@property (nonatomic, copy) NSString *inputType;
@property (nonatomic) NSUInteger rows;

//style
@property (nonatomic) WXPixelType fontSize;
@property (nonatomic) WXTextStyle fontStyle;
@property (nonatomic) CGFloat fontWeight;
@property (nonatomic, strong) NSString *fontFamily;
@property (nonatomic, strong) UIColor *colorForStyle;
@property (nonatomic)NSTextAlignment textAlignForStyle;

//event
@property (nonatomic) BOOL inputEvent;
@property (nonatomic) BOOL clickEvent;
@property (nonatomic) BOOL focusEvent;
@property (nonatomic) BOOL blurEvent;
@property (nonatomic) BOOL changeEvent;
@property (nonatomic) BOOL returnEvent;
@property (nonatomic) BOOL keyboardEvent;
@property (nonatomic, strong) NSString *changeEventString;
@property (nonatomic, assign) CGSize keyboardSize;

@end

@implementation WXEditComponent
{
    UIEdgeInsets _border;
    UIEdgeInsets _padding;
}

WX_EXPORT_METHOD(@selector(focus))
WX_EXPORT_METHOD(@selector(blur))
WX_EXPORT_METHOD(@selector(setSelectionRange:selectionEnd:))
WX_EXPORT_METHOD(@selector(getSelectionRange:))

- (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance
{
    self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance];
    if (self) {
        _inputEvent = NO;
        _focusEvent = NO;
        _blurEvent = NO;
        _changeEvent = NO;
        _returnEvent = NO;
        _clickEvent = NO;
        _keyboardEvent = NO;
        // handle attributes
        _autofocus = [attributes[@"autofocus"] boolValue];
        _disabled = [attributes[@"disabled"] boolValue];
        _value = [WXConvert NSString:attributes[@"value"]]?:@"";
        _placeholderString = [WXConvert NSString:attributes[@"placeholder"]]?:@"";
        if(attributes[@"type"]) {
            _inputType = [WXConvert NSString:attributes[@"type"]];
            _attr = attributes;
        }
        if (attributes[@"maxlength"]) {
            _maxLength = [NSNumber numberWithUnsignedInteger:[attributes[@"maxlength"] integerValue]];
        }
        if (attributes[@"returnKeyType"]) {
            _returnKeyType = [WXConvert UIReturnKeyType:attributes[@"returnKeyType"]];
        }
        if (attributes[@"rows"]) {
            _rows = [attributes[@"rows"] integerValue];
        } else {
            _rows = 2;
        }

        // handle styles
        if (styles[@"color"]) {
            _colorForStyle = [WXConvert UIColor:styles[@"color"]];
        }
        if (styles[@"fontSize"]) {
            _fontSize = [WXConvert WXPixelType:styles[@"fontSize"] scaleFactor:self.weexInstance.pixelScaleFactor];
        }
        if (styles[@"fontWeight"]) {
            _fontWeight = [WXConvert WXTextWeight:styles[@"fontWeight"]];
        }
        if (styles[@"fontStyle"]) {
            _fontStyle = [WXConvert WXTextStyle:styles[@"fontStyle"]];
        }
        if (styles[@"fontFamily"]) {
            _fontFamily = styles[@"fontFamily"];
        }
        if (styles[@"textAlign"]) {
            _textAlignForStyle = [WXConvert NSTextAlignment:styles[@"textAlign"]];
        }
        if (styles[@"placeholderColor"]) {
            _placeholderColor = [WXConvert UIColor:styles[@"placeholderColor"]];
        }else {
            _placeholderColor = [UIColor colorWithRed:0x99/255.0 green:0x99/255.0 blue:0x99/255.0 alpha:1.0];
        }
    }

    return self;
}

#pragma mark - lifeCircle

- (void)viewDidLoad
{
    UIView * view = self.view;
    if ([view isKindOfClass:[UITextField class]]){
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFiledEditChanged:)
                                                     name:UITextFieldTextDidChangeNotification
                                                   object:view];
    }
    _padding = UIEdgeInsetsZero;
    _border = UIEdgeInsetsZero;
    self.userInteractionEnabled = YES;
    [self setType];
    [self setAutofocus:_autofocus];
    [self setTextFont];
    [self setPlaceholderAttributedString];
    [self setTextAlignment:_textAlignForStyle];
    [self setTextColor:_colorForStyle];
    [self setText:_value];
    [self setEnabled:!_disabled];
    [self setRows:_rows];
    [self setReturnKeyType:_returnKeyType];
    [self updatePattern];

    UIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(closeKeyboard)];
    UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
    UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 0, 44)];
    toolbar.items = [NSArray arrayWithObjects:space, barButton, nil];

    self.inputAccessoryView = toolbar;
    [self handlePseudoClass];
}

- (void)viewWillLoad
{
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(keyboardWasShown:)
                                                 name:UIKeyboardWillShowNotification
                                               object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(keyboardWillHide:)
                                                 name:UIKeyboardWillHideNotification
                                               object:nil];
}

- (void)dealloc
{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

-(void)focus
{
    if(self.view) {
        [self.view becomeFirstResponder];
    }
}

-(void)blur
{
    if(self.view) {
        [self.view resignFirstResponder];
    }
}

-(void)setSelectionRange:(NSInteger)selectionStart selectionEnd:(NSInteger)selectionEnd
{
    if(selectionStart>self.text.length || selectionEnd>self.text.length) {
        return;
    }
    [self.view becomeFirstResponder];
    [self setEditSelectionRange:selectionStart selectionEnd:selectionEnd];
}

-(void)getSelectionRange:(WXCallback)callback
{
    NSDictionary *res = [self getEditSelectionRange];
    if(callback) {
        callback(res);
    }
}

#pragma mark - Overwrite Method
-(NSString *)text
{
    return @"";
}

- (void)setText:(NSString *)text
{
}

-(void)setTextColor:(UIColor *)color
{
}

-(void)setTextAlignment:(NSTextAlignment)textAlignForStyle
{
}

-(void)setUserInteractionEnabled:(BOOL)userInteractionEnabled
{
}

-(void)setEnabled:(BOOL)enabled
{
}

-(void)setReturnKeyType:(UIReturnKeyType)returnKeyType
{
}

-(void)setInputAccessoryView:(UIView *)inputAccessoryView
{
}

-(void)setEditSelectionRange:(NSInteger)selectionStart selectionEnd:(NSInteger)selectionEnd
{
}

-(NSDictionary *)getEditSelectionRange
{
    return @{};
}

-(void)setKeyboardType:(UIKeyboardType)keyboardType
{
}

-(void)setSecureTextEntry:(BOOL)secureTextEntry
{
}

-(void)setEditPadding:(UIEdgeInsets)padding
{
}

-(void)setEditBorder:(UIEdgeInsets)border
{
}

-(void)setAttributedPlaceholder:(NSMutableAttributedString *)attributedString font:(UIFont *)font
{
}

-(void)setFont:(UIFont *)font
{
}

-(void)setRows:(NSUInteger)rows
{
}

#pragma mark - Add Event
- (void)addEvent:(NSString *)eventName
{
    if ([eventName isEqualToString:@"input"]) {
        _inputEvent = YES;
    }
    if ([eventName isEqualToString:@"focus"]) {
        _focusEvent = YES;
    }
    if ([eventName isEqualToString:@"blur"]) {
        _blurEvent = YES;
    }
    if ([eventName isEqualToString:@"change"]) {
        _changeEvent = YES;
    }
    if ([eventName isEqualToString:@"return"]) {
        _returnEvent = YES;
    }
    if ([eventName isEqualToString:@"click"]) {
        _clickEvent = YES;
    }
    if ([eventName isEqualToString:@"keyboard"]) {
        _keyboardEvent = YES;
    }
}

#pragma Remove Event

-(void)removeEvent:(NSString *)eventName
{
    if ([eventName isEqualToString:@"input"]) {
        _inputEvent = NO;
    }
    if ([eventName isEqualToString:@"focus"]) {
        _focusEvent = NO;
    }
    if ([eventName isEqualToString:@"blur"]) {
        _blurEvent = NO;
    }
    if ([eventName isEqualToString:@"change"]) {
        _changeEvent = NO;
    }
    if ([eventName isEqualToString:@"return"]) {
        _returnEvent = NO;
    }
    if ([eventName isEqualToString:@"click"]) {
        _clickEvent = NO;
    }
    if ([eventName isEqualToString:@"keyboard"]) {
        _keyboardEvent = NO;
    }
}

#pragma mark - upate attributes

- (void)updateAttributes:(NSDictionary *)attributes
{
    _attr = attributes;
    if (attributes[@"type"]) {
        _inputType = [WXConvert NSString:attributes[@"type"]];
        [self setType];
    }
    if (attributes[@"autofocus"]) {
        self.autofocus = [attributes[@"autofocus"] boolValue];
    }
    if (attributes[@"disabled"]) {
        _disabled = [attributes[@"disabled"] boolValue];
        [self setEnabled:!_disabled];
    }
    if (attributes[@"maxlength"]) {
        _maxLength = [NSNumber numberWithInteger:[attributes[@"maxlength"] integerValue]];
    }
    if (attributes[@"placeholder"]) {
        _placeholderString = [WXConvert NSString:attributes[@"placeholder"]]?:@"";
        [self setPlaceholderAttributedString];
    }
    if (attributes[@"value"]) {
        _value = [WXConvert NSString:attributes[@"value"]]?:@"";
        if (_maxLength && [_value length] > [_maxLength integerValue]&& [_maxLength integerValue] >= 0) {
            _value = [_value substringToIndex:([_maxLength integerValue])];
        }
        [self setText:_value];
    }
    if (attributes[@"returnKeyType"]) {
        _returnKeyType = [WXConvert UIReturnKeyType:attributes[@"returnKeyType"]];
        [self setReturnKeyType:_returnKeyType];
    }
    if (attributes[@"rows"]) {
        _rows = [attributes[@"rows"] integerValue];
        [self setRows:_rows];
    } else {
        _rows = 2;
        [self setRows:_rows];
    }
}

#pragma mark - upate styles

- (void)updateStyles:(NSDictionary *)styles
{
    if (styles[@"color"]) {
        _colorForStyle = [WXConvert UIColor:styles[@"color"]];
        [self setTextColor:_colorForStyle];
    }
    if (styles[@"fontSize"]) {
        _fontSize = [WXConvert WXPixelType:styles[@"fontSize"] scaleFactor:self.weexInstance.pixelScaleFactor];
    }
    if (styles[@"fontWeight"]) {
        _fontWeight = [WXConvert WXTextWeight:styles[@"fontWeight"]];
    }
    if (styles[@"fontStyle"]) {
        _fontStyle = [WXConvert WXTextStyle:styles[@"fontStyle"]];
    }
    if (styles[@"fontFamily"]) {
        _fontFamily = [WXConvert NSString:styles[@"fontFamily"]];
    }
    [self setTextFont];

    if (styles[@"textAlign"]) {
        _textAlignForStyle = [WXConvert NSTextAlignment:styles[@"textAlign"]];
        [self setTextAlignment:_textAlignForStyle] ;
    }
    if (styles[@"placeholderColor"]) {
        _placeholderColor = [WXConvert UIColor:styles[@"placeholderColor"]];
    }else {
        _placeholderColor = [UIColor colorWithRed:0x99/255.0 green:0x99/255.0 blue:0x99/255.0 alpha:1.0];
    }
    [self setPlaceholderAttributedString];
    [self updatePattern];
}

-(void)updatePattern
{
    UIEdgeInsets padding = UIEdgeInsetsMake(self.cssNode->style.padding[CSS_TOP], self.cssNode->style.padding[CSS_LEFT], self.cssNode->style.padding[CSS_BOTTOM], self.cssNode->style.padding[CSS_RIGHT]);
    if (!UIEdgeInsetsEqualToEdgeInsets(padding, _padding)) {
        [self setPadding:padding];
    }

    UIEdgeInsets border = UIEdgeInsetsMake(self.cssNode->style.border[CSS_TOP], self.cssNode->style.border[CSS_LEFT], self.cssNode->style.border[CSS_BOTTOM], self.cssNode->style.border[CSS_RIGHT]);
    if (!UIEdgeInsetsEqualToEdgeInsets(border, _border)) {
        [self setBorder:border];
    }
}

- (CGSize (^)(CGSize))measureBlock
{
    __weak typeof(self) weakSelf = self;
    return ^CGSize (CGSize constrainedSize) {

        CGSize computedSize = [[[NSString alloc] init]sizeWithAttributes:nil];
        //TODO:more elegant way to use max and min constrained size
        if (!isnan(weakSelf.cssNode->style.minDimensions[CSS_WIDTH])) {
            computedSize.width = MAX(computedSize.width, weakSelf.cssNode->style.minDimensions[CSS_WIDTH]);
        }

        if (!isnan(weakSelf.cssNode->style.maxDimensions[CSS_WIDTH])) {
            computedSize.width = MIN(computedSize.width, weakSelf.cssNode->style.maxDimensions[CSS_WIDTH]);
        }

        if (!isnan(weakSelf.cssNode->style.minDimensions[CSS_HEIGHT])) {
            computedSize.height = MAX(computedSize.height, weakSelf.cssNode->style.minDimensions[CSS_HEIGHT]);
        }

        if (!isnan(weakSelf.cssNode->style.maxDimensions[CSS_HEIGHT])) {
            computedSize.height = MIN(computedSize.height, weakSelf.cssNode->style.maxDimensions[CSS_HEIGHT]);
        }

        return (CGSize) {
            WXCeilPixelValue(computedSize.width),
            WXCeilPixelValue(computedSize.height)
        };
    };
}

#pragma mark WXDatePickerManagerDelegate

-(void)fetchDatePickerValue:(NSString *)value
{
    self.text = value;
    if (_changeEvent) {
        if (![[self text] isEqualToString:_changeEventString]) {
            [self fireEvent:@"change" params:@{@"value":[self text]} domChanges:@{@"attrs":@{@"value":[self text]}}];
        }
    }
}

#pragma mark UITextFieldDelegate

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
    if([self isDateType])
    {
        [[[UIApplication sharedApplication] keyWindow] endEditing:YES];
        _changeEventString = [textField text];
        [_datePickerManager show];
        return NO;
    }
    return  YES;
}

#pragma mark UITextFieldDelegate

- (void)textFieldDidBeginEditing:(UITextField *)textField
{
    _changeEventString = [textField text];
    if (_focusEvent) {
        [self fireEvent:@"focus" params:nil];
    }
    [self handlePseudoClass];
}

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
    if (_maxLength) {
        NSUInteger oldLength = [textField.text length];
        NSUInteger replacementLength = [string length];
        NSUInteger rangeLength = range.length;

        NSUInteger newLength = oldLength - rangeLength + replacementLength;

        return newLength <= [_maxLength integerValue] ;
    }
    return YES;
}

- (void)textFieldDidEndEditing:(UITextField *)textField
{
    if (_changeEvent) {
        if (![[textField text] isEqualToString:_changeEventString]) {
            [self fireEvent:@"change" params:@{@"value":[textField text]} domChanges:@{@"attrs":@{@"value":[textField text]}}];
        }
    }
    if (_blurEvent) {
        [self fireEvent:@"blur" params:nil];
    }
    if(self.pseudoClassStyles && [self.pseudoClassStyles count]>0){
        [self recoveryPseudoStyles:self.styles];
    }
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    if (_returnEvent) {
        NSString *typeStr = [WXUtility returnKeyType:_returnKeyType];
        [self fireEvent:@"return" params:@{@"value":[textField text],@"returnKeyType":typeStr} domChanges:@{@"attrs":@{@"value":[textField text]}}];
    }
    [self blur];
    return YES;
}

- (void)textFiledEditChanged:(NSNotification *)notifi
{
    if (_inputEvent) {
        UITextField *textField = (UITextField *)notifi.object;
        // bind each other , the key must be attrs
        [self fireEvent:@"input" params:@{@"value":[textField text]} domChanges:@{@"attrs":@{@"value":[textField text]}}];
    }
}

- (void)setViewMovedUp:(BOOL)movedUp
{
    UIView *rootView = self.weexInstance.rootView;
    CGRect rect = self.weexInstance.frame;
    CGRect rootViewFrame = rootView.frame;
    CGRect inputFrame = [self.view.superview convertRect:self.view.frame toView:rootView];
    if (movedUp) {
        CGFloat offset = inputFrame.origin.y-(rootViewFrame.size.height-_keyboardSize.height-inputFrame.size.height);
        if (offset > 0) {
            rect = (CGRect){
                .origin.x = 0.f,
                .origin.y = rect.origin.y - offset,
                .size = rootViewFrame.size
            };
        }
    }
    self.weexInstance.rootView.frame = rect;
}

#pragma mark textview Delegate
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView
{
    if([self isDateType])
    {
        [[[UIApplication sharedApplication] keyWindow] endEditing:YES];
        _changeEventString = [textView text];
        [_datePickerManager show];
        return NO;
    }
    return  YES;
}

- (void)textViewDidBeginEditing:(UITextView *)textView
{
    _changeEventString = [textView text];
    if (_focusEvent) {
        [self fireEvent:@"focus" params:nil];
    }
    if (_clickEvent) {
        [self fireEvent:@"click" params:nil];
    }
    [textView becomeFirstResponder];
    [self handlePseudoClass];
}

- (void)textViewDidChange:(UITextView *)textView
{
    if(textView.text && [textView.text length] > 0) {
        self.placeHolderLabel.text = @"";
    }else{
        [self setPlaceholderAttributedString];
    }
    if (_inputEvent) {
        [self fireEvent:@"input" params:@{@"value":[textView text]} domChanges:@{@"attrs":@{@"value":[textView text]}}];
    }
}

- (void)textViewDidEndEditing:(UITextView *)textView
{
    if (![textView.text length]) {
        [self setPlaceholderAttributedString];
    }
    if (_changeEvent) {
        if (![[textView text] isEqualToString:_changeEventString]) {
            [self fireEvent:@"change" params:@{@"value":[textView text]} domChanges:@{@"attrs":@{@"value":[textView text]}}];
        }
    }
    if (_blurEvent) {
        [self fireEvent:@"blur" params:nil];
    }
    if(self.pseudoClassStyles && [self.pseudoClassStyles count]>0){
        [self recoveryPseudoStyles:self.styles];
    }
}

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
    if ([text isEqualToString:@"\n"]) {
        NSString *typeStr = [WXUtility returnKeyType:_returnKeyType];
        if (_returnEvent) {
            [self fireEvent:@"return" params:@{@"value":[textView text],@"returnKeyType":typeStr} domChanges:@{@"attrs":@{@"value":[textView text]}}];
        }
        if(typeStr.length > 0 && ![@"default" isEqualToString:typeStr]){
            [self blur];
            return NO;
        }
    }

    if (_maxLength) {
        NSUInteger oldLength = [textView.text length];
        NSUInteger replacementLength = [text length];
        NSUInteger rangeLength = range.length;
        NSUInteger newLength = oldLength - rangeLength + replacementLength;
        return newLength <= [_maxLength integerValue] ;
    }

    return YES;
}

#pragma mark private method

- (BOOL)isDateType
{
    if([_inputType isEqualToString:@"date"] || [_inputType isEqualToString:@"time"])
        return YES;
    return NO;
}

- (void)setPlaceholderAttributedString
{
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:_placeholderString];
    [attributedString addAttribute:NSForegroundColorAttributeName value:_placeholderColor range:NSMakeRange(0, _placeholderString.length)];
    UIFont *font = [WXUtility fontWithSize:_fontSize textWeight:_fontWeight textStyle:_fontStyle fontFamily:_fontFamily scaleFactor:self.weexInstance.pixelScaleFactor];
    [self setAttributedPlaceholder:attributedString font:font];
}

- (void)setTextFont
{
    UIFont *font = [WXUtility fontWithSize:_fontSize textWeight:_fontWeight textStyle:_fontStyle fontFamily:_fontFamily scaleFactor:self.weexInstance.pixelScaleFactor];
    [self setFont:font];
}

- (void)setAutofocus:(BOOL)b
{
    if (b) {
        if([self isDateType])
        {
            [_datePickerManager show];
        }else
        {
            [self.view becomeFirstResponder];
        }
    } else {
        if([self isDateType])
        {
            [_datePickerManager hide];
        }else
        {
            [self.view resignFirstResponder];
        }
    }
}

- (void)setType
{
    [self setKeyboardType:UIKeyboardTypeDefault];
    [self setSecureTextEntry:NO];
    if ([_inputType isEqualToString:@"text"]) {
        [self setKeyboardType:UIKeyboardTypeDefault];
    }else if ([_inputType isEqualToString:@"password"]) {
        [self setSecureTextEntry:YES];
    }else if ([_inputType isEqualToString:@"tel"]) {
        [self setKeyboardType:UIKeyboardTypePhonePad];
    }else if ([_inputType isEqualToString:@"email"]) {
        [self setKeyboardType:UIKeyboardTypeEmailAddress];
    }else if ([_inputType isEqualToString:@"url"]) {
        [self setKeyboardType:UIKeyboardTypeURL];
    }else if ([_inputType isEqualToString:@"number"]) {
        [self setKeyboardType:UIKeyboardTypeDecimalPad];
    }else if ([self isDateType]) {
        if (!_datePickerManager) {
            _datePickerManager = [[WXDatePickerManager alloc] init];
            _datePickerManager.delegate = self;
        }
        [_datePickerManager updateDatePicker:_attr];
    }
}

- (void)setPadding:(UIEdgeInsets)padding
{
    _padding = padding;
    [self setEditPadding:padding];
}

- (void)setBorder:(UIEdgeInsets)border
{
    _border = border;
    [self setEditBorder:border];
}

#pragma mark update touch styles
-(void)handlePseudoClass
{
    NSMutableDictionary *styles = [NSMutableDictionary new];
    NSMutableDictionary *recordStyles = [NSMutableDictionary new];
    if(_disabled){
        recordStyles = [self getPseudoClassStylesByKeys:@[@"disabled"]];
        [styles addEntriesFromDictionary:recordStyles];
    }else {
        recordStyles = [NSMutableDictionary new];
        recordStyles = [self getPseudoClassStylesByKeys:@[@"enabled"]];
        [styles addEntriesFromDictionary:recordStyles];
    }
    if ([self.view isFirstResponder]){
        recordStyles = [NSMutableDictionary new];
        recordStyles = [self getPseudoClassStylesByKeys:@[@"focus"]];
        [styles addEntriesFromDictionary:recordStyles];
    }
    NSString *disabledStr = @"enabled";
    if (_disabled){
        disabledStr = @"disabled";
    }
    if ([self.view isFirstResponder]) {
        NSString *focusStr = @"focus";
        recordStyles = [NSMutableDictionary new];
        recordStyles = [self getPseudoClassStylesByKeys:@[focusStr,disabledStr]];
        [styles addEntriesFromDictionary:recordStyles];
    }
    [self updatePseudoClassStyles:styles];
}

#pragma mark keyboard
- (void)keyboardWasShown:(NSNotification*)notification
{
    if(![self.view isFirstResponder]) {
        return;
    }
    CGRect begin = [[[notification userInfo] objectForKey:@"UIKeyboardFrameBeginUserInfoKey"] CGRectValue];

    CGRect end = [[[notification userInfo] objectForKey:@"UIKeyboardFrameEndUserInfoKey"] CGRectValue];
    if(begin.size.height <= 44) {
        return;
    }
    _keyboardSize = end.size;
    UIView * rootView = self.weexInstance.rootView;
    CGRect screenRect = [[UIScreen mainScreen] bounds];
    CGRect keyboardRect = (CGRect){
        .origin.x = 0,
        .origin.y = CGRectGetMaxY(screenRect) - _keyboardSize.height - 54,
        .size = _keyboardSize
    };
    CGRect inputFrame = [self.view.superview convertRect:self.view.frame toView:rootView];
    if (keyboardRect.origin.y - inputFrame.size.height <= inputFrame.origin.y) {
        [self setViewMovedUp:YES];
        self.weexInstance.isRootViewFrozen = YES;
    }

    if (_keyboardEvent) {
        [self fireEvent:@"keyboard" params:@{ @"isShow": @YES }];
    }
}

- (void)keyboardWillHide:(NSNotification*)notification
{
    if (![self.view isFirstResponder]) {
        return;
    }
    UIView * rootView = self.weexInstance.rootView;
    if (!CGRectEqualToRect(self.weexInstance.frame, rootView.frame)) {
        [self setViewMovedUp:NO];
        self.weexInstance.isRootViewFrozen = NO;
    }
    if (_keyboardEvent) {
        [self fireEvent:@"keyboard" params:@{ @"isShow": @NO }];
    }
}

- (void)closeKeyboard
{
    [self.view resignFirstResponder];
}

#pragma mark -reset color
- (void)resetStyles:(NSArray *)styles
{
    if ([styles containsObject:@"color"]) {
        [self setTextColor:[UIColor blackColor]];
    }
    if ([styles containsObject:@"fontSize"]) {
        _fontSize = WX_TEXT_FONT_SIZE;
        [self setTextFont];
    }
}
@end


text:
@interface WZXCircleFriendsViewController : UIViewController

@end


text:
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you 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.
-->
<Root>
  <TestCase name="testNoNeedToClearLookupHint">
    <Resource name="beforePropagatingHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
      +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
    <Resource name="afterPropagatingHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0] options:{retry-strategy=fixed_delay, max-attempts=10, fixed-delay=155 ms, retry-predicate=lookup_miss, table=lookup}]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
      +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
    <Resource name="afterClearingJoinHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0] options:{retry-strategy=fixed_delay, max-attempts=10, fixed-delay=155 ms, retry-predicate=lookup_miss, table=lookup}]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
      +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
  </TestCase>
  <TestCase name="testClearLookupHintWithInvalidPropagationToSubQuery">
    <Resource name="beforePropagatingHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalProject(a=[$0], hints=[[[ALIAS options:[t1]]]]), rowType=[RecordType(BIGINT a)]
   :  +- LogicalJoin(condition=[=($0, $1)], joinType=[inner]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :     :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   :     +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
   :        +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
   +- LogicalTableScan(table=[[builtin, default, src]], hints=[[[ALIAS inheritPath:[] options:[t2]]]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
    <Resource name="afterPropagatingHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0] options:{async=true, retry-strategy=fixed_delay, max-attempts=10, output-mode=allow_unordered, fixed-delay=155 ms, retry-predicate=lookup_miss, table=lookup, timeout=300 s, capacity=1000}]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalProject(a=[$0], hints=[[[ALIAS options:[t1]]]]), rowType=[RecordType(BIGINT a)]
   :  +- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0, 0, 0] options:{async=true, retry-strategy=fixed_delay, max-attempts=10, output-mode=allow_unordered, fixed-delay=155 ms, retry-predicate=lookup_miss, table=lookup, timeout=300 s, capacity=1000}]]], hints=[[[ALIAS inheritPath:[0] options:[t1]]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :     :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   :     +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
   :        +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
   +- LogicalTableScan(table=[[builtin, default, src]], hints=[[[ALIAS inheritPath:[] options:[t2]]]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
    <Resource name="afterClearingJoinHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0] options:{async=true, retry-strategy=fixed_delay, max-attempts=10, output-mode=allow_unordered, fixed-delay=155 ms, retry-predicate=lookup_miss, table=lookup, timeout=300 s, capacity=1000}]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalProject(a=[$0], hints=[[[ALIAS options:[t1]]]]), rowType=[RecordType(BIGINT a)]
   :  +- LogicalJoin(condition=[=($0, $1)], joinType=[inner], hints=[[[ALIAS inheritPath:[0] options:[t1]]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :     :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   :     +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
   :        +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
   +- LogicalTableScan(table=[[builtin, default, src]], hints=[[[ALIAS inheritPath:[] options:[t2]]]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
  </TestCase>
  <TestCase name="testClearLookupHintWithInvalidPropagationToViewWhileViewHasLookupHints">
    <Resource name="beforePropagatingHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalProject(a=[$0], hints=[[[ALIAS options:[t1]]]]), rowType=[RecordType(BIGINT a)]
   :  +- LogicalJoin(condition=[=($0, $1)], joinType=[inner]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :     :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   :     +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
   :        +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
   +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
      +- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
    <Resource name="afterPropagatingHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0] options:{async=true, output-mode=allow_unordered, table=lookup, timeout=300 s, capacity=1000}]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalProject(a=[$0], hints=[[[ALIAS options:[t1]]]]), rowType=[RecordType(BIGINT a)]
   :  +- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0] options:{retry-strategy=fixed_delay, max-attempts=10, fixed-delay=155 ms, retry-predicate=lookup_miss, table=lookup}][LOOKUP inheritPath:[0, 0, 0] options:{async=true, output-mode=allow_unordered, table=lookup, timeout=300 s, capacity=1000}]]], hints=[[[ALIAS inheritPath:[0] options:[t1]]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :     :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   :     +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
   :        +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
   +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
      +- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
    <Resource name="afterClearingJoinHints">
      <![CDATA[
LogicalProject(a=[$0]), rowType=[RecordType(BIGINT a)]
+- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0] options:{async=true, output-mode=allow_unordered, table=lookup, timeout=300 s, capacity=1000}]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :- LogicalProject(a=[$0], hints=[[[ALIAS options:[t1]]]]), rowType=[RecordType(BIGINT a)]
   :  +- LogicalJoin(condition=[=($0, $1)], joinType=[inner], joinHints=[[[LOOKUP inheritPath:[0] options:{retry-strategy=fixed_delay, max-attempts=10, fixed-delay=155 ms, retry-predicate=lookup_miss, table=lookup}]]], hints=[[[ALIAS inheritPath:[0] options:[t1]]]]), rowType=[RecordType(BIGINT a, BIGINT a0)]
   :     :- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
   :     +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
   :        +- LogicalTableScan(table=[[builtin, default, lookup]]), rowType=[RecordType(BIGINT a)]
   +- LogicalSnapshot(period=[PROCTIME()]), rowType=[RecordType(BIGINT a)]
      +- LogicalTableScan(table=[[builtin, default, src]]), rowType=[RecordType(BIGINT a)]
]]>
    </Resource>
  </TestCase>
</Root>


text:
CC=gcc
CFLAGS = -g -I../libpod
# LDFLAGS = -L.. -lpod -L../../ElectricFence-2.2.0 -lefence
LDFLAGS = -L.. -lpod -lefence
# LESS = /Users/james/Applications/MacVim.app/Contents/Resources/vim/runtime/macros/less.sh
LESS = /usr/share/vim/vim73/macros/less.sh
tests = test_pod_char test_pod_object test_pod_string test_pod_list \
        test_pod_mapping

.PHONY:	all
all:	$(tests) test ../libpod.a

test:	test.c
	$(CC) $(CFLAGS) test.c -o test

test_pod_char:	test_pod_char.c ../libpod.a
	$(CC) $(CFLAGS) test_pod_char.c -o test_pod_char $(LDFLAGS)

test_pod_object:	test_pod_object.c ../libpod.a
	$(CC) $(CFLAGS) test_pod_object.c -o test_pod_object $(LDFLAGS)

test_pod_string:	test_pod_string.c ../libpod.a
	$(CC) $(CFLAGS) test_pod_string.c -o test_pod_string $(LDFLAGS)

test_pod_list:	test_pod_list.c ../libpod.a
	$(CC) $(CFLAGS) test_pod_list.c -o test_pod_list $(LDFLAGS)

test_pod_mapping:	test_pod_mapping.c ../libpod.a
	$(CC) $(CFLAGS) test_pod_mapping.c -o test_pod_mapping $(LDFLAGS)

.PHONY: results
results:	all
	./test > test.results 2>&1
	$(LESS) test.results

.PHONY:	clean
clean:
	rm -f *.o $(tests) test test.results

# vim: noet ts=8


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Boletus marmoreus Rocq. {?}

### Remarks
null


text:
describe('Fire Tensai Acolyte', function() {
    integration(function() {
        describe('Fire Tensai Acolyte\'s ability', function() {
            beforeEach(function() {
                this.setupTest({
                    phase: 'conflict',
                    player1: {
                        inPlay: ['fire-tensai-acolyte','isawa-masahiro'],
                        dynastyDiscard: ['favorable-ground']
                    },
                    player2: {
                        inPlay: ['doji-challenger']
                    }
                });
                this.acolyte = this.player1.findCardByName('fire-tensai-acolyte');
                this.masahiro = this.player1.findCardByName('isawa-masahiro');
                this.favorableground = this.player1.placeCardInProvince('favorable-ground', 'province 1');

                this.duelist = this.player2.findCardByName('doji-challenger');
            });

            it('should not be able to attack during non-fire conflicts', function() {
                this.noMoreActions();
                this.initiateConflict({
                    type: 'military',
                    ring: 'water',
                    attackers: ['fire-tensai-acolyte','isawa-masahiro'],
                    defenders: []
                });
                expect(this.game.currentConflict.attackers).toContain(this.masahiro);
                expect(this.game.currentConflict.attackers).not.toContain(this.acolyte);
            });

            it('should be able to attack during fire conflicts', function() {
                this.noMoreActions();
                this.initiateConflict({
                    type: 'military',
                    ring: 'fire',
                    attackers: ['fire-tensai-acolyte','isawa-masahiro'],
                    defenders: []
                });
                expect(this.game.currentConflict.attackers).toContain(this.masahiro);
                expect(this.game.currentConflict.attackers).toContain(this.acolyte);
            });

            it('should be able to participate in non-fire conflicts if moved in', function() {
                this.noMoreActions();
                this.initiateConflict({
                    type: 'military',
                    ring: 'water',
                    attackers: ['isawa-masahiro'],
                    defenders: []
                });
                this.player2.pass();
                this.player1.clickCard(this.favorableground);
                this.player1.clickCard(this.acolyte);
                expect(this.game.currentConflict.attackers).toContain(this.acolyte);
            });

            it('should let you declare an attack with only the acolyte with the fire ring', function () {
                this.masahiro.bow();
                this.player1.pass();
                this.player2.pass();
                this.player1.clickRing('fire');
                this.player1.clickCard(this.acolyte);
                expect(this.player1).toHavePrompt('Military Fire Conflict');
            });

            it('should not let you pick the fire ring declare acolyte as an attacking then change the ring and keep him in the conflict', function () {
                this.player1.pass();
                this.player2.pass();
                this.player1.clickRing('fire');
                this.player1.clickCard(this.acolyte);
                this.player1.clickRing('void');
                expect(this.game.currentConflict.attackers).not.toContain(this.acolyte);
            });
        });
    });
});


text:
<?php

require_once __DIR__ . '/../vendor/autoload.php';

$bot = new MonsieurBiz\CoffeeShop\Bot\Bot();
$bot->setToken(trim(file_get_contents(__DIR__ . '/../TOKEN')));
$bot
    ->initCommands()
    ->run(false, false)
;


text:
<?php

namespace AppBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

/**
 * AppUser
 *
 * @ORM\Table(name="app_user")
 * @ORM\Entity(repositoryClass="AppBundle\Entity\AppUserRepository")
 */
class AppUser
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="screen_name", type="string", length=255)
     */
    private $screenName;

    /**
     * @ORM\OneToMany(targetEntity="Message", mappedBy="appUser")
     **/
    private $message;

    public function __construct()
    {
        $this->message = new ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set screenName
     *
     * @param string $screenName
     * @return User
     */
    public function setScreenName($screenName)
    {
        $this->screenName = $screenName;

        return $this;
    }

    /**
     * Get screenName
     *
     * @return string
     */
    public function getScreenName()
    {
        return $this->screenName;
    }

    /**
     * Add message
     *
     * @param \AppBundle\Entity\Message $message
     * @return AppUser
     */
    public function addMessage(\AppBundle\Entity\Message $message)
    {
        $this->message[] = $message;

        return $this;
    }

    /**
     * Remove message
     *
     * @param \AppBundle\Entity\Message $message
     */
    public function removeMessage(\AppBundle\Entity\Message $message)
    {
        $this->message->removeElement($message);
    }

    /**
     * Get message
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getMessage()
    {
        return $this->message;
    }
}


text:
/*
 * $Id$
 */

#ifndef __KDC_LOCL_H__
#define __KDC_LOCL_H__

#include "headers.h"

typedef struct pk_client_params pk_client_params;
struct DigestREQ;
struct Kx509Request;
#include <kdc-private.h>

extern sig_atomic_t exit_flag;
extern size_t max_request_udp;
extern size_t max_request_tcp;
extern const char *request_log;
extern const char *port_str;
extern krb5_addresses explicit_addresses;

extern int enable_http;

#ifdef SUPPORT_DETACH

#define DETACH_IS_DEFAULT FALSE

extern int detach_from_console;
#endif

extern const struct units _kdc_digestunits[];

#define KDC_LOG_FILE		"kdc.log"

extern struct timeval _kdc_now;
#define kdc_time (_kdc_now.tv_sec)

extern char *runas_string;
extern char *chroot_string;

void
loop(krb5_context context, krb5_kdc_configuration *config);

krb5_kdc_configuration *
configure(krb5_context context, int argc, char **argv);

#ifdef __APPLE__
void bonjour_announce(krb5_context, krb5_kdc_configuration *);
#endif

#endif /* __KDC_LOCL_H__ */


text:
package com.intellij.java.codeInsight.daemon.quickFix;

import com.intellij.codeInsight.daemon.LightIntentionActionTestCase;
import com.intellij.ui.ChooserInterceptor;
import com.intellij.ui.UiInterceptors;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class AddExceptionToExistingCatchTest extends LightIntentionActionTestCase {
  private static final Pattern CHOOSER_TEST_NAME = Pattern.compile(".+_Choose_(.+)\\.java");

  @Override
  protected String getBasePath() {
    return "/codeInsight/daemonCodeAnalyzer/quickFix/addExceptionToExistingCatch";
  }

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    Matcher matcher = CHOOSER_TEST_NAME.matcher(getTestName(false));
    if (matcher.matches()) {
      UiInterceptors.register(new ChooserInterceptor(null, matcher.group(1)));
    }
  }
}


text:
<?php

namespace CodeIgniter\Test;

use Closure;
use CodeIgniter\Filters\Exceptions\FilterException;
use CodeIgniter\Filters\Filters;
use CodeIgniter\Filters\FilterInterface;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Router\RouteCollection;
use Config\Filters as FiltersConfig;
use Config\Services;
use InvalidArgumentException;
use RuntimeException;

/**
 * Filter Test Trait
 *
 * Provides functionality for testing
 * filters and their route associations.
 *
 * @mixin CIUnitTestCase
 */
trait FilterTestTrait
{
	/**
	 * Have the one-time classes been instantiated?
	 *
	 * @var boolean
	 */
	private $doneFilterSetUp = false;

	/**
	 * The active IncomingRequest or CLIRequest
	 *
	 * @var RequestInterface
	 */
	protected $request;

	/**
	 * The active Response instance
	 *
	 * @var ResponseInterface
	 */
	protected $response;

	/**
	 * The Filters configuration to use.
	 * Extracted for access to aliases
	 * during Filters::discoverFilters().
	 *
	 * @var FiltersConfig|null
	 */
	protected $filtersConfig;

	/**
	 * The prepared Filters library.
	 *
	 * @var Filters|null
	 */
	protected $filters;

	/**
	 * The default App and discovered
	 * routes to check for filters.
	 *
	 * @var RouteCollection|null
	 */
	protected $collection;

	//--------------------------------------------------------------------
	// Staging
	//--------------------------------------------------------------------

	/**
	 * Initializes dependencies once.
	 *
	 * @return void
	 */
	protected function setUpFilterTestTrait(): void
	{
		if ($this->doneFilterSetUp === true)
		{
			return;
		}

		// Create our own Request and Response so we can
		// use the same ones for Filters and FilterInterface
		// yet isolate them from outside influence
		$this->request  = $this->request ?? clone Services::request();
		$this->response = $this->response ?? clone Services::response();

		// Create our config and Filters instance to reuse for performance
		$this->filtersConfig = $this->filtersConfig ?? config('Filters');
		$this->filters       = $this->filters ?? new Filters($this->filtersConfig, $this->request, $this->response);

		if (is_null($this->collection))
		{
			// Load the RouteCollection from Config to gather App route info
			// (creates $routes using the Service as a starting point)
			require APPPATH . 'Config/Routes.php';

			$routes->getRoutes('*'); // Triggers discovery
			$this->collection = $routes;
		}

		$this->doneFilterSetUp = true;
	}

	//--------------------------------------------------------------------
	// Utility
	//--------------------------------------------------------------------

	/**
	 * Returns a callable method for a filter position
	 * using the local HTTP instances.
	 *
	 * @param FilterInterface|string $filter   The filter instance, class, or alias
	 * @param string                 $position "before" or "after"
	 *
	 * @return Closure
	 */
	protected function getFilterCaller($filter, string $position): Closure
	{
		if (! in_array($position, ['before', 'after'], true))
		{
			throw new InvalidArgumentException('Invalid filter position passed: ' . $position);
		}

		if (is_string($filter))
		{
			// Check for an alias (no namespace)
			if (strpos($filter, '\\') === false)
			{
				if (! isset($this->filtersConfig->aliases[$filter]))
				{
					throw new RuntimeException("No filter found with alias '{$filter}'");
				}

				$filter = $this->filtersConfig->aliases[$filter];
			}

			// Get an instance
			$filter = new $filter();
		}

		if (! $filter instanceof FilterInterface)
		{
			throw FilterException::forIncorrectInterface(get_class($filter));
		}

		$request = clone $this->request;

		if ($position === 'before')
		{
			return function (array $params = null) use ($filter, $request) {
				return $filter->before($request, $params);
			};
		}

		$response = clone $this->response;

		return function (array $params = null) use ($filter, $request, $response) {
			return $filter->after($request, $response, $params);
		};
	}

	/**
	 * Gets an array of filter aliases enabled
	 * for the given route at position.
	 *
	 * @param string $route    The route to test
	 * @param string $position "before" or "after"
	 *
	 * @return string[] The filter aliases
	 */
	protected function getFiltersForRoute(string $route, string $position): array
	{
		if (! in_array($position, ['before', 'after'], true))
		{
			throw new InvalidArgumentException('Invalid filter position passed:' . $position);
		}

		$this->filters->reset();

		if ($routeFilter = $this->collection->getFilterForRoute($route))
		{
			$this->filters->enableFilter($routeFilter, $position);
		}

		$aliases = $this->filters->initialize($route)->getFilters();

		$this->filters->reset();
		return $aliases[$position];
	}

	//--------------------------------------------------------------------
	// Assertions
	//--------------------------------------------------------------------

	/**
	 * Asserts that the given route at position uses
	 * the filter (by its alias).
	 *
	 * @param string $route    The route to test
	 * @param string $position "before" or "after"
	 * @param string $alias    Alias for the anticipated filter
	 *
	 * @return void
	 */
	protected function assertFilter(string $route, string $position, string $alias): void
	{
		$filters = $this->getFiltersForRoute($route, $position);

		$this->assertContains(
			$alias,
			$filters,
			"Filter '{$alias}' does not apply to '{$route}'.",
		);
	}

	/**
	 * Asserts that the given route at position does not
	 * use the filter (by its alias).
	 *
	 * @param string $route    The route to test
	 * @param string $position "before" or "after"
	 * @param string $alias    Alias for the anticipated filter
	 *
	 * @return void
	 */
	protected function assertNotFilter(string $route, string $position, string $alias)
	{
		$filters = $this->getFiltersForRoute($route, $position);

		$this->assertNotContains(
			$alias,
			$filters,
			"Filter '{$alias}' applies to '{$route}' when it should not.",
		);
	}

	/**
	 * Asserts that the given route at position has
	 * at least one filter set.
	 *
	 * @param string $route    The route to test
	 * @param string $position "before" or "after"
	 *
	 * @return void
	 */
	protected function assertHasFilters(string $route, string $position)
	{
		$filters = $this->getFiltersForRoute($route, $position);

		$this->assertNotEmpty(
			$filters,
			"No filters found for '{$route}' when at least one was expected.",
		);
	}

	/**
	 * Asserts that the given route at position has
	 * no filters set.
	 *
	 * @param string $route    The route to test
	 * @param string $position "before" or "after"
	 *
	 * @return void
	 */
	protected function assertNotHasFilters(string $route, string $position)
	{
		$filters = $this->getFiltersForRoute($route, $position);

		$this->assertSame(
			[],
			$filters,
			"Found filters for '{$route}' when none were expected: " . implode(', ', $filters) . '.',
		);
	}
}