text:
#include <iostream>
#include <cmath>
#include "aop.h"

//#define INHERITING_CTORS  as of g++ 6.4.3, inheriting ctors was not implemented

template <typename _UnderlyingType>
struct Number
{
    template <template <class> class A = aop::NullAspect>
    class Type
    {
    public:
        typedef _UnderlyingType UnderlyingType;
        typedef aop::BaseAopData< Number::Type, A> AopData; //Needed by lib
        typedef typename AopData::Type FullType;

        Type(UnderlyingType n)
            : n(n)
        {}

        friend std::ostream& operator<<(std::ostream& out, const Type& number)
        {
            return out << number.n;
        }
    protected:
        UnderlyingType n;
    };
};

template <class A>
class ArithmeticAspect: public A
{
public:
    typedef aop::AspectAopData< ::ArithmeticAspect, A> AopData;
    typedef typename AopData::Type FullType;

#ifdef INHERITING_CTORS
    using A::A;
#else
    ArithmeticAspect(typename A::UnderlyingType n)
        : A(n)
    {}

    ArithmeticAspect(const A& a)
        : A(a)
    {}
#endif

    FullType operator+(const FullType& other) const
    {
        FullType tmp(*this);
        return tmp += other;
    }

    FullType operator-(const FullType& other) const
    {
        FullType tmp(*this);
        return tmp -= other;
    }

    FullType operator+=(const FullType& other)
    {
        A::n += other.n;
        return A::n;
    }

    FullType operator-=(const FullType& other)
    {
        A::n -= other.n;
        return A::n;
    }

    // same for *, *=, /, /=
};

template <class A>
class IncrementalAspect: public A
{
public:
    typedef aop::AspectAopData< ::IncrementalAspect, A> AopData;
    typedef typename AopData::Type FullType;

#ifdef INHERITING_CTORS
    using A::A;
#else
    IncrementalAspect(typename A::UnderlyingType n)
        : A(n)
    {}

    IncrementalAspect(const A& a)
        : A(a)
    {}
#endif

    FullType operator++(int)
    {
        FullType tmp(*this);
        operator++();
        return tmp;
    }

    FullType operator++()
    {
        ++A::n;
        return *this;
    }

    FullType operator--(int)
    {
        FullType tmp(*this);
        operator--();
        return tmp;
    }

    FullType operator--()
    {
        --A::n;
        return *this;
    }
};

/*
* Configurable Aspect sumExample
*/
template <unsigned int PRECISION>
struct RoundAspect
{
    template <class A>
    class Type : public A
    {
    public:
        typedef aop::AspectAopData< RoundAspect::Type, A> AopData;
        typedef typename AopData::Type FullType;

#ifdef INHERITING_CTORS
        using A::A;
#else
        Type(typename A::UnderlyingType n)
            : A(n)
        {}

        Type(const A& a)
            : A(a)
        {}
#endif

        FullType operator+(const FullType& other) const
        {
            return FullType(round(A::operator+(other).n));
        }

    private:
        static float round(float f)
        {
            const unsigned int e = std::pow(10, PRECISION);
            return float(int(f * e)) / e;
        }
    };
};

template <class A>
class LogicalAspect: public A
{
public:
    typedef aop::AspectAopData< ::LogicalAspect, A> AopData;
    typedef typename AopData::Type FullType;

#ifdef INHERITING_CTORS
    using A::A;
#else
    LogicalAspect(typename A::UnderlyingType n)
        : A(n)
    {}

    LogicalAspect(const A& a)
        : A(a)
    {}
#endif

    bool operator!() const
    {
        return !A::n;
    }

    bool operator&&(const FullType& other) const
    {
        return A::n && other.n;
    }

    bool operator||(const FullType& other) const
    {
        return A::n || other.n;
    }
};

template <class A>
class BitwiseAspect: public A
{
public:
    typedef aop::AspectAopData< ::BitwiseAspect, A> AopData;
    typedef typename AopData::Type FullType;

#ifdef INHERITING_CTORS
    using A::A;
#else
    BitwiseAspect(typename A::UnderlyingType n)
        : A(n)
    {}

    BitwiseAspect(const A& a)
        : A(a)
    {}
#endif

    bool operator~() const
    {
        return ~A::n;
    }

    FullType operator&(const FullType& mask) const
    {
        return A::n & mask.n;
    }

    FullType operator|(const FullType& mask) const
    {
        return A::n | mask.n;
    }

    FullType operator<<(const FullType& bitcount) const
    {
        return A::n << bitcount.n;
    }

    FullType operator>>(const FullType& bitcount) const
    {
        return A::n >> bitcount.n;
    }

    FullType& operator>>=(const FullType& bitcount)
    {
        A::n >>= bitcount.n;
        return *static_cast<FullType*>(this);
    }
};

template <class N>
void sumExample(typename N::UnderlyingType n1, typename N::UnderlyingType n2)
{
    N a(n1);
    N b(n2);
    N c = a + b;
    std::cout << c << std::endl;
}

template <class N>
void orExample(typename N::UnderlyingType n1, typename N::UnderlyingType n2)
{
    N a(n1);
    N b(n2);
    std::cout << (a || b) << std::endl;
}

template <class N>
void bitwiseExample(typename N::UnderlyingType n1, typename N::UnderlyingType n2)
{
    N a(n1);
    N b(n2);
    std::cout << (a + ((b >>= 1) << 3)) << std::endl;
}

int main()
{

    typedef aop::Decorate<Number<unsigned int>::Type>::with<ArithmeticAspect, IncrementalAspect, LogicalAspect, BitwiseAspect>::Type IntegralNumber;
    bitwiseExample<IntegralNumber>(1, 2);
    sumExample<IntegralNumber>(1, 2);

    typedef aop::Decorate<Number<float>::Type>::with<RoundAspect<2>::Type, ArithmeticAspect, LogicalAspect>::Type FloatRoundLogicalNumber;
    orExample<FloatRoundLogicalNumber>(1, 0);

    typedef aop::Decorate<Number<int>::Type>::with<LogicalAspect>::Type IntLogicalNumber;
    orExample<IntLogicalNumber>(1, 0);

    typedef aop::Decorate<Number<float>::Type>::with<RoundAspect<2>::Type, ArithmeticAspect>::Type FloatRoundNumber;
    sumExample<FloatRoundNumber>(1.339, 1.1233);

    return 0;
}


text:
package containerserver

import (
	"database/sql"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"testing"

	"github.com/stretchr/testify/require"
)

// This is the schema from when we first released swift.
var superCruftySchema = `
	CREATE TABLE outgoing_sync (
			remote_id TEXT UNIQUE,
			sync_point INTEGER,
			updated_at TEXT DEFAULT 0
		);
	CREATE TABLE incoming_sync (
			remote_id TEXT UNIQUE,
			sync_point INTEGER,
			updated_at TEXT DEFAULT 0
		);
	CREATE TRIGGER outgoing_sync_insert AFTER INSERT ON outgoing_sync
		BEGIN
			UPDATE outgoing_sync
			SET updated_at = STRFTIME('%s', 'NOW')
			WHERE ROWID = new.ROWID;
		END;
	CREATE TRIGGER outgoing_sync_update AFTER UPDATE ON outgoing_sync
		BEGIN
			UPDATE outgoing_sync
			SET updated_at = STRFTIME('%s', 'NOW')
			WHERE ROWID = new.ROWID;
		END;
	CREATE TRIGGER incoming_sync_insert AFTER INSERT ON incoming_sync
		BEGIN
			UPDATE incoming_sync
			SET updated_at = STRFTIME('%s', 'NOW')
			WHERE ROWID = new.ROWID;
		END;
	CREATE TRIGGER incoming_sync_update AFTER UPDATE ON incoming_sync
		BEGIN
			UPDATE incoming_sync
			SET updated_at = STRFTIME('%s', 'NOW')
			WHERE ROWID = new.ROWID;
		END;
	CREATE TABLE object (
			ROWID INTEGER PRIMARY KEY AUTOINCREMENT,
			name TEXT UNIQUE,
			created_at TEXT,
			size INTEGER,
			content_type TEXT,
			etag TEXT,
			deleted INTEGER DEFAULT 0
		);
	CREATE INDEX ix_object_deleted ON object (deleted);
	CREATE TRIGGER object_insert AFTER INSERT ON object
		BEGIN
			UPDATE container_stat
			SET object_count = object_count + (1 - new.deleted),
				bytes_used = bytes_used + new.size,
				hash = chexor(hash, new.name, new.created_at);
		END;
	CREATE TRIGGER object_update BEFORE UPDATE ON object
		BEGIN
			SELECT RAISE(FAIL, 'UPDATE not allowed; DELETE and INSERT');
		END;
	CREATE TRIGGER object_delete AFTER DELETE ON object
		BEGIN
			UPDATE container_stat
			SET object_count = object_count - (1 - old.deleted),
				bytes_used = bytes_used - old.size,
				hash = chexor(hash, old.name, old.created_at);
		END;
	CREATE TABLE container_stat (
			account TEXT,
			container TEXT,
			created_at TEXT,
			put_timestamp TEXT DEFAULT '0',
			delete_timestamp TEXT DEFAULT '0',
			object_count INTEGER,
			bytes_used INTEGER,
			reported_put_timestamp TEXT DEFAULT '0',
			reported_delete_timestamp TEXT DEFAULT '0',
			reported_object_count INTEGER DEFAULT 0,
			reported_bytes_used INTEGER DEFAULT 0,
			hash TEXT default '00000000000000000000000000000000',
			id TEXT,
			status TEXT DEFAULT '',
			status_changed_at TEXT DEFAULT '0'
		);
	INSERT INTO container_stat (account, container, created_at, object_count, bytes_used, id) VALUES ("a", "c", '0', 0, 0, "some database");`

func createCruftyDatabase() (string, func(), error) {
	dir, err := ioutil.TempDir("", "")
	if err != nil {
		return "", nil, err
	}
	dbFile := filepath.Join(dir, "db.db")
	dbConn, err := sql.Open("sqlite3_hummingbird", dbFile)
	if err != nil {
		return "", nil, err
	}
	if _, err := dbConn.Exec(superCruftySchema); err != nil {
		return "", nil, err
	}
	cleanup := func() {
		os.RemoveAll(dir)
	}
	return dbFile, cleanup, nil
}

