text:
\chapter{Systematic uncertainties}
\label{chap:cpv:syst}

Three sources of systematic uncertainty are considered in this analysis: the
choice of model used to extract the \PLambdac\ and \APLambdac\ signal yields;
the failure of the kinematic weighting procedure to fully equalise the
\PLambdab, muon, and proton kinematics between the modes; and the breaking of
the assumption that the \PLambdac\ candidates originate from the \LbToLcmuX\
decay.
The effect of these on the measurement of \dACP\ will be discussed in this
\lcnamecref{chap:cpv:syst} and, where appropriate, systematic uncertainties
will be computed and assigned.

\section{Fit model}
\label{chap:cpv:syst:fit}

The models used for the signal and combinatorial background components in the
mass fits, presented in \cref{chap:cpv:prelim_fits,chap:cpv:araw}, do describe
the data well.
However, other functional forms may also describe the data well but give
different yields, which may change the value of \dACP\@.
To assess the extent to which different models can affect the measurement, the
yields are extracted using the method of sideband subtraction.

\subsection{Region definitions and method validity}
\label{chap:cpv:syst:fit:defs}

A sideband subtraction is applied to the data as a alternative method to
measure the \pKK\ and \ppipi\ signal yields in the charge-separated samples.

The signal region is defined as a window \SI{20}{\MeVcc} wide for the \pKK\
data and \SI{30}{\MeVcc} wide for \ppipi, centred on the nominal value of the
\PLambdac\ mass of \SI{2286.46}{\MeVcc}~\cite{PDG2014}.
The wider \ppipi\ window accounts for the wider signal shape, which is itself
due to the larger energy release, or $Q$ value, of the \ppipi\ decay.
The two sideband regions, each \SI{10}{\MeVcc} wide for \pKK\ and
\SI{15}{\MeVcc} wide for \ppipi, are chosen such that the centres are
$\pm\sfrac{3}{2}$ signal window widths away from the signal window centre.
The signal and sideband regions are shown in \cref{fig:cpv:syst:mass_windows},
with the 2012 magnet down data overlaid for reference.

The assumption of the sideband subtraction technique that the background
\ac{PDF} is linear is justified by the good description of the background by a
linear function in the nominal fits.
The lack of any visible physics backgrounds after the full selection described
in \cref{chap:cpv:selection} suggests that the sidebands are purely
combinatorial, and that no peaking structures are present in the signal region
other than the that of the signal.
Finally, the assumption that the signal contribution to the data in the
sidebands is negligible is checked using \ac{MC}, where \SI{0.7}{\percent} of
the \ppipi\ truth-matched signal data are in the sidebands, and for \pKK\ the
fraction of \SI{0.3}{\percent}.
These fractions are much smaller than the relative statistical uncertainties on
the signal yields shown in
\cref{tab:cpv:prelim_fits:yields:pKK,tab:cpv:prelim_fits:yields:ppipi}, and so
the level of contamination is considered to be negligible.

\begin{figure}
  \begin{subfigure}[b]{0.5\textwidth}
    \includegraphics[width=\textwidth]{cpv/systematics/LcTopKK_2012_MagDown_Lb_DTF_Lc_M.pdf}
    \caption{\pKK}
    \label{fig:cpv:syst:mass_windows:pKK}
  \end{subfigure}
  \begin{subfigure}[b]{0.5\textwidth}
    \includegraphics[width=\textwidth]{cpv/systematics/LcToppipi_2012_MagDown_Lb_DTF_Lc_M.pdf}
    \caption{\ppipi}
    \label{fig:cpv:syst:mass_windows:ppipi}
  \end{subfigure}
  \caption{%
    Definitions of the signal and sideband regions in the \PLambdac\ mass
    spectrum for \pKK~(\subref*{fig:cpv:syst:mass_windows:pKK}) and
    \ppipi~(\subref*{fig:cpv:syst:mass_windows:ppipi}).
    The 2012 magnet down data are overlaid for reference.
  }
  \label{fig:cpv:syst:mass_windows}
\end{figure}

\subsection{Results}
\label{chap:cpv:syst:fit:results}

For each data sub-sample, the \pKK\ and \ppipi\ samples are split by the charge
of the \PLambdac\ and the sideband subtraction technique is used to measure the
yields.
The yield asymmetry is then
\begin{equation}
  \ARaw(f) = \frac{%
    (N_{\text{S}}(\PLambdac) - N_{\text{SB}}(\PLambdac)) -
    (N_{\text{S}}(\APLambdac) - N_{\text{SB}}(\APLambdac))
  }{%
    (N_{\text{S}}(\PLambdac) - N_{\text{SB}}(\PLambdac)) +
    (N_{\text{S}}(\APLambdac) - N_{\text{SB}}(\APLambdac))
  },
  \label{eqn:cpv:syst:fit:araw_sb}
\end{equation}
where $N_{\text{S(SB)}}(\PLambdac)$ is the number of candidates in the signal
(sideband) region in the \PLambdac\ sample, and $N_{\text{S(SB)}}(\APLambdac)$
is the same but in the \APLambdac\ sample.
The counts are assumed to be Poisson-distributed, and so the uncertainty
$\unc{N}$ on each count is taken to be $\unc{N} = \sqrt{N}$.

The difference \dACP\ between \ARaw\ for \pKK\ and \ppipi\ is then computed
using the values obtain with \cref{eqn:cpv:syst:fit:araw_sb}, and the
difference is computed between those values and the nominal measurements given
in \cref{tab:cpv:results:asymmetries}.
The uncertainty on \ARaw\ is found by propagating the uncertainties on the
candidate counts using an \ac{MC} error propagation, and the values are assumed
to be fully correlated with those from the nominal procedure.
The differences for the measurements in all data sub-samples, and their
averages across years and magnet polarities, are presented in
\cref{tab:cpv:syst:sbs_differences}.
Almost all of the deviations from the nominal values are significant, and so
they taken as a systematic uncertainties on the measurements of \dACP\@.
The systematic uncertainty is \SI{0.26}{\percent} on the nominal result quoted
in \cref{eqn:cpv:results:dacp}.

\begin{sidewaystable}
  \centering
  \caption{%
    Differences between asymmetries measured with the nominal fit method and
    the sideband subtraction, measured for each data sub-sample and combination
    of sub-samples.
    The uncertainties quoted assume the values found by the two methods are
    fully correlated.
    The computation of the combinations, ``2011 + 2012'' and ``Average'', is
    defined in \cref{chap:cpv:results:combination}.
  }
  \label{tab:cpv:syst:sbs_differences}
  \input{tables/cpv/systematics/delta_acp-sideband_subtraction-diff.tex}
\end{sidewaystable}

\section{Residual background asymmetries}
\label{chap:cpv:syst:asym}

The kinematic weighting discussed in \cref{chap:cpv:kinematic_weighting} does
not completely remove all differences between the \PLambdab, muon, and proton
kinematics between the \pKK\ and \ppipi\ datasets, nor does it remove all
\PKminus/\PKplus and \Ppiminus/\Ppiplus differences within the decay modes.
Therefore, contributions from the respective background asymmetries will still
contribute to \dACP\@.
A study is performed to quantity this contamination.
Firstly, the available measurements of the detection and production asymmetries
are enumerated, and then their application to this analysis is described.

The asymmetries considered are those that arise from the differences in the
matter and antimatter cross-sections with the detector, called detection
asymmetries.
The trigger asymmetry for muons from \Pbottom decays is known to be
small~\cite{Aaij:2016yze}, and is neglected here.

The pion detection asymmetry is measured using \sqrtseq{7}
data~\cite{Aaij:2012cy} by a method of partial reconstruction of
\PDstarp-tagged \decay{\PDzero}{\PKminus\Ppiplus\Ppiminus\Ppiplus} decays.
In this, the delta mass variable, defined similarly to that in
\cref{eqn:prod:fitting:delta_mass}, provides a good signal-to-background
discrimination even if the pion is not required to have been reconstructed.
The ratio of the signal yields before and after the explicit reconstruction
gives the pion detection efficiency, and this is performed separately for each
pion charge in bins of pion kinematics.
The asymmetries are shown in \cref{fig:cpv:syst:asym:pion} as a function of
pion momentum.
The central values of the relative asymmetries in bins of pion momentum are
small, generally less than \SI{2}{\percent}, and are very close to zero when
averaged across the magnet polarities.
The integrated ratios are measured to the $0.9914 \pm 0.0040$ and $1.0045 \pm
0.0034$ for magnet up and magnet down configurations, respectively.
Here, these values are considered to be compatible with zero, and so
contributions from a pion detection asymmetry are neglected.

The kaon detection asymmetry is measured using the full \runone\ dataset with
\DpToKpipi\ and \decay{\PDplus}{\APKzero\Ppiplus} decays~\cite{Aaij:2014gsa}.
The raw asymmetries between the two decays are subtracted, as is the
contribution from the $\APKzero$ interaction asymmetry, to measure \ADKpi.
The kaon material cross-section asymmetry is known to be much larger than that
for pions~\cite{PDG2014}, and so \ADKpi\ is assumed to be dominated by the kaon
detection asymmetry.
The asymmetry as a function of kaon momentum, averaged across magnet
polarities, is shown in \cref{fig:cpv:syst:asym:kaon}, where it is seen to be
significant larger in magnitude than the pion asymmetry in
\cref{fig:cpv:syst:asym:pion} and significantly different from zero.

The muon detection asymmetry is measured using the tag-and-probe technique described in \cref{chap:prod:effs:tracking} with \JpsiTomumu~\cite{Stahl:2010261}.
The track reconstruction efficiency is computed separately for \Pmuon and
\APmuon and an asymmetry is formed, shown in \cref{fig:cpv:syst:asym:muon}.
The asymmetries are small, of the order of \SI{0.1}{\percent}.

Measurements of the production asymmetry from unequal \PLambdab\ and
\APLambdab\ cross-sections have been made by \lhcb~\cite{Aaij:2015fea}, where
the asymmetry as a function of \pT\ was found to be negligible over both 2011
and 2012, but as a function of rapidity $\rapidity$ was found to be
\begin{equation}
  \APLb = (0.058 \pm 0.014)(y - \langle{y}\rangle),
