text:
using System;
using System.Collections.Generic;
using Csla;
using SelfLoadRO.DataAccess;
using SelfLoadRO.DataAccess.ERCLevel;

namespace SelfLoadRO.Business.ERCLevel
{

    ///
    /// D03_SubContinentColl (read only list).

    /// This is a generated base class of <see cref="D03_SubContinentColl"/> business object.
    ///
    /// <remarks>
    /// This class is child of <see cref="D02_Continent"/> read only object.

    /// The items of the collection are <see cref="D04_SubContinent"/> objects.
    /// </remarks>
    [Serializable]
    public partial class D03_SubContinentColl : ReadOnlyListBase<D03_SubContinentColl, D04_SubContinent>
    {

        #region Collection Business Methods

        ///
        /// Determines whether a <see cref="D04_SubContinent"/> item is in the collection.
        ///
        /// <param name="subContinent_ID">The SubContinent_ID of the item to search for.</param>
        /// <returns><c>true</c> if the D04_SubContinent is a collection item; otherwise, <c>false</c>.</returns>
        public bool Contains(int subContinent_ID)
        {
            foreach (var d04_SubContinent in this)
            {
                if (d04_SubContinent.SubContinent_ID == subContinent_ID)
                {
                    return true;
                }
            }
            return false;
        }

        #endregion

        #region Find Methods

        ///
        /// Finds a <see cref="D04_SubContinent"/> item of the <see cref="D03_SubContinentColl"/> collection, based on a given SubContinent_ID.
        ///
        /// <param name="subContinent_ID">The SubContinent_ID.</param>
        /// <returns>A <see cref="D04_SubContinent"/> object.</returns>
        public D04_SubContinent FindD04_SubContinentBySubContinent_ID(int subContinent_ID)
        {
            for (var i = 0; i < this.Count; i++)
            {
                if (this[i].SubContinent_ID.Equals(subContinent_ID))
                {
                    return this[i];
                }
            }

            return null;
        }

        #endregion

        #region Factory Methods

        ///
        /// Factory method. Loads a <see cref="D03_SubContinentColl"/> collection, based on given parameters.
        ///
        /// <param name="parent_Continent_ID">The Parent_Continent_ID parameter of the D03_SubContinentColl to fetch.</param>
        /// <returns>A reference to the fetched <see cref="D03_SubContinentColl"/> collection.</returns>
        internal static D03_SubContinentColl GetD03_SubContinentColl(int parent_Continent_ID)
        {
            return DataPortal.FetchChild<D03_SubContinentColl>(parent_Continent_ID);
        }

        #endregion

        #region Constructor

        ///
        /// Initializes a new instance of the <see cref="D03_SubContinentColl"/> class.
        ///
        /// <remarks> Do not use to create a Csla object. Use factory methods instead.</remarks>
        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
        public D03_SubContinentColl()
        {
            // Use factory methods and do not use direct creation.

            var rlce = RaiseListChangedEvents;
            RaiseListChangedEvents = false;
            AllowNew = false;
            AllowEdit = false;
            AllowRemove = false;
            RaiseListChangedEvents = rlce;
        }

        #endregion

        #region Data Access

        ///
        /// Loads a <see cref="D03_SubContinentColl"/> collection from the database, based on given criteria.
        ///
        /// <param name="parent_Continent_ID">The Parent Continent ID.</param>
        protected void Child_Fetch(int parent_Continent_ID)
        {
            var args = new DataPortalHookArgs(parent_Continent_ID);
            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoadRO.GetManager())
            {
                var dal = dalManager.GetProvider<ID03_SubContinentCollDal>();
                var data = dal.Fetch(parent_Continent_ID);
                Fetch(data);
            }
            OnFetchPost(args);
            foreach (var item in this)
            {
                item.FetchChildren();
            }
        }

        ///
        /// Loads all <see cref="D03_SubContinentColl"/> collection items from the given list of D04_SubContinentDto.
        ///
        /// <param name="data">The list of <see cref="D04_SubContinentDto"/>.</param>
        private void Fetch(List<D04_SubContinentDto> data)
        {
            IsReadOnly = false;
            var rlce = RaiseListChangedEvents;
            RaiseListChangedEvents = false;
            foreach (var dto in data)
            {
                Add(D04_SubContinent.GetD04_SubContinent(dto));
            }
            RaiseListChangedEvents = rlce;
            IsReadOnly = true;
        }

        #endregion

        #region DataPortal Hooks

        ///
        /// Occurs after setting query parameters and before the fetch operation.
        ///
        partial void OnFetchPre(DataPortalHookArgs args);

        ///
        /// Occurs after the fetch operation (object or collection is fully loaded and set up).
        ///
        partial void OnFetchPost(DataPortalHookArgs args);

        #endregion

    }
}


text:
/**
 * There are JeeSite code generation
 */
package com.thinkgem.jeesite.modules.edu.dao;

import org.springframework.stereotype.Repository;

import com.thinkgem.jeesite.common.persistence.BaseDao;
import com.thinkgem.jeesite.common.persistence.Parameter;
import com.thinkgem.jeesite.modules.edu.entity.Aboutus;

/**
 * 关于我们DAO接口
 * @author lala
 * @version 2015-04-15
 */
@Repository
public class AboutusDao extends BaseDao<Aboutus> {

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Fm;

class Fm
{
    protected $_items = null;

    public function __get($name)
    {
        switch ($name) {
            case 'items':
                return $this->_items;
            default:
                return isset($this->_items[$name]) ? $this->_items[$name] : null;
        }
    }

    public function __call($name, $args)
    {
        return $this->_items[$name] = new FmItem(array_merge(array(
            'name' => $name
        ), $args[0] ?: array()));
    }

    function __construct($items = null)
    {
        foreach ($items ?: array() as $name => $arg) {
            $this->__call($name, array($arg));
        }
    }

    public function check($params, &$errors = null)
    {
        foreach ($this->_items as $name => $item) {
            if (!$item->check(isset($params[$name]) ? $params[$name] : null, $error)) {
                $errors[$name] = $error;
            }
        }
        return !$error;
    }
}


text:
<?php

namespace Kdyby\Doctrine\Console;

use Doctrine;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * @author Tomas Jacik <tomas.jacik@sunfox.cz>
 */
class ConvertMappingCommand extends Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand
{

	/**
	 * @var \Kdyby\Doctrine\Tools\CacheCleaner
	 * @inject
	 */
	public $cacheCleaner;

	public function __construct()
	{
		parent::__construct();
	}

	/**
	 * {@inheritDoc}
	 */
	protected function configure()
	{
		parent::configure();
		$this->addOption('em', NULL, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
	}

	protected function initialize(InputInterface $input, OutputInterface $output)
	{
		parent::initialize($input, $output);

		if ($input->getOption('em')) {
			CommandHelper::setApplicationEntityManager($this->getHelper('container'), $input->getOption('em'));
		}

		$this->cacheCleaner->invalidate();
	}

}


text:
package skadistats.clarity.io.decoder;

import skadistats.clarity.io.bitstream.BitStream;

public class ArrayDecoder<T> implements Decoder<T[]> {

    private final Decoder<T> decoder;
    private final int nSizeBits;

    public ArrayDecoder(Decoder<T> decoder, int nSizeBits) {
        this.decoder = decoder;
        this.nSizeBits = nSizeBits;
    }

    @Override
    public T[] decode(BitStream bs) {
        int count = bs.readUBitInt(nSizeBits);
        T[] result = (T[]) new Object[count];
        int i = 0;
        while (i < count) {
            result[i++] = decoder.decode(bs);
        }
        return result;
    }

}


text:
<!doctype html>

  <meta charset="utf-8">
  <title>Reminder Web Application</title>
  <link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css">

  <link rel="stylesheet" href="css/app.css"/>


text:
#ifndef _MSC_VER
    #define BOOST_TEST_DYN_LINK
#endif

#include <deque>

#include <boost/test/unit_test.hpp>
#include <boost/optional.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition_variable.hpp>

#include "ignite/ignition.h"
#include "ignite/cache/cache.h"
#include "ignite/test_utils.h"

using namespace ignite;
using namespace ignite::cache;
using namespace ignite::cache::event;
using namespace ignite::cache::query;
using namespace ignite::cache::query::continuous;
using namespace boost::unit_test;

/**
 * Very simple concurrent queue implementation.
 */
template<typename T>
class ConcurrentQueue
{
public:
    /*
     * Constructor.
     */
    ConcurrentQueue()
    {
        // No-op.
    }

    /*
     * Push next element to queue.
     *
     * @param val Value to push.
     */
    void Push(const T& val)
    {
        boost::unique_lock<boost::mutex> guard(mutex);

        queue.push_back(val);

        cv.notify_one();
    }

    /*
     * Pull element from the queue with the specified timeout.
     *
     * @param val Value is placed there on success.
     * @param timeout Timeout.
     * @return True on success and false on timeout.
     */
    template <typename Rep, typename Period>
    bool Pull(T& val, const boost::chrono::duration<Rep, Period>& timeout)
    {
        boost::unique_lock<boost::mutex> guard(mutex);

        if (queue.empty())
        {
            boost::cv_status res = cv.wait_for(guard, timeout);

            if (res == boost::cv_status::timeout)
                return false;
        }

        assert(!queue.empty());

        val = queue.front();

        queue.pop_front();

        return true;
    }

private:
    boost::mutex mutex;

    boost::condition_variable cv;

    std::deque<T> queue;
};

/*
 * Test listener class. Stores events it has been notified about in concurrent
 * queue so they can be checked later.
 */
template<typename K, typename V>
class Listener : public CacheEntryEventListener<K, V>
{
public:
    /*
     * Default constructor.
     */
    Listener()
    {
        // No-op.
    }

    /**
     * Event callback.
     *
     * @param evts Events.
     * @param num Events number.
     */
    virtual void OnEvent(const CacheEntryEvent<K, V>* evts, uint32_t num)
    {
        for (uint32_t i = 0; i < num; ++i)
            eventQueue.Push(evts[i]);
    }