func TestMigrateCruftyDatabase(t *testing.T) {
	dbFile, cleanup, err := createCruftyDatabase()
	require.Nil(t, err)
	defer cleanup()
	c, err := sqliteOpenContainer(dbFile)
	require.Nil(t, err)
	db, ok := c.(*sqliteContainer)
	require.True(t, ok)
	require.False(t, db.hasDeletedNameIndex)
	count := 0
	require.Nil(t, db.connect())
	err = db.QueryRow("SELECT COUNT(*) FROM sqlite_master WHERE name in ('policy_stat', 'object_insert_policy_stat', 'container_info', 'container_stat_update')").Scan(&count)
	require.Nil(t, err)
	require.Equal(t, 4, count)
	require.Nil(t, db.QueryRow("SELECT COUNT(*) FROM container_info").Scan(&count))
	require.Nil(t, err)
	require.Equal(t, 1, count)
	require.Nil(t, db.QueryRow("SELECT COUNT(*) FROM policy_stat").Scan(&count))
	require.Nil(t, err)
	require.Equal(t, 1, count)
	info, err := db.GetInfo()
	require.Nil(t, err)
	require.Equal(t, "a", info.Account)
	require.Equal(t, "c", info.Container)
	require.Equal(t, "some database", info.ID)

	ensureColumnsExist := func(table string, columns []string) {
		rows, err := db.Query(fmt.Sprintf("PRAGMA table_info(%s)", table))
		require.Nil(t, err)
		columnNames := map[string]bool{}
		for rows.Next() {
			var columnName string
			var _x interface{}
			require.Nil(t, rows.Scan(&_x, &columnName, &_x, &_x, &_x, &_x))
			columnNames[columnName] = true
		}
		rows.Close()
		for _, column := range columns {
			require.True(t, columnNames[column])
		}
	}
	ensureColumnsExist("object", []string{"storage_policy_index"})
	ensureColumnsExist("container_stat", []string{"metadata", "x_container_sync_point1", "x_container_sync_point2"})
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace GEMA\gemaBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Raza
 *
 * @ORM\Table(name="correo")
 * @ORM\Entity(repositoryClass="GEMA\gemaBundle\Entity\CorreoRepository")
 * @ORM\HasLifecycleCallbacks()
 */
class Correo
{

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     * @ORM\Column(name="nombre", type="string", length=255,nullable=true)
     */
    private $nombre;

    /**
     * @var string
     * @ORM\Column(name="apellido", type="string", length=500,nullable=true)
     */
    private $apellido;

    /**
     * @var string
     * @ORM\Column(name="direccion", type="string", length=500,nullable=true)
     */
    private $direccion;

    /**
     * @var string
     * @ORM\Column(name="localidad", type="string", length=500,nullable=true)
     */
    private $localidad;
    /**
     * @var string
     * @ORM\Column(name="provincia", type="string", length=500,nullable=true)
     */
    private $provincia;

    /**
     * @var string
     * @ORM\Column(name="pais", type="string", length=500,nullable=true)
     */
    private $pais;

    /**
     * @var string
     * @ORM\Column(name="codigopostal", type="string", length=500,nullable=true)
     */
    private $codigopostal;

    /**
     * @var string
     * @ORM\Column(name="email", type="string", length=500,nullable=true)
     */
    private $email;

    /**
     * @var string
     * @ORM\Column(name="telefono", type="string", length=500,nullable=true)
     */
    private $telefono;

    /**
     * @var string
     * @ORM\Column(name="empresa", type="string", length=500,nullable=true)
     */
    private $empresa;

    /**
     * @var string
     * @ORM\Column(name="razas", type="string", length=500,nullable=true)
     */
    private $razas;

    /**
     * @var string
     * @ORM\Column(name="consulta", type="string", length=500,nullable=true)
     */
    private $consulta;

    /**
     * @var string
     * @ORM\Column(name="mailChimpResponse", type="text",nullable=true)
     */
    private $mailChimpResponse;

    /**
     * @var string
     * @ORM\Column(name="fechahora", type="string",length=500,nullable=true)
     */
    private $fechahora;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set nombre
     *
     * @param string $nombre
     * @return Correo
     */
    public function setNombre($nombre)
    {
        $this->nombre = $nombre;

        return $this;
    }

    /**
     * Get nombre
     *
     * @return string
     */
    public function getNombre()
    {
        return $this->nombre;
    }

    /**
     * Set apellido
     *
     * @param string $apellido
     * @return Correo
     */
    public function setApellido($apellido)
    {
        $this->apellido = $apellido;

        return $this;
    }

    /**
     * Get apellido
     *
     * @return string
     */
    public function getApellido()
    {
        return $this->apellido;
    }

    /**
     * Set direccion
     *
     * @param string $direccion
     * @return Correo
     */
    public function setDireccion($direccion)
    {
        $this->direccion = $direccion;

        return $this;
    }

    /**
     * Get direccion
     *
     * @return string
     */
    public function getDireccion()
    {
        return $this->direccion;
    }

    /**
     * Set provincia
     *
     * @param string $provincia
     * @return Correo
     */
    public function setProvincia($provincia)
    {
        $this->provincia = $provincia;

        return $this;
    }

    /**
     * Get provincia
     *
     * @return string
     */
    public function getProvincia()
    {
        return $this->provincia;
    }

    /**
     * Set codigopostal
     *
     * @param string $codigopostal
     * @return Correo
     */
    public function setCodigopostal($codigopostal)
    {
        $this->codigopostal = $codigopostal;

        return $this;
    }

    /**
     * Get codigopostal
     *
     * @return string
     */
    public function getCodigopostal()
    {
        return $this->codigopostal;
    }

    /**
     * Set email
     *
     * @param string $email
     * @return Correo
     */
    public function setEmail($email)
    {
        $this->email = $email;

        return $this;
    }

    /**
     * Get email
     *
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Set telefono
     *
     * @param string $telefono
     * @return Correo
     */
    public function setTelefono($telefono)
    {
        $this->telefono = $telefono;

        return $this;
    }

    /**
     * Get telefono
     *
     * @return string
     */
    public function getTelefono()
    {
        return $this->telefono;
    }

    /**
     * Set empresa
     *
     * @param string $empresa
     * @return Correo
     */
    public function setEmpresa($empresa)
    {
        $this->empresa = $empresa;

        return $this;
    }

    /**
     * Get empresa
     *
     * @return string
     */
    public function getEmpresa()
    {
        return $this->empresa;
    }

    /**
     * Set razas
     *
     * @param string $razas
     * @return Correo
     */
    public function setRazas($razas)
    {
        $this->razas = $razas;

        return $this;
    }

    /**
     * Get razas
     *
     * @return string
     */
    public function getRazas()
    {
        return $this->razas;
    }

    /**
     * Set consulta
     *
     * @param string $consulta
     * @return Correo
     */
    public function setConsulta($consulta)
    {
        $this->consulta = $consulta;

        return $this;
    }

    /**
     * Get consulta
     *
     * @return string
     */
    public function getConsulta()
    {
        return $this->consulta;
    }

    /**
     * Set localidad
     *
     * @param string $localidad
     * @return Correo
     */
    public function setLocalidad($localidad)
    {
        $this->localidad = $localidad;

        return $this;
    }

    /**
     * Get localidad
     *
     * @return string
     */
    public function getLocalidad()
    {
        return $this->localidad;
    }

    /**
     * Set fechahora
     *
     * @param string $fechahora
     * @return Correo
     */
    public function setFechahora($fechahora)
    {
        $this->fechahora = $fechahora;

        return $this;
    }

    /**
     * Get fechahora
     *
     * @return string
     */
    public function getFechahora()
    {
        return $this->fechahora;
    }

    /**
     * Set pais
     *
     * @param string $pais
     * @return Correo
     */
    public function setPais($pais)
    {
        $this->pais = $pais;

        return $this;
    }

    /**
     * Get pais
     *
     * @return string
     */
    public function getPais()
    {
        return $this->pais;
    }

    /**
     * Set mailChimpResponse
     *
     * @param string $mailChimpResponse
     * @return Correo
     */
    public function setMailChimpResponse($mailChimpResponse)
    {
        $this->mailChimpResponse = $mailChimpResponse;

        return $this;
    }

    /**
     * Get mailChimpResponse
     *
     * @return string
     */
    public function getMailChimpResponse()
    {
        return $this->mailChimpResponse;
    }
}


text:
package com.cardpay.pccredit.intopieces.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.cardpay.pccredit.intopieces.filter.AddIntoPiecesFilter;
import com.cardpay.pccredit.intopieces.filter.XmNewSqFilter;
import com.cardpay.pccredit.intopieces.model.LocalImage;
import com.cardpay.pccredit.intopieces.web.LocalImageForm;
import com.cardpay.pccredit.intopieces.web.XmNewSqUploadForm;
import com.wicresoft.util.annotation.Mapper;

@Mapper
public interface XmNewSqUploadDao {
	public List<XmNewSqUploadForm> findSqUploadList(XmNewSqFilter filter);
	public int findSqUploadListCount(XmNewSqFilter filter);

}


text:
#ifndef CustomElementConstructorBuilder_h
#define CustomElementConstructorBuilder_h

#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/V8CustomElementLifecycleCallbacks.h"
#include "core/dom/QualifiedName.h"
#include "core/dom/custom/CustomElementLifecycleCallbacks.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/text/AtomicString.h"
#include <v8.h>

namespace blink {

class CustomElementDefinition;
class Dictionary;
class Document;
class Element;
class ExceptionState;
class QualifiedName;
class V8PerContextData;
struct WrapperTypeInfo;

// Handles the scripting-specific parts of the Custom Elements element
// registration algorithm and constructor generation algorithm. It is
// used in the implementation of those algorithms in
// Document::registerElement.
class CustomElementConstructorBuilder {
    WTF_MAKE_NONCOPYABLE(CustomElementConstructorBuilder);
public:
    CustomElementConstructorBuilder(ScriptState*, const Dictionary* options);

    // The builder accumulates state and may run script at specific
    // points. These methods must be called in order. When one fails
    // (returns false), the calls must stop.

    bool isFeatureAllowed() const;
    bool validateOptions(const AtomicString& type, QualifiedName& tagName, ExceptionState&);
    PassRefPtr<CustomElementLifecycleCallbacks> createCallbacks();
    bool createConstructor(Document*, CustomElementDefinition*, ExceptionState&);
    bool didRegisterDefinition(CustomElementDefinition*) const;

    // This method collects a return value for the bindings. It is
    // safe to call this method even if the builder failed; it will
    // return an empty value.
    ScriptValue bindingsReturnValue() const;

private:
    bool hasValidPrototypeChainFor(const WrapperTypeInfo*) const;
    bool prototypeIsValid(const AtomicString& type, ExceptionState&) const;
    v8::Handle<v8::Function> retrieveCallback(v8::Isolate*, const char* name);

    RefPtr<ScriptState> m_scriptState;
    const Dictionary* m_options;
    v8::Handle<v8::Object> m_prototype;
    const WrapperTypeInfo* m_wrapperType;
    v8::Handle<v8::Function> m_constructor;
    RefPtr<V8CustomElementLifecycleCallbacks> m_callbacks;
};

}

#endif // CustomElementConstructorBuilder_h


text:
/* tslint:disable max-line-length */
import { TestBed, getTestBed } from '@angular/core/testing';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { of } from 'rxjs';
import { take, map } from 'rxjs/operators';
import { CategoriaDespesaService } from 'app/entities/categoria-despesa/categoria-despesa.service';
import { ICategoriaDespesa, CategoriaDespesa } from 'app/shared/model/categoria-despesa.model';

describe('Service Tests', () => {
    describe('CategoriaDespesa Service', () => {
        let injector: TestBed;
        let service: CategoriaDespesaService;
        let httpMock: HttpTestingController;
        let elemDefault: ICategoriaDespesa;
        beforeEach(() => {
            TestBed.configureTestingModule({
                imports: [HttpClientTestingModule]
            });
            injector = getTestBed();
            service = injector.get(CategoriaDespesaService);
            httpMock = injector.get(HttpTestingController);

            elemDefault = new CategoriaDespesa(0, 'AAAAAAA', 'AAAAAAA');
        });

        describe('Service methods', async () => {
            it('should find an element', async () => {
                const returnedFromService = Object.assign({}, elemDefault);
                service
                    .find(123)
                    .pipe(take(1))
                    .subscribe(resp => expect(resp).toMatchObject({ body: elemDefault }));

                const req = httpMock.expectOne({ method: 'GET' });
                req.flush(JSON.stringify(returnedFromService));
            });

            it('should create a CategoriaDespesa', async () => {
                const returnedFromService = Object.assign(
                    {
                        id: 0
                    },
                    elemDefault
                );
                const expected = Object.assign({}, returnedFromService);
                service
                    .create(new CategoriaDespesa(null))
                    .pipe(take(1))
                    .subscribe(resp => expect(resp).toMatchObject({ body: expected }));
                const req = httpMock.expectOne({ method: 'POST' });
                req.flush(JSON.stringify(returnedFromService));
            });

            it('should update a CategoriaDespesa', async () => {
                const returnedFromService = Object.assign(
                    {
                        nome: 'BBBBBB',
                        usuario: 'BBBBBB'
                    },
                    elemDefault
                );

                const expected = Object.assign({}, returnedFromService);
                service
                    .update(expected)
                    .pipe(take(1))
                    .subscribe(resp => expect(resp).toMatchObject({ body: expected }));
                const req = httpMock.expectOne({ method: 'PUT' });
                req.flush(JSON.stringify(returnedFromService));
            });

            it('should return a list of CategoriaDespesa', async () => {
                const returnedFromService = Object.assign(
                    {
                        nome: 'BBBBBB',
                        usuario: 'BBBBBB'
                    },
                    elemDefault
                );
                const expected = Object.assign({}, returnedFromService);
                service
                    .query(expected)
                    .pipe(
                        take(1),
                        map(resp => resp.body)
                    )
                    .subscribe(body => expect(body).toContainEqual(expected));
                const req = httpMock.expectOne({ method: 'GET' });
                req.flush(JSON.stringify([returnedFromService]));
                httpMock.verify();
            });

            it('should delete a CategoriaDespesa', async () => {
                const rxPromise = service.delete(123).subscribe(resp => expect(resp.ok));

                const req = httpMock.expectOne({ method: 'DELETE' });
                req.flush({ status: 200 });
            });
        });

        afterEach(() => {
            httpMock.verify();
        });
    });
});


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
org.apache.log4j.lf5 (Apache Log4j 1.2.17 API)
</TITLE>

<META NAME="date" CONTENT="2012-05-06">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

org.apache.log4j.lf5

Interfaces

LogRecordFilter

Classes

AppenderFinalizer

DefaultLF5Configurator

LF5Appender

Log4JLogRecord

LogLevel

LogRecord

PassingLogRecordFilter

StartLogFactor5

Exceptions

LogLevelFormatException


text:
/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.camunda.bpm.engine.impl.history.producer;

import org.camunda.bpm.dmn.engine.delegate.DmnDecisionEvaluationEvent;
import org.camunda.bpm.engine.delegate.DelegateCaseExecution;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.impl.history.event.HistoryEvent;

/**
 * The producer for DMN history events. The history event producer is
 * responsible for extracting data from the dmn engine and adding the data to a
 * {@link HistoryEvent}.
 *
 * @author Philipp Ossler
 *
 */
public interface DmnHistoryEventProducer {

  /**
   * Creates the history event fired when a decision is evaluated while execute
   * a process instance.
   *
   * @param execution
   *          the current execution
   * @param decisionEvaluationEvent
   *          the evaluation event
   * @return the history event
   *
   * @see #createDecisionEvaluatedEvt(DmnDecisionEvaluationEvent)
   */
  HistoryEvent createDecisionEvaluatedEvt(DelegateExecution execution, DmnDecisionEvaluationEvent decisionEvaluationEvent);

  /**
   * Creates the history event fired when a decision is evaluated while execute
   * a case instance.
   *
   * @param execution
   *          the current case execution
   * @param decisionEvaluationEvent
   *          the evaluation event
   * @return the history event
   *
   * @see #createDecisionEvaluatedEvt(DmnDecisionEvaluationEvent)
   */
  HistoryEvent createDecisionEvaluatedEvt(DelegateCaseExecution execution, DmnDecisionEvaluationEvent decisionEvaluationEvent);

  /**
   * Creates the history event fired when a decision is evaluated. If the
   * decision is evaluated while execute a process instance then you should use
   * {@link #createDecisionEvaluatedEvt(DelegateExecution, DmnDecisionEvaluationEvent)} instead.
   *
   * @param decisionEvaluationEvent
   *          the evaluation event
   * @return the history event
   */
  HistoryEvent createDecisionEvaluatedEvt(DmnDecisionEvaluationEvent decisionEvaluationEvent);

}


text:
<?php

namespace DBTiny\QueryBuilder;

use DBTiny\AbstractQueryBuilder;

abstract class AbstractUpdate extends AbstractQueryBuilder
{
    protected $values = [];

    public function values(array $values)
    {
        $this->values = array_merge($this->values, $values);

        return $this;
    }

    public function set($name, $value)
    {
        $this->values[$name] = $value;

        return $this;
    }
}


text:
#ifndef __PROC_UMA_H_
#define __PROC_UMA_H_

int start_uma_session(request_rec *r, mod_ox_config *s_cfg, opkele::params_t& params);
int has_uma_session(request_rec *r, mod_ox_config *s_cfg, opkele::params_t& params, int logout);
int validate_uma_session(request_rec *r, mod_ox_config *s_cfg, opkele::params_t& params);

#endif


text:
Maven Release-Note Plugin
=========================

The aim of this plugin is to generate a release-note of the project
based on SCM, issue management, CI and repository data.


text:
'use strict';

import { ITimerService, IStartupMetrics, IInitData, IMemoryInfo } from 'vs/workbench/services/timer/common/timerService';
import { virtualMachineHint } from 'vs/base/node/id';
import { ticks } from 'vs/base/node/startupTimers';

import * as os from 'os';

export class TimerService implements ITimerService {

	public _serviceBrand: any;

	public readonly start: number;
	public readonly appReady: number;
	public readonly windowLoad: number;

	public readonly beforeLoadWorkbenchMain: number;
	public readonly afterLoadWorkbenchMain: number;

	public readonly isInitialStartup: boolean;
	public readonly hasAccessibilitySupport: boolean;

	public beforeDOMContentLoaded: number;
	public afterDOMContentLoaded: number;

	public beforeWorkbenchOpen: number;
	public workbenchStarted: number;

	public beforeExtensionLoad: number;
	public afterExtensionLoad: number;

	public restoreViewletDuration: number;
	public restoreEditorsDuration: number;

	private _startupMetrics: IStartupMetrics;

	constructor(initData: IInitData, private isEmptyWorkbench: boolean) {
		this.start = initData.start;
		this.appReady = initData.appReady;
		this.windowLoad = initData.windowLoad;

		this.beforeLoadWorkbenchMain = initData.beforeLoadWorkbenchMain;
		this.afterLoadWorkbenchMain = initData.afterLoadWorkbenchMain;

		this.isInitialStartup = initData.isInitialStartup;
		this.hasAccessibilitySupport = initData.hasAccessibilitySupport;
	}

	get startupMetrics(): IStartupMetrics {
		if (!this._startupMetrics) {
			this._computeStartupMetrics();
		}
		return this._startupMetrics;
	}

	public _computeStartupMetrics(): void {
		const now = Date.now();
		const initialStartup = !!this.isInitialStartup;
		const start = initialStartup ? this.start : this.windowLoad;

		let totalmem: number;
		let freemem: number;
		let cpus: { count: number; speed: number; model: string; };
		let platform: string;
		let release: string;
		let loadavg: number[];
		let meminfo: IMemoryInfo;
		let isVMLikelyhood: number;

		try {
			totalmem = os.totalmem();
			freemem = os.freemem();
			platform = os.platform();
			release = os.release();
			loadavg = os.loadavg();
			meminfo = process.getProcessMemoryInfo();

			isVMLikelyhood = Math.round((virtualMachineHint.value() * 100));

			const rawCpus = os.cpus();
			if (rawCpus && rawCpus.length > 0) {
				cpus = { count: rawCpus.length, speed: rawCpus[0].speed, model: rawCpus[0].model };
			}
		} catch (error) {
			console.error(error); // be on the safe side with these hardware method calls
		}

		// fill in startup timers we have until now
		const timers2: { [name: string]: number } = Object.create(null);
		for (const tick of ticks()) {
			timers2[tick.name] = tick.duration;
		}

		this._startupMetrics = {
			version: 1,
			ellapsed: this.workbenchStarted - start,
			timers: {
				ellapsedExtensions: this.afterExtensionLoad - this.beforeExtensionLoad,
				ellapsedExtensionsReady: this.afterExtensionLoad - start,
				ellapsedRequire: this.afterLoadWorkbenchMain - this.beforeLoadWorkbenchMain,
				ellapsedViewletRestore: this.restoreViewletDuration,
				ellapsedEditorRestore: this.restoreEditorsDuration,
				ellapsedWorkbench: this.workbenchStarted - this.beforeWorkbenchOpen,
				ellapsedWindowLoadToRequire: this.beforeLoadWorkbenchMain - this.windowLoad,
				ellapsedTimersToTimersComputed: Date.now() - now
			},
			timers2,
			platform,
			release,
			totalmem,
			freemem,
			meminfo,
			cpus,
			loadavg,
			initialStartup,
			isVMLikelyhood,
			hasAccessibilitySupport: !!this.hasAccessibilitySupport,
			emptyWorkbench: this.isEmptyWorkbench
		};

		if (initialStartup) {
			this._startupMetrics.timers.ellapsedAppReady = this.appReady - this.start;
			this._startupMetrics.timers.ellapsedWindowLoad = this.windowLoad - this.appReady;
		}
	}
}


text:
// Code generated by go-swagger; DO NOT EDIT.

package catalog

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"
	"github.com/killbill/kbcli/v2/kbcommon"

	strfmt "github.com/go-openapi/strfmt"

	kbmodel "github.com/killbill/kbcli/v2/kbmodel"
)