\end{equation}
where $\langle{y}\rangle = 3.1$ is the average \PLambdab\ rapidity in the
sample used.
These values are compatible between the 2011 and 2012 data.
The same analysis also measured the proton detection asymmetry using
simulation, assigning a systematic uncertainty to the result based on the
relative disagreement between the data and the \ac{MC} when evaluating the
\emph{kaon} detection asymmetry.
The results are shown in \cref{tab:cpv:syst:asym:proton}.
Simulations using both the \pKK\ and the \ppipi\ samples defined in
\cref{chap:cpv:data:mc} agree with these results, and are shown in
\cref{fig:cpv:syst:asym:proton_this}.

\subsection{Evaluation}
\label{chap:cpv:syst:asym:eval}

The effect on the value of \dACP\ of the residual background asymmetry for a
single asymmetry $A$ due to some particle $X$ is given by a shift $\Delta{A}$,
defined as
\begin{equation}
  \Delta{A}^{X} = \frac{1}{\nsig^{\pKK}}\sum_{i} \nsig^{\pKK,i} A_{i} -
    \frac{1}{\nsig^{\ppipi}}\sum_{i} \nsig^{\ppipi,i} A_{i},
\end{equation}
where $\nsig^{f}$ is the total number of signal candidates in the \LcTof\ sample; $i$ is the bin index of the asymmetry parameter, such as \PLambdab\ rapidity; and $\nsig^{f,i}$ is the number of signal candidates in the \LcTof\ sample that fall in the $i$th asymmetry bin.
The number of signal candidates is computed as the sum of signal sWeights, weighted by kinematic weights and phase space efficiency corrections as in \cref{eqn:cpv:araw:total_weights}.
One such shift is defined for each of the muon and proton detection asymmetries
and the \PLambdab\ production asymmetry, $\Delta\APLb$, $\Delta\ADp$, and
$\Delta\ADmu$.
The shift due to the residual kaon detection asymmetry is similarly defined
\begin{equation}
  \Delta{\ADK} = \frac{1}{\nsig^{\pKK}}\left(%
    \sum_{i} \nsig^{\pKK,\PKminus} A_{i} -
    \sum_{i} \nsig^{\pKK,\PKplus} A_{i}
  \right),
\end{equation}
where $\nsig^{\pKK,\PKpm}$ is the number of signal \PKplus/\PKminus particles in the $i$th asymmetry bin.

The total shift of \dACP, $\Delta{A}$ is given by the sum of the individual shifts
\begin{equation}
  \Delta{A} = \Delta\APLb + \Delta\ADp + \Delta\ADmu + \Delta\ADK.
\end{equation}
These shifts for each year and data-taking condition are given in \cref{tab:cpv:syst:asym:results}, along with the shifts for the polarity-integrated datasets.
All of the values found are below one per mille, with the proton detection asymmetry providing the largest contribution.
Conservatively, a \SI{0.1}{\percent} systematic uncertainty is assigned to the measurement of \dACP\ based on the residual background uncertainty.

\begin{figure}
  \centering
  \includegraphics[width=0.75\textwidth]{cpv/systematics/pion_detection_asymmetry_p}
  \caption{%
    Ratio of pion detection asymmetries as a function of pion
    momentum~\cite{Aaij:2012cy}.
    The uncertainties on the data points are statistical.
  }
  \label{fig:cpv:syst:asym:pion}
\end{figure}

\begin{figure}
  \centering
  \includegraphics[width=\textwidth]{cpv/systematics/kaon_detection_asymmetry_p}
  \caption{%
    Kaon detection asymmetry \ADKpi\ as a function of kaon momentum averaged
    across magnet polarities~\cite{Aaij:2014gsa}.
    The average of the measurements is shown as a grey band.
    The error bars on the data points include statistical and systematic
    uncertainties.
  }
  \label{fig:cpv:syst:asym:kaon}
\end{figure}

\begin{figure}
  \centering
  \includegraphics[width=0.75\textwidth]{cpv/systematics/muon_detection_asymmetry_pt}
  \caption{%
    Muon detection asymmetry as a function of muon \pT\ averaged
    across magnet polarities in \sqrtseq{8} data~\cite{Stahl:2010261}.
    The average of the measurements is shown as a blue band.
    The uncertainties on the data points are statistical.
  }
  \label{fig:cpv:syst:asym:muon}
\end{figure}

\begin{table}
  \centering
  \caption{%
    Proton detection asymmetries measured using simulation in bins of proton
    momentum~\cite{Aaij:2015fea}.
  }
  \label{tab:cpv:syst:asym:proton}
  \input{tables/cpv/systematics/proton_detection_asymmetry}
\end{table}

\begin{figure}
  \centering
  \includegraphics[width=0.75\textwidth]{cpv/systematics/proton_detection_asymmetry_p_this}
  \caption{%
    Asymmetry of the proton detection efficiency as a function of proton
    momentum in \si{\GeVc}.
    The uncertainties on the data points are statistical.
  }
  \label{fig:cpv:syst:asym:proton_this}
\end{figure}

\begin{sidewaystable}
  \centering
  \caption{%
    Shifts in the measurement of \dACP\ due to background asymmetries not
    completely removed during the kinematic weighting.
    The total shift $\Delta{A}$ is the sum of the individual ones, and all
    shifts are given in \num{e-4}.
  }
  \label{tab:cpv:syst:asym:results}
  \input{tables/cpv/systematics/residual_asymmetries}
\end{sidewaystable}

\section{Signal decays from other sources}
\label{chap:cpv:syst:bkg}

The mass fits count the number of real \PLambdac\ decays in the samples.
However, backgrounds to \LbToLcmuX\ can peak in the \PLambdac\ mass spectrum,
such as baryonic decays of \PB\ mesons or promptly produced \PLambdac\ decays
associated with random muons.
These backgrounds will have different asymmetries, contaminating \dACP\@.

Selecting \pKK\ and \ppipi\ decays from promptly produced \PLambdac\ baryons
will contaminate \dACP\ with the \PLambdac\ production asymmetry.
\Cref{fig:cpv:syst:ipchisq} shows the signal \lnipchisq\ distributions in the
2012 magnet down data sample, in which a peaking structure corresponding to
prompt \PLambdac\ is not visible.
These distributions can be compared to the \lnipchisq\ distributions in samples
dominated by prompt charm, given in \cref{chap:prod:fitting}.
Even if there is a prompt \PLambdac\ component in the data used for the \dACP\
measurement, the contribution from a \PLambdac\ production asymmetry should
cancel as the \PLambdac\ kinematics are weighted to be equal.
To confirm this hypothesis, the data sample is split in two, defined by the
candidates passing or failing the cut $\lnipchisq > 4$.
The value of \dACP\ is recomputed for each sample, and the difference between
the two values is compatible with zero within \SI{1}{\sigma}.
No corresponding systematic uncertainty is assigned.

\begin{figure}
  \begin{subfigure}[b]{0.5\textwidth}
    \includegraphics[width=\textwidth]{cpv/systematics/LcTopKK_2012_MagDown_Lc_IPCHI2_OWNPV.pdf}
    \caption{\pKK}
    \label{fig:cpv:syst:ipchisq:pKK}
  \end{subfigure}
  \begin{subfigure}[b]{0.5\textwidth}
    \includegraphics[width=\textwidth]{cpv/systematics/LcToppipi_2012_MagDown_Lc_IPCHI2_OWNPV.pdf}
    \caption{\ppipi}
    \label{fig:cpv:syst:ipchisq:ppipi}
  \end{subfigure}
  \caption{%
    Signal (black) and background (red) \lnipchisq\ distributions for
    \pKK~(\subref*{fig:cpv:syst:ipchisq:pKK}) and
    \ppipi~(\subref*{fig:cpv:syst:ipchisq:ppipi}) 2012 magnet down data
    samples.
    The \lnipchisq\ requirement made for the systematic studies is $\lnipchisq
    > 3$.
  }
  \label{fig:cpv:syst:ipchisq}
\end{figure}

Known alternative sources of \PLambdac\ from beauty decays are considered.
These include \decay{\PBplus}{\APLambdac\Pproton\Ppiplus} decays and
\decay{\PBplus}{\APSigmac\Pproton\Ppi\Ppi} with
\decay{\PSigmac}{\PLambdac\Ppi}.
In total, the inclusive \decay{\PB}{\PLambdac X} branching fractions are,
conservatively, less than \SI{10}{\percent} for both \PBplus and \PBzero, and
the \PBs contribution is negligible~\cite{PDG2014}.
The combined \PB cross-section is around four times that of the
\PLambdab~\cite{LHCb-PAPER-2013-004,Aaij:2015fea}, and the relative rate of
\decay{\PB}{\PLambdac X} is around 3 times that of \LbToLcmuX, for a total
relative rate of $N(\decay{\PB}{\PLambdac X})/N(\LbToLcmuX) = 12$.
However, the muon triggers and $\PLambdac\Pmuon$ vertex requirements strongly
suppress the alternate sources of \PLambdac\ decays.
In a simulated sample of one million generated
\decay{\PBzero}{\APLambdac\Pproton\Ppiminus\Ppiplus} decays, of the order of 10
\PLambdac\ candidates pass the selection requirements defined in
\cref{chap:cpv:selection}.
Given this, and that at least the \PBzero production asymmetry is compatible
with zero below the percent level~\cite{Aaij:2014bba}, the contribution from
\PB decays is neglected.

\section{Summary and combination}
\label{chap:cpv:syst:summary}

Sources of systematic uncertainties on the measurement of \dACP\ have been
studied.
The effect of the arbitrary choice of fit model is assessed with a sideband
subtraction method, with the deviation from the nominal result found to be
\SI{0.26}{\percent}.
Residual asymmetries arising from the failure of the kinematic weighting to
completely equalise all kinematic distributions are found to shift the value of
\dACP\ by \SI{0.1}{\percent}.
The contribution of \PLambdac\ candidates from non-\PLambdab\ decays is
considered to be negligible.

The two systematic uncertainties are added in quadrature in order to assign a
single systematic to \dACP, giving \SI{0.28}{\percent}.
This is small compared with the statistical uncertainty of \SI{0.89}{\percent}
given in \cref{tab:cpv:results:asymmetries}.


text:
<?php

class admin_raforwarding_main extends oxAdminDetails
{

    protected $_sThisTemplate = 'admin/forwarding_main.tpl';

