text:
package model

// Details of the transaction to capture.
type CardPaymentTransactionDetails30 struct {

	// Currency associated with the transaction.
	Currency *CurrencyCode `xml:"Ccy,omitempty"`

	// Total amount of the transaction.
	TotalAmount *ImpliedCurrencyAndAmount `xml:"TtlAmt"`

	// Qualifies the amount associated with the transaction.
	AmountQualifier *TypeOfAmount1Code `xml:"AmtQlfr,omitempty"`

	// Detailed amounts associated with the total amount of transaction.
	DetailedAmount *DetailedAmount15 `xml:"DtldAmt,omitempty"`

	// Amount requested to be authorised.
	RequestedAmount *ImpliedCurrencyAndAmount `xml:"ReqdAmt,omitempty"`

	// Amount authorised for the transaction.
	AuthorisedAmount *ImpliedCurrencyAndAmount `xml:"AuthrsdAmt,omitempty"`

	// Amount of the transaction that will be invoiced to the cardholder.
	InvoiceAmount *ImpliedCurrencyAndAmount `xml:"InvcAmt,omitempty"`

	// Transaction authorisation deadline to complete the related payment.
	ValidityDate *ISODate `xml:"VldtyDt,omitempty"`

	// Transaction category level on an unattended POI (Point Of Interaction).
	UnattendedLevelCategory *Max35NumericText `xml:"UattnddLvlCtgy,omitempty"`

	// Type of cardholder account used for the transaction.
	AccountType *CardAccountType3Code `xml:"AcctTp,omitempty"`

	// Result of the currency conversion proposed to the cardholder.
	CurrencyConversionResult *CurrencyConversion8 `xml:"CcyConvsRslt,omitempty"`

	// Data related to a financial loan (instalment) or to a recurring transaction.
	Instalment *RecurringTransaction2 `xml:"Instlmt,omitempty"`

	// Payment transaction with an aggregated amount.
	AggregationTransaction *AggregationTransaction2 `xml:"AggtnTx,omitempty"`

	// Identification of the product codes that are purchased.
	ProductCodeSetIdentification *Max10Text `xml:"PdctCdSetId,omitempty"`

	// Item purchased with the transaction.
	SaleItem []*Product3 `xml:"SaleItm,omitempty"`

	// Location of the delivery, for instance pump number or parking bay.
	DeliveryLocation *Max10Text `xml:"DlvryLctn,omitempty"`

	// Detailed invoice data.
	CardPaymentInvoice *CardPaymentInvoice2 `xml:"CardPmtInvc,omitempty"`

	// Data related to an integrated circuit card application.
	ICCRelatedData *Max10000Binary `xml:"ICCRltdData,omitempty"`
}

func (c *CardPaymentTransactionDetails30) SetCurrency(value string) {
	c.Currency = (*CurrencyCode)(&value)
}

func (c *CardPaymentTransactionDetails30) SetTotalAmount(value, currency string) {
	c.TotalAmount = NewImpliedCurrencyAndAmount(value, currency)
}

func (c *CardPaymentTransactionDetails30) SetAmountQualifier(value string) {
	c.AmountQualifier = (*TypeOfAmount1Code)(&value)
}

func (c *CardPaymentTransactionDetails30) AddDetailedAmount() *DetailedAmount15 {
	c.DetailedAmount = new(DetailedAmount15)
	return c.DetailedAmount
}

func (c *CardPaymentTransactionDetails30) SetRequestedAmount(value, currency string) {
	c.RequestedAmount = NewImpliedCurrencyAndAmount(value, currency)
}

func (c *CardPaymentTransactionDetails30) SetAuthorisedAmount(value, currency string) {
	c.AuthorisedAmount = NewImpliedCurrencyAndAmount(value, currency)
}

func (c *CardPaymentTransactionDetails30) SetInvoiceAmount(value, currency string) {
	c.InvoiceAmount = NewImpliedCurrencyAndAmount(value, currency)
}

func (c *CardPaymentTransactionDetails30) SetValidityDate(value string) {
	c.ValidityDate = (*ISODate)(&value)
}

func (c *CardPaymentTransactionDetails30) SetUnattendedLevelCategory(value string) {
	c.UnattendedLevelCategory = (*Max35NumericText)(&value)
}

