text:
/*
 * Support and FAQ: visit Microchip Support
 */

#include <compiler.h>
#include <hpl_cmcc.h>
#include <hpl_cmcc_config.h>

/**
 * \brief Initialize Cache Module
 *
 * This function does low level cache configuration.
 *
 * \return initialize status
 */
int32_t _cmcc_init(void)
{
	int32_t return_value;

	_cmcc_disable(CMCC);

	if (_is_cache_disabled(CMCC)) {
		hri_cmcc_write_CFG_reg(
		    CMCC,
		    (CMCC_CFG_CSIZESW(CONF_CMCC_CACHE_SIZE) | (CONF_CMCC_DATA_CACHE_DISABLE << CMCC_CFG_DCDIS_Pos)
		     | (CONF_CMCC_INST_CACHE_DISABLE << CMCC_CFG_ICDIS_Pos) | (CONF_CMCC_CLK_GATING_DISABLE)));

		_cmcc_enable(CMCC);
		return_value = _is_cache_enabled(CMCC) == true ? ERR_NONE : ERR_FAILURE;
	} else {
		return_value = ERR_NOT_INITIALIZED;
	}

	return return_value;
}

/**
 * \brief Configure CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] cache configuration structure pointer
 *
 * \return status of operation
 */
int32_t _cmcc_configure(const void *hw, struct _cache_cfg *cache_ctrl)
{
	int32_t return_value;

	_cmcc_disable(hw);

	if (_is_cache_disabled(hw)) {
		hri_cmcc_write_CFG_reg(
		    hw,
		    (CMCC_CFG_CSIZESW(cache_ctrl->cache_size) | (cache_ctrl->data_cache_disable << CMCC_CFG_DCDIS_Pos)
		     | (cache_ctrl->inst_cache_disable << CMCC_CFG_ICDIS_Pos) | (cache_ctrl->gclk_gate_disable)));

		return_value = ERR_NONE;
	} else {
		return_value = ERR_NOT_INITIALIZED;
	}

	return return_value;
}

/**
 * \brief Enable data cache in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] boolean 1 -> Enable the data cache, 0 -> disable the data cache
 *
 * \return status of operation
 */
int32_t _cmcc_enable_data_cache(const void *hw, bool value)
{
	uint32_t tmp;
	int32_t  ret;

	tmp = hri_cmcc_read_CFG_reg(hw);
	tmp &= ~CMCC_CFG_DCDIS;
	tmp |= ((!value) << CMCC_CFG_DCDIS_Pos);

	ret = _cmcc_disable(hw);
	hri_cmcc_write_CFG_reg(hw, tmp);
	ret = _cmcc_enable(hw);

	return ret;
}

/**
 * \brief Enable instruction cache in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] boolean 1 -> Enable the inst cache, 0 -> disable the inst cache
 *
 * \return status of operation
 */
int32_t _cmcc_enable_inst_cache(const void *hw, bool value)
{
	uint32_t tmp;
	int32_t  ret;

	tmp = hri_cmcc_read_CFG_reg(hw);
	tmp &= ~CMCC_CFG_ICDIS;
	tmp |= ((!value) << CMCC_CFG_ICDIS_Pos);

	ret = _cmcc_disable(hw);
	hri_cmcc_write_CFG_reg(hw, tmp);
	ret = _cmcc_enable(hw);

	return ret;
}

/**
 * \brief Enable clock gating in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] boolean 1 -> Enable the clock gate, 0 -> disable the clock gate
 *
 * \return status of operation
 */
int32_t _cmcc_enable_clock_gating(const void *hw, bool value)
{
	uint32_t tmp;
	int32_t  ret;

	tmp = hri_cmcc_read_CFG_reg(hw);
	tmp |= value;

	ret = _cmcc_disable(hw);
	hri_cmcc_write_CFG_reg(hw, tmp);
	ret = _cmcc_enable(hw);

	return ret;
}

/**
 * \brief Configure the cache size in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] element from cache size configuration enumerator
 *				0->1K, 1->2K, 2->4K(default)
 *
 * \return status of operation
 */
int32_t _cmcc_configure_cache_size(const void *hw, enum conf_cache_size size)
{
	uint32_t tmp;
	int32_t  ret;

	tmp = hri_cmcc_read_CFG_reg(hw);
	tmp &= (~CMCC_CFG_CSIZESW_Msk);
	tmp |= (size << CMCC_CFG_CSIZESW_Pos);

	ret = _cmcc_disable(hw);
	hri_cmcc_write_CFG_reg(hw, tmp);
	ret = _cmcc_enable(hw);

	return ret;
}

/**
 * \brief Lock the mentioned WAY in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] element from "way_num_index" enumerator
 *
 * \return status of operation
 */
int32_t _cmcc_lock_way(const void *hw, enum way_num_index num)
{
	uint32_t tmp;
	int32_t  ret;

	tmp = hri_cmcc_read_LCKWAY_reg(hw);
	tmp |= CMCC_LCKWAY_LCKWAY(num);

	ret = _cmcc_disable(hw);
	hri_cmcc_write_LCKWAY_reg(hw, tmp);
	ret = _cmcc_enable(hw);

	return ret;
}

/**
 * \brief Unlock the mentioned WAY in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] element from "way_num_index" enumerator
 *
 * \return status of operation
 */
int32_t _cmcc_unlock_way(const void *hw, enum way_num_index num)
{
	uint32_t tmp;
	int32_t  ret;

	tmp = hri_cmcc_read_LCKWAY_reg(hw);
	tmp &= (~CMCC_LCKWAY_LCKWAY(num));

	ret = _cmcc_disable(hw);
	hri_cmcc_write_LCKWAY_reg(hw, tmp);
	ret = _cmcc_enable(hw);

	return ret;
}

/**
 * \brief Invalidate the mentioned cache line in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] element from "way_num" enumerator (valid arg is 0-3)
 * \param[in] line number (valid arg is 0-63 as each way will have 64 lines)
 *
 * \return status of operation
 */
int32_t _cmcc_invalidate_by_line(const void *hw, uint8_t way_num, uint8_t line_num)
{
	int32_t return_value;

	if ((way_num < CMCC_WAY_NOS) && (line_num < CMCC_LINE_NOS)) {
		_cmcc_disable(hw);
		while (!(_is_cache_disabled(hw)))
			;
		hri_cmcc_write_MAINT1_reg(hw, (CMCC_MAINT1_INDEX(line_num) | CMCC_MAINT1_WAY(way_num)));
		return_value = ERR_NONE;
	} else {
		return_value = ERR_INVALID_ARG;
	}

	return return_value;
}

/**
 * \brief Invalidate entire cache entries in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 *
 * \return status of operation
 */
int32_t _cmcc_invalidate_all(const void *hw)
{
	int32_t return_value;

	_cmcc_disable(hw);
	if (_is_cache_disabled(hw)) {
		hri_cmcc_write_MAINT0_reg(hw, CMCC_MAINT0_INVALL);
		return_value = ERR_NONE;
	} else {
		return_value = ERR_FAILURE;
	}

	return return_value;
}

/**
 * \brief Configure cache monitor in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 * \param[in] element from cache monitor configurations enumerator
 *
 * \return status of operation
 */
int32_t _cmcc_configure_monitor(const void *hw, enum conf_cache_monitor monitor_cfg)
{
	hri_cmcc_write_MCFG_reg(hw, CMCC_MCFG_MODE(monitor_cfg));

	return ERR_NONE;
}

/**
 * \brief Enable cache monitor in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 *
 * \return status of operation
 */
int32_t _cmcc_enable_monitor(const void *hw)
{
	hri_cmcc_write_MEN_reg(hw, CMCC_MEN_MENABLE);

	return ERR_NONE;
}

/**
 * \brief Disable cache monitor in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 *
 * \return status of operation
 */
int32_t _cmcc_disable_monitor(const void *hw)
{
	hri_cmcc_write_MEN_reg(hw, (CMCC_MONITOR_DISABLE << CMCC_MEN_MENABLE_Pos));

	return ERR_NONE;
}