    /**
     * Render Method
     *
     * @return string
     */
    public function render()
    {
        $sRet = parent::render();

        $sOxid = $this->getEditObjectId();
        $this->addTplParam('oxid', $sOxid);

        if ($sOxid != "-1" && isset($sOxid)) {
            /* @var $oForwarding \raforwardingmodel */
            $oForwarding = oxNew('raforwardingmodel');

            if ($oForwarding->load($sOxid)) {
                $this->addTplParam('edit', $oForwarding);
            }

            if ($oForwarding->isDerived()) {
                $this->addTplParam('readonly', true);
            }

        }
        return $sRet;
    }

    /**
     * Save the current forwarding rule
     */
    public function save()
    {
        parent::save();

        $oConfig = oxRegistry::getConfig();
        $sShopID = $oConfig->getShopId();
        $aParams = $oConfig->getRequestParameter('editval');
        $sOXID = $aParams['raforwarding__oxid'];

        if ($sOXID == '-1' && isset($sOXID)) {
            $aParams['raforwarding__oxid'] = null;
        }

        if ($sShopID != null) {
            $aParams['raforwarding__oxshopid'] = $sShopID;
        }

        /* @var $oForwarding \raforwardingmodel */
        $oForwarding = oxNew('raforwardingmodel');
        $oForwarding->assign($aParams);
        $oForwarding->save();

        // set OXID if inserted
        $this->setEditObjectId($oForwarding->getId());
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Anytv\DashboardBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Anytv\DashboardBundle\Entity\Offer;

class UpdateOffersCommand extends ContainerAwareCommand
{
    protected function configure()
    {
        $this
            ->setName('anytv:update_offers')
            ->setDescription('Updating Offers from Hasoffers to database.')
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $text = 'Updating Offers from Hasoffers to database.';
        $container = $this->getContainer();
        $doctrine = $container->get('doctrine');
        $repository = $doctrine->getRepository('AnytvDashboardBundle:Offer');
        $advertiser_repository = $doctrine->getRepository('AnytvDashboardBundle:Advertiser');
        $offer_category_repository = $doctrine->getRepository('AnytvDashboardBundle:OfferCategory');
        $offer_group_repository = $doctrine->getRepository('AnytvDashboardBundle:OfferGroup');
        $country_repository = $doctrine->getRepository('AnytvDashboardBundle:Country');
        $countries = $country_repository->findAll();
        $manager = $doctrine->getManager();

        $max_offer_id = $repository->getMaxOfferId();

        $hasoffers = $container->get('hasoffers');
        $offers_data = $hasoffers->getOffers($max_offer_id);

        $new_offers = 0;
        foreach($offers_data as $offer_data)
        {
          $offer_object = $offer_data->Offer;
          $offer_category_array = $offer_data->OfferCategory;
          $country_array = $offer_data->Country;
          $offer_group_array = $offer_data->OfferGroup;

          $offer = new Offer();
          $offer->setOfferId($offer_object->id);
          $offer->setName($offer_object->name);
          $offer->setDescription($offer_object->description);

          if($offer_object->advertiser_id && ($advertiser = $advertiser_repository->findOneByadvertiserId($offer_object->advertiser_id)))
          {
            $offer->setAdvertiser($advertiser);
          }

          foreach($offer_group_array as $offer_group_object)
          {
            if($offer_group = $offer_group_repository->findOneByOfferGroupId($offer_group_object->id))
            {
              $offer->addOfferGroup($offer_group);
            }
          }

          $offer->setOfferUrl($offer_object->offer_url);
          $offer->setPreviewUrl($offer_object->preview_url);
          $offer->setProtocol($offer_object->protocol);
          $offer->setStatus($offer_object->status);
          $offer->setExpirationDate(new \DateTime($offer_object->expiration_date));
          $offer->setPayoutType($offer_object->payout_type);
          $offer->setRevenueType($offer_object->revenue_type);
          $offer->setDefaultPayout($offer_object->default_payout);
          $offer->setMaxPayout($offer_object->max_payout);
          $offer->setPercentPayout($offer_object->percent_payout);
          $offer->setMaxPercentPayout($offer_object->max_percent_payout);
          $offer->setTieredPayout($offer_object->tiered_payout);
          $offer->setCurrency($offer_object->currency);
          $offer->setIsPrivate($offer_object->is_private);
          $offer->setRequireApproval($offer_object->require_approval);
          $offer->setRequireTermsAndConditions($offer_object->require_terms_and_conditions);
          $offer->setTermsAndConditions($offer_object->terms_and_conditions);
          $offer->setUpdatedAt(new \DateTime(date('Y-m-d H:i:s', $offer_object->modified)));

          foreach($offer_category_array as $offer_category_object)
          {
            if($offer_category = $offer_category_repository->findOneByOfferCategoryId($offer_category_object->id))
            {
              $offer->addOfferCategorie($offer_category);
            }
          }

          $offer_count = 0;
          if($country_array)
          {
            foreach($country_array as $country_object)
            {
              if($country = $country_repository->findOneByCode($country_object->code))
              {
                $offer->addCountrie($country);
                $offer_count++;
              }
            }
          }
          else
          {
            foreach($countries as $country)
            {
              $offer->addCountrie($country);
              $offer_count++;
            }
          }
          $offer->setCountryCount($offer_count);

          $manager->persist($offer);
          $new_offers++;
        }

        $manager->flush();

        $output->writeln($text);
        $output->writeln($new_offers.' new Offers added.');
    }
}


text:
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { unstable_composeClasses as composeClasses } from '@mui/base';
import formControlState from '../FormControl/formControlState';
import useFormControl from '../FormControl/useFormControl';
import styled from '../styles/styled';
import capitalize from '../utils/capitalize';
import formHelperTextClasses, { getFormHelperTextUtilityClasses } from './formHelperTextClasses';
import useThemeProps from '../styles/useThemeProps';

const useUtilityClasses = (ownerState) => {
  const { classes, contained, size, disabled, error, filled, focused, required } = ownerState;
  const slots = {
    root: [
      'root',
      disabled && 'disabled',
      error && 'error',
      size && `size${capitalize(size)}`,
      contained && 'contained',
      focused && 'focused',
      filled && 'filled',
      required && 'required',
    ],
  };

  return composeClasses(slots, getFormHelperTextUtilityClasses, classes);
};

const FormHelperTextRoot = styled('p', {
  name: 'MuiFormHelperText',
  slot: 'Root',
  overridesResolver: (props, styles) => {
    const { ownerState } = props;

    return [
      styles.root,
      ownerState.size && styles[`size${capitalize(ownerState.size)}`],
      ownerState.contained && styles.contained,
      ownerState.filled && styles.filled,
    ];
  },
})(({ theme, ownerState }) => ({
  color: (theme.vars || theme).palette.text.secondary,
  ...theme.typography.caption,
  textAlign: 'left',
  marginTop: 3,
  marginRight: 0,
  marginBottom: 0,
  marginLeft: 0,
  [`&.${formHelperTextClasses.disabled}`]: {
    color: (theme.vars || theme).palette.text.disabled,
  },
  [`&.${formHelperTextClasses.error}`]: {
    color: (theme.vars || theme).palette.error.main,
  },
  ...(ownerState.size === 'small' && {
    marginTop: 4,
  }),
  ...(ownerState.contained && {
    marginLeft: 14,
    marginRight: 14,
  }),
}));

const FormHelperText = React.forwardRef(function FormHelperText(inProps, ref) {
  const props = useThemeProps({ props: inProps, name: 'MuiFormHelperText' });
  const {
    children,
    className,
    component = 'p',
    disabled,
    error,
    filled,
    focused,
    margin,
    required,
    variant,
    ...other
  } = props;

  const muiFormControl = useFormControl();
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required'],
  });

  const ownerState = {
    ...props,
    component,
    contained: fcs.variant === 'filled' || fcs.variant === 'outlined',
    variant: fcs.variant,
    size: fcs.size,
    disabled: fcs.disabled,
    error: fcs.error,
    filled: fcs.filled,
    focused: fcs.focused,
    required: fcs.required,
  };

  const classes = useUtilityClasses(ownerState);

  return (
    <FormHelperTextRoot
      as={component}
      ownerState={ownerState}
      className={clsx(classes.root, className)}
      ref={ref}
      {...other}
    >
      {children === ' ' ? (
        // notranslate needed while Google Translate will not fix zero-width space issue

      ) : (
        children
      )}
    </FormHelperTextRoot>
  );
});

FormHelperText.propTypes /* remove-proptypes */ = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // |     To update them edit the d.ts file and run "yarn proptypes"     |
  // ----------------------------------------------------------------------
  /**
   * The content of the component.
   *
   * If `' '` is provided, the component reserves one line height for displaying a future message.
   */
  children: PropTypes.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: PropTypes.object,
  /**
   * @ignore
   */
  className: PropTypes.string,
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: PropTypes.elementType,
  /**
   * If `true`, the helper text should be displayed in a disabled state.
   */
  disabled: PropTypes.bool,
  /**
   * If `true`, helper text should be displayed in an error state.
   */
  error: PropTypes.bool,
  /**
   * If `true`, the helper text should use filled classes key.
   */
  filled: PropTypes.bool,
  /**
   * If `true`, the helper text should use focused classes key.
   */
  focused: PropTypes.bool,
  /**
   * If `dense`, will adjust vertical spacing. This is normally obtained via context from
   * FormControl.
   */
  margin: PropTypes.oneOf(['dense']),
  /**
   * If `true`, the helper text should use required classes key.
   */
  required: PropTypes.bool,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: PropTypes.oneOfType([
    PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])),
    PropTypes.func,
    PropTypes.object,
  ]),
  /**
   * The variant to use.
   */
  variant: PropTypes.oneOf(['filled', 'outlined', 'standard']),
};