func (c *CardPaymentTransactionDetails30) SetAccountType(value string) {
	c.AccountType = (*CardAccountType3Code)(&value)
}

func (c *CardPaymentTransactionDetails30) AddCurrencyConversionResult() *CurrencyConversion8 {
	c.CurrencyConversionResult = new(CurrencyConversion8)
	return c.CurrencyConversionResult
}

func (c *CardPaymentTransactionDetails30) AddInstalment() *RecurringTransaction2 {
	c.Instalment = new(RecurringTransaction2)
	return c.Instalment
}

func (c *CardPaymentTransactionDetails30) AddAggregationTransaction() *AggregationTransaction2 {
	c.AggregationTransaction = new(AggregationTransaction2)
	return c.AggregationTransaction
}

func (c *CardPaymentTransactionDetails30) SetProductCodeSetIdentification(value string) {
	c.ProductCodeSetIdentification = (*Max10Text)(&value)
}

func (c *CardPaymentTransactionDetails30) AddSaleItem() *Product3 {
	newValue := new(Product3)
	c.SaleItem = append(c.SaleItem, newValue)
	return newValue
}

func (c *CardPaymentTransactionDetails30) SetDeliveryLocation(value string) {
	c.DeliveryLocation = (*Max10Text)(&value)
}

func (c *CardPaymentTransactionDetails30) AddCardPaymentInvoice() *CardPaymentInvoice2 {
	c.CardPaymentInvoice = new(CardPaymentInvoice2)
	return c.CardPaymentInvoice
}

func (c *CardPaymentTransactionDetails30) SetICCRelatedData(value string) {
	c.ICCRelatedData = (*Max10000Binary)(&value)
}


