text:
package org.sagebionetworks.repo.manager.migration;

import java.util.List;

import org.sagebionetworks.repo.model.dbo.DatabaseObject;
import org.sagebionetworks.repo.model.migration.MigrationType;

/**
 * A migration listener can listen to migration events as migration proceeds.
 *
 * @author jmhill
 *
 */
public interface MigrationTypeListener {

	/**
	 * Will be called when a batch of database objects are created or updated during migration.
	 *
	 * This method will be called AFTER the passed list of database objects has been sent to the database.
	 *
	 * @param delta
	 */
	public <D extends DatabaseObject<?>> void afterCreateOrUpdate(MigrationType type, List<D> delta);

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace frontend\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use frontend\models\Pelanggan;

/**
 * PelangganSearch represents the model behind the search form about `frontend\models\Pelanggan`.
 */
class PelangganSearch extends Pelanggan
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'jenis_kendaraan'], 'integer'],
            [['nama', 'nopol', 'telpon'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = Pelanggan::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'jenis_kendaraan' => $this->jenis_kendaraan,
        ]);

        $query->andFilterWhere(['like', 'nama', $this->nama])
            ->andFilterWhere(['like', 'nopol', $this->nopol])
            ->andFilterWhere(['like', 'telpon', $this->telpon]);

        return $dataProvider;
    }
}


text:
FROM ppc64le/r-base
MAINTAINER "Priya Seth <sethp@us.ibm.com>"

ENV _R_CHECK_FORCE_SUGGESTS_ false
RUN apt-get update \
        && apt-get install git texinfo texlive texlive-fonts-extra texlive-latex-extra -y \
        && R -e 'install.packages("knitr",dependencies= TRUE,repos="http://cran.rstudio.com/"); install.packages("rbenchmark",dependencies= TRUE,repos="http://cran.rstudio.com/"); install.packages("RUnit",dependencies= TRUE,repos="http://cran.rstudio.com/")' \
        && git clone https://github.com/RcppCore/Rcpp.git \
        && cd Rcpp && git checkout 0.12.16 \
        && cd .. \
        && R CMD build Rcpp \
        && R CMD check Rcpp --no-manual \
        && R CMD INSTALL Rcpp \
        && apt-get purge --auto-remove git -y

CMD ["/bin/bash"]


text: [A delegate-based implementation](delegate.md).


text:
package org.wicketopia.builder;

/**
 * @since 1.0
 */
public interface ViewerBuilder extends ComponentBuilder {
}


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AntiGravTool : Tool {

    private bool _mouseState;
    private GameObject target;
    public Vector3 screenSpace;
    public Vector3 offset;

	public override void Update() {
        if (Input.GetButtonDown("Fire1"))
        {
            Transform hit = base.castRay(10f);

            // Check if there was actually a hit..
            if (!hit)
                return;
            if (hit.parent)
                if (hit.parent.GetComponent<WorldObject>())
                    hit = hit.parent;

            if (hit.GetComponent<WorldObject>())
            {
                if (hit.GetComponent<WorldObject>().canPickedUp)
                {
                    // ANTIGRAV :D
                    _mouseState = true;
                    target = hit.gameObject;
                    target.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeAll;
                    screenSpace = Camera.main.WorldToScreenPoint(target.transform.position);
                    offset = target.transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenSpace.z));
                }
            }
        }

        // MORE ANTIGRAV
        if (Input.GetMouseButtonUp(0))
        {
            _mouseState = false;
            if(target)
                target.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.None;
        }

        if (_mouseState)
        {
            //keep track of the mouse position
            var curScreenSpace = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenSpace.z);

            //convert the screen mouse position to world point and adjust with offset
            var curPosition = Camera.main.ScreenToWorldPoint(curScreenSpace) + offset;

            //update the position of the object in the world
            target.transform.position = curPosition;
        }
    }
}


text:
Internals
=========

.. toctree::
   :maxdepth: 2

   qa.rst
   flow
   contructing-the-ast
   tags
   versioning
   build-and-release-process


text:
namespace quip {
  struct StatusServiceProvider : StatusService {
    StatusServiceProvider(QuipStatusView* view);

    void setStatus(const std::string& text) override;
    void setFileType(const std::string& fileType) override;
    void setLineCount(const std::size_t count) override;

  private:
    QuipStatusView* m_view;
  };
}


text:
<?php

namespace Tabernicola\JukeCloudAdminBundle\Controller\User;

use Admingenerated\TabernicolaJukeCloudAdminBundle\BaseUserController\ListController as BaseListController;

/**
 * ListController
 */
