text:
<?php
require("inc/init.inc.php");
//require("inc/header.inc.php");
// déclaration de cariables vides pour affichage dans les values du formulaire
$lastname="";
$firstname="";
$gender="";
$pseudo="";
$email="";
$password="";
$passwordcheck="";

//variable de contrôle
$erreur = "";
$message = "";
//echo $erreur;

// contrôle sur l'existence de tous les champs provenant du formulaire (sauf le bouton de validation)
if(isset($_POST['lastname']) &&
isset($_POST['firstname']) &&
isset($_POST['gender']) &&
isset($_POST['pseudo']) &&
isset($_POST['email']) &&
isset($_POST['password']) &&
isset($_POST['passwordcheck']))

{
	var_dump($erreur);

	echo $erreur. $message .'test1' ;
	//le formulaire a été validé, on place dans ces variables, les saisies correspondantes.
	$lastname = $_POST['lastname'];
	$firstname = $_POST['firstname'];
	$gender = $_POST['gender'];
	$pseudo = $_POST['pseudo'];
	$email = $_POST['email'];
	$password = $_POST['password'];
	$passwordcheck = $_POST['passwordcheck'];

	///////////////////////////Contrôle sur le nom///////////////////////////////////////////////
	// contrôle sur la taille du lastname (entre 2 et 50 caractères inclus)
	if (iconv_strlen($lastname)< 2 || iconv_strlen($lastname)>50 )
	{
		$message .= '
Attention, la taille du nom est incorrecte.
le nom  doit avoir entre 2 et 50  caractères inclus
';
		$erreur= true; // si l'on rentre dans cette condition alors il y a une erreur.
	}

	// Vérification des caractères autorisés pour le nom
	$verif_caracteres =preg_match('#^[a-zA-Z._-]+$#',$lastname);

	if(!$verif_caracteres && !empty($lastname))
	{
		$message .='
Attention, caractères non autorisés dans le nom.
Caractères autorisés : A-Z
';
		$erreur= true;
	}

	///////////////////////////Contrôle sur le prénom///////////////////////////////////////////////
	// contrôle sur la taille du lastname (entre 2 et 50 caractères inclus)
	if (iconv_strlen($firstname)< 2 || iconv_strlen($firstname)>50 )
	{
		$message .= '
Attention, la taille du prénom est incorrecte.
le prénom  doit avoir entre 2 et 50  caractères inclus
';
		$erreur= true; // si l'on rentre dans cette condition alors il y a une erreur.
	}

	// Vérification des caractères autorisés pour le nom
	$verif_caracteres =preg_match('#^[a-zA-Z._-]+$#',$firstname);

	if(!$verif_caracteres && !empty($firstname))
	{
		$message.='
Attention, caractères non autorisés dans le prénom.
Caractères autorisés : A-Z
';
		$erreur= true;
	}

	////////////////////////////contrôle du Pseudo//////////////////////////////////////////////
	// contrôle sur la taille du pseudo (entre 4 et 14 caractères inclus)

	if (iconv_strlen($pseudo)< 4 || iconv_strlen($pseudo)>14 )
	{
		$message .= '
Attention, la taille du pseudo est incorrecte.
En effet, le pseudo  doit avoir entre 4 et 14  caractères. inclus
';
		$erreur= true; // si l'on rentre dansq cette condition alors il y a une erreur.
	}

	$verif_caracteres =preg_match('#^[a-zA-Z0-9._-]+$#',$lastname);

	if(!$verif_caracteres && !empty($pseudo))
	{
		$message.='
Attention, caractères non autorisés dans le nom.
Caractères autorisés : A-Z et 0-9, - _
';
		$erreur= true;
	}
	////////////////Vérification de l'email ///////////////////////
	//vérification de la saisie de l'email
	if(!filter_var($email, FILTER_VALIDATE_EMAIL) && !empty($email))
	{
		$message .= '
Attention, le format de email est invalide
Veuillez vérifier votre saisie
';
		$erreur= true;
	}

	/////////////// Vérification de la disponibilité de l'email en BDD.
	$verif_email =$pdo->prepare("SELECT * FROM users WHERE email =:email");
	$verif_email->bindParam(":email", $email, PDO::PARAM_STR);
	$verif_email->execute();
	var_dump($verif_email->rowcount());
	if($verif_email->rowcount() > 0)
	{
		//si l'on obtient au moins 1 ligne de résultat alors le pseudo est déjà pris.
		$message .= '
Attention, l\'email n\'est pas disponible
Veuillez utiliser un autre email
';
		$erreur= true;
	}

	/////////////// Vérification de la disponibilité du pseudo en BDD.
	$verif_pseudo =$pdo->prepare("SELECT * FROM users WHERE pseudo =:pseudo");
	$verif_pseudo->bindParam(":pseudo", $pseudo, PDO::PARAM_STR);
	$verif_pseudo->execute();
	var_dump($verif_pseudo->rowcount());
	if($verif_pseudo->rowcount() > 0)
	{
		//si l'on obtient au moins 1 ligne de résultat alors le pseudo est déjà pris.
		$message .= '
Attention, le pseudo n\'est pas disponible
Veuillez utiliser un autre email
';
		$erreur= true;
	}

	///Vérification du mot de passe
	if($password !=$passwordcheck)
	{
		$message .= '
Attention, le mot de passe de confirmation n\'est pas identique au mot de passe initiale
Veuillez vérifier votre mot de passe
';
		$erreur= true;
	}

	//////////////////Insertion dans la BDD////////////////////////////
	if($erreur !== true) // si $erreur est différent de true alors les contrôles préalables sont ok !
	{
		//Pour crypter (hachage) le mdp
		//$password=password_hash($mdp,PASSWORD_DEFAULT); (c'est une possibilité)

		$enregistrement =$pdo->prepare("INSERT INTO users (lastname, firstname, gender, pseudo, email, password, status) VALUES (:lastname, :firstname, :gender, :pseudo, :email, :password, 0)");
		$enregistrement->bindParam(":lastname", $lastname, PDO::PARAM_STR);
		$enregistrement->bindParam(":firstname", $firstname, PDO::PARAM_STR);
		$enregistrement->bindParam(":gender", $gender, PDO::PARAM_STR);
		$enregistrement->bindParam(":pseudo", $pseudo, PDO::PARAM_STR);
		$enregistrement->bindParam(":email", $email, PDO::PARAM_STR);
		$enregistrement->bindParam(":password", $password, PDO::PARAM_STR);
		$enregistrement->execute();

		$message='
L\'enregistrement s\'est effectué

';
		//On redirige sur la page de connexion.php
			header("location:connexion.php");
	}

	// à faire
	var_dump($message);

}
require("inc/header.inc.php");
require("inc/nav.inc.php");
?>

Inscription

        <?php //echo $message .'test1' ;  messages destinés à l'utilisateur ?>
		<?= $message; //cette balise php inclue un echo/ cette ligne php est équivalente à la ligne au dessus. ?>

				<form method="post" action="">

						Nom
						<input type="text" name="lastname" id="lastname" class="form-control" placeholder="Votre nom" value="<?php echo $lastname; ?>">

						Prénom
						<input type="text" name="firstname" id="firstname" class="form-control" placeholder="Votre prénom" value="<?php echo $firstname; ?>">

						Sexe
						<select name="gender" id="gender" class="form-control">
							<option value="m">Homme</option>
							<option value="f" <?php if($gender =='f'){echo 'selected';} ?> >femme</option>
						</select>

						pseudo
						<input type="text" name="pseudo" id="pseudo" class="form-control" placeholder="Votre pseudo" value="<?php echo $pseudo; ?>">

						email
						<input type="text" name="email" id="email" class="form-control" value="<?php echo $email; ?>">

						Mot de passe
						<input type="text" name="password" id="password" class="form-control" placeholder="" value="<?php echo $password; ?>">

						confirmation du mot de passe
						<input type="text" name="passwordcheck" id="passwordcheck" class="form-control" placeholder="" value="<?php echo $passwordcheck; ?>">

							<button class="form-control btn btn-success">

							valider
						</button>

				</form>

<?php

?>


text:
package com.astoev.cave.survey.service.bluetooth.device.ble;

import android.annotation.TargetApi;
import android.bluetooth.BluetoothGattCharacteristic;
import android.os.Build;
import android.util.Log;

import com.astoev.cave.survey.Constants;
import com.astoev.cave.survey.exception.DataException;
import com.astoev.cave.survey.service.bluetooth.Measure;

import java.nio.ByteOrder;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;

import static com.astoev.cave.survey.Constants.MeasureTypes.distance;
import static com.astoev.cave.survey.Constants.MeasureTypes.slope;

/**
 * Tested with Leica Disto D110 and D810 Touch but will probably work with the rest of the LE distos.
 *
 * Created by astoev on 1/4/16.
 */
public class LeicaDistoBluetoothLEDevice extends AbstractBluetoothLEDevice {

    private static final UUID SERVICE_UUID = UUID.fromString("3ab10100-f831-4395-b29d-570977d5bf94");

    public static final UUID CHARACTERISTIC_DISTANCE_UUID = UUID.fromString("3ab10101-f831-4395-b29d-570977d5bf94");
    public static final UUID CHARACTERISTIC_DISTANCE_UNIT_UUID = UUID.fromString("3ab10102-f831-4395-b29d-570977d5bf94");
    public static final UUID CHARACTERISTIC_ANGLE_UUID = UUID.fromString("3ab10103-f831-4395-b29d-570977d5bf94");
    public static final UUID CHARACTERISTIC_ANGLE_UNIT_UUID = UUID.fromString("3ab10104-f831-4395-b29d-570977d5bf94");

    @Override
    public List<UUID> getServices() {
        return Arrays.asList(SERVICE_UUID);
    }

    @Override
    public List<UUID> getCharacteristics() {
        return Arrays.asList(CHARACTERISTIC_ANGLE_UUID, CHARACTERISTIC_ANGLE_UNIT_UUID, CHARACTERISTIC_DISTANCE_UUID, CHARACTERISTIC_DISTANCE_UNIT_UUID);
    }

    @Override
    public List<UUID> getDescriptors() {
        return Arrays.asList(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"),
                UUID.fromString("00002908-0000-1000-8000-00805f9b34fb"),
                UUID.fromString("00002908-0000-1000-8000-00805f9b34fb"),
                UUID.fromString("00002908-0000-1000-8000-00805f9b34fb")
        );
    }