text:
@inbook{2012adm..book..163L,
 abstract = {Classification of periodic variable light curves is important for
scientific knowledge discovery and efficient use of telescopic
resources for source follow-up. In practice, labeled light
curves from catalogs with hundreds of flux measurements (the
training set) may be used to classify curves from ongoing
surveys with tens of flux measurements (the test set).
Statistical classifiers generally assume that the probability of
class given light curve features is the same for training and
test sets. This assumption is unlikely to hold when the number
of flux measurements per light curve varies widely between the
two sets. We employ two methods to correct the
problem—noisification and denoisification. With
noisification we alter the training set to mimic the
distribution of the test set and then construct a classifier on
these altered data. With denoisification we construct a
classifier on the well-sampled curves in the training set and
probabilistically infer what poorly sampled curves in the test
set would look like if we continued obtaining flux measurements.
On periodic variable sources from a simulated data set and the
OGLE survey, both of these methods outperform making no
adjustments for training-test set differences. <P />},
 adsnote = {Provided by the SAO/NASA Astrophysics Data System},
 adsurl = {https://ui.adsabs.harvard.edu/abs/2012adm..book..163L},
 author = {Long, James P. and Bloom, Joshua S. and Karoui, Noureddine El and
Rice, John and Richards, Joseph W.},
 booktitle = {Astrostatistics and Data Mining, Springer Series in Astrostatistics, Volume 2. ISBN 978-1-4614-3322-4. Springer Science+Business Media New York, 2012, p. 163},
 doi = {10.1007/978-1-4614-3323-1_16},
 editor = {Sarro, Luis Manuel and Eyer, Laurent and O'Mullane, William and
De Ridder, Joris},
 keywords = {Physics},
 pages = {163},
 title = {Classification of Poorly Time Sampled Light Curves of Periodic Variable Stars},
 volume = {2},
 year = {2012}
}

license: MIT

repository: profjsb/my-content

license_type: permissive

repo_name: profjsb/my-content

branch_name: refs/heads/master

gha_license_id: MIT

gha_language: TeX

extension: bib


text:
@InProceedings{seeger11a,
  title = {Fast Convergent Algorithms for Expectation Propagation Approximate Bayesian Inference},
  author = {Matthias Seeger and Hannes Nickisch},
  pages = {652--660},
  abstract = {We propose a novel algorithm to solve the expectation propagation relaxation of Bayesian inference for continuous-variable graphical models. In contrast to most previous algorithms, our method is provably convergent. By marrying convergent EP ideas from (Opper&Winther, 2005) with covariance decoupling techniques (Wipf&Nagarajan, 2008; Nickisch&Seeger, 2009), it runs at least an order of magnitude faster than the most common EP solver.

[pdf]},
  pdf = {http://jmlr.org/proceedings/papers/v15/seeger11a/seeger11a.pdf},
}

repository: mreid/papersite

repo_name: mreid/papersite


text:
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6)
find_package(PythonInterp 3 REQUIRED)

set(CONVERTER "${LIBTRN}/tools/elf2nxo.py")

function(add_nro_target target)
    get_filename_component(target_we ${target} NAME_WE)
    if ((NOT (${ARGC} GREATER 1 AND "${ARGV1}" STREQUAL "NO_HDR")) OR (${ARGC} GREATER 3))
        if (${ARGC} GREATER 3)
            set(APP_TITLE ${ARGV1})
            set(APP_AUTHOR ${ARGV2})
            set(APP_VERSION ${ARGV3})
        endif ()
        if (${ARGC} EQUAL 5)
            set(APP_ICON ${ARGV4})
        endif ()
        if (NOT APP_TITLE)
            set(APP_TITLE ${target})
        endif ()
        if (NOT APP_AUTHOR)
            set(APP_AUTHOR "Unspecified Author")
        endif ()
        if (NOT APP_VERSION)
            set(APP_VERSION "1.0")
        endif ()
        if (NOT APP_ICON)
            if (EXISTS ${target}.png)
                set(APP_ICON ${target}.png)
            elseif (EXISTS icon.png)
                set(APP_ICON icon.png)
            else ()
                message(FATAL_ERROR "No icon found ! Please use NO_SMDH or provide some icon.")
            endif ()
        endif ()
        if (CMAKE_RUNTIME_OUTPUT_DIRECTORY)
            add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.nro
                    COMMAND ${PYTHON_EXECUTABLE} ${CONVERTER} -n ${APP_TITLE} -d ${APP_AUTHOR} -v ${APP_VERSION} -i ${APP_ICON} $<TARGET_FILE:${target}> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.nro nro
                    DEPENDS ${target} ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nacp
                    VERBATIM
                    )
        else ()
            add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nro
                    COMMAND ${PYTHON_EXECUTABLE} ${CONVERTER} -n ${APP_TITLE} -d ${APP_AUTHOR} -v ${APP_VERSION} -i ${APP_ICON} $<TARGET_FILE:${target}> ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nro nro
                    DEPENDS ${target} ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nacp
                    VERBATIM
                    )
        endif ()
    else ()
        message(STATUS "No header will be generated")
        if (CMAKE_RUNTIME_OUTPUT_DIRECTORY)
            add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.nro
                    COMMAND ${PYTHON_EXECUTABLE} ${CONVERTER} $<TARGET_FILE:${target}> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.nro nro
                    DEPENDS ${target}
                    VERBATIM
                    )
        else ()
            add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nro
                    COMMAND ${PYTHON_EXECUTABLE} ${CONVERTER} $<TARGET_FILE:${target}> ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nro nro
                    DEPENDS ${target}
                    VERBATIM
                    )
        endif ()

    endif ()
    if (CMAKE_RUNTIME_OUTPUT_DIRECTORY)
        add_custom_target(${target_we}_nro ALL SOURCES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target_we}.nro)

    else ()
        add_custom_target(${target_we}_nro ALL SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${target_we}.nro)
    endif ()
endfunction()

repository: libAthena/athena

repo_name: libAthena/athena

extension: cmake


text:
'use strict'

const net = require('net')
const assert = require('assert')
const EventEmitter = require('events')
const { payload: payloadUtils } = require('./utils')
const tcpEmitter = require('../src/tcp-emitter')