// GetPlanForSubscriptionAndDateReader is a Reader for the GetPlanForSubscriptionAndDate structure.
type GetPlanForSubscriptionAndDateReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetPlanForSubscriptionAndDateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {

	case 200:
		result := NewGetPlanForSubscriptionAndDateOK()
		result.HttpResponse = response
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	default:
		errorResult := kbcommon.NewKillbillError(response.Code())
		if err := consumer.Consume(response.Body(), &errorResult); err != nil && err != io.EOF {
			return nil, err
		}
		return nil, errorResult
	}
}

// NewGetPlanForSubscriptionAndDateOK creates a GetPlanForSubscriptionAndDateOK with default headers values
func NewGetPlanForSubscriptionAndDateOK() *GetPlanForSubscriptionAndDateOK {
	return &GetPlanForSubscriptionAndDateOK{}
}

/*GetPlanForSubscriptionAndDateOK handles this case with default header values.

successful operation
*/
type GetPlanForSubscriptionAndDateOK struct {
	Payload *kbmodel.Plan

	HttpResponse runtime.ClientResponse
}

func (o *GetPlanForSubscriptionAndDateOK) Error() string {
	return fmt.Sprintf("[GET /1.0/kb/catalog/plan][%d] getPlanForSubscriptionAndDateOK  %+v", 200, o.Payload)
}