    @Override
    public UUID getCharacteristic(Constants.MeasureTypes aMeasureType) {
        switch (aMeasureType) {
            case distance:
                return CHARACTERISTIC_DISTANCE_UUID;

            case slope:
                return CHARACTERISTIC_ANGLE_UNIT_UUID;

            default:
                return null;
        }
    }

    @Override
    public UUID getService(Constants.MeasureTypes aMeasureType) {
        switch (aMeasureType) {
            case distance:
            case slope:
                return SERVICE_UUID;

            default:
                return null;
        }
    }

    @Override
    public boolean isNameSupported(String aName) {
        return deviceNameStartsWith(aName, "DISTO ");
    }

    @Override
    public String getDescription() {
        return "Leica DISTO: D110, D810";
    }

    @Override
    protected List<Constants.MeasureTypes> getSupportedMeasureTypes() {
        // distance and inclination supported
        return Arrays.asList(distance, slope);
    }

    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
    @Override
    public List<Measure> characteristicToMeasures(BluetoothGattCharacteristic aCharacteristic, List<Constants.MeasureTypes> aMeasureTypes) throws DataException {

        if (CHARACTERISTIC_DISTANCE_UUID.equals(aCharacteristic.getUuid())) {
            Float distanceValue = asFloat(aCharacteristic, ByteOrder.LITTLE_ENDIAN);
            Log.i(Constants.LOG_TAG_BT, "DISTANCE: " + distanceValue);

            Measure measure = new Measure();
            measure.setMeasureUnit(Constants.MeasureUnits.meters);
            measure.setMeasureType(distance);
            measure.setValue(distanceValue);
            return Arrays.asList(measure);
        } else if (CHARACTERISTIC_ANGLE_UUID.equals(aCharacteristic.getUuid())) {

            Float slopeInRadians = asFloat(aCharacteristic, ByteOrder.LITTLE_ENDIAN);
            if (slopeInRadians != null) {
                Float slopeValue = (float) Math.toDegrees(slopeInRadians);
                Log.i(Constants.LOG_TAG_BT, "SLOPE: " + slope);

                Measure measure = new Measure();
                measure.setMeasureUnit(Constants.MeasureUnits.degrees);
                measure.setMeasureType(slope);
                measure.setValue(slopeValue);
                return Arrays.asList(measure);
            }
        } else if (CHARACTERISTIC_DISTANCE_UNIT_UUID.equals(aCharacteristic.getUuid())) {
            // only check the unit
            Integer unit = asInt(aCharacteristic, BluetoothGattCharacteristic.FORMAT_UINT16);
            Log.i(Constants.LOG_TAG_BT, "DISTANCE UNIT: " + unit);

            // 4 different decimal meter formats
            List<Integer> meterUnits = Arrays.asList(0, 1, 2, 3);

            if (!meterUnits.contains(unit)) {
                throw new DataException("Please use meters");
            }

        } else if (CHARACTERISTIC_ANGLE_UNIT_UUID.equals(aCharacteristic.getUuid())) {
            // only check the unit

            Integer unit = asInt(aCharacteristic, BluetoothGattCharacteristic.FORMAT_UINT16);
            Log.i(Constants.LOG_TAG_BT, "SLOPE UNIT: " + unit);

            if (0 != unit) {
                throw new DataException("Please use degrees");
            }
        }

        return null;
    }

    @Override
    public boolean needCharacteristicIndication() {
        return true;
    }

}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<title>BshDoc - Javadoc Style Documentation</title>

Home
Back

Contents
Next

BshDoc - Javadoc Style Documentation

BshDoc requires JDK1.4 and BeanShell 1.2b6 or greater to run

BshDoc is a BeanShell script that supports supports javadoc style
documentation of BeanShell scripts.
BshDoc parses one or more BeanShell script files for method
information and javadoc style formal comments.  Its output is an XML
description of the files, containing all of the method signature and comment
information.

An XSL stylesheet, bshcommands.xsl, supplied with the user manual source,
can be used to render the XML to a nicely indexed HTML document describing
BeanShell commands.

The bshdoc.bsh script is currently distributed with the
source distribution.
An example of the styled output of this command is the
"BeanShell Commands Documentation" section of this user manual.
That section is automatically generated as part of the build process by running
bshdoc.bsh on bsh/commands/*.bsh.  See the source distribution Ant build
file for an example of how to do this and the user manual Ant build file
for an example of using a stylesheet to build your documents.

BshDoc Comments

BshDoc comments look just like JavaDoc comments and may include
HTML markup and javadoc style @tags.  If you wish to use the associates XSL
stylesheet, you should use well formed XHTML for you documentation.
(Always close tags, etc.). e.g.

/**
    This is a javadoc style comment.
    <pre>
        <b>Here is some HTML markup.</b>
        <p/>
        Here is some more.
    </pre>

    @author Pat Niemeyer
*/

Javadoc style @tags are parsed by bshdoc for inclusion in the XML output.
Currently they are only recognized at the start of a line and they terminate
the comment. (i.e. they must come at the end of the comment).

BshDoc identifies two kinds of Javadoc style comments:  File Comments
and Method Comments.
Method comments are comments that appear immediately before a method
declaration with no statements intervening.
File comments are comments that appear as the first statement of a script
and are not method comments.  If a comment appears as the first
statement in a script and is also immediately followed by a method declaration
it is considered a method comment.

BshDoc XML Output

To use BshDoc, run the bshdoc.bsh script on one or more BeanShell script
files:

java bsh.Interpreter bshdoc.bsh myfile.bsh [ myfile2.bsh ] [ ... ] > output.xml

The output goes to standard out.  It looks something like this:

<!-- This file was auto-generated by the bshdoc.bsh script -->
<BshDoc>
  <File>
    <Name>foo</Name>
    <Method>
      <Name>doFoo</Name>
      <Sig>doFoo ( int x )</Sig>
      <Comment>
        <Text>&lt;![CDATA[ doFoo() method comment. ]]&gt;</Text>
        <Tags>
        </Tags>
      </Comment>
    </Method>
    <Comment>
        <Text>&lt;![CDATA[ foo file comment. ]]&gt;</Text>
        <Tags>
        </Tags>
    </Comment>
  </File>
</BshDoc>

The bshcommands.xsl stylesheet

The bshcommands.xsl stylesheet can be used to render the output of bshdoc.bsh
to an indexed HTML page describing BeanShell commands.

The bshcommands.xsl stylesheet is intended for scripts that serve as
BeanShell commands.  These are script files containing one or more overloaded
methods which have the same name as the filename containing them.

The BshDoc script produces a complete description of any BeanShell script
file.  However the supplied bshcommands.xsl stylesheet does not necessarily
use all of this information.  Specifically, it does not present all
individual method comments.  Instead it tries to identify the comments
pertaining to the command, based upon the file name.  It (the XSL stylesheet)
applies some logic to choose either the single File Comment if it exists or
the Method Comment of the first method matching the filename.  Another
stylesheet could (and will) be easily created for more general BeanShell
file documentation.  Please check the web site for updates.

Method signatures displayed for methods can be overridden for the
bshcommands.xsl stylesheet by explicitly supplying them in special
javadoc @method tags within a
Method Comment.  For example you might do this to provide a more
verbose description for loosely typed arguments to a BeanShell command.
The bshcommands.xsl stylesheet will use the @method tag signatures in lieu
of autogenerated ones when they are present.  So you can also use this tag to
determine exactly which methods from a file are listed if you wish.
e.g.

/**
    BshDoc for the foo() command.
    Explicitly supply the signature to be displayed for the foo() method.

    @method foo( int | Integer ) and other text...
*/
foo( arg ) { ... }

Tip:

BshDoc uses the bsh.Parser API to parse the BeanShell script files without
actually running them.  bshdoc.bsh is not very complex.  Take a look at it
to learn how to use the parser API.

Home
Back

Contents
Next


text:
<?php

namespace TelcoMsg\Service;

/**
 * TelcoMsg\Service\MessageTemplateService
 *
 * @package TelcoMsg\Service
 */