class ListController extends BaseListController
{
}


text:
/** @defgroup adc_defines ADC Defines
 *
 * @brief <b>Defined Constants and Types for the STM32F0xx Analog to Digital
 * Converter</b>
 *
 * @ingroup STM32F0xx_defines
 *
 * @version 1.0.0
 *
 * @date 11 July 2013
 *
 * LGPL License Terms @ref lgpl_license
 */
/*
 * This file is part of the libopencm3 project.
 *
 * Copyright (C) 2013 Frantisek Burian <BuFran@seznam.cz>
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef LIBOPENCM3_ADC_H
#define LIBOPENCM3_ADC_H

#include <libopencm3/stm32/common/adc_common_v2.h>
#include <libopencm3/stm32/common/adc_common_v2_single.h>

/*****************************************************************************/
/* Module definitions                                                        */
/*****************************************************************************/

/** @defgroup adc_reg_base ADC register base addresses
 * @ingroup adc_defines
 *
 *@{*/
#define ADC				ADC_BASE
#define ADC1				ADC_BASE/* for API compatibility */
/**@}*/

/*****************************************************************************/
/* Register definitions                                                      */
/*****************************************************************************/

#define ADC1_ISR			ADC_ISR(ADC)
#define ADC1_IER			ADC_IER(ADC)
#define ADC1_CR				ADC_CR(ADC)
#define ADC1_CFGR1			ADC_CFGR1(ADC)
#define ADC1_CFGR2			ADC_CFGR2(ADC)
#define ADC1_SMPR1			ADC_SMPR1(ADC)
#define ADC_SMPR(adc)			ADC_SMPR1(adc)  /* Compatibility */
#define ADC1_SMPR			ADC_SMPR1(ADC) /* Compatibility */
#define ADC1_TR1			ADC_TR1(ADC)
#define ADC_TR(adc)			ADC_TR1(adc) /* Compatibility */
#define ADC1_TR				ADC1_TR(ADC) /* Compatibility */
#define ADC1_CHSELR			ADC_CHSELR(ADC)
#define ADC1_DR				ADC_DR(ADC)

/*****************************************************************************/
/* Register values                                                           */
/*****************************************************************************/

/* ADC_CFGR2 Values ---------------------------------------------------------*/

#define ADC_CFGR2_CKMODE_SHIFT		30
#define ADC_CFGR2_CKMODE		(3 << ADC_CFGR2_CKMODE_SHIFT)
#define ADC_CFGR2_CKMODE_CK_ADC		(0 << ADC_CFGR2_CKMODE_SHIFT)
#define ADC_CFGR2_CKMODE_PCLK_DIV2	(1 << ADC_CFGR2_CKMODE_SHIFT)
#define ADC_CFGR2_CKMODE_PCLK_DIV4	(2 << ADC_CFGR2_CKMODE_SHIFT)

/* ADC_SMPR Values ----------------------------------------------------------*/

#define ADC_SMPR_SMP_SHIFT		0
#define ADC_SMPR_SMP			(7 << ADC_SMPR_SMP_SHIFT)
#define ADC_SMPR_SMP_001DOT5		(0 << ADC_SMPR_SMP_SHIFT)
#define ADC_SMPR_SMP_007DOT5		(1 << ADC_SMPR_SMP_SHIFT)
#define ADC_SMPR_SMP_013DOT5		(2 << ADC_SMPR_SMP_SHIFT)
#define ADC_SMPR_SMP_028DOT5		(3 << ADC_SMPR_SMP_SHIFT)
#define ADC_SMPR_SMP_041DOT5		(4 << ADC_SMPR_SMP_SHIFT)
#define ADC_SMPR_SMP_055DOT5		(5 << ADC_SMPR_SMP_SHIFT)
#define ADC_SMPR_SMP_071DOT5		(6 << ADC_SMPR_SMP_SHIFT)
#define ADC_SMPR_SMP_239DOT5		(7 << ADC_SMPR_SMP_SHIFT)

/*****************************************************************************/
/* API definitions                                                           */
/*****************************************************************************/

/** @defgroup adc_api_res ADC resolutions
 * @ingroup adc_defines
 *
 *@{*/
#define ADC_RESOLUTION_12BIT		ADC_CFGR1_RES_12_BIT
#define ADC_RESOLUTION_10BIT		ADC_CFGR1_RES_10_BIT
#define ADC_RESOLUTION_8BIT		ADC_CFGR1_RES_8_BIT
#define ADC_RESOLUTION_6BIT		ADC_CFGR1_RES_6_BIT
/**@}*/