describe('TCP Emitter Tests:', function () {
  describe('Scenario: Closing the connection of a TCP Emitter client that is subscribed to multiple events:', function () {
    describe('Given a TCP Emitter instance,', function () {
      /**
       * TCP Emitter instance.
       * @type {Object}
       */
      let tcpEmitterInst = null

      beforeEach(function () {
        // Create and initialize the TCP Emitter instance which the TCP Emitter
        // clients will be connecting to.
        tcpEmitterInst = Object.assign(Object.create(new EventEmitter()),
          tcpEmitter)
        tcpEmitterInst.init()
      })

      describe('with multiple connected TCP Emitter clients,', function () {
        /**
         * TCP Emitter client which will be disconnected.
         * @type {net.Socket}
         */
        let clientOne = null

        /**
         * TCP Emitter client which will represent another client.
         * @type {net.Socket}
         */
        let clientTwo = null

        beforeEach(function () {
          // Create and setup the TCP Emitter clients to work with TCP Emitter
          // server.
          clientOne = new net.Socket()
          clientTwo = new net.Socket()

          const connectionListener = tcpEmitterInst.handleSocket({})

          connectionListener(clientOne)
          connectionListener(clientTwo)
        })

        describe('that are subscribed to multiple events,', function () {
          /**
           * One of the events which the TCP Emitter clients will be listening
           * to.
           * @type {string}
           */
          let eventOne = null

          /**
           * One of the events which the TCP Emitter clients will be listening
           * to.
           * @type {string}
           */
          let eventTwo = null

          beforeEach(function () {
            eventOne = 'event-one-name'
            eventTwo = 'event-two-name'

            // Subscribe the TCP Emitter clients to the events.
            clientOne.emit('data',
              payloadUtils.createSubscribe({ event: eventOne }))
            clientOne.emit('data',
              payloadUtils.createSubscribe({ event: eventTwo }))
            clientTwo.emit('data',
              payloadUtils.createSubscribe({ event: eventOne }))
            clientTwo.emit('data',
              payloadUtils.createSubscribe({ event: eventTwo }))
          })

          describe('when closing the connection of a TCP Emitter client:', function () {
            beforeEach(function () {
              // Close one of the TCP Emitter clients.
              clientOne.emit('close')
            })

            it('should unsubscribe the disconnected TCP Emitter client from all the events it was subscribed to', function () {
              // Assert that there is only one listener for all of the events
              // that the TCP Emitter clients subscribed for.
              assert.strictEqual(
                tcpEmitterInst.subscriptions[eventOne].length, 1)
              assert.strictEqual(
                tcpEmitterInst.subscriptions[eventTwo].length, 1)

              // Assert that the listener for both of the events is the TCP
              // Emitter client that was not disconnected.
              assert.ok(clientTwo.isPrototypeOf(
                tcpEmitterInst.subscriptions[eventOne][0]))
              assert.ok(clientTwo.isPrototypeOf(
                tcpEmitterInst.subscriptions[eventTwo][0]))
            })
          })
        })
      })
    })
  })

  describe('Scenario: Subscribing multiple times to same event:', function () {
    describe('Given a TCP Emitter instance,', function () {
      /**
       * TCP Emitter instance.
       * @type {Object}
       */
      let tcpEmitterInst = null

      beforeEach(function () {
        // Create and initialize the TCP Emitter instance which the TCP Emitter
        // clients will be connecting to.
        tcpEmitterInst = Object.assign(Object.create(new EventEmitter()),
          tcpEmitter)
        tcpEmitterInst.init()
      })

      describe('with a connected TCP Emitter client,', function () {
        /**
         * TCP Emitter client.
         * @type {net.Socket}
         */
        let clientInst = null

        beforeEach(function () {
          // Create and setup the TCP Emitter client to work with TCP Emitter
          // server.
          clientInst = new net.Socket()
          tcpEmitterInst.handleSocket({})(clientInst)
        })

        describe('that is subscribed to an event,', function () {
          /**
           * Event which the TCP Emitter cliens will be listening to.
           * @type {string}
           */
          let event = null

          beforeEach(function () {
            event = 'event-name'

            // Subscribe the TCP Emitter client to the events.
            clientInst.emit('data', payloadUtils.createSubscribe({ event }))
          })

          describe('when trying to re-subscribe to the same event', function () {
            beforeEach(function () {
              clientInst.emit('data', payloadUtils.createSubscribe({ event }))
            })

            it('should ignore the subscription', function () {
              // Assert that there is only one subscription.
              assert.strictEqual(tcpEmitterInst.subscriptions[event].length, 1)
            })
          })
        })
      })
    })
  })

  describe('Scenario: Removing the last listener for an event:', function () {
    describe('Given a TCP Emitter instance,', function () {
      /**
       * TCP Emitter instance.
       * @type {Object}
       */
      let tcpEmitterInst = null

      beforeEach(function () {
        // Create and initialize the TCP Emitter instance which the TCP Emitter
        // clients will be connecting to.
        tcpEmitterInst = Object.assign(Object.create(new EventEmitter()),
          tcpEmitter)
        tcpEmitterInst.init()
      })

      describe('with a connected TCP Emitter client,', function () {
        /**
         * TCP Emitter client.
         * @type {net.Socket}
         */
        let clientOne = null

        beforeEach(function () {
          // Create and setup the TCP Emitter client to work with TCP Emitter
          // server.
          clientOne = new net.Socket()
          tcpEmitterInst.handleSocket({})(clientOne)
        })

        describe('that is the only client subscribed to an event,', function () {
          /**
           * Event which the TCP Emitter cliens will be listening to.
           * @type {string}
           */
          let event = null

          beforeEach(function () {
            event = 'event-name'

            // Subscribe the TCP Emitter client to the events.
            clientOne.emit('data', payloadUtils.createSubscribe({ event }))
          })

          describe('when unsubscribing it from the event:', function () {
            beforeEach(function () {
              // Unsubscribe the only listener for the specified event.
              clientOne.emit('data', payloadUtils.createUnsubscribe({ event }))
            })

            it('should remove the event entry from the subscriptions list', function () {
              // Assert that the entry for the event in the TCP Emitter instance
              // subscription list has been removed.
              assert.strictEqual(tcpEmitterInst.subscriptions[event], undefined)
            })
          })
        })
      })
    })
  })
})