/**
 * \brief Reset cache monitor in CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 *
 * \return status of operation
 */
int32_t _cmcc_reset_monitor(const void *hw)
{
	hri_cmcc_write_MCTRL_reg(hw, CMCC_MCTRL_SWRST);

	return ERR_NONE;
}

/**
 * \brief Get cache monitor event counter value from CMCC module
 *
 * \param[in] pointer pointing to the starting address of CMCC module
 *
 * \return event counter value
 */
uint32_t _cmcc_get_monitor_event_count(const void *hw)
{
	return hri_cmcc_read_MSR_reg(hw);
}


text:
package com.google.samples.apps.topeka.persistence;

import android.provider.BaseColumns;

/**
 * Structure of the category table.
 */
public interface CategoryTable {

    String NAME = "category";

    String COLUMN_ID = BaseColumns._ID;
    String COLUMN_NAME = "name";
    String COLUMN_THEME = "theme";
    String COLUMN_SCORES = "scores";
    String COLUMN_SOLVED = "solved";

    String[] PROJECTION = new String[]{COLUMN_ID, COLUMN_NAME,
            COLUMN_THEME, COLUMN_SOLVED, COLUMN_SCORES};

    String CREATE = "CREATE TABLE " + NAME + " ("
            + COLUMN_ID + " TEXT PRIMARY KEY, "
            + COLUMN_NAME + " TEXT NOT NULL, "
            + COLUMN_THEME + " TEXT NOT NULL, "
            + COLUMN_SOLVED + " TEXT NOT NULL, "
            + COLUMN_SCORES + " TEXT);";
}

redpajama_set_name: RedPajamaGithub


text:
#region Licence

#endregion

using System.Threading;
using System.Threading.Tasks;

namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
{
    class MyCancellableCommandHandlerAsync : RequestHandlerAsync<MyCommand>
    {
        private static MyCommand s_command;

        public MyCancellableCommandHandlerAsync()
        {
            s_command = null;
        }

        public override async Task<MyCommand> HandleAsync(MyCommand command, CancellationToken cancellationToken = default(CancellationToken))
        {
            LogCommand(command);
            return await base.HandleAsync(command, cancellationToken).ConfigureAwait(ContinueOnCapturedContext);
        }

        public static bool ShouldReceive(MyCommand expectedCommand)
        {
            return s_command != null && expectedCommand.Id == s_command.Id;
        }

        private void LogCommand(MyCommand request)
        {
            s_command = request;
        }
    }
}


text:
package org.mpisws.p2p.transport.peerreview;

public interface PeerReviewConstants extends StatusConstants {

  public static final short EVT_SEND = 0; // Outgoing message (followed by SENDSIGN entry)
  public static final short EVT_RECV = 1; // Incoming message (followed by SIGN entry)
  public static final short EVT_SIGN = 2;                   /* Signature on incoming message */
  public static final short EVT_ACK = 3;                                  /* Acknowledgment */
  public static final short EVT_CHECKPOINT = 4;                 /* Checkpoint of the state machine */
  public static final short EVT_INIT = 5;                    /* State machine is (re)started */
  public static final short EVT_SENDSIGN = 6;                   /* Signature on outgoing message */
  public static final short EVT_VRF = 7;                         /* New Si value in the VRF */
  public static final short EVT_CHOOSE_Q = 8;                           /* Choose Q array in VRF */
  public static final short EVT_CHOOSE_RAND = 9;                        /* Choose randomness in VRF */
  public static final short EVT_MAX_RESERVED = EVT_CHOOSE_RAND;    /* User defined events start here */

  public static final short EVT_SOCKET_OPEN_INCOMING = 30;
  public static final short EVT_SOCKET_OPEN_OUTGOING = 31;
  public static final short EVT_SOCKET_OPENED_OUTGOING = 32;
  public static final short EVT_SOCKET_EXCEPTION = 33;
  public static final short EVT_SOCKET_CLOSE = 34;
  public static final short EVT_SOCKET_SHUTDOWN_OUTPUT = 35;
  public static final short EVT_SOCKET_CLOSED = 36;
  public static final short EVT_SOCKET_CAN_READ = 37;
  public static final short EVT_SOCKET_CAN_WRITE = 38;
  public static final short EVT_SOCKET_CAN_RW = 39;
  public static final short EVT_SOCKET_READ = 40;
  public static final short EVT_SOCKET_WRITE = 41;

  public static final short EVT_MIN_SOCKET_EVT = EVT_SOCKET_OPEN_INCOMING;
  public static final short EVT_MAX_SOCKET_EVT = EVT_SOCKET_SHUTDOWN_OUTPUT;

  public static final short EX_TYPE_IO = 1;
  public static final short EX_TYPE_ClosedChannel = 2;
  public static final short EX_TYPE_Unknown = 0;

  /* Message types used in PeerReview */

  public static final short MSG_USERDATA = 16;            /* Contains data the application has sent */
  public static final short MSG_ACK = 17;                       /* Acknowledges an USERDATA message */
  public static final short MSG_ACCUSATION = 18;            /* Contains evidence about a third node */
  public static final short MSG_CHALLENGE = 19;            /* Contains evidence about the recipient */
  public static final short MSG_RESPONSE = 20;                      /* Answers a previous CHALLENGE */
  public static final short MSG_AUTHPUSH = 21;        /* Sent to a witness; contains authenticators */
  public static final short MSG_AUTHREQ = 22;    /* Asks a witness to return a recent authenticator */
  public static final short MSG_AUTHRESP = 23;                    /* Responds to a previous AUTHREQ */
  public static final short MSG_USERDGRAM = 24;    /* Contains a datagram from the app (not logged) */

  /* Evidence types (challenges and proofs) */
  public static final byte CHAL_AUDIT = 1;
  public static final byte CHAL_SEND = 2;
  public static final byte RESP_SEND = CHAL_SEND;
  public static final byte RESP_AUDIT = CHAL_AUDIT;
  public static final byte PROOF_INCONSISTENT = 3;
  public static final byte PROOF_NONCONFORMANT = 4;

  /* Constants for reporting the status of a remote node to the application */

  public static final long DEFAULT_AUTH_PUSH_INTERVAL_MILLIS = 5000;
  public static final long DEFAULT_CHECKPOINT_INTERVAL_MILLIS = 10000L;
  public static final long MAINTENANCE_INTERVAL_MILLIS = 10000;
  public static final long DEFAULT_TIME_TOLERANCE_MILLIS = 60000;

  public static final int TI_CHECKPOINT = 99;
  public static final int TI_MAINTENANCE = 6;
  public static final int TI_AUTH_PUSH = 7;
  public static final int TI_MAX_RESERVED = TI_AUTH_PUSH;
  public static final int TI_STATUS_INFO = 101;
  public static final int MAX_STATUS_INFO = 100;

  /* Flags for AUDIT challenges */

  public static final byte FLAG_INCLUDE_CHECKPOINT = 1;                /* Include a full checkpoint */
  public static final byte FLAG_FULL_MESSAGES_SENDER = 2; /* Don't hash outgoing messages to sender */
  public static final byte FLAG_FULL_MESSAGES_ALL = 4;          /* Don't hash any outgoing messages */

  /**
   * Enum for EvidenceTool
   */
  public static final int VALID = 1;
  public static final int INVALID = 2;
  public static final int CERT_MISSING = 3;

  public static final long DEFAULT_AUDIT_INTERVAL_MILLIS = 10000;
  public static final int PROGRESS_INTERVAL_MILLIS = 100;
  public static final int INVESTIGATION_INTERVAL_MILLIS = 250;
  public static final int DEFAULT_LOG_DOWNLOAD_TIMEOUT = 2000;
  public static final int MAX_WITNESSED_NODES = 110;
  public static final int MAX_ACTIVE_AUDITS = 500;
  public static final int MAX_ACTIVE_INVESTIGATIONS = 10;
  public static final int MAX_ENTRIES_BETWEEN_CHECKPOINTS = 100;
  public static final int AUTH_CACHE_INTERVAL = 500000;