/** @defgroup adc_api_smptime ADC sampling time
 * @ingroup adc_defines
 *
 *@{*/
#define ADC_SMPTIME_001DOT5		ADC_SMPR_SMP_001DOT5
#define ADC_SMPTIME_007DOT5		ADC_SMPR_SMP_007DOT5
#define ADC_SMPTIME_013DOT5		ADC_SMPR_SMP_013DOT5
#define ADC_SMPTIME_028DOT5		ADC_SMPR_SMP_028DOT5
#define ADC_SMPTIME_041DOT5		ADC_SMPR_SMP_041DOT5
#define ADC_SMPTIME_055DOT5		ADC_SMPR_SMP_055DOT5
#define ADC_SMPTIME_071DOT5		ADC_SMPR_SMP_071DOT5
#define ADC_SMPTIME_239DOT5		ADC_SMPR_SMP_239DOT5
/**@}*/

/** @defgroup adc_api_clksource ADC clock source
 * @ingroup adc_defines
 *
 *@{*/
#define ADC_CLKSOURCE_ADC		ADC_CFGR2_CKMODE_CK_ADC
#define ADC_CLKSOURCE_PCLK_DIV2		ADC_CFGR2_CKMODE_PCLK_DIV2
#define ADC_CLKSOURCE_PCLK_DIV4		ADC_CFGR2_CKMODE_PCLK_DIV4
/**@}*/

/** @defgroup adc_channel ADC Channel Numbers
 * @ingroup adc_defines
 *
 *@{*/
#define ADC_CHANNEL_TEMP	16
#define ADC_CHANNEL_VREF	17
#define ADC_CHANNEL_VBAT	18
/**@}*/

/** @defgroup adc_api_opmode ADC Operation Modes
 * @ingroup adc_defines
 *
 *@{*/
enum adc_opmode {
	ADC_MODE_SEQUENTIAL,
	ADC_MODE_SCAN,
	ADC_MODE_SCAN_INFINITE,
};
/**@}*/

/*****************************************************************************/
/* API Functions                                                             */
/*****************************************************************************/

BEGIN_DECLS

/* Operation mode API */
void adc_enable_discontinuous_mode(uint32_t adc);
void adc_disable_discontinuous_mode(uint32_t adc);
void adc_set_operation_mode(uint32_t adc, enum adc_opmode opmode);

/* Trigger API */
void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger,
				uint32_t polarity);
void adc_disable_external_trigger_regular(uint32_t adc);

/* Interrupt configuration */
void adc_enable_watchdog_interrupt(uint32_t adc);
void adc_disable_watchdog_interrupt(uint32_t adc);
bool adc_get_watchdog_flag(uint32_t adc);
void adc_clear_watchdog_flag(uint32_t adc);
void adc_enable_eoc_sequence_interrupt(uint32_t adc);
void adc_disable_eoc_sequence_interrupt(uint32_t adc);
bool adc_get_eoc_sequence_flag(uint32_t adc);

/* Basic configuration */
void adc_set_clk_source(uint32_t adc, uint32_t source);
void adc_enable_vbat_sensor(void);
void adc_disable_vbat_sensor(void);
void adc_calibrate_start(uint32_t adc)
	LIBOPENCM3_DEPRECATED("see adc_calibrate/_async");
void adc_calibrate_wait_finish(uint32_t adc)
	LIBOPENCM3_DEPRECATED("see adc_is_calibrating"); ;

/* Analog Watchdog */
void adc_enable_analog_watchdog_on_all_channels(uint32_t adc);
void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t chan);
void adc_disable_analog_watchdog(uint32_t adc);
void adc_set_watchdog_high_threshold(uint32_t adc, uint8_t threshold);
void adc_set_watchdog_low_threshold(uint32_t adc, uint8_t threshold);

END_DECLS

#endif


text:
body {
  background: url('../commonground.jpg') no-repeat center center fixed;
  height: 100%;
  background-attachment: fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  font-family: 'Montserrat', sans-serif !important;
}


text:
<?xml version="1.0" encoding="UTF-8" ?>

<!--

 This file is part of the Sylius package.

 (c) Paweł Jędrzejewski

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                                      http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

    <mapped-superclass name="Sylius\Bundle\CoreBundle\Model\VariantImage" table="sylius_variant_image">
        <field type="string" name="original" column="original" nullable="true" />
        <many-to-one field="variant" target-entity="Sylius\Bundle\VariableProductBundle\Model\VariantInterface" inversed-by="images"/>
    </mapped-superclass>

</doctrine-mapping>


text:
package themplator.writers;

import java.util.ArrayList;
import java.util.List;