func (o *GetPlanForSubscriptionAndDateOK) GetPayload() *kbmodel.Plan {
	return o.Payload
}

func (o *GetPlanForSubscriptionAndDateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(kbmodel.Plan)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: Samuel
 * Date: 2/15/2015
 * Time: 7:42 PM
 */

namespace controller;

use application\BaseController;
use component\cms\Cms;
use component\cms\CmsInjector;
use component\cms\PageBlock;
use component\usermanager\UserManager;
use component\usermanager\UserManagerInjector;

class siteController extends BaseController{

    public function index()
    {

    }

    public function aboutus()
    {
        $this->setPageTitle("TeamHire is a team of software developers & project managers");
        $injector = new UserManagerInjector();
        $userManager = (new UserManager())->getInstance($injector);
        $all = $userManager->getAllUsers();
        $page = "About Us";
        $item = new PageBlock();
        $item->setPage($page);
        $cmsInjector = new CmsInjector();
        $cms = (new Cms())->getInstance($cmsInjector);
        $this->registry->template->about_us = $cms->getCMSItem($item);
        $this->registry->template->our_team_members = $all;
        $this->registry->template->loadView("aboutus");
    }

    public function ourservices()
    {
        $this->setPageTitle("We offer software development outsourcing services");
        $page = "our_services";
        $item = new PageBlock();
        $item->setPage(trim($page));
        $cmsInjector = new CmsInjector();
        $cms = (new Cms())->getInstance($cmsInjector);
        $all_s = $cms->getCMSItem($item);
        $this->registry->template->our_services = $all_s;
        $main = array_slice($all_s, 6);
        $this->registry->template->main_services = $main;
        $page = "our_services_why_us";
        $item->setPage(trim($page));
        $this->registry->template->service_why = $cms->getCMSItem($item);
        $this->registry->template->loadView("ourservices");
    }

    public function howitworks()
    {
        $this->setPageTitle("Let us show you how it works");
        $page = "how_it_works";
        $item = new PageBlock();
        $item->setPage(trim($page));
        $cmsInjector = new CmsInjector();
        $cms = (new Cms())->getInstance($cmsInjector);
        $this->registry->template->how_it_works = $cms->getCMSItem($item);
        $this->registry->template->loadView("howitworks");
    }

    public function getquote()
    {
        $this->setPageTitle("Tell us about your project");
        if(isset($_GET['status']))
        {
            $s = $_GET['status'];

            if($s === "pass")
            {
                $this->registry->template->success = "Thank you for contacting us, we will get back to you as soon as possible";
            }
            else
            {
                $this->registry->template->error = "We are sorry you couldn't get through to us, please try again later";
            }
        }
        $this->registry->template->loadView("quote");
    }

    public function contactus()
    {
        $this->setPageTitle("How to contact us");
        if(isset($_GET['status']))
        {
            $s = $_GET['status'];

            if($s === "pass")
            {
                $this->registry->template->success = "Thank you for contacting us, we will get back to you as soon as possible";
            }
            else
            {
                $this->registry->template->error = "We are sorry you couldn't get through to us, please try again later";
            }
        }
        $page = "contact_us";
        $item = new PageBlock();
        $item->setPage(trim($page));
        $cmsInjector = new CmsInjector();
        $cms = (new Cms())->getInstance($cmsInjector);
        $this->registry->template->contact_us = $cms->getCMSItem($item);
        $this->registry->template->loadView("contactus");
    }
}


text:
var Neuron = require("./Neuron.js");
var Layer = require("./layer");
var _ = require("lodash");
var BSplineANN;

/**
 * Creates a BSpline Artificial Neural Network.
 * @param inputsNumber
 * @param splineVectors
 * @param outputsNumber
 * @param learnRate
 * @constructor
 */
BSplineANN = function (inputsNumber, splineVectors, outputsNumber, learnRate) {

  this.layers = [];

  this.learnRate = learnRate || 0.1;

  /**
   * Returns an array of neurons that forms the input layer.
   * @returns {Layer}
   */
  function getInputLayer() {
    var layer = new Layer();

    for (var i = 0; i < inputsNumber; i++) {
      var neuron = new Neuron();
      layer.pushNeuron(neuron);
    }

    return layer;
  }

  /**
   * Returns an array of neurons that forms the hidden layer (that one that contains the splines).
   * @returns {Layer}
   */
  function getSplinesLayer() {
    var layer = new Layer();

    for (var i = 0; i < splineVectors.length; i++) {
      if (!_.isArray(splineVectors[i]) || splineVectors[i].length !== inputsNumber) {
        throw new Error("splineVectors must be an array of arrays with length equal inputsNumber");
      }
      var neuron = new Neuron();
      neuron.activate = getBaseFunctionMulti(splineVectors[i]);
      layer.pushNeuron(neuron);
    }

    return layer;
  }

  /**
   * Returns an array of neurons that forms the output layer.
   * @returns {Layer}
   */
  function getOutputLayer() {
    var layer = new Layer();

    for (var i = 0; i < outputsNumber; i++) {
      var neuron = new Neuron();
      neuron.propagate = function(error, learningRate, previousInputs) {
        var denominator = 0;
        var backErrors = [];

        previousInputs.forEach(function(previous) {
          denominator += (previous * previous);
        });
        denominator = denominator || learningRate;

        var factor = learningRate * error / denominator;

        this.weights = this.weights.map(function(weight, index) {
          backErrors.push((error - weight * previousInputs[index]) / weight);
          return weight + factor * previousInputs[index];
        });

        return backErrors;
      };
      layer.pushNeuron(neuron);
    }

    return layer;
  }

  // Build network
  var inputLayer = getInputLayer();
  var splinesLayer = getSplinesLayer();
  var outputLayer = getOutputLayer();

  inputLayer.project(splinesLayer);
  splinesLayer.project(outputLayer);

  this.layers.push(inputLayer);
  this.layers.push(splinesLayer);
  this.layers.push(outputLayer);
};

/**
 * Activates the neural network.
 * @param inputs
 * @returns {*}
 */
BSplineANN.prototype.activate = function(inputs) {
  var previousOutputs = inputs;

  this.layers.forEach(function(layer, index) {
    layer.activate(previousOutputs, index === 0);
    previousOutputs = layer.outputs;
  });

  return previousOutputs;
};

/**
 * Propagates backwards the error of the network.
 * @param errors
 */
BSplineANN.prototype.propagate = function(errors) {
  this.layers[this.layers.length-1].propagate(errors, this.learnRate);
};

module.exports = BSplineANN;

// Support function

/**
 * Returns a multi variable spline.
 * @param lambdasArray
 * @returns {Function}
 */
function getBaseFunctionMulti(lambdasArray) {
  var baseFunctionsMono = [];
  lambdasArray.forEach(function(lambdas) {
    baseFunctionsMono.push(getBaseFunctionMono(lambdas));
  });
  return function(x) {
    var result = 1;
    baseFunctionsMono.forEach(function(fBase, index) {
      result = result * fBase(x[index]);
    });
    return result;
  }
}

function getBaseFunctionMono(lambdas) {
  var fBase = function(x,k,j) {
    j = (j === undefined) ? lambdas.length - 1 : j;
    k = (k === undefined) ? j : k;

    if (k === 1) {
      return (x >= lambdas[j-1] && x < lambdas[j]) ? 1 : 0;
    }

    var step1 = ((x - lambdas[j-k]) / (lambdas[j-1] - lambdas[j-k])) * fBase(x, k-1, j-1);
    var step2 = ((lambdas[j] - x) / (lambdas[j] - lambdas[j-k+1])) * fBase(x, k-1, j);
    return step1 + step2;
  };

  return fBase;
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.cloudbees</groupId>
    <artifactId>cloudbees-oss-parent</artifactId>
    <version>2</version>
  </parent>
  <artifactId>extensibility</artifactId>
  <version>1.6-SNAPSHOT</version>

  <name>CloudBees Extensibility Mechanism</name>
  <description>Base layer for extensibility</description>

  <dependencies>
    <dependency>
      <groupId>org.jenkins-ci</groupId>
      <artifactId>annotation-indexer</artifactId>
      <version>1.3</version>
    </dependency>
    <dependency>
      <groupId>org.kohsuke.metainf-services</groupId>
      <artifactId>metainf-services</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <!--
        we use this instead of stock Guice because many of our
        use cases involves in adding Aether, which requires
        this customized version of Guice.
      -->
      <groupId>org.sonatype.sisu</groupId>
      <artifactId>sisu-inject-plexus</artifactId>
      <version>2.3.0</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.9</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git://github.com/cloudbees/extensibility-api.git</connection>
    <developerConnection>scm:git:git@github.com:cloudbees/extensibility-api.git</developerConnection>
    <url>http://github.com/cloudbees/extensibility-api</url>
  </scm>
</project>


text:
/*	$NetBSD: ptrace.h,v 1.9 1997/10/20 07:29:23 jonathan Exp $	*/

/*
 * Copyright (c) 1992, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	@(#)ptrace.h	8.1 (Berkeley) 6/10/93
 */

/*
 * Mips-dependent ptrace definitions.
 *
 */

#ifndef _MIPS_PTRACE_H_
#define _MIPS_PTRACE_H_

/*#define	PT_STEP		(PT_FIRSTMACH + 0)*/
#define	PT_GETREGS	(PT_FIRSTMACH + 1)
#define	PT_SETREGS	(PT_FIRSTMACH + 2)

#define	PT_GETFPREGS	(PT_FIRSTMACH + 3)
#define	PT_SETFPREGS	(PT_FIRSTMACH + 4)

/*
 * Glue for gdb: map NetBSD register names to legacy ptrace register names
 */
#define GPR_BASE 0

#ifndef JB_PC
#define JB_PC	2	/* pc is at ((long *)jmp_buf)[2] */
#endif

#include <machine/reg.h>	/* Historically in sys/ptrace.h */
#include <machine/regnum.h>	/* real register names */

#endif	 /* _MIPS_PTRACE_H_ */


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>au.com.sixtree.mule.modules</groupId>
    <artifactId>mule-module-xero</artifactId>
    <version>1.0.0</version>
    <packaging>mule-module</packaging>
    <name>Mule Xero Connector</name>

    <properties>
        <mule.version>3.4.0</mule.version>
        <mule.devkit.version>3.4.0</mule.devkit.version>
        <junit.version>4.9</junit.version>
        <mockito.version>1.8.2</mockito.version>
        <jdk.version>1.6</jdk.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.mule.tools.devkit</groupId>
                    <artifactId>mule-devkit-maven-plugin</artifactId>
                    <version>${mule.devkit.version}</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.mule.tools.devkit</groupId>
                                        <artifactId>mule-devkit-maven-plugin</artifactId>
                                        <versionRange>[2.0,)</versionRange>
                                        <goals>
                                            <goal>attach-test-resources</goal>
                                            <goal>filter-resources</goal>
                                            <goal>generate-sources</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5</version>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <configuration>
                            <compilerArgument>-proc:none</compilerArgument>
                            <source>${jdk.version}</source>
                            <target>${jdk.version}</target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>default-testCompile</id>
                        <configuration>
                            <compilerArgument>-proc:none</compilerArgument>
                            <source>${jdk.version}</source>
                            <target>${jdk.version}</target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.mule.tools.devkit</groupId>
                <artifactId>mule-devkit-maven-plugin</artifactId>
                <version>${mule.devkit.version}</version>
            </plugin>

            <!--  Should this be removed? -->
            <!--  <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin> -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludePackageNames>org.mule.tooling.ui.contribution:*</excludePackageNames>
                    <docletArtifact>
                        <groupId>org.mule.tools.devkit</groupId>
                        <artifactId>mule-devkit-doclet</artifactId>
                        <version>${mule.devkit.version}</version>
                    </docletArtifact>
                    <doclet>org.mule.devkit.doclet.Doclava</doclet>
                    <bootclasspath>${sun.boot.class.path}</bootclasspath>
                    <additionalparam>
                        -quiet
                        -federate JDK http://download.oracle.com/javase/6/docs/api/index.html?
                        -federationxml JDK http://doclava.googlecode.com/svn/static/api/openjdk-6.xml
                        -hdf project.artifactId "${project.artifactId}"
                        -hdf project.groupId "${project.groupId}"
                        -hdf project.version "${project.version}"
                        -hdf project.name "${project.name}"
                        -hdf project.repo.name "${project.distributionManagement.repository.name}"
                        -hdf project.repo.id "${project.distributionManagement.repository.id}"
                        -hdf project.repo.url "${project.distributionManagement.repository.url}"
                        -hdf project.snapshotRepo.name "${project.distributionManagement.snapshotRepository.name}"
                        -hdf project.snapshotRepo.id "${project.distributionManagement.snapshotRepository.id}"
                        -hdf project.snapshotRepo.url "${project.distributionManagement.snapshotRepository.url}"
                        -d ${project.build.directory}/apidocs
                    </additionalparam>
                    <useStandardDocletOptions>false</useStandardDocletOptions>
                    <additionalJOption>-J-Xmx1024m</additionalJOption>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-alpha-4</version>
                <executions>
                    <execution>
                        <id>enforce-maven-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.0.0,)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>[1.6.0,)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <filtering>true</filtering>
                <directory>src/test/resources</directory>
            </resource>
        </resources>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-core</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-spring-config</artifactId>
            <version>${mule.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.tools.devkit</groupId>
            <artifactId>mule-devkit-annotations</artifactId>
            <version>${mule.devkit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse</groupId>
            <artifactId>eclipse-workbench</artifactId>
            <version>3.6.1.M20100826-1330</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse</groupId>
            <artifactId>eclipse-runtime</artifactId>
            <version>3.6.0.v20100505</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>core</artifactId>
            <version>4.3.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-functional</artifactId>
            <version>${mule.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
			<groupId>net.oauth.core</groupId>
			<artifactId>oauth</artifactId>
			<version>20100527</version>
        </dependency>
        <dependency>
			<groupId>net.oauth.core</groupId>
			<artifactId>oauth-consumer</artifactId>
			<version>20100527</version>
        </dependency>
        <dependency>
			<groupId>net.oauth.core</groupId>
			<artifactId>oauth-httpclient3</artifactId>
			<version>20090617</version>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>http://repository.mulesoft.org/releases/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>mulesoft-snapshots</id>
            <name>MuleSoft Snapshots Repository</name>
            <url>http://repository.mulesoft.org/snapshots/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>codehaus-releases</id>
            <name>CodeHaus Releases</name>
            <url>http://repository.codehaus.org/</url>
        </repository>
        <repository>
			<id>oauth</id>
			<name>OAuth Repository</name>
			<url>http://oauth.googlecode.com/svn/code/maven/</url>
		</repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>mulesoft-plugin-releases</id>
            <name>MuleSoft Release Repository</name>
            <url>http://repository.mulesoft.org/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>mulesoft-plugin-snapshots</id>
            <name>MuleSoft Snapshot Repository</name>
            <url>http://repository.mulesoft.org/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</project>


text:
// <copyright file = "IModelsFactory.cs" company="YAGNI">
// All rights reserved.
// </copyright>
// <summary>Holds constrains of IModelsFactory implementators.</summary>

using System;
using System.Collections.Generic;

using LibrarySystem.Models.Enumerations;
using LibrarySystem.Models.Users;
using LibrarySystem.Models.Logs;

namespace LibrarySystem.Models.Factory
{
    /// <summary>
    /// Represent a <see cref="IModelsFactory"/> interface.
    /// </summary>
    public interface IModelsFactory
    {
        /// <summary>
        /// Represent the method which provide a instance of <see cref="Address"/> class with properties given as arguments.
        /// </summary>
        /// <param name="street">Street of the <see cref="Address"/> instance.</param>
        /// <param name="streetNumber">Street number of the <see cref="Address"/> instance.</param>
        /// <param name="city">City of the <see cref="Address"/> instance.</param>
        /// <param name="clients">Initial collection of clients of the <see cref="Address"/> instance.</param>
        /// <param name="employees">Initial collection of employees of the <see cref="Address"/> instance.</param>
        /// <returns>Instance of <see cref="Address"/> class.</returns>
        Address CreateAddress(string street, int? streetNumber, City city, ICollection<Client> clients, ICollection<Employee> employees);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Author"/> class with properties given as arguments.
        /// </summary>
        /// <param name="firstName">First name of the <see cref="Author"/> instance.</param>
        /// <param name="lastName">Last name of the <see cref="Author"/> instance.</param>
        /// <param name="genderType">Gender type of the <see cref="Author"/> instance.</param>
        /// <param name="books">Initial collection of books of the <see cref="Author"/> instance.</param>
        /// <returns>Instance of <see cref="Author"/> class.</returns>
        Author CreateAuthor(string firstName, string lastName, GenderType genderType, ICollection<Book> books);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Book"/> class with properties given as arguments.
        /// </summary>
        /// <param name="title">Title of the <see cref="Book"/> instance.</param>
        /// <param name="isbn">ISBN of the <see cref="Book"/> instance.</param>
        /// <param name="authors">Collection of authors of the <see cref="Book"/> instance.</param>
        /// <param name="genres">Collection of genres of the <see cref="Book"/> instance.</param>
        /// <param name="description">Description of the <see cref="Book"/> instance.</param>
        /// <param name="pageCount">Number of pages of the <see cref="Book"/> instance.</param>
        /// <param name="yearOfPublishing">Year of publishing of the <see cref="Book"/> instance.</param>
        /// <param name="publisher">Publisher of the <see cref="Book"/> instance.</param>
        /// <param name="quantity">Number of copies of the <see cref="Book"/> instance in the library.</param>
        /// <param name="available">Number of available copies of the <see cref="Book"/> instance in the library.</param>
        /// <param name="lendings">Initial collection of landings of the <see cref="Book"/> instance.</param>
        /// <returns>Instance of <see cref="Book"/> class.</returns>
        Book CreateBook(
            string title,
            string isbn,
            ICollection<Author> authors,
            ICollection<Genre> genres,
            string description,
            int pageCount,
            int yearOfPublishing,
            Publisher publisher,
            int quantity,
            int available,
            ICollection<Lending> lendings);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="City"/> class with properties given as arguments.
        /// </summary>
        /// <param name="name">Name of the <see cref="City"/> instance.</param>
        /// <param name="addresses">Initial collection of addresses related to the <see cref="City"/> instance.</param>
        /// <returns>Instance of <see cref="City"/> class.</returns>
        City CreateCity(string name, ICollection<Address> addresses);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Client"/> class with properties given as arguments.
        /// </summary>
        /// <param name="firstName">First name of the <see cref="Client"/> instance.</param>
        /// <param name="lastName">Last name of the <see cref="Client"/> instance.</param>
        /// <param name="genderType">Gender type of the <see cref="Client"/> instance.</param>
        /// <param name="pin">Personal Identification Number of the <see cref="Client"/> instance.</param>
        /// <param name="phone">Phone number of the <see cref="Client"/> instance.</param>
        /// <param name="email">Email address of the <see cref="Client"/> instance.</param>
        /// <param name="address">Address of the <see cref="Client"/> instance.</param>
        /// <param name="lendings">Initial collection of landings of the <see cref="Client"/> instance.</param>
        /// <returns>Instance of <see cref="Client"/> class.</returns>
        Client CreateClient(
            string firstName,
            string lastName,
            GenderType genderType,
            string pin,
            string phone,
            string email,
            Address address,
            ICollection<Lending> lendings);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Employee"/> class with properties given as arguments.
        /// </summary>
        /// <param name="firstName">First name of the <see cref="Employee"/> instance.</param>
        /// <param name="lastName">Last name of the <see cref="Employee"/> instance.</param>
        /// <param name="genderType">Gender type of the <see cref="Employee"/> instance.</param>
        /// <param name="jobTitle">Job title of the <see cref="Employee"/> instance.</param>
        /// <param name="address">Address of the <see cref="Employee"/> instance.</param>
        /// <param name="manager">Manager of the <see cref="Employee"/> instance.</param>
        /// <returns>Instance of <see cref="Employee"/> class.</returns>
        Employee CreateEmployee(string firstName, string lastName, GenderType genderType, JobTitle jobTitle, Address address, Employee manager);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Genre"/> class with properties given as arguments.
        /// </summary>
        /// <param name="name">Name of the <see cref="Genre"/> instance.</param>
        /// <param name="parrentGenre">Parrent genre of the <see cref="Book"/> instance.</param>
        /// <param name="childGenres">Collection of child genres of the <see cref="Genre"/> instance.</param>
        /// <param name="books">Collection of books from the <see cref="Genre"/> instance.</param>
        /// <returns>Instance of <see cref="Genre"/> class.</returns>
        Genre CreateGenre(string name, Genre parrentGenre, ICollection<Genre> childGenres, ICollection<Book> books);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Journal"/> class with properties given as arguments.
        /// </summary>
        /// <param name="title">Title of the <see cref="Journal"/> instance.</param>
        /// <param name="impactFactor">Impact factor of the <see cref="Journal"/> instance.</param>
        /// <param name="issn">ISSN of the <see cref="Journal"/> instance.</param>
        /// <param name="issueNumber">Issue number of the <see cref="Journal"/> instance.</param>
        /// <param name="yearOfPublishing">Year of publishing of the <see cref="Journal"/> instance.</param>
        /// <param name="publisher">Publisher of the <see cref="Journal"/> instance.</param>
        /// <param name="quantity">Number of copies of the <see cref="Journal"/> instance in the library.</param>
        /// <param name="available">Number of available copies of the <see cref="Journal"/> instance in the library.</param>
        /// <param name="subjects">Collection of subjects of the <see cref="Journal"/> instance.</param>
        /// <returns>Instance of <see cref="Journal"/> class.</returns>
        Journal CreateJournal(
            string title,
            float? impactFactor,
            string issn,
            int issueNumber,
            int yearOfPublishing,
            Publisher publisher,
            int quantity,
            int available,
            ICollection<Subject> subjects);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Lending"/> class with properties given as arguments.
        /// </summary>
        /// <param name="book">Lended <see cref="Book"/> instance.</param>
        /// <param name="client"><see cref="Client"/> instance borrowed the copy.</param>
        /// <param name="borrowDate">Date when the copy is borrowed.</param>
        /// <param name="returnDate">Date when the copy is returned.</param>
        /// <param name="remarks">Remarks of the current <see cref="Lending"/> instance.</param>
        /// <returns>Instance of <see cref="Lending"/> class.</returns>
        Lending CreateLending(Book book, Client client, DateTime borrowDate, DateTime? returnDate, string remarks);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Publisher"/> class with properties given as arguments.
        /// </summary>
        /// <param name="name">Name of the <see cref="Publisher"/> instance.</param>
        /// <param name="books">Collection of books of the <see cref="Publisher"/> instance.</param>
        /// <param name="journals">Collection of journals of the <see cref="Publisher"/> instance.</param>
        /// <returns>Instance of <see cref="Publisher"/> class.</returns>
        Publisher CreatePublisher(string name, ICollection<Book> books, ICollection<Journal> journals);

        /// <summary>
        /// Represent the method which provide a instance of <see cref="Subject"/> class with properties given as arguments.
        /// </summary>
        /// <param name="name">Name of the <see cref="Subject"/> instance.</param>
        /// <param name="parrentSubject">Parent node of the <see cref="Subject"/> instance.</param>
        /// <param name="childSubjects">Initial collection of child nodes of the <see cref="Subject"/> instance.</param>
        /// <param name="journals">Initial collection of journals related to the <see cref="Subject"/> instance.</param>
        /// <returns>Instance of <see cref="Subject"/> class.</returns>
        Subject CreateSubject(string name, Subject parrentSubject, ICollection<Subject> childSubjects, ICollection<Journal> journals);

        /// <summary>
        /// Represent the method witch provide a instance of <see cref="User"/> class with properties given as arguments.
        /// </summary>
        /// <param name="username">Username of the <see cref="User"/> instance.</param>
        /// <param name="passHash">PassHash of the <see cref="User"/> instance.</param>
        /// <param name="authKey">AuthKey of the <see cref="User"/> instance.</param>
        /// <param name="userType">Type of the <see cref="User"/> instance.</param>
        /// <param name="groups">Initial collection of groups related to the <see cref="User"/> instance.</param>
        /// <returns>Instance of <see cref="User"/> class.</returns>
        User CreateUser(string username, string passHash, string authKey, DateTime expirationDate, UserType userType, ICollection<Group> groups);

        /// <summary>
        /// Represent the method witch provide a instance of <see cref="Group"/> class with properties given as arguments.
        /// </summary>
        /// <param name="name">Name of the <see cref="Group"/> instance.</param>
        /// <param name="users">Collection of groups related to the <see cref="User"/> instance.</param>
        /// <returns>Instance of <see cref="Group"/> class.</returns>
        Group CreateGroup(string name, ICollection<User> users);

        /// <summary>
        /// Represent the method witch provide a instance of <see cref="Log"/> class with properties given as arguments.
        /// </summary>
        /// <param name="message">Message of the <see cref="Log"/> instance.</param>
        /// <param name="dateTime">DateTime when the log is logged.</param>
        /// <param name="logType">LogType of the <see cref="Log"/> instance.</param>
        /// <returns>Instance of <see cref="Log"/> class.</returns>
        Log CreateLog(string message, DateTime dateTime, LogType logType);

        /// <summary>
        /// Represent the method witch provide a instance of <see cref="LogType"/> class with properties given as arguments.
        /// </summary>
        /// <param name="name">Name of the <see cref="LogType"/> instance.</param>
        /// <param name="logs">Collection of logs related to the <see cref="LogType"/> instance.</param>
        /// <returns>Instance of <see cref="LogType"/> class.</returns>
        LogType CreateLogType(string name, ICollection<Log> logs);
    }
}


text:
package shedar.mods.ic2.nuclearcontrol.tileentities;

import ic2.api.network.INetworkClientTileEntityEventListener;
import ic2.api.network.INetworkDataProvider;
import ic2.api.network.INetworkUpdateListener;
import ic2.api.reactor.IReactor;
import ic2.api.reactor.IReactorChamber;
import ic2.api.tile.IWrenchable;
import ic2.core.IC2;
import ic2.core.network.NetworkManager;

import java.util.List;
import java.util.Vector;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Facing;
import shedar.mods.ic2.nuclearcontrol.IC2NuclearControl;
import shedar.mods.ic2.nuclearcontrol.ITextureHelper;
import shedar.mods.ic2.nuclearcontrol.blocks.subblocks.ThermalMonitor;
import shedar.mods.ic2.nuclearcontrol.utils.BlockDamages;
import shedar.mods.ic2.nuclearcontrol.utils.NuclearHelper;

public class TileEntityThermo extends TileEntity implements INetworkDataProvider, INetworkUpdateListener,
		INetworkClientTileEntityEventListener, IWrenchable, ITextureHelper {
	protected boolean init;
	private int prevHeatLevel;
	public int heatLevel;
	private int mappedHeatLevel;
	private int prevOnFire;
	public int onFire;
	private short prevFacing;
	public short facing;
	private boolean prevInvertRedstone;
	private boolean invertRedstone;

	protected int updateTicker;
	protected int tickRate;

	public TileEntityThermo() {
		init = false;
		onFire = 0;
		prevOnFire = 0;
		facing = 0;
		prevFacing = 0;
		mappedHeatLevel = 500;
		prevHeatLevel = 500;
		heatLevel = 500;
		updateTicker = 0;
		tickRate = -1;
		prevInvertRedstone = false;
		invertRedstone = false;
	}

	protected void initData() {
		if (!worldObj.isRemote) {
			worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
		}
		init = true;
	}

	public boolean isInvertRedstone() {
		return invertRedstone;
	}

	public void setInvertRedstone(boolean value) {
		invertRedstone = value;
		if (prevInvertRedstone != value) {
			worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
			IC2.network.get().updateTileEntityField(this, "invertRedstone");
		}
		prevInvertRedstone = value;
	}

	@Override
	public short getFacing() {
		return (short) Facing.oppositeSide[facing];
	}

	@Override
	public void setFacing(short f) {
		setSide((short) Facing.oppositeSide[f]);
	}

	private void setSide(short f) {
		facing = f;

		if (prevFacing != f) {
			// NetworkHelper.updateTileEntityField(this, "facing");
			IC2.network.get().updateTileEntityField(this, "facing");
		}

		prevFacing = f;
	}

	@Override
	public List<String> getNetworkedFields() {
		Vector<String> vector = new Vector<String>(3);
		vector.add("heatLevel");
		vector.add("onFire");
		vector.add("facing");
		vector.add("invertRedstone");
		return vector;
	}

	@Override
	public void onNetworkUpdate(String field) {
		if (field.equals("heatLevel") && prevHeatLevel != heatLevel) {
			worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
			worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
			prevHeatLevel = heatLevel;
		}
		if (field.equals("facing") && prevFacing != facing) {
			worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
			prevFacing = facing;
		}
		if (field.equals("onFire") && prevOnFire != onFire) {
			worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
			worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
			prevOnFire = onFire;
		}
		if (field.equals("invertRedstone") && prevInvertRedstone != invertRedstone) {
			worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
			worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
			prevInvertRedstone = invertRedstone;
		}
	}

	@Override
	public void onNetworkEvent(EntityPlayer entityplayer, int i) {
		if (i < 0) {
			switch (i) {
			case -1:
				setInvertRedstone(false);
				break;
			case -2:
				setInvertRedstone(true);
				break;
			default:
				break;
			}
		} else {
			setHeatLevel(i);
		}

	}

	public void setOnFire(int f) {
		onFire = f;
		if (prevOnFire != f) {
			IC2.network.get().updateTileEntityField(this, "onFire");
		}
		prevOnFire = onFire;
	}

	public int getOnFire() {
		return onFire;
	}

	public void setHeatLevel(int h) {
		heatLevel = h;
		if (prevHeatLevel != h) {
			IC2.network.get().updateTileEntityField(this, "heatLevel");
			worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
			worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
		}
		prevHeatLevel = heatLevel;
		mappedHeatLevel = h;
	}

	public void setHeatLevelWithoutNotify(int h) {
		heatLevel = h;
		prevHeatLevel = heatLevel;
		mappedHeatLevel = h;
	}

	public Integer getHeatLevel() {
		return heatLevel;
	}

	@Override
	public void readFromNBT(NBTTagCompound nbttagcompound) {
		super.readFromNBT(nbttagcompound);
		if (nbttagcompound.hasKey("heatLevel")) {
			int heat = nbttagcompound.getInteger("heatLevel");
			setHeatLevelWithoutNotify(heat);
			prevFacing = facing = nbttagcompound.getShort("facing");
			prevInvertRedstone = invertRedstone = nbttagcompound.getBoolean("invert");
		}
	}

	@Override
	public void writeToNBT(NBTTagCompound nbttagcompound) {
		super.writeToNBT(nbttagcompound);
		nbttagcompound.setInteger("heatLevel", getHeatLevel());
		nbttagcompound.setShort("facing", facing);
		nbttagcompound.setBoolean("invert", isInvertRedstone());
	}

	protected void checkStatus() {
		byte fire;
		IReactorChamber chamber = NuclearHelper.getReactorChamberAroundCoord(worldObj, xCoord, yCoord, zCoord);
		IReactor reactor = null;
		if (chamber != null) {
			reactor = chamber.getReactor();
		}
		if (reactor == null) {
			reactor = NuclearHelper.getReactorAroundCoord(worldObj, xCoord, yCoord, zCoord);
		}
		if (reactor != null) {
			if (tickRate == -1) {
				tickRate = reactor.getTickRate() / 2;
				if (tickRate == 0) tickRate = 1;
				updateTicker = tickRate;
			}
			int reactorHeat = reactor.getHeat();
			if (reactorHeat >= heatLevel) {//Normally mappedHeatLevel
				fire = 1;
			} else {
				fire = 0;
			}
		} else {
			fire = -1;
		}
		if (fire != getOnFire()) {
			setOnFire(fire);
			worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
		}
	}

	@Override
	public void updateEntity() {
		if (!init) {
			initData();
		}
		if (!worldObj.isRemote) {
			if (tickRate != -1 && updateTicker-- > 0)
				return;
			updateTicker = tickRate;
			checkStatus();
		}

	}

	@Override
	public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) {
		return false;
	}

	@Override
	public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
		return true;
	}

	@Override
	public float getWrenchDropRate() {
		return 1;
	}

	@Override
	public int modifyTextureIndex(int texture) {
		if (texture != ThermalMonitor.I_FACE_GREEN)
			return texture;
		int fireState = getOnFire();
		switch (fireState) {
		case 1:
			texture = ThermalMonitor.I_FACE_RED;
			break;
		case 0:
			texture = ThermalMonitor.I_FACE_GREEN;
			break;
		default:
			texture = ThermalMonitor.I_FACE_GRAY;
			break;
		}
		return texture;
	}

	@Override
	public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
		return new ItemStack(IC2NuclearControl.blockNuclearControlMain, 1, BlockDamages.DAMAGE_THERMAL_MONITOR);
	}
}


text: int havePostfixToSum(char a[], int size);


text:
<?php
/* @var $this yii\web\View */
/* @var $content string */

use frontend\assets\children\HomeAsset;
use frontend\components\CategoryArticlesList;
use frontend\components\homepage\MainInvitation;
use frontend\components\homepage\OpeningTime;
use frontend\models\MenuContent;
use yii\helpers\Html;

HomeAsset::register($this); ?>

	<?= MainInvitation::widget([
		'menuId' => Yii::$app->params[Yii::$app->language]['childrenInvitationsMenuId'],
		'categoryId' => Yii::$app->params[Yii::$app->language]['childrenMainInvitationsDefaultCategoryId'],
		'wordsCount' => 50,
		'maxImageWidth' => 200
	]); ?>

		<?= Html::img(Yii::$app->request->baseUrl . '/children-assets/img/children.png'); ?>

			<?= CategoryArticlesList::widget([
				'categoryId' => Yii::$app->params[Yii::$app->language]['childrenNewsDefaultCategoryId'],
				'viewName' => 'newsHP',
				'itemsCount' => 3,
				'wordsCount' => 20,
				'withImage' => true,
				'withDate' => false
			]); ?>

						<?= Html::img(Yii::$app->request->baseUrl . '/children-assets/img/moje-konto.png', [
							'class' => 'activator img-responsive'
						]); ?>

						<span class="card-title activator truncate" title="<?= Yii::t('front', 'My account'); ?>"><?= Yii::t('front', 'My account'); ?>

						<?= Yii::t('front', 'My account'); ?>close

<?= Yii::t('front', 'After login you will have overview of your borrowings, bookings etc.'); ?>

<?= Yii::t('front', 'For access to your account you must be registered by our library.'); ?>

						<?= Html::a(Yii::t('front', 'login'), 'https://knihovna.mkdac.cz/Katalog/login', [
							'class' => 'btn truncate'
						]); ?>

						<?= Html::img(Yii::$app->request->baseUrl . '/children-assets/img/oteviraci-doba.png', [
							'class' => 'activator img-responsive'
						]); ?>

						<span class="card-title activator truncate" title="<?= Yii::t('front', 'Opening time'); ?>"><?= Yii::t('front', 'Opening time'); ?>

						<?= Yii::t('front', 'Opening time'); ?>close
						<?= OpeningTime::widget([
							'data' => ['children' => [
									'1' => ['am' => null, 'pm' => '12:00 - 17:00'],
									'2' => ['am' => null, 'pm' => null],
									'3' => ['am' => null, 'pm' => '12:00 - 17:00'],
									'4' => ['am' => null, 'pm' => '12:00 - 17:00'],
									'5' => ['am' => null, 'pm' => '12:00 - 16:00'],
									'6' => ['am' => null, 'pm' => null],
									'7' => ['am' => null, 'pm' => null]
								]
							],
							'viewName' => 'childrenOpeningTime'
						]); ?>

						<?= Html::img(Yii::$app->request->baseUrl . '/children-assets/img/knihy-a-spol.png', [
							'class' => 'activator responsive-img'
						]); ?>

						<span class="card-title activator truncate" title="<?= Yii::t('front', 'Books etc.'); ?>"><?= Yii::t('front', 'Books etc.'); ?>

						<?= Yii::t('front', 'Books etc.'); ?>close

<?= Yii::t('front', 'Of course you can borrow a book in our library. But not only! We have prepared for you some other interesting things like e-books, games, thematic cases and so on'); ?>

						<?php
						$url = MenuContent::getMenuUrlFromId(Yii::$app->params[ Yii::$app->language ]['childrenBooksEtcMenuId']);
						echo Html::a(Yii::t('front', 'more information'), $url, [
							'class' => 'btn truncate'
						]); ?>

						<?= Html::img(Yii::$app->request->baseUrl . '/children-assets/img/prodlouzeni-vypujcky.png', [
							'class' => 'activator responsive-img'
						]); ?>

						<span class="card-title activator truncate" title="<?= Yii::t('front', 'Renewals'); ?>"><?= Yii::t('front', 'Renewals'); ?>

						<?= Yii::t('front', 'Renewals'); ?>close

<?= Yii::t('front', 'You can make prolongation of your borrowing by more ways:'); ?>

<?= Yii::t('front', 'by phone'); ?>

<?= Yii::t('front', 'by email'); ?>

<?= Yii::t('front', 'by online form'); ?>

						<?= Html::a(Yii::t('front', 'details'), ['site/borrowing', 'web' => \Yii::$app->request->get('web'), 'language' => \Yii::$app->request->get('language')], [
							'class' => 'btn truncate'
						]); ?>

						<?= Html::a('book
' . Yii::t('front', 'new books'), 'https://knihovna.mkdac.cz/Katalog/news', [
							'class' => 'white-text'
						]); ?>

						<?php
						$url = MenuContent::getMenuUrlFromId(Yii::$app->params[ Yii::$app->language ]['childrenEBooksMenuId']);
						echo Html::a('stay_current_portrait
' . Yii::t('front', 'e-books'), $url, [
							'class' => 'white-text'
						]); ?>

						<?php
						$url = MenuContent::getMenuUrlFromId(Yii::$app->params[ Yii::$app->language ]['childrenDeskGamesMenuId']);
						echo Html::a('games
' . Yii::t('front', 'desk games'), $url, [
							'class' => 'white-text'
						]); ?>

						<?php
						$url = MenuContent::getMenuUrlFromId(Yii::$app->params[ Yii::$app->language ]['childrenThematicCasesMenuId']);
						echo Html::a('work
' . Yii::t('front', 'thematic cases'), $url, [
							'class' => 'white-text'
						]); ?>