  public static final int TI_START_AUDITS = 3;
  public static final int TI_MAKE_PROGRESS = 4;

  public static final int STATE_SEND_AUDIT = 1;
  public static final int STATE_WAIT_FOR_LOG = 2;

  public static final int NO_CERTIFICATE = -1;
  public static final int SIGNATURE_BAD = 0;
  public static final int SIGNATURE_OK = 1;

}


text:
namespace IS24RestApi.Offer.RealEstateProject
{
    using System.Collections;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Xml.Serialization;

    /// <summary>
    /// <para xml:lang="de-DE">realestateproject</para>
    /// <para xml:lang="de-DE">Realestateproject</para>
    /// <para xml:lang="en">realestateproject</para>
    /// <para xml:lang="en">real estate project</para>
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.0.214.0")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute("RealEstateProject", Namespace="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0")]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlRootAttribute("realEstateProject", Namespace="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0")]
    public partial class RealEstateProject
    {

        /// <summary>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("name", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Name { get; set; }

        /// <summary>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("title", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Title { get; set; }

        /// <summary>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("price", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public IS24RestApi.Common.PriceRangeMandatory Price { get; set; }

        /// <summary>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("space", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public IS24RestApi.Common.AreaRangeMandatory Space { get; set; }

        /// <summary>
        /// <para xml:lang="de-DE">READONLY: minimaler Quadratmeterprice</para>
        /// <para xml:lang="de-DE">Typ zur Validierung</para>
        /// <para xml:lang="en">READONLY: minimal price pro qm</para>
        /// <para xml:lang="en">type for validation</para>
        /// <para xml:lang="en">Total number of digits: 15.</para>
        /// <para xml:lang="en">Total number of digits in fraction: 2.</para>
        /// <para xml:lang="en">Minimum inclusive value: 0.</para>
        /// <para xml:lang="en">Maximum exclusive value: 10000000000000.</para>
        /// </summary>
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        [System.Xml.Serialization.XmlElementAttribute("minPriceProQm", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public decimal MinPriceProQmValue { get; set; }

        /// <summary>
        /// <para xml:lang="de">Ruft einen Wert ab, der angibt, ob die MinPriceProQm-Eigenschaft spezifiziert ist, oder legt diesen fest.</para>
        /// <para xml:lang="en">Gets or sets a value indicating whether the MinPriceProQm property is specified.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public bool MinPriceProQmValueSpecified { get; set; }

        /// <summary>
        /// <para xml:lang="de-DE">READONLY: minimaler Quadratmeterprice</para>
        /// <para xml:lang="de-DE">Typ zur Validierung</para>
        /// <para xml:lang="en">READONLY: minimal price pro qm</para>
        /// <para xml:lang="en">type for validation</para>
        /// <para xml:lang="en">Total number of digits: 15.</para>
        /// <para xml:lang="en">Total number of digits in fraction: 2.</para>
        /// <para xml:lang="en">Minimum inclusive value: 0.</para>
        /// <para xml:lang="en">Maximum exclusive value: 10000000000000.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public System.Nullable<decimal> MinPriceProQm
        {
            get
            {
                if (this.MinPriceProQmValueSpecified)
                {
                    return this.MinPriceProQmValue;
                }
                else
                {
                    return null;
                }
            }
            set
            {
                this.MinPriceProQmValue = value.GetValueOrDefault();
                this.MinPriceProQmValueSpecified = value.HasValue;
            }
        }

        /// <summary>
        /// <para xml:lang="en">Minimum inclusive value: 1.</para>
        /// <para xml:lang="en">Maximum inclusive value: 1000.</para>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("numberOfHousingUnit", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public int NumberOfHousingUnit { get; set; }

        /// <summary>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("interiorQuality", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public IS24RestApi.Common.InteriorQuality InteriorQuality { get; set; }

        /// <summary>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("freeFrom", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string FreeFrom { get; set; }

        /// <summary>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("address", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public IS24RestApi.Common.Address Address { get; set; }

        /// <summary>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("relaEstateProjectEntries", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public RealEstateProjectEntries RelaEstateProjectEntries { get; set; }

        /// <summary>
        /// <para xml:lang="de-DE">READONLY:Homepage des Projekets</para>
        /// <para xml:lang="en">READONLY:URL of the project page</para>
        /// <para xml:lang="en">Maximum length: 255.</para>
        /// <para xml:lang="en">Pattern: (http|https)://\w.*[.]\w.*.</para>
        /// </summary>
        [System.ComponentModel.DataAnnotations.StringLengthAttribute(255)]
        [System.ComponentModel.DataAnnotations.RegularExpressionAttribute("(http|https)://\\w.*[.]\\w.*")]
        [System.Xml.Serialization.XmlElementAttribute("homepageUrl", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string HomepageUrl { get; set; }

        /// <summary>
        /// <para xml:lang="de-DE">Id des Elements.</para>
        /// <para xml:lang="en">Id of entity entry.</para>
        /// </summary>
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        [System.Xml.Serialization.XmlAttributeAttribute("id", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public long IdValue { get; set; }

        /// <summary>
        /// <para xml:lang="de">Ruft einen Wert ab, der angibt, ob die Id-Eigenschaft spezifiziert ist, oder legt diesen fest.</para>
        /// <para xml:lang="en">Gets or sets a value indicating whether the Id property is specified.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public bool IdValueSpecified { get; set; }

        /// <summary>
        /// <para xml:lang="de-DE">Id des Elements.</para>
        /// <para xml:lang="en">Id of entity entry.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public System.Nullable<long> Id
        {
            get
            {
                if (this.IdValueSpecified)
                {
                    return this.IdValue;
                }
                else
                {
                    return null;
                }
            }
            set
            {
                this.IdValue = value.GetValueOrDefault();
                this.IdValueSpecified = value.HasValue;
            }
        }
    }

    /// <summary>
    /// <para xml:lang="de-DE">Liste von Realestateprojectseinträgen</para>
    /// <para xml:lang="de-DE">Realestateprojekteintragsliste</para>
    /// <para xml:lang="en">List of Realestateproject-Entries</para>
    /// <para xml:lang="en">list of the real estate project entry</para>
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.0.214.0")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute("RealEstateProjectEntries", Namespace="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0")]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlRootAttribute("realEstateProjectEntries", Namespace="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0")]
    public partial class RealEstateProjectEntries
    {

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        private System.Collections.ObjectModel.Collection<RealEstateProjectEntry> _realEstateProjectEntry;

        /// <summary>
        /// <para xml:lang="de-DE">Eintrag eines RealEstateprojektes</para>
        /// <para xml:lang="en">an real estate project entry</para>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("realEstateProjectEntry", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public System.Collections.ObjectModel.Collection<RealEstateProjectEntry> RealEstateProjectEntry
        {
            get
            {
                return this._realEstateProjectEntry;
            }
            private set
            {
                this._realEstateProjectEntry = value;
            }
        }

        /// <summary>
        /// <para xml:lang="de">Ruft einen Wert ab, der angibt, ob die RealEstateProjectEntry-Collection leer ist.</para>
        /// <para xml:lang="en">Gets a value indicating whether the RealEstateProjectEntry collection is empty.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool RealEstateProjectEntrySpecified
        {
            get
            {
                return (this.RealEstateProjectEntry.Count != 0);
            }
        }

        /// <summary>
        /// <para xml:lang="de">Initialisiert eine neue Instanz der <see cref="RealEstateProjectEntries" /> Klasse.</para>
        /// <para xml:lang="en">Initializes a new instance of the <see cref="RealEstateProjectEntries" /> class.</para>
        /// </summary>
        public RealEstateProjectEntries()
        {
            this._realEstateProjectEntry = new System.Collections.ObjectModel.Collection<RealEstateProjectEntry>();
        }

        /// <summary>
        /// <para xml:lang="de-DE">Link zum Abruf der Eintragsliste.</para>
        /// <para xml:lang="en">Link to request the list of entries.</para>
        /// </summary>
        [System.Xml.Serialization.XmlAttributeAttribute("href", Namespace="http://www.w3.org/1999/xlink")]
        public string Href { get; set; }
    }

    /// <summary>
    /// <para xml:lang="de-DE">Eintrag in Realestate-Project</para>
    /// <para xml:lang="de-DE">Realestateprojekteintrag</para>
    /// <para xml:lang="en">realestateproject entry.</para>
    /// <para xml:lang="en">real estate project entry</para>
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.0.214.0")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute("RealEstateProjectEntry", Namespace="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0")]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlRootAttribute("realEstateProjectEntry", Namespace="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0")]
    public partial class RealEstateProjectEntry
    {

        /// <summary>
        /// <para xml:lang="de-DE">Id des Immobilienobjektes.</para>
        /// <para xml:lang="en">Id of realestate.</para>
        /// </summary>
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        [System.Xml.Serialization.XmlElementAttribute("realEstateId", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public long RealEstateIdValue { get; set; }

        /// <summary>
        /// <para xml:lang="de">Ruft einen Wert ab, der angibt, ob die RealEstateId-Eigenschaft spezifiziert ist, oder legt diesen fest.</para>
        /// <para xml:lang="en">Gets or sets a value indicating whether the RealEstateId property is specified.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public bool RealEstateIdValueSpecified { get; set; }

        /// <summary>
        /// <para xml:lang="de-DE">Id des Immobilienobjektes.</para>
        /// <para xml:lang="en">Id of realestate.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public System.Nullable<long> RealEstateId
        {
            get
            {
                if (this.RealEstateIdValueSpecified)
                {
                    return this.RealEstateIdValue;
                }
                else
                {
                    return null;
                }
            }
            set
            {
                this.RealEstateIdValue = value.GetValueOrDefault();
                this.RealEstateIdValueSpecified = value.HasValue;
            }
        }

        /// <summary>
        /// <para xml:lang="de-DE">Id des Immobilienobjektes.</para>
        /// <para xml:lang="en">Id of realestate.</para>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("realEstateExternalId", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string RealEstateExternalId { get; set; }

        /// <summary>
        /// <para xml:lang="de-DE">Id des Elements.</para>
        /// <para xml:lang="en">Id of entity entry.</para>
        /// </summary>
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        [System.Xml.Serialization.XmlAttributeAttribute("id", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public long IdValue { get; set; }

        /// <summary>
        /// <para xml:lang="de">Ruft einen Wert ab, der angibt, ob die Id-Eigenschaft spezifiziert ist, oder legt diesen fest.</para>
        /// <para xml:lang="en">Gets or sets a value indicating whether the Id property is specified.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        public bool IdValueSpecified { get; set; }

        /// <summary>
        /// <para xml:lang="de-DE">Id des Elements.</para>
        /// <para xml:lang="en">Id of entity entry.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public System.Nullable<long> Id
        {
            get
            {
                if (this.IdValueSpecified)
                {
                    return this.IdValue;
                }
                else
                {
                    return null;
                }
            }
            set
            {
                this.IdValue = value.GetValueOrDefault();
                this.IdValueSpecified = value.HasValue;
            }
        }
    }

    /// <summary>
    /// <para xml:lang="de-DE">Liste von Bauprojekte</para>
    /// <para xml:lang="de-DE">Bauprojekteliste</para>
    /// <para xml:lang="en">List of real estate projects</para>
    /// <para xml:lang="en">list of the real estate projects</para>
    /// </summary>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "2.0.214.0")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute("RealEstateProjects", Namespace="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0")]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlRootAttribute("realEstateProjects", Namespace="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0")]
    public partial class RealEstateProjects
    {

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        private System.Collections.ObjectModel.Collection<RealEstateProject> _realEstateProject;

        /// <summary>
        /// <para xml:lang="de-DE">Bauprojekt</para>
        /// <para xml:lang="en">an real estate project</para>
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("realEstateProject", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public System.Collections.ObjectModel.Collection<RealEstateProject> RealEstateProject
        {
            get
            {
                return this._realEstateProject;
            }
            private set
            {
                this._realEstateProject = value;
            }
        }

        /// <summary>
        /// <para xml:lang="de">Ruft einen Wert ab, der angibt, ob die RealEstateProject-Collection leer ist.</para>
        /// <para xml:lang="en">Gets a value indicating whether the RealEstateProject collection is empty.</para>
        /// </summary>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool RealEstateProjectSpecified
        {
            get
            {
                return (this.RealEstateProject.Count != 0);
            }
        }

        /// <summary>
        /// <para xml:lang="de">Initialisiert eine neue Instanz der <see cref="RealEstateProjects" /> Klasse.</para>
        /// <para xml:lang="en">Initializes a new instance of the <see cref="RealEstateProjects" /> class.</para>
        /// </summary>
        public RealEstateProjects()
        {
            this._realEstateProject = new System.Collections.ObjectModel.Collection<RealEstateProject>();
        }
    }
}


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.NsisTarget = undefined;

var _bluebirdLst;

function _load_bluebirdLst() {
    return _bluebirdLst = require("bluebird-lst");
}

var _bluebirdLst2;

function _load_bluebirdLst2() {
    return _bluebirdLst2 = _interopRequireDefault(require("bluebird-lst"));
}

var _appPackageBuilder;

function _load_appPackageBuilder() {
    return _appPackageBuilder = require("app-package-builder");
}

var _builderUtil;

function _load_builderUtil() {
    return _builderUtil = require("builder-util");
}

var _builderUtilRuntime;

function _load_builderUtilRuntime() {
    return _builderUtilRuntime = require("builder-util-runtime");
}

var _binDownload;

function _load_binDownload() {
    return _binDownload = require("builder-util/out/binDownload");
}

var _fs;

function _load_fs() {
    return _fs = require("builder-util/out/fs");
}

var _debug2 = _interopRequireDefault(require("debug"));

var _fsExtraP;

function _load_fsExtraP() {
    return _fsExtraP = require("fs-extra-p");
}

var _lazyVal;

function _load_lazyVal() {
    return _lazyVal = require("lazy-val");
}

var _path = _interopRequireWildcard(require("path"));

var _sanitizeFilename;

function _load_sanitizeFilename() {
    return _sanitizeFilename = _interopRequireDefault(require("sanitize-filename"));
}

var _core;

function _load_core() {
    return _core = require("../../core");
}

var _platformPackager;

function _load_platformPackager() {
    return _platformPackager = require("../../platformPackager");
}

var _timer;

function _load_timer() {
    return _timer = require("../../util/timer");
}

var _archive;

function _load_archive() {
    return _archive = require("../archive");
}

var _nsisLang;

function _load_nsisLang() {
    return _nsisLang = require("./nsisLang");
}

var _nsisLicense;

function _load_nsisLicense() {
    return _nsisLicense = require("./nsisLicense");
}

var _nsisScriptGenerator;

function _load_nsisScriptGenerator() {
    return _nsisScriptGenerator = require("./nsisScriptGenerator");
}

var _nsisUtil;

function _load_nsisUtil() {
    return _nsisUtil = require("./nsisUtil");
}

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

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

const debug = (0, _debug2.default)("electron-builder:nsis");
// noinspection SpellCheckingInspection
const ELECTRON_BUILDER_NS_UUID = "50e065bc-3134-11e6-9bab-38c9862bdaf3";
// noinspection SpellCheckingInspection
const nsisResourcePathPromise = new (_lazyVal || _load_lazyVal()).Lazy(() => (0, (_binDownload || _load_binDownload()).getBinFromGithub)("nsis-resources", "3.3.0", "4okc98BD0v9xDcSjhPVhAkBMqos+FvD/5/H72fTTIwoHTuWd2WdD7r+1j72hxd+ZXxq1y3FRW0x6Z3jR0VfpMw=="));
const USE_NSIS_BUILT_IN_COMPRESSOR = false;
class NsisTarget extends (_core || _load_core()).Target {
    constructor(packager, outDir, targetName, packageHelper) {
        super(targetName);
        this.packager = packager;
        this.outDir = outDir;
        this.packageHelper = packageHelper;
        /** @private */
        this.archs = new Map();
        this.packageHelper.refCount++;
        this.options = targetName === "portable" ? Object.create(null) : Object.assign({}, this.packager.config.nsis);
        if (targetName !== "nsis") {
            Object.assign(this.options, this.packager.config[targetName === "nsis-web" ? "nsisWeb" : targetName]);
        }
        const deps = packager.info.metadata.dependencies;
        if (deps != null && deps["electron-squirrel-startup"] != null) {
            (0, (_builderUtil || _load_builderUtil()).warn)('"electron-squirrel-startup" dependency is not required for NSIS');
        }
    }
    build(appOutDir, arch) {
        var _this = this;

        return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            _this.archs.set(arch, appOutDir);
        })();
    }
    /** @private */
    buildAppPackage(appOutDir, arch) {
        var _this2 = this;

        return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            const options = _this2.options;
            const packager = _this2.packager;
            const isDifferentialPackage = options.differentialPackage;
            const format = !isDifferentialPackage && options.useZip ? "zip" : "7z";
            const archiveFile = _path.join(_this2.outDir, `${packager.appInfo.sanitizedName}-${packager.appInfo.version}-${(_builderUtil || _load_builderUtil()).Arch[arch]}.nsis.${format}`);
            const archiveOptions = { withoutDir: true };
            let compression = packager.config.compression;
            const timer = (0, (_timer || _load_timer()).time)(`nsis package, ${(_builderUtil || _load_builderUtil()).Arch[arch]}`);
            if (isDifferentialPackage) {
                archiveOptions.solid = false;
                // our reader doesn't support compressed headers
                archiveOptions.isArchiveHeaderCompressed = false;
                // do not allow to change compression level to avoid different packages
                compression = null;
            }
            yield (0, (_archive || _load_archive()).archive)(compression, format, archiveFile, appOutDir, archiveOptions);
            timer.end();
            if (options.differentialPackage) {
                return yield (0, (_appPackageBuilder || _load_appPackageBuilder()).createDifferentialPackage)(archiveFile);
            } else {
                return yield (0, (_appPackageBuilder || _load_appPackageBuilder()).createPackageFileInfo)(archiveFile);
            }
        })();
    }
    // noinspection JSUnusedGlobalSymbols
    finishBuild() {
        var _this3 = this;

        return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            (0, (_builderUtil || _load_builderUtil()).log)(`Building ${_this3.name} installer (${Array.from(_this3.archs.keys()).map(function (it) {
                return (_builderUtil || _load_builderUtil()).Arch[it];
            }).join(" and ")})`);
            try {
                yield _this3.buildInstaller();
            } finally {
                yield _this3.packageHelper.finishBuild();
            }
        })();
    }
    get installerFilenamePattern() {
        // tslint:disable:no-invalid-template-strings
        return "${productName} " + (this.isPortable ? "" : "Setup ") + "${version}.${ext}";
    }
    get isPortable() {
        return this.name === "portable";
    }
    buildInstaller() {
        var _this4 = this;

        return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            const isPortable = _this4.isPortable;
            const packager = _this4.packager;
            const appInfo = packager.appInfo;
            const version = appInfo.version;
            const options = _this4.options;
            const installerFilename = packager.expandArtifactNamePattern(options, "exe", null, _this4.installerFilenamePattern);
            const iconPath = (isPortable ? null : yield packager.getResource(options.installerIcon, "installerIcon.ico")) || (yield packager.getIconPath());
            const oneClick = options.oneClick !== false;
            const installerPath = _path.join(_this4.outDir, installerFilename);
            const guid = options.guid || (_builderUtilRuntime || _load_builderUtilRuntime()).UUID.v5(appInfo.id, ELECTRON_BUILDER_NS_UUID);
            const companyName = appInfo.companyName;
            const defines = {
                APP_ID: appInfo.id,
                APP_GUID: guid,
                PRODUCT_NAME: appInfo.productName,
                PRODUCT_FILENAME: appInfo.productFilename,
                APP_FILENAME: (!oneClick || options.perMachine === true) && /^[-_+0-9a-zA-Z ]+$/.test(appInfo.productFilename) ? appInfo.productFilename : appInfo.name,
                APP_DESCRIPTION: appInfo.description,
                VERSION: version,
                PROJECT_DIR: packager.projectDir,
                BUILD_RESOURCES_DIR: packager.buildResourcesDir
            };
            if (companyName != null) {
                defines.COMPANY_NAME = companyName;
            }
            // electron uses product file name as app data, define it as well to remove on uninstall
            if (defines.APP_FILENAME !== appInfo.productFilename) {
                defines.APP_PRODUCT_FILENAME = appInfo.productFilename;
            }
            const commands = {
                OutFile: `"${installerPath}"`,
                VIProductVersion: appInfo.versionInWeirdWindowsForm,
                VIAddVersionKey: _this4.computeVersionKey(),
                Unicode: _this4.isUnicodeEnabled
            };
            if (iconPath != null) {
                if (isPortable) {
                    commands.Icon = `"${iconPath}"`;
                } else {
                    defines.MUI_ICON = iconPath;
                    defines.MUI_UNICON = iconPath;
                }
            }
            const packageFiles = {};
            if (USE_NSIS_BUILT_IN_COMPRESSOR && _this4.archs.size === 1) {
                defines.APP_BUILD_DIR = _this4.archs.get(_this4.archs.keys().next().value);
            } else {
                yield (_bluebirdLst2 || _load_bluebirdLst2()).default.map(_this4.archs.keys(), (() => {
                    var _ref = (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* (arch) {
                        const fileInfo = yield _this4.packageHelper.packArch(arch, _this4);
                        const file = fileInfo.file;
                        const defineKey = arch === (_builderUtil || _load_builderUtil()).Arch.x64 ? "APP_64" : "APP_32";
                        defines[defineKey] = file;
                        defines[`${defineKey}_NAME`] = _path.basename(file);
                        // nsis expect a hexadecimal string
                        defines[`${defineKey}_HASH`] = Buffer.from(fileInfo.sha512, "base64").toString("hex").toUpperCase();
                        if (fileInfo.blockMapData != null) {
                            const blockMapFile = yield packager.getTempFile(".yml");
                            yield (0, (_fsExtraP || _load_fsExtraP()).writeFile)(blockMapFile, fileInfo.blockMapData);
                            defines[`${defineKey}_BLOCK_MAP_FILE`] = blockMapFile;
                            delete fileInfo.blockMapData;
                        }
                        if (_this4.isWebInstaller) {
                            packager.dispatchArtifactCreated(file, _this4, arch);
                            packageFiles[(_builderUtil || _load_builderUtil()).Arch[arch]] = fileInfo;
                        }
                    });

                    return function (_x) {
                        return _ref.apply(this, arguments);
                    };
                })());
            }
            _this4.configureDefinesForAllTypeOfInstaller(defines);
            if (isPortable) {
                defines.REQUEST_EXECUTION_LEVEL = options.requestExecutionLevel || "user";
            } else {
                yield _this4.configureDefines(oneClick, defines);
            }
            if (packager.config.compression === "store") {
                commands.SetCompress = "off";
            } else {
                // investigate https://github.com/electron-userland/electron-builder/issues/2134#issuecomment-333286194
                // difference - 33.540 vs 33.601, only 61 KB
                commands.SetCompressor = "zlib";
                if (!_this4.isWebInstaller) {
                    defines.COMPRESS = "auto";
                }
            }
            debug(defines);
            debug(commands);
            if (packager.packagerOptions.effectiveOptionComputed != null && (yield packager.packagerOptions.effectiveOptionComputed([defines, commands]))) {
                return;
            }
            const sharedHeader = yield _this4.computeCommonInstallerScriptHeader();
            const script = isPortable ? yield (0, (_fsExtraP || _load_fsExtraP()).readFile)(_path.join((_nsisUtil || _load_nsisUtil()).nsisTemplatesDir, "portable.nsi"), "utf8") : yield _this4.computeScriptAndSignUninstaller(defines, commands, installerPath, sharedHeader);
            yield _this4.executeMakensis(defines, commands, sharedHeader + (yield _this4.computeFinalScript(script, true)));
            yield (_bluebirdLst2 || _load_bluebirdLst2()).default.all([packager.sign(installerPath), defines.UNINSTALLER_OUT_FILE == null ? (_bluebirdLst2 || _load_bluebirdLst2()).default.resolve() : (0, (_fsExtraP || _load_fsExtraP()).unlink)(defines.UNINSTALLER_OUT_FILE)]);
            packager.info.dispatchArtifactCreated({
                file: installerPath,
                packageFiles,
                target: _this4,
                packager,
                arch: _this4.archs.size === 1 ? _this4.archs.keys().next().value : null,
                safeArtifactName: _this4.generateGitHubInstallerName(),
                isWriteUpdateInfo: !_this4.isPortable
            });
        })();
    }
    generateGitHubInstallerName() {
        const appInfo = this.packager.appInfo;
        const classifier = appInfo.name.toLowerCase() === appInfo.name ? "setup-" : "Setup-";
        return `${appInfo.name}-${this.isPortable ? "" : classifier}${appInfo.version}.exe`;
    }
    get isUnicodeEnabled() {
        return this.options.unicode !== false;
    }
    get isWebInstaller() {
        return false;
    }
    computeScriptAndSignUninstaller(defines, commands, installerPath, sharedHeader) {
        var _this5 = this;

        return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            const packager = _this5.packager;
            const customScriptPath = yield packager.getResource(_this5.options.script, "installer.nsi");
            const script = yield (0, (_fsExtraP || _load_fsExtraP()).readFile)(customScriptPath || _path.join((_nsisUtil || _load_nsisUtil()).nsisTemplatesDir, "installer.nsi"), "utf8");
            if (customScriptPath != null) {
                (0, (_builderUtil || _load_builderUtil()).log)("Custom NSIS script is used - uninstaller is not signed by electron-builder");
                return script;
            }
            // https://github.com/electron-userland/electron-builder/issues/2103
            // it is more safe and reliable to write uninstaller to our out dir
            const uninstallerPath = _path.join(_this5.outDir, `.__uninstaller-${_this5.name}-${process.pid.toString(16)}-${Date.now().toString(16)}.exe`);
            const isWin = process.platform === "win32";
            defines.BUILD_UNINSTALLER = null;
            defines.UNINSTALLER_OUT_FILE = isWin ? uninstallerPath : _path.win32.join("Z:", uninstallerPath);
            yield _this5.executeMakensis(defines, commands, sharedHeader + (yield _this5.computeFinalScript(script, false)));
            yield (0, (_builderUtil || _load_builderUtil()).execWine)(installerPath, []);
            yield packager.sign(uninstallerPath, "  Signing NSIS uninstaller");
            delete defines.BUILD_UNINSTALLER;
            // platform-specific path, not wine
            defines.UNINSTALLER_OUT_FILE = uninstallerPath;
            return script;
        })();
    }
    computeVersionKey() {
        // Error: invalid VIProductVersion format, should be X.X.X.X
        // so, we must strip beta
        const localeId = this.options.language || "1033";
        const appInfo = this.packager.appInfo;
        const versionKey = [`/LANG=${localeId} ProductName "${appInfo.productName}"`, `/LANG=${localeId} ProductVersion "${appInfo.version}"`, `/LANG=${localeId} LegalCopyright "${appInfo.copyright}"`, `/LANG=${localeId} FileDescription "${appInfo.description}"`, `/LANG=${localeId} FileVersion "${appInfo.buildVersion}"`];
        (0, (_builderUtil || _load_builderUtil()).use)(this.packager.platformSpecificBuildOptions.legalTrademarks, it => versionKey.push(`/LANG=${localeId} LegalTrademarks "${it}"`));
        (0, (_builderUtil || _load_builderUtil()).use)(appInfo.companyName, it => versionKey.push(`/LANG=${localeId} CompanyName "${it}"`));
        return versionKey;
    }
    configureDefines(oneClick, defines) {
        const packager = this.packager;
        const options = this.options;
        const asyncTaskManager = new (_builderUtil || _load_builderUtil()).AsyncTaskManager(packager.info.cancellationToken);
        if (oneClick) {
            defines.ONE_CLICK = null;
            if (options.runAfterFinish !== false) {
                defines.RUN_AFTER_FINISH = null;
            }
            asyncTaskManager.add((0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
                const installerHeaderIcon = yield packager.getResource(options.installerHeaderIcon, "installerHeaderIcon.ico");
                if (installerHeaderIcon != null) {
                    defines.HEADER_ICO = installerHeaderIcon;
                }
            }));
        } else {
            asyncTaskManager.add((0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
                const installerHeader = yield packager.getResource(options.installerHeader, "installerHeader.bmp");
                if (installerHeader != null) {
                    defines.MUI_HEADERIMAGE = null;
                    defines.MUI_HEADERIMAGE_RIGHT = null;
                    defines.MUI_HEADERIMAGE_BITMAP = installerHeader;
                }
            }));
            asyncTaskManager.add((0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
                const bitmap = (yield packager.getResource(options.installerSidebar, "installerSidebar.bmp")) || "${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp";
                defines.MUI_WELCOMEFINISHPAGE_BITMAP = bitmap;
                defines.MUI_UNWELCOMEFINISHPAGE_BITMAP = (yield packager.getResource(options.uninstallerSidebar, "uninstallerSidebar.bmp")) || bitmap;
            }));
            if (options.allowElevation !== false) {
                defines.MULTIUSER_INSTALLMODE_ALLOW_ELEVATION = null;
            }
        }
        if (options.perMachine === true) {
            defines.INSTALL_MODE_PER_ALL_USERS = null;
        }
        if (!oneClick || options.perMachine === true) {
            defines.INSTALL_MODE_PER_ALL_USERS_REQUIRED = null;
        }
        if (options.allowToChangeInstallationDirectory) {
            if (oneClick) {
                throw new Error("allowToChangeInstallationDirectory makes sense only for assisted installer (please set oneClick to false)");
            }
            defines.allowToChangeInstallationDirectory = null;
        }
        if (options.menuCategory != null && options.menuCategory !== false) {
            let menu;
            if (options.menuCategory === true) {
                const companyName = packager.appInfo.companyName;
                if (companyName == null) {
                    throw new Error(`Please specify "author" in the application package.json — it is required because "menuCategory" is set to true.`);
                }
                menu = (0, (_sanitizeFilename || _load_sanitizeFilename()).default)(companyName);
            } else {
                menu = options.menuCategory.split(/[\/\\]/).map(it => (0, (_sanitizeFilename || _load_sanitizeFilename()).default)(it)).join("\\");
            }
            if (!(0, (_builderUtil || _load_builderUtil()).isEmptyOrSpaces)(menu)) {
                defines.MENU_FILENAME = menu;
            }
        }
        defines.SHORTCUT_NAME = (0, (_builderUtil || _load_builderUtil()).isEmptyOrSpaces)(options.shortcutName) ? defines.PRODUCT_FILENAME : packager.expandMacro(options.shortcutName);
        if (options.deleteAppDataOnUninstall) {
            defines.DELETE_APP_DATA_ON_UNINSTALL = null;
        }
        asyncTaskManager.add((0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            const uninstallerIcon = yield packager.getResource(options.uninstallerIcon, "uninstallerIcon.ico");
            if (uninstallerIcon != null) {
                // we don't need to copy MUI_UNICON (defaults to app icon), so, we have 2 defines
                defines.UNINSTALLER_ICON = uninstallerIcon;
                defines.MUI_UNICON = uninstallerIcon;
            }
        }));
        defines.UNINSTALL_DISPLAY_NAME = packager.expandMacro(options.uninstallDisplayName || "${productName} ${version}", null, {}, false);
        if (options.createDesktopShortcut === false) {
            defines.DO_NOT_CREATE_DESKTOP_SHORTCUT = null;
        }
        if (options.displayLanguageSelector === true) {
            defines.DISPLAY_LANG_SELECTOR = null;
        }
        return asyncTaskManager.awaitTasks();
    }
    configureDefinesForAllTypeOfInstaller(defines) {
        const options = this.options;
        if (!this.isWebInstaller && defines.APP_BUILD_DIR == null) {
            if (options.useZip) {
                defines.ZIP_COMPRESSION = null;
            }
            defines.COMPRESSION_METHOD = options.useZip ? "zip" : "7z";
        }
    }
    executeMakensis(defines, commands, script) {
        var _this6 = this;

        return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            const args = _this6.options.warningsAsErrors === false ? [] : ["-WX"];
            for (const name of Object.keys(defines)) {
                const value = defines[name];
                if (value == null) {
                    args.push(`-D${name}`);
                } else {
                    args.push(`-D${name}=${value}`);
                }
            }
            for (const name of Object.keys(commands)) {
                const value = commands[name];
                if (Array.isArray(value)) {
                    for (const c of value) {
                        args.push(`-X${name} ${c}`);
                    }
                } else {
                    args.push(`-X${name} ${value}`);
                }
            }
            args.push("-");
            if (_this6.packager.debugLogger.enabled) {
                _this6.packager.debugLogger.add("nsis.script", script);
            }
            const nsisPath = yield (_nsisUtil || _load_nsisUtil()).NSIS_PATH.value;
            const command = _path.join(nsisPath, process.platform === "darwin" ? "mac" : process.platform === "win32" ? "Bin" : "linux", process.platform === "win32" ? "makensis.exe" : "makensis");
            yield (0, (_builderUtil || _load_builderUtil()).spawnAndWrite)(command, args, script, {
                // we use NSIS_CONFIG_CONST_DATA_PATH=no to build makensis on Linux, but in any case it doesn't use stubs as MacOS/Windows version, so, we explicitly set NSISDIR
                // set LC_CTYPE to avoid crash https://github.com/electron-userland/electron-builder/issues/503 Even "en_DE.UTF-8" leads to error.
                env: Object.assign({}, process.env, { NSISDIR: nsisPath, LC_CTYPE: "en_US.UTF-8", LANG: "en_US.UTF-8" }),
                cwd: (_nsisUtil || _load_nsisUtil()).nsisTemplatesDir
            }, debug.enabled);
        })();
    }
    computeCommonInstallerScriptHeader() {
        var _this7 = this;

        return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            const packager = _this7.packager;
            const options = _this7.options;
            const scriptGenerator = new (_nsisScriptGenerator || _load_nsisScriptGenerator()).NsisScriptGenerator();
            const langConfigurator = new (_nsisLang || _load_nsisLang()).LangConfigurator(options);
            scriptGenerator.include(_path.join((_nsisUtil || _load_nsisUtil()).nsisTemplatesDir, "include", "StdUtils.nsh"));
            const includeDir = _path.join((_nsisUtil || _load_nsisUtil()).nsisTemplatesDir, "include");
            scriptGenerator.addIncludeDir(includeDir);
            scriptGenerator.flags(["updated", "force-run", "keep-shortcuts", "no-desktop-shortcut", "delete-app-data"]);
            (0, (_nsisLang || _load_nsisLang()).createAddLangsMacro)(scriptGenerator, langConfigurator);
            const taskManager = new (_builderUtil || _load_builderUtil()).AsyncTaskManager(packager.info.cancellationToken);
            const pluginArch = _this7.isUnicodeEnabled ? "x86-unicode" : "x86-ansi";
            taskManager.add((0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
                scriptGenerator.addPluginDir(pluginArch, _path.join((yield nsisResourcePathPromise.value), "plugins", pluginArch));
            }));
            taskManager.add((0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
                const userPluginDir = _path.join(packager.buildResourcesDir, pluginArch);
                const stat = yield (0, (_fs || _load_fs()).statOrNull)(userPluginDir);
                if (stat != null && stat.isDirectory()) {
                    scriptGenerator.addPluginDir(pluginArch, userPluginDir);
                }
            }));
            taskManager.addTask((0, (_nsisLang || _load_nsisLang()).addCustomMessageFileInclude)("messages.yml", packager, scriptGenerator, langConfigurator));
            if (!_this7.isPortable) {
                if (options.oneClick === false) {
                    taskManager.addTask((0, (_nsisLang || _load_nsisLang()).addCustomMessageFileInclude)("assistedMessages.yml", packager, scriptGenerator, langConfigurator));
                }
                taskManager.add((0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
                    const customInclude = yield packager.getResource(_this7.options.include, "installer.nsh");
                    if (customInclude != null) {
                        scriptGenerator.addIncludeDir(packager.buildResourcesDir);
                        scriptGenerator.include(customInclude);
                    }
                }));
            }
            yield taskManager.awaitTasks();
            return scriptGenerator.build();
        })();
    }
    computeFinalScript(originalScript, isInstaller) {
        var _this8 = this;

        return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
            const packager = _this8.packager;
            const options = _this8.options;
            const langConfigurator = new (_nsisLang || _load_nsisLang()).LangConfigurator(options);
            const scriptGenerator = new (_nsisScriptGenerator || _load_nsisScriptGenerator()).NsisScriptGenerator();
            const taskManager = new (_builderUtil || _load_builderUtil()).AsyncTaskManager(packager.info.cancellationToken);
            if (isInstaller) {
                // http://stackoverflow.com/questions/997456/nsis-license-file-based-on-language-selection
                taskManager.add(function () {
                    return (0, (_nsisLicense || _load_nsisLicense()).computeLicensePage)(packager, options, scriptGenerator, langConfigurator.langs);
                });
            }
            yield taskManager.awaitTasks();
            if (_this8.isPortable) {
                return scriptGenerator.build() + originalScript;
            }
            const fileAssociations = packager.fileAssociations;
            if (fileAssociations.length !== 0) {
                if (options.perMachine !== true) {
                    // https://github.com/electron-userland/electron-builder/issues/772
                    throw new Error(`Please set perMachine to true — file associations works on Windows only if installed for all users`);
                }
                scriptGenerator.include(_path.join(_path.join((_nsisUtil || _load_nsisUtil()).nsisTemplatesDir, "include"), "FileAssociation.nsh"));
                if (isInstaller) {
                    const registerFileAssociationsScript = new (_nsisScriptGenerator || _load_nsisScriptGenerator()).NsisScriptGenerator();
                    for (const item of fileAssociations) {
                        const extensions = (0, (_builderUtil || _load_builderUtil()).asArray)(item.ext).map((_platformPackager || _load_platformPackager()).normalizeExt);
                        for (const ext of extensions) {
                            const customIcon = yield packager.getResource((0, (_builderUtil || _load_builderUtil()).getPlatformIconFileName)(item.icon, false), `${extensions[0]}.ico`);
                            let installedIconPath = "$appExe,0";
                            if (customIcon != null) {
                                installedIconPath = `$INSTDIR\\resources\\${_path.basename(customIcon)}`;
                                registerFileAssociationsScript.file(installedIconPath, customIcon);
                            }
                            const icon = `"${installedIconPath}"`;
                            const commandText = `"Open with ${packager.appInfo.productName}"`;
                            const command = '"$appExe $\\"%1$\\""';
                            registerFileAssociationsScript.insertMacro("APP_ASSOCIATE", `"${ext}" "${item.name || ext}" "${item.description || ""}" ${icon} ${commandText} ${command}`);
                        }
                    }
                    scriptGenerator.macro("registerFileAssociations", registerFileAssociationsScript);
                } else {
                    const unregisterFileAssociationsScript = new (_nsisScriptGenerator || _load_nsisScriptGenerator()).NsisScriptGenerator();
                    for (const item of fileAssociations) {
                        for (const ext of (0, (_builderUtil || _load_builderUtil()).asArray)(item.ext)) {
                            unregisterFileAssociationsScript.insertMacro("APP_UNASSOCIATE", `"${(0, (_platformPackager || _load_platformPackager()).normalizeExt)(ext)}" "${item.name || ext}"`);
                        }
                    }
                    scriptGenerator.macro("unregisterFileAssociations", unregisterFileAssociationsScript);
                }
            }
            return scriptGenerator.build() + originalScript;
        })();
    }
}
exports.NsisTarget = NsisTarget; //# sourceMappingURL=nsis.js.map