import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.XMLEvent;

public class ThRecordingEventWriter implements ThEventWriter {
	private ThEventWriter delegate;
	private List<XMLEvent> recordedEvents = new ArrayList<XMLEvent>();

	public ThRecordingEventWriter() {

	}

	public ThRecordingEventWriter(ThEventWriter delegate) {
		super();
		this.delegate = delegate;
	}

	public void add(XMLEvent ev) throws XMLStreamException {
		recordedEvents.add(ev);
		if (delegate != null) {
			delegate.add(ev);
		}
	}

	public List<XMLEvent> getRecordedEvents() {
		return recordedEvents;
	}

}


text:
namespace Utilities.IO.Compression.Interfaces
{
    /// <summary>
    /// Compressor interface
    /// </summary>
    public interface ICompressor
    {
        /// <summary>
        /// Compressor name
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Compresses the byte array
        /// </summary>
        /// <param name="Data">Data to compress</param>
        /// <returns>Compressed data</returns>
        byte[] Compress(byte[] Data);

        /// <summary>
        /// Decompresses the data
        /// </summary>
        /// <param name="Data">Data to decompress</param>
        /// <returns>The decompressed data</returns>
        byte[] Decompress(byte[] Data);
    }
}


text:
<?php
namespace App\Command\Worker;

use Doctrine\ORM\EntityManagerInterface;
use App\Entity\WorkerActivationRequest;
use App\Services\ApplicationStateService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use App\Entity\Worker;

class SetTokenFromActivationRequestCommand extends Command
{
    const RETURN_CODE_OK = 0;
    const RETURN_CODE_IN_MAINTENANCE_READ_ONLY_MODE = 1;

    /**
     * @var ApplicationStateService
     */
    private $applicationStateService;

    /**
     * @var EntityManagerInterface
     */
    private $entityManager;

    /**
     * @param ApplicationStateService $applicationStateService
     * @param EntityManagerInterface $entityManager
     * @param string|null $name
     */
    public function __construct(
        ApplicationStateService $applicationStateService,
        EntityManagerInterface $entityManager,
        $name = null
    ) {
        parent::__construct($name);

        $this->applicationStateService = $applicationStateService;
        $this->entityManager = $entityManager;
    }

    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this
            ->setName('simplytestable:worker:settokenfromactivationrequest')
            ->setDescription('Set all unset worker tokens from related activation requests')
        ;
    }

    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        if ($this->applicationStateService->isInReadOnlyMode()) {
            return self::RETURN_CODE_IN_MAINTENANCE_READ_ONLY_MODE;
        }

        $workerRepository = $this->entityManager->getRepository(Worker::class);
        $workerActivationRequestRepository = $this->entityManager->getRepository(WorkerActivationRequest::class);

        /* @var Worker[] $workers */
        $workers = $workerRepository->findAll();

        foreach ($workers as $worker) {
            $workerActivationRequest = $workerActivationRequestRepository->findOneBy([
                'worker' => $worker,
            ]);

            $workerToken = $worker->getToken();

            if (empty($workerToken) && !empty($workerActivationRequest)) {
                $worker->setToken($workerActivationRequest->getToken());

                $this->entityManager->persist($worker);
                $this->entityManager->flush();
            }
        }

        return self::RETURN_CODE_OK;
    }
}


text:
import React, { Component } from 'react';
import PropTypes from 'subschema-prop-types';
import { byComponent, intoWithContext } from 'subschema-test-support';
import {expect} from 'chai';
import {className} from 'subschema-resolver-classname'
import {injectorFactory} from 'subschema-injection';
import loaderFactory from 'subschema-loader';

describe('subschema-resolver-classname', function () {
    this.timeout(50000);
    let injector, loader;
    beforeEach(()=>{
        loader = loaderFactory();
        injector = injectorFactory(loader);
        loader.addType({TestContainer, TestContainerDefault});
        loader.addResolver(PropTypes.className, className);

    });

    class TestContainer extends Component {
        static propTypes = {
            className:PropTypes.className
        };

        render() {
            return <div {...this.props}/>
        }
    }
    class TestContainerDefault extends Component {
        static propTypes    = {
            className:PropTypes.className
        };
        static defaultProps = {
            className: 'whatever Some.more found missing'
        };

        render() {
            return <div {...this.props}/>
        }
    }
    it('should load default className', function () {
        loader.addStyle({
            TestContainer: {
                container: 'abc'
            }
        });
        const Injected = injector.inject(TestContainer);
        const inst     = byComponent(
            intoWithContext(<Injected />, {loader,injector}, true), TestContainer);
        expect(inst.prop('className')).to.eql('abc');
    });
    it('should load default className with stuff', function () {
        loader.addStyle({
            Some                : {
                more: 'ghi'
            },
            Global              : {
                found: 'here'
            },
            TestContainerDefault: {
                whatever: 'the hell'
            }
        });
        const Injected = injector.inject(TestContainerDefault);
        const inst     = byComponent(
            intoWithContext(<Injected />, {loader,injector}, true),
            TestContainerDefault);
        expect(inst.prop('className')).to.eql('the hell ghi here missing');
    })
});