    /*
     * Check that next received event contains specific values.
     *
     * @param key Key.
     * @param oldVal Old value.
     * @param val Current value.
     */
    void CheckNextEvent(const K& key, boost::optional<V> oldVal, boost::optional<V> val)
    {
        CacheEntryEvent<K, V> event;
        bool success = eventQueue.Pull(event, boost::chrono::seconds(1));

        BOOST_REQUIRE(success);

        BOOST_CHECK_EQUAL(event.GetKey(), key);
        BOOST_CHECK_EQUAL(event.HasOldValue(), oldVal.is_initialized());
        BOOST_CHECK_EQUAL(event.HasValue(), val.is_initialized());

        if (oldVal && event.HasOldValue())
            BOOST_CHECK_EQUAL(event.GetOldValue().value, oldVal->value);

        if (val && event.HasValue())
            BOOST_CHECK_EQUAL(event.GetValue().value, val->value);
    }

    /*
     * Check that there is no event for the specified ammount of time.
     *
     * @param timeout Timeout.
     */
    template <typename Rep, typename Period>
    void CheckNoEvent(const boost::chrono::duration<Rep, Period>& timeout)
    {
        CacheEntryEvent<K, V> event;
        bool success = eventQueue.Pull(event, timeout);

        BOOST_REQUIRE(!success);
    }

private:
    // Events queue.
    ConcurrentQueue< CacheEntryEvent<K, V> > eventQueue;
};

/*
 * Test entry.
 */
struct TestEntry
{
    /*
     * Default constructor.
     */
    TestEntry() : value(0)
    {
        // No-op.
    }

    /*
     * Constructor.
     */
    TestEntry(int32_t val) : value(val)
    {
        // No-op.
    }

    /* Value */
    int32_t value;
};

namespace ignite
{
    namespace binary
    {
        /**
        * Binary type definition.
        */
        IGNITE_BINARY_TYPE_START(TestEntry)
            IGNITE_BINARY_GET_TYPE_ID_AS_HASH(TestEntry)
            IGNITE_BINARY_GET_TYPE_NAME_AS_IS(TestEntry)
            IGNITE_BINARY_GET_FIELD_ID_AS_HASH
            IGNITE_BINARY_GET_HASH_CODE_ZERO(TestEntry)
            IGNITE_BINARY_IS_NULL_FALSE(TestEntry)
            IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(TestEntry)

            void Write(BinaryWriter& writer, const TestEntry& obj)
            {
                writer.WriteInt32("value", obj.value);
            }

            TestEntry Read(BinaryReader& reader)
            {
                TestEntry res;
                res.value = reader.ReadInt32("value");

                return res;
            }

        IGNITE_BINARY_TYPE_END
    }
}

/*
 * Test setup fixture.
 */
struct ContinuousQueryTestSuiteFixture
{
    Ignite grid;

    Cache<int, TestEntry> cache;

    /*
     * Constructor.
     */
    ContinuousQueryTestSuiteFixture() :
        grid(ignite_test::StartNode("cache-query-continuous.xml", "node-01")),
        cache(grid.GetCache<int, TestEntry>("transactional_no_backup"))
    {
        // No-op.
    }

    /*
     * Destructor.
     */
    ~ContinuousQueryTestSuiteFixture()
    {
        Ignition::StopAll(false);

        grid = Ignite();
    }
};

void CheckEvents(Cache<int, TestEntry>& cache, Listener<int, TestEntry>& lsnr)
{
    cache.Put(1, TestEntry(10));
    lsnr.CheckNextEvent(1, boost::none, TestEntry(10));

    cache.Put(1, TestEntry(20));
    lsnr.CheckNextEvent(1, TestEntry(10), TestEntry(20));

    cache.Put(2, TestEntry(20));
    lsnr.CheckNextEvent(2, boost::none, TestEntry(20));

    cache.Remove(1);
    lsnr.CheckNextEvent(1, TestEntry(20), boost::none);
}

BOOST_FIXTURE_TEST_SUITE(ContinuousQueryTestSuite, ContinuousQueryTestSuiteFixture)

BOOST_AUTO_TEST_CASE(TestBasic)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestInitialQueryScan)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    cache.Put(11, TestEntry(111));
    cache.Put(22, TestEntry(222));
    cache.Put(33, TestEntry(333));

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry, ScanQuery());

    std::vector< CacheEntry<int, TestEntry> > vals;

    handle.GetInitialQueryCursor().GetAll(vals);

    BOOST_CHECK_THROW(handle.GetInitialQueryCursor(), IgniteError);

    BOOST_REQUIRE_EQUAL(vals.size(), 3);

    BOOST_CHECK_EQUAL(vals[0].GetKey(), 11);
    BOOST_CHECK_EQUAL(vals[1].GetKey(), 22);
    BOOST_CHECK_EQUAL(vals[2].GetKey(), 33);

    BOOST_CHECK_EQUAL(vals[0].GetValue().value, 111);
    BOOST_CHECK_EQUAL(vals[1].GetValue().value, 222);
    BOOST_CHECK_EQUAL(vals[2].GetValue().value, 333);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestInitialQuerySql)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    cache.Put(11, TestEntry(111));
    cache.Put(22, TestEntry(222));
    cache.Put(33, TestEntry(333));

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry, SqlQuery("TestEntry", "value > 200"));

    std::vector< CacheEntry<int, TestEntry> > vals;

    handle.GetInitialQueryCursor().GetAll(vals);

    BOOST_CHECK_THROW(handle.GetInitialQueryCursor(), IgniteError);

    BOOST_REQUIRE_EQUAL(vals.size(), 2);

    BOOST_CHECK_EQUAL(vals[0].GetKey(), 22);
    BOOST_CHECK_EQUAL(vals[1].GetKey(), 33);

    BOOST_CHECK_EQUAL(vals[0].GetValue().value, 222);
    BOOST_CHECK_EQUAL(vals[1].GetValue().value, 333);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestInitialQueryText)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    cache.Put(11, TestEntry(111));
    cache.Put(22, TestEntry(222));
    cache.Put(33, TestEntry(333));

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry, TextQuery("TestEntry", "222"));

    std::vector< CacheEntry<int, TestEntry> > vals;

    handle.GetInitialQueryCursor().GetAll(vals);

    BOOST_CHECK_THROW(handle.GetInitialQueryCursor(), IgniteError);

    BOOST_REQUIRE_EQUAL(vals.size(), 1);

    BOOST_CHECK_EQUAL(vals[0].GetKey(), 22);

    BOOST_CHECK_EQUAL(vals[0].GetValue().value, 222);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestBasicNoExcept)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    IgniteError err;

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry, err);

    BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_SUCCESS);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestInitialQueryScanNoExcept)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    cache.Put(11, TestEntry(111));
    cache.Put(22, TestEntry(222));
    cache.Put(33, TestEntry(333));

    IgniteError err;

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry, ScanQuery(), err);

    BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_SUCCESS);

    std::vector< CacheEntry<int, TestEntry> > vals;

    handle.GetInitialQueryCursor().GetAll(vals);

    BOOST_CHECK_THROW(handle.GetInitialQueryCursor(), IgniteError);

    BOOST_REQUIRE_EQUAL(vals.size(), 3);

    BOOST_CHECK_EQUAL(vals[0].GetKey(), 11);
    BOOST_CHECK_EQUAL(vals[1].GetKey(), 22);
    BOOST_CHECK_EQUAL(vals[2].GetKey(), 33);

    BOOST_CHECK_EQUAL(vals[0].GetValue().value, 111);
    BOOST_CHECK_EQUAL(vals[1].GetValue().value, 222);
    BOOST_CHECK_EQUAL(vals[2].GetValue().value, 333);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestInitialQuerySqlNoExcept)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    cache.Put(11, TestEntry(111));
    cache.Put(22, TestEntry(222));
    cache.Put(33, TestEntry(333));

    IgniteError err;

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry, SqlQuery("TestEntry", "value > 200"), err);

    BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_SUCCESS);

    std::vector< CacheEntry<int, TestEntry> > vals;

    handle.GetInitialQueryCursor().GetAll(vals);

    BOOST_CHECK_THROW(handle.GetInitialQueryCursor(), IgniteError);

    BOOST_REQUIRE_EQUAL(vals.size(), 2);

    BOOST_CHECK_EQUAL(vals[0].GetKey(), 22);
    BOOST_CHECK_EQUAL(vals[1].GetKey(), 33);

    BOOST_CHECK_EQUAL(vals[0].GetValue().value, 222);
    BOOST_CHECK_EQUAL(vals[1].GetValue().value, 333);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestInitialQueryTextNoExcept)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    cache.Put(11, TestEntry(111));
    cache.Put(22, TestEntry(222));
    cache.Put(33, TestEntry(333));

    IgniteError err;

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry, TextQuery("TestEntry", "222"), err);

    BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_SUCCESS);

    std::vector< CacheEntry<int, TestEntry> > vals;

    handle.GetInitialQueryCursor().GetAll(vals);

    BOOST_CHECK_THROW(handle.GetInitialQueryCursor(), IgniteError);

    BOOST_REQUIRE_EQUAL(vals.size(), 1);

    BOOST_CHECK_EQUAL(vals[0].GetKey(), 22);

    BOOST_CHECK_EQUAL(vals[0].GetValue().value, 222);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestExpiredQuery)
{
    Listener<int, TestEntry> lsnr;
    ContinuousQueryHandle<int, TestEntry> handle;

    {
        // Query scope.
        ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

        handle = cache.QueryContinuous(qry);
    }

    // Query is destroyed here.

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestSetGetLocal)
{
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    BOOST_CHECK(!qry.GetLocal());

    qry.SetLocal(true);

    BOOST_CHECK(qry.GetLocal());

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry);

    BOOST_CHECK(qry.GetLocal());

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestGetSetBufferSize)
{
    typedef ContinuousQuery<int, TestEntry> QueryType;
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    BOOST_CHECK_EQUAL(qry.GetBufferSize(), QueryType::DEFAULT_BUFFER_SIZE);

    qry.SetBufferSize(2 * QueryType::DEFAULT_BUFFER_SIZE);

    BOOST_CHECK_EQUAL(qry.GetBufferSize(), 2 * QueryType::DEFAULT_BUFFER_SIZE);

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry);

    BOOST_CHECK_EQUAL(qry.GetBufferSize(), 2 * QueryType::DEFAULT_BUFFER_SIZE);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestGetSetTimeInterval)
{
    typedef ContinuousQuery<int, TestEntry> QueryType;
    Listener<int, TestEntry> lsnr;

    ContinuousQuery<int, TestEntry> qry(MakeReference(lsnr));

    qry.SetBufferSize(10);

    BOOST_CHECK_EQUAL(qry.GetTimeInterval(), static_cast<int>(QueryType::DEFAULT_TIME_INTERVAL));

    qry.SetTimeInterval(500);

    BOOST_CHECK_EQUAL(qry.GetTimeInterval(), 500);

    ContinuousQueryHandle<int, TestEntry> handle = cache.QueryContinuous(qry);

    BOOST_CHECK_EQUAL(qry.GetTimeInterval(), 500);

    CheckEvents(cache, lsnr);
}