license: ISC

repository: tcp-emitter/server

repo_name: tcp-emitter/server

gha_license_id: ISC

gha_language: JavaScript

extension: js


text:
LICENSE = "makedev"
PR = "r1"
SECTION = "base"
DESCRIPTION = "The MAKEDEV executable is used to create \
device files, often in /dev."

SRC_URI = "${DEBIAN_MIRROR}/main/m/makedev/makedev_${PV}.orig.tar.gz"
S = "${WORKDIR}/makedev-${PV}.orig"

do_install () {
	install -d ${D}/dev ${D}${mandir}/man8
	install -m 0755 MAKEDEV ${D}/dev/MAKEDEV
	install -m 0644 MAKEDEV.man ${D}${mandir}/man8/MAKEDEV.8
}

FILES_${PN} = "/dev"

SRC_URI[md5sum] = "89c4b6b4a89f6502626783716fc7d887"
SRC_URI[sha256sum] = "8599712f2b2b3778eea344f59e1512cea284e802560317fac436585885a41dfa"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD

extension: bb


text:
SUMMARY = "Thunder packagegroup for RDK specific plugins"
DESCRIPTION = "Web Platform for Embedded Framework Packagegroup RDK specific plugins"
LICENSE = "MIT"

inherit packagegroup

PACKAGES = "packagegroup-wpeframework-rdkservices"

RDEPENDS_packagegroup-wpeframework-rdkservices = "wpeframework-rdkservices"

repository: WebPlatformForEmbedded/meta-wpe

repo_name: WebPlatformForEmbedded/meta-wpe

branch_name: refs/heads/main

gha_language: BitBake


text:
DESCRIPTION = "Abstraction library for lightweight browser development based on chromium using EGL"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

inherit pkgconfig qemu

include gn-utils.inc

CHROMIUM_VERSION = "68.0.3440.91"

FILESEXTRAPATHS_append := "${THISDIR}/files/chromium-${CHROMIUM_VERSION}:"

DEPENDS = "bison-native gperf-native glib-2.0 libffi nss freetype fontconfig nspr-native nss-native qemu-native"
RDEPENDS_${PN} = "libudev freetype nss fontconfig libffi"

S = "${WORKDIR}/git"

SRC_URI  = "git://chromium.googlesource.com/chromium/tools/depot_tools.git;protocol=https;name=depot_tools;destsuffix=depot_tools"
SRC_URI += "git://git@github.com/binouz/chromium-egl-content.git;protocol=ssh;name=sources"
SRC_URI += "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-${CHROMIUM_VERSION}.tar.xz;destsuffix=git/chromium/chromium-${CHROMIUM_VERSION};unpack=false"
SRC_URI += "file://Fix-conflicting-switches-when-compiling-for-arm.patch"
SRC_URI += "file://Fix-zlib-crc32-for-armv7-and-lower.patch"
SRC_URI += "file://v8-qemu-wrapper.patch"