export default FormHelperText;


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Inbox2.Platform.Channels.Entities
{
	[DataContract]
	public class ChannelMessageHeader
	{
		[DataMember(Order = 1)]
		public string MessageNumber { get; set; }

		[DataMember(Order = 2)]
		public string MessageIdentifier { get; set; }

		[DataMember(Order = 3)]
		public string InReplyTo { get; set; }

		[DataMember(Order = 4)]
		public string SourceFolder { get; set; }

		[DataMember(Order = 5)]
		public long Size { get; set; }

		[DataMember(Order = 6)]
		public long SourceChannelId { get; set; }

		[DataMember(Order = 7)]
		public string Context { get; set; }

		[DataMember(Order = 8)]
		public SourceAddress From { get; set; }

		[DataMember(Order = 9)]
		public SourceAddress ReturnTo { get; set; }

		[DataMember(Order = 10)]
		public SourceAddressCollection To { get; set; }

		[DataMember(Order = 11)]
		public SourceAddressCollection CC { get; set; }

		[DataMember(Order = 12)]
		public SourceAddressCollection BCC { get; set; }

		[DataMember(Order = 13)]
		public ChannelMetadata Metadata { get; set; }

		[DataMember(Order = 14)]
		public bool IsRead { get; set; }

		[DataMember(Order = 15)]
		public bool IsStarred { get; set; }

		[DataMember(Order = 16)]
		public string Body { get; set; }

		[DataMember(Order = 17)]
		public DateTime DateReceived { get; set; }

		public ChannelMessageHeader()
		{
			To = new SourceAddressCollection();
			CC = new SourceAddressCollection();
			BCC = new SourceAddressCollection();
			Metadata = new ChannelMetadata();
		}

		public override string ToString()
		{
			return String.Format("[{0} {1}]", MessageNumber, Context);
		}
	}
}


text:
<?php

namespace backend\models\flat;

use Yii;

/**
 * This is the model class for table "image".
 *
 * @property integer $id
 * @property string $filename
 * @property integer $flat
 *
 * @property Flat $flat0
 */
class Image extends \yii\db\ActiveRecord
{

    public function afterDelete()
    {
        parent::afterDelete();
        try {
            unlink(Yii::getAlias('@images') . "/full/" . $this->filename);
            unlink(Yii::getAlias('@images') . "/thumb/" . $this->filename);
        }catch ( \Exception $e){

        }
        return true;
    }

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'image';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['flat'], 'integer'],
//            [['filename'], 'string', 'max' => 255],
            [['filename'], 'safe'],
            [['filename'], 'string'] // is 'jpg,jpeg,gif,png' from configuration
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'filename' => 'Filename',
            'flat' => 'Flat',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getFlat0()
    {
        return $this->hasOne(Flat::className(), ['id' => 'flat']);
    }
}


text:
import numpy as np
''' Look up: https://docs.scipy.org/doc/numpy/reference/routines.random.html '''

def generate_array():
	#x = np.random.rand(4, 5)

	x = np.array([(20, 25, 10, 23, 26, 32, 10, 5, 0),
		(0, 2, 50, 20, 0, 1, 28, 5, 0)])
	print('Given array: ')
	print(x)

	return x

def access_elements(array):
	indexes = np.array([1, 1, 2, 3])
	elements = array[indexes]
	print('Requested elements:')
	print(elements)
	return elements

def masking(array, mask_value):
	masked = array[array < mask_value]
	print('Masked')
	print(masked)

def replacing(array, mask_value, new_value):
	array[array < mask_value] = new_value
	print('Replaced:')
	print(array)

if __name__ == "__main__":
	x = generate_array()
	mean_value = x.mean()
	print("Mean:")
	print(mean_value)

	masking(x, mean_value)

	replacing(x, mean_value, 0)


text:
import {NgModule} from '@angular/core';

@NgModule({})
export class Parent {
}


text:
#ifndef FXICOICON_H
#define FXICOICON_H

#ifndef FXICON_H
#include "FXIcon.h"
#endif

/// ICO icon
class FXAPI FXICOIcon : public FXIcon {
  FXDECLARE(FXICOIcon)
protected:
  FXICOIcon(){}
private:
  FXICOIcon(const FXICOIcon&);
  FXICOIcon &operator=(const FXICOIcon&);
public:

  /// Construct icon from memory stream formatted in Microsoft ICO format
  FXICOIcon(FXApp* a,const void *pix=NULL,FXColor clr=FXRGB(192,192,192),FXuint opts=0,FXint w=1,FXint h=1);

  /// Save pixels into stream in ICO file format
  virtual void savePixels(FXStream& store) const;

  /// Load pixels from stream in ICO file format
  virtual void loadPixels(FXStream& store);

  /// Destroy icon
  virtual ~FXICOIcon();
  };

/// Load a ICO file from a stream
extern FXAPI FXbool fxloadICO(FXStream& store,FXuchar*& data,FXColor& transp,FXint& width,FXint& height);

/// Save a ICO file to a stream
extern FXAPI FXbool fxsaveICO(FXStream& store,const FXuchar *data,FXColor transp,FXint width,FXint height);

#endif


text: CREATE TABLE country (id NVARCHAR(2) NOT NULL, name NVARCHAR(64) NOT NULL, PRIMARY KEY (id));


text:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <appender name="RollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>logs/debug.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
      <!-- rollover daily -->
      <fileNamePattern>logs/debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
      <!-- each file should be at most 25MB, keep 60 days worth of history, but at most 10GB -->
      <maxFileSize>25MB</maxFileSize>
      <maxHistory>60</maxHistory>
      <totalSizeCap>10GB</totalSizeCap>
    </rollingPolicy>

    <encoder>
      <pattern>%d{HH:mm:ss} [%t] %.-1level %-20logger{20} - %msg%n</pattern>
    </encoder>

    <!-- cSpell:ignore JaninoEventEvaluator -->
    <!-- FILTERS: Evaluators default to JaninoEventEvaluator -->
    <!-- Log everything from ReceiveLinkHandler except the 'onDelivery' messages. -->
    <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
      <evaluator>
        <expression>return level < WARN &&
        logger.equals("com.azure.core.amqp.implementation.handler.ReceiveLinkHandler") &&
        message.startsWith("onDelivery");</expression>
      </evaluator>
      <OnMismatch>NEUTRAL</OnMismatch>
      <OnMatch>DENY</OnMatch>
    </filter>

    <!-- OPTIONAL: Log everything from SendLinkHandler except the 'onLinkFlow' messages. -->
    <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
      <evaluator>
        <expression>return logger.equals("com.azure.core.amqp.implementation.handler.SendLinkHandler")
        &&message.startsWith("onLinkFlow");</expression>
      </evaluator>
      <OnMismatch>NEUTRAL</OnMismatch>
      <OnMatch>DENY</OnMatch>
    </filter>

    <!-- Log messages in ReactorSender that are not 'On next' or 'process delivered message'. -->
    <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
      <evaluator>
        <expression>return logger.equals("com.azure.core.amqp.implementation.ReactorSender")
        &&(message.contains("On next") || message.contains("process delivered message"));</expression>
      </evaluator>
      <OnMismatch>NEUTRAL</OnMismatch>
      <OnMatch>DENY</OnMatch>
    </filter>
  </appender>

  <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <Pattern>%d{HH:mm:ss} [%t] %highlight(%.-1level) %green(%logger{20}) - %msg%n</Pattern>
    </encoder>

    <!-- FILTERS: Evaluators default to JaninoEventEvaluator -->
    <!-- Log everything from ReceiveLinkHandler except the 'onDelivery' messages. -->
    <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
      <evaluator>
        <expression>return level < WARN &&
          logger.equals("com.azure.core.amqp.implementation.handler.ReceiveLinkHandler") &&
          message.startsWith("onDelivery");</expression>
      </evaluator>
      <OnMismatch>NEUTRAL</OnMismatch>
      <OnMatch>DENY</OnMatch>
    </filter>

    <!-- OPTIONAL: Log everything from SendLinkHandler except the 'onLinkFlow' messages. -->
    <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
      <evaluator>
        <expression>return logger.equals("com.azure.core.amqp.implementation.handler.SendLinkHandler")
          &&message.startsWith("onLinkFlow");</expression>
      </evaluator>
      <OnMismatch>NEUTRAL</OnMismatch>
      <OnMatch>DENY</OnMatch>
    </filter>

    <!-- Log messages in ReactorSender that are not 'On next' or 'process delivered message'. -->
    <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
      <evaluator>
        <expression>return logger.equals("com.azure.core.amqp.implementation.ReactorSender")
          &&(message.contains("On next") || message.contains("process delivered message"));</expression>
      </evaluator>
      <OnMismatch>NEUTRAL</OnMismatch>
      <OnMatch>DENY</OnMatch>
    </filter>
  </appender>

  <logger name="com.azure.messaging.servicebus" level="DEBUG" />

  <root level="WARN">
    <appender-ref ref="Console"/>
    <appender-ref ref="RollingFile"/>
  </root>
</configuration>


text:
/*************************************************************************/
/*  image_loader_jpegd.cpp                                               */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                    http://www.godotengine.org                         */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur.                 */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)    */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/
#include "image_loader_hdr.h"

#include "os/os.h"
#include "print_string.h"

#include "thirdparty/tinyexr/tinyexr.h"

Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear) {

	String header = f->get_token();

	print_line("HEADER: " + header);
	ERR_FAIL_COND_V(header != "#?RADIANCE" && header != "#?RGBE", ERR_FILE_UNRECOGNIZED);

	while (true) {
		String format = f->get_token();
		ERR_FAIL_COND_V(f->eof_reached(), ERR_FILE_UNRECOGNIZED);
		if (format.begins_with("FORMAT=") && format != "FORMAT=32-bit_rle_rgbe") {
			ERR_EXPLAIN("Only 32-bit_rle_rgbe is supported for .hdr files.");
			return ERR_FILE_UNRECOGNIZED;
		}
		if (format == "FORMAT=32-bit_rle_rgbe")
			break;
	}

	String token = f->get_token();

	ERR_FAIL_COND_V(token != "-Y", ERR_FILE_CORRUPT);

	int height = f->get_token().to_int();

	token = f->get_token();

	ERR_FAIL_COND_V(token != "+X", ERR_FILE_CORRUPT);

	int width = f->get_line().to_int();

	print_line("HDR w: " + itos(width) + " h:" + itos(height));

	PoolVector<uint8_t> imgdata;

	imgdata.resize(height * width * sizeof(uint32_t));

	{

		PoolVector<uint8_t>::Write w = imgdata.write();

		uint8_t *ptr = (uint8_t *)w.ptr();

		if (width < 8 || width >= 32768) {
			// Read flat data

			f->get_buffer(ptr, width * height * 4);
		} else {
			// Read RLE-encoded data

			for (int j = 0; j < height; ++j) {
				int c1 = f->get_8();
				int c2 = f->get_8();
				int len = f->get_8();
				if (c1 != 2 || c2 != 2 || (len & 0x80)) {
					// not run-length encoded, so we have to actually use THIS data as a decoded
					// pixel (note this can't be a valid pixel--one of RGB must be >= 128)

					ptr[(j * width) * 4 + 0] = uint8_t(c1);
					ptr[(j * width) * 4 + 1] = uint8_t(c2);
					ptr[(j * width) * 4 + 2] = uint8_t(len);
					ptr[(j * width) * 4 + 3] = f->get_8();

					f->get_buffer(&ptr[(j * width + 1) * 4], (width - 1) * 4);
					continue;
				}
				len <<= 8;
				len |= f->get_8();

				print_line("line: " + itos(len));
				if (len != width) {
					ERR_EXPLAIN("invalid decoded scanline length, corrupt HDR");
					ERR_FAIL_V(ERR_FILE_CORRUPT);
				}

				for (int k = 0; k < 4; ++k) {
					int i = 0;
					while (i < width) {
						int count = f->get_8();
						if (count > 128) {
							// Run
							int value = f->get_8();
							count -= 128;
							for (int z = 0; z < count; ++z)
								ptr[(j * width + i++) * 4 + k] = uint8_t(value);
						} else {
							// Dump
							for (int z = 0; z < count; ++z)
								ptr[(j * width + i++) * 4 + k] = f->get_8();
						}
					}
				}
			}
		}

		//convert
		for (int i = 0; i < width * height; i++) {

			float exp = pow(2.0f, ptr[3] - 128.0f);

			Color c(
					ptr[0] * exp / 255.0,
					ptr[1] * exp / 255.0,
					ptr[2] * exp / 255.0);

			if (p_force_linear) {
				c = c.to_linear();
			}

			*(uint32_t *)ptr = c.to_rgbe9995();
			ptr += 4;
		}
	}

	p_image->create(width, height, false, Image::FORMAT_RGBE9995, imgdata);

	return OK;
}