BOOST_AUTO_TEST_CASE(TestPublicPrivateConstantsConsistence)
{
    typedef ContinuousQuery<int, TestEntry> QueryType;
    typedef impl::cache::query::continuous::ContinuousQueryImpl<int, TestEntry> QueryImplType;

    BOOST_CHECK_EQUAL(static_cast<int>(QueryImplType::DEFAULT_TIME_INTERVAL),
        static_cast<int>(QueryType::DEFAULT_TIME_INTERVAL));

    BOOST_CHECK_EQUAL(static_cast<int>(QueryImplType::DEFAULT_BUFFER_SIZE),
        static_cast<int>(QueryType::DEFAULT_BUFFER_SIZE));
}

BOOST_AUTO_TEST_SUITE_END()


text:
"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
var _exportNames = {};
var _monitorsJs = _interopRequireWildcard(require("./monitors.js"));
Object.keys(_monitorsJs).forEach(function(key) {
    if (key === "default" || key === "__esModule") return;
    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
    if (key in exports && exports[key] === _monitorsJs[key]) return;
    Object.defineProperty(exports, key, {
        enumerable: true,
        get: function() {
            return _monitorsJs[key];
        }
    });
});
var _optionsJs = _interopRequireWildcard(require("./options.js"));
Object.keys(_optionsJs).forEach(function(key) {
    if (key === "default" || key === "__esModule") return;
    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
    if (key in exports && exports[key] === _optionsJs[key]) return;
    Object.defineProperty(exports, key, {
        enumerable: true,
        get: function() {
            return _optionsJs[key];
        }
    });
});
var _connectorsJs = _interopRequireWildcard(require("./connectors.js"));
Object.keys(_connectorsJs).forEach(function(key) {
    if (key === "default" || key === "__esModule") return;
    if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
    if (key in exports && exports[key] === _connectorsJs[key]) return;
    Object.defineProperty(exports, key, {
        enumerable: true,
        get: function() {
            return _connectorsJs[key];
        }
    });
});
function _interopRequireWildcard(obj) {
    if (obj && obj.__esModule) {
        return obj;
    } else {
        var newObj = {};
        if (obj != null) {
            for(var key in obj){
                if (Object.prototype.hasOwnProperty.call(obj, key)) {
                    var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
                    if (desc.get || desc.set) {
                        Object.defineProperty(newObj, key, desc);
                    } else {
                        newObj[key] = obj[key];
                    }
                }
            }
        }
        newObj.default = obj;
        return newObj;
    }
}

//# sourceMappingURL=index.js.map


text:
// -*- C++ -*-
/**
 * \file BasicBST.h
 * \author Stetson Bost
 * \brief Serves as a fully-implemented base class for other BSTs
 *
 */

#ifndef BASIC_BST_H
#define BASIC_BST_H
#include <cstddef>
#include <iostream>
// #include <string>

template <class Item>
class BasicBST {
 private:
  //template <class iteratorIsConst>
  class Iterator; //<iteratorIsConst>;

 public:
  using iterator = BasicBST::Iterator; // <false>;
  // using const_iterator = Iterator<true>;

  /*
   * \brief Default constructor
   */
  BasicBST();

  /*
   * \brief Copy constructor
   */
  BasicBST(const BasicBST& tree);

  /*
   * \brief Assignment operator
   */
  BasicBST<Item> operator=(const BasicBST& tree);

  /*
   * \brief Default destructor
   */
  ~BasicBST();

  /*
   * \brief returns size of the tree
   */
  size_t size() const;

  /*
   * \brief Inserts key into the tree
   */
  void insert(const Item& value);

  /**
   * \brief Erase element at iter
   * \param iter iterator pointing to the character to erase ????????????????????
   *
   * \warning invalidates all iterators except the returned iterator ??????????????????????
   */
  void erase(const Item& value);

  /*
   * \brief Finds a value in the tree
   * \TODO: MAKE THIS RETURN A NODE* or ITERATOR POINTING TO THE FOUND LOCATION!!!!!!!!!
   */
  iterator find(const Item& value) const;

  /// Return an iterator to the first element in the Tree
  iterator begin() const;
  /// Return an iterator to "one past the last"
  iterator end() const;
  // /// Return a const iterator to the first element in the Tree
  // const_iterator begin() const;
  // /// Return a const iterator to "one past the last"
  // const_iterator end() const;

  /*
   * \brief Calculates average node depth of tree
   */
  double calculateAverageNodeDepth() const;

  /*
   * \brief Calculates height of tree
   */
  int calculateHeight() const;

  void outputAllValues() const;

 private:
  class Node {
    Item value_;
    Node* left_;
    Node* right_;

    friend class BasicBST;
    friend class BasicBST<Item>::Iterator;
  };

  void BasicBSTNode(Node*& newTree, const Node*& oldTree);
  void destroyNode(Node& node);
  void insertNode(const Item& value, Node& node);
  void eraseNode(const Item& value, Node*& node);
  void resetParentChild(Node*& parent, const Node*& child,
      const Node*& newChild) const;
  iterator findNode(const Item& value, const Node& node) const;
  iterator beginNode(const Node& node) const;
  void outputAllValuesNode(const Node* node) const;
  iterator leftmostNode(const Node*& node) const;
  iterator rightmostNode(const Node*& node) const;

  /// size of the tree
  size_t size_;
  /// pointer to the root of the tree
  Node* root_;

  // template <bool iteratorIsConst>
  class Iterator {
   public:
    // Definitions that are required for this class to be a well-behaved
    // STL-style iterator that moves forward through a collection of ints.
    using value_type = Item;
    using reference = value_type&;
    using pointer = value_type*;
    using difference_type = ptrdiff_t;
    using iterator_category = std::forward_iterator_tag;

    /*
     * \brief Default constructor - disabled
     */
    Iterator() = default;
    // Iterator(const Iterator&) = default;
    // Iterator& operator=(const Iterator&) = default;
    ~Iterator() = default;

    /**
     * This member function serves two purposes, depending on the type
     * of this iterator.
     *
     * If this iterator is not a const_iterator
     *  (i.e., iteratorIsConst is false), then this member function
     *  is the copy constructor.
     *
     * If this iterator is a const_iterator (i.e., iteratorIsConst is true),
     * then this member function converts a non-const iterator to a
     * const_iterator.
     */
    Iterator(const BasicBST<Item>::iterator& iter) = default;

    // // Make Iterator STL-friendly with these typedefs:
    // using value_type = char;
    // // The reference type depends (at compile-time!) on whether
    // //  the iterator is a const_iterator or not.
    // using reference =
    //     typename std::conditional<iteratorIsConst, const value_type&,
    //                               value_type&>::type;
    // // The pointer type depends (at compile-time!) on whether
    // //  the iterator is a const_iterator or not.
    // using pointer =
    //     typename std::conditional<iteratorIsConst, const value_type*,
    //                               value_type*>::type;
    // using difference_type = ptrdiff_t;
    // using iterator_category = std::bidirectional_iterator_tag;
    // using const_reference = const value_type&;

    // // Operations
    // Iterator& operator++();
    // Iterator& operator--();
    // reference operator*() const;
    // bool operator==(const Iterator& rhs) const;
    // bool operator!=(const Iterator& rhs) const;

   private:
    friend class BasicBST;

    /// Parameterized Constructor
    Iterator(const Node* node);

    /// Private data members
    Node* node_;
    // Node* next_; // ??? maybe ???
    // Node* prev_; // ??? maybe ???
  };
};

#include "BasicBST-private.h"

#endif  // BASIC_BST_H


text:
package org.odata4j.format.xml;

import java.io.Reader;

import org.odata4j.core.OSimpleObject;
import org.odata4j.core.OSimpleObjects;
import org.odata4j.edm.EdmSimpleType;
import org.odata4j.format.FormatParser;
import org.odata4j.format.Settings;
import org.odata4j.stax2.XMLEventReader2;
import org.odata4j.stax2.util.StaxUtil;

public class AtomSimpleObjectFormatParser implements FormatParser<OSimpleObject<?>> {

  private final Settings settings;

  public AtomSimpleObjectFormatParser(Settings settings) {
    this.settings = settings;
  }

  @Override
  public OSimpleObject<?> parse(Reader reader) {
    XMLEventReader2 xmlReader = StaxUtil.newXMLEventReader(reader);
    xmlReader.nextEvent(); // start doc
    xmlReader.nextEvent(); // start element

    String text = xmlReader.getElementText();
    EdmSimpleType<?> type = EdmSimpleType.STRING;
    if (settings != null && settings.parseType != null && settings.parseType.isSimple())
      type = (EdmSimpleType<?>) settings.parseType;
    return OSimpleObjects.parse(type, text);
  }

}


text:
/// <reference path='fourslash.ts'/>

// @filename: /a.ts
////export const a = null;

// @filename: /b.ts
////import { a } from './a';
////
////const foo = { '"a name\'s all good but it\'s better with more"': null };
////foo[|./**/|]

goTo.file("/b.ts");
verify.completions({
    marker: "",
    exact: [
        { name: "\"a name's all good but it's better with more\"", insertText: "['\"a name\\'s all good but it\\'s better with more\"']", replacementSpan: test.ranges()[0] },
    ],
    preferences: {
        includeInsertTextCompletions: true,
        quotePreference: "auto"
    }
});