SRCREV_depot_tools = "a28b14f122463a6d73c623e77c9dea4e228322dc"
SRCREV_sources = "9eba65913056bc355bae910fe98af3ff76e6d8f1"

SRC_URI[md5sum] = "fd303bd193a5a4cd82e3b0178b9184ff"
SRC_URI[sha256sum] = "1121c11ea732a3c4e090d5fb01e006516317f519f50b0defda022db31af7fcc6"

GN_EXTRA_ARGS = ' \
  custom_toolchain=\"//build/toolchain/yocto:yocto_target\" \
  v8_snapshot_toolchain=\"//build/toolchain/yocto:yocto_target\" \
  host_toolchain=\"//build/toolchain/yocto:yocto_native\" \
  target_cpu=\"arm\" \
  arm_version=7 \
  arm_tune=\"cortex-a7\" \
  arm_use_neon=true \
  use_system_zlib=true \
'

CHROMIUM_EXTRA_CFLAGS += "-Wno-error=attributes -Wno-error=class-memaccess -Wno-error=int-in-bool-context -Wno-error=packed-not-aligned -Wno-error=stringop-truncation -Wno-error=stringop-overflow -Wno-error=dangling-else"

do_unpack_extra() {
  mkdir -p ${S}/chromium/chromium-${CHROMIUM_VERSION}
  tar -xvf ${WORKDIR}/chromium-${CHROMIUM_VERSION}.tar.xz -C ${S}/chromium/
  export PATH="$PATH:${WORKDIR}/depot_tools"
  download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-gn -s ${S}/chromium/chromium-${CHROMIUM_VERSION}/buildtools/linux64/gn.sha1
  cd ${S} && oe_runmake prepare
}
addtask unpack_extra after do_unpack before do_patch

python do_write_toolchain_file () {
    """Writes a BUILD.gn file for Yocto detailing its toolchains."""
    toolchain_dir = d.expand("${S}/chromium/chromium-${CHROMIUM_VERSION}/build/toolchain/yocto")
    bb.utils.mkdirhier(toolchain_dir)
    toolchain_file = os.path.join(toolchain_dir, "BUILD.gn")
    write_toolchain_file(d, toolchain_file)
}
addtask write_toolchain_file after do_patch before do_configure

# V8's JIT infrastructure requires binaries such as mksnapshot and
# mkpeephole to be run in the host during the build. However, these
# binaries must have the same bit-width as the target (e.g. a x86_64
# host targeting ARMv6 needs to produce a 32-bit binary). Instead of
# depending on a third Yocto toolchain, we just build those binaries
# for the target and run them on the host with QEMU.
python do_create_v8_qemu_wrapper () {
    """Creates a small wrapper that invokes QEMU to run some target V8 binaries
    on the host."""
    qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'),
                    d.expand('${STAGING_DIR_HOST}${base_libdir}')]
    qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST', True),
                                    qemu_libdirs)
    wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh')
    with open(wrapper_path, 'w') as wrapper_file:
        wrapper_file.write("""#!/bin/sh

# This file has been generated automatically.
# It invokes QEMU to run binaries built for the target in the host during the
# build process.

%s "$@"
""" % qemu_cmd)
    os.chmod(wrapper_path, 0o755)
}
do_create_v8_qemu_wrapper[dirs] = "${B}"
addtask create_v8_qemu_wrapper after do_patch before do_configure

do_configure() {
  export PATH="${WORKDIR}/depot_tools:$PATH"
  GN_EXTRA_ARGS="${GN_EXTRA_ARGS}" make configure
}

do_compile() {
  export PATH="${WORKDIR}/depot_tools:$PATH"

  ninja ${PARALLEL_MAKE} -C ${S}/out egl_content_lib
}