text:
package notebook
package kernel
package remote

import akka.actor._
import akka.remote.transport.Transport.{InboundAssociation, AssociationEvent}
import akka.remote.{DisassociatedEvent, RemoteScope}
import pfork.ProcessFork
import com.typesafe.config.ConfigFactory
import collection.JavaConversions._
import akka.actor.Deploy
import org.apache.commons.io.FileUtils
import java.io.File
import org.slf4j.LoggerFactory
import org.apache.log4j.{Logger, PropertyConfigurator}

class SingleVM(fork: ProcessFork[RemoteProcess], location: File) extends Actor with ActorLogging {

  def this() = this(new ProcessFork[RemoteProcess], new File("."))

  import SingleVM._

  def startVM(port: Int): ProcessFork.ProcessKiller = {
    //TODO: cookie file should only be written once.
    val akkaCookieFile = new File(location, ".akka-cookie")
    for (cookie <- AkkaConfigUtils.requiredCookie(context.system.settings.config)) {
      FileUtils.writeStringToFile(akkaCookieFile, cookie)
    }
    fork.execute(port.toString, negotiator.path.toStringWithAddress(externalAddress(context.system)), akkaCookieFile.getAbsolutePath)
  }

  val negotiator = context.actorOf(Props(new Actor {

    private[this] var address: Address = _

    def waiting: Receive = {
      case RemoteProcessReady(a) =>
        address = a
        context.become(ready)
    }

    def ready: Receive = {
      case Spawn(props) =>
        sender ! context.actorOf(Props(new CrashResilientActor(props.withDeploy(Deploy(scope = RemoteScope(address))))))

      case DisassociatedEvent(_, a, _) =>
        if (address == a) {
          procKiller = startVM(address.port.get)
          address = null
          context.become(waiting)
        }
    }

    def receive = waiting

    override def postStop() {
      val a = address
      if (a != null) {
        log.info("Shutting down remote VM: %s".format(a))
        context.system.actorOf(Props(new Actor with ActorLogging { log.info("Shutting down VM"); sys.exit(0); def receive = Actor.emptyBehavior }).withDeploy(Deploy(scope = RemoteScope(a))))
      } else {
        log.info("Forcibly shutting down remote VM.")
        val killer = procKiller
        if (killer != null) killer()
      }
    }

  }).withDispatcher("akka.actor.default-stash-dispatcher"))

  context.system.eventStream.subscribe(negotiator, classOf[DisassociatedEvent])
  private[this] var procKiller = startVM(0)

  def receive = {
    case spawn: Spawn => negotiator.forward(spawn)
  }

}

object SingleVM {
  case class Spawn(props: Props)

  case class RemoteProcessReady(address: Address)

  private class CrashResilientActor(props: Props) extends Actor {

    val negotiator = context.actorOf(Props(new Actor with Stash {

      private[this] var remote = context.actorOf(props)

      def waiting: Receive = {
        case InboundAssociation(handle) =>
          if (remote.path.address == handle.remoteAddress) {
            remote = context.actorOf(props)
            unstashAll()
            context.become(forwarding)
          }
        case Fwd(_) => stash()
      }

      def forwarding: Receive = {
        case DisassociatedEvent(local, remoteAddress, _) =>
          if (remote.path.address == remoteAddress) {
            context.become(waiting)
          }
        case Fwd(msg) =>
          remote.forward(msg)
      }

      def receive = forwarding

    }).withDispatcher("akka.actor.default-stash-dispatcher"))

    context.system.eventStream.subscribe(negotiator, classOf[InboundAssociation])
    context.system.eventStream.subscribe(negotiator, classOf[DisassociatedEvent])

    private case class Fwd(msg: Any)

    def receive = {
      case msg => negotiator.forward(Fwd(msg))
    }
  }

  def externalAddress(system: ActorSystem) = system.asInstanceOf[ExtendedActorSystem].provider.getExternalAddressFor(Address("akka", "", "", 0)).get
}

class RemoteProcess(port: String, parentPath: String, cookieFile: String, configPath: String) {