text:
.dojoxPortlet {
	margin-bottom: 5px;
}
.dojoxPortlet .dijitTitlePaneTitle .dojoxPortletIcon {
	width: 15px;
	height: 15px;
	float: right;
	cursor: pointer;
	background-repeat: no-repeat;
}
.tundra .dojoxPortlet-movable .dijitTitlePaneTitle,
.soria .dojoxPortlet-movable .dijitTitlePaneTitle,
.nihilo .dojoxPortlet-movable .dijitTitlePaneTitle {
	cursor: move;
}
.dojoxPortlet .dijitTitlePaneTitle {
	font-weight: bold;
	font-size: 0.9em;
}
.soria .dojoxPortlet .dijitTitlePaneTitle {
	color: #243C5F;
}
.tundra .dojoxPortlet .dijitTitlePaneTitle,
.nihilo .dojoxPortlet .dijitTitlePaneTitle {
	color: #333;
}
.dojoxPortlet-nonmovable .dijitTitlePaneTitle {
	cursor: default;
}
.tundra .dojoxPortlet .dojoxPortletIcon {
	background-image: url("../../../dijit/themes/tundra/images/spriteRoundedIconsSmall.gif");
}
.soria .dojoxPortlet .dojoxPortletIcon {
	background-image: url("../../../dijit/themes/soria/images/spriteRoundedIconsSmall.gif");
}
.nihilo .dojoxPortlet .dojoxPortletIcon {
	background-image: url("../../../dijit/themes/nihilo/images/spriteRoundedIconsSmall.gif");
}
.claro .dojoxPortlet .dojoxPortletIcon {
	background-image: url("../../../dijit/themes/tundra/images/spriteRoundedIconsSmall.gif");
}
.dojoxPortlet .dojoxCloseNode {
	background-position: right 0px;
}
.dojoxPortlet .dojoxCloseNodeHover {
	background-position: right -15px;
}
.tundra .dojoxPortlet .dijitOpen .dojoxArrowDown,
.soria .dojoxPortlet .dijitOpen .dojoxArrowDown,
.nihilo .dojoxPortlet .dijitOpen .dojoxArrowDown,
.claro .dojoxPortlet .dijitOpen .dojoxArrowDown{
	background-position: -15px top;
}
.tundra .dojoxPortlet .dijitClosed .dojoxArrowDown,
.soria .dojoxPortlet .dijitClosed .dojoxArrowDown,
.nihilo .dojoxPortlet .dijitClosed .dojoxArrowDown,
.claro .dojoxPortlet .dijitClosed .dojoxArrowDown {
	background-position: 0 top;
}
.tundra .dojoxPortlet .dojoxPortletSettingsIcon,
.soria .dojoxPortlet .dojoxPortletSettingsIcon,
.nihilo .dojoxPortlet .dojoxPortletSettingsIcon,
.claro .dojoxPortlet .dojoxPortletSettingsIcon {
	background-image: url(images/icons.png);
	background-position: 0 1px;
}
.tundra .dojoxPortletSettingsContainer,
.soria .dojoxPortletSettingsContainer,
.nihilo .dojoxPortletSettingsContainer,
.claro .dojoxPortletSettingsContainer {
	border-bottom: 1px solid #BFBFBF;
	padding: 4px;
}
.tundra .dijitDialogPaneContent .dojoxPortletSettingsContainer,
.soria .dijitDialogPaneContent .dojoxPortletSettingsContainer,
.nihilo .dijitDialogPaneContent .dojoxPortletSettingsContainer,
.claro .dijitDialogPaneContent .dojoxPortletSettingsContainer {
	border-bottom: none;
}
.tundra .dijitDialogPaneContent .dojoxPortletSettingsContainer,
.soria .dijitDialogPaneContent .dojoxPortletSettingsContainer,
.nihilo .dijitDialogPaneContent .dojoxPortletSettingsContainer {
	border-bottom: none;
}
.soria .dojoDndItemOver .dojoxPortletTitle {
	border-top: 1px solid #8D8D8D;
	border-left: 1px solid #8D8D8D;
	border-right: 1px solid #8D8D8D;
}
.soria .dojoDndItemOver .dojoxPortletContentOuter {
  border-bottom: 1px solid #9D9D9D;
	border-left: 1px solid #9D9D9D;
	border-right: 1px solid #9D9D9D;
}
.dojoxPortlet div.dojoxPortletContentOuter {
	background: #fff url(../../../dijit/themes/tundra/images/validationInputBg.gif) repeat-x top left;
}
.dojoxFeedPortletList {
	padding-left: 25px;
	margin: 0px;
}
.dojoxFeedPortletExpandableList {
	padding-left: 0px;
	margin: 0px;
}
.dojoxFeedPortletExpandableList li {
	margin-bottom: 5px;
}
.dojoxFeedPortletList li {
	padding-top: 4px;
}
.dojoxFeedPortletPreview {
	max-height: 300px;
	max-width: 400px;
	overflow: hidden;
}
.dojoxFeedPortletPreview * {
	max-height: 295px;
	max-width: 395px;
}
.dojoxPortletFeedSettings {
	padding: 5px;
	border-bottom: 1px solid #9D9D9D;
}
.dojoxFeedPortletExpandableList {
	list-style: none;
}
.dojoxPortletToggleIcon {
	margin-right: 6px;
	cursor: pointer;
}
.dojoxPortletToggleIcon img {
	width: 15px;
	height: 14px;
}
.dojoxPortletItemCollapsed .dojoxPortletToggleIcon {
	background: url(../../../dijit/themes/tundra/images/plusButton.gif) no-repeat 0 0;
}
.dojoxPortletItemOpen .dojoxPortletToggleIcon {
	background: url(../../../dijit/themes/tundra/images/minusButton.gif) no-repeat 0 0;
}
.dojoxPortletItemSummary {
	margin-left: 20px;
}
.dojoxPortletItemCollapsed .dojoxPortletItemSummary {
  display: none;
}
.dojoxPortletItemOpen .dojoxPortletItemSummary {
  display: block;
}


text:
package bazooka.server.persistence

import bazooka.common.model._
import com.google.inject._
import javax.persistence._

class ConfigurationRepository(entityManager: Provider[EntityManager]) extends Repository {

  em = entityManager

  def getConfigurationByName(configuration: String) = {
    getSingleResult("from Configuration c where c.name=:name", Map("name" -> configuration))
      .asInstanceOf[Configuration]
  }

  def listConfigurations() = {
    getResultList("select c from Configuration c order by c.name")
      .asInstanceOf[java.util.List[Configuration]]
  }

  def configurationExists(configuration: String): Boolean = {
    try {
      getSingleResult("select c.id from Configuration c where c.name=:name", Map("name" -> configuration))
        .isInstanceOf[java.lang.Integer]
    }
    catch {
      case ex => false
    }
  }
}


text:
    Description
    <textarea ng-model="vis.params.wd_generator.description" class="form-control" rows="5"></textarea>

    Data Generator Host
    <input type="text" ng-model="vis.params.wd_generator.host" class="form-control"/>


text:
namespace android.widget
{
	[global::MonoJavaBridge.JavaClass()]
	public partial class EditText : android.widget.TextView
	{
		internal new static global::MonoJavaBridge.JniGlobalHandle staticClass;
		protected EditText(global::MonoJavaBridge.JNIEnv @__env) : base(@__env)
		{
		}
		private static global::MonoJavaBridge.MethodId _m0;
		public override void setText(java.lang.CharSequence arg0, android.widget.TextView.BufferType arg1)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::android.widget.EditText.staticClass, "setText", "(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;)V", ref global::android.widget.EditText._m0, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
		}
		public void setText(string arg0, android.widget.TextView.BufferType arg1)
		{
			setText((global::java.lang.CharSequence)(global::java.lang.String)arg0, arg1);
		}
		private static global::MonoJavaBridge.MethodId _m1;
		public virtual void selectAll()
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::android.widget.EditText.staticClass, "selectAll", "()V", ref global::android.widget.EditText._m1);
		}
		public new global::android.text.Editable Text
		{
			get
			{
				return getText();
			}
		}
		private static global::MonoJavaBridge.MethodId _m2;
		public virtual global::android.text.Editable getText()
		{
			return global::MonoJavaBridge.JavaBridge.CallIJavaObjectMethod<android.text.Editable>(this, global::android.widget.EditText.staticClass, "getText", "()Landroid/text/Editable;", ref global::android.widget.EditText._m2) as android.text.Editable;
		}
		public new int Selection
		{
			set
			{
				setSelection(value);
			}
		}
		private static global::MonoJavaBridge.MethodId _m3;
		public virtual void setSelection(int arg0)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::android.widget.EditText.staticClass, "setSelection", "(I)V", ref global::android.widget.EditText._m3, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
		}
		private static global::MonoJavaBridge.MethodId _m4;
		public virtual void setSelection(int arg0, int arg1)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::android.widget.EditText.staticClass, "setSelection", "(II)V", ref global::android.widget.EditText._m4, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
		}
		protected new bool DefaultEditable
		{
			get
			{
				return getDefaultEditable();
			}
		}
		private static global::MonoJavaBridge.MethodId _m5;
		protected override bool getDefaultEditable()
		{
			return global::MonoJavaBridge.JavaBridge.CallBooleanMethod(this, global::android.widget.EditText.staticClass, "getDefaultEditable", "()Z", ref global::android.widget.EditText._m5);
		}
		protected new global::android.text.method.MovementMethod DefaultMovementMethod
		{
			get
			{
				return getDefaultMovementMethod();
			}
		}
		private static global::MonoJavaBridge.MethodId _m6;
		protected override global::android.text.method.MovementMethod getDefaultMovementMethod()
		{
			return global::MonoJavaBridge.JavaBridge.CallIJavaObjectMethod<android.text.method.MovementMethod>(this, global::android.widget.EditText.staticClass, "getDefaultMovementMethod", "()Landroid/text/method/MovementMethod;", ref global::android.widget.EditText._m6) as android.text.method.MovementMethod;
		}
		public new global::android.text.TextUtils.TruncateAt Ellipsize
		{
			set
			{
				setEllipsize(value);
			}
		}
		private static global::MonoJavaBridge.MethodId _m7;
		public override void setEllipsize(android.text.TextUtils.TruncateAt arg0)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::android.widget.EditText.staticClass, "setEllipsize", "(Landroid/text/TextUtils$TruncateAt;)V", ref global::android.widget.EditText._m7, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
		}
		private static global::MonoJavaBridge.MethodId _m8;
		public virtual void extendSelection(int arg0)
		{
			global::MonoJavaBridge.JavaBridge.CallVoidMethod(this, global::android.widget.EditText.staticClass, "extendSelection", "(I)V", ref global::android.widget.EditText._m8, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
		}
		private static global::MonoJavaBridge.MethodId _m9;
		public EditText(android.content.Context arg0) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			if (global::android.widget.EditText._m9.native == global::System.IntPtr.Zero)
				global::android.widget.EditText._m9 = @__env.GetMethodIDNoThrow(global::android.widget.EditText.staticClass, "<init>", "(Landroid/content/Context;)V");
			global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.widget.EditText.staticClass, global::android.widget.EditText._m9, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
			Init(@__env, handle);
		}
		private static global::MonoJavaBridge.MethodId _m10;
		public EditText(android.content.Context arg0, android.util.AttributeSet arg1) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			if (global::android.widget.EditText._m10.native == global::System.IntPtr.Zero)
				global::android.widget.EditText._m10 = @__env.GetMethodIDNoThrow(global::android.widget.EditText.staticClass, "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;)V");
			global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.widget.EditText.staticClass, global::android.widget.EditText._m10, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
			Init(@__env, handle);
		}
		private static global::MonoJavaBridge.MethodId _m11;
		public EditText(android.content.Context arg0, android.util.AttributeSet arg1, int arg2) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			if (global::android.widget.EditText._m11.native == global::System.IntPtr.Zero)
				global::android.widget.EditText._m11 = @__env.GetMethodIDNoThrow(global::android.widget.EditText.staticClass, "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V");
			global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.widget.EditText.staticClass, global::android.widget.EditText._m11, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
			Init(@__env, handle);
		}
		static EditText()
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			global::android.widget.EditText.staticClass = @__env.NewGlobalRef(@__env.FindClass("android/widget/EditText"));
		}
	}
}