text:
<?php

namespace Lag\Bundles\Admin\BaseBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Lag\Bundles\Admin\ClientBundle\Form\ClientType;
use Lag\Bundles\Admin\ClientBundle\Entity\Client;
use Symfony\Component\HttpFoundation\Response;
use Lag\Bundles\Admin\ClientBundle\Entity\ClientNotice;

class NoticeController extends Controller
{
    public function listAction(Request $request) {
        $em = $this->getDoctrine()->getManager();
        $paginator = $this->get('knp_paginator');
        $query = $em->createQueryBuilder('n')
                ->select('n')
                ->from('LagBundlesAdminClientBundle:ClientNotice','n')
                ->orderby('n.updatedAt','DESC')
                ->getQuery();
        $pagination = $paginator->paginate(
                $query,
                $request->get('page',1),
                50);
        return $this->render('LagBundlesAdminBaseBundle:Notice:list.html.twig',array('pagination'=>$pagination));
    }
    /**
     * 添加但用体通知
     * @param Request $request
     * @return Response
     */
    public function ajaxAddClientNoticeAction(Request $request) {
        $content = $request->get('content');
        $title = $request->get('title');
        $client_id = $request->get('client_id');
        $hasContent = $request->get('has_content');
        $type =1;
        if($hasContent=='false'){
            $hasContent = false;
            $content = '';
        }else{
            $hasContent = true;
        }
        if(!$title){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'请填写通知内容!'
                )));
        }
        if(!$client_id){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'用户错误!'
                )));
        }
        $em = $this->getDoctrine()->getManager();
        $client = $em->getRepository('LagBundlesAdminClientBundle:Client')->find($client_id);
        $notice = new ClientNotice();
        $notice->setContent($content)
                ->addClient($client)
                ->setBatch($client->getBatch())
                ->setCase($client->getCase())
                ->setTitle($title)
                ->setHasContent($hasContent)
                ->setType($type);
        $em->persist($notice);
        $em->flush();

        $client->setLastNotice($title);
        $em->persist($client);
        $em->flush();
        $data = array('success'=>1,'data'=>array('id'=>$notice->getId(),'type'=>$type,'date'=>$notice->getUpdatedAt()->format('Y-m-d')));
        return new Response(json_encode($data));
    }

    /**
     * 添加但用体通知
     * @param Request $request
     * @return Response
     */
    public function ajaxAddBatchNoticeAction(Request $request) {
        $content = $request->get('content');
        $title = $request->get('title');
        $batch_id = $request->get('batch_id');
        $hasContent = $request->get('has_content');
        $type =2;
        if($hasContent=='false'){
            $hasContent = false;
            $content = '';
        }else{
            $hasContent = true;
        }
        if(!$title){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'请填写通知内容!'
                )));
        }
        if(!$batch_id){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'批次错误!'
                )));
        }
        $em = $this->getDoctrine()->getManager();
        $batch = $em->getRepository('LagBundlesAdminCaseBundle:Batch')->find($batch_id);
        if(!$batch){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'批次错误!'
                )));
        }
        $clients = $em->getRepository('LagBundlesAdminClientBundle:Client')->findBy(array('batch'=>$batch));

        $notice = new ClientNotice();
        $notice->setContent($content);
        foreach ($clients as $client){
            $notice->addClient($client);
        }

        $notice->setTitle($title)
                ->setBatch($batch)
                ->setCase($batch->getCase())
                ->setHasContent($hasContent)
                ->setType($type);
        $em->persist($notice);
        $em->flush();

        $data = array('success'=>1,'data'=>array('id'=>$notice->getId(),'type'=>$type,'date'=>$notice->getUpdatedAt()->format('Y-m-d')));
        return new Response(json_encode($data));
    }
    /**
     * 添加但用体通知
     * @param Request $request
     * @return Response
     */
    public function ajaxAddCaseNoticeAction(Request $request) {
        $content = $request->get('content');
        $title = $request->get('title');
        $case_id = $request->get('case_id');
        $hasContent = $request->get('has_content');
        $type =3;
        if($hasContent=='false'){
            $hasContent = false;
            $content = '';
        }else{
            $hasContent = true;
        }
        if(!$title){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'请填写通知内容!'
                )));
        }
        if(!$case_id){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'批次错误!'
                )));
        }
        $em = $this->getDoctrine()->getManager();
        $case = $em->getRepository('LagBundlesAdminCaseBundle:_Case')->find($case_id);
        if(!$case){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'批次错误!'
                )));
        }
        $clients = $em->getRepository('LagBundlesAdminClientBundle:Client')->findBy(array('_case'=>$case));

        $notice = new ClientNotice();
        $notice->setContent($content);
        foreach ($clients as $client){
            $notice->addClient($client);
        }

        $notice->setTitle($title)

                ->setCase($case)
                ->setHasContent($hasContent)
                ->setType($type);
        $em->persist($notice);
        $em->flush();

        $data = array('success'=>1,'data'=>array('id'=>$notice->getId(),'type'=>$type,'date'=>$notice->getUpdatedAt()->format('Y-m-d')));
        return new Response(json_encode($data));
    }
    /**
     * 添加但用体通知
     * @param Request $request
     * @return Response
     */
    public function ajaxAddAllNoticeAction(Request $request) {
        $content = $request->get('content');
        $title = $request->get('title');
        $hasContent = $request->get('has_content');
        $type =4;
        if($hasContent=='false'){
            $hasContent = false;
            $content = '';
        }else{
            $hasContent = true;
        }
        if(!$title){
            return new Response(json_encode(array(
                'success'=>0,
                'error'=>'请填写通知内容!'
                )));
        }

        $em = $this->getDoctrine()->getManager();

        $notice = new ClientNotice();
        $notice->setContent($content);

        $notice->setTitle($title)
                ->setHasContent($hasContent)
                ->setType($type);
        $em->persist($notice);
        $em->flush();

        $data = array('success'=>1,'data'=>array('id'=>$notice->getId(),'type'=>$type,'date'=>$notice->getUpdatedAt()->format('Y-m-d')));
        return new Response(json_encode($data));
    }
    public function ajaxDelNoticeAction(Request $request) {
        $id = $request->get('id');
        $em = $this->getDoctrine()->getManager();
        $notice = $em->getRepository('LagBundlesAdminClientBundle:ClientNotice')->find($id);
        $notice->setIsDeleted(true);
        $em->persist($notice);
        $em->flush();
        $data = array('success'=>1,'id'=>$id);
        return new Response(json_encode($data));
    }
}