text:
<?php

namespace Dan\Irc\Packets;

class Packet002 extends Packet
{
    /**
     * @param array $from
     * @param array $data
     */
    public function handle(array $from, array $data)
    {
        if (!config('dan.debug')) {
            console()->message("[<magenta>{$from[0]}</magenta>] {$data[1]}");
        }
    }
}


text:
<?php

require_once 'IDS/Caching/Interface.php';

/**
 * File caching wrapper
 *
 * This class inhabits functionality to get and set cache via a static flatfile.
 *
 * @category  Security
 * @package   PHPIDS
 * @author    Christian Matthies <ch0012@gmail.com>
 * @author    Mario Heiderich <mario.heiderich@gmail.com>
 * @author    Lars Strojny <lars@strojny.net>
 * @copyright 2007 The PHPIDS Group
 * @license   http://www.gnu.org/licenses/lgpl.html LGPL
 * @version   Release: $Id:File.php 517 2007-09-15 15:04:13Z mario $
 * @link      http://php-ids.org/
 * @since     Version 0.4
 */
class IDS_Caching_File implements IDS_Caching_Interface
{

    /**
     * Caching type
     *
     * @var string
     */
    private $type = null;

    /**
     * Cache configuration
     *
     * @var array
     */
    private $config = null;

    /**
     * Path to cache file
     *
     * @var string
     */
    private $path = null;