text:
package org.pentaho.di.trans.steps.calculator;

import java.util.Arrays;
import java.util.List;

import org.pentaho.di.core.CheckResult;
import org.pentaho.di.core.CheckResultInterface;
import org.pentaho.di.core.database.DatabaseMeta;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.exception.KettleStepException;
import org.pentaho.di.core.exception.KettleXMLException;
import org.pentaho.di.core.row.RowMetaInterface;
import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.di.core.row.value.ValueMetaFactory;
import org.pentaho.di.core.util.Utils;
import org.pentaho.di.core.variables.VariableSpace;
import org.pentaho.di.core.xml.XMLHandler;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.repository.ObjectId;
import org.pentaho.di.repository.Repository;
import org.pentaho.di.trans.Trans;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.BaseStepMeta;
import org.pentaho.di.trans.step.StepDataInterface;
import org.pentaho.di.trans.step.StepInterface;
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.StepMetaInterface;
import org.pentaho.metastore.api.IMetaStore;
import org.w3c.dom.Node;

/**
 * Contains the meta-data for the Calculator step: calculates predefined formula's
 *
 * @since 08 september 2005
 */
public class CalculatorMeta extends BaseStepMeta implements StepMetaInterface {
  private static Class<?> PKG = CalculatorMeta.class; // for i18n purposes, needed by Translator2!!

  /** The calculations to be performed */
  private CalculatorMetaFunction[] calculation;

  public CalculatorMetaFunction[] getCalculation() {
    return calculation;
  }

  public void setCalculation( CalculatorMetaFunction[] calcTypes ) {
    this.calculation = calcTypes;
  }

  public void allocate( int nrCalcs ) {
    calculation = new CalculatorMetaFunction[nrCalcs];
  }

  @Override
  public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException {
    int nrCalcs = XMLHandler.countNodes( stepnode, CalculatorMetaFunction.XML_TAG );
    allocate( nrCalcs );
    for ( int i = 0; i < nrCalcs; i++ ) {
      Node calcnode = XMLHandler.getSubNodeByNr( stepnode, CalculatorMetaFunction.XML_TAG, i );
      calculation[i] = new CalculatorMetaFunction( calcnode );
    }
  }

  @Override
  public String getXML() {
    StringBuilder retval = new StringBuilder( 300 );

    if ( calculation != null ) {
      for ( CalculatorMetaFunction aCalculation : calculation ) {
        retval.append( aCalculation.getXML() );
      }
    }

    return retval.toString();
  }

  @Override
  public boolean equals( Object obj ) {
    if ( obj != null && ( obj.getClass().equals( this.getClass() ) ) ) {
      CalculatorMeta m = (CalculatorMeta) obj;
      return ( getXML().equals( m.getXML() ) );
    }

    return false;
  }

  @Override
  public int hashCode() {
    return Arrays.hashCode( calculation );
  }

  @Override
  public Object clone() {
    CalculatorMeta retval = (CalculatorMeta) super.clone();
    if ( calculation != null ) {
      retval.allocate( calculation.length );
      for ( int i = 0; i < calculation.length; i++ ) {
        ( retval.getCalculation() )[i] = (CalculatorMetaFunction) calculation[i].clone();
      }
    } else {
      retval.allocate( 0 );
    }
    return retval;
  }

  @Override
  public void setDefault() {
    calculation = new CalculatorMetaFunction[0];
  }

  @Override
  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    int nrCalcs = rep.countNrStepAttributes( id_step, "field_name" );
    allocate( nrCalcs );
    for ( int i = 0; i < nrCalcs; i++ ) {
      calculation[i] = new CalculatorMetaFunction( rep, id_step, i );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    for ( int i = 0; i < calculation.length; i++ ) {
      calculation[i].saveRep( rep, metaStore, id_transformation, id_step, i );
    }
  }

  @Override
  public void getFields( RowMetaInterface row, String origin, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
    for ( CalculatorMetaFunction fn : calculation ) {
      if ( !fn.isRemovedFromResult() ) {
        if ( !Utils.isEmpty( fn.getFieldName() ) ) { // It's a new field!
          ValueMetaInterface v = getValueMeta( fn, origin );
          row.addValueMeta( v );
        }
      }
    }
  }

  private ValueMetaInterface getValueMeta( CalculatorMetaFunction fn, String origin ) {
    ValueMetaInterface v;
    // What if the user didn't specify a data type?
    // In that case we look for the default data type
    //
    int defaultResultType = fn.getValueType();
    if ( defaultResultType == ValueMetaInterface.TYPE_NONE ) {
      defaultResultType = CalculatorMetaFunction.getCalcFunctionDefaultResultType( fn.getCalcType() );
    }
    try {
      v = ValueMetaFactory.createValueMeta( fn.getFieldName(), defaultResultType );
    } catch ( Exception ex ) {
      return null;
    }
    v.setLength( fn.getValueLength() );
    v.setPrecision( fn.getValuePrecision() );
    v.setOrigin( origin );
    v.setComments( fn.getCalcTypeDesc() );
    v.setConversionMask( fn.getConversionMask() );
    v.setDecimalSymbol( fn.getDecimalSymbol() );
    v.setGroupingSymbol( fn.getGroupingSymbol() );
    v.setCurrencySymbol( fn.getCurrencySymbol() );

    return v;
  }

  public RowMetaInterface getAllFields( RowMetaInterface inputRowMeta ) {
    RowMetaInterface rowMeta = inputRowMeta.clone();

    for ( CalculatorMetaFunction fn : getCalculation() ) {
      if ( !Utils.isEmpty( fn.getFieldName() ) ) { // It's a new field!
        ValueMetaInterface v = getValueMeta( fn, null );
        rowMeta.addValueMeta( v );
      }
    }
    return rowMeta;
  }

  @Override
  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ) {
    CheckResult cr;

    // See if we have input streams leading to this step!
    if ( input.length > 0 ) {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "CalculatorMeta.CheckResult.ExpectedInputOk" ), stepMeta );
      remarks.add( cr );

      if ( prev == null || prev.size() == 0 ) {
        cr =
          new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString(
            PKG, "CalculatorMeta.CheckResult.ExpectedInputError" ), stepMeta );
        remarks.add( cr );
      } else {
        cr =
          new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
            PKG, "CalculatorMeta.CheckResult.FieldsReceived", "" + prev.size() ), stepMeta );
        remarks.add( cr );
      }
    } else {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(
          PKG, "CalculatorMeta.CheckResult.ExpectedInputError" ), stepMeta );
      remarks.add( cr );
    }
  }

  @Override
  public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
    Trans trans ) {
    return new Calculator( stepMeta, stepDataInterface, cnr, tr, trans );
  }

  @Override
  public StepDataInterface getStepData() {
    return new CalculatorData();
  }
}


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