void ImageLoaderHDR::get_recognized_extensions(List<String> *p_extensions) const {

	p_extensions->push_back("hdr");
}

ImageLoaderHDR::ImageLoaderHDR() {
}


text:
function TypeCache(){
	var rc = this;

	rc.loading = {};
	rc.loaded = {};
}

TypeCache.prototype.load = function(name, callback) {
	var rc = this;

	if(rc.loaded[name]){
		callback(null, rc.loaded[name]);
		return;
	}

	var loading = rc.loading[name];
	if(!loading){
		loading = [];
		rc.loading[name] = loading;
	}
	loading.push(callback);

	var request = {
		"function" : "get",
		"parameters" : {
			"addresses" : [
				name
			]
		}
	};

	api_request(request,function(err, response){
		console.log(err);

		var type = response.objects[0];
		if(type){
			rc.loaded[name] = type;
		}

		var callbacks = rc.loading[name];
		for(var i = 0; i < callbacks.length; i++){
			var callback = callbacks[i];

			callback(null,type);
		}
		delete rc.loading[name];
	})
};


text: <?= $this->bRenderPartial('list/_list', array('dataView' => $dataView), true); ?>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;

namespace Acn.Rdm.Packets.Net
{
    public class TcpCommsStatus
    {
        public class Get : RdmRequestPacket
        {
            public Get()
                : base(RdmCommands.Get, RdmParameters.TcpCommsStatus)
            {
            }

            protected override void ReadData(RdmBinaryReader data)
            {
                //Parameter Data Empty
            }

            protected override void WriteData(RdmBinaryWriter data)
            {
                //Parameter Data Empty
            }
        }

        public class GetReply : RdmResponsePacket
        {
            public GetReply()
                : base(RdmCommands.GetResponse, RdmParameters.TcpCommsStatus)
            {
            }

            public IPAddress CurrentConnectionIP { get; set; }

            public short UnhealthyTCPEvents { get; set; }

            public short TCPConnectEvents { get; set; }

            protected override void ReadData(RdmBinaryReader data)
            {
                CurrentConnectionIP = new IPAddress(data.ReadBytes(4));
                UnhealthyTCPEvents = data.ReadNetwork16();
                TCPConnectEvents = data.ReadNetwork16();
            }

            protected override void WriteData(RdmBinaryWriter data)
            {
                data.Write(CurrentConnectionIP.GetAddressBytes());
                data.Write(UnhealthyTCPEvents);
                data.Write(TCPConnectEvents);
            }
        }

        public class Set : RdmRequestPacket
        {
            public Set()
                : base(RdmCommands.Set, RdmParameters.EndpointLabel)
            {
            }

            protected override void ReadData(RdmBinaryReader data)
            {
                //Parameter Data Empty
            }

            protected override void WriteData(RdmBinaryWriter data)
            {
                //Parameter Data Empty
            }
        }

        public class SetReply : RdmResponsePacket
        {
            public SetReply()
                : base(RdmCommands.SetResponse, RdmParameters.EndpointLabel)
            {
            }

            protected override void ReadData(RdmBinaryReader data)
            {
                //Parameter Data Empty
            }

            protected override void WriteData(RdmBinaryWriter data)
            {
                //Parameter Data Empty
            }
        }
    }
}


text:
package org.unitedinternet.cosmo.model;

import java.io.Reader;

/**
 * Stamp that associates message-specific attributes to an item.
 */
public interface MessageStamp extends Stamp{

    public static final String FORMAT_DATE_SENT = "EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'Z";

    // Property accessors
    public String getMessageId();

    public void setMessageId(String id);

    public String getHeaders();

    public void setHeaders(String headers);

    public void setHeaders(Reader headers);

    public String getFrom();

    public void setFrom(String from);

    public String getTo();

    public void setTo(String to);

    public String getBcc();

    public void setBcc(String bcc);

    public String getCc();

    public void setCc(String cc);

    public String getOriginators();

    public void setOriginators(String originators);

    public String getDateSent();

    public void setDateSent(String dateSent);

    public String getInReplyTo();

    public void setInReplyTo(String inReplyTo);

    public String getReferences();

    public void setReferences(String references);

    public void setReferences(Reader references);

}


text:
package ru.stqa.pft.sandbox;

/**
 * Created by Zakhidat on 17.02.2017.
 */
public class Square {
  public double l;

  public Square(double l) {
    this.l = l;
  }
  public double area() {
    return this.l*this.l;
  }
}


text:
var trainAppSocketFactory = angular.module('trainAppSocketFactory',['btford.socket-io']);
 	trainAppSocketFactory.factory('socket',['socketFactory', function(socketFactory){
console.log("+++++++++++++++++" + typeof(socketFactory));
return socketFactory();
 	}
   ]);


text:
<!doctype html>

    <title>Code coverage report for cjs/operators/publish.js</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../../prettify.css">
    <link rel="stylesheet" href="../../base.css">

Code coverage report for cjs/operators/publish.js

        Statements: 100% (13 / 13)
        Branches: 75% (3 / 4)
        Functions: 100% (3 / 3)
        Lines: 100% (12 / 12)
        Ignored: none

All files » cjs/operators/ » publish.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

1
1

2

1

1

1

1

1
12

1
12

1

'use strict';

exports.__esModule = true;
exports['default'] = publish;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _Subject = require('../Subject');

var _Subject2 = _interopRequireDefault(_Subject);

var _multicast = require('./multicast');

var _multicast2 = _interopRequireDefault(_multicast);

function subjectFactory() {
    return new _Subject2['default']();
}

function publish() {
    return _multicast2['default'].call(this, subjectFactory);
}

//# sourceMappingURL=publish.js.map
module.exports = exports['default'];
//# sourceMappingURL=publish.js.map

Generated by istanbul at Mon Oct 26 2015 13:47:29 GMT-0700 (PDT)


text:
SUDO_DIR=/private/etc/sudoers.d
SUDO_FILE=$SUDO_DIR/90-cloud-init-users
sudo mkdir -p $SUDO_DIR
echo "%admin ALL=(ALL) NOPASSWD:ALL" > $SUDO_FILE
chmod 440 $SUDO_FILE


text:
const int KEY_QUE_MAX_SIZE = 64;

// property
unsigned int keyqueue_get_size();

// push
void keyqueue_push(const KEYBOARD_INPUT_DATA* data, unsigned int count);
void keyqueue_push_once(const KEYBOARD_INPUT_DATA data);

// pop
unsigned int keyqueue_pop(KEYBOARD_INPUT_DATA* buffer, unsigned int bufferSize);
KEYBOARD_INPUT_DATA keyqueue_pop_once();

// clear
void keyqueue_clear();


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.IO;

namespace Duality.Editor
{
	/// <summary>
	/// An attribute that provides information about a Types or Members preferred editor behaviour.
	/// </summary>
	public abstract class EditorHintAttribute : Attribute
	{
		/// <summary>
		/// Retrieves the specified editor hint attribute from a member, if existing.
		/// </summary>
		/// <typeparam name="T">The Type of editor hint to retrieve.</typeparam>
		/// <param name="member">The member to extract the hint from. May be null.</param>
		/// <param name="overrideHints">An optional override hint, that will be preferred, if applicable.</param>
		public static T Get<T>(MemberInfo member, IEnumerable<EditorHintAttribute> overrideHints = null) where T : EditorHintAttribute
		{
			T hint = member != null ? member.GetAttributesCached<T>().FirstOrDefault() : null;
			if (overrideHints == null)
				return hint;
			else if (hint == null)
				return overrideHints.OfType<T>().FirstOrDefault();
			else
				return overrideHints.OfType<T>().Where(o => hint.GetType().GetTypeInfo().IsInstanceOfType(o)).FirstOrDefault() ?? hint;
		}
		/// <summary>
		/// Retrieves the specified editor hint attributes from a member, if existing.
		/// </summary>
		/// <typeparam name="T">The Type of editor hints to retrieve.</typeparam>
		/// <param name="member">The member to extract the hints from. May be null.</param>
		/// <param name="overrideHints">An optional collection of override hints, that will be preferred, if applicable.</param>
		public static IEnumerable<T> GetAll<T>(MemberInfo member, IEnumerable<EditorHintAttribute> overrideHints = null) where T : EditorHintAttribute
		{
			IEnumerable<T> hints = member != null ? member.GetAttributesCached<T>() : null;
			if (overrideHints == null)
				return hints;
			else if (hints == null)
				return overrideHints.OfType<T>();
			else
				return hints.Select(original => overrideHints.OfType<T>().Where(o => original.GetType().GetTypeInfo().IsInstanceOfType(o)).FirstOrDefault() ?? original);
		}
	}
}


text:
<?php