    /**
     * Holds an instance of this class
     *
     * @var object
     */
    private static $cachingInstance = null;

    /**
     * Constructor
     *
     * @param string $type caching type
     * @param array  $init the IDS_Init object
     *
     * @return void
     */
    public function __construct($type, $init)
    {

        $this->type   = $type;
        $this->config = $init->config['Caching'];
        $this->path   = $init->getBasePath() . $this->config['path'];

        if (file_exists($this->path) && !is_writable($this->path)) {
            throw new Exception('Make sure all files in ' .
            htmlspecialchars($this->path, ENT_QUOTES, 'UTF-8') .
                'are writeable!');
        }
    }

    /**
     * Returns an instance of this class
     *
     * @param string $type caching type
     * @param array  $init the IDS_Init object
     *
     * @return object $this
     */
    public static function getInstance($type, $init)
    {
        if (!self::$cachingInstance) {
            self::$cachingInstance = new IDS_Caching_File($type, $init);
        }

        return self::$cachingInstance;
    }

    /**
     * Writes cache data into the file
     *
     * @param array $data the cache data
     *
     * @throws Exception if cache file couldn't be created
     * @return object $this
     */
    public function setCache(array $data)
    {

        if (!is_writable(preg_replace('/[\/][^\/]+\.[^\/]++$/', null,
            $this->path))) {
            throw new Exception('Temp directory ' .
            htmlspecialchars($this->path, ENT_QUOTES, 'UTF-8') .
            ' seems not writable');
        }

        if ((!file_exists($this->path) || (time()-filectime($this->path)) >
            $this->config['expiration_time'])) {
            $handle = @fopen($this->path, 'w+');

            if (!$handle) {
                throw new Exception("Cache file couldn't be created");
            }

            fwrite($handle, serialize($data));
            fclose($handle);
        }

        return $this;
    }