(async function() {
  TestRunner.addResult(`Tests the AudioContextSelector.`);
  await TestRunner.loadLegacyModule('web_audio');

  /** @type {!Protocol.WebAudio.BaseAudioContext} */
  const context1 = {
    contextId: '924c4ee4-4cae-4e62-b4c6-71603edc39fd',
    contextType: 'realtime'
  };
  /** @type {!Protocol.WebAudio.BaseAudioContext} */
  const context2 = {
    contextId: '78a3e94e-4968-4bf6-8905-325109695c9e',
    contextType: 'realtime'
  };

  function dumpSelectorState(
      /** @type {!WebAudio.AudioContextSelector} */ selector) {
    TestRunner.addResult(`
Number of contexts (items): ${selector.items.length}
Title: ${selector.toolbarItem().title}}
Selected Context: ${JSON.stringify(selector.selectedContext(), null, 3)}
`);
  }

  TestRunner.runAsyncTestSuite([
    async function testStartsEmpty() {
      const selector = new WebAudio.AudioContextSelector();

      dumpSelectorState(selector);
    },

    async function testSelectsCreatedContext() {
      const selector = new WebAudio.AudioContextSelector();

      selector.contextCreated({data: context1});

      dumpSelectorState(selector);
    },

    async function testResetClearsList() {
      const selector = new WebAudio.AudioContextSelector();

      selector.contextCreated({data: context1});
      selector.reset();

      dumpSelectorState(selector);
    },

    async function testReSelectsCreatedContextAfterChange() {
      const selector = new WebAudio.AudioContextSelector();

      selector.contextCreated({data: context1});
      selector.contextChanged({data: context1});

      dumpSelectorState(selector);
    },

    async function testFirstCreatedContextStaysSelected() {
      const selector = new WebAudio.AudioContextSelector();

      selector.contextCreated({data: context1});
      selector.contextCreated({data: context2});

      dumpSelectorState(selector);
    },

    async function testChangingContextDoesNotChangeSelection() {
      const selector = new WebAudio.AudioContextSelector();

      selector.contextCreated({data: context1});
      selector.contextCreated({data: context2});
      selector.contextChanged({data: context2});

      dumpSelectorState(selector);
    },

    async function testSelectedContextBecomesSelected() {
      const selector = new WebAudio.AudioContextSelector();

      selector.contextCreated({data: context1});
      selector.contextCreated({data: context2});
      selector.itemSelected(context2);

      dumpSelectorState(selector);
    },

    async function testOnListItemReplacedCalled() {
      function dumpItemCount() {
        TestRunner.addResult(
            `onListItemReplaced called with contexts (items) count: ${
                this.items.length}`);
      }

      TestRunner.addSniffer(
          WebAudio.AudioContextSelector.prototype, 'onListItemReplaced',
          dumpItemCount);

      const selector = new WebAudio.AudioContextSelector();
      selector.contextCreated({data: context1});
      selector.contextChanged({data: context1});

      dumpSelectorState(selector);
    },
  ]);
})();


text:
import { IconSize } from 'cd-interfaces';

export const ICON_ELEMENT_TAG = 'cd-icon-element';
export const USE_MAT_ICON_INPUT = 'useMatIcon';
export const ICON_NAME_VALUE = 'iconName';
export const PRIMITIVE_ICON_TAG = 'i';
export const PRIMITIVE_ICON_CLASS = 'cd-primitive-icon';
export const MAT_ICON_TAG = 'mat-icon';
export const ACE_ICON_TAG = 'ace-icon';
export const ACE_ICONSET_INPUT = 'iconset';
export const ACE_SIZE_INPUT = 'size';
export const ICON_DATA_SRC = '/assets/design-system/icons.json';
export const COMMON_ICONSET = 'common';
export const BLUR_ACTION_ICON = 'crop_free';
export const FOCUS_ACTION_ICON = 'filter_center_focus';

export const SIZE_LOOKUP = {
  [IconSize.Small]: '18',
  [IconSize.Medium]: '24',
  [IconSize.Large]: '32',
};

export const LayerIcons = {
  Home: 'home_filled',
  Board: 'crop_landscape',
  Folder: 'folder_open',
  Component: 'thermostat_carbon',
  GenericElement: '/assets/icons/element.svg',
  Icon: 'local_florist',
  Code: 'code',
} as const;


text:
package fake

import (
	"context"
	"testing"

	"github.com/jenkins-x/go-scm/scm"
	"github.com/stretchr/testify/require"
)

// AssertRepoExists asserts that the repository exists
func AssertRepoExists(ctx context.Context, t *testing.T, client *scm.Client, repo string) *scm.Repository {
	require.NotEmpty(t, repo, "no repository name")
	require.NotNil(t, client, "no scm client")
	require.NotNil(t, client.Repositories, "scm client does not support Repositories")

	repository, _, err := client.Repositories.Find(ctx, repo)

	if err != nil && scm.IsScmNotFound(err) {
		err = nil
	}
	require.NoError(t, err, "failed to find repo %s", repo)
	require.NotNil(t, repository, "no repository returned for %s", repo)
	return repository
}

// AssertNoRepoExists asserts that the repository does not exist
func AssertNoRepoExists(ctx context.Context, t *testing.T, client *scm.Client, repo string) {
	require.NotEmpty(t, repo, "no repository name")
	require.NotNil(t, client, "no scm client")
	require.NotNil(t, client.Repositories, "scm client does not support Repositories")

	_, _, err := client.Repositories.Find(ctx, repo)
	require.Error(t, err, "expected not found error when looking up repo %s", repo)
	require.True(t, scm.IsScmNotFound(err), "should have returned an is not found error for repo %s", repo)
}


text:
package eportfolium.com.karuta.consumer.contract.dao;
// Generated 21 sept. 2017 22:49:01 by Hibernate Tools 5.2.3.Final

import java.io.Serializable;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.List;
import java.util.Map;

import eportfolium.com.karuta.model.bean.Configuration;
import eportfolium.com.karuta.model.exception.DoesNotExistException;

/**
 * Home object for domain model class PsConfiguration.
 *
 * @see dulocaldansnosassiettes.business.domain.prestashop.dataobject.PsConfiguration
 * @author Hibernate Tools
 */
public interface ConfigurationDao {

	void persist(Configuration transientInstance);

	void remove(Configuration persistentInstance);

	Configuration merge(Configuration detachedInstance);

	Configuration findById(Serializable id) throws DoesNotExistException;

	/**
	 * Load all configuration data
	 */
	public void loadConfiguration();

	/**
	 * Get a single configuration value (in one language only)
	 *
	 * @param string  key Key wanted
	 * @param id_lang Language ID
	 *
	 * @return string Value
	 */

	String get(String key, Integer id_lang);

	/**
	 * Get a single configuration value (in one language only)
	 *
	 * @param string key Key wanted
	 * @return string Value
	 */
	String get(String key);

	Map<String, String> getMultiple(List<String> keys);

	/**
	 * Get several configuration values (in one language only)
	 *
	 * @param array   keys Keys wanted
	 * @param integer id_lang Language ID
	 * @return array Values
	 */
	public Map<String, String> getMultiple(List<String> keys, Integer id_lang);

	/**
	 * Update configuration key and value into database (automatically insert if key
	 * does not exist)
	 *
	 * Values are inserted/updated directly using SQL, because using (Configuration)
	 * ObjectModel may not insert values correctly (for example, HTML is escaped,
	 * when it should not be).
	 *
	 * @TODO Fix saving HTML values in Configuration model
	 *
	 * @param string  key Key
	 * @param mixed   values values is an array if the configuration is
	 *                multilingual, a single string else.
	 * @param boolean html Specify if html is authorized in value
	 * @return boolean Update result
	 */
	boolean updateValue(String key, Map<Integer, String> values, boolean html);

	/**
	 * Set TEMPORARY a single configuration value (in one language only)
	 *
	 * @param string key Key wanted
	 * @param mixed  values values is an array if the configuration is multilingual,
	 *               a single string else.
	 */
	void set(String key, Map<Integer, String> values);

	/**
	 * Return ID a configuration key
	 *
	 * @param string key
	 * @return long Configuration key ID
	 */
	Long getIdByName(String key);

	/**
	 * Return Value a configuration value
	 *
	 * @param string key
	 * @return a string, configuration value
	 */
	String getValueByName(String key);

	String getDomain();

	String getDomainSsl();

	ResultSet findAll(String table, Connection con);

	List<Configuration> findAll();

	void removeAll();

}


text:
package org.apache.hadoop.hdfs.server.namenode;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import org.apache.hadoop.fs.*;
import org.apache.hadoop.hdfs.*;
import org.apache.hadoop.hdfs.server.common.*;
import org.apache.hadoop.hdfs.server.namenode.*;
import org.apache.hadoop.hdfs.server.datanode.*;
import org.apache.hadoop.hdfs.protocol.*;
import org.apache.hadoop.util.*;
import java.text.DateFormat;
import java.lang.Math;
import java.net.URLEncoder;