  def this(port: String, parentPath: String, cookieFile: String) = this(port, parentPath, cookieFile, "kernel.conf")

  def this(port: String, parentPath: String) = this(port, parentPath, "")

  locally {
    //TODO: This doesn't really belong here?
    PropertyConfigurator.configure(getClass().getResource("/log4j.subprocess.properties"))
  }

  val system = {
    val cookie = Some(new File(cookieFile)).filter(_.exists).map(FileUtils.readFileToString)
    val baseConfig = ConfigFactory.load(configPath)
    val config = cookie map { AkkaConfigUtils.requireCookie(baseConfig, _) } getOrElse baseConfig
    ActorSystem("RemoteProcess", ConfigFactory.parseMap(Map("akka.remote.netty.port" -> port)).withFallback(config))
  }

  val log = LoggerFactory.getLogger(getClass())

  if (log.isTraceEnabled) {
    system.eventStream.subscribe(system.actorOf(Props(new Actor {
      def receive = {
        case x => log.trace("Event stream msg: " + x) //Don't use actor logging, messages routed back here...
      }
    })), classOf[AnyRef])
  }

  log.info("Spawned VM is ready!")
  system.actorSelection(parentPath) ! SingleVM.RemoteProcessReady(SingleVM.externalAddress(system))
}


text:
/**
 *
 */
package org.openntf.domino.iterators;

import java.util.Iterator;
import java.util.logging.Logger;

import org.openntf.domino.ViewEntry;
import org.openntf.domino.ViewNavigator;

/**
 * @author Nathan T. Freeman
 *
 */
public class ViewNavigatorEntryIterator implements Iterator<ViewEntry> {
	@SuppressWarnings("unused")
	private static final Logger log_ = Logger.getLogger(ViewNavigatorEntryIterator.class.getName());

	private transient ViewNavigator navigator_;

	@SuppressWarnings("unused")
	private transient ViewEntry previousEntry_;
	private transient ViewEntry currentEntry_;
	private transient ViewEntry nextEntry_;

	/**
	 * Instantiates a new view entry iterator.
	 *
	 * @param navigator
	 *            the navigator
	 */
	public ViewNavigatorEntryIterator(final ViewNavigator navigator) {
		navigator_ = navigator;
	}