class MessageTemplateService
{

}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Common
{
    using System;
    using System.Collections;
    using System.IO;
    using System.Reflection;
    using System.Threading;
    using System.Web;
    using System.Web.Hosting;

    using DotNetNuke.Common.Internal;
    using DotNetNuke.Common.Utilities;
    using DotNetNuke.Data;
    using DotNetNuke.Entities.Host;
    using DotNetNuke.Entities.Portals;
    using DotNetNuke.Entities.Urls;
    using DotNetNuke.Instrumentation;
    using DotNetNuke.Services.Connections;
    using DotNetNuke.Services.EventQueue;
    using DotNetNuke.Services.Exceptions;
    using DotNetNuke.Services.FileSystem;
    using DotNetNuke.Services.Installer.Blocker;
    using DotNetNuke.Services.Log.EventLog;
    using DotNetNuke.Services.Scheduling;
    using DotNetNuke.Services.Upgrade;
    using DotNetNuke.UI.Modules;
    using Microsoft.Win32;

    /// <summary>
    /// The Object to initialize application.
    /// </summary>
    public class Initialize
    {
        private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(Initialize));
        private static readonly object InitializeLock = new object();
        private static bool InitializedAlready;

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Inits the app.
        /// </summary>
        /// <param name="app">The app.</param>
        /// -----------------------------------------------------------------------------
        public static void Init(HttpApplication app)
        {
            string redirect;

            // Check if app is initialised
            if (InitializedAlready && Globals.Status == Globals.UpgradeStatus.None)
            {
                return;
            }

            lock (InitializeLock)
            {
                // Double-Check if app was initialised by another request
                if (InitializedAlready && Globals.Status == Globals.UpgradeStatus.None)
                {
                    return;
                }

                // Initialize ...
                redirect = InitializeApp(app, ref InitializedAlready);
            }

            if (!string.IsNullOrEmpty(redirect))
            {
                app.Response.Redirect(redirect, true);
            }
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// LogStart logs the Application Start Event.
        /// </summary>
        /// -----------------------------------------------------------------------------
        public static void LogStart()
        {
            var log = new LogInfo
            {
                BypassBuffering = true,
                LogTypeKey = EventLogController.EventLogType.APPLICATION_START.ToString(),
            };
            LogController.Instance.AddLog(log);
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// LogEnd logs the Application Start Event.
        /// </summary>
        /// -----------------------------------------------------------------------------
        public static void LogEnd()
        {
            try
            {
                ApplicationShutdownReason shutdownReason = HostingEnvironment.ShutdownReason;
                string shutdownDetail;
                switch (shutdownReason)
                {
                    case ApplicationShutdownReason.BinDirChangeOrDirectoryRename:
                        shutdownDetail = "The AppDomain shut down because of a change to the Bin folder or files contained in it.";
                        break;
                    case ApplicationShutdownReason.BrowsersDirChangeOrDirectoryRename:
                        shutdownDetail = "The AppDomain shut down because of a change to the App_Browsers folder or files contained in it.";
                        break;
                    case ApplicationShutdownReason.ChangeInGlobalAsax:
                        shutdownDetail = "The AppDomain shut down because of a change to Global.asax.";
                        break;
                    case ApplicationShutdownReason.ChangeInSecurityPolicyFile:
                        shutdownDetail = "The AppDomain shut down because of a change in the code access security policy file.";
                        break;
                    case ApplicationShutdownReason.CodeDirChangeOrDirectoryRename:
                        shutdownDetail = "The AppDomain shut down because of a change to the App_Code folder or files contained in it.";
                        break;
                    case ApplicationShutdownReason.ConfigurationChange:
                        shutdownDetail = "The AppDomain shut down because of a change to the application level configuration.";
                        break;
                    case ApplicationShutdownReason.HostingEnvironment:
                        shutdownDetail = "The AppDomain shut down because of the hosting environment.";
                        break;
                    case ApplicationShutdownReason.HttpRuntimeClose:
                        shutdownDetail = "The AppDomain shut down because of a call to Close.";
                        break;
                    case ApplicationShutdownReason.IdleTimeout:
                        shutdownDetail = "The AppDomain shut down because of the maximum allowed idle time limit.";
                        break;
                    case ApplicationShutdownReason.InitializationError:
                        shutdownDetail = "The AppDomain shut down because of an AppDomain initialization error.";
                        break;
                    case ApplicationShutdownReason.MaxRecompilationsReached:
                        shutdownDetail = "The AppDomain shut down because of the maximum number of dynamic recompiles of resources limit.";
                        break;
                    case ApplicationShutdownReason.PhysicalApplicationPathChanged:
                        shutdownDetail = "The AppDomain shut down because of a change to the physical path for the application.";
                        break;
                    case ApplicationShutdownReason.ResourcesDirChangeOrDirectoryRename:
                        shutdownDetail = "The AppDomain shut down because of a change to the App_GlobalResources folder or files contained in it.";
                        break;
                    case ApplicationShutdownReason.UnloadAppDomainCalled:
                        shutdownDetail = "The AppDomain shut down because of a call to UnloadAppDomain.";
                        break;
                    default:
                        shutdownDetail = "Shutdown reason: " + shutdownReason;
                        break;
                }

                var log = new LogInfo
                {
                    BypassBuffering = true,
                    LogTypeKey = EventLogController.EventLogType.APPLICATION_SHUTTING_DOWN.ToString(),
                };
                log.AddProperty("Shutdown Details", shutdownDetail);
                LogController.Instance.AddLog(log);

                // enhanced shutdown logging
                var runtime = typeof(HttpRuntime).InvokeMember(
                    "_theRuntime",
                    BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.GetField,
                    null, null, null) as HttpRuntime;

                if (runtime == null)
                {
                    Logger.InfoFormat("Application shutting down. Reason: {0}", shutdownDetail);
                }
                else
                {
                    var shutDownMessage = runtime.GetType().InvokeMember(
                        "_shutDownMessage",
                        BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField,
                        null, runtime, null) as string;

                    var shutDownStack = runtime.GetType().InvokeMember(
                        "_shutDownStack",
                        BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField,
                        null, runtime, null) as string;

                    Logger.Info("Application shutting down. Reason: " + shutdownDetail
                                + Environment.NewLine + "ASP.NET Shutdown Info: " + shutDownMessage
                                + Environment.NewLine + shutDownStack);
                }
            }
            catch (Exception exc)
            {
                Exceptions.LogException(exc);
            }

            if (Globals.Status != Globals.UpgradeStatus.Install)
            {
                // purge log buffer
                LoggingProvider.Instance().PurgeLogBuffer();
            }
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Tests whether this request should be processed in an HttpModule.
        /// </summary>
        /// <returns></returns>
        /// -----------------------------------------------------------------------------
        public static bool ProcessHttpModule(HttpRequest request, bool allowUnknownExtensions, bool checkOmitFromRewriteProcessing)
        {
            var toLowerLocalPath = request.Url.LocalPath.ToLowerInvariant();

            if (toLowerLocalPath.EndsWith("webresource.axd")
                    || toLowerLocalPath.EndsWith("scriptresource.axd")
                    || toLowerLocalPath.EndsWith("captcha.aspx")
                    || toLowerLocalPath.Contains("upgradewizard.aspx")
                    || toLowerLocalPath.Contains("installwizard.aspx")
                    || toLowerLocalPath.EndsWith("install.aspx"))
            {
                return false;
            }

            if (allowUnknownExtensions == false
                    && toLowerLocalPath.EndsWith(".aspx") == false
                    && toLowerLocalPath.EndsWith(".asmx") == false
                    && toLowerLocalPath.EndsWith(".ashx") == false
                    && toLowerLocalPath.EndsWith(".svc") == false)
            {
                return false;
            }

            return !checkOmitFromRewriteProcessing || !RewriterUtils.OmitFromRewriteProcessing(request.Url.LocalPath);
        }

        public static void RunSchedule(HttpRequest request)
        {
            if (!IsUpgradeOrInstallRequest(request))
            {
                try
                {
                    if (SchedulingProvider.SchedulerMode == SchedulerMode.REQUEST_METHOD && SchedulingProvider.ReadyForPoll)
                    {
                        Logger.Trace("Running Schedule " + SchedulingProvider.SchedulerMode);
                        var scheduler = SchedulingProvider.Instance();
                        var requestScheduleThread = new Thread(scheduler.ExecuteTasks) { IsBackground = true };
                        requestScheduleThread.Start();
                        SchedulingProvider.ScheduleLastPolled = DateTime.Now;
                    }
                }
                catch (Exception exc)
                {
                    Exceptions.LogException(exc);
                }
            }
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// StartScheduler starts the Scheduler.
        /// </summary>
        /// <param name="resetAppStartElapseTime">Whether reset app start elapse time before running schedule tasks.</param>
        /// <remarks>
        /// </remarks>
        /// -----------------------------------------------------------------------------
        public static void StartScheduler(bool resetAppStartElapseTime = false)
        {
            if (resetAppStartElapseTime)
            {
                Globals.ResetAppStartElapseTime();
            }

            var scheduler = SchedulingProvider.Instance();
            scheduler.RunEventSchedule(EventName.APPLICATION_START);

            // instantiate APPLICATION_START scheduled jobs
            if (SchedulingProvider.SchedulerMode == SchedulerMode.TIMER_METHOD)
            {
                Logger.Trace("Running Schedule " + SchedulingProvider.SchedulerMode);
                var newThread = new Thread(scheduler.Start)
                {
                    IsBackground = true,
                    Name = "Scheduler Thread",
                };
                newThread.Start();
            }
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// StopScheduler stops the Scheduler.
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// -----------------------------------------------------------------------------
        public static void StopScheduler()
        {
            // stop scheduled jobs
            SchedulingProvider.Instance().Halt("Stopped by Application_End");
        }

        private static string CheckVersion(HttpApplication app)
        {
            HttpServerUtility Server = app.Server;

            bool autoUpgrade = Config.GetSetting("AutoUpgrade") == null || bool.Parse(Config.GetSetting("AutoUpgrade"));
            bool useWizard = Config.GetSetting("UseInstallWizard") == null || bool.Parse(Config.GetSetting("UseInstallWizard"));

            // Determine the Upgrade status and redirect as neccessary to InstallWizard.aspx
            string retValue = Null.NullString;
            switch (Globals.Status)
            {
                case Globals.UpgradeStatus.Install:
                    if (autoUpgrade || useWizard)
                    {
                        retValue = useWizard ? "~/Install/InstallWizard.aspx" : "~/Install/Install.aspx?mode=install";
                    }
                    else
                    {
                        CreateUnderConstructionPage(Server);
                        retValue = "~/Install/UnderConstruction.htm";
                        Logger.Info("UnderConstruction page was shown because application needs to be installed, and both the AutoUpgrade and UseWizard AppSettings in web.config are false. Use /install/install.aspx?mode=install to install application. ");
                    }

                    break;
                case Globals.UpgradeStatus.Upgrade:
                    if (autoUpgrade || useWizard)
                    {
                        retValue = useWizard ? "~/Install/UpgradeWizard.aspx" : "~/Install/Install.aspx?mode=upgrade";
                    }
                    else
                    {
                        CreateUnderConstructionPage(Server);
                        retValue = "~/Install/UnderConstruction.htm";
                        Logger.Info("UnderConstruction page was shown because application needs to be upgraded, and both the AutoUpgrade and UseInstallWizard AppSettings in web.config are false. Use /install/install.aspx?mode=upgrade to upgrade application. ");
                    }

                    break;
                case Globals.UpgradeStatus.Error:
                    // here we need to check if the application is already installed
                    // or is in pre-install state.
                    // see http://support.dotnetnuke.com/project/DNN/2/item/26053 for scenarios
                    bool isInstalled = Globals.IsInstalled();

                    if (!isInstalled && (useWizard || autoUpgrade))
                    {
                        // app has never been installed, and either Wizard or Autoupgrade is configured
                        CreateUnderConstructionPage(Server);
                        retValue = "~/Install/UnderConstruction.htm";
                        Logger.Error("UnderConstruction page was shown because we cannot ascertain the application was ever installed, and there is no working database connection. Check database connectivity before continuing. ");
                    }
                    else
                    {
                        // 500 Error - Redirect to ErrorPage
                        if (HttpContext.Current != null)
                        {
                            if (!isInstalled)
                            {
                                Logger.Error("The connection to the database has failed, the application is not installed yet, and both AutoUpgrade and UseInstallWizard are not set in web.config, a 500 error page will be shown to visitors");
                            }
                            else
                            {
                                Logger.Error("The connection to the database has failed, however, the application is already completely installed, a 500 error page will be shown to visitors");
                            }

                            string url = "~/ErrorPage.aspx?status=500&error=Site Unavailable&error2=Connection To The Database Failed";
                            HttpContext.Current.Response.Clear();
                            HttpContext.Current.Server.Transfer(url);
                        }
                    }

                    break;
            }

            return retValue;
        }

        private static void CreateUnderConstructionPage(HttpServerUtility server)
        {
            // create an UnderConstruction page if it does not exist already
            if (!File.Exists(server.MapPath("~/Install/UnderConstruction.htm")))
            {
                if (File.Exists(server.MapPath("~/Install/UnderConstruction.template.htm")))
                {
                    File.Copy(server.MapPath("~/Install/UnderConstruction.template.htm"), server.MapPath("~/Install/UnderConstruction.htm"));
                }
            }
        }

        private static Version GetDatabaseEngineVersion()
        {
            return DataProvider.Instance().GetDatabaseEngineVersion();
        }

        private static Version GetNETFrameworkVersion()
        {
            // Obtain the .NET Framework version, 9.4.0 and later requires .NET 4.7.2 or later
            var version = Environment.Version.ToString(2);

            // If unknown version return as is.
            if (version != "4.0")
            {
                return new Version(version);
            }

            // Otherwise utilize release DWORD from registry to determine version
            // Reference List: https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
            var release = GetDotNet4ReleaseNumberFromRegistry();
            if (release >= 528040)
            {
                version = "4.8";
            }
            else
            {
                version = "4.7.2";
            }

            return new Version(version);
        }

        private static int GetDotNet4ReleaseNumberFromRegistry()
        {
            try
            {
                using (var ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32)
                    .OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\"))
                {
                    if (ndpKey?.GetValue("Release") != null)
                    {
                        return (int)ndpKey.GetValue("Release");
                    }
                }
            }
            catch (Exception)
            {
                // ignore
            }

            return -1;
        }

        private static string InitializeApp(HttpApplication app, ref bool initialized)
        {
            var request = app.Request;
            var redirect = Null.NullString;

            Logger.Trace("Request " + request.Url.LocalPath);

            // Don't process some of the AppStart methods if we are installing
            if (!IsUpgradeOrInstallRequest(app.Request))
            {
                // Check whether the current App Version is the same as the DB Version
                redirect = CheckVersion(app);
                if (string.IsNullOrEmpty(redirect) && !InstallBlocker.Instance.IsInstallInProgress())
                {
                    Logger.Info("Application Initializing");

                    // Set globals
                    Globals.IISAppName = request.ServerVariables["APPL_MD_PATH"];
                    Globals.OperatingSystemVersion = Environment.OSVersion.Version;
                    Globals.NETFrameworkVersion = GetNETFrameworkVersion();
                    Globals.DatabaseEngineVersion = GetDatabaseEngineVersion();

                    // Try and Upgrade to Current Framewok
                    Upgrade.TryUpgradeNETFramework();
                    Upgrade.CheckFipsCompilanceAssemblies();

                    // Log Server information
                    ServerController.UpdateServerActivity(new ServerInfo());

                    // Start Scheduler
                    StartScheduler();

                    // Log Application Start
                    LogStart();

                    // Process any messages in the EventQueue for the Application_Start event
                    EventQueueController.ProcessMessages("Application_Start");

                    ServicesRoutingManager.RegisterServiceRoutes();

                    ModuleInjectionManager.RegisterInjectionFilters();

                    ConnectionsManager.Instance.RegisterConnections();

                    // Set Flag so we can determine the first Page Request after Application Start
                    app.Context.Items.Add("FirstRequest", true);

                    Logger.Info("Application Initialized");

                    initialized = true;
                }
            }
            else
            {
                // NET Framework version is neeed by Upgrade
                Globals.NETFrameworkVersion = GetNETFrameworkVersion();
                Globals.IISAppName = request.ServerVariables["APPL_MD_PATH"];
                Globals.OperatingSystemVersion = Environment.OSVersion.Version;
            }

            return redirect;
        }

        private static bool IsUpgradeOrInstallRequest(HttpRequest request)
        {
            var url = request.Url.LocalPath.ToLowerInvariant();

            return url.EndsWith("/install.aspx")
                || url.Contains("/upgradewizard.aspx")
                || url.Contains("/installwizard.aspx");
        }
    }
}


text:
package com.intellij.internal.statistic.connect;

public class StatServiceException extends RuntimeException {

  public StatServiceException() {
    super();
  }

  public StatServiceException(String s) {
    super(s);
  }

  public StatServiceException(String s, Throwable throwable) {
    super(s, throwable);
  }

  public StatServiceException(Throwable throwable) {
    super(throwable);
  }
}


text:
var expect = require( "chai" ).expect;
var cta = require( "../lib/cta-bus-tracker" );

var apiKey = process.env.API_KEY;

var busTracker = cta( apiKey );

var testVehicleId;
var testRoute;
var testRouteDirection;
var testStopId;
var testPatternId;

describe( "time", function () {
    it( "returns a datetime", function ( done ) {
        busTracker.time( function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.a( "string" );
            var dateTime = new Date( data );
            expect( dateTime ).to.be.a( "date" );
            done();
        } );
    } );
} );

describe( "vehiclesByRoute", function () {
    it( "returns a list of vehicle data", function ( done ) {
        busTracker.vehiclesByRoute( [ "8" ], function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            expect( data[ 0 ] ).to.have.a.property( "vid" );
            expect( data[ 0 ] ).to.have.a.property( "tmstmp" );
            expect( data[ 0 ] ).to.have.a.property( "lat" );
            expect( data[ 0 ] ).to.have.a.property( "lon" );
            expect( data[ 0 ] ).to.have.a.property( "hdg" );
            expect( data[ 0 ] ).to.have.a.property( "pid" );
            expect( data[ 0 ] ).to.have.a.property( "rt" );
            expect( data[ 0 ] ).to.have.a.property( "des" );
            expect( data[ 0 ] ).to.have.a.property( "pdist" );
            expect( data[ 0 ] ).to.have.a.property( "tablockid" );
            expect( data[ 0 ] ).to.have.a.property( "tatripid" );
            expect( data[ 0 ] ).to.have.a.property( "zone" );

            testVehicleId = data[ 0 ][ "vid" ];
            done();
        } );
    } );
} );

describe( "vehiclesById", function () {
    it( "returns vehicle data", function ( done ) {
        busTracker.vehiclesById( [ testVehicleId ], function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.have.a.property( "vid" );
            expect( data ).to.have.a.property( "tmstmp" );
            expect( data ).to.have.a.property( "lat" );
            expect( data ).to.have.a.property( "lon" );
            expect( data ).to.have.a.property( "hdg" );
            expect( data ).to.have.a.property( "pid" );
            expect( data ).to.have.a.property( "rt" );
            expect( data ).to.have.a.property( "des" );
            expect( data ).to.have.a.property( "pdist" );
            expect( data ).to.have.a.property( "tablockid" );
            expect( data ).to.have.a.property( "tatripid" );
            expect( data ).to.have.a.property( "zone" );
            testPatternId = data[ "pid" ];
            done();
        } );
    } );
} );

describe( "routes", function () {
    it( "returns a list of routes", function ( done ) {
        busTracker.routes( function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            expect( data[ 0 ] ).to.have.a.property( "rt" );
            expect( data[ 0 ] ).to.have.a.property( "rtnm" );
            expect( data[ 0 ] ).to.have.a.property( "rtclr" );
            testRoute = data[ 0 ][ "rt" ];
            done();
        } );
    } );
} );