public final class dfsnodelist_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

	JspHelper jspHelper = new JspHelper();

	int rowNum = 0;
	int colNum = 0;

	String rowTxt() { colNum = 0;
	return "
 "; }
	String colTxt() { return " "; }
	void counterReset () { colNum = 0; rowNum = 0 ; }

	long diskBytes = 1024 * 1024 * 1024;
	String diskByteStr = "GB";

	String sorterField = null;
	String sorterOrder = null;
	String whatNodes = "LIVE";

String NodeHeaderStr(String name) {
	String ret = "class=header";
	String order = "ASC";
	if ( name.equals( sorterField ) ) {
		ret += sorterOrder;
		if ( sorterOrder.equals("ASC") )
			order = "DSC";
	}
	ret += " onClick=\"window.document.location=" +
	"'/dfsnodelist.jsp?whatNodes="+whatNodes+"&sorter/field=" + name + "&sorter/order=" +
	order + "'\" title=\"sort on this column\"";

	return ret;
}

public void generateNodeData( JspWriter out, DatanodeDescriptor d,
		String suffix, boolean alive,
		int nnHttpPort )
throws IOException {

	/* Say the datanode is dn1.hadoop.apache.org with ip 192.168.0.5
we use:
1) d.getHostName():d.getPort() to display.
Domain and port are stripped if they are common across the nodes.
i.e. "dn1"
2) d.getHost():d.Port() for "title".
i.e. "192.168.0.5:50010"
3) d.getHostName():d.getInfoPort() for url.
i.e. "http://dn1.hadoop.apache.org:50075/..."
Note that "d.getHost():d.getPort()" is what DFS clients use
to interact with datanodes.
	 */
	// from nn_browsedfscontent.jsp:
	String url = "http://" + d.getHostName() + ":" + d.getInfoPort() +
	"/browseDirectory.jsp?namenodeInfoPort=" +
	nnHttpPort + "&dir=" +
	URLEncoder.encode("/", "UTF-8");

	String name = d.getHostName() + ":" + d.getPort();
	if ( !name.matches( "\\d+\\.\\d+.\\d+\\.\\d+.*" ) )
		name = name.replaceAll( "\\.[^.:]*", "" );
	int idx = (suffix != null && name.endsWith( suffix )) ?
			name.indexOf( suffix ) : -1;

			out.print( rowTxt() + "" +
					(( idx > 0 ) ? name.substring(0, idx) : name) + "" +
					(( alive ) ? "" : "\n") );
			if ( !alive )
				return;

			long c = d.getCapacity();
			long u = d.getDfsUsed();
			long nu = d.getNonDfsUsed();
			long r = d.getRemaining();
			String percentUsed = StringUtils.limitDecimalTo2(d.getDfsUsedPercent());
			String percentRemaining = StringUtils.limitDecimalTo2(d.getRemainingPercent());

			String adminState = (d.isDecommissioned() ? "Decommissioned" :
				(d.isDecommissionInProgress() ? "Decommission In Progress":
				"In Service"));

			long timestamp = d.getLastUpdate();
			long currentTime = System.currentTimeMillis();

			out.print(" " +
					((currentTime - timestamp)/1000) +
					"" +
					adminState +
					"" +
					StringUtils.limitDecimalTo2(c*1.0/diskBytes) +
					"" +
					StringUtils.limitDecimalTo2(u*1.0/diskBytes) +
					"" +
					StringUtils.limitDecimalTo2(nu*1.0/diskBytes) +
					"" +
					StringUtils.limitDecimalTo2(r*1.0/diskBytes) +
					"" + percentUsed +
					"" +
					ServletUtil.percentageGraph( (int)Double.parseDouble(percentUsed) , 100) +
					"" + percentRemaining +
					"" + d.numBlocks() +
					""+ d.getXceiverCount() + "\n");
}

public void generateDFSNodesList(JspWriter out,
		NameNode nn,
		HttpServletRequest request)
throws IOException {
	ArrayList<DatanodeDescriptor> live = new ArrayList<DatanodeDescriptor>();
	ArrayList<DatanodeDescriptor> dead = new ArrayList<DatanodeDescriptor>();
	jspHelper.DFSNodesStatus(live, dead);

	whatNodes = request.getParameter("whatNodes"); // show only live or only dead nodes
	sorterField = request.getParameter("sorter/field");
	sorterOrder = request.getParameter("sorter/order");
	if ( sorterField == null )
		sorterField = "name";
	if ( sorterOrder == null )
		sorterOrder = "ASC";

	jspHelper.sortNodeList(live, sorterField, sorterOrder);
	jspHelper.sortNodeList(dead, "name", "ASC");

	// Find out common suffix. Should this be before or after the sort?
	String port_suffix = null;
	if ( live.size() > 0 ) {
		String name = live.get(0).getName();
		int idx = name.indexOf(':');
		if ( idx > 0 ) {
			port_suffix = name.substring( idx );
		}

		for ( int i=1; port_suffix != null && i < live.size(); i++ ) {
			if ( live.get(i).getName().endsWith( port_suffix ) == false ) {
				port_suffix = null;
				break;
			}
		}
	}

	counterReset();

	try {
		Thread.sleep(1000);
	} catch (InterruptedException e) {}

	if (live.isEmpty() && dead.isEmpty()) {
		out.print("There are no datanodes in the cluster");
	}
	else {

		int nnHttpPort = nn.getHttpAddress().getPort();
		out.print( "
 ");
		if(whatNodes.equals("LIVE")) {

			out.print(
					"" +
					"Live Datanodes : " + live.size() + "" +
			"

\n
\n" );

			counterReset();

			if ( live.size() > 0 ) {

				if ( live.get(0).getCapacity() > 1024 * diskBytes ) {
					diskBytes *= 1024;
					diskByteStr = "TB";
				}
                //update by wzt 2013-01-04
				//out.print( "
  Node  Last
Contact  Admin State  Configured
Capacity (" +
				//		diskByteStr + ")  Used
(" +
				//		diskByteStr + ")  Non DFS
Used (" +
				//		diskByteStr + ")  Remaining
(" +
				//		diskByteStr + ")  Used
(%)  Used
(%)  Remaining
(%)  Blocks\n" );

				out.print( "
  Node  Last
Contact  Admin State  Configured
Capacity (" +
						diskByteStr + ")  Used
(" +
						diskByteStr + ")  Non DFS
Used (" +
						diskByteStr + ")  Remaining
(" +
						diskByteStr + ")  Used
(%)  Used
(%)  Remaining
(%)  Blocks  DataXceiver
 ThreadCount \n");

                //end add

				jspHelper.sortNodeList(live, sorterField, sorterOrder);
				for ( int i=0; i < live.size(); i++ ) {
					generateNodeData(out, live.get(i), port_suffix, true, nnHttpPort);
				}
			}
			out.print("
\n");
		} else {

			out.print("
  " +
					" Dead Datanodes : " +dead.size() + "

\n");

			if ( dead.size() > 0 ) {
				out.print( "

 " +
				" Node \n" );

				jspHelper.sortNodeList(dead, "name", "ASC");
				for ( int i=0; i < dead.size() ; i++ ) {
					generateNodeData(out, dead.get(i), port_suffix, false, nnHttpPort);
				}

				out.print("
\n");
			}
		}
		out.print("
");
	}
}
  private static java.util.List _jspx_dependants;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\n');
      out.write('\n');
      out.write('\n');

NameNode nn = (NameNode)application.getAttribute("name.node");
FSNamesystem fsn = nn.getNamesystem();
String namenodeLabel = nn.getNameNodeAddress().getHostName() + ":" + nn.getNameNodeAddress().getPort();

      out.write("\n\n\n\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hadoop.css\">\n<title>Hadoop NameNode ");
      out.print(namenodeLabel);
      out.write("</title>\n  \n\n
NameNode '");
      out.print(namenodeLabel);
      out.write("'
\n\n\n

\t  \n
  Started:  ");
      out.print( fsn.getStartTime());
      out.write("\n
  Version:  ");
      out.print( VersionInfo.getVersion());
      out.write(',');
      out.write(' ');
      out.write('r');
      out.print( VersionInfo.getRevision());
      out.write("\n
  Compiled:  ");
      out.print( VersionInfo.getDate());
      out.write(" by ");
      out.print( VersionInfo.getUser());
      out.write("\n
  Upgrades:  ");
      out.print( jspHelper.getUpgradeStatusText());
      out.write("\n

\t\t\t\t      \n\nBrowse the filesystem
\nNamenode Logs
\n Go back to DFS home\n
\n");

	generateDFSNodesList(out, nn, request);

      out.write('\n');
      out.write('\n');

out.println(ServletUtil.htmlFooter());

      out.write('\n');
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}


text:
package org.apache.geode.internal.cache.tier.sockets.command;

import java.io.IOException;

import org.apache.geode.internal.cache.tier.Command;
import org.apache.geode.internal.cache.tier.sockets.BaseCommand;
import org.apache.geode.internal.cache.tier.sockets.Message;
import org.apache.geode.internal.cache.tier.sockets.Part;
import org.apache.geode.internal.cache.tier.sockets.ServerConnection;
import org.apache.geode.internal.i18n.LocalizedStrings;
import org.apache.geode.internal.security.SecurityService;
import org.apache.geode.security.GemFireSecurityException;

public class RemoveUserAuth extends BaseCommand {

  private final static RemoveUserAuth singleton = new RemoveUserAuth();

  public static Command getCommand() {
    return singleton;
  }

  @Override
  public void cmdExecute(final Message clientMessage, final ServerConnection serverConnection,
      final SecurityService securityService, long start)
      throws IOException, ClassNotFoundException, InterruptedException {
    boolean isSecureMode = clientMessage.isSecureMode();

    if (!isSecureMode) {
      // need to throw exception
      return;
    }

    try {
      serverConnection.setAsTrue(REQUIRES_RESPONSE);
      Part keepalivePart = clientMessage.getPart(0);
      byte[] keepaliveByte = keepalivePart.getSerializedForm();
      boolean keepalive = (keepaliveByte == null || keepaliveByte[0] == 0) ? false : true;
      serverConnection.getSecurityLogWriter().fine("remove user auth keep alive " + keepalive);
      serverConnection.removeUserAuth(clientMessage, keepalive);
      writeReply(clientMessage, serverConnection);
    } catch (GemFireSecurityException gfse) {
      if (serverConnection.getSecurityLogWriter().warningEnabled()) {
        serverConnection.getSecurityLogWriter().warning(LocalizedStrings.ONE_ARG,
            serverConnection.getName() + ": Security exception: " + gfse.getMessage());
      }
      writeException(clientMessage, gfse, false, serverConnection);
    } catch (Exception ex) {
      // TODO Auto-generated catch block
      if (serverConnection.getLogWriter().warningEnabled()) {
        serverConnection.getLogWriter().warning(
            LocalizedStrings.CacheClientNotifier_AN_EXCEPTION_WAS_THROWN_FOR_CLIENT_0_1,
            new Object[] {serverConnection.getProxyID(), ""}, ex);
      }
      writeException(clientMessage, ex, false, serverConnection);
    } finally {
      serverConnection.setAsTrue(RESPONDED);
    }
  }

}


text:
@extends('layouts.app')

@php($isEditMode = isset($course))
@php($methodText = $isEditMode ? '編輯' : '新增')

@section('title', $methodText . '課程')

@section('content')

            @if($isEditMode)
                {{ $course->sub_name }} - 編輯課程
            @else
                新增課程
            @endif

            @if($isEditMode)
                {{ Form::model($course, ['route' => ['course.update', $course], 'method' => 'put']) }}
            @else
                {{ Form::open(['route' => 'course.store']) }}
            @endif

                {{ Form::label('year', '學年度', ['class' => 'form-control-label']) }}
                {{ Form::select('year', \App\Course::getYearRange(), null, ['placeholder' => '-', 'class' => 'form-control', 'required']) }}

                {{ Form::label('semester', '學期', ['class' => 'form-control-label']) }}

                        {{ Form::radio('semester', 1, null, ['class' => 'custom-control-input']) }}

                        上學期

                        {{ Form::radio('semester', 2, null, ['class' => 'custom-control-input']) }}

                        下學期

                {{ Form::label('id', '課程編號', ['class' => 'form-control-label']) }}
                @if($isEditMode)
                    {{ Form::text('id', null, ['class' => 'form-control', 'required']) }}
                @else
                    {{ Form::text('id', null, ['class' => 'form-control']) }}
                @endif

                {{ Form::label('sub_name', '科目名稱', ['class' => 'form-control-label']) }}
                {{ Form::text('sub_name', null, ['class' => 'form-control', 'required']) }}

                {{ Form::label('scr_period', '上課時間/上課教室/授課教師', ['class' => 'form-control-label']) }}
                {{ Form::text('scr_period', null, ['class' => 'form-control', 'placeholder' => '格式如:(一)01-03 資電311 (二)07 資電222 某某老師']) }}

                {{ Form::label('scj_scr_mso', '必選修', ['class' => 'form-control-label']) }}
                {{ Form::text('scj_scr_mso', null, ['class' => 'form-control']) }}

                {{ Form::label('scr_acptcnt', '實收名額', ['class' => 'form-control-label']) }}
                {{ Form::number('scr_acptcnt', null, ['class' => 'form-control', 'min' => 0]) }}

                {{ Form::label('scr_precnt', '開放名額', ['class' => 'form-control-label']) }}
                {{ Form::number('scr_precnt', null, ['class' => 'form-control', 'min' => 0]) }}

                {{ Form::label('scr_selcode', '選課代號', ['class' => 'form-control-label']) }}
                {{ Form::text('scr_selcode', null, ['class' => 'form-control']) }}

                {{ Form::label('scr_credit', '學分', ['class' => 'form-control-label']) }}
                {{ Form::number('scr_credit', null, ['class' => 'form-control', 'min' => 0]) }}

                {{ Form::label('unt_ls', 'unt_ls', ['class' => 'form-control-label']) }}
                {{ Form::number('unt_ls', null, ['class' => 'form-control']) }}

                {{ Form::label('scr_dup', 'scr_dup', ['class' => 'form-control-label']) }}
                {{ Form::text('scr_dup', null, ['class' => 'form-control']) }}

                {{ Form::label('scr_remarks', '備註', ['class' => 'form-control-label']) }}
                {{ Form::text('scr_remarks', null, ['class' => 'form-control']) }}

                {{ Form::label('cls_name', '班級', ['class' => 'form-control-label']) }}
                {{ Form::text('cls_name', null, ['class' => 'form-control']) }}

                {{ Form::label('sub_id', '課程ID', ['class' => 'form-control-label']) }}
                {{ Form::text('sub_id', null, ['class' => 'form-control']) }}

                {{ Form::label('cls_id', '班級ID', ['class' => 'form-control-label']) }}
                {{ Form::text('cls_id', null, ['class' => 'form-control']) }}

                {{ Form::label('scr_exambf', '提前考', ['class' => 'form-control-label']) }}

                        {{ Form::radio('scr_exambf', '是', null, ['class' => 'custom-control-input']) }}

                        是

                        {{ Form::radio('scr_exambf', '否', null, ['class' => 'custom-control-input']) }}

                        否

                {{ Form::label('scr_examid', '期中考', ['class' => 'form-control-label']) }}

                        {{ Form::radio('scr_examid', '是', null, ['class' => 'custom-control-input']) }}

                        是

                        {{ Form::radio('scr_examid', '否', null, ['class' => 'custom-control-input']) }}

                        否

                {{ Form::label('scr_examfn', '期末考', ['class' => 'form-control-label']) }}

                        {{ Form::radio('scr_examfn', '是', null, ['class' => 'custom-control-input']) }}

                        是

                        {{ Form::radio('scr_examfn', '否', null, ['class' => 'custom-control-input']) }}

                        否

            @if($errors->count())

                    @foreach($errors->all('
:message
') as $error)
                        {!! $error !!}
                    @endforeach

            @endif

                    @if($isEditMode)
                        返回
                    @else
                        返回
                    @endif
                    <button type="submit" class="btn btn-primary">確認</button>

            {{ Form::close() }}

@endsection


text:
#ifndef OIS_MacInputManager_H
#define OIS_MacInputManager_H

#include "OISInputManager.h"
#include "OISFactoryCreator.h"
#include "mac/MacPrereqs.h"
#include <Carbon/Carbon.h>

namespace OIS
{

    class MacInputManager : public InputManager, public FactoryCreator
    {
    public:
        MacInputManager();
        virtual ~MacInputManager();

		//InputManager Overrides
		/** @copydoc InputManager::_initialize */
		void _initialize( ParamList &paramList );

		//FactoryCreator Overrides
		/** @copydoc FactoryCreator::deviceList */
		DeviceList freeDeviceList();

		/** @copydoc FactoryCreator::totalDevices */
		int totalDevices(Type iType);

		/** @copydoc FactoryCreator::freeDevices */
		int freeDevices(Type iType);

		/** @copydoc FactoryCreator::vendorExist */
		bool vendorExist(Type iType, const std::string & vendor);

		/** @copydoc FactoryCreator::createObject */
		Object* createObject(InputManager* creator, Type iType, bool bufferMode, const std::string & vendor = "");

		/** @copydoc FactoryCreator::destroyObject */
		void destroyObject(Object* obj);

		//Internal Items
		//! Internal method, used for flaggin keyboard as available/unavailable for creation
		void _setKeyboardUsed(bool used) {keyboardUsed = used; }

		//! Internal method, used for flaggin mouse as available/unavailable for creation
		void _setMouseUsed(bool used) { mouseUsed = used; }

        //! methodfor getting the event target
        EventTargetRef _getEventTarget() {return mEventTargetRef;}

        //! method for getting window
        WindowRef _getWindow() {return mWindow;}

    protected:
        void _parseConfigSettings( ParamList& paramList );

        void _enumerateDevices();

        static const std::string iName;

        // Mac stuff
		EventTargetRef mEventTargetRef;
		WindowRef mWindow;

        // settings
        bool mHideMouse;
        bool mUseRepeat;

		//! Used to know if we used up keyboard
		bool keyboardUsed;

		//! Used to know if we used up mouse
		bool mouseUsed;

		//! HID Manager class handling devices other than keyboard/mouse
		MacHIDManager *mHIDManager;
    };
}
#endif


text:
const isObject = item =>
  item && typeof item === 'object' && !Array.isArray(item);

const mergeDeep = (target, ...sources) => {
  if (!sources.length) return target;
  const source = sources.shift();

  if (isObject(target) && isObject(source)) {
    Object.keys(source).forEach((key) => {
      if (isObject(source[key])) {
        if (!target[key]) Object.assign(target, { [key]: {} });
        mergeDeep(target[key], source[key]);
      } else {
        Object.assign(target, { [key]: source[key] });
      }
    });
  }

  return mergeDeep(target, ...sources);
};

exports.mergeDeep = mergeDeep;


text:
/**
 * \file yajl_gen.h
 * Interface to YAJL's JSON generation facilities.
 */

#include "yajl_common.h"

#ifndef __YAJL_GEN_H__
#define __YAJL_GEN_H__

#ifdef __cplusplus
extern "C" {
#endif
    /** generator status codes */
    typedef enum {
        /** no error */
        yajl_gen_status_ok = 0,
        /** at a point where a map key is generated, a function other than
         *  yajl_gen_string was called */
        yajl_gen_keys_must_be_strings,
        /** YAJL's maximum generation depth was exceeded.  see
         *  YAJL_MAX_DEPTH */
        yajl_max_depth_exceeded,
        /** A generator function (yajl_gen_XXX) was called while in an error
         *  state */
        yajl_gen_in_error_state,
        /** A complete JSON document has been generated */
        yajl_gen_generation_complete
    } yajl_gen_status;

    /** an opaque handle to a generator */
    typedef struct yajl_gen_t * yajl_gen;

    /** configuration structure for the generator */
    typedef struct {
        /** generate indented (beautiful) output */
        unsigned int beautify;
        /** an opportunity to define an indent string.  such as \\t or
         *  some number of spaces.  default is four spaces '    '.  This
         *  member is only relevant when beautify is true */
        const char * indentString;
    } yajl_gen_config;

    /** allocate a generator handle
     *  \param config a pointer to a structure containing parameters which
     *                configure the behavior of the json generator
     *  \param allocFuncs an optional pointer to a structure which allows
     *                    the client to overide the memory allocation
     *                    used by yajl.  May be NULL, in which case
     *                    malloc/free/realloc will be used.
     *
     *  \returns an allocated handle on success, NULL on failure (bad params)
     */
    yajl_gen YAJL_API yajl_gen_alloc(const yajl_gen_config * config,
                                     const yajl_alloc_funcs * allocFuncs);

    /** free a generator handle */
    void YAJL_API yajl_gen_free(yajl_gen handle);

    yajl_gen_status YAJL_API yajl_gen_integer(yajl_gen hand, long int number);
    yajl_gen_status YAJL_API yajl_gen_double(yajl_gen hand, double number);
    yajl_gen_status YAJL_API yajl_gen_number(yajl_gen hand,
                                             const char * num,
                                             unsigned int len);
    yajl_gen_status YAJL_API yajl_gen_string(yajl_gen hand,
                                             const unsigned char * str,
                                             unsigned int len);
    yajl_gen_status YAJL_API yajl_gen_null(yajl_gen hand);
    yajl_gen_status YAJL_API yajl_gen_bool(yajl_gen hand, int boolean);
    yajl_gen_status YAJL_API yajl_gen_map_open(yajl_gen hand);
    yajl_gen_status YAJL_API yajl_gen_map_close(yajl_gen hand);
    yajl_gen_status YAJL_API yajl_gen_array_open(yajl_gen hand);
    yajl_gen_status YAJL_API yajl_gen_array_close(yajl_gen hand);

    /** access the null terminated generator buffer.  If incrementally
     *  outputing JSON, one should call yajl_gen_clear to clear the
     *  buffer.  This allows stream generation. */
    yajl_gen_status YAJL_API yajl_gen_get_buf(yajl_gen hand,
                                              const unsigned char ** buf,
                                              unsigned int * len);

    /** clear yajl's output buffer, but maintain all internal generation
     *  state.  This function will not "reset" the generator state, and is
     *  intended to enable incremental JSON outputing. */
    void YAJL_API yajl_gen_clear(yajl_gen hand);

#ifdef __cplusplus
}
#endif

#endif