	public ViewNavigator getNavigator() {
		return navigator_;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see java.util.Iterator#hasNext()
	 */
	@Override
	public boolean hasNext() {
		if (currentEntry_ != null) {
			nextEntry_ = getNavigator().getNext(currentEntry_);
		} else {
			nextEntry_ = getNavigator().getFirst();
		}
		return nextEntry_ != null;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see java.util.Iterator#next()
	 */
	@Override
	public ViewEntry next() {
		if (hasNext()) {
			previousEntry_ = currentEntry_;	//TODO NTF use if we want to implement a ListIterator
			currentEntry_ = nextEntry_;
			nextEntry_ = null;
			return currentEntry_;
		} else {
			return null;
		}
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see java.util.Iterator#remove()
	 */
	@Override
	public void remove() {
		// NOOP
	}

}


text:
  /*************************/
 /* vlaCalendar Adobe CS3 */
/*************************/

/* Picker */

.adobe_cs3 .pickerBackground {
	background-image: url('../images/adobe_cs3/calendar_background.gif') !important;
	padding-top: 26px;
	height: 140px;
}

/* Calender */

.adobe_cs3 .arrowLeft:hover {
	background-image: url('../images/adobe_cs3/arrowleft_hover.gif');
}
.adobe_cs3 .arrowRight:hover {
	background-image: url('../images/adobe_cs3/arrowright_hover.gif');
}

.adobe_cs3 .label:hover {
	color: #939393;
}

/* Month */

.adobe_cs3 .month td:hover {
	background-image: url('../images/adobe_cs3/day_hover.gif');
	color: #515151;
}

.adobe_cs3 .month td.selected {
	background-image: url('../images/adobe_cs3/day_selected.gif');
	color: #939393;
}
.adobe_cs3 .month td.selected:hover {
	background-image: url('../images/adobe_cs3/day_selected_hover.gif');
}

.adobe_cs3 .month td.outsideDay:hover {
	color: #939393;
}

/* Year & decade */

.adobe_cs3 .year td:hover {
	background-image: url('../images/adobe_cs3/month_hover.gif');
	color: #515151;
}
.adobe_cs3 .year td.selected:hover {
	background-image: url('../images/adobe_cs3/month_selected_hover.gif');
}
.adobe_cs3 .year td.current {
	background-image: url('../images/adobe_cs3/month_current.gif');
	color: #939393;
}
.adobe_cs3 .year td.current:hover {
	background-image: url('../images/adobe_cs3/month_current_hover.gif');
}

.adobe_cs3 .year td.selectedcurrent {
	background-image: url('../images/adobe_cs3/month_selectedcurrent.gif');
}
.adobe_cs3 .year td.selectedcurrent:hover {
	background-image: url('../images/adobe_cs3/month_selectedcurrent_hover.gif');
}

.adobe_cs3 .year td.outsideYear:hover {
	color: #939393;
}


text:
namespace TAO_JSON_PEGTL_NAMESPACE
{
   template< typename NewState >
   struct change_state
      : maybe_nothing
   {
      template< typename Rule,
                apply_mode A,
                rewind_mode M,
                template< typename... >
                class Action,
                template< typename... >
                class Control,
                typename Input,
                typename... States >
      [[nodiscard]] static bool match( Input& in, States&&... st )
      {
         NewState s( static_cast< const Input& >( in ), st... );
         if( TAO_JSON_PEGTL_NAMESPACE::match< Rule, A, M, Action, Control >( in, s ) ) {
            if constexpr( A == apply_mode::action ) {
               Action< Rule >::success( static_cast< const Input& >( in ), s, st... );
            }
            return true;
         }
         return false;
      }

      template< typename Input,
                typename... States >
      static void success( const Input& in, NewState& s, States&&... st ) noexcept( noexcept( s.success( in, st... ) ) )
      {
         s.success( in, st... );
      }
   };

}  // namespace TAO_JSON_PEGTL_NAMESPACE

#endif


text:
using Scada.Config;
using System;

namespace Scada.Db
{
    /// <summary>
    /// Creates data sources.
    /// <para>Создает источники данных.</para>
    /// </summary>
    public static class DataSourceFactory
    {
        /// <summary>
        /// Gets a new data source.
        /// </summary>
        public static DataSource GetDataSource(DbConnectionOptions connectionOptions)
        {
            if (connectionOptions == null)
                throw new ArgumentNullException(nameof(connectionOptions));

            switch (connectionOptions.KnownDBMS)
            {
                case KnownDBMS.PostgreSQL:
                    return new PgSqlDataSource(connectionOptions);

                case KnownDBMS.MySQL:
                    return new MySqlDataSource(connectionOptions);

                case KnownDBMS.MSSQL:
                    return new SqlDataSource(connectionOptions);

                case KnownDBMS.Oracle:
                    return new OraDataSource(connectionOptions);

                case KnownDBMS.OLEDB:
                    return new OleDbDataSource(connectionOptions);

                default:
                    throw new ScadaException("Unknown DBMS.");
            }
        }
    }
}


text:
from __future__ import unicode_literals

from django.db import models, migrations
import evetool.storage

class Migration(migrations.Migration):

    dependencies = [
        ('apis', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CharacterApi',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('characterid', models.BigIntegerField()),
                ('charactername', models.CharField(max_length=254)),
                ('corporationid', models.BigIntegerField()),
                ('corporationname', models.CharField(max_length=254)),
                ('api', models.ForeignKey(to='apis.Api')),
            ],
        ),
        migrations.CreateModel(
            name='CharacterApiIcon',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('size', models.IntegerField(choices=[(b'Tiny', 32), (b'Small', 64), (b'Medium', 128), (b'Large', 256), (b'Huge', 512), (b'Special', 200)])),
                ('typeid', models.IntegerField()),
                ('icon', models.ImageField(storage=evetool.storage.OverwriteStorage(), null=True, upload_to=b'images/characters/', blank=True)),
                ('relation', models.ForeignKey(to='characters.CharacterApi')),
            ],
        ),
        migrations.CreateModel(
            name='CharacterJournal',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('reftypeid', models.SmallIntegerField()),
                ('ownername1', models.CharField(max_length=254)),
                ('ownerid1', models.IntegerField()),
                ('ownername2', models.CharField(max_length=254)),
                ('ownerid2', models.IntegerField()),
                ('argname1', models.CharField(max_length=254)),
                ('argid1', models.IntegerField()),
                ('amount', models.FloatField(null=True)),
                ('reason', models.TextField(blank=True)),
                ('taxreceiverid', models.IntegerField(null=True)),
                ('taxamount', models.FloatField(null=True)),
                ('date', models.DateTimeField()),
                ('balance', models.FloatField()),
                ('characterapi', models.ForeignKey(to='characters.CharacterApi')),
            ],
            options={
                'ordering': ['-date', '-reftypeid'],
            },
        ),
        migrations.CreateModel(
            name='RefType',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('reftypeid', models.IntegerField(unique=True)),
                ('reftypename', models.CharField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='RequiredSkill',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('skilllevel', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Skill',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('typeid', models.BigIntegerField(unique=True)),
                ('typename', models.CharField(max_length=254)),
                ('published', models.IntegerField()),
                ('description', models.TextField()),
                ('rank', models.IntegerField()),
                ('primaryattribute', models.CharField(max_length=254)),
                ('secondaryattribute', models.CharField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='SkillBonus',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('bonustype', models.CharField(max_length=254)),
                ('bonusvalue', models.FloatField()),
                ('skill', models.ForeignKey(to='characters.Skill')),
            ],
        ),
        migrations.CreateModel(
            name='SkillGroup',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('groupid', models.BigIntegerField(unique=True)),
                ('groupname', models.CharField(unique=True, max_length=254)),
            ],
        ),
        migrations.AddField(
            model_name='skill',
            name='skillgroup',
            field=models.ForeignKey(to='characters.SkillGroup'),
        ),
        migrations.AddField(
            model_name='requiredskill',
            name='required',
            field=models.ForeignKey(related_name='required', to='characters.Skill'),
        ),
        migrations.AddField(
            model_name='requiredskill',
            name='skill',
            field=models.ForeignKey(related_name='required_skills', to='characters.Skill'),
        ),
        migrations.AlterUniqueTogether(
            name='characterjournal',
            unique_together=set([('characterapi', 'date', 'balance')]),
        ),
        migrations.AlterUniqueTogether(
            name='characterapiicon',
            unique_together=set([('size', 'relation')]),
        ),
    ]


text:
class WXDLLIMPEXP_FWD_CORE wxBitmapButton;
class WXDLLIMPEXP_FWD_CORE wxListCtrl;
class WXDLLIMPEXP_FWD_CORE wxListEvent;

#define wxEL_ALLOW_NEW          0x0100
#define wxEL_ALLOW_EDIT         0x0200
#define wxEL_ALLOW_DELETE       0x0400
#define wxEL_NO_REORDER         0x0800
#define wxEL_DEFAULT_STYLE      (wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE)

extern WXDLLIMPEXP_DATA_CORE(const char) wxEditableListBoxNameStr[];

// This class provides a composite control that lets the
// user easily enter list of strings

class WXDLLIMPEXP_CORE wxEditableListBox : public wxPanel
{
public:
    wxEditableListBox() { Init(); }