text:
#pragma once

#include <stdint.h>
#include "usb_libusb10.h"

typedef struct {
	uint32_t magic;
	uint32_t tag;
	uint32_t bytes;
	uint32_t cmd;
	uint32_t addr;
	uint32_t unk;
} bootloader_command;

typedef struct {
	uint32_t magic;       // Magic bytes.  2BL uses 0xF00BACCA, audios uses 0xCA77F00D
	uint16_t ver_minor;   // The version string has four parts, each a 16-bit little-endian int.
	uint16_t ver_major;   // Yes, minor comes before major.
	uint16_t ver_release; //
	uint16_t ver_patch;   //
	uint32_t base_addr;   // Base address of firmware image.  2BL starts at 0x10000, audios starts at 0x80000.
	uint32_t size;        // Size of firmware image, in bytes
	uint32_t entry_addr;  // Code entry point (absolute address)
} firmware_header;

typedef struct {
	uint32_t magic;
	uint32_t tag;
	uint32_t arg1; // initial command: 0.  Firmware blocks: byte count.
	uint32_t cmd;
	uint32_t arg2; // initial command: byte count.  Firmware blocks: target address.
	uint32_t zeros[8];
} cemdloader_command;

typedef struct {
	uint32_t magic;
	uint32_t tag;
	uint32_t status;
} bootloader_status_code;