describe( "routeDirections", function () {
    it( "returns directions of travel", function ( done ) {
        busTracker.routeDirections( testRoute, function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            expect( data.length ).to.equal( 2 );
            testRouteDirection = data[ 0 ];
            done();
        } );
    } );
} );

describe( "stops", function () {
    it( "returns a list of stops", function ( done ) {
        busTracker.stops( testRoute, testRouteDirection, function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            expect( data[ 0 ] ).to.have.a.property( "stpid" );
            expect( data[ 0 ] ).to.have.a.property( "stpnm" );
            expect( data[ 0 ] ).to.have.a.property( "lat" );
            expect( data[ 0 ] ).to.have.a.property( "lon" );
            testStopId = data[ 0 ][ "stpid" ];
            done();
        } );
    } );
} );

describe( "patterns by id", function () {
    it( "returns a list of patterns", function ( done ) {
        busTracker.patternsById( [ testPatternId ], function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.have.a.property( "pid" );
            expect( data ).to.have.a.property( "ln" );
            expect( data ).to.have.a.property( "rtdir" );
            expect( data ).to.have.a.property( "pt" );
            expect( data.pt ).to.be.an( "array" );
            done();
        } );
    } );
} );

describe( "patterns by route", function () {
    it( "returns a list of patterns", function ( done ) {
        busTracker.patternsByRoute( testRoute, function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            expect( data[ 0 ] ).to.have.a.property( "pid" );
            expect( data[ 0 ] ).to.have.a.property( "ln" );
            expect( data[ 0 ] ).to.have.a.property( "rtdir" );
            expect( data[ 0 ] ).to.have.a.property( "pt" );
            expect( data[ 0 ].pt ).to.be.an( "array" );
            done();
        } );
    } );
} );

describe( "predictions by stop", function () {
    it( "returns a list of predictions", function ( done ) {
        busTracker.predictionsByStop( { stopIds: [ testStopId ] }, function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            expect( data[ 0 ] ).to.have.a.property( "tmstmp" );
            expect( data[ 0 ] ).to.have.a.property( "typ" );
            expect( data[ 0 ] ).to.have.a.property( "stpnm" );
            expect( data[ 0 ] ).to.have.a.property( "stpid" );
            expect( data[ 0 ] ).to.have.a.property( "vid" );
            expect( data[ 0 ] ).to.have.a.property( "dstp" );
            expect( data[ 0 ] ).to.have.a.property( "rt" );
            expect( data[ 0 ] ).to.have.a.property( "rtdir" );
            expect( data[ 0 ] ).to.have.a.property( "des" );
            expect( data[ 0 ] ).to.have.a.property( "prdtm" );
            expect( data[ 0 ] ).to.have.a.property( "tablockid" );
            expect( data[ 0 ] ).to.have.a.property( "tatripid" );
            expect( data[ 0 ] ).to.have.a.property( "zone" );
            done();
        } );
    } );
} );

describe( "predictions by vehicle", function () {
    it( "returns a list of predictions", function ( done ) {
        busTracker.predictionsByVehicle( { vehicleIds: [ testVehicleId ] }, function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            expect( data[ 0 ] ).to.have.a.property( "tmstmp" );
            expect( data[ 0 ] ).to.have.a.property( "typ" );
            expect( data[ 0 ] ).to.have.a.property( "stpnm" );
            expect( data[ 0 ] ).to.have.a.property( "stpid" );
            expect( data[ 0 ] ).to.have.a.property( "vid" );
            expect( data[ 0 ] ).to.have.a.property( "dstp" );
            expect( data[ 0 ] ).to.have.a.property( "rt" );
            expect( data[ 0 ] ).to.have.a.property( "rtdir" );
            expect( data[ 0 ] ).to.have.a.property( "des" );
            expect( data[ 0 ] ).to.have.a.property( "prdtm" );
            expect( data[ 0 ] ).to.have.a.property( "tablockid" );
            expect( data[ 0 ] ).to.have.a.property( "tatripid" );
            expect( data[ 0 ] ).to.have.a.property( "zone" );
            done();
        } );
    } );
} );