    /**
     * Returns the cached data
     *
     * Note that this method returns false if either type or file cache is
     * not set
     *
     * @return mixed cache data or false
     */
    public function getCache()
    {

        // make sure filters are parsed again if cache expired
        if (file_exists($this->path) && (time()-filectime($this->path)) <
            $this->config['expiration_time']) {
            $data = unserialize(file_get_contents($this->path));
              return $data;
        }

        return false;
    }
}

/**
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: sw=4 ts=4 expandtab
 */


text:
package com.cloud.api.command.user.resource;

import com.cloud.api.APICommand;
import com.cloud.api.APICommandGroup;
import com.cloud.api.ApiConstants;
import com.cloud.api.ApiErrorCode;
import com.cloud.api.BaseCmd;
import com.cloud.api.Parameter;
import com.cloud.api.ServerApiException;
import com.cloud.api.response.CloudIdentifierResponse;
import com.cloud.api.response.UserResponse;
import com.cloud.legacymodel.user.Account;

import java.util.ArrayList;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@APICommand(name = "getCloudIdentifier", group = APICommandGroup.SystemService, description = "Retrieves a cloud identifier.", responseObject = CloudIdentifierResponse.class,
        requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
public class GetCloudIdentifierCmd extends BaseCmd {
    public static final Logger s_logger = LoggerFactory.getLogger(GetCloudIdentifierCmd.class.getName());
    private static final String s_name = "getcloudidentifierresponse";

    /////////////////////////////////////////////////////
    //////////////// API parameters /////////////////////
    /////////////////////////////////////////////////////

    @Parameter(name = ApiConstants.USER_ID,
            type = CommandType.UUID,
            entityType = UserResponse.class,
            required = true,
            description = "the user ID for the cloud identifier")
    private Long userid;

    /////////////////////////////////////////////////////
    /////////////////// Accessors ///////////////////////
    /////////////////////////////////////////////////////

    public Long getUserId() {
        return userid;
    }

    /////////////////////////////////////////////////////
    /////////////// API Implementation///////////////////
    /////////////////////////////////////////////////////

    @Override
    public void execute() {
        final ArrayList<String> result = _mgr.getCloudIdentifierResponse(userid);
        final CloudIdentifierResponse response = new CloudIdentifierResponse();
        if (result != null) {
            response.setCloudIdentifier(result.get(0));
            response.setSignature(result.get(1));
            response.setObjectName("cloudidentifier");
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to get cloud identifier");
        }
    }

    @Override
    public String getCommandName() {
        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        return Account.ACCOUNT_ID_SYSTEM;
    }
}


text:
namespace cor
{
    namespace cocos2dx_mruby_interface
    {
        struct MrubyScriptEngineItnl;

        class MrubyScriptEngine;
        typedef MrubyScriptEngine* MrubyScriptEnginePtr;

        class MrubyScriptEngine : public cocos2d::ScriptEngineProtocol
        {
            std::unique_ptr<MrubyScriptEngineItnl> itnl;

            static MrubyScriptEnginePtr& ref_instance_ptr();

        public:

            MrubyScriptEngine();
            virtual ~MrubyScriptEngine();

            static MrubyScriptEnginePtr get_instance();

            mruby_interface::MrubyState& ref_mrb();
            CocosRefTable& ref_object_table();

            virtual void removeScriptObjectByObject(cocos2d::Ref* obj);
            virtual void removeScriptHandler(int handler);
            virtual int reallocateScriptHandler(int handler);
            virtual int executeString(const char* codes);
            virtual int executeScriptFile(const char* filename);
            virtual int executeGlobalFunction(const char* functionName);
            virtual int sendEvent(cocos2d::ScriptEvent* evt);
            virtual bool handleAssert(const char *msg);
            virtual bool parseConfig(ConfigType type, const std::string& str);
        };
    }
}

#endif