namespace Hydra\BigHydraBundle\Command\Jira;

use Hydra\BigHydraBundle\Jira\Extract\ExtractJiraIssue;
use Hydra\BigHydraBundle\Jira\IssueSync;
use Hydra\BigHydraBundle\Jira\Load\MongoRepository;
use Hydra\JiraRestApiBundle\Service\ServiceFactory;
use Sensio\Bundle\GeneratorBundle\Command\Helper\DialogHelper;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 *
 */
class SyncCommand extends ContainerAwareCommand
{
    const NAME = 'hydra:jira:sync';

    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this
            ->setName(static::NAME)
            ->setDescription('Sync the Jira tickets')
            ->addArgument('host', InputArgument::REQUIRED)
            ->addArgument('username', InputArgument::REQUIRED)
        ;
    }

    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $host = $input->getArgument('host');
        $username = $input->getArgument('username');

        /** @var DialogHelper $interactiveDialog */
        $interactiveDialog = $this->getHelperSet()->get('dialog');
        $password = $interactiveDialog->askHiddenResponse(
            $output,
            'Enter password: ',
            null
        );

        if (null === $password) {
            throw new \InvalidArgumentException("You have to provide a password");
        }

        $syncService = $this->instantiateIssueSync($host, $username, $password);
        $syncService->sync();
    }

    /**
     * @param string $host
     * @param string $username
     * @param string $password
     *
     * @return IssueSync
     */
    protected function instantiateIssueSync($host, $username, $password)
    {
        /** @var MongoRepository $repository */
        $repository = $this->getContainer()->get('hydra_big_hydra.jira.mongo_repository');
        /** @var ServiceFactory $jiraFactory */
        $jiraFactory = $this->getContainer()->get('hydra_jira_rest.service_factory');

        $issueService = $jiraFactory->getIssueService($host, $username, $password);
        $extractIssue = new ExtractJiraIssue($issueService);

        $syncConfig = $this->getContainer()->getParameter('jira.sync');
        $syncService = new IssueSync($repository, $extractIssue, $syncConfig);

        return $syncService;
    }
}


text:
import unittest

import mock
import numpy

import chainer
from chainer import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition

@testing.parameterize(*testing.product({
    'shape': [(3, 2), ()],
    'dtype': [numpy.float16, numpy.float32, numpy.float64],
}))
class TestSigmoid(unittest.TestCase):

    def setUp(self):
        self.x = numpy.random.uniform(-.5, .5, self.shape).astype(self.dtype)
        self.gy = numpy.random.uniform(-.1, .1, self.shape).astype(self.dtype)
        self.check_forward_options = {}
        self.check_backward_options = {}
        if self.dtype == numpy.float16:
            self.check_forward_options = {'atol': 1e-4, 'rtol': 1e-3}
            self.check_backward_options = {
                'dtype': numpy.float64, 'atol': 5e-4, 'rtol': 5e-3}

    def check_forward(self, x_data, use_cudnn='always'):
        x = chainer.Variable(x_data)
        with chainer.using_config('use_cudnn', use_cudnn):
            y = functions.sigmoid(x)
        self.assertEqual(y.data.dtype, self.dtype)
        y_expect = functions.sigmoid(chainer.Variable(self.x))

        testing.assert_allclose(
            y_expect.data, y.data, **self.check_forward_options)

    @attr.gpu
    @condition.retry(3)
    def test_forward_gpu(self):
        self.check_forward(cuda.to_gpu(self.x), 'always')

    @attr.gpu
    @condition.retry(3)
    def test_forward_gpu_non_contiguous(self):
        self.check_forward(cuda.cupy.asfortranarray(cuda.to_gpu(self.x)),
                           'always')

    @attr.gpu
    @condition.retry(3)
    def test_forward_gpu_no_cudnn(self):
        self.check_forward(cuda.to_gpu(self.x), 'never')

    def check_backward(self, x_data, y_grad, use_cudnn='always'):
        with chainer.using_config('use_cudnn', use_cudnn):
            gradient_check.check_backward(
                functions.Sigmoid(), x_data, y_grad,
                **self.check_backward_options)

    @condition.retry(3)
    def test_backward_cpu(self):
        self.check_backward(self.x, self.gy)

    @attr.gpu
    @condition.retry(3)
    def test_backward_gpu(self):
        self.check_backward(cuda.to_gpu(self.x), cuda.to_gpu(self.gy))

    @attr.gpu
    @condition.retry(3)
    def test_backward_gpu_non_contiguous(self):
        self.check_backward(cuda.cupy.asfortranarray(cuda.to_gpu(self.x)),
                            cuda.cupy.asfortranarray(cuda.to_gpu(self.gy)))

    @attr.gpu
    @condition.retry(3)
    def test_backward_gpu_no_cudnn(self):
        self.check_backward(cuda.to_gpu(self.x), cuda.to_gpu(self.gy), 'never')

@testing.parameterize(*testing.product({
    'use_cudnn': ['always', 'auto', 'never'],
    'dtype': [numpy.float16, numpy.float32, numpy.float64],
}))
@attr.cudnn
class TestSigmoidCudnnCall(unittest.TestCase):

    def setUp(self):
        self.x = cuda.cupy.random.uniform(-1, 1, (2, 3)).astype(self.dtype)
        self.gy = cuda.cupy.random.uniform(-1, 1, (2, 3)).astype(self.dtype)
        with chainer.using_config('use_cudnn', self.use_cudnn):
            self.expect = chainer.should_use_cudnn('==always') and (
                cuda.cudnn.cudnn.getVersion() >= 3000 or
                self.dtype != numpy.float16)

    def forward(self):
        x = chainer.Variable(self.x)
        return functions.sigmoid(x)

    def test_call_cudnn_forward(self):
        default_func = cuda.cupy.cudnn.activation_forward
        with chainer.using_config('use_cudnn', self.use_cudnn):
            with mock.patch('cupy.cudnn.activation_forward') as func:
                func.side_effect = default_func
                self.forward()
                self.assertEqual(func.called, self.expect)

    def test_call_cudnn_backward(self):
        with chainer.using_config('use_cudnn', self.use_cudnn):
            y = self.forward()
            y.grad = self.gy
            default_func = cuda.cupy.cudnn.activation_backward
            with mock.patch('cupy.cudnn.activation_backward') as func:
                func.side_effect = default_func
                y.backward()
                self.assertEqual(func.called, self.expect)

testing.run_module(__name__, __file__)


text:
using System.Threading.Tasks;
using Abp.Application.Services.Dto;
using Abp.AspNetCore.Mvc.Authorization;
using poolprobase.Authorization;
using poolprobase.Controllers;
using poolprobase.Users;
using poolprobase.Web.Models.Users;
using Microsoft.AspNetCore.Mvc;

namespace poolprobase.Web.Controllers
{
    [AbpMvcAuthorize(PermissionNames.Pages_Users)]
    public class UsersController : poolprobaseControllerBase
    {
        private readonly IUserAppService _userAppService;

        public UsersController(IUserAppService userAppService)
        {
            _userAppService = userAppService;
        }

        public async Task<ActionResult> Index()
        {
            var users = (await _userAppService.GetAll(new PagedResultRequestDto {MaxResultCount = int.MaxValue})).Items; //Paging not implemented yet
            var roles = (await _userAppService.GetRoles()).Items;
            var model = new UserListViewModel
            {
                Users = users,
                Roles = roles
            };
            return View(model);
        }

        public async Task<ActionResult> EditUserModal(long userId)
        {
            var user = await _userAppService.Get(new EntityDto<long>(userId));
            var roles = (await _userAppService.GetRoles()).Items;
            var model = new EditUserModalViewModel
            {
                User = user,
                Roles = roles
            };
            return View("_EditUserModal", model);
        }
    }
}


text:
/**
* @file csCartesian.h
*
*  Created on: 2015-6-14
*      Author: salmon
*/

#ifndef CORE_GEOMETRY_CS_CARTESIAN_H_
#define CORE_GEOMETRY_CS_CARTESIAN_H_

#include "Chart.h"
#include "simpla/algebra/nTuple.h"
#include "simpla/utilities/SPDefines.h"
#include "simpla/utilities/macro.h"
#include "simpla/utilities/type_cast.h"
namespace simpla {
namespace geometry {
class gCurve;
/**
 * @ingroup  coordinate_system
 * @{
 *  Metric of  Cartesian topology_coordinate system
 */
struct csCartesian : public Chart {
    SP_SERIALIZABLE_HEAD(Chart, csCartesian)
   protected:
    template <typename... Args>
    explicit csCartesian(Args &&... args) : base_type(std::forward<Args>(args)...) {}
    csCartesian();
    csCartesian(csCartesian const &);

   public:
    ~csCartesian() override;
    template <typename... Args>
    static std::shared_ptr<this_type> New(Args &&... args) {
        return std::shared_ptr<this_type>(new this_type(std::forward<Args>(args)...));
    }

    std::shared_ptr<Edge> GetCoordinateEdge(point_type const &x0, int normal, Real u) const override;
    std::shared_ptr<Face> GetCoordinateFace(point_type const &x0, int normal, Real u, Real v) const override;
    std::shared_ptr<GeoObject> GetCoordinateBox(box_type const &o) const override;

    /**
     * metric only diff_scheme the volume of simplex
     */

    point_type map(point_type const &p) const override { return p; }
    point_type inv_map(point_type const &p) const override { return p; }
    Real length(point_type const &p0, point_type const &p1) const override { return std::sqrt(dot(p1 - p0, p1 - p0)); }
    Real length(point_type const &p0, point_type const &p1, int normal) const override {
        return std::abs(p1[normal] - p0[normal]);
    };

    Real area(point_type const &p0, point_type const &p1, int normal) const override {
        return std::abs((p1[(normal + 1) % 3] - p0[(normal + 1) % 3]) * (p1[(normal + 2) % 3] - p0[(normal + 2) % 3]));
    };
    Real area(point_type const &p0, point_type const &p1, point_type const &p2) const override {
        return (std::sqrt(dot(cross(p1 - p0, p2 - p0), cross(p1 - p0, p2 - p0)))) * 0.5;
    }
    Real volume(point_type const &p0, point_type const &p1, point_type const &p2, point_type const &p3) const override {
        return dot(p3 - p0, cross(p1 - p0, p2 - p1)) / 6.0;
    }
    Real volume(point_type const &p0, point_type const &p1) const override {
        return (p1[0] - p0[0]) * (p1[1] - p0[1]) * (p1[2] - p0[2]);
    };
    Real inner_product(point_type const &uvw, vector_type const &v0, vector_type const &v1) const override {
        return v0[0] * v1[0] + v0[1] * v1[1] + v0[2] * v1[2];
    };
};
/** @}*/
}  // namespace geometry {
}  // namespace simpla