describe( "service bulletins by route", function () {
    it( "returns a list of service bulletins", function ( done ) {
        busTracker.serviceBulletinsByRoute( { routeIds: [ testRoute ] }, function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            done();
        } );
    } );
} );

describe( "service bulletins by stop", function () {
    it( "returns a list of service bulletins", function ( done ) {
        busTracker.serviceBulletinsByStop( [ testStopId ], function ( err, data ) {
            if ( err ) {
                return done( err );
            }
            expect( data ).to.be.an( "array" );
            done();
        } );
    } );
} );


text:
package cz.metacentrum.perun.dispatcher.scheduling;

/**
 *
 * @author Michal Karm Babacek
 */
public interface PropagationMaintainer {

	void checkResults();

	void closeTasksForEngine(int clientID);

	void onTaskStatusChange(int taskId, String status, String date);

	void onTaskDestinationComplete(int clientID, String string);

}


text:
require_dependency "rails_invitable/application_controller"

module RailsInvitable
  class Api::V1::RedPocketRecordsController < ApplicationController
    def index
      @red_pocket_records = policy_scope(RedPocketRecord)

      render_pagination(@red_pocket_records, [:user])
    end
  end
end


text:
import * as api from '@/api'
import * as ls from '@/store/localStorage'

function lsKey (datasource) {
  return `bookmarks_${datasource}`
}

const state = () => {
  return {
    bookmarks: [],
    loading: false,
    response: [],
    addedBookmarkId: null
  }
}

const getters = {}

const actions = {
  async getBookmarks ({state, commit, rootState}) {
    const {isLocalStorage} = rootState.settings
    const {datasource, engine} = rootState.hash

    if (isLocalStorage && state.bookmarks.length === 0) {
      commit('setResponse', {data: []})
      return false
    }

    if (!(datasource && engine)) {
      return false
    }

    commit('setLoading', {data: true})
    try {
      let data
      if (isLocalStorage) {
        data = await api.getBookmarksById(datasource, engine, state.bookmarks)
      } else {
        data = await api.getBookmarksUser(datasource, engine)
      }

      if (data.bookmarkList) {
        const list = data.bookmarkList
          .filter(b => b.engine === engine)
          .sortBy(b => b.bookmark_id, true)
        commit('setResponse', {data: list})
      }
    } catch (e) {
    }
    commit('setLoading', {data: false})
  },
  async getBookmark ({state, commit, rootState}, {bookmarkId}) {
    const {datasource, engine} = rootState.hash
    const data = await api.getBookmarksById(datasource, engine, [bookmarkId])
    if (data.bookmarkList && data.bookmarkList.length) {
      commit('editor/setInputQuery', {data: data.bookmarkList[0].query}, {root: true})
    }
  },
  async addBookmarkItem ({state, commit, dispatch, rootState}) {
    const {datasource, engine} = rootState.hash
    const query = rootState.editor.inputQuery
    const defaultTitle = Date.create().format('{yyyy}/{MM}/{dd} {24hr}:{mm}:{ss}')
    const title = prompt('Input bookmark title.', defaultTitle)
    if (title === null) {
      return false
    }

    try {
      const data = await api.addBookmarkItem(datasource, engine, title || defaultTitle, query)
      const bookmarkId = data.bookmark_id

      commit('setBookmarkItem', {datasource, bookmarkId})
      dispatch('getBookmarks')
      commit('result/reset', {}, {root: true})
      commit('setHashItem', {queryid: '', bookmark_id: bookmarkId, tab: 'bookmark'}, {root: true})
    } catch (e) {
    }
  },
  async deleteBookmarkItem ({state, commit, dispatch, rootState}, {bookmarkId}) {
    const {datasource, engine} = rootState.hash
    commit('deleteBookmark', {datasource, bookmarkId})
    await api.deleteBookmarkItem(datasource, engine, bookmarkId)
    dispatch('getBookmarks')
  },
  async importBookmarks ({commit, dispatch, rootState}, {data}) {
    const {datasource} = rootState.hash
    commit('overwriteLocalStorage', {datasource, bookmarksStr: data})
    await dispatch('getBookmarks')
  },
  async deleteAllLocalBookmarks ({commit, dispatch, rootState}) {
    const {datasource} = rootState.hash
    commit('deleteLocalStorage', {datasource})
    await dispatch('getBookmarks')
  }
}

const mutations = {
  init (state) {
    state.response = []
    state.addedBookmarkId = null
  },
  setBookmarkItem (state, {datasource, bookmarkId}) {
    state.addedBookmarkId = bookmarkId
    state.bookmarks = state.bookmarks.add(bookmarkId, 0).unique()
    ls.setItem(lsKey(datasource), state.bookmarks)
  },
  deleteBookmark (state, {datasource, bookmarkId}) {
    state.bookmarks.remove(bookmarkId)
    ls.setItem(lsKey(datasource), state.bookmarks)
  },
  setLoading (state, {data}) {
    state.loading = data
  },
  setResponse (state, {data}) {
    state.response = data
  },
  loadLocalStorage (state, {datasource, max}) {
    max = max || 100
    state.bookmarks = ls.getItemArrayNumber(lsKey(datasource), max)
  },
  overwriteLocalStorage (state, {datasource, bookmarksStr}) {
    state.bookmarks = bookmarksStr.split(',').map(Number)
    ls.setItem(lsKey(datasource), state.bookmarks)
  },
  deleteLocalStorage (state, {datasource}) {
    state.bookmarks = []
    ls.setItem(lsKey(datasource), [])
  },
  resetAddedBookmarkId (state) {
    state.addedBookmarkId = null
  }
}

export default {
  namespaced: true,
  state,
  getters,
  actions,
  mutations
}


text:
cask "netxms-console" do
  version "3.5.90"
  sha256 "73efa390f4af04c9936f480473894513bd0ff47f714fb486cf27fd3bc32c9d61"

  url "https://netxms.org/download/releases/#{version.major_minor}/nxmc-#{version}.dmg"
  appcast "https://netxms.org/download/releases/#{version.major_minor}/"
  name "NetXMS Management Console"
  homepage "https://netxms.org/"

  app "NetXMS Console.app"

  zap trash: "~/.nxmc"
end


text:
- Class: `AutowiredService`
- Public: yes
- Synthetic: no
- Lazy: no
- Shared: yes
- Abstract: no
- Autowire: `set*`, `addFoo`
- Arguments: no


text:
@interface YWShop : NSObject
@property (nonatomic,copy) NSString *phones;//电话
@property (nonatomic,copy) NSString *skewm;//二维码
@property (nonatomic,copy) NSString *titlename;//店名
@property (nonatomic,copy) NSString *totalmoney;//消费金额
@property (nonatomic,copy) NSString *username;//店主
@property (nonatomic,strong) NSArray *monyelist;
@property (nonatomic,copy) NSString *ybkind;
+ (instancetype)yw_objectWithKeyValues:(NSDictionary*)dict;
@end


text:
package org.elasticsearch.index;

/**
 *
 */
public interface IndexComponent {

    Index index();
}


text:
using System.Text.Json;
using Azure.Core;
using Azure.ResourceManager.Cdn.Models;
using Azure.ResourceManager.Models;

namespace Azure.ResourceManager.Cdn
{
    public partial class CdnCustomDomainData : IUtf8JsonSerializable
    {
        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
        {
            writer.WriteStartObject();
            writer.WritePropertyName("properties");
            writer.WriteStartObject();
            if (Optional.IsDefined(HostName))
            {
                writer.WritePropertyName("hostName");
                writer.WriteStringValue(HostName);
            }
            if (Optional.IsDefined(CustomDomainHttpsContent))
            {
                if (CustomDomainHttpsContent != null)
                {
                    writer.WritePropertyName("customHttpsParameters");
                    writer.WriteObjectValue(CustomDomainHttpsContent);
                }
                else
                {
                    writer.WriteNull("customHttpsParameters");
                }
            }
            if (Optional.IsDefined(ValidationData))
            {
                writer.WritePropertyName("validationData");
                writer.WriteStringValue(ValidationData);
            }
            writer.WriteEndObject();
            writer.WriteEndObject();
        }

        internal static CdnCustomDomainData DeserializeCdnCustomDomainData(JsonElement element)
        {
            ResourceIdentifier id = default;
            string name = default;
            ResourceType type = default;
            Optional<SystemData> systemData = default;
            Optional<string> hostName = default;
            Optional<CustomDomainResourceState> resourceState = default;
            Optional<CustomHttpsProvisioningState> customHttpsProvisioningState = default;
            Optional<CustomHttpsAvailabilityState> customHttpsProvisioningSubstate = default;
            Optional<CustomDomainHttpsContent> customHttpsParameters = default;
            Optional<string> validationData = default;
            Optional<CustomHttpsProvisioningState> provisioningState = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = new ResourceType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    systemData = JsonSerializer.Deserialize<SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("hostName"))
                        {
                            hostName = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("resourceState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            resourceState = new CustomDomainResourceState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("customHttpsProvisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            customHttpsProvisioningState = new CustomHttpsProvisioningState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("customHttpsProvisioningSubstate"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            customHttpsProvisioningSubstate = new CustomHttpsAvailabilityState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("customHttpsParameters"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                customHttpsParameters = null;
                                continue;
                            }
                            customHttpsParameters = CustomDomainHttpsContent.DeserializeCustomDomainHttpsContent(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("validationData"))
                        {
                            validationData = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            provisioningState = new CustomHttpsProvisioningState(property0.Value.GetString());
                            continue;
                        }
                    }
                    continue;
                }
            }
            return new CdnCustomDomainData(id, name, type, systemData.Value, hostName.Value, Optional.ToNullable(resourceState), Optional.ToNullable(customHttpsProvisioningState), Optional.ToNullable(customHttpsProvisioningSubstate), customHttpsParameters.Value, validationData.Value, Optional.ToNullable(provisioningState));
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>SAP_JSPPortlet</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading;
namespace CoreclrTestLib
{
    public class CoreclrTestWrapperLib
    {
        public const int EXIT_SUCCESS_CODE = 0;