    wxEditableListBox(wxWindow *parent, wxWindowID id,
                      const wxString& label,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
                      long style = wxEL_DEFAULT_STYLE,
                      const wxString& name = wxASCII_STR(wxEditableListBoxNameStr))
    {
        Init();
        Create(parent, id, label, pos, size, style, name);
    }

    bool Create(wxWindow *parent, wxWindowID id,
                const wxString& label,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                long style = wxEL_DEFAULT_STYLE,
                const wxString& name = wxASCII_STR(wxEditableListBoxNameStr));

    void SetStrings(const wxArrayString& strings);
    void GetStrings(wxArrayString& strings) const;

    wxListCtrl* GetListCtrl()       { return m_listCtrl; }
    wxBitmapButton* GetDelButton()  { return m_bDel; }
    wxBitmapButton* GetNewButton()  { return m_bNew; }
    wxBitmapButton* GetUpButton()   { return m_bUp; }
    wxBitmapButton* GetDownButton() { return m_bDown; }
    wxBitmapButton* GetEditButton() { return m_bEdit; }

protected:
    wxBitmapButton *m_bDel, *m_bNew, *m_bUp, *m_bDown, *m_bEdit;
    wxListCtrl *m_listCtrl;
    int m_selection;
    long m_style;

    void Init()
    {
        m_style = 0;
        m_selection = 0;
        m_bEdit = m_bNew = m_bDel = m_bUp = m_bDown = NULL;
        m_listCtrl = NULL;
    }

    void OnItemSelected(wxListEvent& event);
    void OnEndLabelEdit(wxListEvent& event);
    void OnNewItem(wxCommandEvent& event);
    void OnDelItem(wxCommandEvent& event);
    void OnEditItem(wxCommandEvent& event);
    void OnUpItem(wxCommandEvent& event);
    void OnDownItem(wxCommandEvent& event);

    wxDECLARE_CLASS(wxEditableListBox);
    wxDECLARE_EVENT_TABLE();

private:
    void SwapItems(long i1, long i2);

};

#endif  // wxUSE_EDITABLELISTBOX

#endif // __WX_EDITLBOX_H__