int upload_firmware(fnusb_dev* dev);
int upload_cemd_data(fnusb_dev* dev);


text:
const bustCache = (() => {
	const key = 'bustCache';
	let hash = localStorage.getItem(key) || (localStorage[key] = Math.random().toString(36).substring(7));
	return '_=' + hash;
})();

require(["./settings"], (settings) => {
	requirejs.config({
		...settings,
		paths: {
			...settings.paths,
			...settings.localRefs,
		},
//		urlArgs: bustCache,
	});
	require([
		'bootstrap',
		'ko.sortable',
		...Object.values(settings.cssPaths),
	], function () { // bootstrap must come first
    $.fn.bstooltip = $.fn.tooltip;
		require([
			'knockout',
			'Application',
			'Model',
			'const',
			'pages/Router',
			'atlas-state',
			'loading',
			'user-bar',
			'welcome',
			'components/white-page',
			'components/terms-and-conditions/terms-and-conditions',
		],
			(
				ko,
				Application,
				Model,
				constants,
				Router,
				sharedState,
			) => {
				const app = new Application(new Model(), new Router());

				app.bootstrap()
					.then(() => app.checkOAuthError())
					.then(() => app.synchronize())
					.catch(er => {
						sharedState.appInitializationStatus(constants.applicationStatuses.failed);
						console.error('App initialization failed', er);
					});

				return app;
		});
	});
});


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Uses of Class fsb.ast.BoolExpr.BXType
</TITLE>