        public int RunTest(string cmdLine, string outputfile, string errorfile)
        {
            System.IO.TextWriter output_file = new System.IO.StreamWriter(new FileStream(outputfile, FileMode.Create));
            System.IO.TextWriter err_file = new System.IO.StreamWriter(new FileStream(errorfile, FileMode.Create));

            int exitCode = -100;
            int timeout = 1000 * 60*10;
            using (Process process = new Process())
            {
                process.StartInfo.FileName = cmdLine;
                process.StartInfo.UseShellExecute = false;
                process.StartInfo.RedirectStandardOutput = true;
                process.StartInfo.RedirectStandardError = true;

                StringBuilder output = new StringBuilder();
                StringBuilder error = new StringBuilder();

                using (AutoResetEvent outputWaitHandle = new AutoResetEvent(false))
                using (AutoResetEvent errorWaitHandle = new AutoResetEvent(false))
                {
                    process.OutputDataReceived += (sender, e) =>
                    {
                        if (e.Data == null)
                        {
                            try
                            {
                                outputWaitHandle.Set();
                            }
                            catch (ObjectDisposedException)
                            {
                                // Noop for access after timeout.
                            }
                        }
                        else
                        {
                            output.AppendLine(e.Data);
                        }
                    };
                    process.ErrorDataReceived += (sender, e) =>
                    {
                        if (e.Data == null)
                        {
                            try
                            {
                                errorWaitHandle.Set();
                            }
                            catch (ObjectDisposedException)
                            {
                                // Noop for access after timeout.
                            }
                        }
                        else
                        {
                            error.AppendLine(e.Data);
                        }
                    };

                    process.Start();

                    process.BeginOutputReadLine();
                    process.BeginErrorReadLine();

                    if (process.WaitForExit(timeout) &&
                        outputWaitHandle.WaitOne(timeout) &&
                        errorWaitHandle.WaitOne(timeout))
                    {
                        // Process completed. Check process.ExitCode here.
                        exitCode = process.ExitCode;
                    }
                    else
                    {
                        // Timed out.
                        output.AppendLine("cmdLine:" + cmdLine + " Timed Out");
                        error.AppendLine("cmdLine:" + cmdLine + " Timed Out");
                    }

                   output_file.WriteLine(output.ToString());
                   output_file.WriteLine("Test Harness Exitcode is : " + exitCode.ToString());
                   output_file.Flush();

                   err_file.WriteLine(error.ToString());
                   err_file.Flush();

                   output_file.Dispose();
                   err_file.Dispose();
                }
            }

            return exitCode;
        }

    }
}


text:
<?php

namespace Frontend\ContenidosBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

//ASOCIO LAS ENTIDADES QUE SE USARAN
use Frontend\ContenidosBundle\Entity\Tipoproveedor;

//ASOCIO LOS FORMULARIOS QUE SE UTILIZARAN
use Frontend\ContenidosBundle\Form\TipoproveedorType;

/*
*
* CONTROLADOR PARA TIPO DE PROVEEDOR
*
*/
class TipoproveedorController extends Controller
{

    /**
     * LISTADO DE TODOS LOS TIPOS DE PROVEEDOR
     *
     */
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        //OBTENGO LOS DATOS DE TODOS LOS TIPOS DE PROVEEDOR
        $entities = $em->getRepository('ContenidosBundle:Tipoproveedor')->findAll();

        //ENVIO A LA VISTA INDEX PARA MOSTRAR DATOS
        return $this->render('ContenidosBundle:Tipoproveedor:index.html.twig', array(
            'entities' => $entities,
        ));
    }
    /**
     * FUNCION PARA CREAR LOS TIPOS DE PROVEEDORES.
     *
     */
    public function createAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        //INSTANCIO LA CLASE TIPOPROVEEDOR
        $entity  = new Tipoproveedor();

        //ASOCIO LOS CAMPOS DEL FORMULARIO A LA VARIABLE ENTITY
        $form = $this->createForm(new TipoproveedorType(), $entity);

        //OBTENGO LOS DATOS QUE ENVIO EL USUARIO A TRAVES DEL FORMULARIO $form
        $form->bind($request);

        //VERIFICO SI EL FORMULARIO ES VALIDO
        if($form->isValid())
        {
            //INSERTO LOS DATOS EN LA BASE DE DATOS
            $em->persist($entity);
            $em->flush();
        }
            //RETORNO A LA VISTA PRINCIPAL
            return $this->redirect($this->generateUrl('tipoproveedor', array('id' => $entity->getId())));

    }

    /**
     * FUNCION QUE MUESTRA EL FORMULARIO PARA INGRESAR NUEVO TIPO DE PROVEEDOR
     *
     */
    public function newAction()
    {
        //INSTANCIO LA CLASE TIPOPROVEEDOR
        $entity = new Tipoproveedor();

        //ASOCIO LOS CAMPOS DEL FORMULARIO A LA VARIABLE ENTITY
        $form   = $this->createForm(new TipoproveedorType(), $entity);

        //ENVIO A LA VISTA
        return $this->render('ContenidosBundle:Tipoproveedor:new.html.twig', array(
            'entity' => $entity,
            'form'   => $form->createView(),
        ));
    }

    /**
     * MUESTRA EL DETALLE DE LOS TIPOS DE PROVEEDOR
     *
     */
    public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        //OBTENGO VALORES DE TIPO PROVEEDOR DE ACUERDO AL ID
        $entity = $em->getRepository('ContenidosBundle:Tipoproveedor')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Tipoproveedor entity.');
        }

        $deleteForm = $this->createDeleteForm($id);

        //ENVIO A LA VISTA
        return $this->render('ContenidosBundle:Tipoproveedor:show.html.twig', array(
            'entity'      => $entity,
            'delete_form' => $deleteForm->createView(),        ));
    }

    /**
     * Displays a form to edit an existing Tipoproveedor entity.
     *
     */
    public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        //OBTENGO LOS DATOS DEL TIPO PROVEEDOR
        $entity = $em->getRepository('ContenidosBundle:Tipoproveedor')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Tipoproveedor entity.');
        }

        //ASOCIO LOS CAMPOS DEL FORMULARIO A LA VARIABLE ENTITY
        $editForm = $this->createForm(new TipoproveedorType(), $entity);
        $deleteForm = $this->createDeleteForm($id);

        //ENVIO A LA VISTA
        return $this->render('ContenidosBundle:Tipoproveedor:edit.html.twig', array(
            'entity'      => $entity,
            'edit_form'   => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        ));
    }

    /**
     * FUNCION PARA INSERTAR DATOS DEL TIPO DE PROVEEDOR
     *
     */
    public function updateAction(Request $request, $id)
    {
        $em = $this->getDoctrine()->getManager();

        //OBTENGO DATOS DEL TIPO DE PROVEEDOR SEGUN ID
        $entity = $em->getRepository('ContenidosBundle:Tipoproveedor')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Tipoproveedor entity.');
        }

        $deleteForm = $this->createDeleteForm($id);

        //ASOCIO LOS CAMPOS DEL FORMULARIO A LA VARIABLE ENTITY
        $editForm = $this->createForm(new TipoproveedorType(), $entity);

        //OBTENGO LOS DATOS QUE ENVIO EL USUARIO A TRAVES DEL FORMULARIO $form
        $editForm->bind($request);

        //VERIFICO SI EL FORMUALRIO ES VALIDO
        if ($editForm->isValid())
        {
            //INSERTO LA INFORMACION EN LA BD
            $em->persist($entity);
            $em->flush();

            //ENVIO A LA VISTA
            return $this->redirect($this->generateUrl('tipoproveedor_edit', array('id' => $id)));
        }

        //ENVIO A OTRA VISTA SI EL FORM NO ES VALIDO
        return $this->render('ContenidosBundle:Tipoproveedor:edit.html.twig', array(
            'entity'      => $entity,
            'edit_form'   => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        ));
    }
    /**
     * FUNCION PARA ELIMINAR UN TIPO DE PROVEEDOR
     *
     */
    public function deleteAction(Request $request, $id)
    {
        $em = $this->getDoctrine()->getManager();

        $form = $this->createDeleteForm($id);

        //OBTENGO LOS DATOS A TRAVES DEL FORMULARIO $form
        $form->bind($request);

        //OBTENGO LOS DATOS DEL TIPO DE PROVEEDOR SEGUN  ID
        $entity = $em->getRepository('ContenidosBundle:Tipoproveedor')->find($id);

        if (!$entity)
        {
            throw $this->createNotFoundException('Unable to find Tipoproveedor entity.');
        }

        //VERIFICO SI EL FORMULARIO ES VALIDO
        if($form->isValid())
        {
            //ELIMINO EL TIPO DE PROVEEDOR
            $em->remove($entity);
            $em->flush();
        }

        //ENVIO A LA VISTA
        return $this->redirect($this->generateUrl('tipoproveedor'));
    }

    /**
     * Creates a form to delete a Tipoproveedor entity by id.
     *
     * @param mixed $id The entity id
     *
     * @return \Symfony\Component\Form\Form The form
     */
    private function createDeleteForm($id)
    {
        return $this->createFormBuilder(array('id' => $id))
            ->add('id', 'hidden')
            ->getForm()
        ;
    }
}//fin de la clase


text:
Getting Started
---------------

The library is distributed using CocoaPods. You can install by adding the following to your Podfile.

Objective-C
===========

.. code-block:: ruby

  target :MyAppNameTests do
    pod 'LayoutTest'
  end

Swift
=====

.. code-block:: ruby

  target :MyAppNameTests do
    pod 'LayoutTest/Swift'
  end

Adding To Non-UnitTest Targets
==============================

.. NOTE::
  Since LayoutTestCase depends on XCTest, you should only add LayoutTest to your unit tests target. If you want to use some of the functionality in an app (ie. catalog functionality or helpers), then you can include the LayoutTestBase pod in those targets.

For example:

.. code-block:: ruby

  target :MyAppName do
    pod 'LayoutTestBase'
  end

  target :MyAppNameTests do
    pod 'LayoutTest'
  end

Writing Tests
=============

See :doc:`020_writingTest`


text:
#define PERL_constant_NOTFOUND	1
#define PERL_constant_NOTDEF	2
#define PERL_constant_ISIV	3
#define PERL_constant_ISNO	4
#define PERL_constant_ISNV	5
#define PERL_constant_ISPV	6
#define PERL_constant_ISPVN	7
#define PERL_constant_ISSV	8
#define PERL_constant_ISUNDEF	9
#define PERL_constant_ISUV	10
#define PERL_constant_ISYES	11