do_install() {
  export PATH="${WORKDIR}/depot_tools:$PATH"
  oe_runmake export

  install -d ${D}${bindir}
  install -d ${D}${libdir}
  install -d ${D}${includedir}/eglcontent

  install -m 0644 ${S}/out/icudtl.dat ${D}${bindir}/icudtl.dat
  install -m 0644 ${S}/out/snapshot_blob.bin ${D}${bindir}/snapshot_blob.bin
  install -m 0644 ${S}/out/v8_context_snapshot.bin ${D}${bindir}/v8_context_snapshot.bin
  install -m 0644 ${S}/out/natives_blob.bin ${D}${bindir}/natives_blob.bin
  install -m 0644 ${S}/out/egl_content.pak ${D}${bindir}/egl_content.pak

  install -m 0755 ${S}/out/libegl_content_lib.so ${D}${libdir}/libegl_content_lib.so

  install -m 0644 ${S}/out/eglcontent/* ${D}${includedir}/eglcontent
}

FILES_${PN} = " \
  ${bindir}/icudtl.dat \
  ${bindir}/snapshot_blob.bin \
  ${bindir}/v8_context_snapshot.bin \
  ${bindir}/natives_blob.bin \
  ${bindir}/egl_content.pak \
  ${libdir}/libegl_content_lib.so \
  ${includedir}/eglcontent \
"

FILES_${PN}-dev = ""
ALLOW_EMPTY_${PN}-dev = "0"

repository: binouz/meta-binouz

repo_name: binouz/meta-binouz


text:
var expect = require('expect');
var jsython = require('./../lib/jsython');

var object = jsython.object;
var bool = jsython.bool;
var int_cons = jsython.int_cons;
var type = jsython.type;
var True = jsython.True;
var False = jsython.False;
var eq = jsython.eq;
var len = jsython.len;

describe("bool", function() {

    it("test True type with instanceof", function() {
        expect(True).toBeA(bool);
    });

    it("test True type with instanceof", function() {
        expect(True).toBeA(object);
    });

    it("test True type with instanceof", function() {
        expect(False).toBeA(bool);
    });

    it("test True type with instanceof", function() {
        expect(False).toBeA(object);
    });

    it("test list type of True", function() {
        expect(type(True)).toBe(bool);
    });

    it("test list type of False", function() {
        expect(type(False)).toBe(bool);
    });

    it("test boolean equality (1)", function() {
        expect(eq(False, False)).toBe(True);
    });

    it("test boolean equality (2)", function() {
        expect(eq(True, True)).toBe(True);
    });

    it("test boolean inequality (1)", function() {
        expect(eq(True, False)).toBe(False);
    });

    it("test boolean inequality (2)", function() {
        expect(eq(False, True)).toBe(False);
    });

});

repository: apragacz/jsython

repo_name: apragacz/jsython


text:
SUMMARY = "José is a C-language implementation of the Javascript Object Signing and Encryption standards."
DESCRIPTION = "José is a C-language implementation of the Javascript Object Signing and Encryption standards."
HOMEPAGE = "https://github.com/latchset/jose"
SECTION = "networking"
PR="r1"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "\
	git://github.com/latchset/jose.git;protocol=git;branch=master \
"
SRCREV="145c41a4ec70c15f6f8aa12a915e16cb60f0991f"

S="${WORKDIR}/git"

inherit meson pkgconfig systemd

DEPENDS = "zlib cmake-native jansson openssl"

FILES_${PN} += "/usr"

repository: Linaro/meta-ledge

repo_name: Linaro/meta-ledge

branch_name: refs/heads/hardknott

gha_language: Shell


text:
SECTION = "devel/chicken"
DESCRIPTION = "Procedures for managing cookies"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://spiffy-cookies.meta;md5=ed39681648eee590cbc51b8ade0ac773"
DEPENDS_append_class-cross = " chicken-egg-spiffy-cross chicken-egg-intarweb-cross"
DEPENDS_append_class-crosssdk = " chicken-egg-spiffy-crosssdk chicken-egg-intarweb-crosssdk"
DEPENDS_append_class-nativesdk = " nativesdk-chicken-egg-spiffy nativesdk-chicken-egg-intarweb chicken-egg-spiffy-crosssdk chicken-egg-intarweb-crosssdk"
DEPENDS = " chicken-egg-spiffy chicken-egg-intarweb chicken-egg-spiffy-cross chicken-egg-intarweb-cross"
RDEPENDS_${PN} = " chicken-egg-spiffy chicken-egg-intarweb"

SRC_URI = "http://code.call-cc.org/egg-tarballs/4/spiffy-cookies/spiffy-cookies-${PV}.tar.gz"

SRC_URI[md5sum] = "39e6bd304edc1163cd2dc374ee0bec38"
SRC_URI[sha256sum] = "b4fd9a7ebe917b7f433d874c0abebfcf2abafec081b69d10c693936b81aeb94d"

S = "${WORKDIR}/spiffy-cookies-${PV}"

inherit chicken_install

BBCLASSEXTEND = "cross crosssdk nativesdk"

repository: OSSystems/meta-chicken

repo_name: OSSystems/meta-chicken


text:
# Copyright (C) 2015-2016 GENIVI Alliance
# Released under the MIT license (see COPYING.MIT for the terms)

LICENSE  = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3"
SRC_URI = "git://github.com/GENIVI/HVAC"
SRCREV  = "b5f215a90d7c32e75de6a5cc621f5bbc9e5617a0"

SUMMARY = "HVAC"
DEPENDS = "qtbase qtdeclarative dbus"
RDEPENDS_${PN} = "qtquickcontrols-qmlplugins"

S = "${WORKDIR}/git"

inherit qmake5

do_install_append() {
	install -d ${D}/opt/com.genivi.gdp.hvac/bin/imports/
        cp -fr ${S}/imports/* ${D}/opt/com.genivi.gdp.hvac/bin/imports/
        install -d ${D}/opt/com.genivi.gdp.hvac/bin/
	mv ${D}/opt/HVAC_rvi_vtc1010/bin/HVAC_rvi_vtc1010 \
		${D}/opt/com.genivi.gdp.hvac/bin/HVAC_rvi_vtc1010
        install -d ${D}/opt/com.genivi.gdp.hvac/share/icons/
        install -m 0444 ${S}/com.genivi.gdp.hvac.svg \
                        ${D}/opt/com.genivi.gdp.hvac/share/icons/com.genivi.gdp.hvac.svg
	install -d ${D}/usr/share/applications/
        install -m 0444 ${S}/com.genivi.gdp.hvac.desktop \
                        ${D}/usr/share/applications/com.genivi.gdp.hvac.desktop
	install -d ${D}${libdir}/systemd/user
}

FILES_${PN} += "\
    /opt/* \
    ${libdir} \
    ${libdir}/systemd \
    ${libdir}/systemd/user \
    ${libdir}/systemd/user/* \
    /usr/share/* \
    "


text:
package cmd

import (
	"context"
	"errors"
	"fmt"

	"github.com/cybozu-go/log"
	"github.com/cybozu-go/well"
	"github.com/spf13/cobra"
)

type nodeAction string

const (
	nodeActionStart   = nodeAction("start")
	nodeActionStop    = nodeAction("stop")
	nodeActionRestart = nodeAction("restart")
)

func (n nodeAction) valid() error {
	switch n {
	case nodeActionStart, nodeActionStop, nodeActionRestart:
		return nil
	default:
		return fmt.Errorf("invalid node action: %s: valid actions are [%s|%s|%s]", n, nodeActionStart, nodeActionStop, nodeActionRestart)
	}
}

// nodeActionCmd represents the nodeAction command
var nodeActionCmd = &cobra.Command{
	Use:   "action ACTION NODE",
	Short: "control nodes",
	Long: `control nodes

ACTION
  * start: power on the target node
  * stop: power off the target node
  * restart: restart the target node`,
	Args: func(cmd *cobra.Command, args []string) error {
		if len(args) == 0 {
			return errors.New("action name not specified")
		} else if len(args) == 1 {
			return errors.New("node name not specified")
		} else if len(args) > 2 {
			return errors.New("too many arguments")
		}
		return nil
	},
	Run: func(cmd *cobra.Command, args []string) {
		action := args[0]
		node := args[1]
		if err := (nodeAction(action)).valid(); err != nil {
			log.ErrorExit(err)
		}

		well.Go(func(ctx context.Context) error {
			err := postAction(ctx, fmt.Sprintf("/nodes/%s/%s", node, action), nil)
			return err
		})
		well.Stop()
		err := well.Wait()
		if err != nil {
			log.ErrorExit(err)
		}
	},
}

func init() {
	nodeCmd.AddCommand(nodeActionCmd)
}

repository: cybozu-go/placemat

repo_name: cybozu-go/placemat

gha_language: Go

extension: go