<META NAME="date" CONTENT="2012-04-22">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
fsb.ast.BoolExpr.BXType

Packages that use BoolExpr.BXType

fsb.ast

Uses of BoolExpr.BXType in fsb.ast

Fields in fsb.ast declared as BoolExpr.BXType

private  BoolExpr.BXType
ComplexBool.type

private  BoolExpr.BXType
ComparsionBool.type

private  BoolExpr.BXType
AssertComplexBool.type

private  BoolExpr.BXType
AssertComparsionBool.type

Methods in fsb.ast that return BoolExpr.BXType

static BoolExpr.BXType
BoolExpr.BXType.valueOf(java.lang.String name)

          Returns the enum constant of this type with the specified name.

static BoolExpr.BXType[]
BoolExpr.BXType.values()

          Returns an array containing the constants of this enum type, in
the order they are declared.

Constructors in fsb.ast with parameters of type BoolExpr.BXType

AssertComparsionBool(AssertAritExpr left,
                     AssertAritExpr right,
                     BoolExpr.BXType type)

AssertComplexBool(AssertBoolExpr left,
                  AssertBoolExpr right,
                  BoolExpr.BXType type)

ComparsionBool(AritExpr left,
               AritExpr right,
               BoolExpr.BXType type)

ComplexBool(BoolExpr left,
            BoolExpr right,
            BoolExpr.BXType type)

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
'use strict';

angular.module('finalAngularApp')
  .config(function ($routeProvider) {
    $routeProvider
      .when('/admin', {
        templateUrl: 'app/admin/admin.html',
        controller: 'AdminCtrl'
      });
  });