#ifndef NVTYPE
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it.  */
#endif
#ifndef aTHX_
#define aTHX_ /* 5.6 or later define this for threading support.  */
#endif
#ifndef pTHX_
#define pTHX_ /* 5.6 or later define this for threading support.  */
#endif

static int
constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
  /* Initially switch on the length of the name.  */
  /* When generated this function returned values for the list of names given
     in this section of perl code.  Rather than manually editing these functions
     to add or remove constants, which would result in this comment and section
     of code becoming inaccurate, we recommend that you edit this section of
     code, and use it to regenerate a new set of constant functions which you
     then use to replace the originals.

     Regenerate these constant functions by feeding this entire source file to
     perl -x

#!/home/han/Downloads/perl-5.26.1/miniperl -w
use ExtUtils::Constant qw (constant_types C_constant XS_constant);

my $types = {map {($_, 1)} qw(IV)};
my @names = (qw(BZ_CONFIG_ERROR BZ_DATA_ERROR BZ_DATA_ERROR_MAGIC BZ_FINISH
	       BZ_FINISH_OK BZ_FLUSH BZ_FLUSH_OK BZ_IO_ERROR BZ_MEM_ERROR BZ_OK
	       BZ_OUTBUFF_FULL BZ_PARAM_ERROR BZ_RUN BZ_RUN_OK
	       BZ_SEQUENCE_ERROR BZ_STREAM_END BZ_UNEXPECTED_EOF));

print constant_types(), "\n"; # macro defs
foreach (C_constant ("Bzip2", 'constant', 'IV', $types, undef, 3, @names) ) {
    print $_, "\n"; # C constant subs
}
print "\n#### XS Section:\n";
print XS_constant ("Bzip2", $types);
__END__
   */

  switch (len) {
  case 5:
    if (memEQ(name, "BZ_OK", 5)) {
#ifdef BZ_OK
      *iv_return = BZ_OK;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 6:
    if (memEQ(name, "BZ_RUN", 6)) {
#ifdef BZ_RUN
      *iv_return = BZ_RUN;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 8:
    if (memEQ(name, "BZ_FLUSH", 8)) {
#ifdef BZ_FLUSH
      *iv_return = BZ_FLUSH;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 9:
    /* Names all of length 9.  */
    /* BZ_FINISH BZ_RUN_OK */
    /* Offset 8 gives the best switch position.  */
    switch (name[8]) {
    case 'H':
      if (memEQ(name, "BZ_FINIS", 8)) {
      /*                       H     */
#ifdef BZ_FINISH
        *iv_return = BZ_FINISH;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    case 'K':
      if (memEQ(name, "BZ_RUN_O", 8)) {
      /*                       K     */
#ifdef BZ_RUN_OK
        *iv_return = BZ_RUN_OK;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    }
    break;
  case 11:
    /* Names all of length 11.  */
    /* BZ_FLUSH_OK BZ_IO_ERROR */
    /* Offset 3 gives the best switch position.  */
    switch (name[3]) {
    case 'F':
      if (memEQ(name, "BZ_FLUSH_OK", 11)) {
      /*                  ^              */
#ifdef BZ_FLUSH_OK
        *iv_return = BZ_FLUSH_OK;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    case 'I':
      if (memEQ(name, "BZ_IO_ERROR", 11)) {
      /*                  ^              */
#ifdef BZ_IO_ERROR
        *iv_return = BZ_IO_ERROR;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    }
    break;
  case 12:
    /* Names all of length 12.  */
    /* BZ_FINISH_OK BZ_MEM_ERROR */
    /* Offset 5 gives the best switch position.  */
    switch (name[5]) {
    case 'M':
      if (memEQ(name, "BZ_MEM_ERROR", 12)) {
      /*                    ^             */
#ifdef BZ_MEM_ERROR
        *iv_return = BZ_MEM_ERROR;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    case 'N':
      if (memEQ(name, "BZ_FINISH_OK", 12)) {
      /*                    ^             */
#ifdef BZ_FINISH_OK
        *iv_return = BZ_FINISH_OK;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    }
    break;
  case 13:
    /* Names all of length 13.  */
    /* BZ_DATA_ERROR BZ_STREAM_END */
    /* Offset 11 gives the best switch position.  */
    switch (name[11]) {
    case 'N':
      if (memEQ(name, "BZ_STREAM_END", 13)) {
      /*                          ^        */
#ifdef BZ_STREAM_END
        *iv_return = BZ_STREAM_END;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    case 'O':
      if (memEQ(name, "BZ_DATA_ERROR", 13)) {
      /*                          ^        */
#ifdef BZ_DATA_ERROR
        *iv_return = BZ_DATA_ERROR;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    }
    break;
  case 14:
    if (memEQ(name, "BZ_PARAM_ERROR", 14)) {
#ifdef BZ_PARAM_ERROR
      *iv_return = BZ_PARAM_ERROR;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 15:
    /* Names all of length 15.  */
    /* BZ_CONFIG_ERROR BZ_OUTBUFF_FULL */
    /* Offset 8 gives the best switch position.  */
    switch (name[8]) {
    case 'F':
      if (memEQ(name, "BZ_OUTBUFF_FULL", 15)) {
      /*                       ^             */
#ifdef BZ_OUTBUFF_FULL
        *iv_return = BZ_OUTBUFF_FULL;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    case 'G':
      if (memEQ(name, "BZ_CONFIG_ERROR", 15)) {
      /*                       ^             */
#ifdef BZ_CONFIG_ERROR
        *iv_return = BZ_CONFIG_ERROR;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    }
    break;
  case 17:
    /* Names all of length 17.  */
    /* BZ_SEQUENCE_ERROR BZ_UNEXPECTED_EOF */
    /* Offset 12 gives the best switch position.  */
    switch (name[12]) {
    case 'D':
      if (memEQ(name, "BZ_UNEXPECTED_EOF", 17)) {
      /*                           ^           */
#ifdef BZ_UNEXPECTED_EOF
        *iv_return = BZ_UNEXPECTED_EOF;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    case 'E':
      if (memEQ(name, "BZ_SEQUENCE_ERROR", 17)) {
      /*                           ^           */
#ifdef BZ_SEQUENCE_ERROR
        *iv_return = BZ_SEQUENCE_ERROR;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    }
    break;
  case 19:
    if (memEQ(name, "BZ_DATA_ERROR_MAGIC", 19)) {
#ifdef BZ_DATA_ERROR_MAGIC
      *iv_return = BZ_DATA_ERROR_MAGIC;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  }
  return PERL_constant_NOTFOUND;
}


text:
.class public abstract Lcom/nineoldandroids/view/ViewPropertyAnimator;
.super Ljava/lang/Object;
.source "ViewPropertyAnimator.java"

# static fields
.field private static final ANIMATORS:Ljava/util/WeakHashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/WeakHashMap",
            "<",
            "Landroid/view/View;",
            "Lcom/nineoldandroids/view/ViewPropertyAnimator;",
            ">;"
        }
    .end annotation
.end field

# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 47
    new-instance v0, Ljava/util/WeakHashMap;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Ljava/util/WeakHashMap;-><init>(I)V

    sput-object v0, Lcom/nineoldandroids/view/ViewPropertyAnimator;->ANIMATORS:Ljava/util/WeakHashMap;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 46
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static animate(Landroid/view/View;)Lcom/nineoldandroids/view/ViewPropertyAnimator;
    .locals 3
    .param p0, "view"    # Landroid/view/View;

    .prologue
    .line 58
    sget-object v2, Lcom/nineoldandroids/view/ViewPropertyAnimator;->ANIMATORS:Ljava/util/WeakHashMap;

    invoke-virtual {v2, p0}, Ljava/util/WeakHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/nineoldandroids/view/ViewPropertyAnimator;

    .line 59
    .local v0, "animator":Lcom/nineoldandroids/view/ViewPropertyAnimator;
    if-nez v0, :cond_0

    .line 60
    sget-object v2, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v1

    .line 61
    .local v1, "version":I
    const/16 v2, 0xe

    if-lt v1, v2, :cond_1

    .line 62
    new-instance v0, Lcom/nineoldandroids/view/ViewPropertyAnimatorICS;

    .end local v0    # "animator":Lcom/nineoldandroids/view/ViewPropertyAnimator;
    invoke-direct {v0, p0}, Lcom/nineoldandroids/view/ViewPropertyAnimatorICS;-><init>(Landroid/view/View;)V

    .line 68
    .restart local v0    # "animator":Lcom/nineoldandroids/view/ViewPropertyAnimator;
    :goto_0
    sget-object v2, Lcom/nineoldandroids/view/ViewPropertyAnimator;->ANIMATORS:Ljava/util/WeakHashMap;

    invoke-virtual {v2, p0, v0}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 70
    .end local v1    # "version":I
    :cond_0
    return-object v0

    .line 63
    .restart local v1    # "version":I
    :cond_1
    const/16 v2, 0xb

    if-lt v1, v2, :cond_2

    .line 64
    new-instance v0, Lcom/nineoldandroids/view/ViewPropertyAnimatorHC;

    .end local v0    # "animator":Lcom/nineoldandroids/view/ViewPropertyAnimator;
    invoke-direct {v0, p0}, Lcom/nineoldandroids/view/ViewPropertyAnimatorHC;-><init>(Landroid/view/View;)V

    .restart local v0    # "animator":Lcom/nineoldandroids/view/ViewPropertyAnimator;
    goto :goto_0

    .line 66
    :cond_2
    new-instance v0, Lcom/nineoldandroids/view/ViewPropertyAnimatorPreHC;

    .end local v0    # "animator":Lcom/nineoldandroids/view/ViewPropertyAnimator;
    invoke-direct {v0, p0}, Lcom/nineoldandroids/view/ViewPropertyAnimatorPreHC;-><init>(Landroid/view/View;)V

    .restart local v0    # "animator":Lcom/nineoldandroids/view/ViewPropertyAnimator;
    goto :goto_0
.end method

# virtual methods
.method public abstract alpha(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract alphaBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract cancel()V
.end method

.method public abstract getDuration()J
.end method

.method public abstract getStartDelay()J
.end method

.method public abstract rotation(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract rotationBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract rotationX(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract rotationXBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract rotationY(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract rotationYBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract scaleX(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract scaleXBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract scaleY(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract scaleYBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract setDuration(J)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract setInterpolator(Landroid/view/animation/Interpolator;)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract setListener(Lcom/nineoldandroids/animation/Animator$AnimatorListener;)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract setStartDelay(J)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract start()V
.end method

.method public abstract translationX(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract translationXBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract translationY(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract translationYBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract x(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract xBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract y(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method

.method public abstract yBy(F)Lcom/nineoldandroids/view/ViewPropertyAnimator;
.end method


text:
package com.zaradai.kunzite.trader.positions;

import com.google.common.base.Objects;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import com.zaradai.kunzite.trader.instruments.Instrument;
import org.joda.time.DateTime;

public class Position {
    private final Portfolio portfolio;
    private final Instrument instrument;

    private long volume;
    private double entryPrice;
    private DateTime opened;

    @Inject
    Position(@Assisted Portfolio portfolio, @Assisted Instrument instrument) {
        this.portfolio = portfolio;
        this.instrument = instrument;
        reset();
    }

    public Portfolio getPortfolio() {
        return portfolio;
    }

    public String getPortfolioId() {
        return portfolio.getId();
    }

    public Instrument getInstrument() {
        return instrument;
    }

    public String getInstrumentId() {
        return instrument.getId();
    }

    public long getNet() {
        return volume;
    }

    public void add(long position) {
        volume += position;
    }

    public double getEntryPrice() {
        return entryPrice;
    }

    public void setEntryPrice(double entryPrice) {
        this.entryPrice = entryPrice;
    }

    public boolean isLong() {
        return getNet() >= 0;
    }

    public boolean isActive() {
        return getNet() != 0;
    }

    public DateTime getOpened() {
        return opened;
    }

    public void setOpened(DateTime opened) {
        this.opened = opened;
    }

    public void reset() {
        volume = 0L;
        entryPrice = 0.0;
        opened = null;
    }

    @Override
    public String toString() {
        return Objects.toStringHelper(this)
                .add("Instrument", getInstrumentId())
                .add("Portfolio", getPortfolioId())
                .add("Net", getNet())
                .add("Opened", getOpened().toString("YYYY-MM-dd HH:mm:ss.SSS"))
                .add("Entry", getEntryPrice())
                .toString();
    }

    /**
     * A position is unique per portfolio per instrument
     * @return
     */
    @Override
    public int hashCode() {
        return Objects.hashCode(instrument, portfolio);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }

        Position other = (Position) obj;

        return Objects.equal(instrument, other.instrument) && Objects.equal(portfolio, other.portfolio);
    }
}


text:
package gnu.java.awt.peer.gtk;

import java.awt.AWTException;
import java.awt.GraphicsDevice;
import java.awt.Rectangle;
import java.awt.image.ColorModel;
import java.awt.image.DirectColorModel;
import java.awt.peer.RobotPeer;

/**
 * Implements the RobotPeer interface using the XTest extension.
 *
 * @author Thomas Fitzsimmons
 */
public class GdkRobotPeer implements RobotPeer
{
  // gdk-pixbuf provides data in RGBA format
  static final ColorModel cm = new DirectColorModel (32, 0xff000000,
						     0x00ff0000,
						     0x0000ff00,
						     0x000000ff);

  public GdkRobotPeer (GraphicsDevice screen) throws AWTException
  {
    // FIXME: make use of screen parameter when GraphicsDevice is
    // implemented.
    if (!initXTest ())
      throw new AWTException ("XTest extension not supported");
  }

  native boolean initXTest ();

  // RobotPeer methods
  public native void mouseMove (int x, int y);
  public native void mousePress (int buttons);
  public native void mouseRelease (int buttons);
  public native void mouseWheel (int wheelAmt);
  public native void keyPress (int keycode);
  public native void keyRelease (int keycode);
  native int[] nativeGetRGBPixels (int x, int y, int width, int height);

  public int getRGBPixel (int x, int y)
  {
    return cm.getRGB (nativeGetRGBPixels (x, y, 1, 1)[0]);
  }

  public int[] getRGBPixels (Rectangle r)
  {
    int[] gdk_pixels = nativeGetRGBPixels (r.x, r.y, r.width, r.height);
    int[] pixels = new int[r.width * r.height];

    for (int i = 0; i < r.width * r.height; i++)
      pixels[i] = cm.getRGB (gdk_pixels[i]);

    return pixels;
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
  name="${project.name}">

  <skin>
    <groupId>org.apache.maven.skins</groupId>
    <artifactId>maven-fluido-skin</artifactId>
    <version>1.1</version>
  </skin>

  <custom>
    <fluidoSkin>
      <topBarEnabled>true</topBarEnabled>
      <sideBarEnabled>false</sideBarEnabled>
      <twitter>
        <user>jfarcand</user>
        <showUser>true</showUser>
        <showFollowers>true</showFollowers>
      </twitter>
    </fluidoSkin>
  </custom>

  <publishDate format="dd MMMM yyyy" position="left" />
  <version position="left" />

  <body>
    <menu name="User guide">
      <item name="Executing request" href="request.html" />
      <item name="Configuring the AsyncHttpClient" href="configuring.html" />
      <item name="SSL" href="ssl.html" />
      <item name="Using Filters" href="filters.html" />
      <item name="Uploading file" href="upload.html" />
      <item name="Authentication" href="auth.html" />
      <item name="Proxy" href="proxy.html" />
      <item name="Switching Provider" href="providers.html" />
      <item name="Using the WebDav protocol" href="webdav.html" />
      <item name="Resumable Dowload" href="resumable-download.html" />
      <item name="TransferListener" href="transfer-listener.html" />
      <item name="Zero Bytes Copy" href="zero-bytes-copy.html" />
      <item name="Improve raw performance" href="performances.html" />
      <item name="OAuth" href="oauth.html" />
    </menu>

    <menu ref="reports" inherit="bottom" />
  </body>
</project>


text:
require 'spec_helper'

describe "products/edit" do
  before(:each) do
    @product = assign(:product, stub_model(Product,
      :name => "MyString",
      :description => "MyText",
      :size => 1,
      :price => "9.99"
    ))
  end

  it "renders the edit product form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form[action=?][method=?]", product_path(@product), "post" do
      assert_select "input#product_name[name=?]", "product[name]"
      assert_select "textarea#product_description[name=?]", "product[description]"
      assert_select "input#product_size[name=?]", "product[size]"
      assert_select "input#product_price[name=?]", "product[price]"
    end
  end
end


text:
package org.ini4j.spi;

interface HandlerBase
{
    void handleComment(String comment);

    void handleOption(String optionName, String optionValue);
}


text:
<template name="playlist">

              {{{privacyIcon this}}}
               {{title}}

            {{#if description}}

{{description}}

            {{/if}}
            {{#if cover}}

            {{else}}

            {{/if}}

            {{> updatePlaylistForm}}

          {{#if playing}}
            <button class="btn btn-success" data-action="playlist-pause">
               Pause
            </button>
          {{else}}
            <button class="btn btn-success" data-action="playlist-play">
               Play
            </button>
          {{/if}}
          {{#if following}}
          <button class="btn" data-action="unfollow">
             Unfollow
          </button>
          {{else}}
          <button class="btn" data-action="follow">
             Follow
          </button>
          {{/if}}

Followers

              {{#each followers}}
                {{>circleAvatar this}}
              {{else}}

None yet

              {{/each}}

Stats

Created: {{fromNow createdAt}}

              Owner: {{#with owner}}{{> userLink}}{{/with}}

              {{songCount}} songs
              {{#if songCount}}
                with a total length of {{totalDuration}}
              {{/if}}
              {{> contributionChart}}

        {{>suggestions}}

          You need more inspiration?

        {{#if isOwner}}
          {{>ownerPanel}}
        {{/if}}

        {{> searchBar viewToggle=1 callback="searchCallback" }}
        {{> songs}}

</template>

<template name="updatePlaylistForm">
  {{> quickForm collection="Playlists" doc=editingDoc id="updatePlaylistForm" type="update" fields="title,cover,tags,description" buttonContent="Update"}}
</template>

<template name="ownerPanel">

Owner's panel

You are the owner of this playlist, so you can view fancy settings

        <button data-action="show-settings" class="btn btn-info btn-sm">
           Important settings
        </button>

      {{#quickRemoveButton collection="Playlists" class="btn btn-danger btn-sm" _id=this._id
          onError=onError onSuccess=onSuccess beforeRemove=beforeRemove}}
         Delete playlist
      {{/quickRemoveButton}}

</template>

<template name="songs">
  {{#each songs}}
    {{#if sessionIs 'songView' 'list'}}

        {{> playlistEntry}}

    {{else}}
      {{> playlistGridEntry}}
    {{/if}}
  {{/each}}
</template>

<template name="playlistGridEntry">

      {{this.snippet.title}}
      ({{formatDuration this.contentDetails.duration}})

        {{> playlistEntryControls}}
        {{>loveSong}}

</template>

<template name="playlistEntry">

    {{>loveSong}}

      {{this.snippet.title}}

      ({{formatDuration this.contentDetails.duration}})
      {{#each this.users}}

        {{> userLink}}
      {{/each}}

Added by {{#with this.author}}{{> userLink}}{{/with}} {{this.addedFromNow}}

    {{> playlistEntryControls}}

</template>

<template name="playlistEntryControls">

</template>

<template name="loveSong">

</template>


text:
import { createStore, applyMiddleware, combineReducers, compose } from 'redux'
import middleware from '../middleware/'
import DevTools from '../DevTools'

import app from './App'
import simple from './Simple'

const reducers = combineReducers({
  app,
  simple,
})

const enhancer = compose(
  applyMiddleware(...middleware),
  DevTools.instrument(),
)

const configure = (initialState) => {
  const store = createStore(reducers, initialState, enhancer)

  if (module.hot) {
    module.hot.accept('./', () => {
      const nextReducer = require('./').default

      store.replaceReducer(nextReducer)
    })
  }

  return store
}

export default configure


text:
package network.d366.lambda_expressions.functional_interfaces.constructor_references;

import network.d366.lambda_expressions.Person;

/**
 * Created by giau on 8/4/15.
 */
public class ConstructorReferences_Main {
    public static void main(String args[]) {
        PersonFactory<Person> personFactory = Person::new;
        Person person = personFactory.create("Peter", "Parker");
    }
}


text:
using System;

namespace Raging.Toolbox.Extensions
{
    /// <summary>
    ///     A generic ambient container for any type instance.
    /// </summary>
    public static class System<T> where T : class
    {
        private static AmbientSingleton<T> singleton;

        /// <summary>
        ///     Gets the component instance.
        /// </summary>
        /// <value>The T component.</value>
        public static T Instance
        {
            get { return singleton.Value; }
        }

        public static T Customize(Func<T> factory)
        {
            return (singleton = AmbientSingleton.Create(factory())).Value;
        }
    }
}