#endif /* CORE_GEOMETRY_CS_CARTESIAN_H_ */


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package googledb;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 *
 * @author ootyanand
 */
@SuppressWarnings("serial")
public class Dialog extends javax.swing.JDialog{

    Dimension dlgSize = new Dimension(500, 300);

    Component titlePanel;
    Component centerPanel;
    Component buttonPanel;

    static final String CMD_OK = "OK";
    static final String CMD_CANCEL = "Cancel";

    public Dialog(Frame owner, String title, boolean modal, Object... params) {
        super(owner, title, modal);
        init(params);
    }

    private void init(Object... params) {
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);
        getContentPane().setLayout(new BorderLayout());
        add(titlePanel = createTitlePan(params), BorderLayout.NORTH);
        add(centerPanel = createCenterPan(params), BorderLayout.CENTER);
        add(buttonPanel = createButtonPan(params), BorderLayout.SOUTH);
        //centerPanel.setBorder(BorderFactory.createEmptyBorder(15, 7, 7, 15));
        addButtons();
        //setDlgSize(dlgSize);
        pack();
        setLocationRelativeTo(getParent());
    }

    public Component createTitlePan(Object... params){
        return new JPanel();
    }
    public Component createCenterPan(Object... params){
        return new JPanel();
    }
    public Component createButtonPan(Object... params){
        return new JPanel(new FlowLayout(FlowLayout.CENTER));
    }

    public void addButtons(){
        addButton(new JButton(CMD_OK));
    }

    public Component getCenterPan(){
        return centerPanel;
    }

    public Component getTitlePan(){
        return titlePanel;
    }

    public Component getButtonPan(){
        return buttonPanel;
    }

    public void onCmd(String cmd){
        switch (cmd) {
            case CMD_OK:		onOK(); break;
            case CMD_CANCEL: 	onCancel(); break;
            default:        	break;
        }
    }

    public void onOK()      { setVisible(false); }
    public void onCancel()  { setVisible(false); }

    public void addButton(JButton btn){
        btn.addActionListener((ActionEvent e) -> { onCmd(btn.getText());  });
        ((JPanel)buttonPanel).add(btn);
    }

    public void setDlgSize(Dimension dim){
        setSize(dim);
        setLocationRelativeTo(super.getParent());
    }
}


text:
Package.describe({
	name: 'rocketchat:mentions',
	version: '0.0.1',
	summary: 'Message pre-processor that will process mentions',
	git: ''
});

Package.onUse(function(api) {
	api.use([
		'coffeescript',
		'rocketchat:lib'
	]);

	api.addFiles('server.coffee', 'server');
	api.addFiles('client.coffee', 'client');
});


text:
using namespace ofp;

TEST(actionrange, validateInput_regMove) {
  // nx::AT_REGMOVE(src, dst).
  ByteList data{
      HexToRawData("FFFF00180000232000060020000000008000160480001804")};
  ActionRange range{data};

  Validation context;
  EXPECT_TRUE(range.validateInput(&context));
}

TEST(actionrange, validateInput_regMove_fail) {
  // nx::AT_REGMOVE(src, dst) (invalid; wrong size).
  ByteList data{HexToRawData(
      "FFFF002000002320000600200000000080001604800018040000000000000000")};
  ActionRange range{data};

  Validation context;
  EXPECT_FALSE(range.validateInput(&context));
}


text:
sinclude \
	$(realpath $(dir $(MAKEFILE_LIST))/../..)/.local.mk \
	$(realpath $(dir $(MAKEFILE_LIST))/../..)/include/make/*.mk

DOCKER_IMAGE      = $(DOCKER_IMAGE_PREFIX)rabbitmq
DOCKER_LABEL_NAME = $(DOCKER_LABEL_NAME_PREFIX)RabbitMQ


text:
module DiscussionHelper
end


text:
module RuboCop
  class CLI
    module Command
      # Display version.
      # @api private
      class Version < Base
        self.command_name = :version

        def run
          puts RuboCop::Version.version(debug: false) if @options[:version]
          puts RuboCop::Version.version(debug: true) if @options[:verbose_version]
        end
      end
    end
  end
end


text:
'use strict';

// Campaigngroups controller
angular.module('campaigngroups').controller('CampaigngroupsController', ['$scope', '$stateParams', '$location', 'Authentication', 'Campaigngroups',
	function($scope, $stateParams, $location, Authentication, Campaigngroups ) {
		$scope.authentication = Authentication;

		// Create new Campaigngroup
		$scope.create = function() {

			// Create new Campaigngroup object
			var campaigngroup = new Campaigngroups ({

			});
            // TODO: RESET THIS CONTROLLER TO USE THE BASE KEYWORD TO FIND THE RIGHT AD GROUP
            /*
            $scope.checkboxModel = {
                value1 : true,
                value2 : 'YES'
            };
            */

			// Redirect after save
			campaigngroup.$save(function(response) {
				$location.path('campaigngroups/' + response._id);

				// Handle Errors
			}, function(errorResponse) {
				$scope.error = errorResponse.data.message;
			});
		};

		// Remove existing Campaigngroup
		$scope.remove = function( campaigngroup ) {
			if ( campaigngroup ) {
				campaigngroup.$remove();

				for (var i in $scope.campaigngroups ) {
					if ($scope.campaigngroups [i] === campaigngroup ) {
						$scope.campaigngroups.splice(i, 1);
					}
				}
			} else {
				$scope.campaigngroup.$remove(function() {
					$location.path('campaigngroups');
				});
			}
		};

		// Update existing Campaigngroup
		$scope.update = function() {
			var campaigngroup = $scope.campaigngroup;

			campaigngroup.$update(function() {
				$location.path('campaigngroups/' + campaigngroup._id);
			}, function(errorResponse) {
				$scope.error = errorResponse.data.message;
			});
		};

		// Find a list of Campaigngroups
		$scope.find = function() {
			$scope.campaigngroups = Campaigngroups.query();
		};

		// Find existing Campaigngroup
		$scope.findOne = function() {
			$scope.campaigngroup = Campaigngroups.get({
				campaigngroupId: $stateParams.campaigngroupId
			});
		};
	}
]);


text:
'use strict';

const data = require('../../data.js');
const jsonQuery = require('json-query')
const apiai = require("apiai");
const infographics = require('../../infographics.js');

module.exports = {
  processor:function(parameterscontextout,requestBody)
  {

    infographics.infographic_8(parameterscontextout,requestBody);

    return parameterscontextout;
  }
}


text:
package apple.intents.enums;

import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.NInt;

@Generated
public final class INAddMediaMediaDestinationUnsupportedReason {
    @Generated
    private INAddMediaMediaDestinationUnsupportedReason() {
    }

    @Generated @NInt public static final long NameNotFound = 0x0000000000000001L;
    @Generated @NInt public static final long NotEditable = 0x0000000000000002L;
}


text:
package io.github.jonathanxd.wreport.reports;

import org.spongepowered.api.entity.living.player.User;

import java.util.Optional;

import io.github.jonathanxd.wreport.actions.ActionData;

/**
 * Created by jonathan on 03/04/16.
 */
public class CloseReportData {

    private final User judge;
    private final String description;
    private final ActionData action;

    public CloseReportData(User judge, String description, ActionData action) {
        this.judge = judge;
        this.description = description;
        this.action = action;
    }

    public Optional<User> getJudge() {
        return Optional.ofNullable(judge);
    }

    public ActionData getAction() {
        return action;
    }

    public String getDescription() {
        return description;
    }
}


text:
CKEDITOR.plugins.setLang( 'widget', 'de', {
	'move': 'Zum verschieben anwählen und ziehen'
} );


text:
void genericPlaySound(char* toplay, int soundmode)
{
	switch(soundmode)
	{
	case SOUND_MODE_SYNC:
		playSYNCsound(toplay);
			break;
	case SOUND_MODE_ASYNC:
		playASYNCsound(toplay);
			break;
	case SOUND_MODE_MIX:
		playMIXsound(toplay);
			break;
	}
}

void playRoundDump(PROUND round, bool multiple, int soundmode)
{
	char* toplay;
	if(multiple)
		toplay = DUMP_GENERIC_AMMO_SOUND;
	else
	{
		switch(RetrieveGlobalSubAmmoType(round))
		{
		default:
		case AMMOTYPE_BULLET:
				toplay = DUMP_BULLET_SOUND;
			break;
		case AMMOTYPE_SHOTGUNSHELL:
			toplay = DUMP_SHELL_SOUND;
			break;
		case AMMOTYPE_EXPLOSIVE:
				toplay = DUMP_EXPLOSIVE_SOUND;
			break;
		}
	}
	genericPlaySound(toplay, soundmode);
}

void playRoundInsert(PROUND round, bool speedload, bool speedfill, int soundmode)
{
	char* toplay;
	if(speedload){
		toplay = LOAD_SPEEDLOAD_SOUND;

	}
	else{
	switch(RetrieveGlobalSubAmmoType(round))
	{
	default:
	case AMMOTYPE_BULLET:
		if(speedfill)
			toplay = LOAD_FILLBULLET_SOUND;
		else
			toplay = LOAD_INSERTBULLET_SOUND;
		break;
	case AMMOTYPE_SHOTGUNSHELL:
	case AMMOTYPE_EXPLOSIVE:
		if(speedfill)
			toplay = LOAD_FILLSHELL_SOUND;
		else
			toplay = LOAD_INSERTSHELL_SOUND;
		break;
	}
	}

	genericPlaySound(toplay, soundmode);

}

void playWeaponSound(PWEAPON weapon, int field, int soundmode)
{
	char buf[500];
	if (weapon->soundfilename[field]){
		genericPlaySound(weapon->soundfilename[field], soundmode);
	}
	else{
		switch (field){
		case WEAPONSOUND_SHOOT:
			strcpy(buf, WEAPONSOUND_DEFAULT_SHOOT);
			break;
		case WEAPONSOUND_DROP:
			strcpy(buf, WEAPONSOUND_DEFAULT_DROP);
				break;
		case WEAPONSOUND_THROW:
			strcpy(buf, WEAPONSOUND_DEFAULT_THROW);
			break;
		case WEAPONSOUND_RELOAD:
			strcpy(buf, WEAPONSOUND_DEFAULT_RELOAD);
			break;
		case WEAPONSOUND_BREAK:
			strcpy(buf, WEAPONSOUND_DEFAULT_BREAK);
			break;
		case WEAPONSOUND_HIT:
			strcpy(buf, WEAPONSOUND_DEFAULT_HIT);
			break;
		}
		genericPlaySound(buf, soundmode);
	}
}

void playAmmoImpactSound(ROUND round, int soundmode)
{
	char* name;
	PPOTYPE mainammo;
	mainammo = ReturnListItemByNumber(round.mainammotype - 1, globals.globalweaponsammo.ammolist);
	if(!mainammo){
		return;
	}
	switch(RetrieveGlobalSubAmmoType(&round)){
	case AMMOTYPE_BULLET:
		name = mainammo->ammo.specialammo.bulletdata[round.subammotype].impactsound;
		if(name){
			genericPlaySound(name, soundmode);
		}
		else{
			genericPlaySound(IMPACTSOUND_DEFAULT_BULLET, soundmode);
		}
		return;
	case AMMOTYPE_SHOTGUNSHELL:
		name = mainammo->ammo.specialammo.shelldata[round.subammotype].impactsound;
		if(name){
			genericPlaySound(name, soundmode);
		}
		else{
			genericPlaySound(IMPACTSOUND_DEFAULT_SHELL, soundmode);
		}
		return;
	case AMMOTYPE_EXPLOSIVE:
		name = mainammo->ammo.specialammo.explosivedata[round.subammotype].impactsound;
		if(name){
			genericPlaySound(name, soundmode);
		}
		else{
			genericPlaySound(IMPACTSOUND_DEFAULT_EXPLOSIVE, soundmode);
		}
		return;
	}
}

void playRicochet(int soundmode)
{
	char buf[255];
	sprintf(buf, "sounds\\hits\\ric%d.wav", rand()%5+1);
	genericPlaySound(buf, soundmode);
}

void playWeaponSilencer(int soundmode)
{
	genericPlaySound(SILENCER_SOUND, soundmode);
}

void playWeaponFlashsuppressor(int soundmode)
{
	genericPlaySound(FLASHSUPPRESSOR_SOUND, soundmode);
}

void playWeaponLasersight(int soundmode)
{
	genericPlaySound(LASERSIGHT_SOUND, soundmode);
}

void twobeeps()
{
	genericPlaySound(TWOBEEPS_SOUND, SOUND_MODE_MIX);
}

void twobeepsmod()
{
	genericPlaySound(TWOBEEPSMOD_SOUND, SOUND_MODE_MIX);
}

void onebeepa()
{
	genericPlaySound(BEEPA_SOUND, SOUND_MODE_MIX);
}

void onebeepb()
{
	genericPlaySound(BEEPB_SOUND, SOUND_MODE_MIX);
}

void onebeepc()
{
	genericPlaySound(BEEPC_SOUND, SOUND_MODE_MIX);
}

void typeclick()
{
	genericPlaySound(TYPEWRITER_SOUND, SOUND_MODE_MIX);
}


text:
package com.linkedin.thirdeye.datalayer.entity;

import com.linkedin.thirdeye.api.DimensionMap;

public class MergedAnomalyResultIndex extends AbstractIndexEntity {

  long functionId;
  long anomalyFeedbackId;
  long metricId;
  long startTime;
  long endTime;
  String collection;
  String metric;
  DimensionMap dimensions;
  boolean notified;

  public long getAnomalyFeedbackId() {
    return anomalyFeedbackId;
  }

  public void setAnomalyFeedbackId(long anomalyFeedbackId) {
    this.anomalyFeedbackId = anomalyFeedbackId;
  }

  public long getFunctionId() {
    return functionId;
  }

  public void setFunctionId(long anomalyFunctionId) {
    this.functionId = anomalyFunctionId;
  }

  public String getCollection() {
    return collection;
  }

  public void setCollection(String collection) {
    this.collection = collection;
  }

  public DimensionMap getDimensions() {
    return dimensions;
  }

  public void setDimensions(DimensionMap dimensions) {
    this.dimensions = dimensions;
  }

  public long getEndTime() {
    return endTime;
  }

  public void setEndTime(long endTime) {
    this.endTime = endTime;
  }

  public String getMetric() {
    return metric;
  }

  public void setMetric(String metric) {
    this.metric = metric;
  }

  public long getMetricId() {
    return metricId;
  }

  public void setMetricId(long metricId) {
    this.metricId = metricId;
  }

  public long getStartTime() {
    return startTime;
  }

  public void setStartTime(long startTime) {
    this.startTime = startTime;
  }

  public boolean isNotified() {
    return notified;
  }

  public void setNotified(boolean notified) {
    this.notified = notified;
  }
}


text:
<?php

return array(
    'controllers' => array(
        'invokables' => array(
            'Product\Controller\Product' => 'Product\Controller\ProductController',
            'Category\Controller\Category' => 'Category\Controller\CategoryController',
            'Category\Controller\SubCategory' => 'Category\Controller\SubCategoryController',
            'Product\Controller\ProductFront' => 'Product\Controller\ProductFrontController',
            'Product\Controller\ProductRest' => 'Product\Controller\ProductRestController',
            'Product\Controller\Image' => 'Product\Controller\ImageController',
        ),
    ),
    'view_manager' => array(
        'template_path_stack' => array(
            'category' => __DIR__ . '/../view',
//            'category' => __DIR__ . '/../view',
        ),
        'template_map' => array(
            'partial/productlist' => __DIR__ . '/../view/partial/productlist.phtml',
            'pagination_control' => __DIR__ . '/../view/partial/pagination_control.phtml',
        ),
        'strategies' => array(
            'ViewJsonStrategy',
        ),
    ),
    'router' => array(
        'routes' => array(
            'category' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/admin/category[/:action][/:id]',
                    'defaults' => array(
                        'controller' => 'Category\Controller\Category',
                        'action' => 'index',
                    ),
                ),
            ),
            'sub-category' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/admin/sub-category[/:action][/:id]',
                    'defaults' => array(
                        'controller' => 'Category\Controller\SubCategory',
                        'action' => 'index',
                    ),
                ),
            ),
            'product' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/admin/product[/:action][/:id][/page/:page]',
                    'defaults' => array(
                        'controller' => 'Product\Controller\Product',
                        'action' => 'index',
                    ),
                ),
            ),
            'product-list' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/admin/products[/page/:page]',
                    'defaults' => array(
                        'controller' => 'Product\Controller\Product',
                        'action' => 'index',
                    ),
                ),
            ),
            'category-list' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/admin/categories[/page/:page]',
                    'defaults' => array(
                        'controller' => 'Category\Controller\Category',
                        'action' => 'index',
                    ),
                ),
            ),
            'person-list' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/admin/persons[/page/:page]',
                    'defaults' => array(
                        'controller' => 'Person\Controller\Person',
                        'action' => 'index',
                    ),
                ),
            ),
            'product-front' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/product[/:action][/:id]',
                    'defaults' => array(
                        'controller' => 'Product\Controller\ProductFront',
                        'action' => 'list',
                    ),
                ),
            ),
            'product-image' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/admin/product-image[/:action][/:id]',
                    'defaults' => array(
                        'controller' => 'Product\Controller\Image',
                        'action' => 'index',
                    ),
                ),
            ),
            'product-front-filter' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/products/:filter-name/:filter-value',
                    'defaults' => array(
                        'controller' => '\Product\Controller\ProductFront',
                        'action' => 'filter',
                    ),
                ),
            ),
            'product-decoration' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/products/decorations/:name',
                    'defaults' => array(
                        'controller' => '\Product\Controller\ProductFront',
                        'action' => 'decorations',
                    )
                )

            ),
            'product-utensil' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/products/utensils/:name',
                    'defaults' => array(
                        'controller' => '\Product\Controller\ProductFront',
                        'action' => 'utensils',
                    )
                )

            ),
            'front-category' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/products/category/:id',
                    'defaults' => array(
                        'controller' => '\Product\Controller\ProductFront',
                        'action' => 'filterByCategory'
                    )
                )
            ),
            'product-omament' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/products/omaments/:name',
                    'defaults' => array(
                        'controller' => '\Product\Controller\ProductFront',
                        'action' => 'omaments',
                    )
                )

            ),
            'product-vintage' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/products/vintage-items/:name',
                    'defaults' => array(
                        'controller' => '\Product\Controller\ProductFront',
                        'action' => 'vintages',
                    )
                )

            ),
            'product-rest' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/product-rest[/:id]',
                    'defaults' => array(
                        'controller' => '\Product\Controller\ProductRest',
                    ),
                ),
            )
        ),
    ),
    'service_manager' => array(
        'factories' => array(
            'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory',
        ),
    ),
    'translator' => array(
        'locale' => 'zh_CN',
        'translation_file_patterns' => array(
            array(
                'type' => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern' => '%s.mo',
                'text_domain' => 'todo',
            ),
        ),
    ),
);


text:
.. War College documentation master file, created by
   sphinx-quickstart on Thu Mar  2 23:13:27 2017.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to War College's documentation!
=======================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


text:
define(['map_editor', 'request_bar', 'commands/topic_query_command'], function(MapEditor, RequestBar, TopicQueryCommand){

  var mediator      = MapEditor.mediator,
      context       = MapEditor.context,
      workspaces    = MapEditor.workspaces,
      mode_bar      = MapEditor.mode_bar;
  var query_bar     = new RequestBar(TopicQueryCommand);

  query_bar.context = context;

  query_bar.bind('requested', function(results, options){
    mediator.trigger('searched', results, options); //TODO: better way to aggregate without matching param names?
  });
  query_bar.bind('suppressed', function(suppressions){
    mediator.trigger('query_bar:suppressed', query_bar, suppressions);
  });

  query_bar.bind('requested', workspaces.receive);
  query_bar.bind('searched' , workspaces.receive);

  mode_bar.add({mode: 'query', image: '/images/icons/magnifier.png', placeholder: 'Search', command: query_bar});

  mediator.bind('change:topic_map', function(){
    query_bar.topic_map(this.topic_map());
  });

  return query_bar;

});